function browser()
{
	if(window.ActiveXObject)
	{
	document.write("<link href='cgi-bin/explorer-main.css' rel='stylesheet' type='text/css' />\n");
	document.write("<link href='cgi-bin/explorer-menu.css' rel='stylesheet' type='text/css' />\n");
	}
	else
	{
	document.write("<link href='cgi-bin/firefox-main.css' rel='stylesheet' type='text/css' />\n");
	document.write("<link href='cgi-bin/firefox-menu.css' rel='stylesheet' type='text/css' />\n");
	}
}

function changeLetterSize(l)
{
	var i,j,k,m;
	var max_m=28;
	var min_m=8;
	k=document.getElementById("content").getElementsByTagName("*");
	for(i=0;i<k.length;i++)
	{
		m=getElementStyle(k[i],"fontSize","font-size");
		m=parseInt(m);
		m=m+(l);
    if((m<=max_m) && (m>=min_m))
		{
			k[i].style.fontSize=m+"px";
		}
  }
}

function getElementStyle(element,IEStyleProp,StyleProp)
{
	var s;
	if(element.currentStyle)
	{
		s=element.currentStyle[IEStyleProp];
	}
	else if(window.getComputedStyle)
	{
		s=document.defaultView.getComputedStyle(element,null).getPropertyValue(StyleProp);
	}
	
	return s;
}

function nyomtat()
{
	target = document.getElementById("content").innerHTML;
	
	printPage = window.open("","Nyomtatï¿½s", "top=50, left=100, width=830, height=600, menubar=no, toolbar=no, location=no, resizable=no, scrollbars=yes");
	
	printhtml="<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" '\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n";
	printhtml+="<html>\n";
	printhtml+="<head>\n";
	printhtml+="<title>Nyomtat&aacute;s</title>\n";
	printhtml+="<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-2\" />\n";
	printhtml+="<link rel=\"stylesheet\" media=\"all\" type=\"text/css\" href=\"style/print.css\" />\n";
	printhtml+="</head>\n";
	printhtml+="<body>\n";
	+'<div id=\"print_bg\"></div><div id=\"print\">'
	+'<div id=\"nyomtat\"><a href=\"javascript:%20nyomtatKezd();\" title=\"Nyomtatï¿½s\">Nyomtat</a></div>'
	+'<div id=\"bezar\"><a href=\"javascript:%20window.close();\" title=\"Bezï¿½rï¿½s\">Bezï¿½r</a></div>'
	+'</div>'
	+'<div id=\"container\">'
	+ target
	+'</div>'
	+'<script type=\"text/javascript\">'
	+'  function nyomtatKezd() {'
	+'    document.body.removeChild(document.getElementById("print"));'
	+'    document.body.removeChild(document.getElementById("print_bg"));'
	+'    window.print();'
	+'    window.close();'
	+'  }'
	+'</script>'
	+'</body></html>'

printPage.document.writeln(printhtml);
printPage.document.close();
}

function setHeight(sTag){
  //alert(document.body.offsetHeight);
  if(navigator.appName=="Microsoft Internet Explorer")
  //  document.getElementById(sTag).style.height=document.body.offsetHeight+"px";
    document.getElementById(sTag).style.height=600+"px";
}

function showHideDiv(oTag,sDisplay){
  oTag.style.display=sDisplay;
}

function showPic(sPicName,iWidth,iHeight){
  var picture="../pictures/"+sPicName;
  var opa=document.getElementById("opa");
  var pic=document.getElementById("picture");

  setHeight("opa");
  showHideDiv(opa,"block");

  pic.innerHTML="<a href='javascript: void(0);' title='Bezár' onclick='javascript: hide();'><img src='"+picture+"' width='"+iWidth+"' height='"+iHeight+"' /></a>";

  showHideDiv(pic,"block");
}

function hide(){
  var opa=document.getElementById("opa");
  var pic=document.getElementById("picture");

  showHideDiv(pic,"none");
  showHideDiv(opa,"none");
}
