function winPopup(url,toolbar,scrollbars,location,statusbar,menubar,resizable,width,height){
	day=new Date();
	id=day.getTime();
	loffset=(screen.width-width)/2;
	toffset=(screen.height-height)/2;
		eval("page"+id+"=window.open(url,'"+id+"','toolbar="+toolbar+",scrollbars="+scrollbars+",location="+location+",statusbar="+statusbar+",menubar="+menubar+",resizable="+resizable+",width="+width+",height="+height+",left="+loffset+",top="+toffset+"');");
}

function externalLinks(){ 
	if (!document.getElementsByTagName) return; 
	var anchors=document.getElementsByTagName("a"); 
	for (var i=0;i<anchors.length;i++) { 
 		var anchor=anchors[i]; 
		if (anchor.getAttribute("href") && anchor.getAttribute("rel")=="external") anchor.target="_blank"; 
	} 
}

function menuhover(){
	var menuelements=document.getElementById("navNir").getElementsByTagName("LI");
	for (var i=0;i<menuelements.length;i++){
		menuelements[i].onmouseover=function(){
			this.className+=" menuhover";
		}
		menuelements[i].onmouseout=function(){
			this.className=this.className.replace(new RegExp(" menuhover\\b"), "");
		}
	}
}

if(window.attachEvent) window.attachEvent("onload",menuhover);
window.onload=externalLinks;

window.onunload = function() {
     if (document.getElementsByTagName) {
         var objs = document.getElementsByTagName("object");
         for (i=0; i<objs.length; i++) {
             objs[i].outerHTML = "";
         }
     }
 }