
/**-- \u53bb\u6389\u5b57\u7b26\u4e32\u5934\u7a7a --**/
function LTrim(strSource)
{
	while (strSource.substr(0,1) == ' ')
 		strSource = strSource.substring(1,strSource.length);
	return(strSource)

}

/**-- \u53bb\u6389\u5b57\u7b26\u4e32\u5c3e\u7a7a --**/
function RTrim(strSource)
{
	while (strSource.substr(strSource.length-1,1) == ' ')
		strSource = strSource.substring(0,strSource.length-1);
 	return(strSource);
}

/**-- \u53bb\u6389\u5b57\u7b26\u4e32\u5934\u7a7a\u548c\u5c3e\u7a7a --**/
function Trim(strSource)
{
	strSource = LTrim(strSource);
	strSource = RTrim(strSource);
	return(strSource);
}

 /**-- \u5224\u65ad\u662f\u5426\u6570\u5b57,\u8fd4\u56detrue/false --**/
function isNumeric(strSource)
 {
	var bRet=true;
	var CH_DOT = ".";
	var iCountDot = 0;
	if ( isNaN(parseInt(strSource)) )
		return false;
	if (strSource == "" || strSource == null)
		bRet=true
	else
	{
		strSource = strSource + "";
		for (var i=0; i< strSource.length; i++)
		{
			var ch = strSource.charAt(i)
			if (ch == CH_DOT)
			{
				iCountDot ++ ;
				if (iCountDot > 1)
				{
					bRet = false;
					break;
				}
			}
			else
				bRet = ! isNaN(parseFloat(ch));

			if ( !bRet )
				break;
		}
	}

	return(bRet);
 }
 /**-- \u5224\u65ad\u662f\u5426\u6574\u578b,\u8fd4\u56detrue/false --**/
function IsInteger(strSource )
{
	if(strSource == null )
		return false;
	strSource = Trim( String(strSource));
	var bRet = true;
	var integer = parseInt(strSource);
	if (isNaN(integer))
	{
	  return false;
	}
	if( String(integer).toString().length < Trim(strSource).length)
		return false;
	return(true );
}
/**-- 2004.01.15 she. \u7528\u4e8e\u5224\u65ad\u5c5e\u6027\u5b9a\u5236\u4e2d\uff0c\u6d6e\u70b9/\u6574\u5f62\u6570
//\u53ef\u4ee5\u662f\u6b63\u6570\uff0c\u4e5f\u53ef\u4ee5\u662f\u8d1f\u6570 --**/
function isNumericAddOrPlus(strSource,bFloat)
 {
	var bRet=true;
	var CH_DOT = ".";
        var CH_PLUS = "-";
	var iCountDot = 0;
	if ( isNaN(parseInt(strSource)) )
		return false;
	if (strSource == "" || strSource == null)
		bRet=true
	else
	{
		strSource = strSource + "";
		for (var i=0; i< strSource.length; i++)
		{
			var ch = strSource.charAt(i)
			if (bFloat == true && ch == CH_DOT) {
				iCountDot ++ ;
				if (iCountDot > 1) {
					bRet = false;
					break;
				}
			}
			else {
                                if ( i == 0 && ch==CH_PLUS ) {
                                } else {
				    bRet = ! isNaN(parseFloat(ch));
                                }
			}

			if ( !bRet )
				break;
		}
                if ( strSource.charAt(strSource.length-1) == CH_DOT ) {
                    bRet = false;
                }
	}

	return(bRet);
 }
function FillChar(strSource,chFill,iWidth)
{
	var iLength = strSource.length;
	for (var i = 0; i < iWidth - iLength ; i ++)
	{
		strSource = chFill + strSource;
	}
	return(strSource)
}

function goSubmit(oForm,strMethod,strActionURL)
{
	oForm.method = strMethod;
	oForm.action = strActionURL;
	oForm.submit();
}

