/*
JS funkcijos

*/

function popimage(ifile,ix,iy,ititle,stop) { 
  var win;
  var sWidth;
  var sHeight;
  var NS = (document.layers) ? 1 : 0;
  win = 
window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no,scrollbars=no,statusbar=no");
  win.document.open();
  win.document.write("<html><head><title>"+ititle+"</title>");
  win.document.write("</head><body>");
  win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
  win.document.write('<img src="'+ifile+'" width="'+ix+'" height="'+iy+'"></div></body></html>');
  win.document.close();
  if (NS) {
    sWidth = win.innerWidth;
    sHeight = win.innerHeight;
  } else {
    sWidth = win.document.body.clientWidth;
    sHeight = win.document.body.clientHeight;
  }
  if(stop!=true && (sWidth!=ix || sHeight!=iy)) {
    win.close();
    setTimeout("popimage('"+ifile+"',"+ix+","+iy+",'"+ititle+"',true)", 250);
    return;
  }
  win.focus();
}

function clear_user(){
document.lankomumas.username.value='';
}
function clear_password(){
document.lankomumas.password.value='';
}
