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;
  }
}

function validateHtSignup(frm2chk){
  if ((/^[a-zA-Z. \-]{2,20}$/.test(frm2chk.category2.value)) == false){
    alert("Please Enter Your full First Name");
    frm2chk.category2.focus();
    return false;
    }
  else if ((/^[a-zA-Z. \-]{2,20}$/.test(frm2chk.custom_lastname.value)) == false){
    alert("Please Enter Your full Last Name");
    frm2chk.custom_lastname.focus();
    return false;
    }
  else if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm2chk.category3.value)) == false){
    alert("Please Enter a valid Email Address");
    frm2chk.category3.focus();
    return false;
    }
  else {
    return true;
    }
}

function SendMail(addy, dom, tld, subj) {
  self.location='mailto:'+addy+'@'+dom+'.'+tld+'?Subject='+subj;
}