function delBorder(obj) {
	obj.style.borderStyle = "solid";
}
function addRows(n) {
	for (i = 0;i < n;i++) {
		addRow();
	}
}
function addRow() {
	obj = document.getElementById("tablePcs");
	nRow = obj.rows.length;
	rowNew = obj.insertRow(nRow);
	cell1 = rowNew.insertCell(0);
	el = document.createElement("input");
	el.type = "text";
	el.name = "desc" + nRow;
	el.size = 45;
	setStyle(el);
	cell1.bgColor = "#B9E4FF";
	cell1.appendChild(el);
	
	cell2 = rowNew.insertCell(1);
	el = document.createElement("input");
	el.type = "text";
	el.name = "length" + nRow;
	el.size = 6;
	setStyle(el);
	el.style.textAlign = "right";
	cell2.bgColor = "#B9E4FF";
	cell2.appendChild(el);
	
	cell3 = rowNew.insertCell(2);
	el = document.createElement("input");
	el.type = "text";
	el.name = "width" + nRow;
	el.size = 6;
	setStyle(el);
	el.style.textAlign = "right";
	cell3.style.background-color = "#B9E4FF";
	cell3.appendChild(el);
	
	cell4 = rowNew.insertCell(3);
	el = document.createElement("input");
	el.type = "text";
	el.name = "height" + nRow;
	el.size = 6;
	setStyle(el);
	el.style.textAlign = "right";
	cell4.bgColor = "#B9E4FF";
	cell4.appendChild(el);
	
	el = document.createElement("select");
	el.options[0] = new Option('Inch.','Inch.');
	el.options[1] = new Option('Cm.','Cm.');
	el.name = "type" + nRow;
	cell4.appendChild(el);
	
	cell5 = rowNew.insertCell(4);
	el = document.createElement("input");
	el.type = "text";
	el.name = "weight" + nRow;
	el.size = 6;
	setStyle(el);
	el.style.textAlign = "right";
	cell5.bgColor = "#B9E4FF";
	cell5.appendChild(el);
	
	cell6 = rowNew.insertCell(5);
	el = document.createElement("input");
	el.type = "text";
	el.name = "quantity" + nRow;
	el.size = 6;
	setStyle(el);
	el.style.textAlign = "right";
	cell6.bgColor = "#B9E4FF";
	cell6.appendChild(el);

	//obj.rows[nRow].cells[0].innerHTML("<input type='text' size='42' name='order" + nRow + "' class='textQuote2'>");
}
function setStyle(el) {
	el.style.backgroundColor = "#DEF3F8";
	el.style.borderBottomStyle = "solid";
	el.style.borderBottomColor = "#B9E4FF";
	el.style.borderBottomWidth = "1px";
	el.style.borderLeftStyle = "solid";
	el.style.borderLeftColor = "#B9E4FF";
	el.style.borderLeftWidth = "1px";
	el.style.borderRightStyle = "solid";
	el.style.borderRightColor = "#B9E4FF";
	el.style.borderRightWidth = "1px";
	el.style.borderTopStyle = "solid";
	el.style.borderTopColor = "#B9E4FF";
	el.style.borderTopWidth = "1px";
	el.style.color = "#2877A7";
}
function checkForm() {
	bCheck = false;
	if (form1.origin.value == "") bCheck = true;
	if (form1.destination.value == "") bCheck = true;
	if (form1.sname.value == "") bCheck = true;
	if (form1.scompany.value == "") bCheck = true;
	if (form1.saddr.value == "") bCheck = true;
	if (form1.scity.value == "") bCheck = true;
	if (form1.sstate.value == "") bCheck = true;
	if (form1.scountry.value == "") bCheck = true;
	if (form1.semail.value == "") bCheck = true;
	if (form1.raddr.value == "") bCheck = true;
	if (form1.rcity.value == "") bCheck = true;
	if (form1.rstate.value == "") bCheck = true;
	if (form1.rcountry.value == "") bCheck = true;
	if (!form1.inland.checked && !form1.air.checked && !form1.sea.checked && !form1.cubic.checked && !form1.con20.checked && !form1.con40.checked) bCheck = true;
	if (bCheck) {
		alert("Please input all require field");
		return false;
	}
	return true;
}