function PopWin(popurl, popname, w, h, scroll) 
{
    var winw = (screen.width - w) / 2;
    var winh = (screen.height - h) / 2;
    winprops = 'height='+h+',width='+w+',top='+winh+',left='+winw+',scrollbars='+scroll+',resizable';
    win = window.open(popurl, popname, winprops);
    if (parseInt(navigator.appVersion) >= 4) 
    {
        win.window.focus(); 
    }
}

function validateContact(frm2chk)
{
  if ((/^[a-zA-Z._ \-]{2,20}$/.test(frm2chk.name.value)) == false)
  {
    alert("Please Enter Your full Name.");
    frm2chk.name.focus();
    return false;
  }
 
 else if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm2chk.email.value)) == false)
  {
    alert("Please Enter a valid Email Address.");
    frm2chk.email.focus();
    return false;
  }
 
 else if (frm2chk.subject.value == "")
  {
    alert("Please Enter a subject for your message.");
    frm2chk.subject.focus();
    return false;
  }
 

 else if (frm2chk.message.value == "")
  {
    alert("Please Enter a message.");
    frm2chk.message.focus();
    return false;
  }
 
 else 
  {
    return true;
  }
}
