document.write('<script src="http://moolah.asia/calculators/js/jquery-1.2.6.min.js" type="text/javascript"></script>');
document.write('<script type="text/javascript" src="http://moolah.asia/calculators/js/thickboxtest.js"></script>');
document.write('<link rel="stylesheet" href="http://moolah.asia/calculators/css/thickboxtest.css" type="text/css" media="screen" />');
function Show_Popup(action, userid) {
$('#popup').fadeIn('fast');
$('#window').fadeIn('fast');
}
function Close_Popup() {
$('#popup').fadeOut('fast');
$('#window').fadeOut('fast');
}
function formValidator(){
	// Make quick references to our fields
	
	var input1=document.getElementById('input1');	
	var input2=document.getElementById('input2');	
	var interest=document.getElementById('interest');
		var pension=document.getElementById('pension');
		var other=document.getElementById('other');
			var housing=document.getElementById('housing');
				var food=document.getElementById('food');
					var transportation=document.getElementById('transportation');
						var medical=document.getElementById('medical');
							var education=document.getElementById('education');
								var cc=document.getElementById('cc');
								var childcare=document.getElementById('childcare');
	
	// Check each input in the order that it appears in the form!
	if(isNumericWithDecimal(input1, "Please enter the valid dollar amount for Income 1")){
		if(isNumericWithDecimal(input2, "Please enter the valid dollar amount for Income 2")){			
			if(isNumericWithDecimal(interest, "Please enter the valid dollar amount for interest")){	
			if(isNumericWithDecimal(pension, "Please enter the valid dollar amount for pension")){
				if(isNumericWithDecimal(other, "Please enter the valid dollar amount for other")){
					if(isNumericWithDecimal(housing, "Please enter the valid dollar amount for housing")){
						if(isNumericWithDecimal(food, "Please enter the valid dollar amount for food")){
							if(isNumericWithDecimal(transportation, "Please enter the valid dollar amount for transportation")){
								if(isNumericWithDecimal(medical, "Please enter the valid dollar amount for medical")){
									if(isNumericWithDecimal(education, "Please enter the valid dollar amount for education")){
										if(isNumericWithDecimal(cc, "Please enter the valid dollar amount for creditcard")){
											if(isNumericWithDecimal(childcare, "Please enter the valid dollar amount for childcare")){
			//return true;
							
							calculate();
						
			}}}}}}}}
	}}}}
	
	return false;
	
}


function isNumericWithDecimal(elem, helperMsg){
	var numericExpression = /^[-]?\d*\.?\d*$/;
	if(elem.value.match(numericExpression)){
		elem.style.borderColor='#f5f5f5';
		return true;
		
	}else{
		alert(helperMsg);	
		elem.focus();
		elem.style.borderColor='#e70033';
		return false;
	}
}



function show()
{  
var msg1="<br/>If you get paid once a week, multiply your check amount by 52 and divide by 12 for your monthly income. If you get paid every two weeks, multiply by 26 and divide by 12.<br/><br/>";
document.getElementById('up').style.visibility="visible";
document.getElementById('up').style.display="inline";
document.getElementById('img1').style.display='none';
document.getElementById('msgbox').style.display="block";
document.getElementById('msgbox').style.visibility="visible";
document.getElementById('msgbox').innerHTML=msg1;
}

function  sth()
{
	document.getElementById('msgbox').style.display='none';
	document.getElementById('msgbox').style.visibility='hidden';
	document.getElementById('img1').style.display='inline';
	document.getElementById('up').style.visibility="hidden";
	document.getElementById('up').display='none';
}


function show1()
{
var msg2="<br/>List here any secondary sources of income such as a spouse's income or income from a second job.<br/><br/>";
document.getElementById('msgbox1').style.display="block";
document.getElementById('msgbox1').style.visibility="visible";
document.getElementById('msgbox1').innerHTML=msg2;
document.getElementById('up1').style.visibility="visible";
document.getElementById('up1').style.display="inline";
document.getElementById("down1").style.display="none";
}

