
function openWindow (dcname,url,width,height,blueribbon) {
	height1 = height;
	dcname = window.open('','popupimg','width='+width+',height='+height1+',menubar=no,toolbar=no,nostatus');
	dcname.document.open();
	dcname.document.write('<html><head><title>'+blueribbon+'</title><script language="javascript">function printPage() { print(document); }</script><style type="text/css"><!--body,td,th {font-family: MS Sans Serif, Microsoft Sans Serif, Verdana, Arial;font-size: 12px;color: #FFFFFF;}--></style></head><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 bgcolor="#FDF7E4"><a href="JavaScript:void(0);" onClick="window.close();"><img src="'+url+'" border=0 galleryimg="no"></a></body></html>');
	dcname.document.close();
}

function OW(kep) {

	window.open("http://hotel-kager.hu/keret.php?kep="+kep,"","width=300,height=400,screenX=1,screenY=1,top=1,left=1,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,nostatus");

}

function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' nem valós cím.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' nincs kitöltve.\n'; }
    } if (errors) alert('Hiba (ák):\n'+errors);
    document.MM_returnValue = (errors == '');
} }

var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';

	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose;