/*sfHover = function() {
	if (document.getElementById("nav"))
	{
	var sfEls = document.getElementById("nav").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);*/






//MENU JAVASCRIPT
ieHover = function() {
var ieULs = document.getElementById('nav').getElementsByTagName('ul');
/** IE script to cover <select> elements with <iframe>s **/
/*for (j=0; j<ieULs.length; j++) {
ieULs[j].innerHTML = (ieULs[j].innerHTML + '<iframe src="about:blank" scrolling="no" frameborder="0"></iframe>');
	var ieMat = ieULs[j].lastChild;
	ieMat.style.width=(ieULs[j].offsetWidth-3)+"px";
	ieMat.style.height=(ieULs[j].offsetHeight-4)+"px";
}*/
/** IE script to change class on mouseover **/
	var ieLIs = document.getElementById('nav').getElementsByTagName('li');
	for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
		ieLIs[i].onmouseover=function() {this.className+=" sfhover";}
		ieLIs[i].onmouseout=function() {this.className=this.className.replace(' sfhover', '');}
	}}
	
if(window.addEventListener)
{
	// gecko, safari, konqueror and standard
}
		else if(document.addEventListener)
		{
			// opera 7
		}
			else if(window.attachEvent) 
				{ 
				// win/ie 
				window.attachEvent('onload', ieHover);
				}
else
{
	// mac/ie5
}



window.onscroll = doStatic;
window.onresize = doStatic;
function doStatic() {
	topoffset = 211 
	
	if (document.documentElement.scrollTop<=topoffset)
	{
		document.getElementById("menu").style.top = 0
	}
		
	if (document.documentElement.scrollTop>=topoffset)
	{
		var o = document.getElementById('menu');
		var sY;
		if (window.pageYOffset)
			sY = window.pageYOffset - topoffset;
		else if (document.documentElement && document.documentElement.scrollTop)
			  sY = document.documentElement.scrollTop - topoffset;
		else if (document.body)
			sY = document.body.scrollTop - topoffset
		o.style.top = 0 + parseInt(sY) + 'px';
		}
	}
	
//var quirksMode = (top == self);
//if (!quirksMode) top.location.href = '/';
