function changeCSS(name, path) {
   if (path.indexOf("/") == -1) {
   	path = "";
   }
   //alert(name);
   document.getElementById('cssHolder').setAttribute('href', path + name);
   if ((name.indexOf("contrast") > -1) || (name.indexOf("visibility") > -1)) {
   	document.body.background = "";
   } else {
   	document.body.background = "/images/common/bg_grey.gif";
   }
}
function SetACookie(name,value) {
	var theCookie = name + "=";
	theCookie += escape(value);
	document.cookie = theCookie;
	changeCSS(value,'');
}
function GetCookieVal(offset) {
   var endstr = document.cookie.indexOf (";",offset);
   if (endstr == -1) { endstr = document.cookie.length; }
   return unescape(document.cookie.substring(offset,endstr));
}
function GetACookie(name) {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while(i < clen) {
      var j = i + alen;
      if (document.cookie.substring(i,j) == arg) {
         return GetCookieVal(j);
      }
      i = document.cookie.indexOf(" ", i) + 1;
      if(i == 0) break;
   }
   return null;
}
function GetCSS(path) {
   (document.cookie.indexOf("seniorCSS")!=-1)?
      cookieEnabled=true:cookieEnabled=false;
   if(cookieEnabled) {
      changeCSS(GetACookie('seniorCSS'), path);
   }
   
}