/**
 * @namespace com.thesis.util.HighFrequencyMehod
 * @author 钟军锐 August.R@263.net
 */

/** @id $ */
function $(sID){
	return document.getElementById(sID);
}

/** @id C$ */
function C$(sTagName){
	return document.createElement(sTagName);
}

/** @id T$ */
function T$(sData){
	return document.createTextNode(sData);
}

/** @id trim*/
String.prototype.trim=function (){
    return this.replace(new RegExp("(^[\\s]*)|([\\s]*$)", "g"), "");
};

/** @id shortCut */
String.prototype.shortCut=function(len){
	if(this.length>len) {
		return this.substr(0,len)+'...';
	}
	return this;
};


/** @id M$ */
function M$(oTarget){
	var t = null;
	if(oTarget){
		for(var i in oTarget){
			if(typeof oTarget[i] == "string"){
				t = $(oTarget[i]);
				if(t) oTarget[i] = t;
			}
		}
	}
	return oTarget;
}

/** @id Clear$ */
function Clear$(oTarget){
	if(!oTarget) return;
	while(oTarget.firstChild)
		oTarget.removeChild(oTarget.firstChild);
}
