<!--
function newpage(htmlurl,top,left,width,height)
{
	var strtemp=",top="+top;
	strtemp=strtemp+",left=";
	strtemp=strtemp+left;
	strtemp=strtemp+",width=";
	strtemp=strtemp+width;
	strtemp=strtemp+",height=";
	strtemp=strtemp+height;
	var newwin=window.open(htmlurl,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no"+strtemp);
	newwin.focus();
	return false;
}

function CheckIsNull(obj,msg)
{
	if(obj.value=="")
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;
}
function CheckIsNumeric(obj,msg)
{
	var reg=/^[0,1,2,3,4,5,6,7,8,9,.]*$/
	if(!reg.exec(obj.value))
	{
		alert(msg);
		obj.focus();
		return false;
	}
	return true;
}
function checkImage(sId,obj)
				{
					if(document.all[sId].value!="")
					{
						if(( document.all[sId].value.indexOf(".gif") == -1) && (document.all[sId].value.indexOf(".jpg") == -1)&& (document.all[sId].value.indexOf(".jpeg") == -1)&& (document.all[sId].value.indexOf(".GIF") == -1)&& (document.all[sId].value.indexOf(".JPG") == -1)&& (document.all[sId].value.indexOf(".JPEG") == -1) && (document.all[sId].value.indexOf(".BMP") == -1) && (document.all[sId].value.indexOf(".bmp") == -1)) {
						  alert("请选择要上传的图片(格式为GIF或JPG)文件！");
						  obj.focus();
						  event.returnValue = false;
							return false
						  }
						  document.all["a"+sId].value="1";
				    }
				    else
				    {
						document.all["a"+sId].value="0";
				    }
				    return true;
				}
function checkfloat(sId)
			{
				if(isNaN(sId.value))
				{
					alert("非法输入，输入格式应该为小数（如：xxxx.xx,123.40）！");
					while(isNaN(sId.value))
						sId.value=sId.value.substring(0,sId.value.length-1);
					return false;
				}
			}
function View(simg,stplj)
	{
		if(document.all[stplj].value=="")
		{
			document.all[simg].src="img/nullpic.gif";
		}
		else
		{
			document.all[simg].src=document.all[stplj].value;
		}
	}
function CheckAll(form) 
   {
				  for (var i=0;i<form.elements.length;i++)    {
				    var e = form.elements[i];
				    if (e.name != 'chkall')       e.checked = form.chkall.checked; 
				   }
	}
function EnterTab()
{
	if(event.keyCode == 13)event.keyCode = 9;
}

function CloseWin()
{
	var ua=navigator.userAgent
	var ie=navigator.appName=="Microsoft Internet Explorer"?true:false
	if(ie){
	    var IEversion=parseFloat(ua.substring(ua.indexOf("MSIE ")+5,ua.indexOf(";",ua.indexOf("MSIE "))))
	 if(IEversion< 5.5){
	    var str  = '<object id=noTipClose classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">'
	    str += '<param name="Command" value="Close"></object>';
	    document.body.insertAdjacentHTML("beforeEnd", str);
	    document.all.noTipClose.Click();
	    }
	    else{
	    window.opener =null;
	    window.close();
	    }
	}
	else
	{
	window.close()
	}
}

function checkboxselect(itemname,checkstatus) {
	if(!itemname) 
		return;
	if(!itemname.length) {
		itemname.checked=checkstatus;
	}
	else
	{
		for(var i=0;i<itemname.length;i++)
		{itemname[i].checked=checkstatus;}
	}
}
function checkboxselect1(itemname,checkstatus) {
	if(!itemname) 
		return;
	if(!itemname.length) {
		itemname.checked=checkstatus;
	}
	else
	{
		for(var i=0;i<itemname.length;i++)
		{	
			itemname[i].checked=!itemname[i].checked;
		}
	}
}
//-->