//------------------------------------------------------------
// PopUPŠÖ˜A
//------------------------------------------------------------

function rnd(){
  return Math.floor(Math.random()*100);
}
function popup(theURL) {
  window.open(theURL,rnd(),'toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width=700,height=500');
}

function popupl(theURL) {
  window.open(theURL,rnd(),'toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width=750,height=600');
}

function popup_l(theURL) {
  window.open(theURL,rnd(),'toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width=750,height=600');
}

function popup730(theURL) {
  window.open(theURL,rnd(),'toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width=720,height=600');
}

function popup880(theURL) {
  window.open(theURL,rnd(),'toolbar=yes,location=no,directories=no,status=yes,scrollbars=yes,menubar=yes,resizable=yes,width=880,height=600');
}

function popup_m(theURL) {
  window.open(theURL,rnd(),'status=yes,scrollbars=yes,menubar=yes,resizable=no,width=680,height=500');
}

function popup_s(theURL) {
  window.open(theURL,rnd(),'status=yes,scrollbars=yes,menubar=yes,resizable=yes,width=430,height=340');
}

function pop_mini(theURL) {
//  window.open(theURL,rnd(),'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=500,height=495');
  window.open(theURL,rnd(),'toolbar=no,location=no,directories=no,status=no,scrollbars=yes,menubar=no,resizable=yes,width=550,height=500');
}

function opener(theURL,newwinFlag) {
  if((is_opener())&&(newwinFlag!='newwin')) {
    ol = window.opener;
    ol.location.href=theURL;
    ol.focus();
  } else {
    window.open(theURL,'blank','resizable=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes');
  }
}
function is_opener() {
  var ua = navigator.userAgent;
  if(!!window.opener) {
    if( ua.indexOf('MSIE 4')!=-1 && ua.indexOf('Win')!=-1) { 
      return !window.opener.closed;
    } else {
      return typeof window.opener.document  == 'object';
    }
  } else {
    return false;
  }
}

