// JavaScript Document
var moz = (document.getElementById && !document.all) ? 1 : 0;
 NS4 = (document.layers) ? 1 : 0;
 IE4 = (document.all) ? 1 : 0;
 DOM = (document.getElementById) ? 1 : 0;
 
function go(){
  auj=new Date();
  if(auj.getMinutes()<10){plusm="0"}else plusm='';
  if(auj.getSeconds()<10){pluss="0"}else pluss='';
  heure=auj.getHours() + ':' + plusm + auj.getMinutes() + ':' + pluss + auj.getSeconds();
  document.getElementById('ora').innerHTML=heure;
  setTimeout("go()",1000)
}

function nyit(x,y) {
	mag = Number(y)*15;
	if (NS4) {
		document.layers[x].height=mag;
	} else if (IE4) {
		document.all[x].style.height=mag;
	} else if (DOM) {
		document.getElementById(x).style.height=mag;
	}
}

// Insert in Head section:
/*
<script language="JavaScript">
window.attachEvent("onload", correctPNG);
</script>
*/
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
	for(var i=0; i<document.images.length; i++)
	{
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		 {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
		 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
		 }
	}
}
function classvalt(objid, value) {
	document.getElementById(objid).className = value;
}

function showflash(file,width,height) {
    document.write('<div class=\'flash\' style=\'width: ' + width + 'px; height: ' + height + 'px;\'>');
    document.write('<object type=\"application/x-shockwave-flash\" data=\"'+file+'\" width=\"'+width+'\" height=\"'+height+'\">');
    document.write('    <param name=\"movie\" value=\"'+file+'\" />');
    document.write('    <param name=\"wmode\" value=\"transparent\" />');
    document.write('</object>');
    document.write('</div>');
}
function popup(){
	document.getElementById('popup').style.display='inline';
	document.getElementById('popup').style.left='300px';
	document.getElementById('popup').style.top='150px';
}
function magassagallit(azon, mag) {
	document.getElementById(azon).style.height = mag + 'px';
}
function bezar()  {
	x = 'popup';
	if (NS4)
	{
		document.layers[x].diplay = 'none';
	}
	else if (IE4)
	{
		document.all[x].style.display = 'none';
	}
	else if (DOM)
	{
		document.getElementById(x).style.display = 'none';
	}
}

function pop(kep,w,h,tit) {
	var msg = window.open('ures.html','popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+w+',height='+h+',top=100,left=100');
	msg.document.write('<head>');
	msg.document.write('<title>'+tit+'</title>');
	msg.document.write('<meta http-equiv="content-type" content="text/html; charset=iso-8859-2">');
	msg.document.write('</head>');

	msg.document.write('<body style="margin: 0px; padding: 0px;">');
	msg.document.write('<a href="javascript: window.close();">');
	msg.document.write('<img width="'+w+'" height="'+h+'" src="'+kep+'" border="0" alt="'+tit+'">');
	msg.document.write('</a></body>');
	msg.document.write('</html>');
	msg.document.close();
}

function poppage(oldal) {
	var msg = window.open(oldal+'.html','popup','toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=500,height=300,top=100,left=100');
}

function kepcsere(x,kep)  {
	if (NS4) {
		document.layers[x].src=kep;
	} else if (IE4) {
		document.all[x].src=kep;
	} else if (DOM) {
		document.getElementById(x).src=kep;
	}
}

function check_all(group, action)
{
 for (var i=0; i<group.length; i++)
  group[i].checked = action;
}

function shopimg(xid, event)
{
	if (window.event) 
	{
		y = window.event.clientY;
	} else {
		y = event.pageY;
	}
	document.getElementById(xid).style.top = y - 305;
	document.getElementById(xid).style.display = 'inline';
}

function opclose(x)  {
	if (NS4)
	{
		if (document.layers[x].diplay == 'inline')
		{
			document.layers[x].diplay = 'none';
		} else {
			document.layers[x].diplay = 'inline';
		}
	}
	else if (IE4)
	{
		if (document.all[x].style.display == 'inline')
		{
			document.all[x].style.display = 'none';
		} else {
			document.all[x].style.display = 'inline';
		}
	}
	else if (DOM)
	{
		if (document.getElementById(x).style.display == 'inline')
		{
			document.getElementById(x).style.display = 'none';
		} else {
			document.getElementById(x).style.display = 'inline';
		}
	}
}
  
function show(x)  {
	if (NS4)
	{
		document.layers[x].visibility='show';
	}
	else if (IE4)
	{
		document.all[x].style.visibility='visible';
	}
	else if (DOM)
	{
		document.getElementById(x).style.visibility='visible';
	}
}
  
function hide(x) {
	if (NS4)
	{
		document.layers[x].visibility='hide';
	}
	else if (IE4)
	{
		document.all[x].style.visibility='hidden';
	}
	else if (DOM)
	{
		document.getElementById(x).style.visibility='hidden';
	}
}

function cimbeir(szoveg) {
	document.getElementById('cimh').innerHTML = szoveg;
	document.getElementById('cims').innerHTML = szoveg;
}
