

function sendContactPageForm(form){var check_values=new Array('contact_page_name',$('contact_page_name').value,'string','contact_page_email',$('contact_page_email').value,'email','contact_page_email2',$('contact_page_email2').value,'email2','contact_page_phone',$('contact_page_phone').value,'string','contact_country',$('contact_country').value,'string','contact_page_subject',$('contact_page_subject').value,'string','contact_page_text',$('contact_page_text').value,'string','contact_page_secure_text',$('contact_page_secure_text').value,'secureText');new Ajax.Request('check_site_forms.php',{method:'post',postBody:$H(check_values).toQueryString(),onLoading:function(){},onComplete:function(){},onSuccess:function(transport)
{var check_result=transport.responseText.split("|");if($('contact_page_email').value!=$('contact_page_email2').value){$('contact_page_email2_alert').innerHTML='First email adress is different than second. Please write correct email adress';check_result[3]='error';check_result[0]='false';}
if(check_result[0]=='ok')
{for(i=1;i<check_result.length;i++)
new Effect.BlindUp(check_values[((i-1)*3)]+'_alert');new Ajax.Request('mail.php',{method:'post',postBody:Form.serialize(form),onLoading:function(){form.disable();},onComplete:function(){form.enable();},onSuccess:function(transport)
{if(transport.responseText.substr(0,1)=='#')
{$("contactPageMsg").innerHTML='<span style="color:#1BCD2E;">Thank you for you enquiry we will respond to your enquiry within one working day.';new Effect.BlindDown("contactPageMsg");form.reset();setNewSecureText('contact_page_secure_text');}
else
{$("contactPageMsg").innerHTML='<span style="color: #ED1B2E;">Error sending you enquiry. Please try again.</span>';if($('contactPageMsg').style.display=='none')
new Effect.BlindDown("contactPageMsg");}}});}
else
{for(i=1;i<check_result.length;i++){if(check_result[i]=='error'){if($(check_values[((i-1)*3)]+'_alert').style.display=='none')
new Effect.BlindDown(check_values[((i-1)*3)]+'_alert');if(check_values[((i-1)*3)+2]=='secureText')
setNewSecureText('contact_page_secure_text');}
else
new Effect.BlindUp(check_values[((i-1)*3)]+'_alert');}}}});}

