// megnyit egy új ablakban egy képet ###############################################################################################
function OpenNewWindow(bigurl, width, height) {
  var newWindow = window.open("", "blank", "location=no, directories=no, resizable=yes, scrollbars=yes, fullscreen=no, menubar=no, status=no, toolbar=no");

  newWindow.document.writeln("<html>");
  newWindow.document.writeln("<head>");
  newWindow.document.writeln("<script language='javascript'>"); 
  newWindow.document.writeln("function ResizeWin() {");
  newWindow.document.writeln("  iWidth = document.body.clientWidth;");
  newWindow.document.writeln("  iHeight = document.body.clientHeight;");
  newWindow.document.writeln("  iWidth = document.images[0].width - iWidth;");
  newWindow.document.writeln("  iHeight = document.images[0].height - iHeight;");
  newWindow.document.writeln("  window.resizeBy(iWidth+30, iHeight+40);");
  newWindow.document.writeln("  if (window.screen.width < document.body.clientWidth) window.resizeBy(window.screen.width-document.images[0].width, 0);");
  newWindow.document.writeln("  if (window.screen.height < document.body.clientHeight) window.resizeBy(0, window.screen.height-document.images[0].height-80);");
  newWindow.document.writeln("  self.focus();");
  newWindow.document.writeln("} ");
  newWindow.document.writeln("</script>");
  newWindow.document.writeln("</head>");
  newWindow.document.writeln("<body onload='ResizeWin();' style='margins: 0 0 0 0; padding: 0 0 0 0; background: #000000;'>");
  newWindow.document.writeln("<img border='0' align='left' src='" + bigurl + "' alt='Katt a bezáráshoz!' id='bigImage'/>");
  newWindow.document.writeln("</body></html>");
  newWindow.document.close();
}

// #################################################################################################################################
function keypressed(e) {
  if (!e) var e = window.event;
  if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
  if (code == 13) {
    document.login.submit();
  }
}

// #################################################################################################################################
function checkreturn() {
  var i,j,f,e;
  for (i=0; i<document.forms.length; i++){
    f = document.forms[i];
    for (j=0; j<f.elements.length; j++){
      e = f[j];
      e.onkeypress= keypressed;
    }
  }
}

