/**
作者：熊小明
时间：2011-01-10
功能：公用类
*/
function $(_id){
	return document.getElementById(_id);
}
function $c(_tag){
	return document.createElement(_tag);
}
function $t(_tag){var _doc = arguments[1]||document;return _doc.getElementsByTagName(_tag)}

+(function(){
var My = window.My = {

	loadJs:function(_url){
		var callback = arguments[1]||function(){};
		var _script = $c("SCRIPT");
		_script.setAttribute("type", "text/javascript");
		_script.setAttribute("src", _url);
		$t("head")[0].appendChild(_script);
		if(document.all){
			_script.onreadystatechange = function(){
				if(this.readyState == 4 || this.readyState == "complete" || this.readyState == "loaded"){
	 				callback();
					$t("head")[0].removeChild(_script);
				}
			};
		}else{
			_script.onload = function(){
				callback();
				$t("head")[0].removeChild(_script);
			};
		}
	}
	
}

})();
//window.onerror=function(){return true}