		function session_reset() {
			// Execute reset
			$.post('../php_pub/submit_data.php','func=reset',function(data) {
				$(data).find('status').each( function() {
					//alert($(this).text());
					clearAll();
					} );
				} );
		}
		
		function clearAll() {
			document.getElementById('data').value="";
			$('#statcalculatorresult').remove();
		}
		
		
		function updateErrorDiv(error_string) {
			// Remove previous result window if there is one
			$('#statcalculatorresult').remove();

			// Insert the div for the result
			$('<div id="statcalculatorresult" class="statcalculatorresult"></div>').insertBefore('#conversion_calculator');
			outputresult='<p style="color:red; font-weight:bold; text-align:center">'+error_string+'</p>';
			$('div#statcalculatorresult').html(outputresult);

		}

    function please_wait() {
	    	$('#statcalculatorresult').remove();
			$('<div id="statcalculatorresult" class="statcalculatorresult"></div>').insertBefore('#conversion_calculator');
			outputresult='<p style="color:blue; font-weight:bold; text-align:center">Please wait ...</p>';
			$('div#statcalculatorresult').html(outputresult);
    }



