<!--
function arbCalculate() {

	if(isNaN(document.frmArbCalculate.odd_1.value) || document.frmArbCalculate.odd_1.value == "")
	{
		alert("Odds for Outcome 1 is not a decimal number.");
		return;
	}
	
	if(isNaN(document.frmArbCalculate.odd_2.value) || document.frmArbCalculate.odd_2.value == "")
	{
		alert("Odds for Outcome 2 is not a decimal number.");
		return;
	}
	
	if(isNaN(document.frmArbCalculate.total_stake.value) || document.frmArbCalculate.total_stake.value == "")
	{
		alert("Total Stake is not a number.");
		return;
	}
	
	var odds1 = eval( document.frmArbCalculate.odd_1.value ) ;
	var odds2 = eval( document.frmArbCalculate.odd_2.value ) ;
	
	cover1 = (100/odds1);
	cover2 = (100/odds2);
	
	var cover = (cover1+cover2);
	
	var temp = "";

	var total = document.frmArbCalculate.total_stake.value;
	
	if( isNaN(odds1) )
		odds1 = 0;
	else
	{
                stake1 = ((cover1/cover)*total).toFixed(0);
	}

	if( isNaN(odds2) )
		odds2 = 0;
	else
	{
			   stake2 = total - stake1;
	}
	
	if( (odds1) == 0 ) stake1 = 0;
	if( (odds2) == 0 ) stake2 = 0;
	
	under_round = cover1 + cover2;
    true_return = (((100-under_round)/under_round)*100).toFixed(3);
	
    if (stake1 != 0) document.getElementById("divArbCalculate_stake1").innerHTML = "&pound;" + stake1;
	if (stake2 != 0) document.getElementById("divArbCalculate_stake2").innerHTML = "&pound;" + stake2;
	
	var profit = ((total * true_return)/100).toFixed(2);
	var winnings = (parseFloat(total) + parseFloat(profit)).toFixed(2);
	
	if( 100 <= cover )
	{
	document.getElementById("divArbCalculate_profitability").innerHTML = "<font color='#FF0000'>"+ true_return + "%</font>";
	document.getElementById("divArbCalculate_profit").innerHTML = "<font color='#FF0000'>£" + profit + "</font>";
	document.getElementById("divArbCalculate_winnings").innerHTML = "<font color='#FF0000'>£" + winnings + "</font>";
	}
	else
	{
		document.getElementById("divArbCalculate_profitability").innerHTML = "<font color='#009900'>" + true_return + "%</font>";
		document.getElementById("divArbCalculate_profit").innerHTML = "<font color='#009900'>£" + profit + "</font>";
		document.getElementById("divArbCalculate_winnings").innerHTML = "<font color='#009900'>£" + winnings + "</font>";
	}
}
//-->