/* Init */

Element.observe(window, 'load', function(){
	var valid = new Validation('contactform', {immediate : true});
	
	Form.getElements('contactform').each(function(input) {
		if (input.type == 'text' || input.type == 'textarea')
		{
			Element.observe(input, 'focus', function(){
				Element.removeClassName(this, 'field');
				Element.addClassName(this, 'fieldOn');
			});
			Element.observe(input, 'blur', function(){
				Element.removeClassName(this, 'fieldOn');
				Element.addClassName(this, 'field');
			});
		}
	});
});
