sfHover = function() { 
	var sfEls = document.getElementById("menutop").getElementsByTagName("LI");     
	for (var i=0; i<sfEls.length; i++) {         
		sfEls[i].onmouseover=function() {             
			this.className+=" sfhover";         
		}        
		sfEls[i].onmouseout=function() {             
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");         
		}     
	} 
} 
if (window.attachEvent) window.attachEvent("onload", sfHover); 


function CalcXmasDays(){
	var globalTimezone = -5;

	
	now = new Date();
	christmas = new Date("December 25, " + now.getFullYear() + " 00:00:00");

	var secstil = Math.round((christmas.getTime() - now.getTime())/1000);
	secstil = secstil + (globalTimezone * 60 * 60 * -1);
	var daystil  = Math.round(((secstil/60)/60)/24);

	startfont = '<font COLOR="#000000" Size="-1" Face="Verdana,Tahoma,Arial,Helvetica">';
	endfont = '</font>';

	if (daystil > 1) {
		document.write(startfont + 'Only <strong>' + daystil + '</strong> days \'til Christmas!' + endfont);
	} else if (daystil == 1) {
		document.write(startfont + 'Only <strong>' + daystil + '</strong> day \'til Christmas!' + endfont);
	} else if (daystil == 0) {
		document.write(startfont + '<strong>It\'s Christmas!</strong>' + endfont);
	} else if (daystil < 0) {
		document.write(startfont + 'Get ready for <strong>Christmas ' + (now.getFullYear()+1) + '!</strong>' + endfont);
	}
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function popUp(url,width,height,scroll,winname) {
if (!winname)
	winname = "win";
sealWin=window.open(url,winname,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+scroll+",resizable=1,width="+width+",height="+height);
self.name = "mainWin";sealWin.focus();}

function ShowDialog(x)
{
//	var objOverlay=geteleref("overlay");
	//if (objOverlay) {
		
	//	objOverlay.style.height = ((Client.viewportHeight()+Client.scrollY()+Client.windowY()) + 'px');
	//
		//objOverlay.style.display = 'block';
		//objOverlay.style.cursor = 'pointer';
		//objOverlay.onclick = function () {internalhide(x); return false;}
	//}

	//get viewport's width and height
	var vpWidth=self.innerWidth;
	var vpHeight=self.innerHeight;
	
	//get dialog's width and height
	//this is messy. but IE6 will allocate space for something that is block and hidden, therefore we must set it to block here
	// also, we cannot get the size without it being a block element
	x.style.visibility="hidden";
	x.style.display="block";
	var dialogWidth=x.offsetWidth;
	var dialogHeight=x.offsetHeight;

	//calculate position
	var dialogTop = (Client.viewportHeight()/2)+(Client.scrollY())-(dialogHeight/2);
	var dialogLeft = (Client.viewportWidth()/2)+(Client.scrollX())-(dialogWidth/2);
	
	//Position the Dialog
	x.style.top=dialogTop+"px";
	x.style.left=dialogLeft+"px";
	x.style.visibility="visible";
	x.style.zIndex = '110';
	
	//now, I would like to display a X button at the edge of the h2 tag... this might be hard
	
}
function centerbox(id) {
	var box=document.getElementById(id);
	ShowDialog(box);
}
function hidebox(id) {
	var box=document.getElementById(id);
	//box.style.display="none";
	internalhide(box);
}
function internalhide(ref) {
	ref.style.display="none";
	//var objOverlay=geteleref("overlay");
	//if (objOverlay) {
//		objOverlay.style.display = 'none';
//	}
}

var Client = {
  viewportWidth: function() {
    return self.innerWidth || (document.documentElement.clientWidth || document.body.clientWidth);
  },

  viewportHeight: function() {
    return self.innerHeight || (document.documentElement.clientHeight || document.body.clientHeight);
  },
  
  viewportSize: function() {
    return { width: this.viewportWidth(), height: this.viewportHeight() };
  },
  
  windowX: function() {
    return (document.documentElement && document.documentElement.clientWidth) || window.innerWidth || self.innerWidth || document.body.clientWidth;
  },

  windowY: function() {
	return (document.documentElement && document.documentElement.clientHeight) || window.innerHeight || self.innerHeight || document.body.clientHeight;
  },
 
  scrollY: function() {
   	return (document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop;
 },
 scrollX: function() {
	return (document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft;
}

};

function hide(id){if (geteleref(id)){obj = geteleref(id);obj.style.display = "none";}}
function show(id){if (geteleref(id)){obj = geteleref(id);obj.style.display = "";}}
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 var expires = "";
	document.cookie = name+"="+escape(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;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

//referrer code
//if ((readCookie("referrer") == false) && (document.referrer.length > 1)) {
//	createCookie("referrer",document.referrer,2);
//} 
if (document.referrer.length > 1) {
	if (readCookie("referrer") == null) {
		createCookie("referrer",document.referrer,1);
	} 
} 