function sth1()
{
	document.getElementById('msgbox1').style.display='none';
	document.getElementById('msgbox1').style.visibility='hidden';
	document.getElementById('down1').style.display='inline';
	document.getElementById('up1').style.visibility="hidden";
	document.getElementById('up1').display='none';
}
function show2()
{
	
var msg3="<br/>Include only interest income that can be used to pay for monthly expenses, and not interest earned on retirement accounts or other investments.<br/><br/>";

document.getElementById('msgbox2').style.display="block";

document.getElementById('msgbox2').style.visibility="visible";

document.getElementById('msgbox2').innerHTML=msg3;

document.getElementById('up2').style.visibility="visible";
document.getElementById('up2').style.display="inline";
document.getElementById("down2").style.display="none";
}

function sth2()
{
	document.getElementById('msgbox2').style.display='none';
	document.getElementById('msgbox2').style.visibility='hidden';
	document.getElementById('down2').style.display='inline';
	document.getElementById('up2').style.visibility="hidden";
	document.getElementById('up2').display='none';
}

function show3()
{	
var msg4="<br/>If you receive money from a pension account, enter it here.<br/><br/> ";
document.getElementById('msgbox3').style.display="block";
document.getElementById('msgbox3').style.visibility="visible";
document.getElementById('msgbox3').innerHTML=msg4;
document.getElementById('up3').style.visibility="visible";
document.getElementById('up3').style.display="inline";
document.getElementById("down3").style.display="none";
}

function sth3()
{
	document.getElementById('msgbox3').style.display='none';
	document.getElementById('msgbox3').style.visibility='hidden';
	document.getElementById('down3').style.display='inline';
	document.getElementById('up3').style.visibility="hidden";
	document.getElementById('up3').display='none';
}
function show4()
{	
var msg5="<br/>Include any other regular sources of money (income) that you can include in your monthly financial outlook.<br/><br/>";
document.getElementById('msgbox4').style.display="block";
document.getElementById('msgbox4').style.visibility="visible";
document.getElementById('msgbox4').innerHTML=msg5;
document.getElementById('up4').style.visibility="visible";
document.getElementById('up4').style.display="inline";
document.getElementById("down4").style.display="none";
}

function sth4()
{
	document.getElementById('msgbox4').style.display='none';
	document.getElementById('msgbox4').style.visibility='hidden';
	document.getElementById('down4').style.display='inline';
	document.getElementById('up4').style.visibility="hidden";
	document.getElementById('up4').display='none';
}

function show5()
{	
var msg6="<br/>Your rent/mortgage allowance should include your total monthly spending on housing including insurance, taxes etc.<br/><br/>";
document.getElementById('msgbox5').style.display="block";
document.getElementById('msgbox5').style.visibility="visible";
document.getElementById('msgbox5').innerHTML=msg6;
document.getElementById('up5').style.visibility="visible";
document.getElementById('up5').style.display="inline";
document.getElementById("down5").style.display="none";
}

function sth5()
{
	document.getElementById('msgbox5').style.display='none';
	document.getElementById('msgbox5').style.visibility='hidden';
	document.getElementById('down5').style.display='inline';
	document.getElementById('up5').style.visibility="hidden";
	document.getElementById('up5').display='none';
}

function show6()
{	
var msg7="<br/>Include all food-related expenses including cooking supplies. But don't include money spent on eating at restaurants and that should be included in your entertainment budget.<br/><br/>";
document.getElementById('msgbox6').style.display="block";
document.getElementById('msgbox6').style.visibility="visible";
document.getElementById('msgbox6').innerHTML=msg7;
document.getElementById('up6').style.visibility="visible";
document.getElementById('up6').style.display="inline";
document.getElementById("down6").style.display="none";
}

function sth6()
{
	document.getElementById('msgbox6').style.display='none';
	document.getElementById('msgbox6').style.visibility='hidden';
	document.getElementById('down6').style.display='inline';
	document.getElementById('up6').style.visibility="hidden";
	document.getElementById('up6').display='none';
}

