function validateenquiry(thisForm){
    with(thisForm){
        var alertMessage="The following REQUIRED fields\nhave not been completed:\n";
        if(First_Name.value=="") alertMessage += "\nFirst Name";
        if(Surname.value=="") alertMessage += "\nSurname";
        if(Email.value=="") alertMessage += "\nEmail";
        if(Telephone.value=="") alertMessage += "\nTelephone";
        if(alertMessage!="The following REQUIRED fields\nhave not been completed:\n") {
            alert(alertMessage);
            return false;
        }else{
            return true;
        }
    }
}
/*
 * This function parses comma-separated name=value argument pairs from
 * the query string of the URL. It stores the name=value pairs in 
 * properties of an object and returns that object.
 */
function getArgs() {
    var args = new Object();
    var query = location.search.substring(1);     // Get query string.
    var pairs = query.split("&");                 // Break at comma.
    for(var i = 0; i < pairs.length; i++) {
        var pos = pairs[i].indexOf('=');          // Look for "name=value".
        if (pos == -1) continue;                  // If not found, skip.
        var argname = pairs[i].substring(0,pos);  // Extract the name.
        var value = pairs[i].substring(pos+1);    // Extract the value.
        args[argname] = unescape(value);          // Store as a property.
        // In JavaScript 1.5, use decodeURIComponent() instead of unescape()
    }
    return args;                                  // Return the object.
}
function checkCR(evt) {//disable return key
    var evt=(evt) ? evt : ((event) ? event : null);
    var node=(evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
    if ((evt.keyCode == 13) && (node.type=="text")) {return false;}
}

document.onkeypress = checkCR;



