var antispam = function () {
	var form = $(document.body).getElement('form.antispam');
	if ($chk(form)) {
		$each(form.getElements('input, textarea'), function(item) { item.addEvent('focus', function(){ form.store('focus', true); }); });
		form.addEvent('submit', function(e) {
		    // Check if submit can be send
		    if ($time()-timeStart>2000 && form.retrieve('focus')==true) {
		    	new Element('input', {'type': 'hidden', 'name': 'antispam', 'value': 'Mjb10As'}).inject(form);
		    }
		});
	}
};

var timeStart = new Date();
window.addEvent('domready', function() { antispam(); });
