function tdmouseover(el) { el.style.color = "yellow" el.style.backgroundColor = "#76a8eb" } function tdmouseout(el) { el.style.color = "black" el.style.backgroundColor = "#8fbbf6" } function checkCheckBox(f) { if ((f.agree.checked == false) || (f.contacttitle.value == " ") ) { alert('Please check the "I agree" checkbox to continue.'); return false; } else return true; } function isValidEmail(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ alert("Invalid E-mail ID"); return false; } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert("Invalid E-mail ID"); return false; } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert("Invalid E-mail ID"); return false; } if (str.indexOf(at,(lat+1))!=-1){ alert("Invalid E-mail ID"); return false; } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert("Invalid E-mail ID"); return false; } if (str.indexOf(dot,(lat+2))==-1){ alert("Invalid E-mail ID"); return false; } if (str.indexOf(" ")!=-1){ alert("Invalid E-mail ID"); return false; } return true; } function IsNumeric(sText) { var ValidChars = "0123456789"; var IsNumber=true; var Char; for (i = 0; i < sText.length && IsNumber == true; i++) { Char = sText.charAt(i); if (ValidChars.indexOf(Char) == -1) { IsNumber = false; } } return IsNumber; } function IsEmptyOption(aTextField) { if ( aTextField.selectedIndex == 0 ) { alert('Fill all required fields.'); return true; } } function IsEmpty(aTextField) { if ((aTextField.value.length==0) || (aTextField.value==null)) { alert('Fill all required fields.'); return true; } else { return false; } } function thesame(aTextField, bTextField) { if (aTextField.value==bTextField.value) { return true; } else { return false; } } function ValidateSponsorForm(form) { if(IsEmpty(form.fname)) { alert('You have not entered a first name'); form.fname.focus(); return false; } if(IsEmpty(form.lname)) { alert('You have not entered a last name'); form.lname.focus(); return false; } if(IsEmpty(form.referred_email)) { alert('You have not entered an Email Address'); form.referred_email.focus(); return false; } if(IsEmpty(form.referred_email2)) { alert('You have not entered an Email Address'); form.referred_email2.focus(); return false; } if(!thesame(form.referred_email, form.referred_email2)) { alert('Please make sure both email addresses are the same'); form.email1.focus(); return false; } if(IsEmpty(form.city)) { alert('You have not entered a City'); form.city.focus(); return false; } if(IsEmpty(form.state)) { alert('You have not entered a State'); form.state.focus(); return false; } if(IsEmptyOption(form.relation_type_id)) { alert('You have not choosen a relationship type, from drop down list'); form.relation_type_id.focus(); return false; } return true; } function CheckStage2Box(f) { if(IsEmptyOption(f.s2_service_type_id)) { alert('You have not choosen a service type, from drop down list'); f.s2_service_type_id.focus(); return false; } /* if(IsEmpty(f.rname1)) { alert('You have not entered a required information'); f.rname1.focus(); return false; } if(IsEmpty(f.rname2)) { alert('You have not entered a required information'); f.rname2.focus(); return false; } if(IsEmpty(f.rrelationship1)) { alert('You have not entered a required information'); f.rrelationship1.focus(); return false; } if(IsEmpty(f.rrelationship2)) { alert('You have not entered a required information'); f.rrelationship2.focus(); return false; } if(IsEmpty(f.rlength1)) { alert('You have not entered a required information'); f.rlength1.focus(); return false; } if(IsEmpty(f.rlength2)) { alert('You have not entered a required information'); f.rlength2.focus(); return false; } if(IsEmpty(f.remail1)) { alert('You have not entered a required information'); f.remail1.focus(); return false; } if(IsEmpty(f.remail2)) { alert('You have not entered a required information'); f.remail2.focus(); return false; } if(IsEmpty(f.consideration1)) { alert('You have not entered an answer for consideraiton question number 1'); f.consideration1.focus(); return false; } if(IsEmpty(f.consideration2)) { alert('You have not entered an answer for consideraiton question number 2'); f.consideration2.focus(); return false; } if(IsEmpty(f.consideration3)) { alert('You have not entered an answer for consideraiton question number 3'); f.consideration3.focus(); return false; } */ if(IsEmpty(f.consideration4)) { alert('You have not entered an answer for consideraiton question'); f.consideration4.focus(); return false; } if(IsEmpty(f.uploadedfile)) { alert('You have not uploaded resume'); f.uploadedfile.focus(); return false; } if (f.agree.checked == false) { alert('Please check the "I agree" checkbox to continue.'); return false; } return true; } function CheckStage2CampBox(f) { if (f.agree.checked == false) { alert('Please check the checkbox at Statement of Application Accuracy to continue.'); return false; } return true; } function checkUncheckAll(theElement) { var theForm = theElement.form, z = 0; for(z=0; z