	function setCookie(name, value, expires) {	
		document.cookie = name + "=" + escape(value) + "; path=/" + ((expires == null) ? "" : "; expires=" + expires.toGMTString()); 
	}

	var exp = new Date();	    //set new date object	
	exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 30));     //set it 30 days ahead 

	function ReadCookie(cookieName) {
 		var theCookie=""+document.cookie;
 		var ind=theCookie.indexOf(cookieName);
 		if (ind==-1 || cookieName=="") return ""; 
 		var ind1=theCookie.indexOf(';',ind);
 		if (ind1==-1) ind1=theCookie.length; 
		return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
	}

	function lightControls(x){
		document.getElementById('no').src="/img/default/lights_inactive.gif";
		document.getElementById('default').src="/img/default/lights_inactive.gif";
		document.getElementById('more').src="/img/default/lights_inactive.gif";
		if (x=="no"){
			document.getElementById("lights").style.background="url(/img/default/bground_nolights.jpg) no-repeat top";
			document.getElementById('no').src="/img/default/lights_active.gif";
			setCookie('schaaylights', 'no', exp);
		}
		if (x=="default"){
			document.getElementById("lights").style.background="url(/img/default/bground_lights.jpg) no-repeat top";
			document.getElementById('default').src="/img/default/lights_active.gif";
			setCookie('schaaylights', 'default', exp);
		}
		if (x=="more"){
			document.getElementById("lights").style.background="url(/img/default/bground_morelights.jpg) no-repeat top";
			document.getElementById('more').src="/img/default/lights_active.gif";
			setCookie('schaaylights', 'more', exp);
		}
	}