function fnSetComboBox(oComboBox,value)
{
    try {
	for (var i = 0; i < oComboBox.options.length; i ++)
	{
		if (oComboBox.options(i).value == value)
		{
			oComboBox.selectedIndex = i;
			break;
		}
	}
    } catch (e) {}
	/**-- \u5f3a\u5236\u6fc0\u53d1onchange\u4e8b\u4ef6  IE5.5
	//oComboBox.fireEvent("onchange"); --**/
}

function fnAddComboBoxOption(oComboBox,strOptionValue,strInnerText)
{
		var oOption = document.createElement("OPTION");
		oComboBox.options.add(oOption);
		oOption.value = strOptionValue ;
		oOption.innerText = strInnerText;
}

function fnSetCheckBox(oCheckBox,value)
{
    try {
	if (value!=0)
		oCheckBox.checked = true;
	else
		oCheckBox.checked = false;
    } catch (e) {}
	/**-- \u5f3a\u5236\u6fc0\u53d1onclick\u4e8b\u4ef6  IE5.5
	//oCheckBox.fireEvent("onclick"); --**/
}

function fnSetTextBox(oTextBox,value)
{
    try {
	oTextBox.value = TurnToClientValue(value);
    } catch (e) {}
	/**-- \u5f3a\u5236\u6fc0\u53d1onchange\u4e8b\u4ef6   IE5.5
	//oTextBox.fireEvent("onchange"); --**/
}

function fnCheckAll(oCheckbox,bChecked)
{
    var i;
	try {
    if (oCheckbox !=null)
    {
		oCheckbox.checked = bChecked;
		for (i = 0; i < oCheckbox.length; i++)
                 if (oCheckbox[i].disabled == false)
			oCheckbox[i].checked=bChecked;
	}
	} catch(e) {}
	return(true);
}

/**-- \u5224\u65ad\u662f\u5426\u4e3a\u7279\u6b8a\u5b57\u7b26 --**/
function IsCorrectName(strName)
{
	/**-- var strNotCorrectName=new String("~`|^&=+?") --**/
	var strNotCorrectName=new String("#");

	for ( i = 0; i < strNotCorrectName.length; i++ )
	{
		if ( strName.indexOf(strNotCorrectName.substring(i,i+1)) > -1 )
		return false;
	}
	/**-- var strFirst = Trim(strName.substring( 0,1 ));
	if ( strFirst == '-' || strFirst == '_' )
	{
		return false;
	} --**/
	return true;
}
/**-- \u5224\u65ad\u662f\u5426\u4e3a\u7279\u6b8a\u5b57\u7b26 \u51cf\u5c11\u7279\u6b8a\u5b57\u7b26\u7684\u5b9a\u4e49\u6570\u91cf \u4ee5\u4fbf\u6ee1\u8db3\u66f4\u591a\u7684\u8981\u6c42 --**/
function IsCorrectNameRelaxer(strName)
{
	var strNotCorrectName=new String("#><';\\\"\(\)")
	for ( i = 0; i < strNotCorrectName.length; i++ )
	{
		if ( strName.indexOf(strNotCorrectName.substring(i,i+1)) > -1 )
		return false;
	}
	var strFirst = Trim(strName.substring( 0,1 ));
	if ( strFirst == '-' || strFirst == '_' )
	{
		return false;
	}
	return true;
}
/**-- \u5224\u65ad\u662f\u5426\u4e3a\u7279\u6b8a\u5b57\u7b26 \u6536\u85cf\u5939\u4e13\u75282003.12.12\u65e5\u589e\u52a0 --**/
function IsCorrectNameOfFolder(strName)
{
	var strNotCorrectName=new String("'\\\"#%&+")
	for ( i = 0; i < strNotCorrectName.length; i++ )
	{
		if ( strName.indexOf(strNotCorrectName.substring(i,i+1)) > -1 )
		return false;
	}
        /**--
	var strFirst = Trim(strName.substring( 0,1 ));
	if ( strFirst == '-' || strFirst == '_' )
	{
		return false;
	}
        --**/
	return true;
}

