function openWin(url,w,h)
{
        var top  = ((screen.availHeight-h)/2)-80;
        var left = ((screen.availWidth-w)/2);
        parem='status=0,menubar=1,resizable=yes,scrollbars=yes,width='+w+',height='+h+',top='+top+',left='+left+'';
        var ywin = window.open(url, "xy", parem);
        ywin.focus();
}

NC=(document.layers)?1:0;MSIE=(document.all)?1:0;
function show_hide(layer,type) 
{
	if (MSIE) eval('document.all.'+layer+'.style.visibility=type');
	if (NC) eval('document.'+layer+'.visibility=type');
}
function openImageWin(url,w,h)
{
	var top  = ((screen.availHeight-h)/2)-80;
	var left = ((screen.availWidth-w)/2);
	var s1="toolbar=no,location=0,directories=0,status=0, menubar=0,scrollbars=no,resizable=yes,width="+w+",height="+h+",left="+left+",top="+top;
	var win = window.open("about:blank", "imgview", s1);
	win.document.open();
	var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n<html><head><title>Omikron</title>';
	html+='<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
	html+='<style>\nbody {margin:0;border:0;padding:0}\nimg {cursor:pointer}\n</style></head><body>';
	html+='<img onclick="self.close()" src="'+url+'" width="'+w+'" height="'+h+'" border="0" alt="" title="Bezár"></body></html>';
	win.document.write(html);
	win.document.close();
}


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") == "blank")
		{
			anchor.target = "_" + anchor.getAttribute("rel");
		}
	}
}
window.onload = externalLinks;

