//This script was written by Adrian Holly @ Run Time Solutions and is not to be
//used without permission. Please contact us to obtain permission on 0410 496 591


path = '/'


var selectedStyle = "0"
if (GetCookie("cssStyle")!= null) {
	selectedStyle = GetCookie("cssStyle");
	}


function GetCookie(sName)
{
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }
	
  return null;
}
document.write("<link rel=styleSheet type=text/css href=../css/style_" + selectedStyle + ".css>");




function setSelectedStyle(){
	if (navigator.appName == "Netscape")
		window.document.main.document.f1.cbkStyle[selectedStyle].checked=true;
		
	else
		document.f1.cbkStyle[selectedStyle].checked=true;
}

function setCookie(){
	if (navigator.appName == "Netscape")
		{
		theGroup = window.document.main.document.f1.cbkStyle;
		for (i=0; i< theGroup.length; i++){
			if (theGroup[i].checked) {
				selectedStyle = theGroup[i].value;
}
}
}
	else
		{
		theGroup = document.f1.cbkStyle;
		for (i=0; i< theGroup.length; i++){
			if (theGroup[i].checked) {
				selectedStyle = theGroup[i].value;
}
}
}	
	document.cookie = "cssStyle="+selectedStyle+"; path="+path;
	window.location.reload();
}


