/* The following code snippet was obtained from:
/* Negrino T., Smith D.(2004) Javascript For The World Wide Web, Fith Edition,Peachpit Press, p366.
/* This function looks for the style sheet tags and checks to see whether it is netscape or internet explorer,
/* which is passed by the title variable passed to this function. If it's internet explorer then load the "default"
/* page, otherwise load the nestcape css sheet.*/
function checkBrowser(){
	var title = "";
	//if(navigator.appName == "Microsoft Internet Explorer"){
	if(navigator.appName == "Microsoft Internet Explorer"){
			//obtaining the version number of IE. 
			var version = parseFloat(navigator.appVersion.split("MSIE")[1]);
			//Loads relevant css sheet based on version of IE
			switch(version){
				case 6:
					title = "alternate_sheet_2";
				break;
				case 7:
					title = "default";
				break;
				case 8:
					title = "default";
				break;
			}
	}else if(navigator.appName == "Netscape"){
		var version = parseFloat(navigator.userAgent.split("Firefox/") [1]);
		var isSafari = navigator.userAgent.indexOf("Safari");
		//for versions prior to 3
		if (version < 3){
			alert ("In order to view this site you will need to update your browser. A new tab will open for you to download the latest version of Firefox. Please ensure you have enabled pop ups. Thank you.");
			window.open('http://www.mozilla.com/en-US/firefox/upgrade.html?utm_source=gsnippet&utm_content=up5&utm_campaign=s081209','blank');
		}
		
		//if it is safari browser then run that stylesheet
		if(isSafari > 0){
			title = "alternate_sheet_3";
			//otherwise if it firefox run that stylesheet
		}else{
			title = "alternate_sheet";
		}
	}
	
	linksFound = document.getElementsByTagName("link");
		for(i = 0; i<linksFound.length;i++){
			thisLink = linksFound[i];
			if(thisLink.getAttribute("rel").indexOf("style") > -1 && thisLink.getAttribute("title")){
				thisLink.disabled = true;
				if(thisLink.getAttribute("title") == title){
					thisLink.disabled = false;
				}
			}
		}
}

function show_award(award){
	switch(award){
		case 1:
			window.open('images/2004_Nominee_large.jpg','blank',
						'width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=no,resizable=yes');
		break;
		case 2:
			window.open('images/2005_Finalist_large.jpg','blank',
						'width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=no,resizable=yes');
		break;
		case 3:
			window.open('images/2006_Nominee_large.jpg','blank',
						'width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=no,resizable=yes');
		break;
		case 4:
			window.open('images/2007_Nominee_large.jpg','blank',
						'width=800,height=600,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=no,resizable=yes');
		break;
	}
	
}