
function openWindow (url,width,height,blueribbon) {
	
	popupwin = window.open('','popupimg','width=10,height=10,menubar=no,toolbar=no,nostatus');
	popupwin.close();
	popupwin = window.open('','popupimg','width='+width+',height='+height+',menubar=no,toolbar=no,nostatus');
	popupwin.document.open();
	popupwin.document.write('<html><head><title>'+blueribbon+'</title><style type="text/css"><!--body,td,th {font-family: MS Sans Serif, Microsoft Sans Serif, Verdana, Arial;font-size: 12px;color: #FFFFFF;}--></style><SCRIPT LANGUAGE="JavaScript"><!-- function click() {if (event.button==2) {alert(\'Jobb klikk letiltva!\');}}document.onmousedown=click --></SCRIPT></head><body marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 bgcolor="#302F3F" oncontextmenu="return false"><a href="JavaScript:void(0);" onClick="window.close();"><img src="'+url+'" border="no" galleryimg="no"></a><BR></body></html>');
	
popupwin.document.close();	
	
}
function OW(kep) {

	window.open("keret.php?kep="+kep+"&h="+screen.availHeight+"&w="+screen.availWidth,"","width=300,height=400,screenX=1,screenY=1,top=1,left=1,scrollbars=no,resizable=yes");

}
function galeriaWindow(kep) {

	window.open("galeria.php?id="+kep,"","width=800,height=600,screenX=1,screenY=1,top=1,left=1,scrollbars=yes,resizable=yes");

}

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 email cím.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' nem szám.\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+' kitöltése kötelező.\n'; }
    } if (errors) alert('A következő hibákat javítsa kérem:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
