<!--
/* JS for nineblackalps.com */
/****************************/


/* Character Counter for Blog Comments */



maxKeys = 250;
    var IE = (document.all) ? 1 : 0;
    var DOM = 0; 
    if (parseInt(navigator.appVersion) >=5) {DOM=1};

function txtshow( txt2show,boxid ) 
{
    // Detect Browser

    if (DOM) {
var viewer = document.getElementById("txtmsg"+boxid);
        viewer.innerHTML=txt2show;
    }
    else if(IE) {
        document.all["txtmsg"+boxid].innerHTML=txt2show;
    }
        }

function keyup(what,boxid) 
{
  var str = new String(what.value);
  var len = str.length;
  var showstr = len + "/" + maxKeys + " entered.";
  //if (len > maxKeys) showstr += '<br /><font color="red">** Please keep to 100 characters or less, or part of your comment will be lost **</font>';
  if (len > maxKeys) showstr = '<font color="red">' + len + '</font>/' + maxKeys + ' entered';
  txtshow( showstr,boxid );
}


/* jQuery custom fade */

$(document).ready(function()
{
	jQuery.fn.fadeToggle = function(speed, easing, callback) 
	{ 
		return this.animate({opacity: 'toggle'}, speed, easing, callback); 
	}; 
});


/* Gallery Credits */

function gallery_credits() {
    window.open("gallery_credits.php","","menubar=no,width=460,height=260,toolbar=no,screenX=300,screenY=200");
}

/* Store popups */

function store_legal() {
    window.open("store_legal.php","","menubar=yes,scrollbars=yes,width=460,height=260,toolbar=no,screenX=300,screenY=200");
}

function store_shipping() {
    window.open("store_shipping.php","","menubar=yes,scrollbars=yes,width=460,height=260,toolbar=no,screenX=300,screenY=200");
}

/* Links Preloader */

if (document.images)
{
  pic1= new Image(66,70); 
  pic1.src="images/70px_links_inverted/news.jpg"; 

  pic2= new Image(66,70); 
  pic2.src="images/70px_links_inverted/newsblack.jpg"; 

  pic3= new Image(64,70); 
  pic3.src="images/70px_links_inverted/tour.jpg"; 
  
  pic4= new Image(64,70); 
  pic4.src="images/70px_links_inverted/tourblack.jpg"; 

  pic5= new Image(89,70); 
  pic5.src="images/70px_links_inverted/gallery.jpg"; 

  pic6= new Image(89,70); 
  pic6.src="images/70px_links_inverted/galleryblack.jpg"; 
  
  pic7= new Image(75,70); 
  pic7.src="images/70px_links_inverted/media.jpg"; 

  pic8= new Image(75,70); 
  pic8.src="images/70px_links_inverted/mediablack.jpg"; 

  pic9= new Image(79,70); 
  pic9.src="images/70px_links_inverted/discog.jpg"; 
  
  pic10= new Image(79,70); 
  pic10.src="images/70px_links_inverted/discogblack.jpg"; 

  pic11= new Image(65,70); 
  pic11.src="images/70px_links_inverted/store.jpg"; 

  pic12= new Image(65,70); 
  pic12.src="images/70px_links_inverted/storeblack.jpg"; 
  
  pic13= new Image(86,70); 
  pic13.src="images/70px_links_inverted/blog.jpg"; 

  pic14= new Image(86,70); 
  pic14.src="images/70px_links_inverted/blogblack.jpg"; 
  
  pic15= new Image(37,70); 
  pic15.src="images/70px_links_inverted/bio_tweaked.jpg"; 

  pic16= new Image(37,70); 
  pic16.src="images/70px_links_inverted/bio_tweakedblack.jpg"; 
  
  pic17= new Image(16,16); 
  pic17.src="images/spinner.gif"; 
}

/* Image Fader */

document.write("<style type='text/css'>#fade {visibility:hidden;}</style>");

function initImage() {
	imageId = 'fade';
	image = document.getElementById(imageId);
	setOpacity(image, 0);
	image.style.visibility = "visible";
	fadeIn(imageId,0);
}
function fadeIn(objId,opacity) {
	if (document.getElementById) {
		obj = document.getElementById(objId);
		if (opacity <= 100) {
			setOpacity(obj, opacity);
			opacity += 3;
			window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 10);
		}
	}
}
function setOpacity(obj, opacity) {
	opacity = (opacity == 100)?99.999:opacity;
	// IE/Win
	obj.style.filter = "alpha(opacity:"+opacity+")";
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = opacity/100;
	// Older Mozilla and Firefox
	obj.style.MozOpacity = opacity/100;
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = opacity/100;
}
window.onload = function() {initImage()}

/* Rollover for links */

function roll(img_name, img_src)
{
	document[img_name].src = img_src;
}


/* Media Page Players and Popups */

function player() {
	window.open("player.php","player","menubar=no,width=436,height=360,toolbar=no,screenx=300,screeny=150,resizable=no");
}
		
function everythingis() {
	window.open("everythingis.php","player","menubar=no,width=436,height=360,toolbar=no,screenx=300,screeny=150,resizable=no");
}

function lovehate() {
	window.open("lovehate.php","player","menubar=no,width=436,height=360,toolbar=no,screenx=300,screeny=150,resizable=no");
}

function bsides() {
	window.open("bsides.php","player","menubar=no,width=436,height=360,toolbar=no,screenx=300,screeny=150,resizable=no");
}
		
function demos() {
	window.open("demos.php","player","menubar=no,width=436,height=360,toolbar=no,screenx=300,screeny=150,resizable=no");
}

function bitter_end() {
		window.open("http://www.nineblackalps.com/bitterend.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

function unsatisfied() {
		window.open("http://www.nineblackalps.com/unsatisfied.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

function shot_down() {
		window.open("http://www.nineblackalps.com/shot_down.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

function just_friends() {
		window.open("http://www.nineblackalps.com/just_friends.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

function not_everyone() {
		window.open("http://www.nineblackalps.com/not_everyone.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

function burn_faster() {
		window.open("http://www.nineblackalps.com/burn_faster.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

function buy_nothing() {
		window.open("http://www.nineblackalps.com/buy_nothing.php", "video_player", "menubar=no,width=520,height=450,toolbar=no,screenX=300,screenY=150,resizable=no");
}

//-->