function sendContactUsEmail() {
    var name    = escape(document.getElementById("wpyourname").value);
    var phone = escape(document.getElementById("wpphone").value);
    var email   = escape(document.getElementById("wpemail").value);
    var subject = escape(document.getElementById("wpsubject").value);
    var message = escape(document.getElementById("wpmessage").value);
    var captcha = escape(document.getElementById("captcha_code").value);
    var errorBlock = document.getElementById("errorblock");
    
    if ((name.length==0) || 
        (phone.length==0) || 
        (email.length==0) || 
        (subject.length==0) || 
        (message.length==0) || 
        (captcha.length==0)) {
            alert("All the fields in this form are mandatory.  Please fill out the entire form and then send it.");
            return false;
        }
    
    errorBlock.innerHTML = "";
    ajax("services/sendContactUs_srvc.php", 
        "&name="+name+"&email="+email+"&phone="+phone+"&subject="+subject+"&message="+message+"&captcha="+captcha, 
        handleSendContactUsResponse);
}
function handleSendContactUsResponse(contents, responseDoc) {
    var statusElems = responseDoc.getElementsByTagName("status");
    var errorBlock = document.getElementById("errorblock");
    if (statusElems.length > 0) {
        var status=statusElems[0];
        var statusValue = status.getAttribute("value");
        var statusDesc = status.getAttribute("desc");
        if (status.getAttribute("value") == "0") {
            // Success
            errorBlock.innerHTML = "<span style='color:green;font-size:15px;font-weight:700;'>"+statusDesc+"</span>";
            setTimeout("eval(window.location.href='?wp='+goBackPage)", 2000);
        } else {
            var errorBlock = document.getElementById("errorblock");
            if (errorBlock) {
                errorBlock.innerHTML = "<span style='color:red;font-size:15px;font-weight:700;'>"+statusDesc+"</span>";
            }
        }
    }
}