/*
* jQuery CascadingSelect AddOption
*
* Author: qinfei
*
* Licensed like jQuery, see http://docs.jquery.com/License
*
* 作者：qinfei
*/

function $G(id){
 return document.getElementById(id);
}
function $F(id){
 return $G(id).value;
}

//========================================
// [Function] isDigit
// [Description] check digit valid
// [Params] theDigit - input digit
// [Return] digit valid
//========================================
function isDigit(theDigit) 
{ 
	var digitArray = new Array('0','1','2','3','4','5','6','7','8','9'),j; 

	for (j = 0; j < digitArray.length; j++) 
	{if (theDigit == digitArray[j]) 
		return true 
	} 
	return false
} 

//========================================
// [Function] isPositiveInteger
// [Description] check string is integer
// [Params] theString - input string
// [Return] string valid
//========================================
function isPositiveInteger(theString) 
{ 
	var theData = new String(theString) 

	if (!isDigit(theData.charAt(0)))		
		if (!(theData.charAt(0)== '+')) 
			return false 

	for (var i = 1; i < theData.length; i++) 
		if (!isDigit(theData.charAt(i))) 
			return false 
	
	return true 
} 


/*
用途：检查输入字符串是否是带小数的数字格式,可以是负数
输入：
s：字符串
返回：
如果通过验证返回true,否则返回false
*/