// JavaScript Document
function init() {
	
	//Redirect if Netscape 4
	if(document.layers || !document.getElementById) {
		alert('Browser Not Supported! Upgrade Now!');
		window.location.replace("http://www.mozilla.org/download.html");
	}//end if
	
	//If DocumentID Exists
	if(document.getElementById) {
		var elem = document.getElementById("contentDiv");
		xPos = elem.offsetHeight;
	}//end if 
	
	//Variables
	var contentDiv = document.getElementById("contentDiv");
	var footerDiv = document.getElementById("footerDiv");
	
	//Set initial value
	contentDiv.style.height = xPos + 'px';
	
	//Set Structure 
	if(xPos < 300) {
		contentDiv.style.height = 370 + 'px';
		
		if(document.all) {
			footerDiv.style.pixelTop = '458';
		}//end if
		else {
			footerDiv.style.top = 458 + 'px';
		}	

	}//end else if
	
	//Set Structure 
	if(xPos >= 300) {
		
		if(document.all) {
			var ieFooter = xPos + 88 + '';
			footerDiv.style.pixelTop = ieFooter;
		}//end if
		else {
			footerDiv.style.top = xPos + 88 + 'px';
		}	
		
	}//end else if
			
		
}//end init


function goHome() {
	window.location = "index.php?method=home"
	
}//end goHome