/**-- \u7528\u6237ID\u5224\u65ad\u7279\u6b8a\u5b57\u7b26 --**/
function IsCorrectUserID(strName)
{
	var paramStr = strName;
	var ilength = paramStr.length;
	var ch;
	for (var i=0; i<ilength; i++) {
		ch = paramStr.charAt(i);
		if (ch >= 'a' && ch <= 'z') {
			continue;
		 }
		 else if (ch >= 'A' && ch <= 'Z') {
			continue;
		 }
		 else if (ch >= '0' && ch <= '9') {
			continue;
		 }
		 /**-- else if (ch == '_') {
		 //	continue;
		 //} --**/
		 else {
			return false;
		 }
	 }
	 return true;

}

/**-- \u5220\u9664\u7279\u6b8a\u5b57\u7b26\uff08\u5305\u62ec\u6c49\u5b57\uff09 \u7ef4\u62a4\u8005\uff1alhz --**/
function DelSpecCode(strInputText)
{
	if (strInputText !="")
	{
		var wrongCode = /\W/ig;
		var flag = wrongCode.test(strInputText);
		if (flag)
		{
			var returnVaule = strInputText.replace(wrongCode,"");
			return(returnVaule);
		}
		else
		{
			return(strInputText);
		}
	}
	else
	{
		return("");
	}

}
/**-- \u5220\u9664\u82f1\u6587\u5b57\u7b26 \u7ef4\u62a4\u8005\uff1alhz --**/
function DelEnCode(strInputText)
{
	if (strInputText !="")
	{
		var wrongCode = /[A-Z_]/ig;
		var flag = wrongCode.test(strInputText);
		if (flag)
		{
			var returnVaule = strInputText.replace(wrongCode,"");
			return(returnVaule);
		}
		else
		{
			return(strInputText);
		}
	}
	else
	{
		return("");
	}
}

