<!--
	function setCookie(cookieName, cookieValue, cookiePath, cookieExpires)
	{
		cookieValue = escape(cookieValue);
			
		if (cookieExpires == "")
		{
			var nowDate = new Date();
			nowDate.setMonth(nowDate.getMonth() + 12);
			cookieExpires = nowDate.toGMTString();
		}
			
		if (cookiePath != "")
		{
			cookiePath = ";Path=" + cookiePath;
		}
			
		document.cookie = cookieName + "=" + cookieValue + ";expires=" + cookieExpires + cookiePath;
	}
		
	function getCookieValue(cookieName)
	{
		var cookieValue = document.cookie;
		var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "=");
			
		if (cookieStartsAt == -1)
		{
			cookieStartsAt = cookieValue.indexOf(cookieName + "=");
		}
			
		if (cookieStartsAt == -1)
		{
			cookieValue = null;
		}
		else
		{
			cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) + 1;
			var cookieEndsAt = cookieValue.indexOf(";", cookieStartsAt);
			if (cookieEndsAt == -1)
			{
				cookieEndsAt = cookieValue.length;
			}
			cookieValue = unescape(cookieValue.substring(cookieStartsAt, cookieEndsAt));
		}
			
		return cookieValue;
	}
		
	if (getCookieValue("TestCookie") == null)
	{
		setCookie("TestCookie","Yes","","");
		if (getCookieValue("TestCookie") == null)
		{
			//window.location='preferences.asp'
		}
		else
		{
			setCookie("fontsize","14","","")
			setCookie("bgcolour","#FFFFFF","","")
			setCookie("forecolour","#000000","","")
			window.location='preferences.asp'
		}
	}
		
	document.write("<STYLE>")
	document.write("BODY { FONT-FAMILY: Arial, Verdana, Tahoma, Helvetica, Sans-Serif; }")
	if (getCookieValue("TestCookie") == null)
	{
		document.bgColor = '#000066'
		document.write(".content { FONT-SIZE: 14pt; COLOR: #FFFFFF; BACKGROUND: #000066; }")
		document.write(".content A { COLOR: #FFCC33; TEXT-DECORATION: None; }")
		document.write(".content A:Hover { COLOR: #FFCC33; TEXT-DECORATION: Underline; }")
		document.write(".contentTitle { FONT-SIZE: 18pt; FONT-WEIGHT: Bold; COLOR: #F4F4F4; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
		//alert("This functionality requires cookies to function correctly")
	}
	else
	{
		document.bgColor = (getCookieValue("bgcolour"))
		document.write(".content { FONT-SIZE: " + getCookieValue('fontsize') + "pt; COLOR: " + getCookieValue('forecolour') + "; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
		if (getCookieValue("bgcolour") == '#000066')
		{
			document.write(".content A { COLOR: #FFCC33; TEXT-DECORATION: None; }")
			document.write(".content A:Hover { COLOR: #FFCC33; TEXT-DECORATION: Underline; }")
		}
		if (getCookieValue("bgcolour") == '#FFFCA1')
		{
			document.write(".content A { COLOR: #3366CC; TEXT-DECORATION: None; }")
			document.write(".content A:Hover { COLOR: #3366CC; TEXT-DECORATION: Underline; }")
		}
		if (getCookieValue("bgcolour") == '#FFFCA1')
		{
			document.write(".content A { COLOR: #3366CC; TEXT-DECORATION: None; }")
			document.write(".content A:Hover { COLOR: #3366CC; TEXT-DECORATION: Underline; }")
		}
		if (getCookieValue("bgcolour") == '#FFFFFF')
		{
			document.write(".content A { COLOR: #3366CC; TEXT-DECORATION: None; }")
			document.write(".content A:Hover { COLOR: #3366CC; TEXT-DECORATION: Underline; }")
		}
		if (getCookieValue("bgcolour") == '#000000')
		{
			document.write(".content A { COLOR: #FFCC33; TEXT-DECORATION: None; }")
			document.write(".content A:Hover { COLOR: #FFCC33; TEXT-DECORATION: Underline; }")
		}
		if (getCookieValue("bgcolour") == '#000066')
		{
			if (getCookieValue("fontsize") == '24')
			{
				document.write(".contentTitle { FONT-SIZE: 30pt; FONT-WEIGHT: Bold; COLOR: #F4F4F4; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
			}
			else
			{
				if (getCookieValue("fontsize") == '18')
				{
					document.write(".contentTitle { FONT-SIZE: 24pt; FONT-WEIGHT: Bold; COLOR: #F4F4F4; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
				}
				else
				{
					document.write(".contentTitle { FONT-SIZE: 18pt; FONT-WEIGHT: Bold; COLOR: #F4F4F4; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
				}
			}
		}
		else
		{
			if (getCookieValue("fontsize") == '24')
			{
				document.write(".contentTitle { FONT-SIZE: 30pt; FONT-WEIGHT: Bold; COLOR: #B71D1D; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
			}
			else
			{
				if (getCookieValue("fontsize") == '18')
				{
					document.write(".contentTitle { FONT-SIZE: 24pt; FONT-WEIGHT: Bold; COLOR: #B71D1D; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
				}
				else
				{
					document.write(".contentTitle { FONT-SIZE: 18pt; FONT-WEIGHT: Bold; COLOR: #B71D1D; BACKGROUND: " + getCookieValue('bgcolour') + "; }")
				}
			}
		}
	}
	document.write(".search { FONT-SIZE: " + getCookieValue('fontsize') + "pt; FONT-WEIGHT: Bold; BACKGROUND: #330099; COLOR: #FFFFFF; }")
	document.write(".search A { COLOR: #FFFFFF; TEXT-DECORATION: None; }")
	document.write(".search A:Hover { COLOR: #FFFFFF; TEXT-DECORATION: Underline; }")
	document.write("INPUT { FONT-SIZE: " + getCookieValue('fontsize') + "pt; COLOR: " + getCookieValue('bgcolour') + "; BACKGROUND: " + getCookieValue('forecolour') + "; }")
	document.write("TEXTAREA { FONT-SIZE: " + getCookieValue('fontsize') + "pt; COLOR: " + getCookieValue('bgcolour') + "; BACKGROUND: " + getCookieValue('forecolour') + "; }")
	document.write("SELECT { FONT-SIZE: " + getCookieValue('fontsize') + "pt; COLOR: " + getCookieValue('bgcolour') + "; BACKGROUND: " + getCookieValue('forecolour') + "; }")
	document.write("</STYLE>")
//-->