function CheckAll(form) {
	for (var i=0;i<form.elements.length;i++) {
		var e = form.elements[i];
		if (e.name != 'chkall' && e.type=='checkbox')
			e.checked = form.chkall.checked;
	}
}
function SetSubmitImgId(ImgId)
{
	submitImgId = ImgId;
}
function checkf(form){
if (submitImgId == 'realdel')
	{
		if (confirm("您真的要彻底删除这些信息么?"))
			return true;
	}
	else
return false;
}



function checkf(form){
if (submitImgId == 'realdaohuo')
	{
		if (confirm("您确定将所选的货物设置为已到货吗?"))
			return true;
	}
	else
return false;
}	




function checkf(form){	
if (submitImgId == 'realruku')
	{
		if (confirm("您确定将所选的货物入库了吗?"))
			return true;
	}
	else
	return false;
}	





function checkf(form){	
if (submitImgId == 'realqianshou')
	{
		if (confirm("您确定所选的货物已签收了吗?"))
			return true;
	}
	else
	return false;
}	





function checkf(form){
if (submitImgId == 'realfahuo')
	{
		if (confirm("您确定所选的货物已发货了吗?"))
			return true;
	}
	else
	return false;
}



function checkf(form){
if (submitImgId2 == 'realkoukuan')
	{
		if (confirm("您确定所选的货物扣款吗?"))
			return true;
	}
	else
		return false;
}









//刷新验证码









function refreshimg(){document.all.checkcode.src='../include/CheckCode.asp?'+Math.random();}



 
function onlyNum()
{
if(!(event.keyCode==46)&&!(event.keyCode==8)&&!(event.keyCode==37)&&!(event.keyCode==39))
if(!((event.keyCode>=48&&event.keyCode<=57)||(event.keyCode>=96&&event.keyCode<=105)))
event.returnValue=false;
}


   function clearNoNum(event,obj){ 
        //响应鼠标事件，允许左右方向键移动 
        event = window.event||event; 
        if(event.keyCode == 37 | event.keyCode == 39){ 
            return; 
        } 
        //先把非数字的都替换掉，除了数字和. 
        obj.value = obj.value.replace(/[^\d.]/g,""); 
        //必须保证第一个为数字而不是. 
        obj.value = obj.value.replace(/^\./g,""); 
        //保证只有出现一个.而没有多个. 
        obj.value = obj.value.replace(/\.{2,}/g,"."); 
        //保证.只出现一次，而不能出现两次以上 
        obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$","."); 
    } 
    function checkNum(obj){ 
        //为了去除最后一个. 
        obj.value = obj.value.replace(/\.$/g,""); 
    } 

function DigitInput(obj,event) {
   //响应鼠标事件，允许左右方向键移动 
   event = window.event||event; 
        if(event.keyCode == 37 | event.keyCode == 39){ 
            return; 
        } 
        obj.value = obj.value.replace(/\D/g,"");      
}




//

function view(viewid){              
  if (viewid.style.display=="none")
     {
	 viewid.style.display="";
 }

}

function hidden(viewid){              
  if (viewid.style.display=="")
     {
	 viewid.style.display="none";
 }}
