function check_and_submit()
{
		$('submit').disabled = true;
	    $('submit').value = "Processing....";
		$('submit').innerHTML = "Processing....";
	    $('contact_form').request({
	      onSuccess: function(transport)
	      {
	        if(transport.responseText.match(/^OK/) != null) {
	        	$('submit').innerHTML = 'gone...';
				$('submit').value = 'gone...';
		        $('submit').disabled = true;
				show_success()
	        } else {
				alert('Incorrect code, please try agiain.');
				$('code').value = "";
				$('code').setStyle({'border': '2px solid red'});          
				change_image();
				$('submit').value = 'Send';
				$('submit').innerHTML = 'Send';
		        $('submit').disabled = false;
		    }
	      }
	    });
	
	    return false;			
}

function change_image()
{
	document.getElementById('image').src = '/securimage/securimage_show.php?sid=' + Math.random();
	return false;
}

function close_captcha()
{
	$$('.captcha, .inner_holder').invoke('hide');
	
//	$$('img.ab_floater').invoke('show');
	
}

function go()
{
	if(contactValidateForm())
	{
		$$('.captcha, .inner_holder').invoke('show');
		
	//	$$('img.ab_floater').invoke('hide');
		
	}
}

function hide_form()
{
	document.getElementById('contact_form_holder').style.display = 'none';
//	$('contact_form_holder').invoke('hide');
}

function show_success()
{
	$('contact_form_holder').innerHTML = '<h1>Thank you for your enquiry. We will get back to you shortly.</h1>';
}