function getCookie(name) {var cname = name + "="var dc = document.cookieif (dc.length > 0) {  begin = dc.indexOf(cname)  if (begin != -1) {    begin +=cname.length    end = dc.indexOf(";", begin);    if (end == -1) end = dc.length    return unescape(dc.substring(begin, end))}  }return null;}function setCookie(name, value, expires) {document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? " " : "; expires=" + expires.toGMTString())}function delCookie(name) {document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/"}function callbox() {t = window.open("http://www.derwen.ac.uk/settings.html","settings","width=540, height=300 scrollbars=yes")setTimeout("t.focus()", 500)}function colorme() {var pagecol = "#FFFFFF";var textcol = "#000000";//cookies used for remembering text/background colour combinations//This original Scotopic JavaScript developed by Jewelion Web Design //got to start document stuff here early.....var desc = getCookie("newchoice")if (desc != null) {// renew cookievar now = new Date()now.setTime(now.getTime() + (24 * 60 * 60 * 1000 * 365))setCookie("choice", desc, now)var pstart = desc.indexOf("p1")var pend = desc.indexOf("t1")var tend = desc.indexOf("t2")var send = desc.indexOf("s2")pagecol = desc.substring(pstart + 2, pend)textcol = desc.substring(pend + 2, tend)textsiz = desc.substring(tend + 2, send)if (textsiz == "-1") { textdesc = "x-small" }if (textsiz == "+0") { textdesc = "small" }if (textsiz == "+1") { textdesc = "large" }if (textsiz == "+2") { textdesc = "x-large" }//2008 - a great number of ids and classes therefore a slightly different approach//document.getElementById("container").style.backgroundColor = pagecol;//document.getElementById("container").style.color = textcol;//CREATE ARRAY of idsvar idArray = ["container","main-content2col","nav","content-navigation","main-content","vertnav-menu","footer3","footer2","footertext","scobox"];for (var i=0; i< idArray.length; i++) {	//document.getElementById(idArray[i]).style.backgroundColor = pagecol;	document.getElementById(idArray[i]).style.background = pagecol;	document.getElementById(idArray[i]).style.color = textcol;}for (var i=0; i < document.links.length; i++) {	document.links[i].style.color = textcol;	document.links[i].style.textDecoration = "underline";	}}//else callbox();} //colorme()function hereIam(mainarea, secarea) {	 	document.getElementById(mainarea).style.textDecoration = "underline";	document.getElementById(secarea).style.backgroundImage = "url(images/starat.gif)";	document.getElementById(secarea).style.backgroundRepeat = "no-repeat";	document.getElementById(secarea).style.backgroundPosition = "right center";	//document.getElementById(secarea).style.borderTop = "1px solid ";	//document.getElementById(secarea).style.borderBottom = "1px solid";colorme();	}function colorset() {	}