function show7()
{	
var msg8="<br/>This amount is your monthly car loan or lease payment. If your car is already paid off, you can enter zero for the amount.<br/><br/> ";
document.getElementById('msgbox7').style.display="block";
document.getElementById('msgbox7').style.visibility="visible";
document.getElementById('msgbox7').innerHTML=msg8;
document.getElementById('up7').style.visibility="visible";
document.getElementById('up7').style.display="inline";
document.getElementById("down7").style.display="none";
}

function sth7()
{
	document.getElementById('msgbox7').style.display='none';
	document.getElementById('msgbox7').style.visibility='hidden';
	document.getElementById('down7').style.display='inline';
	document.getElementById('up7').style.visibility="hidden";
	document.getElementById('up7').display='none';
}

function show8()
{	
var msg9="<br/>If your medical insurance isn't deducted from your paycheck, include it here. Also include your average monthly expenditures for prescriptions, co-pays and other medical-related payments.<br/><br/>";
document.getElementById('msgbox8').style.display="block";
document.getElementById('msgbox8').style.visibility="visible";
document.getElementById('msgbox8').innerHTML=msg9;
document.getElementById('up8').style.visibility="visible";
document.getElementById('up8').style.display="inline";
document.getElementById("down8").style.display="none";
}

function sth8()
{
	document.getElementById('msgbox8').style.display='none';
	document.getElementById('msgbox8').style.visibility='hidden';
	document.getElementById('down8').style.display='inline';
	document.getElementById('up8').style.visibility="hidden";
	document.getElementById('up8').display='none';
}

function show9()
{	
var msg10="<br/>Include tuition, books, fees and any other educational expenses.<br/><br/>";
document.getElementById('msgbox9').style.display="block";
document.getElementById('msgbox9').style.visibility="visible";
document.getElementById('msgbox9').innerHTML=msg10;
document.getElementById('up9').style.visibility="visible";
document.getElementById('up9').style.display="inline";
document.getElementById("down9").style.display="none";
}

function sth9()
{
	document.getElementById('msgbox9').style.display='none';
	document.getElementById('msgbox9').style.visibility='hidden';
	document.getElementById('down9').style.display='inline';
	document.getElementById('up9').style.visibility="hidden";
	document.getElementById('up9').display='none';
}


function addRow(id){
    	var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];
//alert(tbody.innerHTML);
	//var newk = "<tr><td><input type='text' name='extra_left[]' id='extra_left[]'></td><td><input type='text' name='extra_right[]' id='extra_right[]' onkeyup='total();'></td></tr>";
    	var row = document.createElement("TR")
   	var td1 = document.createElement("TD")
	var box=document.createElement("input");
	box.type = 'text';
	box.id='extra_left[]';
	box.name='extra_left[]';
	
	
	var box1=document.createElement("input");
	box1.type = 'text';
	box1.id='extra_right[]';
	box1.name='extra_right[]';
	box1.size=10;
	box1.onkeyup =function(){total();};
	//box1.onkeyup = 'total()';
	//var b="$".concat(box1);
	
    	td1.appendChild(box)
    	var td2 = document.createElement("TD")
	td2.appendChild (box1)
	
    	row.appendChild(td1);
    	row.appendChild(td2);
    	tbody.appendChild(row);
	//tbody.innerHTML = tbody.innerHTML + newk;
	total();

  }

	
