function windowOpen(url,width,height,scrolling,labl) {
  if (!url) { return false; }
  if (!width) { width = '300'; }
  if (!height) { height = '300'; }

  var left = 0;
  var top = 0;


  left = screen.width - (screen.width / 2) - (width / 2) - 50;
  top = screen.height - (screen.height / 2) - (height / 2) - 50;

  if((!screen.height) || (!screen.width)) {
    left = 10;
    top = 10;
    width = 300;
    hight = 300;
  }
  else {
    if(height > screen.height) {
      height = screen.height - 75;
      top = 10;
    }

    if(width > screen.width) {
      width = screen.width - 50;
      left = 10;
    }
  }

  if(scrolling=='false') {
    str='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width='+
       width+',height='+height+',left='+left+',top='+top+'';
  }
  else {
    str='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+
       width+',height='+height+',left='+left+',top='+top+'';
  }

  var num = (Math.round((Math.random()*99999)+1));
  msgWindow=window.open(url,labl,str);
  msgWindow.focus();
  return false;
}

function confirmSubmit(txt) {
  var agree=confirm(""+txt+"");
  if (agree)
    return true ;
  else
    return false ;
}

function openPage(page) {
  parent.location   = "index.php?mod="+page+"";
}


