function rolloverHome() {
    document.getElementById('homeCell').style.backgroundColor='#555555';
 }
 
function rollbackHome() {
    document.getElementById('homeCell').style.backgroundColor='#4d4d4f';
 }

function rolloverStudents() {
    document.getElementById('studentsCell').style.backgroundColor = '#555555';
 }

 function rollbackStudents() {
    document.getElementById('studentsCell').style.backgroundColor = '#4d4d4f';
 }

function rolloverSponsors() {
    document.getElementById('sponsorsCell').style.backgroundColor = '#555555';
 }
 
function rollbackSponsors() {
    document.getElementById('sponsorsCell').style.backgroundColor = '#4d4d4f';
 }
 
 function rolloverVoting() {
     document.getElementById('votingCell').style.backgroundColor = '#555555';
 }
 
function rollbackVoting() {
    document.getElementById('votingCell').style.backgroundColor = '#4d4d4f';
 }
 
function rolloverContact() {
    document.getElementById('contactCell').style.backgroundColor = '#555555';
   }
 
function rollbackContact() {
    document.getElementById('contactCell').style.backgroundColor = '#4d4d4f';
 }

 function rolloverScholarship() {
     //document.getElementById('csScholarship').style.visibility = 'visible';
 }

 function rollbackScholarship() {
     //document.getElementById('csScholarship').style.visibility = 'hidden';
 }
 
 function hideProblem1() {
     document.getElementById('problem1').style.visibility = 'hidden';
     document.getElementById('problem1').style.display = 'none';
 }

 function hideProblem2() {
     document.getElementById('problem2').style.visibility = 'hidden';
     document.getElementById('problem2').style.display = 'none';
 }

 function hideProblem3() {
     document.getElementById('problem3').style.visibility = 'hidden';
     document.getElementById('problem3').style.display = 'none';
 }

 function rolloverRules() {
     document.getElementById('rules').style.color = '#68bcde';
     document.getElementById('rulesBg').style.borderColor = '#68bcde';
     //document.getElementById('csRules').style.visibility = 'visible';
     //document.getElementById('csRules').display = 'block';
 }

 function rollbackRules() {
     document.getElementById('rules').style.color = '#ee610f';
     document.getElementById('rulesBg').style.borderColor = '#ee610f';
     //document.getElementById('csRules').style.visibility = 'hidden';
     //document.getElementById('csRules').display = 'none';
 }

 function rolloverSchools() {
     document.getElementById('schools').style.color = '#68bcde';
     document.getElementById('schoolsBg').style.borderColor = '#68bcde';
 }

 function rollbackSchools() {
     document.getElementById('schools').style.color = '#ee610f';
     document.getElementById('schoolsBg').style.borderColor = '#ee610f';
 }

 function rolloverProcess() {
     document.getElementById('process').style.color = '#68bcde';
     document.getElementById('processBg').style.borderColor = '#68bcde';
 }

 function rollbackProcess() {
     document.getElementById('process').style.color = '#ee610f';
     document.getElementById('processBg').style.borderColor = '#ee610f';
 }

 function rolloverSubmitIdea() {
     document.getElementById('submitIdea').style.color = '#68bcde';
     document.getElementById('submitIdeaBg').style.borderColor = '#68bcde';
 }

 function rollbackSubmitIdea() {
     document.getElementById('submitIdea').style.color = '#ee610f';
     document.getElementById('submitIdeaBg').style.borderColor = '#ee610f';
 }



 function rolloverAwards() {
     document.getElementById('awards').style.color = '#68bcde';
     document.getElementById('awardsBg').style.borderColor = '#68bcde';
 }

 function rollbackAwards() {
     document.getElementById('awards').style.color = '#ee610f';
     document.getElementById('awardsBg').style.borderColor = '#ee610f';
 }

 function displayProblem1() {
     if (document.getElementById('problem1').style.display = 'none') 
     {
         document.getElementById('problem1').style.display = 'block';
         document.getElementById('problem1').style.visibility = 'visible';
     }
     //else if (document.getElementById('problem1').style.display = 'block') 
     //{
     //    document.getElementById('problem1').style.display = 'none';
     //    document.getElementById('problem1').style.visibility = 'hidden';
     //}
 }

 function displayProblem2() {
     if (document.getElementById('problem2').style.display = 'none') 
     {
         document.getElementById('problem2').style.display = 'block';
         document.getElementById('problem2').style.visibility = 'visible';
     }
     //else if (document.getElementById('problem2').style.display = 'block')
     //{
     //    document.getElementById('problem2').style.display = 'none';
     //    document.getElementById('problem2').style.visibility = 'hidden';
     //}
 }

 function displayProblem3() {
     if (document.getElementById('problem3').style.display = 'none') 
     {
         document.getElementById('problem3').style.display = 'block';
         document.getElementById('problem3').style.visibility = 'visible';
     }
     //else if (document.getElementById('problem3').style.display = 'block')
     //{
     //    document.getElementById('problem3').style.display = 'none';
     //    document.getElementById('problem3').style.visibility = 'hidden';
     //}
 }
 
 var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{
			string: navigator.userAgent,
			subString: "Chrome",
			identity: "Chrome"
		},
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari",
			versionSearch: "Version"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			   string: navigator.userAgent,
			   subString: "iPhone",
			   identity: "iPhone/iPod"
	    },
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

