
function openWin(url,name,width,height) 
{
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=yes';
 params += ', scrollbars=yes';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url, name, params);
 if (window.focus) {newwin.focus()}
 return false;
}




function openWin_OLD(url,name,iwidth,iheight) 
{
  popupWin = window.open(url, name,"resizable=yes,scrollbars=yes,width="+iwidth+",height="+iheight);
}

function openWinDef(url) 
{
  var width = 780;
  var height = 600;
  var name = "Window"+Math.floor(Math.random()*100);
  openWin(url, name, width, height);
}

function ValidateEmail(myForm) 
{  
apos=myForm.email.value.indexOf("@")
dotpos=myForm.email.value.lastIndexOf(".")

if (apos<1||dotpos-apos<2) 
  {
  alert("Please enter a valid email address")
  myForm.email.focus()
  return false
  }
else 
  {
  return true
  }
}


