function sameinfo() {
		var formObj = document.thisform;
		if(formObj.same_check.checked) {
			formObj.name2.value = formObj.name1.value;
			formObj.company2.value = formObj.company1.value;
			formObj.email2.value = formObj.email1.value;
			formObj.street2.value = formObj.street1.value;
			formObj.city2.value = formObj.city1.value;
			formObj.state2.value = formObj.state1.value;
			formObj.zipcode2.value = formObj.zipcode1.value;
			formObj.country2.value = formObj.country1.value;
			formObj.telephone2.value = formObj.telephone1.value;
		} else {
			/*
			formObj.name2.value = '';
			formObj.company2.value = '';
			formObj.email2.value = '';
			formObj.street2.value = '';
			formObj.city2.value = '';
			formObj.state2.value = '';
			formObj.zipcode2.value = '';
			formObj.country2.value = '';
			formObj.telephone2.value = '';
			*/
		}
	}
	
	function addfield() {
		var tNum = parseInt(document.thisform.item_num.value) + 1;
		document.getElementById('item_extra').innerHTML +=	'<table cellspacing=0 cellpadding=3 width=100% border=0>   <tbody>   <tr>   <td width=12%>   <input class=inputbox name=item'+tNum+' /></td>   <td width=21%>   <input class=inputbox name=itemname'+tNum+' /></td>   <td width=12%>   <input class=inputbox name=itemcolor1_'+tNum+' /></td>   <td width=13%>   <input class=inputbox name=itemcolor2_'+tNum+' /></td> <td width=15%>   <input class=inputbox name=itemcolor3_'+tNum+' /></td> <td width=15%>   <input class=inputbox name=itemcolor4_'+tNum+' /></td>  <td width=12%>   <input class=inputbox style="TEXT-ALIGN: center" name=qty'+tNum+' /></td>      </tr>  </tbody>  </table>';		
		document.thisform.item_num.value = tNum;
	}
	
	function checkPrice(thisObj) {
		unit_price = parseFloat(thisObj.value);
		if(unit_price)
		thisObj.value = unit_price.toFixed(2);
	}
	
	function shipping_price(tNum, sAmt) {
		var shipArray = [];
		shipArray[1] = ['15', '18', '0'];
		shipArray[2] = ['17', '20', '0'];
		shipArray[3] = ['19', '25', '29'];
		shipArray[4] = ['21', '27', '33'];
		shipArray[5] = ['34', '39', '45'];
		shipArray[6] = ['39', '47', '52'];
		var rShip = 0;
		
		if(sAmt>125) {
			rShip = shipArray[tNum][2];
		} else if(sAmt>100) {
			rShip = shipArray[tNum][1];
		} else {
			rShip = shipArray[tNum][0];
		}
		return rShip;
		
	}
	
	function checkTotal() {
		var tot_item = document.thisform.item_num.value;
		var formObj = document.thisform;
		var sub_total = 0;
		var item_price = 0;
		var shiptype = formObj.shippingtype.value;
		var tax = 0;
		var tot_ship = 0;
		var tot_qty = 0;
		var grand_tot = 0;
		for(i=1;i<=tot_item;i++) {
			if(eval("formObj.qty"+i).value && eval("formObj.price"+i).value) {
				item_price = parseFloat(eval("formObj.qty"+i).value)*parseFloat(eval("formObj.price"+i).value);
				eval("formObj.totalprice"+i).value = item_price.toFixed(2);
				sub_total = sub_total + item_price;
				tot_qty = tot_qty + parseFloat(eval("formObj.qty"+i).value);
				formObj.subtotal.value = sub_total.toFixed(2); ;
			}
		}
		
		tot_ship = parseInt(shipping_price(shiptype, sub_total));
		
		if(formObj.isca.checked) tax = (sub_total * 0.0925).toFixed(2);
		formObj.tax.value = tax;
		formObj.shipping.value = tot_ship.toFixed(2);
		formObj.grandtotal.value = (parseFloat(sub_total) + parseFloat(tax) + parseFloat(tot_ship)).toFixed(2);
		
	}
	
	function OpenPrintWin() {
		printDiv = document.getElementById('OrderDocument').innerHTML;
		if(window.orderPopup != undefined) window.orderPopup.close();
		
		orderPopup = window.open('about:blank','OrderDoc','width=780,height=800, toolbar=0,menubar=0,resizable=yes,scrollbars=1');
		orderPopup.document.writeln('<html><title>Mail Order Form</title>'
		+ '<body topmargin="10" rightmargin="0" leftmargin="0" bgcolor="#FFFFFF">'
		+ printDiv
		+ '<center><input type=button value=" Print " onClick="self.print();"></center></body></html>');
		orderPopup.focus();
		orderPopup.location.reload();
		
	}
	var initFormValue = 0;
