var validationReason = null;
/*
function ajaxCheckExists(email,frm){
	var a = new Ajax.Request('checkSubmit.cfm?e=' + email,
	{
		'onSuccess' : function (response){
			var validemail = response.responseText;
			if(validemail != 'false'){ 
				validateForm2(frm);
			} 
			else {
				alreadySubmitted();
			}
		},
		//GMS
		'onFailure' : function(response){
			alert('Error with data retrieval');
		}
	});
}*/

function ajaxCheckExists(email,frm) {
	url = 'checkSubmit.cfm';
	$.ajax({
		type : "GET",
		url : url,
		data : "e=" + email,
		success : function (response){
			var validemail = response;
			if(validemail != 'false'){ 
				validateForm2(frm);
			} 
			else {
				alreadySubmitted();
			}
		},
		error: function(response){
			alert('Error with data retrieval');
		}
	})
}


function handleSuccess(response)
{
	alert(response);
	return false;
}

function handlerFailuer(response)
{
	alert(response);
}