window.addEvent('domready', function() {
									 
	
	$('contactForm').addEvent('submit', function(e) {
		//Prevents the default submit event from loading a new page.
		e.stop();
		//Empty the log and show the spinning indicator.
		var mylog = $('loadlog').empty().set('html', "Processing...");
		var log = $('log_res').empty().addClass('ajax-loading');
		//Set the options of the form's Request handler. 
		//("this" refers to the $('myForm') element).
		this.set('send', {onComplete: function(response) { 
			//log.removeClass('ajax-loading');
			var mylog = $('loadlog').empty().set('html', "");
			log.addClass('log_resb');
			log.set('html', response);
			var thefield = $('txtsecure').empty()
			thefield.set('value', 'Re-type above code');
			document.getElementById('image').src = 'secure/securimage_show.php?sid=' + Math.random(); return false
		}});
		//Send the form.
		this.send();
	});
});

window.addEvent('domready', function() {
	$('txtsecure').addEvent('focus', function(s) {
			s.stop();
			var thefield = $('txtsecure').empty()
			$('txtsecure').set('value', '');
			});
			
});
