
var ReqFields = new Array( "FirstName", "LastName", "Phone", "Email", "Organization","Position","Department", "Address", "City", "Postcode", "Country", "ArrivalDate",
"AirlineCompany","FlightNo");

function checkForm() { 

/*
    for (f in reg.elements) {
        var e=reg[f];
        if (e!=null && typeof(e)=="object" && e.tagName=="INPUT" && e.type=="text") {
            var v=e.value;
            for(var i=0; i<v.length; i++) 
                if (v.charCodeAt(i)>255) {
                    alert("Please use only English letters");
                    return false;
            }
        }
    }
*/

    if (!document.reg.agree.checked) {
        alert("You must accept the reimbursement policy");
        return false;
    };

    for (f in ReqFields) {
        var e=document.reg.item(ReqFields[f]);
        if (e.value=="") {
            alert("Please fill "+e.name+" field");
            return false;
        }
    }

    if (! /^(\d+)\.(\d+)\s+(\d+):(\d+)$/.exec(document.reg.ArrivalDate.value)) {
       alert("Please fill Arrival Date and time field in proposed format");
       return false;
    }


    document.reg.vld.value = "valid";
    return true;
}

