function changecolours(){
var today = new Date();
 var expire = new Date();
 var nDays = 30;
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = 'XRSColours'+"="+escape('bgwhite')
                 + ";expires="+expire.toGMTString();
				 
if (document.getElementById('body').className=='bgwhite'){
	document.getElementById('body').className='bgblack';
	 document.cookie = 'XRSColours'+"="+escape('bgblack')
                 + ";expires="+expire.toGMTString();
}
else {
document.getElementById('body').className='bgwhite';
 document.cookie = 'XRSColours'+"="+escape('bgwhite')
                 + ";expires="+expire.toGMTString();
}
}

function setupColoursScheme(){
	var cs =  ReadCookie('XRSColours');
	if (cs == ''){
		document.getElementById('body').className='bgwhite';
	}
	if (cs== 'bgwhite'){
		document.getElementById('body').className='bgwhite';
	}
	if (cs== 'bgblack'){
		document.getElementById('body').className='bgblack';
	}
}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

