function submitForm(theform)
{
	theform.disabled = true;
	var params = Form.serialize( theform );
	var url =  self.location.protocol+"//"+self.location.host + '/php/turing/feedback.php';
	new Ajax.Request( url , 
   		 {	 method:'post' 
   		 	, asynchronous:true
   		 	, postBody:params 
   		 	, onSuccess:function(req){ updateInterface(req); }
   		 	, onFailure:function(req){alert('feedback.js, An error occured: performtransformation'+req.statusText);}
   		 } );
	
	return false;
}

function updateInterface(req)
{
	
	var elemtest=req.responseXML.getElementsByTagName('success');
	
 	if (elemtest.length != 0) 
 	{
		Effect.Appear('feedbackBlock_thanks');
		Effect.Fade('feedbackBlock_error');
 		Effect.Fade('feedbackBlock_form');
 	}
 	 else
 	{
		Effect.Appear('feedbackBlock_error');
 	}

}



function submitEmail( theform )
{
	theform.disabled = true;
	var params = Form.serialize( theform );
	var url =  self.location.protocol+"//"+self.location.host + '/php/turing/emailarticle.php';
	new Ajax.Request( url , 
   		 {	 method:'post' 
   		 	, asynchronous:true
   		 	, postBody:params 
   		 	, onSuccess:function(req){ updateEmailBlock(req); }
   		 	, onFailure:function(req){alert('feedback.js, An error occured: performtransformation'+req.statusText);}
   		 } );
	
	return false;
	
}

function updateEmailBlock(req)
{
	var elemtest=req.responseXML.getElementsByTagName('success');
 	if (elemtest.length > 0 ) 
 	{
		Effect.Appear('feedbackEmail_response');
		Effect.Fade('mailform');
 	}
 	else
 	{
		Effect.Appear('emailBlock_error');
 	}
	
	return false;
}