var t = "";
var myurl ;

function validate(theForm){

	if (FrontPage_Form1_Validator(theForm) != false) {

		SaveData(theForm);
	}
}

function SaveData(theForm){

    t = $('form#FrontPage_Form1').serialize();

	var myurl = "SaveContactData.asp?t=" + t;
    //alert (myurl);

	 $.ajax({
	   type: "GET",
	   url: myurl,
	   datatype: "text",
	   error: function(){
		alert(' An error has ocurred, please try again.\nNotify webmaster if problem persists.');
	   },
	   success: function(text, txt){
			 //alert( "Data returned: " + text );
			 document.FrontPage_Form1.submit();
	   }//success
	 });//ajax

}//function

$(document).ajaxError(function(){
    if (window.console && window.console.error) {
        console.error(arguments);
    }
});
