function OpenWindow(Url,Width,Height,WindowObj)
{
	var ReturnStr=showModalDialog(Url,WindowObj,'dialogWidth:'+Width+'pt;dialogHeight:'+Height+'pt;status:no;help:no;scroll:no;');
	return ReturnStr;
}

function SetParentCust(parentwindow,cname,csex,caddr,ctel,cemail,ccompany,cid)
{
    parentwindow.form1.txtCustName.value=(cname);
    parentwindow.form1.ddlCustSex.value=(csex);
    parentwindow.form1.txtCustAddr.value=(caddr);
    parentwindow.form1.txtCustTel.value=(ctel);
    parentwindow.form1.txtCustEmail.value=(cemail);
    parentwindow.form1.txtCustCompany.value=(ccompany);
    parentwindow.form1.hfCustId.value=cid;
    self.close();
}

function newCustomer()
{
            form1.txtCustName.value="";
            form1.txtCustAddr.value="";
            form1.ddlCustSex.value="男";
            form1.txtCustEmail.value="";
            form1.txtCustTel.value="";
            form1.txtCustCompany.value="";   
            form1.hfCustId.value="0";        
}  
   function checkNumber()//只能输入数字
        {
            if(event.keyCode==8||event.keyCode==46)
            {
                return true; 
            }

            
            if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105))) //考虑小键盘上的数字键 
             event.returnValue=false; 

 
        }         

