function gebi(objID){		     	     /* gebi */
	//getElementById for various browsers
	return document.getElementById ? document.getElementById(objID) : document.all ? document.all[objID] : "";
}

function topOfPage(head1,head2){		/* topOfPage */
document.write(
 '<h1 style="font-family:ariel,sans-serif;margin:0 20% 0 0;text-align:left">'
+head1
+'</h1><hr><h2 style="font-family:\'times new roman\',serif;margin:0 0 40px 0;text-align:right;font-style:italic;">'
+head2
+'</h2>'
)}

function leftOfPage(){				/* leftOfPage */
	document.write(""
	+'<table id="navMenu" style="position:absolute;margin-top:175;margin-left:20" border=0 width=135 cellspacing=0 cellpadding=0>'
	+'	<tr><td style="background-color:'+notrim+';color:gray">'
	+'		<b>Navigation</b>'
	+'	</td></tr><tr><td style="background-color:'+antrim+';padding:10">'
	+'		<h5 align="left" style=margin-bottom:0>'
	+'		<a href="customize.htm">Personalize</a><br>'
	+'		<a href="lodge.htm">Officers</a><br>'
	+'		<a href="info.htm">Information</a><br>'
	+'		<a href="news.htm">Schedules</a><br>'
	+'		<a href="contact.htm">Map &amp; Contact</a><br>'
	+'		<a href="oes19.htm">Eastern Star</a><br>'
	+'		<a href="links.htm">Links</a><br>'
	+'		<a href="CerrillosHistory-LoR.htm">History</a><br>'
	+'		<a href="fun.htm">Fun &amp; Games</a><br>'
	+'		<a href="index.html">Opening Page</a></h5>'
	+'		<tr><td style=background-color:red;color:black;text-align:center><a href="Illuminati.htm">ILLUMINATI AUTHORIZED VIEWERS ONLY</a>'
//	+'		<hr><a href="customize.htm">Debugging (root)</a><br>'
//	+'		<a href="http://cerrillos.org/customize.htm">Debugging (cerrillos)</a><br>'
//	+'		<a href="http://home.comcast.net/~owenkl/Cerrillos/customize.htm">Debugging (comcast)</a><br>'
	+'  	</td></tr>'
	+'</table>'
	)
	function ml(id){
		var el=gebi(id)
		el.sP=function(x,y){this.style.left=x;this.style.top=y}
		el.x=0
		el.y=0
		return el
	}
	window.stayTopLeft=function(){
		navigator.appName=="Netscape" ? pY=pageYOffset : pY=document.body.scrollTop
		ftlObj.y+=Math.ceil((pY-ftlObj.y)*5/4)  /* originally 15/8 */
		ftlObj.sP(ftlObj.x, ftlObj.y)
		setTimeout("stayTopLeft()", 50)
	}
	ftlObj = ml("navMenu")
	stayTopLeft()
}

function endOfPage(){					/* endOfPage */
document.write(
	'<br><br><hr color='+tcolor+' size=20>'
	+'<p style="text-align:center;font-size:small">Office Phone: (505) 982-0971'
	+'<hr color='+trim+' size=20><br><br>'
	+'<h6 align=right>End of file <a>'+document.URL+'</a> last Updated: '+document.lastModified
	+'<br>See the webmaster\'s personal website at <a href=http://owenkl.com>OwenKL</a>.</h6>'
)}

function setCookie(name,value,dte){		/* setCookie */
	//Third parameter is optional. dte=days till expiration; defaults to 90 days
	expires=new Date()
	expires.setTime(expires.getTime()+ 86400000*(dte ? dte : 90))	//86400000=milliseconds in 1 day
	document.cookie=name+"="+escape(value)+"; expires="+expires.toUTCString() //+"; path=/~owenkl/Cerrillos/; domain=home.comcast.net;"
}

function getCookie(name,defalt) {			/* getCookie */
	//optional second argument will return if not found, otherwise return string contains null if cookie doesn't exist
	dc=document.cookie
	prefix=name+"="
	begin=dc.indexOf("; "+prefix)				//find exact match
	if(begin==-1){								//if not found
		begin=dc.indexOf(prefix)				//check first item
		if(begin != 0){	return defalt }			//if not there either return default or null
	}else{begin+=2}								//skip "; " (unless it was first cookie)
	end=dc.indexOf(";", begin);					//end at start of next cookie
	if(end==-1){ end=dc.length }				//...unless this is the final cookie
	return unescape(dc.substring(begin+prefix.length, end));	//return string contains value of cookie
}

function schemeSelect(color){
	bgScheme=color
	setCookie("ColorScheme",color,730)
	setCookie("Find","Etaoin-1",5)
	history.go(0)
}

bgScheme=getCookie("ColorScheme","W")
switch(bgScheme){
	case "C":tcolor="black";bcolor="cyan";  trim="White"; notrim="yellow";antrim="black"; break
	case "Y":tcolor="black";bcolor="yellow";trim="Black"; notrim="cyan";  antrim="white"; break
	case "B":tcolor="white";bcolor="black"; trim="Yellow";notrim="white"; antrim="cyan";  break
	case "W":tcolor="black";bcolor="white"; trim="Cyan";  notrim="black"; antrim="yellow";break
	default: tcolor="black";bcolor="white"; trim="green"; notrim="red";   antrim="yellow";bgScheme="W";
}

document.writeln('<style>'
+'	body{'
+'		background-image:url(cerrillos'+trim+'.gif);'
+'		background-color:'+bcolor+';'
+'		color:'+tcolor+';'
+'	}'
+'	p,p.note,dl,dd,dt,li,h1,h2,h3,h4,td,table,ul,ol,blockquote {'
+'		background-color:'+bcolor+';'
+'		color:'+tcolor+';'
+'	}'
+'	</style>')

