function mainref(objid){
	if(document.all){obj="document.all."+objid;}
	else if(document.layers){obj="document."+objid;}
	else if(document.getElementById){obj="document.getElementById('"+objid+"')";}
	return obj;
}
function setref(lrid){
	if(document.all){
	objref="document.all."+lrid+".style"}
	else if(document.layers){
	objref="document."+lrid}
	else if(document.getElementById){
	objref="document.getElementById('"+lrid+"').style"}
	return objref;
}
function rtrim(str) {
	return str.substring(0,str.length-3);
}
function clock(o1,o2){
	co1=eval(setref(o1));
	co2=eval(setref(o2));
	co1.visibility="visible";
	co2.visibility="hidden";
}
function setampm(cs){
	csel=eval(mainref("clocksel"));
	csel.value=cs;
}
function resdetail(){
	csel=eval(mainref("clocksel"));
	resd=eval(setref("rd"));
	rdate=eval(mainref("rdate"));
	hr=eval(mainref("hr"));
	party=eval(mainref("party"));
	ampmv=eval(mainref("ampmv"));
	if (rdate.value && hr.value && party.value){
	ifam=parseInt(rtrim(hr.value));
	if (csel.value=="lunch" && ifam<12 && ifam>3){
	ampmv.value="AM"}
	else{
	ampmv.value="PM"}
	rdate.className="show";
	hr.className="show";
	party.className="show";
	ampmv.className="show";
	resd.visibility="visible";}
}
function lrgphoto(p){
	eval(setref("gallery")).background="url('" + p + "')"; 
}
function openwin(url,w,h,x){
	var w=window.open(url, "smallwin",
	"width="+w+",height="+h+",status=no,resizable=no,scrollbars="+x)
}
function DisplayMo(c1,c2){
	ch=eval(setref(c2));
	ch.visibility="hidden";
	cv=eval(setref(c1));
	cv.visibility="visible";
}
