var spouse=new Array("","","","","","","");
function checkSubmit1(form){
  if(form.insured_1_dobMM.value=="" || isNaN(form.insured_1_dobMM.value) || parseInt(form.insured_1_dobMM.value)<1 || parseInt(form.insured_1_dobMM.value)>12){alert('Please enter your date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/20/1970');form.insured_1_dobMM.value="";form.insured_1_dobMM.focus();return false;}
  if(form.insured_1_dobDD.value=="" || isNaN(form.insured_1_dobDD.value) || parseInt(form.insured_1_dobDD.value)<1 || parseInt(form.insured_1_dobDD.value)>31){alert('Please enter your date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/20/1970');form.insured_1_dobDD.value="";form.insured_1_dobDD.focus();return false;}
  if(form.insured_1_dobYYYY.value=="" || isNaN(form.insured_1_dobYYYY.value) || parseInt(form.insured_1_dobYYYY.value)<1886 || parseInt(form.insured_1_dobYYYY.value)>2007){alert('Please enter your date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/20/1970');form.insured_1_dobYYYY.value="";form.insured_1_dobYYYY.focus();return false;}
  if(form.insured_1_gender.value==""){alert("Please select your gender.");form.insured_1_gender.focus();return false;}
  if(form.insured_1_heightFT.value==""){alert("Please select your height in feet and inches.");form.insured_1_heightFT.focus();return false;}
  if(form.insured_1_heightIN.value==""){alert("Please select your height in feet and inches.");form.insured_1_heightIN.focus();return false;}
  if(form.insured_1_weight.value=="" || isNaN(form.insured_1_weight.value) || parseInt(form.insured_1_weight.value)<1 || parseInt(form.insured_1_weight.value)>500){alert("Please enter your weight in pounds.\nExample: 200");form.insured_1_weight.value="";form.insured_1_weight.focus();return false;}
  if(spouse[0]=="true"||spouse[1]=="true"||spouse[2]=="true"||spouse[3]=="true"||spouse[4]=="true"||spouse[5]=="true"||spouse[6]=="true"){
    if(form.insured_2_dobMM.value=="" || isNaN(form.insured_2_dobMM.value) || parseInt(form.insured_2_dobMM.value)<1 || parseInt(form.insured_2_dobMM.value)>12){alert('Please enter your spouse\'s date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/21/1970');form.insured_2_dobMM.value="";form.insured_2_dobMM.focus();return false;}
    if(form.insured_2_dobDD.value=="" || isNaN(form.insured_2_dobDD.value) || parseInt(form.insured_2_dobDD.value)<1 || parseInt(form.insured_2_dobDD.value)>31){alert('Please enter your spouse\'s date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/21/1970');form.insured_2_dobDD.value="";form.insured_2_dobDD.focus();return false;}
    if(form.insured_2_dobYYYY.value=="" || isNaN(form.insured_2_dobYYYY.value) || parseInt(form.insured_2_dobYYYY.value)<1886 || parseInt(form.insured_2_dobYYYY.value)>2007){alert('Please enter your spouse\'s date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/21/1970');form.insured_2_dobYYYY.value="";form.insured_2_dobYYYY.focus();return false;}
    if(form.insured_2_gender.value==""){alert("Please select your spouse's gender.");form.insured_2_gender.focus();return false;}
    if(form.insured_2_heightFT.value==""){alert("Please select your spouse's height in feet and inches.");form.insured_2_heightFT.focus();return false;}
    if(form.insured_2_heightIN.value==""){alert("Please select your height.");form.insured_2_heightIN.focus();return false;}
    if(form.insured_2_weight.value=="" || isNaN(form.insured_2_weight.value) || parseInt(form.insured_2_weight.value)<1 || parseInt(form.insured_2_weight.value)>500){alert("Please enter your spouse's weight in pounds.");form.insured_2_weight.value="";form.insured_2_weight.focus();return false;}
  }
  if(document.getElementById){var conditionYes=document.getElementById("insured_1_health_conditions_yes").checked;var medicationYes=document.getElementById("insured_1_current_medications_yes").checked;var conditionDetail=document.getElementById("insured_1_health_conditions_detail").value;var medicationDetail=document.getElementById("insured_1_current_medications_detail").value;var conditionNo=document.getElementById("insured_1_health_conditions_no").checked;var medicationNo=document.getElementById("insured_1_current_medications_no").checked;if(conditionYes && trim(conditionDetail).length==0){alert("Please specify preexisting conditions.");return false;}if(conditionNo){document.getElementById("insured_1_health_conditions_detail").value="None listed";}if(medicationYes && trim(medicationDetail).length==0){alert("Please specify medications taken.");return false;}if(medicationNo){document.getElementById("insured_1_current_medications_detail").value="None listed";}}
  for(i=3;i<=parseInt(eval(getDocObj("number_of_dependents")).value)+2;i++){
    if(eval(getDocObj("insured_"+i+"_gender")).value==""){alert("Please select your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's gender.");eval(getDocObj("insured_"+i+"_gender")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_dobMM")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_dobMM")).value) || parseInt(eval(getDocObj("insured_"+i+"_dobMM")).value)<1 || parseInt(eval(getDocObj("insured_"+i+"_dobMM")).value)>12){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's date of birth. Please enter the date numerically, using the form \"Month, Day, Year.\"\nExample: 8/20/06");eval(getDocObj("insured_"+i+"_dobMM")).value="";eval(getDocObj("insured_"+i+"_dobMM")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_dobDD")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_dobDD")).value) || parseInt(eval(getDocObj("insured_"+i+"_dobDD")).value)<1 || parseInt(eval(getDocObj("insured_"+i+"_dobDD")).value)>31){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's date of birth. Please enter the date numerically, using the form \"Month, Day, Year.\"\nExample: 8/20/06");eval(getDocObj("insured_"+i+"_dobDD")).value="";eval(getDocObj("insured_"+i+"_dobDD")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_dobYYYY")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_dobYYYY")).value) || parseInt(eval(getDocObj("insured_"+i+"_dobYYYY")).value)>2007 || parseInt(eval(getDocObj("insured_"+i+"_dobYYYY")).value)<1886){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's date of birth. Please enter the date numerically, using the form \"Month, Day, Year.\"\nExample: 8/20/06");eval(getDocObj("insured_"+i+"_dobYYYY")).value="";eval(getDocObj("insured_"+i+"_dobYYYY")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_heightFT")).value==""){alert("Please select your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's height in feet and inches.\nIf your child is an infant, please select '11' in the inches field and leave feet at 0.");eval(getDocObj("insured_"+i+"_heightFT")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_heightIN")).value==""){alert("Please select your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's height in feet and inches.\nIf your child is an infant, please select '11' in the inches field and leave feet at 0.");eval(getDocObj("insured_"+i+"_heightIN")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_weight")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_weight")).value) || parseInt(eval(getDocObj("insured_"+i+"_weight")).value)<1 || parseInt(eval(getDocObj("insured_"+i+"_weight")).value)>500){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's weight in pounds.");eval(getDocObj("insured_"+i+"_weight")).value="";eval(getDocObj("insured_"+i+"_weight")).focus();return false;}
  }
