window.topnav = {};
(function() {
	var b = window.topnav,f,h;
	b.qs = function(a) {
		var c = window.encodeURIComponent&&(document.forms[0].q||"").value;
		if(c) {
			a.href=a.href.replace(/([?&])q=[^&]*|$/,function(i,g){
				return(g||"&")+"q="+encodeURIComponent(c)
				}
			)
		}
	};
	function j(a,c){
		a.visibility=h?"hidden":"visible";
		a.right=(8)+"px"//c
	}
	b.tg=function(a){
		a=a||window.event;
		var c=0,i,g=window.navExtra,d=document.getElementById("gbi"),e=a.target||a.srcElement;
		a.cancelBubble=true;
		if(!f){
			f=document.createElement(Array.every||window.createPopup?"iframe":"div");
			f.frameBorder="0";
			f.src="#";
			d.parentNode.appendChild(f).id="gbs";
			if(g)for(i in g)d.insertBefore(g[i],d.firstChild).className="gb2";
			document.onclick=b.close
		}
		if(e.className!="gb3")e=e.parentNode;
		do c+=e.offsetLeft;
		while(e=e.offsetParent);
		j(d.style,c);
		f.style.width=d.offsetWidth+"px";
		f.style.height=d.offsetHeight+"px";
		j(f.style,c);
		h=!h
	};
	b.close=function(a){
		h&&b.tg(a)
	}
})();
