$(function() {
	
	$("#contact").submit(function() { 
        // inside event callbacks 'this' is the DOM element so we first 
        // wrap it in a jQuery object and then invoke ajaxSubmit 
		if(!formCheck()){
			return false; 
		}
        // !!! Important !!! 
        // always return false to prevent standard browser submit and page navigation 
        
    }); 

});

// which fields needs to be checked
// fieldid-check-formid-message-text-message id
fieldsCheck=new Array;
fieldsCheck[0]='firstname/required/contact/required_field/label-firstname';
fieldsCheck[1]='lastname/required/contact/required_field/label-lastname';
fieldsCheck[2]='organisation/required/contact/required_field/label-organisation';
fieldsCheck[3]='function/required/contact/required_field/label-function';
fieldsCheck[4]='city/required/contact/required_field/label-city';
fieldsCheck[5]='country/required/contact/required_field/label-country';
fieldsCheck[6]='phone/required/contact/required_field/label-phone';
fieldsCheck[7]='email/email/contact/email_incorrect/label-email';
fieldsCheck[8]='request/required/contact/required_field/label-request';