return true;
}
function checkSubmit2(form){
  if(form.first_name.value==""){alert("Please enter your first name.");return false;form.first_name.focus();}
  if(form.last_name.value==""){alert("Please enter your last name.");return false;form.last_name.focus();}
  if(!emailCheck(form.email.value)) {/*alert ("Please enter a valid email address, using the form \"name@domain.com\"");*/return false;form.email.focus();}
  if(form.address_1_street1.value==""){alert("Please enter your address, including street name and number.");return false;form.address_1_street1.focus();}
  if(form.address_1_city.value==""){alert("Please enter the name of the city or town you live in.");return false;form.address_1_city.focus();}
  if(form.address_1_state.value==""){alert("Please choose the state you live in.");return false;}
  if(form.address_1_zip.value=="" || isNaN(form.address_1_zip.value)){alert("Please enter your zip code.");form.address_1_zip.value="";form.address_1_zip.focus();return false;}
  var stripped=form.phone.value.replace(/[\(\)\.\-\ ]/g,'');
  if(isNaN(parseInt(stripped))){alert("The phone number contains illegal characters.");form.phone.focus();return false;}
  if(!(stripped.length==10)){alert("The phone number is the wrong length.\nMake sure you included an area code.\nExample:545-654-4454");form.phone.focus();return false;}
  var stripped=form.phone2.value.replace(/[\(\)\.\-\ ]/g,'');
  if(isNaN(parseInt(stripped))){alert("The phone number contains illegal characters.\nExample:545-654-4454");form.phone2.focus();return false;}
  if(!(stripped.length == 10)){alert("The phone number is the wrong length.\nMake sure you included an area code.\nExample:545-654-4454");form.phone2.focus();return false;}
return true;
}
function checkSubmit(form){									
  if(form.insured_1_dobMM.value=="" || isNaN(form.insured_1_dobMM.value) || parseInt(form.insured_1_dobMM.value)<1 || parseInt(form.insured_1_dobMM.value)>12){alert('Please enter your date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/20/1970');form.insured_1_dobMM.value="";form.insured_1_dobMM.focus();return false;}
  if(form.insured_1_dobDD.value=="" || isNaN(form.insured_1_dobDD.value) || parseInt(form.insured_1_dobDD.value)<1 || parseInt(form.insured_1_dobDD.value)>31){alert('Please enter your date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/20/1970');form.insured_1_dobDD.value="";form.insured_1_dobDD.focus();return false;}
  if(form.insured_1_dobYYYY.value=="" || isNaN(form.insured_1_dobYYYY.value) || parseInt(form.insured_1_dobYYYY.value)<1886 || parseInt(form.insured_1_dobYYYY.value)>2007){alert('Please enter your date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/20/1970');form.insured_1_dobYYYY.value="";form.insured_1_dobYYYY.focus();return false;}
  if(form.insured_1_gender.value==""){alert("Please select your gender.");form.insured_1_gender.focus();return false;}
  if(form.insured_1_heightFT.value==""){alert("Please select your height in feet and inches.");form.insured_1_heightFT.focus();return false;}
  if(form.insured_1_heightIN.value==""){alert("Please select your height in feet and inches.");form.insured_1_heightIN.focus();return false;}
  if(form.insured_1_weight.value=="" || isNaN(form.insured_1_weight.value) || parseInt(form.insured_1_weight.value)<1 || parseInt(form.insured_1_weight.value)>500){alert("Please enter your weight in pounds.\nExample: 200");form.insured_1_weight.value="";form.insured_1_weight.focus();return false;}
  if(spouse[0]=="true"||spouse[1]=="true"||spouse[2]=="true"||spouse[3]=="true"||spouse[4]=="true"||spouse[5]=="true"||spouse[6]=="true"){
    if(form.insured_2_dobMM.value=="" || isNaN(form.insured_2_dobMM.value) || parseInt(form.insured_2_dobMM.value)<1 || parseInt(form.insured_2_dobMM.value)>12){alert('Please enter your spouse\'s date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/21/1970');form.insured_2_dobMM.value="";form.insured_2_dobMM.focus();return false;}
    if(form.insured_2_dobDD.value=="" || isNaN(form.insured_2_dobDD.value) || parseInt(form.insured_2_dobDD.value)<1 || parseInt(form.insured_2_dobDD.value)>31){alert('Please enter your spouse\'s date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/21/1970');form.insured_2_dobDD.value="";form.insured_2_dobDD.focus();return false;}
    if(form.insured_2_dobYYYY.value=="" || isNaN(form.insured_2_dobYYYY.value) || parseInt(form.insured_2_dobYYYY.value)<1886 || parseInt(form.insured_2_dobYYYY.value)>2007){alert('Please enter your spouse\'s date of birth. Please enter the date numerically, using the form "Month, Day, Year."\nExample: 8/21/1970');form.insured_2_dobYYYY.value="";form.insured_2_dobYYYY.focus();return false;}
    if(form.insured_2_gender.value==""){alert("Please select your spouse's gender.");form.insured_2_gender.focus();return false;}
    if(form.insured_2_heightFT.value==""){alert("Please select your spouse's height in feet and inches.");form.insured_2_heightFT.focus();return false;}
    if(form.insured_2_heightIN.value==""){alert("Please select your height.");form.insured_2_heightIN.focus();return false;}
    if(form.insured_2_weight.value=="" || isNaN(form.insured_2_weight.value) || parseInt(form.insured_2_weight.value)<1 || parseInt(form.insured_2_weight.value)>500){alert("Please enter your spouse's weight in pounds.");form.insured_2_weight.value="";form.insured_2_weight.focus();return false;}
  }
  if(document.getElementById){var conditionYes=document.getElementById("insured_1_health_conditions_yes").checked;var medicationYes=document.getElementById("insured_1_current_medications_yes").checked;var conditionDetail=document.getElementById("insured_1_health_conditions_detail").value;var medicationDetail=document.getElementById("insured_1_current_medications_detail").value;var conditionNo=document.getElementById("insured_1_health_conditions_no").checked;var medicationNo=document.getElementById("insured_1_current_medications_no").checked;if(conditionYes && trim(conditionDetail).length==0){alert("Please specify preexisting conditions.");return false;}if(conditionNo){document.getElementById("insured_1_health_conditions_detail").value="None listed";}if(medicationYes && trim(medicationDetail).length==0){alert("Please specify medications taken.");return false;}if(medicationNo){document.getElementById("insured_1_current_medications_detail").value="None listed";}}
  for(i=3;i<=parseInt(eval(getDocObj("number_of_dependents")).value)+2;i++){
    if(eval(getDocObj("insured_"+i+"_gender")).value==""){alert("Please select your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's gender.");eval(getDocObj("insured_"+i+"_gender")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_dobMM")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_dobMM")).value) || parseInt(eval(getDocObj("insured_"+i+"_dobMM")).value)<1 || parseInt(eval(getDocObj("insured_"+i+"_dobMM")).value)>12){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's date of birth. Please enter the date numerically, using the form \"Month, Day, Year.\"\nExample: 8/20/06");eval(getDocObj("insured_"+i+"_dobMM")).value="";eval(getDocObj("insured_"+i+"_dobMM")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_dobDD")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_dobDD")).value) || parseInt(eval(getDocObj("insured_"+i+"_dobDD")).value)<1 || parseInt(eval(getDocObj("insured_"+i+"_dobDD")).value)>31){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's date of birth. Please enter the date numerically, using the form \"Month, Day, Year.\"\nExample: 8/20/06");eval(getDocObj("insured_"+i+"_dobDD")).value="";eval(getDocObj("insured_"+i+"_dobDD")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_dobYYYY")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_dobYYYY")).value) || parseInt(eval(getDocObj("insured_"+i+"_dobYYYY")).value)>2007 || parseInt(eval(getDocObj("insured_"+i+"_dobYYYY")).value)<1886){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's date of birth. Please enter the date numerically, using the form \"Month, Day, Year.\"\nExample: 8/20/06");eval(getDocObj("insured_"+i+"_dobYYYY")).value="";eval(getDocObj("insured_"+i+"_dobYYYY")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_heightFT")).value==""){alert("Please select your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's height in feet and inches.\nIf your child is an infant, please select '11' in the inches field and leave feet at 0.");eval(getDocObj("insured_"+i+"_heightFT")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_heightIN")).value==""){alert("Please select your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's height in feet and inches.\nIf your child is an infant, please select '11' in the inches field and leave feet at 0.");eval(getDocObj("insured_"+i+"_heightIN")).focus();return false;}
    if(eval(getDocObj("insured_"+i+"_weight")).value=="" ||isNaN(eval(getDocObj("insured_"+i+"_weight")).value) || parseInt(eval(getDocObj("insured_"+i+"_weight")).value)<1 || parseInt(eval(getDocObj("insured_"+i+"_weight")).value)>500){alert("Please enter your "+(i-2)+((i==3)?"st":(i==4)?"nd":(i==5||i==6)?"rd":"th")+" child's weight in pounds.");eval(getDocObj("insured_"+i+"_weight")).value="";eval(getDocObj("insured_"+i+"_weight")).focus();return false;}
  }
  if(form.first_name.value==""){alert("Please enter your first name.");return false;form.first_name.focus();}
  if(form.last_name.value==""){alert("Please enter your last name.");return false;form.last_name.focus();}
  if(!emailCheck(form.email.value)) {/*alert ("Please enter a valid email address, using the form \"name@domain.com\"");*/return false;form.email.focus();}
  if(form.address_1_street1.value==""){alert("Please enter your address, including street name and number.");return false;form.address_1_street1.focus();}
  if(form.address_1_city.value==""){alert("Please enter the name of the city or town you live in.");return false;form.address_1_city.focus();}
  if(form.address_1_state.value==""){alert("Please choose the state you live in.");return false;}
  if(form.address_1_zip.value=="" || isNaN(form.address_1_zip.value)){alert("Please enter your zip code.");form.address_1_zip.value="";form.address_1_zip.focus();return false;}
  var stripped=form.phone.value.replace(/[\(\)\.\-\ ]/g,'');
  if(isNaN(parseInt(stripped))){alert("The phone number contains illegal characters.");form.phone.focus();return false;}
  if(!(stripped.length==10)){alert("The phone number is the wrong length.\nMake sure you included an area code.\nExample:545-654-4454");form.phone.focus();return false;}
  var stripped=form.phone2.value.replace(/[\(\)\.\-\ ]/g,'');
  if(isNaN(parseInt(stripped))){alert("The phone number contains illegal characters.\nExample:545-654-4454");form.phone2.focus();return false;}
  if(!(stripped.length == 10)){alert("The phone number is the wrong length.\nMake sure you included an area code.\nExample:545-654-4454");form.phone2.focus();return false;}
