function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
  offset = document.cookie.indexOf(search);
  if (offset != -1) {  // if cookie exists
    offset += search.length;
    end = document.cookie.indexOf(";", offset); // set index of beginning of value
    if (end == -1) end = document.cookie.length;  // set index of end of cookie value
    returnvalue=unescape(document.cookie.substring(offset, end));
    }
   }
  return returnvalue;
}

function setstyle(what){
  document.cookie="stlzoostyle="+what+"; path=/";

}

function switch_style (what) {
  setstyle(what);
  window.location=window.location;
}

var cookienum;
if (get_cookie("stlzoostyle")!="") {
  cookienum = get_cookie("stlzoostyle");
  }
else {
  cookienum = Math.floor(Math.random()*6) + 1;
  setstyle (cookienum);
}

document.write ('<link href="/styles/' + cookienum + '.css" type="text/css" rel="stylesheet">');