/*
If Request("style") <> "" Then
	Style = Request("style")
	Response.Cookies("style") = Request("style")
ElseIf Request.Cookies("style") <> "" Then
	Style = Request.Cookies("style")
Else
	Style = "blue"
End If
*/



  //document.write('<style type="text/css" media="screen">@import "abetterway/includes/style.css";</' + 'style>\n');

function makeCookie(Name,Value,Expiry,Path,Domain,Secure){
  if (Expiry != null) {
    var datenow = new Date();
    datenow.setTime(datenow.getTime() + Math.round(86400000*Expiry));
    Expiry = datenow.toGMTString();
  }

  Expiry = (Expiry != null) ? '; expires='+Expiry : '';
  Path = (Path != null)?'; path='+Path:'';
  Domain = (Domain != null) ? '; domain='+Domain : '';
  Secure = (Secure != null) ? '; secure' : '';

  document.cookie = Name + '=' + escape(Value) + Expiry + Path + Domain + Secure;
}

function readCookie(Name) {
  var cookies = document.cookie;
  if (cookies.indexOf(Name + '=') == -1) return null;
  var start = cookies.indexOf(Name + '=') + (Name.length + 1);
  var finish = cookies.substring(start,cookies.length);
  finish = (finish.indexOf(';') == -1) ? cookies.length : start + finish.indexOf(';');
  return unescape(cookies.substring(start,finish));
}

function selectStyle (vCookieName, vSelection) {
  //WRITE COOKIE
  makeCookie(vCookieName, vSelection, 90, '/');
  //RELOAD THE CURRENT PAGE
  self.location = self.location;
}

if (document.cookie.indexOf('style=')!=-1) {
  css = readCookie('style');
  //IMPORT SELECTED STYLE SHEET
  document.write('<style type="text/css" media="screen">@import "' + css + '/includes/style.css";</' + 'style>\n');
}
  	else
  document.write('<style type="text/css" media="screen">@import "compliance/includes/style.css";</' + 'style>\n');