return true;
}
function makePopUp(whereTo,winWidth,winHeight){remote=window.open("","remotewin","width="+winWidth+",height="+winHeight+",menubar=0,toolbar=no,scrollbars=yes");remote.location.href=whereTo;remote.focus();}
function getDocObj(elem,parent){if(document.layers){if(parent){return "document."+parent+".document."+elem;} else {return "document."+elem;} } else if(document.all){return "document.all."+ elem;} else if(document.getElementById){return "document.getElementById('"+elem+"')";}}
function displayCommentBox(commentId, flag){if(flag){eval(getDocObj(commentId)).style.display="block";}else {eval(getDocObj(commentId)).style.display="none";}}
function fillDropdown(id, val){for(var i=0; i<parseInt(eval(getDocObj(id)).options.length)-1; i++){if(eval(getDocObj(id)).options[i].value==val){eval(getDocObj(id)).options[i].selected=true;break;}}}
function changeChildren(value,form){for(var i=8;i>parseInt(value)+2;i--){fillDropdown("insured_"+i+"_gender","");fillDropdown("insured_"+i+"_heightFT","");fillDropdown("insured_"+i+"_heightIN","");eval(getDocObj("insured_"+i+"_dobMM")).value="";eval(getDocObj("insured_"+i+"_dobDD")).value="";eval(getDocObj("insured_"+i+"_dobYYYY")).value="";eval(getDocObj("insured_"+i+"_weight")).value="";eval(getDocObj("insured_"+i+"_smoker")).checked=false;}
if(value==1){eval(getDocObj("child_option1")).style.display="none";eval(getDocObj("child_option2")).style.display="none";eval(getDocObj("child_option3")).style.display="none";eval(getDocObj("child_option4")).style.display="none";eval(getDocObj("child_option5")).style.display="none";eval(getDocObj("child_option")).style.display="block";}
else if(value==2){eval(getDocObj("child_option2")).style.display="none";eval(getDocObj("child_option3")).style.display="none";eval(getDocObj("child_option4")).style.display="none";eval(getDocObj("child_option5")).style.display="none";eval(getDocObj("child_option")).style.display="block";eval(getDocObj("child_option1")).style.display="block";}
else if(value==3){eval(getDocObj("child_option3")).style.display="none";eval(getDocObj("child_option4")).style.display="none";eval(getDocObj("child_option5")).style.display="none";eval(getDocObj("child_option")).style.display="block";eval(getDocObj("child_option1")).style.display="block";eval(getDocObj("child_option2")).style.display="block";}
else if(value==4){eval(getDocObj("child_option4")).style.display="none";eval(getDocObj("child_option5")).style.display="none";eval(getDocObj("child_option")).style.display="block";eval(getDocObj("child_option1")).style.display="block";eval(getDocObj("child_option2")).style.display="block";eval(getDocObj("child_option3")).style.display="block";}
else if(value==5){eval(getDocObj("child_option")).style.display="block";eval(getDocObj("child_option1")).style.display="block";eval(getDocObj("child_option2")).style.display="block";eval(getDocObj("child_option3")).style.display="block";eval(getDocObj("child_option4")).style.display="block";eval(getDocObj("child_option5")).style.display="none";}
else if(value==6){eval(getDocObj("child_option")).style.display="block";eval(getDocObj("child_option1")).style.display="block";eval(getDocObj("child_option2")).style.display="block";eval(getDocObj("child_option3")).style.display="block";eval(getDocObj("child_option4")).style.display="block";eval(getDocObj("child_option5")).style.display="block";}
else{eval(getDocObj("child_option")).style.display="none";eval(getDocObj("child_option1")).style.display="none";eval(getDocObj("child_option2")).style.display="none";eval(getDocObj("child_option3")).style.display="none";eval(getDocObj("child_option4")).style.display="none";eval(getDocObj("child_option5")).style.display="none";}
}
function emailCheck(emailStr){
   var emailPat=/^(.+)@(.+)$/
   var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
   var validChars="\[^\\s" + specialChars + "\]"
   var quotedUser="(\"[^\"]*\")"
   var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
   var atom=validChars + '+';
   var word="(" + atom + "|" + quotedUser + ")";
   var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
   var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
   var matchArray=emailStr.match(emailPat)
   if(matchArray==null){alert("Email address seems incorrect (check @ and .'s)");return false;}
   var user=matchArray[1];
   var domain=matchArray[2];
   if(user.match(userPat)==null){alert("The username of the email address doesn't seem to be valid.");return false;}
   var IPArray=domain.match(ipDomainPat);
   if(IPArray!=null){for(var i=1;i<=4;i++){if(IPArray[i]>255){alert("Destination IP address is invalid!");return false;}}return true;}
   var domainArray=domain.match(domainPat);
   if(domainArray==null){alert("The domain name doesn't seem to be valid.");return false;}
   var atomPat=new RegExp(atom,"g");
   var domArr=domain.match(atomPat);
   var len=domArr.length;
   if(domArr[domArr.length-1].length<2 || domArr[domArr.length-1].length>3){alert("The email address must end in a three-letter domain, or two letter country.");return false;}
   if(len<2){var errStr="This address is missing a hostname!";alert(errStr);return false;}
   return true;
}
function ltrim(s){return s.replace(/^\s*/,"");}
function rtrim(s){return s.replace(/\s*$/,"");}
function trim(s){return rtrim(ltrim(s));}