function recalculate()
{
	var thetotal = 0;
	var newdiv = "";

	for (var i = 0; i<document.getElementById('theForm').length; i++)
	{
    	if(document.getElementById('theForm').elements[i].checked)
		{
			if(document.getElementById('theForm').elements[i].value.indexOf('(+') > -1)
			{
				var optionname = document.getElementById('theForm').elements[i].name;
				var theval = document.getElementById('theForm').elements[i].value;
				var thename = theval.substr(0, theval.indexOf('(+')-1);
				var theincrease = theval.substr(theval.indexOf('+')+1, theval.length-2);
				theincrease = theincrease.replace(')', '');
				thetotal = thetotal + parseInt(theincrease);
				newdiv += '<tr><td>' + optionname + ": " + thename + '</td><td>$' + parseInt(theincrease) + '.00</td><td></td></tr>';
			}
		}
	if(document.getElementById('theForm').elements[i].type == 'select-one')
	{
			if(document.getElementById('theForm').elements[i][document.getElementById('theForm').elements[i].selectedIndex].value.indexOf('(+') > -1)
			{
				var optionname = document.getElementById('theForm').elements[i].name;
				var theval = document.getElementById('theForm').elements[i].value;
				var thename = theval.substr(0, theval.indexOf('(+')-1);
				var theincrease = theval.substr(theval.indexOf('+')+1, theval.length-2);
				theincrease = theincrease.replace(')', '');
				thetotal = thetotal + parseInt(theincrease);
				newdiv += '<tr><td>' + optionname + ": " + thename + '</td><td>$' + parseInt(theincrease) + '.00</td><td></td></tr>';
			}
	}
	}
	
	newdiv = '<table border=0 cellpadding=0 cellspacing=0><tr><th><strong>Total Price</strong></th><th><span>$' + thetotal + '.00</span></th><th rowspan="10"><img src="http://global2.yumiko-online.com/img/btn_addtobag.png" value="Click here" border="0" onClick="checkForm();" /></th></tr>' + newdiv;
	
	newdiv += '</table>';

    document.getElementById('calctotal').innerHTML = newdiv;
	
}

function quickcalc()
{
	var thetotal = 0;
	var baseprice = document.getElementById('baseprice').value;
	baseprice = baseprice.replace('(', '');
	baseprice = baseprice.replace(')', '');

	thetotal += parseInt(baseprice);
	
	var newdiv = '$' + thetotal + '.00</td></tr>';
	document.getElementById('thePrice').innerHTML = newdiv;
}

