/**
  ????????????????????????????????????
  @param str:????????????????????????????????????
  @return String:????????????????????????????????????
*/

function trim(str){
  //????????????????????????????????????
  str = str.replace(/^\s+/, "");
  //????????????????????????????????????
  str = str.replace(/\s+$/, "");
  return str;
}
/**
*check the string is int type or not 
*/
function isInt(theInt){

	if(theInt=="") {
		return false;
	} else {
		for(var i=0;i<theInt.length;i++){
			if(isDigit(theInt.charAt(i))==false){
				return false;
			}
		}
		return true;
	}
}
/**
*check the string is digit  or not 
*/
function isDigit(theNum){
	var theMask="0123456789";
	if(theNum==""){
		return false;
	}
	else if(theMask.indexOf(theNum)==-1){
		return false;
	}
	return true;
}


/**
 *  ??textarea???????????????
 * @param textAreaName textarea?????
 * @param maxLength ?????????
 * @author zhangliang
 * @date 2007-04-13 
 */
function checkTextAreaLength (textAreaName, maxLength) {
	textAreaObj = document.getElementById(textAreaName);
	if (textAreaObj.value.length > maxLength) {
		return false;
	}
	return true;
}