function total (){
//document.getElementById("input9").innerHTML=0;
	var housing=parseFloat(document.getElementById('housing').value);	
	if(isNaN(housing)){
 		housing = parseFloat('0');
      	document.getElementById('housing').value = '';
	}
	var food=parseFloat(document.getElementById('food').value);	
	if(isNaN(food)){
 		food = parseFloat('0');
      	document.getElementById('food').value = '';
	}	  
	var transportation=parseFloat(document.getElementById('transportation').value);	
	if(isNaN(transportation)){
 		transportation = parseFloat('0');
      	document.getElementById('transportation').value = '';
	}	
	var medical=parseFloat(document.getElementById('medical').value);	
	if(isNaN(medical)){
 		medical= parseFloat('0');
      	document.getElementById('medical').value = '';
	}
	var education=parseFloat(document.getElementById('education').value);	
	if(isNaN(education)){
 		education= parseFloat('0');
      	document.getElementById('education').value = '';
	}
	var ckBoxes = document.getElementsByName("extra_right[]");
	var a = 0;
	for(var i=0;i<ckBoxes.length;i++){		
	var temp = parseFloat(ckBoxes[i].value);
		
		if(temp >0){
			temp = parseFloat(temp );	
		}
		else{
			temp = parseFloat('0');
		}	
		a = a + temp;	
	}
	//alert(a);
	var total=housing + food + transportation + medical + education + a ;
	document.getElementById('input9').innerHTML=total.toFixed(2);
  }
function show10()
{	
var msg11="<br/>Include movies, concerts, the ballet, and any money you spend on having a good time. Include money you spend eating at restaurants in this category, not in food expenses.<br/><br/> ";
document.getElementById('msgbox10').style.display="block";
document.getElementById('msgbox10').style.visibility="visible";
document.getElementById('msgbox10').innerHTML=msg11;
document.getElementById('up10').style.visibility="visible";
document.getElementById('up10').style.display="inline";
document.getElementById("down10").style.display="none";
}

function sth10()
{
	document.getElementById('msgbox10').style.display='none';
	document.getElementById('msgbox10').style.visibility='hidden';
	document.getElementById('down10').style.display='inline';
	document.getElementById('up10').style.visibility="hidden";
	document.getElementById('up10').display='none';
} 
function show11()
{	
var msg12="<br/>If you don't pay your entire credit card balance off every month, enter the amount you do pay each month. If you do pay your balance off each month, enter zero for the amount.<br/><br/> ";
document.getElementById('msgbox11').style.display="block";
document.getElementById('msgbox11').style.visibility="visible";
document.getElementById('msgbox11').innerHTML=msg12;
document.getElementById('up11').style.visibility="visible";
document.getElementById('up11').style.display="inline"
document.getElementById("down11").style.display="none";
}

function sth11()
{
	document.getElementById('msgbox11').style.display='none';
	document.getElementById('msgbox11').style.visibility='hidden';
	document.getElementById('down11').style.display='inline';
	document.getElementById('up11').style.visibility="hidden";
	document.getElementById('up11').display='none';
} 
function show12()
{	
var msg13="<br/>Include not only day care but also diapers, formula, and other baby-related expenses.<br/>";
document.getElementById('msgbox12').style.display="block";
document.getElementById('msgbox12').style.visibility="visible";
document.getElementById('msgbox12').innerHTML=msg13;
document.getElementById('up12').style.visibility="visible";
document.getElementById('up12').style.display="inline"
document.getElementById("down12").style.display="none";
}

function sth12()
{
	document.getElementById('msgbox12').style.display='none';
	document.getElementById('msgbox12').style.visibility='hidden';
	document.getElementById('down12').style.display='inline';
	document.getElementById('up12').style.visibility="hidden";
	document.getElementById('up12').display='none';
} 
function addRow1(id){
    var tbody = document.getElementById(id).getElementsByTagName("TBODY")[0];
    var row = document.createElement("TR")
    var td1 = document.createElement("TD")
	var box=document.createElement("input");
	box.type = 'text';
	box.id='extra_left[]';
	box.name='extra_left[]';
	
	
	var box1=document.createElement("input");
	box1.type = 'text';
	box1.id='extra_right[]';
	box1.name='extra_right[]';
	box1.size=10;
box1.onkeyup =function(){flexi();};
	//var b="$".concat(box1);
	
    td1.appendChild(box)
    var td2 = document.createElement("TD")
	 td2.appendChild (box1)
	
    row.appendChild(td1);
    row.appendChild(td2);
    tbody.appendChild(row);
	flexi();

  }	
