function precountwk(amount_obj) {
	amount = Math.floor(parseFloat(amount_obj.value));
	if (isNaN(amount)) {amount = 0;}
	var amt_obj = MM_findObj('itam');
	var price_obj = MM_findObj('itpr');
	var binding_obj = MM_findObj('itbi');
	//var subtot_obj = MM_findObj('itst');
	var wk_subtot_obj = MM_findObj('wkst');
	//var wk_tot_obj = MM_findObj('wktot');
	var price = 1*price_obj.firstChild.nodeValue;
	var binding = 1*binding_obj.firstChild.nodeValue;
	MM_changeProp('itam','','innerHTML',amount*binding,'SPAN');
	var stotal = 1*amount*binding*price;
	var wkst = 1*wk_subtot_obj.firstChild.nodeValue;
	var total = 1*stotal+wkst;
	MM_changeProp('itst','','innerHTML',stotal.toFixed(2),'SPAN');
	MM_changeProp('wktot','','innerHTML',total.toFixed(2),'SPAN');
}
function setFormVal(thename, thevalue) {
	var obj = MM_findObj(thename);
	if (thevalue>0) {
		var theval = 0;
		var thelen = obj.length;
		for (i=0;i<thelen;i++) {
			theval = obj.options[i].value;
			if (theval==thevalue) {break;}
		}
		MM_changeProp(thename,'','selectedIndex',i,'SELECT');
	}
}
function changeTab(thetab, tabs) {
	thetabs = tabs.split(',');
	for (i=0;i<thetabs.length;i++) {
		MM_changeProp(thetabs[i],'','style.display','none','DIV');
	}
	MM_changeProp(thetab,'','style.display','block','DIV');
}
function sw_divview (a, b) {
	var div_a = document.getElementById(a);
	var div_b = document.getElementById(b);
	div_a.style.display='none';
	div_b.style.display='block';
}
