$(document).ready( function() {
	$('#contactsubmit').click( function() {
		
		sError = false;
		
		
		// Validate
		if($('#contact_name').attr('value') == '') {
			var sError = t('Please fill in your name');
		}else if($('#contact_email').attr('value') == '') {
			var sError = t('Please fill in your e-mailaddress');
		}else if($('#contact_phone').attr('value') == '') {
			var sError = t('Please fill in your phone number');
		}
		
		
			
		if(sError) {
			alert(sError);
		} else {
			// Submit
			$('#contactform').attr({action: LINKROOT+'/do/frontend/contactform'});
			$('#contactform').submit();
		}
	} );
});
