
function avapopuppilt(mypict, myname, w, h) {
 var winl = (screen.width - w) / 2;
 var wint = (screen.height - h) / 2;
 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,notresizable'
 win = window.open("popup.php?pict="+mypict, myname, winprops)
 if (win.opener == null) { win.opener = self }
 if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function avapopuppilt_nosize(mypict, myname, w, h) {
 var winl = (screen.width - w) / 2;
 var wint = (screen.height - h) / 2;
 winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,notresizable'
 win = window.open("popup_nosize.php?pict="+mypict, myname, winprops)
 if (win.opener == null) { win.opener = self }
 if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function kontrolli(keel){

 if (document.kommentaarivorm.nimi.value=='') {
  if(keel == 0) { msg = 'Palun sisesta enda nimi!'; }
  if(keel == 1) { msg = '!'; }
  alert(msg);
  document.kommentaarivorm.nimi.focus();
  return false;
 }
 if (document.kommentaarivorm.kommentaar.value=='') {
  if(keel == 0) { msg = 'Palun sisesta ka kommentaar!'; }
  if(keel == 1) { msg = '!'; }
  alert(msg);
  document.kommentaarivorm.kommentaar.focus();
  return false;
 }
 return true;
}