/**-- \u5224\u65ad\u65e5\u671f\u8f93\u5165\u662f\u5426\u6b63\u786e\u51fd\u6570,\u5f62\u5f0f\u201c%%%%-%%(%)-%%(%)\u201d \u7ef4\u62a4\u8005\uff1alhz --**/
function IscorrectDate(strCText)
{
	var dateLength = strCText.length;
	var dateSign = /\-/ig;
	var strDate = new String(strCText);
	/**-- \u5224\u65ad\u201c\uff0d\u201d\u7684\u4e2a\u6570\u662f\u5426\u4e3a\u201c2\u201d --**/
	var dateSignNum = strDate.match(dateSign);
	if (dateSignNum ==null || dateSignNum.length !="2")
	{
		alert("\u65e5\u671f\u7684\u586b\u5199\u4e0d\u7b26\u5408\u5f62\u5f0f\uff1a2001-01-01\u3002");
		return(false);
	}
	/**-- \u5224\u65ad\u8f93\u5165\u662f\u5426\u4e3a\u6570\u5b57 --**/
	var iNumberDate = strDate.replace(dateSign,"");
	if ( !isNumeric(iNumberDate))
	{
		alert("\u586b\u5199\u7684\u65e5\u671f\u4e2d\u4e0d\u5e94\u8be5\u542b\u6709\u201c\u6570\u5b57\u201d\u548c \u201c-\u201d \u4ee5\u5916\u7684\u5b57\u7b26\uff01");
		return(false);
	}

	/**-- \u627e\u51fa\u201c\uff0d\u201d\u7684\u4f4d\u7f6e --**/
	var l= strDate.length;
	var f = strDate.indexOf("-");
	{
		if (f !=4)
		{
			alert("\u8bf7\u8f93\u5165\u56db\u4f4d\u5e74\u4efd\uff01");
			return(false);
		}
	}
	var tempDate = strDate.substring((f+1),l);
	var tempPos = tempDate.indexOf("-");
	var s = tempPos + 5;
	var strMonth = strCText.substring((f+1),s);
	if (strMonth.length > 2 || strMonth.length < 1)
	{
		alert("\u8bf7\u8f93\u5165\u4e24\u4f4d\u6708\u4efd\uff01");
		return(false);
	}
	var strYear = strCText.substring((s+1),l);
	if (strYear.length > 2 || strYear.length < 1)
	{
		alert("\u8bf7\u8f93\u5165\u4e24\u4f4d\u6708\u65e5\uff01");
		return(false);
	}

	/**-- \u5224\u65ad\u5e74\u4efd\u662f\u5426\u4e3a1920\uff0d2020\u5e74 --**/
	if ((strCText.substring(0,f) < 1920) || (strCText.substring(0,f) > 2020))
	{
		alert("\u65e5\u671f\u8303\u56f4\uff1a1920\uff0d2020\u5e74\uff01");
		return(false);
	}
	/**-- \u5224\u65ad\u6708\u4efd --**/
	if ((strCText.substring((f+1),s) < 1) || (strCText.substring((f+1),s) > 12))
	{
		alert("\u6708\u4efd\u53ea\u80fd\u4e3a\uff1a01\uff0d12\u3002");
		return(false)
	}
	if (strCText.substring((f+1),s)==01||strCText.substring((f+1),s)==03||strCText.substring((f+1),s)==05
		||strCText.substring((f+1),s)==07 ||strCText.substring((f+1),s)==08 ||strCText.substring((f+1),s)==10
		||strCText.substring((f+1),s)==12)
	{
		if(strCText.substring((s+1),l) > 31 || strCText.substring((s+1),l) < 1)
		{
			alert(strCText.substring(0,f) +"\u5e74" + strCText.substring((f+1),s) + "\u6708\u5929\u6570\u4e3a\uff1a01\uff0d31\u5929\uff01");
			return(false)
		}
	}
	if(strCText.substring((f+1),s)==04||strCText.substring((f+1),s)==06||strCText.substring((f+1),s)==09
		||strCText.substring((f+1),s)==11)
	{
		if(strCText.substring((s+1),l) > 30 || strCText.substring((s+1),l) < 1)
		{
			alert(strCText.substring(0,f) + "\u5e74" + strCText.substring((f+1),s) + "\u6708\u5929\u6570\u4e3a\uff1a01\uff0d30\u5929\uff01");
			return(false)
		}
	}
	if(strCText.substring((f+1),s)==02)
	{
		var iYear = strCText.substring(0,f);
		if((iYear%4==0 && iYear%100 !=0)||(iYear%400 ==0))
		{
			if(strCText.substring((s+1),l) > 29 || strCText.substring((s+1),l) < 1)
			{
				alert(iYear + "\u5e74\u662f\u95f0\u5e74\uff0c2\u6708\u5929\u6570\u4e3a\uff1a01\uff0d29\u5929\uff01");
				return(false)
			}
		}
		else
		{
			if(strCText.substring((s+1),l) > 28 || strCText.substring((s+1),l) < 1)
			{
				alert(iYear + "\u5e74\u662f\u5e73\u5e74\uff0c2\u6708\u5929\u6570\u4e3a\uff1a01\uff0d28\u5929\uff01");
				return(false)
			}
		}
	}
	return(true);
}

/**-- \u5224\u65ad\u662f\u5426\u6570\u7ec4 \u8fd4\u56detrue/false --**/
function isArray(varArray)
{
	var bResult = false;
	if  (varArray != null)
		bResult = (varArray.length > 0);
	return (bResult)
}

