


//init page.
loaded = false;

//home
homeRecords_on = new Image();
homeRecords_on.src = "images/records_on.gif";
	homeRecords_off = new Image();
	homeRecords_off.src = "images/records_off.gif";
homeProductions_on = new Image();
homeProductions_on.src = "images/productions_on.gif";
	homeProductions_off = new Image();
	homeProductions_off.src = "images/productions_off.gif";
goToRecords_on = new Image();
goToRecords_on.src = "images/goto_records_on.gif";
	goToRecords_off = new Image();
	goToRecords_off.src = "images/goto_records_off.gif";
goToProductions_on = new Image();
goToProductions_on.src = "images/goto_productions_on.gif";
	goToProductions_off = new Image();
	goToProductions_off.src = "images/goto_productions_off.gif";


//records images
homepageRecords_on = new Image();
homepageRecords_on.src = "images/home_on.gif";
	homepageRecords_off = new Image();
	homepageRecords_off.src = "images/home_off.gif";	
artists_on = new Image();
artists_on.src = "images/artists_on.gif";
	artists_off = new Image();
	artists_off.src = "images/artists_off.gif";		
storeRecords_on = new Image();
storeRecords_on.src = "images/store_on.gif";
	storeRecords_off = new Image();
	storeRecords_off.src = "images/store_off.gif";		
contactRecords_on = new Image();
contactRecords_on.src = "images/contact_on.gif";
	contactRecords_off = new Image();
	contactRecords_off.src = "images/contact_off.gif";		
mediaRecords_on = new Image();
mediaRecords_on.src = "images/media_on.gif";
	mediaRecords_off = new Image();
	mediaRecords_off.src = "images/media_off.gif";		

//production images
homepageProductions_on = new Image();
homepageProductions_on.src = "images/home_on_pr.gif";
	homepageProductions_off = new Image();
	homepageProductions_off.src = "images/home_off_pr.gif";	
resume_on = new Image();
resume_on.src = "images/resume_on.gif";
	resume_off = new Image();
	resume_off.src = "images/resume_off.gif";		
studios_on = new Image();
studios_on.src = "images/rxstudios_on.gif";
	studios_off = new Image();
	studios_off.src = "images/rxstudios_off.gif";
events_on = new Image();
events_on.src = "images/event_on.gif";
	events_off = new Image();
	events_off.src = "images/event_off.gif";
contactProductions_on = new Image();
contactProductions_on.src = "images/contact_on_pr.gif";
	contactProductions_off = new Image();
	contactProductions_off.src = "images/contact_off_pr.gif";		
mediaProductions_on = new Image();
mediaProductions_on.src = "images/media_on_pr.gif";
	mediaProductions_off = new Image();
	mediaProductions_off.src = "images/media_off_pr.gif";		

var theNav;
var theTop;
var theMiddle;
var theStar;
var theLogoEnter;
var theLogoRec;
var theLogoProductions;
var theRecordsButtons;
var theProductionsButtons;

function swap(theImage, theNewImage){
    if(document.images){
		document.getElementById(theImage).src = eval(theNewImage).src;
     }
}