function flexi()
{
	
document.getElementById("flextotal").innerHTML=0;
var entertainment=parseFloat(document.getElementById('entertainment').value);	
if(isNaN(entertainment)){
 	entertainment = parseFloat('0');
      document.getElementById('entertainment').value = '';
}
var cc=parseFloat(document.getElementById('cc').value);	
if(isNaN(cc)){
 	cc = parseFloat('0');
      document.getElementById('cc').value = '';
}
var childcare=parseFloat(document.getElementById('childcare').value);	
if(isNaN(childcare)){
 	childcare = parseFloat('0');
      document.getElementById('childcare').value = '';
}
var ckBoxes = document.getElementsByName("extra_right[]");
	var a = 0;
	for(var i=0;i<ckBoxes.length;i++){		
	var temp = parseFloat(ckBoxes[i].value);
		
		if(temp >0){
			temp = parseFloat(temp );	
		}
		else{
			temp = parseFloat('0');
		}	
		a = a + temp;	
	}
var t=entertainment + cc + childcare + a;
document.getElementById("flextotal").innerHTML=t.toFixed(2);
}

function calculate()
{

	if(document.getElementById('input1').value=='')
	{
		var input1=0;
	}
	else
	{
	var input1=parseFloat(document.getElementById('input1').value);
	}
	if(document.getElementById('input2').value=='')
	{
		var input2=0;
	}
	else
	{
	var input2=parseFloat(document.getElementById('input2').value);
	}
	if (document.getElementById('interest').value=='')
	{ var interest=0;
	}
	else
	{
	var interest=parseFloat(document.getElementById('interest').value);
	}
	if(document.getElementById('pension').value=='')
	{
		var pension=0;
	}
	else
	{
	var pension=parseFloat(document.getElementById('pension').value);
	}
	if (document.getElementById('other').value=='')
	{ var other=0;
	}
	else
	{
	var other=parseFloat(document.getElementById('other').value);
	}
	var tot= input1 + input2 + interest + pension + other;
	document.getElementById('tincome').innerHTML=tot.toFixed(2);
	document.getElementById('heading').style.display="block";
	document.getElementById('heading').style.visibility="visible";
	document.getElementById("cal").value="Recalculate";	
	
	var flex=parseFloat(document.getElementById('flextotal').innerHTML);
	var fix=parseFloat(document.getElementById('input9').innerHTML);
	
	var totalexpenses= flex + fix;
	document.getElementById('texp').innerHTML=totalexpenses.toFixed(2);
	
	var bottomline=tot-totalexpenses;
	
	if(bottomline>=0)
	{
		document.getElementById('decision').innerHTML="(Saving)";
		document.getElementById('btml').innerHTML=bottomline;
	}
	else if(bottomline<0)
	{
		document.getElementById('decision').innerHTML="(Debt)";
		document.getElementById('btml').innerHTML=Math.abs(bottomline);
	}
	
}
document.write("<div align='center' width='500'>");
document.write("<form  id='form12' onsubmit='return formValidator()' >");
document.write("<table id='tab'><tr><td>");
document.write("<table id='myTable' width='500' style='font-family:Verdana, Geneva, sans-serif;font-size:14px;'>");
document.write("<tbody>");
document.write("<tr>");
document.write("<td colspan='2'>");
document.write("<h2>Rework Your Budget</h2>");
document.write("</td");
document.write("</tr>");
document.write("<tr><td colspan='2' style='border-bottom-style:dotted;border-color:#801bbf;border-width:1px;' class='heading'>");
document.write("Knowing where your money goes is an eye-opening experience and an education in itself. This calculator will help you by tracking your expenses. Keep a log and jot down whatever you spend. In this way, you will be able to take control of your money and your current financial situation.<br/>&nbsp;");
document.write("</td></tr>");
document.write("<tr><td colspan='2'>");
document.write("<font color='#801bbf'><b>Monthly Income</b></font>");
document.write("</td></tr>");
document.write("<tr><td width='75%'>");
document.write("Income #1");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='img1' style='display:visible;cursor:pointer;' onclick='show();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up' style='cursor:pointer;visibility:hidden;' onclick='sth()'>");
document.write("<div id='msgbox' style='visibility:hidden;display:none;'> </div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='input1' size='7'   id='input1'>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Income #2");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down1' style='visibility:visible;cursor:pointer;' onclick='show1()'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png'  id='up1' style='visibility:hidden;cursor:pointer;' onclick='sth1()'>");
document.write("<div id='msgbox1' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text name='input2' size='7' id='input2'>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Interest");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down2' style='visibility:visible;cursor:pointer;' onclick='show2();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up2' style='visibility:hidden;cursor:pointer;' onclick='sth2();'>");
document.write("<div id='msgbox2' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='interest' id='interest' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Pension");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down3' style='visibility:visible;cursor:pointer;' onclick='show3();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up3' style='visibility:hidden;cursor:pointer;' onclick='sth3();'>");
document.write("<div id='msgbox3' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='pension' id='pension' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Other");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down4' style='visibility:visible;cursor:pointer;' onclick='show4();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up4' style='visibility:hidden;cursor:pointer;' onclick='sth4();'>");
document.write("<div id='msgbox4' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='other' id='other' size='7'>");
document.write("</td></tr>");

