var skyForm;

function pageInit() {
    formInit();
}

function formInit()
{
    // create an instance of the form class
    skyForm = new DraftfcbForm(document.forms["skyVisaHealth"]);

    // project-specific form properties
    skyForm.ErrorBox = $("div#travelFormError");

    skyForm.Rules.push(
        { Field: "NA",     Method: "Required",    ErrorId: "errorNationalityReq" },
        { Field: "DE",     Method: "Required",    ErrorId: "errorDesintationReq" },
        { Field: "VT",     Method: "Required",    ErrorId: "errorVisitedReq" },
        { Field: "EM",     Method: "Required",    ErrorId: "errorEmbarkationReq" },
        { Field: "AR",     Method: "NoMatchNationality",     ErrorId: "errorNationalityNomatch" }
    );
}

function formValidate()
{
    return skyForm.Validate();
}

//custom form event handler functions
//pre-validation submit event handler
function handleSubmit() {
}

//after passing validation, prior to submission event handler
var resultsWin;

function handleTarget() {
    // open results pop-up to act as the form's target window
    resultsWin = window.open("", "results","top=50,left=50,width=820,height=825,toolbar=no,menubar=no,scrollbars=yes,status=no,resizable=yes");
}
