function calculate()
{
    var ajaxObj = new Ajax.Request('/Tools/Calculators/Business_Startup_Calculator',
            {method: 'post',
             parameters : 'marketing='+ encodeURIComponent($('marketing').value) +'&plan='+ encodeURIComponent($('plan').value) +'&comm='+ encodeURIComponent($('comm').value) +'&financing='+ encodeURIComponent($('financing').value) +'&fixtures='+ encodeURIComponent($('fixtures').value) +'&insuranse='+ encodeURIComponent($('insuranse').value) +'&office='+ encodeURIComponent($('office').value) +'&premises='+ encodeURIComponent($('premises').value) +'&fees='+ encodeURIComponent($('fees').value) +'&transport='+ encodeURIComponent($('transport').value) +'&rent='+ encodeURIComponent($('rent').value) +'&unexpected='+ encodeURIComponent($('unexpected').value) +'&web='+ encodeURIComponent($('web').value) +'&other='+ encodeURIComponent($('other').value) +'&available='+ encodeURIComponent($('available').value),
             onComplete: function(originalRequest)
            {
            	if (originalRequest.responseJSON && typeof originalRequest.responseJSON == 'object') {
            		$('txtFunding').value = originalRequest.responseJSON.funding;
            	}
            }
    });

    ajaxObj = null;
    return false;
}

function calculatorReset() {
	x = '';
	$$('div#calculator_form input').each(function (input) {
		input.value = '0.00';
		
		x += "&"+ input.name +"='+ encodeURIComponent($('"+ input.name +"').value) +'";
		
	});
	
	$('txtFunding').value = '';
	return false;
}
