function InsertCart(psItemNo){
	window.open('PlaceOrder.aspx?itemno=' + psItemNo, '', 'status=none,toolbar=none,width=650,height=350,scrollbars=1,resizable=1');
}
function CopyAddress(){
	window.document.frmAddress.txtSAddr1.value = window.document.frmAddress.txtBAddr1.value;
	window.document.frmAddress.txtSAddr2.value = window.document.frmAddress.txtBAddr2.value;
	window.document.frmAddress.txtSCity.value = window.document.frmAddress.txtBCity.value;
	window.document.frmAddress.txtSState.value = window.document.frmAddress.txtBState.value;
	window.document.frmAddress.txtSZip.value = window.document.frmAddress.txtBZip.value;
	window.document.frmAddress.txtSPhone1.value = window.document.frmAddress.txtBPhone1.value;
	window.document.frmAddress.txtSPhone2.value = window.document.frmAddress.txtBPhone2.value;
}
function CopyAddress2(){
	window.document.frmAddress.txtSFirstName.value = window.document.frmAddress.txtBFirstName.value;
	window.document.frmAddress.txtSLastName.value = window.document.frmAddress.txtBLastName.value;
	window.document.frmAddress.txtSCompany.value = window.document.frmAddress.txtBCompany.value;
	window.document.frmAddress.txtSAddress.value = window.document.frmAddress.txtBAddress.value;
	window.document.frmAddress.txtSAddress2.value = window.document.frmAddress.txtBAddress2.value;
	window.document.frmAddress.txtSCity.value = window.document.frmAddress.txtBCity.value;
	window.document.frmAddress.txtSState.value = window.document.frmAddress.txtBState.value;
	window.document.frmAddress.txtSZipCode.value = window.document.frmAddress.txtBZipCode.value;
}
function gotourl(url,sname,swidth,sheight,sreplace,sclose)
{
	var objNewWin;				
	//if (swidth=="") 
	swidth = "1020";
	//if (sheight=="") 
	sheight = "700";
	if (sreplace=="") sreplace = false;
	if (sclose=="") sclose = false;
	objNewWin = window.open(url,sname,"fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=" + swidth + ",height=" + sheight + ",top=0,left=0",sreplace);	
	if (sclose) window.close();
	objNewWin.focus();	
}
function MassUpdate(){
	window.open('inventory_mupdate.aspx', '', 'status=none,toolbar=none,width=540,height=320');
}
function MarkAll(plChecked, psCtlID, pnColumn){
	var inputs; 
	var chkinput;
	inputs = document.getElementById("dgItemList").rows;
	
	for (var i=0; i < inputs.length; i++)
	{
		if (inputs[i].cells[pnColumn].getElementsByTagName("INPUT").length>0)
		{
			chkinput = inputs[i].cells[pnColumn].getElementsByTagName("INPUT")[0];
			if (chkinput.id.indexOf(psCtlID)>-1) {
				chkinput.checked = plChecked;
			}
		}
	}
}
function CheckInput(){
	if(event.keyCode<47 || event.keyCode>57)
		event.returnValue=false;
}

