// megnyit egy új ablakban egy képet ###############################################################################################
function OpenNewWindow(bigurl, width, height) {
  var newWindow = window.open("", "blank", "location=no, directories=no, resizable=yes, scrollbars=no, 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("<a href='javascript:window.close();'>");*/
  newWindow.document.writeln("<img border='0' align='left' src='" + bigurl + "' alt='Katt a bezáráshoz!' id='bigImage'/>");
/*  newWindow.document.writeln("</a>");*/
  newWindow.document.writeln("</body></html>");
  newWindow.document.close();
}

// oszlopok magassága ################################################################################################################
function resize_cols() {
  var maxheight;

  d = document.getElementById('contentdiv');

  if (d.offsetHeight) {
    maxheight = d.offsetHeight;
  } else {
    if (d.style.pixelHeight) {
      maxheight = d.style.pixelHeight;
    }
  }
  
  maxheight = maxheight + 250 + 60; 

  if (typeof(window.innerWidth) == 'number') {
    winy = window.innerHeight;
  } else if (document.documentElement && document.documentElement.clientHeight) {
    winy = document.documentElement.clientHeight;
  } else if( document.body && document.body.clientHeight) {
    winy = document.body.clientHeight;
  }

  if (winy > maxheight) maxheight = winy;

  document.getElementById('leftdiv').style.height = maxheight+'px';
  document.getElementById('rightdiv').style.height = maxheight+'px';
}

