//<!--


//*********************************************************
//** IMAGE SWAPPING FOR MAIN NAVIGATION
//*********************************************************

// PRELOADING MAIN MENU IMAGES
latest_on = new Image();
latest_on.src = "../images/navigation/latest2.gif";

latest_off = new Image();
latest_off.src = "../images/navigation/latest1.gif";

artists_on = new Image();
artists_on.src = "../images/navigation/artists2.gif";

artists_off = new Image();
artists_off.src = "../images/navigation/artists1.gif";

board_on = new Image();
board_on.src = "../images/navigation/board2.gif";

board_off = new Image();
board_off.src = "../images/navigation/board1.gif";

listening_on = new Image();
listening_on.src = "../images/navigation/listening2.gif";

listening_off = new Image();
listening_off.src = "../images/navigation/listening1.gif";

press_on = new Image();
press_on.src = "../images/navigation/press2.gif";

press_off = new Image();
press_off.src = "../images/navigation/press1.gif";


// PRELOADING APPLICATION IMAGES
quicktime_on = new Image();
quicktime_on.src = "../images/navigation/quicktime2.gif";

quicktime_off = new Image();
quicktime_off.src = "../images/navigation/quicktime1.gif";

realplayer_on = new Image();
realplayer_on.src = "../images/navigation/realplayer2.gif";

realplayer_off = new Image();
realplayer_off.src = "../images/navigation/realplayer1.gif";

explorer_on = new Image();
explorer_on.src = "../images/navigation/explorer2.gif";

explorer_off = new Image();
explorer_off.src = "../images/navigation/explorer1.gif";


email_on = new Image();
email_on.src = "../images/navigation/email2.gif";

email_off = new Image();
email_off.src = "../images/navigation/email1.gif";

closewindow_on = new Image();
closewindow_on.src = "../images/navigation/closewindow2.gif";

closewindow_off = new Image();
closewindow_off.src = "../images/navigation/closewindow1.gif";

imgActive = new String();

function changeImage(img,status)	{
	
	if(status == "on")	{
		window.status = img;
		var imgOn = eval(img + "_on.src");
		document.images[img].src = imgOn;
		
	}
	
	if(status == "off")	{
		if (img != imgActive) {
			var imgOff = eval(img + "_off.src");
			document.images[img].src = imgOff;
			window.status = '';
		} 
	}
}


function activateImage(img) {
	if (imgActive != img) {
		imgTmp = imgActive;
		imgActive = img;
		if (imgTmp != "") {
			var imgOf = eval(imgTmp + "_off.src");
			document.images[imgTmp].src = imgOf;
			document.images[imgTmp].src = imgOf;
			//alert (imgOf +";" + imgTmp);
		}
	}
}




//*********************************************************
//** Load frames
//*********************************************************
function loadFrames(content) {
		parent.left.location.href = content + "Left.asp";
		parent.content.location.href = content + "Main.asp";
}

function loadArtistFrames(selected) {
	if (selected !=0) {
		parent.left.location.href = "../artists/artistLeft.asp?selected=" + selected;
		parent.content.location.href = "../artists/artistMain.asp?artistId=" + selected;
	}
}



//*********************************************************
//** BROWSER DETECTION AND SETTING OF STYLESHEET
//*********************************************************

// defining the variables used in the browser check
var browser_agent;
var version_major;
var version_minor;
var ie;
var ie3;
var ie4;
var ie4_up;
var ie5_up;
var ns;
var ns3;
var ns4_up;
var ns6_up;

// fetch user agent and version
browser_agent = navigator.userAgent.toLowerCase();
version_major = parseInt(navigator.appVersion);
version_minor = parseFloat(navigator.appVersion);

// check user agent and version and set the corresponding variable to true
ie = browser_agent.indexOf("msie") != -1;
ie3 = ie && version_major < 4;
ie4 = ie && ((version_major == 4) && (browser_agent.indexOf("msie 5") == -1));
ie4_up = ie && version_major >= 4;
ie5_up = ie && !ie3 && !ie4;
ns = browser_agent.indexOf("mozilla") != -1 && browser_agent.indexOf("msie") == -1;
ns3 = ns && version_major == 3;
ns4_up = ns && version_major >= 4 && browser_agent.indexOf("gecko") == -1;
ns6_up = ns && browser_agent.indexOf("gecko") != -1;

if (ns4_up)	{
	document.write("<link rel='stylesheet' type='text/css' href='../style/ns.css'>\n");
}	
else if (ie4_up || ns6_up)	{	
	document.write("<link rel='stylesheet' type='text/css' href='../style/ie.css'>\n");
}


//-->
