sfHover = function() {
	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);

function stopError() { return true;}
window.onerror = stopError;

var myRemote;
window.onunload=CloseRemote;

function CloseRemote()
{
	if (myRemote!=null) myRemote.close();
}

function ns_ShowWindowEx(i,newURL,x,y,w,h) {
	var NS6 = (navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
	if (!NS6)
	{
		IE = (document.all) ? true : false;
		NS4 = (document.layers) ? true : false;
	}
	else
	{
		IE = false;
		NS4 = false;
	}
	
	if(NS4)
	{
		if (myRemote==null) {
			  myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', 'myWindow');
			  myRemote.focus();
		}
		else{
			if(!myRemote.closed)	// Mora zaradi Netscape oti ako myRemote e zatvoren od strana na korisnikot puka
			{
				myRemote.close();
			}
			
			myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', 'myWindow');
			myRemote.focus();
		}	
	}
	else
	{
		if (myRemote==null) {
			  myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', 'myWindow');
			  myRemote.focus();
		}
		else{
			if(!myRemote.closed)	// Mora zaradi Netscape oti ako myRemote e zatvoren od strana na korisnikot puka
			{
				myRemote.close();
			}
			
			myRemote=null;
			myRemote = window.open(newURL, '', 'height='+h+',width='+w+',screenX='+x+',left='+x+',screenY='+y+',top='+y+',channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0', 'myWindow');
			myRemote.focus();
		}	
	}
}



function dummy(){
}

//wb2flymenu scripts

var prevPopup=null;
var timeOutID=0;
var subMenuOffset=0;
			
function mouseIn(src,childID)
{
	var chMenu = document.all(childID);
	var posLeft;
	var posTop;
	var posWidth;
	var x;
	var y;
	var masterParent=null;
				
	if(prevPopup!=null)
	{
		if(prevPopup!=chMenu)
		{
			prevPopup.style.visibility="hidden";
		}
	}
	
/*	masterParent = src
	while(true)
	{
		masterParent = masterParent.parentElement;
		if(masterParent==null)
		{
			break;
		}
		posLeft = posLeft + masterParent.offsetLeft;
	}*/
			
	//posLeft = src.parentElement.parentElement.parentElement.parentElement.parentElement.offsetLeft;
	
	//posLeft = src.parentElement.parentElement.parentElement.parentElement.offsetLeft;
	//posTop = src.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.offsetTop;
	prevPopup = chMenu;
	posLeft = src.offsetLeft-10;
	//posLeft = window.event.clientX;
	//document.title = src.tagName;
	posTop = src.offsetTop + src.offsetHeight + 5;
	 

	
	//posWidth = src.offsetWidth;
	posWidth = 0;
				
	y = posTop;
	x = subMenuOffset+posLeft+posWidth;
	chMenu.style.visibility="visible";
	chMenu.style.left = 10+x+"px";
	chMenu.style.top = -5+y+"px";
}
			
function mouseOut(src,childID)
{
	var strEval;
				
	if(!src.contains(window.event.toElement))
	{
		strEval = new String();
		strEval = "MainMenuTimer('" + childID + "')";
		timeOutID = window.setTimeout(strEval,250);
	}
}
			
function MainMenuTimer(childID)
{
	var chMenu = document.all(childID);
	chMenu.style.visibility="hidden";
	if(timeOutID!=0)
	{
		window.clearTimeout(timeOutID);
		timeOutID = 0;
	}
}
			
function subMenuMouseIn(src,elementID)
{
	if(timeOutID!=0)
	{
		window.clearTimeout(timeOutID);
		timeOutID = 0;
	}
}
			
function subMenuMouseOut(src,elementID)
{
	if(!src.contains(window.event.toElement))
	{
		var chMenu = document.all(elementID);
		chMenu.style.visibility="hidden";
	}
}
// end of wb2flymenu