var g_startcolor = '';var g_endcolor = '';var bright_startcolor = '';var bright_endcolor = '';/* switches between css styles (preferred and alternate) *//* sets the active stylesheet */function setActiveStyleSheet(title) {  var i, a, main;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {      a.disabled = true;      if(a.getAttribute("title") == title) a.disabled = false;    }  }  createCookie("style", title, 365);  if (title == 'black') {  	$$("img.page-color-sensitive").each(function(img)  	{  		img.src = img.src.replace(/_light\.gif$/i,".gif");  	});    g_startcolor = '#474747';    g_endcolor = '#2D2D2D';    bright_startcolor = '#6F6F6F';    bright_endcolor = '#2D2D2D';    alexaholic_bg = '2D2D2D';  } else {   	$$("img.page-color-sensitive").each(function(img)  	{  		if (!img.src.match(/_light\.gif$/i))  		{  			img.src = img.src.replace(/\.gif$/i,"_light.gif");  		}  	});    g_startcolor = '#E8E8E8';    g_endcolor = '#FFFFFF';    bright_startcolor = '#C4C4C4';    bright_endcolor = '#FFFFFF';    alexaholic_bg = 'FFFFFF';  }}/* fetches the active stylesheet (used to set the cookie when the user unloads) */function getActiveStyleSheet() {  var i, a;  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");  }  return null;}function getPreferredStyleSheet() {  return 'white';}function createCookie(name,value,days) {  if (days) {    var date = new Date();    date.setTime(date.getTime()+(days*24*60*60*1000));    var expires = "; expires="+date.toGMTString();  }  else expires = "";  document.cookie = name+"="+value+expires+"; path=/";}function readCookie(name) {  var nameEQ = name + "=";  var ca = document.cookie.split(';');  for(var i=0;i < ca.length;i++) {    var c = ca[i];    while (c.charAt(0)==' ') c = c.substring(1,c.length);    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);  }  return null;}/* onload, read in the user's preferred stylesheet from the cookie, or choose the default preferred */document.setupStyleSheet = function (e) {  var cookie = readCookie("style");  var title = cookie ? cookie : getPreferredStyleSheet();  setActiveStyleSheet(title);}Event.observe(window,"load",document.setupStyleSheet.bindAsEventListener());/* first time loading, need to set the style to the preferred  * since this is loaded after the default preferred stylesheet is loaded */var cookie = readCookie("style");var title = cookie ? cookie : getPreferredStyleSheet();setActiveStyleSheet(title);