// http://b3thm00n.com/scripting/openW/
// http://www.javascripter.net/faq/openinga.htm

// <a href="javascript:openW('http://www.b3thm00n.com','windownamesuper',400,400)">LINK</a>
// <a href="#" onclick="openW('http://www.b3thm00n.com','newwindow',700,500)">LINK</a>


function openW(mypage,myname,w,h) {
  if(screen.width){
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;
  }else{
    winl=0;
    wint=0;
  }
  if (winl < 0) winl=10;
  if (wint < 0) wint=10;
  var settings = 'height='+h+',width='+w+',top='+wint+',left='+winl+',';
  var features = 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1,directories=1';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
