﻿
function ObjInit() {
}

function onSent(res) {
    var thx = $get('thx');
    thx.style.display = "";
    $get('first').value='';
    $get('last').value = '';
    $get('email').value = '';
    $get('comment').value = '';
}

function OnServiceError() {
    alert("Send Failed");
}

function SendMsg() {
    var fn = $get('first');
    var ln = $get('last');
    var em = $get('email');
    var cm = $get('comment');
    CustServerCall("ContactUs", "Form", { first: fn.value, last: ln.value, email: em.value, comment: cm.value }, onSent, OnServiceError);
}

function onSentHow() {
    var thx = $get('thx');
    thx.style.display = "";
    $get('HowHear').value = '';
    $get('OtherField').value = '';
    onToPDF();
}
function SendHowHear() {
    var fn = $get('HowHear');
    var ln = $get('OtherField');
    CustServerCall("Apply", "Form", { how: fn.value, other: ln.value }, onSentHow, OnServiceError);
}

function onToPDF() {
/*
    if (window.parent != null && window.parent.location.href != window.location.href) {
        window.parent.location.href = '/static_page.php?level=0&page_id=5';
    } else {
        window.location.href = '/static_page.php?level=0&page_id=5';
    }
*/
}

