<!-- //2000 Copyright Professional Administrative Services  Proadser.com 
function compute(form) {
                mcurrent = (form.currentassets.value / form.currentliabilities.value);
                mcurrent = mcurrent*100
                mcurrent = parseInt(mcurrent)
                mcurrent = mcurrent/100
                if (mcurrent >= 1)
                    if (mcurrent < 3)
                        form.current.value = "The Current Ratio measures the firm's ability to pay its short term debts with liquid assets. Your Current Ratio is "+mcurrent+". This means that for every dollar of short term debt, you have "+mcurrent+" dollars of liquid assets to pay it. This is probably OK."
                    else
                        form.current.value = "The Current Ratio measures the firm's ability to pay its short term debts with liquid assets. Your Current Ratio is "+mcurrent+", this number means that you have under utilized current assets (i.e. higher than necessary cash reserves, accounts receivable, or inventory)."
                else
                    if (isNaN(mcurrent))
                        form.current.value = "The Current Ratio could not be calculated, please make sure you have entered a total for Current Assets and Current Liabilities."
                    else
                        form.current.value = "The Current Ratio measures the firm's ability to pay its short term debts with liquid assets. The Current Ratio is "+mcurrent+". This means that for every dollar of short term debt, you only have "+mcurrent+" cents to pay it. This is a sign of tight liquidity." 

                mquick = (parseInt(form.cash.value) + parseInt(form.acctrec.value) )/ form.currentliabilities.value;
                mquick = mquick*100
                mquick = parseInt(mquick)
                mquick = mquick/100
                if (mquick >=.5)
                     if (mquick < 2)
     		        form.quick.value = "The Quick Ratio (Acid Test) is a tighter measure of liquidity. It only considers cash and accounts receivable to pay short term debts. A measure of 1 to 1 is ideal. Your Quick ratio is "+mquick+", which is probably OK."
                     else
     		        form.quick.value = "The Quick Ratio (Acid Test) is a tighter measure of liquidity.  It only considers cash and accounts receivable to pay short term debts. A measure of 1 to 1 is ideal. Your Quick ratio is "+mquick+", which indicates that you probably have under utilized reserves."
                else
                     if (isNaN(mquick))
                        form.quick.value = "The Quick Ratio could not be calculated, please make sure you have entered a total for Current Assets and Current Liabilities."
                     else
     		        form.quick.value = "The Quick Ratio (Acid Test), is a tighter measure of liquidity. It only considers cash and accounts receivable (AR) to pay short term debts. A measure of 1 to 1 is ideal. Your Quick ratio is "+mquick+", which means that for every dollar of short term debt you only have "+mquick+" in cash and AR to pay it. This is a sign of tight liquidity."

                mdebttoequity = (form.totalliabilities.value /form.equity.value);
                mdebttoequity = mdebttoequity*10
                mdebttoequity = parseInt(mdebttoequity)
                mdebttoequity = mdebttoequity/10
                if (isNaN(mdebttoequity))
                    form.debttoequity.value = "The debt to equity ratio could not be calculated, please make sure you entered values for Total Liabilities and Equity."
                else
                    if (mdebttoequity>=3)
                        form.debttoequity.value = "The debt to equity ratio measures the portion of the business owned by  stockholders against what is owned by creditors. Your debt to equity ratio is "+mdebttoequity+". A debt to equity ratio like this is probably too high."
                    else
                        form.debttoequity.value = "The debt to equity ratio measures the portion of the business owned by  stockholders against what is owned by creditors. Your debt to equity ratio is "+mdebttoequity+". You should compare this ratio to your industry to see where you stand."

                mavgcolldays = (365 /( form.sales.value / form.acctrec.value ));
                mavgcolldays = mavgcolldays*10
                mavgcolldays = parseInt(mavgcolldays)
                mavgcolldays = mavgcolldays/10
                if (isNaN(mavgcolldays))
                    form.avgcolldays.value = "The average collection days could not be calculated, please make sure you entered values for Accounts Receivable and Annual Sales."
                else
		    form.avgcolldays.value = "The average number of days it takes your customers to pay is "+mavgcolldays+" days. This number needs to be compared against your own regular terms to see if you need to make an extra effort at enforcing your credit terms. If your liquidity is low, this ratio should be one of the first to focus on improving."

                mavginvturn = (365 / ( form.costofgoodsold.value / form.inventory.value));
                mavginvturn = mavginvturn*10
                mavginvturn = parseInt(mavginvturn)
                mavginvturn = mavginvturn/10
                if (isNaN(mavginvturn))
                    form.avginvturn.value = "The average inventory turns could not be calculated, please make sure you entered values for Inventory and Annual Cost of Goods Sold."
                else
                    form.avginvturn.value = "The average number of days it takes to move your inventory is "+mavginvturn+" days. This number should be compared against your industry. If this number is much higher than your industry, you are incurring higher expenses (storage costs, carrying costs, pilferage, etc.). That puts you at a disadvantage against your competition."

                macctpayturn = (365 / ( form.costofgoodsold.value / form.acctpay.value));
                macctpayturn = macctpayturn*10
                macctpayturn = parseInt(macctpayturn)
                macctpayturn = macctpayturn/10
		if (isNaN(mavginvturn))
                     form.acctpayturn.value = "The average payables turns could not be calculated, please make sure you entered values for Accounts Payable and Annual Cost of Goods Sold."
                else
                     form.acctpayturn.value = "The average number of days it takes to pay your vendors is "+macctpayturn+" days. You should compare this number to your vendor terms. If it is too low, you could probably extend it and use the extra money. If it is too high, your vendors might start restricting your credit soon."

                mreturnonequity = (form.netaxprofit.value / form.equity.value);
                mreturnonequity = mreturnonequity*1000
                mreturnonequity = parseInt(mreturnonequity)
                mreturnonequity = mreturnonequity/10
                if (isNaN(mreturnonequity))
                   form.returnonequity.value = "The return on equity ratio could not be calculated, please make sure you entered values for Equity and Annual Pre-Tax Profit."
                else
                   form.returnonequity.value = "The return on equity ratio measures the amount of pre-tax profit obtained by the stockholders for their investment. Your return on equity ratio is "+mreturnonequity+" percent. This number should be compared against other investments available at different levels of risk."

                msalestofixedasset = (form.sales.value / form.fixedasset.value);
                msalestofixedasset = msalestofixedasset*10
                msalestofixedasset = parseInt(msalestofixedasset)
                msalestofixedasset = msalestofixedasset/10
                if (isNaN(msalestofixedasset))
                   form.salestofixedasset.value = "The sales to fixed assets ratio could not be calculated, please make sure you entered values for Fixed Assets and Annual Sales."
                else
		   form.salestofixedasset.value = "The sales to fixed assets ratio measures how productive your company is in the utilization of equipment, vehicles, land and building. Your sales to fixed assets ratio is "+msalestofixedasset+". This number should be compared against your industry to see where you stand."
                msalestototalasset = (form.sales.value / form.totalasset.value);
                msalestototalasset = msalestototalasset*10
                msalestototalasset = parseInt(msalestototalasset)
                msalestototalasset = msalestototalasset/10
                if (isNaN(msalestototalasset))
                   form.salestototalasset.value = "The sales to total assets ratio could not be calculated, please make sure you entered values for Total Assets and Annual Sales." 
                else
   		   form.salestototalasset.value = "The sales to total assets ratio measures the productivity of your assets, in other words, the dollar amount of sales generated per dollar of assets employed. Your sales to total assets ratio is "+msalestototalasset+". This number should be compared to your industry to see where you stand against your competition."

}

function ClearForm(form) {
		form.current.value=" ";
		form.currentassets.value="0";
		form.currentliabilities.value="0";
		form.quick.value=" ";
		form.cash.value="0";
		form.totalliabilities.value= "0";
		form.equity.value = "0";
		form.debttoequity.value = " ";
		form.avgcolldays.value= " ";
		form.sales.value ="0";
		form.acctrec.value = "0";
		form.avginvturn.value = " ";
		form.costofgoodsold.value = "0";
		form.inventory.value = "0";
		form.acctpayturn.value = " ";
		form.acctpay.value = "0";
		form.returnonequity.value = " ";
		form.netaxprofit.value = "0";
		form.salestofixedasset.value = " ";
		form.fixedasset.value = "0";
		form.salestototalasset.value = " ";
		form.totalasset.value= "0";
	} 
//-->
