window.onload = externalLinks;

startList = function() {
	if (document.all&&document.getElementById) {
		if (!document.getElementById("fomenuul")) {
			return;
		}
		navRoot = document.getElementById("fomenuul");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function externalLinks() 
 { 
   startList();
   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 KiemelesekEltavolitasa()
 {
   valtas("searchon","searchoff");
 }

function KiemelesekHozzaadasa()
 {
   valtas("searchoff","searchon");
 }

function valtas(mirol,mire)
 {
   var nodeList=document.getElementsByTagName("SPAN");
   for (var i=0; i<nodeList.length; i++)
    {
      if (nodeList[i].className==mirol)
       { nodeList[i].className=mire; }
    }
 }

function KiemelesAllapot(allapot)
 {
   if (allapot=="on")  
    { return KiemelesekHozzaadasa(); } else
    { return KiemelesekEltavolitasa(); } 

 }

function url(tourl)
 {
   window.location=tourl;
 }

function confirm_url(tourl)
 {
   if (confirm('Biztos benne?'))
    { url(tourl); }
 }
