/*
File Name: ./javascript/javascript.js
Use: javascript for the site
Created: 28/5/07
Last Updated: 07/6/07
*/

//start of bg colour code

	//bg colour list; also can do 'bgcolour:textcolour or bgcolour:textcolour:linkcolour

var randombgcolors=["#ed1b34", "#f6821f", "#ffd504", "#8cc63e", "#00a0d2", "#635fab", "#a70b20", "#d7731d", "#e8c104", "#66952d", "#007aa1", "#8781bd"]

	//don't touch below

var rbcssrule=""
var randomnum=Math.floor(Math.random()*randombgcolors.length)
if (randombgcolors[randomnum].indexOf(":")!=-1){
rbcssrule="background-color: "+randombgcolors[randomnum].split(":")[0]+";"
rbcssrule+="color: "+randombgcolors[randomnum].split(":")[1]+";"
}
else
rbcssrule="background-color: "+randombgcolors[randomnum]+";"

document.write('<style type="text/css">\n')
document.write('.randomcolor{'+rbcssrule+'}\n')
if (randombgcolors[randomnum].split(":").length==3) //if link color specified
document.write('.randomcolor a{color:'+randombgcolors[randomnum].split(":")[2]+';}\n')
document.write('<\/style>')

//end of bg colour code




//below is the code for the navigation


<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

//-->

<!--//--><![CDATA[//><!--

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//--><!]]>

//above is the code for navigation