document.WAFV_Stop = true;
}
else if (stopIt == 2) {
formElement.WAFV_Continue = true;
}
else if (stopIt == 3) {
formElement.WAFV_Stop = true;
formElement.WAFV_Continue = false;
}
}
function WAValidateRQ(formElement,errorMsg,focusIt,stopIt,trimWhite,inputType) {
var isValid = true;
if (!document.WAFV_Stop && !formElement.WAFV_Stop) {
if (inputType == "select") {
if (formElement.selectedIndex == -1) {
isValid = false;
}
else if (!formElement.options[formElement.selectedIndex].value || formElement.options[formElement.selectedIndex].value == "") {
isValid = false;
}
}
else if (inputType == "checkbox") {
if (formElement.length) {
isValid = false;
focusIt = false;
for (var x=0; x 127) {
isValid = false;
}
}
for (x=0; x < domainName.length; x++) {
if (domainName.charCodeAt(x) > 127) {
isValid = false;
}
}
if (userName.match(userPat) == null) {
isValid = false;
}
if (IPArray != null) {
for (var x=1; x<=4; x++) {
if (IPArray[x] > 255) {
isValid = false;
}
}
}
for (x=0; x < domArr.length; x++) {
if (domArr[x].search(acceptedPat) == -1 || domArr[x].length == 0) {
isValid = false;
}
}
if (domArr[domArr.length-1].length !=2 && domArr[domArr.length-1].search(knownDomsPat) == -1) {
isValid = false;
}
if (domArr.length < 2) {
isValid = false;
}
}
}
if (!isValid) {
WAAddError(formElement,errorMsg,focusIt,stopIt);
}
}
function WAAlertErrors(errorHead,errorFoot,setFocus,submitForm) {
if (!document.WAFV_StopAlert) {
document.WAFV_StopAlert = true;
if (document.WAFV_InvalidArray) {
document.WAFV_Stop = true;
var errorMsg = document.WAFV_Error;
if (errorHead!="")
errorMsg = errorHead + "\n" + errorMsg;
if (errorFoot!="")
errorMsg += "\n" + errorFoot;
document.MM_returnValue = false;
if (document.WAFV_Error!="")
alert(errorMsg.replace(/"/g,'"'));
else if (submitForm)
submitForm.submit();
if (setFocus && document.WAFV_Focus) {
document.tempFocus = document.WAFV_Focus;
setTimeout("document.tempFocus.focus();setTimeout('document.WAFV_Stop = false;document.WAFV_StopAlert = false;',1)",1);
}
else {
document.WAFV_Stop = false;
document.WAFV_StopAlert = false;
}
for (var x=0; x
| |
Request An Inspection
|
| |

H2 Home Inspectors |
 |