/* common.js */

function newWin () {
   aWin = window.open('', 'newWin',
     'width=640,height=480,toolbar=yes,scrollbars=yes,locationbar=yes');
   aWin.focus(); 
}
function confirmDelete(txt){
   return window.confirm('Delete '+txt+'?');
}
function parseEmail(email) {
   emailRegex = /[A-Z]+[0-9A-Z_-]*@[0-9A-Z_-]+([.][0-9A-Z_-]+)+/i; 
   return email.search(emailRegex);
}
function moz(){
  var tempp = navigator.userAgent;
  var nav = tempp.substring(0,7);
  if (nav == 'Mozilla'){
     var mozilla = parseInt(tempp.substring(8,9));
  } 
  else mozilla = 0;
  return mozilla;
}
function popNewWin(mypage,w,h){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h;
      settings +=',width='+w;
      settings +=',top='+wint;
      settings +=',left='+winl;
      settings +=',scrollbars=auto';
      settings +=',resizable=yes';
  var win=window.open(mypage,"nw",settings);
  win.focus();
}