document.write("<tr><td colspan='2'>");
document.write("<font color='#801bbf'><b>Fixed Monthly Expenses</b></font>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Housing (Rent/Mortage)");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down5' style='visibility:visible;cursor:pointer;' onclick='show5();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up5' style='visibility:hidden;cursor:pointer;' onclick='sth5();'>");
document.write("<div id='msgbox5' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='housing' onkeyup='total()' id='housing' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Food");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down6' style='visibility:visible;cursor:pointer;' onclick='show6();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up6' style='visibility:hidden;cursor:pointer;' onclick='sth6();'>");
document.write("<div id='msgbox6' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='food' onkeyup='total()' id='food' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Transportation (car payment & car insurance)");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down7' style='visibility:visible;cursor:pointer;' onclick='show7();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up7' style='visibility:hidden;cursor:pointer;' onclick='sth7();'>");
document.write("<div id='msgbox7' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='transportation'  onkeyup='total()' id='transportation' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Medical");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down8' style='visibility:visible;cursor:pointer;' onclick='show8();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up8' style='visibility:hidden;cursor:pointer;' onclick='sth8();'>");
document.write("<div id='msgbox8' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='medical'  onkeyup='total()' id='medical' size='7'>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Education");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down9' style='visibility:visible;cursor:pointer;' onclick='show9();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up9' style='visibility:hidden;cursor:pointer;' onclick='sth9();'>");
document.write("<div id='msgbox9' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='education' onkeyup='total()' id='education' size='7'>");
document.write("</td></tr>");
document.write("</tbody></table><table style='font-family:Verdana, Geneva, sans-serif;font-size:14px;'><tbody><tr><td colspan='2'>");
document.write("<INPUT  type='button' value='Add Another Item' id='add' onclick='addRow(\"myTable\");'>");

document.write("</td></tr>");
document.write("</tbody>");
document.write("</table>");
document.write("<table id='t1' width='400' style='font-family:Verdana, Geneva, sans-serif;font-size:14px;'><tr><td width='75%'>");
document.write("Total fixed expenses");
document.write("</td><td>");
document.write("$<div id='input9' style='display:inline'>0.00</div>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Entertainment");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down10' style='visibility:visible;cursor:pointer;' onclick='show10();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up10' style='visibility:hidden;cursor:pointer;' onclick='sth10();'>");
document.write("<div id='msgbox10' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='entertainment'  onkeyup='flexi()' id='entertainment' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Credit Cards");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down11' style='visibility:visible;cursor:pointer;' onclick='show11();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up11' style='visibility:hidden;cursor:pointer;' onclick='sth11();'>");
document.write("<div id='msgbox11' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='cc'  onkeyup='flexi()' id='cc' size='7'>");
document.write("</td></tr>");