function changeArtist(which) {
	
	//Destroy Elements
	if(which.options.selectedIndex != 0) {
		
		//Destroy Title
		if(document.getElementById("titleTag")) {
			var parentNode = document.getElementById("titleTag").parentNode;
			parentNode.removeChild(document.getElementById("titleTag"));
		}//end if
		
		//Destroy Our Description
		if(document.getElementById("ourTag")) {
			var parentNode = document.getElementById("ourTag").parentNode;
			parentNode.removeChild(document.getElementById("ourTag"));
		}//end if
		
		//Destroy EmbedTagOne
		if(document.getElementById("videoOne")) {
			var parentNode = document.getElementById("videoOne").parentNode;
			parentNode.removeChild(document.getElementById("videoOne"));
		}//end if
		
		//Destroy EmbedTagOne
		if(document.getElementById("videoTwo")) {
			var parentNode = document.getElementById("videoTwo").parentNode;
			parentNode.removeChild(document.getElementById("videoTwo"));
		}//end if
		
	}//end if
	
	//IE Dynamic Object Issues. Must make this code for IE, and other Browsers.
	if(document.all) {
		
		var contentDiv = document.getElementById("contentDiv");
		
		//Issues
		var titleTag = document.createElement('p');
		titleTag.setAttribute('id','titleTag');
		titleTag.setAttribute('style','margin-left:auto;margin-right:auto;text-decoration:underline;');
		titleTag.appendChild(document.createTextNode("Currently Under Construction for Internet Explorer. Please use another browser until this issue is resolved."));
		
		//Append to Content Div
		contentDiv.appendChild(titleTag);
		
		//DHTML LOCATIONS
		//Title
		//document.getElementById("titleTag").style.position = "absolute";
		document.getElementById("titleTag").style.fontWeight = "bold";
		document.getElementById("titleTag").style.top = "105px";
		//Our Tag
		//document.getElementById("ourTag").style.position = "absolute";
		//document.getElementById("ourTag").style.top = "225px";
		
		
		//Re-adjust Other Div Positions
		document.getElementById("contentDiv").style.height = "600px";
		init();
		
	}//end if

	//Browsers besides IE
	else {
		
	//Issues
	if(which.options.selectedIndex == 1) {
		
		var contentDiv = document.getElementById("contentDiv");
		
		//Issues
		var titleTag = document.createElement('p');
		titleTag.setAttribute('id','titleTag');
		titleTag.setAttribute('style','margin-left:auto;margin-right:auto;text-decoration:underline;');
		titleTag.appendChild(document.createTextNode("Issues"));
		
		
		//Create Video Object
		var videoOne = document.createElement('object');
		videoOne.setAttribute('id','videoOne');
		videoOne.setAttribute('style', 'margin:15px;');
		
		//Create First Parameter
		var videoParamOne = document.createElement('param');
		videoParamOne.setAttribute('name','movie');
		videoParamOne.setAttribute('value','http://www.youtube.com/v/X_sDcN62jTA');
		
		//Create Second Parameter
		var videoParamTwo = document.createElement('param');
		videoParamTwo.setAttribute('name','allowFullScreen');
		videoParamTwo.setAttribute('value','false');
		
		//Create Third Parameter
		var videoParamThree = document.createElement('param');
		videoParamThree.setAttribute('name','allowScriptAccess');
		videoParamThree.setAttribute('value','never');
		
		//Create Embed Tag
		//Create First Parameter
		var embedTagOne = document.createElement('embed');
		embedTagOne.setAttribute('src','http://www.youtube.com/v/X_sDcN62jTA');
		embedTagOne.setAttribute('type','application/x-shockwave-flash');
		embedTagOne.setAttribute('allowfullscreen','false');
		embedTagOne.setAttribute('allowScriptAccess','never');
		embedTagOne.setAttribute('width','425');
		embedTagOne.setAttribute('height','344');
		
		//Append Params/Embed Tag to Object
		videoOne.appendChild(videoParamOne);
		videoOne.appendChild(videoParamTwo);
		videoOne.appendChild(videoParamThree);
		videoOne.appendChild(embedTagOne);
		
		
		//Create Video Object 2
		var videoTwo = document.createElement('object');
		videoTwo.setAttribute('id','videoTwo');
		videoTwo.setAttribute('style', 'margin:15px;');
		
		//Create First Parameter
		var videoParamOne = document.createElement('param');
		videoParamOne.setAttribute('name','movie');
		videoParamOne.setAttribute('value','http://www.youtube.com/v/MW8K3B5j0Vw&hl=en_US&fs=1&');
		
		//Create Second Parameter
		var videoParamTwo = document.createElement('param');
		videoParamTwo.setAttribute('name','allowFullScreen');
		videoParamTwo.setAttribute('value','false');
		
		//Create Third Parameter
		var videoParamThree = document.createElement('param');
		videoParamThree.setAttribute('name','allowScriptAccess');
		videoParamThree.setAttribute('value','never');
		
		//Create Embed Tag
		//Create First Parameter
		var embedTagOne = document.createElement('embed');
		embedTagOne.setAttribute('src','http://www.youtube.com/v/MW8K3B5j0Vw&hl=en_US&fs=1&');
		embedTagOne.setAttribute('type','application/x-shockwave-flash');
		embedTagOne.setAttribute('allowfullscreen','false');
		embedTagOne.setAttribute('allowScriptAccess','never');
		embedTagOne.setAttribute('width','425');
		embedTagOne.setAttribute('height','344');
		
		var breakline = document.createElement('p');
		
		//Append Params/Embed Tag to Object
		videoTwo.appendChild(videoParamOne);
		videoTwo.appendChild(videoParamTwo);
		videoTwo.appendChild(videoParamThree);
		videoTwo.appendChild(embedTagOne);
		
		//Append to Content Div
		contentDiv.appendChild(titleTag);
		//contentDiv.appendChild(ourTag);
		contentDiv.appendChild(videoOne);
		contentDiv.appendChild(breakline);
		contentDiv.appendChild(breakline);
		contentDiv.appendChild(videoTwo);
		
		//DHTML LOCATIONS
		//Title
		//document.getElementById("titleTag").style.position = "absolute";
		document.getElementById("titleTag").style.fontWeight = "bold";
		document.getElementById("titleTag").style.top = "105px";
		//Our Tag
		//document.getElementById("ourTag").style.position = "absolute";
		//document.getElementById("ourTag").style.top = "225px";
		
		
		//Re-adjust Other Div Positions
		document.getElementById("contentDiv").style.height = "1000px";
		init();
		
	}//end if
	
	//Northstar
	if(which.options.selectedIndex == 2) {
		
		var contentDiv = document.getElementById("contentDiv");
		
		//Issues
		var titleTag = document.createElement('p');
		titleTag.setAttribute('id','titleTag');
		titleTag.setAttribute('style','margin-left:auto;margin-right:auto;text-decoration:underline;');
		titleTag.appendChild(document.createTextNode("Northstar"));
		
		
		//Create Video Object
		var videoOne = document.createElement('object');
		videoOne.setAttribute('id','videoOne');
		videoOne.setAttribute('style', 'margin:15px;');
		
		//Create First Parameter
		var videoParamOne = document.createElement('param');
		videoParamOne.setAttribute('name','movie');
		videoParamOne.setAttribute('value','http://www.youtube.com/v/qYyTI8xzcp8&hl=en_US&fs=1');
		
		//Create Second Parameter
		var videoParamTwo = document.createElement('param');
		videoParamTwo.setAttribute('name','allowFullScreen');
		videoParamTwo.setAttribute('value','false');
		
		//Create Third Parameter
		var videoParamThree = document.createElement('param');
		videoParamThree.setAttribute('name','allowScriptAccess');
		videoParamThree.setAttribute('value','never');
		
		//Create Embed Tag
		//Create First Parameter
		var embedTagOne = document.createElement('embed');
		embedTagOne.setAttribute('src','http://www.youtube.com/v/qYyTI8xzcp8&hl=en_US&fs=1');
		embedTagOne.setAttribute('type','application/x-shockwave-flash');
		embedTagOne.setAttribute('allowfullscreen','false');
		embedTagOne.setAttribute('allowScriptAccess','never');
		embedTagOne.setAttribute('width','425');
		embedTagOne.setAttribute('height','344');
		
		//Append Params/Embed Tag to Object
		videoOne.appendChild(videoParamOne);
		videoOne.appendChild(videoParamTwo);
		videoOne.appendChild(videoParamThree);
		videoOne.appendChild(embedTagOne);

		//Create Video Object 2
		var videoTwo = document.createElement('object');
		videoTwo.setAttribute('id','videoTwo');
		videoTwo.setAttribute('style', 'margin:15px;');
		
		//Create First Parameter
		var videoParamOne = document.createElement('param');
		videoParamOne.setAttribute('name','movie');
		videoParamOne.setAttribute('value','http://www.youtube.com/v/L57qPyicttg?fs=1&amp;hl=en_US');
		
		//Create Second Parameter
		var videoParamTwo = document.createElement('param');
		videoParamTwo.setAttribute('name','allowFullScreen');
		videoParamTwo.setAttribute('value','false');
		
		//Create Third Parameter
		var videoParamThree = document.createElement('param');
		videoParamThree.setAttribute('name','allowScriptAccess');
		videoParamThree.setAttribute('value','never');
		
		//Create Embed Tag
		//Create First Parameter
		var embedTagOne = document.createElement('embed');
		embedTagOne.setAttribute('src','http://www.youtube.com/v/L57qPyicttg?fs=1&amp;hl=en_US');
		embedTagOne.setAttribute('type','application/x-shockwave-flash');
		embedTagOne.setAttribute('allowfullscreen','false');
		embedTagOne.setAttribute('allowScriptAccess','never');
		embedTagOne.setAttribute('width','425');
		embedTagOne.setAttribute('height','344');
		
		var breakline = document.createElement('p');
		
		//Append Params/Embed Tag to Object
		videoTwo.appendChild(videoParamOne);
		videoTwo.appendChild(videoParamTwo);
		videoTwo.appendChild(videoParamThree);
		videoTwo.appendChild(embedTagOne);
	
		var breakline = document.createElement('p');	
		
		//Append to Content Div
		contentDiv.appendChild(titleTag);
		//contentDiv.appendChild(ourTag);
		contentDiv.appendChild(videoOne);
		contentDiv.appendChild(breakline);
		contentDiv.appendChild(breakline);
		contentDiv.appendChild(videoTwo);
		
		
		//DHTML LOCATIONS
		//Title
		//document.getElementById("titleTag").style.position = "absolute";
		document.getElementById("titleTag").style.fontWeight = "bold";
		document.getElementById("titleTag").style.top = "105px";
		//Our Tag
		//document.getElementById("ourTag").style.position = "absolute";
		//document.getElementById("ourTag").style.top = "225px";
		
		
		//Re-adjust Other Div Positions
		document.getElementById("contentDiv").style.height = "1000px";
		init();
		
	}//end if

	}//end else

		
}//end changeEquip


function fireCounterPage(temp) {
	
	if(temp==1) {
		window.open ("http://www.nulifemusic.com/thankyou.php","tempwindow","width=200,height=200,location=0"); 
	}
	if(temp==2) {
		window.open ("http://www.nulifemusic.com/thankyou_fixtape.php","tempwindow","width=200,height=200,location=0"); 
	}
	if(temp==3) {
		window.open ("http://www.nulifemusic.com/thankyou_gotissues.php","tempwindow","width=200,height=200,location=0"); 
	}
	if(temp==4) {
		window.open ("http://www.nulifemusic.com/thankyou_classy.php","tempwindow","width=200,height=200,location=0"); 
	}
	if(temp==5) {
		window.open ("http://www.nulifemusic.com/thankyou_stuckinmazeV1.php","tempwindow","width=200,height=200,location=0"); 
	}
	if(temp==6) {
		window.open ("http://www.nulifemusic.com/thankyou_nulifemobb.php","tempwindow","width=200,height=200,location=0"); 
	}
}