/**-- \u8fd4\u56de\u6570\u7ec4\u957f\u5ea6 \u975e\u6570\u7ec4\u8fd4\u56de1 --**/
function fnGetArrayLength( varArray )
{
	var iResult = 0;
	if (varArray != null)
	{
		if (varArray.length > 0)
			iResult = varArray.length
		else
			iResult = 1;
	}
	return(iResult)
}
function getTrueXML(strDBValue)
{
		var strEmpty = "";

	if(strDBValue == null)
		return strEmpty;

	var strDBValue = new String(strDBValue);

	var reTwoDot = /\"/gi;
	var reOneDot = /\'/gi;
	var reBigSign = />/gi;
	var reSmallSign = /</gi;
	var reAndSign = /&/gi;
	strDBValue = strDBValue.replace(reAndSign,"&amp;");
	strDBValue = strDBValue.replace(reTwoDot,"&quot;");
	strDBValue = strDBValue.replace(reOneDot,"&#39;");
	strDBValue = strDBValue.replace(reBigSign,"&gt;");
	strDBValue = strDBValue.replace(reSmallSign,"&lt;");
	return(strDBValue);
}
/**-- \u5f53\u76f4\u63a5\u4e3a\u5ba2\u6237\u7aef\u7684\u5143\u7d20\uff0c\u5728scirpt\u4e2d\u8d4b\u503c\u65f6\uff0c\u5e94\u8be5\u8f6c\u6362\u4e3a\u5ba2\u6237\u7aef\u8ba4\u8bc6\u7684\u3002 --**/
function TurnToClientValue(strDBValue) {
    var strEmpty = "";
    if((strDBValue == "") )
        return strEmpty;

	var strDBValue = new String(strDBValue);

	var reTwoDot = /&quot;/gi;
	var reOneDot = /&apos;/gi;
	var reBigSign = /&gt;/gi;
	var reSmallSign = /&lt;/gi;
	var reAndSign = /&amp;/gi;
	strDBValue = strDBValue.replace(reTwoDot,"\"");
	strDBValue = strDBValue.replace(reOneDot,"\'");
	strDBValue = strDBValue.replace(reBigSign,">");
	strDBValue = strDBValue.replace(reSmallSign,"<");
	strDBValue = strDBValue.replace(reAndSign,"&");

	return(strDBValue);
}
/**-- *
* bModalDialog
* bModalDialog true \u5bf9\u8bdd\u6846\u6253\u5f00,false\u4e3aOPEN\u6253\u5f00
* iDialogWidth \u663e\u793a\u5bbd\u5ea6,\u5982\u679c\u4e3a-1 \u5219\u4ee5\u9ad8\u5ea6\u4e3a\u51c6,\u53d6\u9ad8\u5ea6\u76842/3
* iDialogHeight \u663e\u793a\u9ad8\u5ea6,\u5982\u679c\u4e3a-1 \u5219\u4ee5\u5bbd\u5ea6\u4e3a\u51c6,\u53d6\u5bbd\u5ea6\u76842/3
* bScrollbar \u662f\u5426\u663e\u793a\u6eda\u52a8\u6761
* bresizable \u662f\u5426\u53ef\u4ee5\u6539\u53d8\u5927\u5c0f
* bstatus \u662f\u5426\u663e\u793a\u72b6\u6001\u6761
* bMenuBar \u662f\u5426\u663e\u793a\u83dc\u5355
 --**/