function init(thePage, theColor){
	theNav = document.getElementById('navDiv');
	theTop = document.getElementById('header-top');
	theMiddle = document.getElementById('middle');
	theStar = document.getElementById('pageStar');
	theLogoEnter = document.getElementById('enter');
	theLogoRec = document.getElementById('logoRecords');
	theLogoProductions = document.getElementById('logoProductions');
	theRecordsButtons = document.getElementById('menuRecords');
	theProductionsButtons = document.getElementById('menuProductions');
	
	//blue = home
	if(theColor == "blue"){
		theNav.className = "homeMenu";
		theTop.className = "homeTop";
		theMiddle.className = "homeMiddle";
		theStar.style.display = "block";
		theLogoEnter.style.display = "block";
		theLogoRec.style.display = "none";
		theLogoProductions.style.display = "none";
		theRecordsButtons.style.display = "none";
		theProductionsButtons.style.display = "none";
	}
	//red = records
	if(theColor == "red"){
		theNav.className = "recordsMenu";
		theTop.className = "recordsTop";
		theMiddle.className = "recordsMiddle";
		theStar.style.display = "none";
		theLogoEnter.style.display = "none";
		theLogoRec.style.display = "block";
		theLogoProductions.style.display = "none";
		theRecordsButtons.style.display = "block";
		theProductionsButtons.style.display = "none";
	}
	//green = productions
	if(theColor == "green"){
		theNav.className = "productionsMenu";
		theTop.className = "productionsTop";
		theMiddle.className = "productionsMiddle";
		theStar.style.display = "none";
		theLogoEnter.style.display = "none";
		theLogoRec.style.display = "none";
		theLogoProductions.style.display = "block";
		theRecordsButtons.style.display = "none";
		theProductionsButtons.style.display = "block";
	}	
	
	//load page
	document.getElementById('content').src = thePage;
	
	//flag loaded
	loaded = true;
}
function doLocation(theType){
	if(loaded == true){
		//blue background stuff
		if(theType == 'home'){
			theNav.className = "homeMenu";
			theTop.className = "homeTop";
			theMiddle.className = "homeMiddle";
			theStar.style.display = "block";
			theLogoEnter.style.display = "block";
			theLogoRec.style.display = "none";
			theLogoProductions.style.display = "none";
			theRecordsButtons.style.display = "none";
			theProductionsButtons.style.display = "none";
			doNav("welcome.aspx");
		}
		//red background stuff
		if(theType == 'records'){
			theNav.className = "recordsMenu";
			theTop.className = "recordsTop";
			theMiddle.className = "recordsMiddle";
			theStar.style.display = "none";
			theLogoEnter.style.display = "none";
			theLogoRec.style.display = "block";
			theLogoProductions.style.display = "none";
			theRecordsButtons.style.display = "block";
			theProductionsButtons.style.display = "none";
			//hide player
			if(top.document.getElementById('playerFrame')){
				//hide it
				if(top.document.getElementById('playerDiv')){
					top.document.getElementById('playerDiv').style.visibility = "hidden";
				}
				var thePlayer = top.document.getElementById('playerFrame');
					thePlayer.src = "player.aspx";
			}
		
		doNav("records/index.aspx");
		}
		//green background stuff
		if(theType == 'productions'){
			theNav.className = "productionsMenu";
			theTop.className = "productionsTop";
			theMiddle.className = "productionsMiddle";
			theStar.style.display = "none";
			theLogoEnter.style.display = "none";
			theLogoRec.style.display = "none";
			theLogoProductions.style.display = "block";
			theRecordsButtons.style.display = "none";
			theProductionsButtons.style.display = "block";
			//hide player
			if(top.document.getElementById('playerFrame')){
				//hide it
				if(top.document.getElementById('playerDiv')){
					top.document.getElementById('playerDiv').style.visibility = "hidden";
				}
				var thePlayer = top.document.getElementById('playerFrame');
					thePlayer.src = "player.aspx";
			}			
			doNav("productions/index.aspx");
		}
	}	
}
function doNav(theUrl){
	document.getElementById('content').src = theUrl;
}





//for play button
function doPlayer(theArtist, theTrack, theAlbum, theArtwork){
var playIt = "";
    playIt += "<OBJECT classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' ";
    playIt += "codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,47,0\' ";
    playIt += "WIDTH=\'40\' HEIGHT=\'40\' id=\'thePlayer\' name=\'thePlayer\'>";
    playIt += "<PARAM NAME=movie VALUE=\"http://www.topsecretproductions.net/admin/player/wimpy_button.swf?theFile=" + theTrack + "&autoplay=yes\">";
    playIt += "<PARAM NAME=quality VALUE=high>";
    playIt += "<PARAM NAME=wmode VALUE=transparent>";
    playIt += "<EMBED src=\"http://www.topsecretproductions.net/admin/player/wimpy_button.swf?theFile=" + theTrack + "&autoplay=no\" quality=high WIDTH=\'40\' HEIGHT=\'40\' NAME=\'thePlayer\' ID=\'thePlayer\' ";
    playIt += "TYPE=\'application/x-shockwave-flash\' PLUGINSPAGE=\'http://www.macromedia.com/go/getflashplayer\'></EMBED>";
    playIt += "</OBJECT></span>";
    if(top.document.getElementById('playButton')){
		top.document.getElementById('playButton').innerHTML = playIt;
    }
    //show artist/song playing
    //typ[0]= ""
    //typ[0] = "... checking top secret clearance.<br>... samples authorised";
    //typewrite();
 }


//load player
function loadPlayer(theSource){
	if(top.document.getElementById('playerDiv')){
		top.document.getElementById('playerDiv').style.visibility = "visible";
		if(top.document.getElementById('playerFrame')){
			top.document.getElementById('playerFrame').src = theSource;
		}
	}
}





