// JavaScript Document
function calculate(){
	$.post(PAGE_SELF, { func: "calculatePHP", C9:$("#C9").val(), C10:$("#C10").val(), C11:$("#C11").val(), C12:$("#C12").val(), C13:$("#C13").val()}, 
		function(data){
			rawDataArr = data.split(delObj);
			data=new Object();
			for (i=0;i<rawDataArr.length;i++){
				rawLocalDataArr = rawDataArr[i].split(delFld); 	
				eval("data."+rawLocalDataArr[0]+" = '" + rawLocalDataArr[1] + "';");
			}
			$("#span_A21").html($("#C9").val());
			$("#C22").val(formatFixed(data.C22,2)); 
			$("#C23").val(formatFixed(data.C23,3)); 
			$("#C24").val(formatFixed(data.C24,2)); 
			$("#C25").val(formatFixed(data.C25,3)); 
			$("#C28").val(formatFixed(data.N3,2)); 
			$("#C29").val(formatFixed(data.N4,4)); 
			$("#C30").val(formatFixed(data.N5,3)); 
			$("#C31").val(formatFixed(data.N6,2)); 
			$("#C32").val(formatFixed(data.N7,2)); 
			$("#C35").val(formatFixed(data.N8,2)); 
			$("#C36").val(formatFixed(data.N9,2)); 
			$("#C37").val(formatFixed(data.N10,2)); 
			$("#C40").val(formatFixed(data.N11,2)); 
			$("#C41").val(formatFixed(data.N12,2));
			$("#ASCE705I_WT_MT_ST_Shapes_tbl1 tr:nth-child(7) td:nth-child(2)").html("d="+data.C22).css("text-align","left");
			$("#ASCE705I_WT_MT_ST_Shapes_tbl1 tr:nth-child(8) td:nth-child(2)").html("tw="+data.C23).css("text-align","left").css("padding-left","35px");
			$("#ASCE705I_WT_MT_ST_Shapes_tbl1 tr:nth-child(2) td:nth-child(3)").html("tf="+data.C25).css("text-align","left").css("padding-left","10px");
			$("#ASCE705I_WT_MT_ST_Shapes_tbl1 tr:nth-child(7) td:nth-child(4)").html("Dc="+data.N8).css("text-align","right");
			$("#ASCE705I_WT_MT_ST_Shapes_tbl1 tr:nth-child(1) td:nth-child(2)").html("bf="+data.C24).css("text-align","center").css("padding-left","25px");
		}
	, "text");
}