function getDialogFeatures(bModalDialog,iDialogWidth,iDialogHeight
                           ,bScrollbar,bresizable,bstatus,bMenuBar){
	var strFeatures ="";
	if(iDialogWidth < 0)
		iDialogWidth =parseInt(2/3*iDialogHeight)-30;
	if(iDialogHeight <0)
		iDialogHeight =parseInt(2/3*iDialogWidth)-30;
	var iTopPos = parseInt((window.screen.availHeight-iDialogHeight)/2);//\u7b97\u51fa\u663e\u793a\u7684\u9ad8\u5ea6
	var iLeftPos = parseInt((window.screen.availWidth-iDialogWidth)/2);//\u7b97\u51fa\u663e\u793a\u7684\u4f4d\u7f6e
	if(bModalDialog){
		strFeatures ="dialogTop:"+iTopPos+"px;dialogLeft:"+iLeftPos
					+"px;dialogWidth:"+iDialogWidth+"px;dialogHeight:"+iDialogHeight+"px;";
		if(bScrollbar)
			strFeatures +="scroll:1;";
		else
			strFeatures +="scroll:0;";
		if(bresizable)
			strFeatures +="resizable:1;";
		else
			strFeatures +="resizable:0;";
		if(bstatus)
			strFeatures +="status:1;";
		else
			strFeatures +="status:0;";
		if(bMenuBar)
			strFeatures +="status:1;";
		else
			strFeatures +="status:0;";

	}
	else{
		strFeatures ="Top="+iTopPos+",Left="+iLeftPos
					+",Width="+iDialogWidth+",Height="+iDialogHeight+",";
		if(bScrollbar)
			strFeatures +="scrollbars=1,";
		else
			strFeatures +="scrollbars=0,";
		if(bresizable)
			strFeatures +="resizable=1,";
		else
			strFeatures +="resizable=0,";
		if(bstatus)
			strFeatures +="status=1,";
		else
			strFeatures +="status=0,";
		if(bMenuBar)
			strFeatures +="menubar=1,";
		else
			strFeatures +="menubar=0";
	}
	return strFeatures;
}
/**-- \u5224\u65ad\u662f\u5426\u4e3a\u7279\u6b8a\u5b57\u7b26\u4e3a\u679a\u4e3e\u9879\u8bbe\u7f6e\uff0cshe.04.05.19 --**/
function IsCorrectNameForEnum(strName)
{
	var strNotCorrectName=new String("()><'\\\"#][&")
	for ( i = 0; i < strNotCorrectName.length; i++ )
	{
		if ( strName.indexOf(strNotCorrectName.substring(i,i+1)) > -1 ) {
                    return false;
		}
	}
	return true;
}
/**-- \u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u4e32\u6839\u636e\u67d0\u4e2a\u5b57\u7b26\u5206\u5272\u4e4b\u540e\u662f\u5426\u91cd\u590d --**/
 function IsDoubleStr(strSource,strSplit){
     var bReturn = false;
     var iDoubleNum =0;/**-- \u91cd\u590d\u7684\u4e2a\u6570 --**/
     var arr_Source = strSource.split(strSplit);
     for( var i=0;i<arr_Source.length;i++){
        var str = arr_Source[i];
        if(Trim(str)=="")
        	continue;
   		 for( var j=0;j<arr_Source.length;j++){
       		if( i!=j && Trim(str) == Trim(arr_Source[j])){
                 iDoubleNum ++;
      		}
           if(iDoubleNum >=2){
                bReturn = true;
                break;
            }
    	 }
     }
     return bReturn;
 }

 /**-- * \u51fd\u6570\u529f\u80fd \u5b9e\u884cURL\u4e2d\u7279\u6b8a\u5b57\u7b26\u8f6c\u6362
 *  +  %2B
 *  /  %2F
 *  ?  %3F
 *  %  %25
 *  #  %23
 *  &  %26
* @param strSource \u8f93\u5165\u7684\u5b57\u7b26\u4e32
* @return \u8f6c\u4e49\u540e\u7684\u5b57\u7b26\u4e32
 --**/

function fnEscapeURL(strSource) {
    if (strSource == null)
        strSource = "";
    strSource = fnEscapeString(strSource,"%","%25");
    strSource = fnEscapeString(strSource,"+","%2B");
    strSource = fnEscapeString(strSource,"/","%2F");
    strSource = fnEscapeString(strSource,"?","%3F");
    strSource = fnEscapeString(strSource,"#","%23");
    strSource = fnEscapeString(strSource,"&","%26");
    strSource = fnEscapeString(strSource,"=","%3D");
    return strSource;

}

/**-- *
 * \u5ba2\u6237\u7aef\u8f6c\u4e49\u51fd\u6570,\u7528\u4e8e\u5f25\u8865\u5bf9\u7279\u6b8a\u7b26\u53f7\u7684\u652f\u6301\u4e0d\u591f
 * add by li_hongzhi
  --**/
