function pop_window(url,windowName,w,h) {
	winProps = 'height='+h+',width='+w+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1';
	small_window = window.open(url,windowName,winProps);
	small_window.focus();
}
function pop_windowsb(url,windowName,w,h) {
	winProps = 'height='+h+',width='+w+',toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1';
	small_window = window.open(url,windowName,winProps);
	small_window.focus();
}
function submit_salesinq() {
    var msg='';
    var validEmail=/.+@.+\.\w{2,}/;
    if (document.theform.first_name.value == '') {
        msg=msg + "First name is required\n"; }
    if (document.theform.last_name.value == '') {
        msg=msg + "Last name is required\n"; }
    if (document.theform.address.value == '') {
        msg=msg + "Address is required\n"; }
    if (document.theform.city.value == '') {
        msg=msg + "City is required\n"; }
    if (document.theform.state.value == '') {
        msg=msg + "State is required\n"; }
    if (document.theform.phone.value == '') {
        msg=msg + "Phone is required\n"; }
    if (document.theform.vemail.value != document.theform.email.value) {
        msg=msg + "Your email addresses do not match\n"; }
    if (document.theform.email.value == '') {
        msg=msg + "Email is required\n";
    } else {
        if (!validEmail.test(document.theform.email.value)) {
            msg=msg + "Your Email address is not formatted correctly\n";
        }
    }
    if (msg != '') {
        alert(msg);
        return(false);
    } else {
        return(true);
    }
}
function submit_rentalinq() {
    var msg='';
    var validEmail=/.+@.+\.\w{2,}/;
    if (document.theform.vemail.value != document.theform.email.value) {
        msg=msg + "Your email addresses do not match\n"; }
    if (document.theform.email.value == '') {
        msg=msg + "Email is required\n";
    } else {
        if (!validEmail.test(document.theform.email.value)) {
            msg=msg + "Your Email address is not formatted correctly\n";
        }
    }
    if (msg != '') {
        alert(msg);
        return(false);
    } else {
        return(true);
    }
}
function submit_checkout2() {
    var msg='';
    if (document.theform.cc_num.value == '') {
        msg=msg + "Credit card number is required\n"; }
    if (msg != '') {
        alert(msg);
        return(false);
    } else {
        return(true);
    }
}
function submit_checkout1() {
    var msg='';
    var validEmail=/.+@.+\.\w{2,}/;
    if (document.theform.first_name.value == '') {
        msg=msg + "Billing first name is required\n"; }
    if (document.theform.last_name.value == '') {
        msg=msg + "Billing last name is required\n"; }
    if (document.theform.address.value == '') {
        msg=msg + "Billing address is required\n"; }
    if (document.theform.city.value == '') {
        msg=msg + "Billing city is required\n"; }
    if (document.theform.email.value == '') {
        msg=msg + "Email is required\n";
    } else {
        if (!validEmail.test(document.theform.email.value)) {
            msg=msg + "Your Email address is not formatted correctly\n";
        }
    }
    if (document.theform.s_last_name.value != '' && document.theform.s_address.value != '') {
        if (document.theform.s_first_name.value == '') {
            msg=msg + "Shipping first name is required\n"; }
        if (document.theform.s_city.value == '') {
            msg=msg + "Shipping city is required\n"; }
    }
    if (msg != '') {
        alert(msg);
        return(false);
    } else {
        return(true);
    }
}

