function validate() {
  var str = document.frmContact.email.value;
  var isEmail = ((str.indexOf("@") != -1) && (str.indexOf(".") != -1));
  var formfield = document.frmContact 
  
	if(formfield.subject.options[formfield.subject.selectedIndex].value=="") {
    alert("Please include a subject for this inquiry so we can better handle your request.");
    formfield.subject.focus();
    return false;
  } 
	
	if (formfield.f_name.value.length == 0) {
    alert("Please enter your First Name.");
    formfield.f_name.focus();
    return false;
  }

  if (formfield.email.length ==0){
	  alert('You must enter a valid email address to continue');
    formfield.email.focus();
	  return false; 
	}
  if (!isEmail) {
    alert("Sorry, " + str + " is an invalid email address!");
    formfield.email.select();
    formfield.email.focus();
    return false;  
  }   

  if (formfield.comments.value.length == 0) {
    alert("Please Let Us Know How Can We Help You.");
    formfield.comments.focus();
    return false;
  }	    
 }
  function popAlert(){
    var formfield = document.frmContact
    if(formfield.subject.selectedIndex==3){
      var bconfirm = window.confirm("PLEASE BE ADVISED!\n\nThis choice will automatically unsubscribe your email address from the eCampaignPro database. "+
      "If you are a customer and need to contact customer support then click 'Cancel'\n\n"+
      "If you are sure that you want to unsubscribe from all eCampaignPro customer lists and register a formal complaint then click 'OK'");
      if (bconfirm == false) {
        formfield.subject.selectedIndex=2
  	  }
    }
  }