function json_formpost() {
	
	jQuery('#btnSubmit').attr( 'value', 'Sending...');
	jQuery('#btnSubmit').attr( 'disabled', 'true');
	var req = jQuery.post("/serverside/json_formpost.php", jQuery("#contactform").serialize(),
		function(json){
			if( json.success == '1'){
				window.location = 'core.php?showpage=thanks';
			} else {
				jQuery('#contacterrors').empty( );
				jQuery.each( json.errors, function( i, item ) {
					jQuery('#contacterrors').append( '<div>'+item+'</div>' );
				});
				jQuery('#contacterrors').append( '<div style="padding:8px" spacer></div>' );
			}
		}, "json" );

	req.onreadystatechange = function(){
		if( req.readyState == 4 ){
			jQuery('#btnSubmit').attr( 'value', 'Submit');
			jQuery('#btnSubmit').removeAttr( 'disabled' );
		}
	}
	
}