
<!--
//去除串的前后空格
function trim(s)
 {
      var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
      return (m == null) ? "" : m[1];
 }
 //匹配数字，可以包括小数点
 function CheckNum(txtArea)
{
	var temp;
	var reg;
	reg =/[0-9]+\.[0-9]+/;
	reg2 = /\D/;
	temp = txtArea;
	if (reg.test(temp) || !reg2.test(temp))
	{
		return true;
	}
	else
	{
		return false;
	}	
}
//完全匹配数字，若含非数字字符返回false；否则返回true;
function checkNumVer2(number)
{
	var reg = /\D/;
	if(reg.test(number))
	{
		//说明含有非数字字符
		return false;
	}
	else
	{
		return true;	
	}
}
//将双字数字改为单字节
function replaceDoubleByte(strNum)
{
	var strTemp;
	var i;
	i = 0;
	strTemp = strNum;
	//strTemp = strTemp.replace("","1234567890.");
	for(i =0 ;i<strTemp.length;i++)
	{
		strTemp = strTemp.replace("１","1");
		strTemp = strTemp.replace("２","2");
		strTemp = strTemp.replace("３","3");
		strTemp = strTemp.replace("４","4");
		strTemp = strTemp.replace("５","5");
		strTemp = strTemp.replace("６","6");
		strTemp = strTemp.replace("７","7");
		strTemp = strTemp.replace("８","8");
		strTemp = strTemp.replace("９","9");
		strTemp = strTemp.replace("０","0");
		strTemp = strTemp.replace("。",".");
	}
	return strTemp;
}
//将特殊字符由双字节改为单字,过滤字符
function replaceSingleByte(strSpecial)
{
	var strTemp;
	var i;
	i = 0;
	strTemp = strSpecial;
	for(i = 0;i<strTemp.length;i++)
	{
		strTemp = strTemp.replace("@","＠");
		strTemp = strTemp.replace("-","－");
		strTemp = strTemp.replace(">","＞");
		strTemp = strTemp.replace("<","＜");
		strTemp = strTemp.replace("?","？");
		strTemp = strTemp.replace("'","＇");
		strTemp = strTemp.replace("&","＆");
		strTemp = strTemp.replace(";","；");
	}
	return strTemp;
	
}

//-->
function openwindow(url,name,iWidth,iHeight)
 {
      var url;                                 //转向网页的地址;
      var name;                           //网页名称，可为空;
      var iWidth;                          //弹出窗口的宽度;
      var iHeight;                        //弹出窗口的高度;
      var iTop = (window.screen.availHeight-30-iHeight)/2;       //获得窗口的垂直位置;
      var iLeft = (window.screen.availWidth-10-iWidth)/2;           //获得窗口的水平位置;
      window.open(url,name,'height='+iHeight+',innerHeight='+iHeight+',width='+iWidth+',innerWidth='+iWidth+',top='+iTop+',left='+iLeft+',toolbar=no,menubar=no,scrollbars=1,resizeable=no,location=no,status=no');
 }
 
 function showDialogWindow(url,name,iWidth,iHeight)
 {
      var url;                                 //转向网页的地址;
      var name;                           //网页名称，可为空;                      //弹出窗口的高度;
      var iTop = (window.screen.availHeight-30-iHeight)/2;       //获得窗口的垂直位置;
      var iLeft = (window.screen.availWidth-10-iWidth)/2;           //获得窗口的水平位置;
      window.showModalDialog(url,"","dialogWidth:"+iWidth+";dialogHeight:"+iHeight+";");
 }
 function setheight(head) 
{ 
    window.parent.document.getElementById("tdLeft").style.height=document.body.scrollHeight - 80;
    window.parent.document.getElementById("iframe1").style.height=document.body.scrollHeight;  
    window.parent.document.getElementById("lblLacation").innerHTML = head;//"";
}