function fnEscapeStringHTMLTrans(strSource) {
  if (strSource == null)
        strSource = "";
    //strSource = fnEscapeString(strSource,"'","''");
    strSource = fnEscapeString(strSource,"%","%25");
    strSource = fnEscapeString(strSource,"+","%2B");
    strSource = fnEscapeString(strSource,"/","%2F");
    strSource = fnEscapeString(strSource,"?","%3F");
    strSource = fnEscapeString(strSource,"#","%23");
    strSource = fnEscapeString(strSource,"&","%26");
    strSource = fnEscapeString(strSource,"=","%3D");
    strSource = fnEscapeString(strSource,">","\>");
    strSource = fnEscapeString(strSource,"<","\<");
    return strSource;
}

function fnEscapeString(
    strSource,
    SINQUOTE_ORIGIN,
    SINQUOTE_ESCAPE
)
{
    var iOriLength = SINQUOTE_ORIGIN.length ;
    var iCorssLength = SINQUOTE_ESCAPE.length - iOriLength ;
    var k = strSource.indexOf(SINQUOTE_ORIGIN, 0);
    while (k >= 0) {
        strSource =
            strSource.substring(0, k)
                + SINQUOTE_ESCAPE
                + strSource.substring(k + iOriLength, strSource.length);
        k = strSource.indexOf(SINQUOTE_ORIGIN, k + 1 + iCorssLength );
    }
    return strSource;

}
/**-- \u65b0\u589e\u51fd\u6570\uff0c\u7528\u4e8e\u5224\u65ad\u8f93\u5165\u5b57\u7b26\u4e32\u7684\u5b57\u8282\u65702003.12.8--**/
function fnGetStringLength(strSource) {
    var iLength = 0;
    for (var iy=0; iy<strSource.length; iy++ ) {
        var n = strSource.charCodeAt(iy);
        if ( n < 255 )
            iLength = iLength + 1;
        else
            iLength = iLength + 2;
    }
    return(iLength);
}
/**-- \u5224\u65ad\u4e00\u4e2a\u5b57\u7b26\u4e32\u662f\u5426\u53ea\u542b\u6709\u6570\u5b57,\u4e5f\u4e0d\u5305\u542b+-\u53f7 --**/
function isIntNoABC(strName)
{
	var paramStr = strName;
	var ilength = paramStr.length;
	var ch;
	for (var i=0; i<ilength; i++) {
		ch = paramStr.charAt(i);
		if (ch >= '0' && ch <= '9') {
			continue;
		 }
		 else {
			alert("\u4e0d\u80fd\u5305\u62ec0~9\u4ee5\u5916\u7684\u5b57\u7b26");
			return false;
		 }
	 }
	 return true;

}

function DeleteMoreZeroForInt(strSource)
{
    var strFirst = "";
    if ( strSource.substr(0,1) == '-') {
        strFirst = "-";
        strSource = strSource.substring(1,strSource.length);
    } else {
        strSource = strSource.substring(0,strSource.length);
    }
    while (strSource.substr(0,1) == '0')
            strSource = strSource.substring(1,strSource.length);
    if ( strSource == "" ) {
        strSource = "0";
    }
    strSource = strFirst + strSource;
    if ( strSource == "-0" ) {
        strSource = "0";
    }
    return(strSource)
}
function DeleteMoreZeroForFloat(strSource)
{
    var strFirst = "";
    var strBefore = "";
    var strEnd = "";
    var strDotBefore = "";
    var arrSource = strSource.split(".");
    if ( arrSource.length == 2 ) {
        strBefore = arrSource[0];
        strEnd = "." + arrSource[1];
    } else {
        strBefore = arrSource[0];
    }

    if ( strBefore.substr(0,1) == '-') {
        strFirst = "-";
        strDotBefore = strBefore.substring(strBefore.length-1,strBefore.length)
        strBefore = strBefore.substring(1,strBefore.length-1);
    } else {
        strDotBefore = strBefore.substring(strBefore.length-1,strBefore.length)
        strBefore = strBefore.substring(0,strBefore.length-1);
    }

    while (strBefore.substr(0,1) == '0') {
 	strBefore = strBefore.substring(1,strBefore.length);
    }
    strSource = strFirst + strBefore + strDotBefore + strEnd;
    if ( strSource == "-0" ) {
        strSource = "0";
    }
    return(strSource)

}