document.write("<tr><td>");
document.write("Child care");
document.write("<img src='http://moolah.asia/calculators/img/down.png' id='down12' style='visibility:visible;cursor:pointer;' onclick='show12();'>");
document.write("<img src='http://moolah.asia/calculators/img/up.png' id='up12' style='visibility:hidden;cursor:pointer;' onclick='sth12();'>");
document.write("<div id='msgbox12' style='visibility:hidden;display:none;'></div>");
document.write("</td><td valign='top'>");
document.write("$<input type='text' name='chilccare'  onkeyup='flexi()' id='childcare' size='7'>");
document.write("</td></tr>");
document.write("</table>");
document.write("</td></tr><tr><td>");
document.write("<table style='font-family:Verdana, Geneva, sans-serif;font-size:14px;'><tbody><tr><td colspan='2'>");
document.write("<INPUT  type='button' value='Add Another Item' id='add' onclick='addRow1(\"t1\");'>");

document.write("</td></tr>");
document.write("</tbody>");
document.write("</table>");
document.write("<table width='400' style='font-family:Verdana, Geneva, sans-serif;font-size:14px;'><tr><td width='75%'>");
document.write("Total flexible expenses");
document.write("</td><td>");
document.write("$<div id='flextotal'  style='display:inline;' name='flextotal'>0.00</div>");
document.write("</td></tr>");
document.write("<tr><td colspan='2' align='right'>");
document.write("<input type='submit' id='cal'  value='Calculate'>");
document.write("</td></tr>");
document.write("<tr><td colspan='2'>");
document.write("<div style='visibility:hidden;display:none;' id='heading'>");
document.write("<table width='350' style='font-family:Verdana, Geneva, sans-serif;font-size:14px;'><tr><td colspan='2'>")
document.write("<font color='#801bbf' size='+1'><b>Results</b></font>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Total Income");
document.write("</td><td>");
document.write("$<div  id='tincome' style='display:inline;'></div><br/>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Total expenses");
document.write("</td><td>");
document.write("$<div  id='texp' style='display:inline;'></div><br/>");
document.write("</td></tr>");
document.write("<tr><td>");
document.write("Bottom Line");
document.write("</td><td>");
document.write("$<div id='btml' style='display:inline;'></div> <div id='decision' style='display:inline;'></div>");
document.write("</td></tr>");
document.write("</table>");
document.write("</div>");
document.write("</td></tr>");
document.write("</table>");
document.write("</td></tr></table>");

document.write("<div style='padding-top:2px;background-color:#1b5024;border:#0FC 1px;color:#F00;width:428px;font-family:Verdana, Geneva,sans-serif;font-size:10px;height:20px;'>");
document.write("<a href='http://moolah.asia' id='hyper' target='_blank'>Powered By Moolah.asia</a>");
document.write("<a href='http://moolah.asia/disclaimer.php' style='padding-left:30px;' id='hyper'>Disclaimer</a>");
document.write("<a href='#' style='padding-left:30px;' onmouseover='Show_Popup();' id='hyper'>Embed this Calculator</a>");
document.write("</div>");


document.write("</form>");
document.write("</div>");
document.write("<center><div id='popup' style='background-image:url(http://moolah.asia/calculators/img/bg.png);display:none;width:450px;height:200px;background-repeat:no-repeat;align:center'><div style='padding-top:18px;padding-left:420px;' ><a href='#'  onclick='Close_Popup();' ><img src='http://moolah.asia/calculators/img/x.png' border='0'></a></div><div style='padding-left:10px;text-align:left;padding-left:15px;padding-right:15px;'>To embed this calculator into your site copy the following text and paste it into your HTML page:<br/><br/><textarea cols='50' rows='2'><script language='javascript' src='http://moolah.asia/calculators/reworkbudget.js'></script></textarea></div></div></center>");

