function _wtTrim(s){if (!s||s=='')return '';while((s.charAt(0)==' ')||(s.charAt(0)=='\n')||(s.charAt(0,1)=='\r')){s=s.substring(1,s.length);}while((s.charAt(s.length-1)==' ')||(s.charAt(s.length-1)=='\n')||(s.charAt(s.length-1)=='\r')){s=s.substring(0,s.length-1);}return s;}
function _wtNull(s){if(!s||s==undefined){return true;}else{s=_wtTrim(s);if(s==''||s=='undefined'||s=='null')return true;}return false;}
function WTNode(key,value){this.key=key;this.value=value;}
function WTMap(){this.nodes=new Array();}
WTMap.prototype.put=function(key,value){if(_wtNull(value))return;for(var i=0;i<this.nodes.length;i++){if(this.nodes[i].key==key){this.nodes[i].value=value;return;}}var node=new WTNode(key,value);this.nodes.push(node);return;}
WTMap.prototype.get=function(key){for(var i=0;i<this.nodes.length;i++)if(this.nodes[i].key==key){return this.nodes[i].value;}return null;}
WTMap.prototype.getKey=function(i){return this.nodes[i].key;}
WTMap.prototype.getValue=function(i){return this.nodes[i].value;}
WTMap.prototype.size=function(){return this.nodes.length;}
WTMap.prototype.toString=function(){var s="{";for(var i=0;i<this.nodes.length;i+=1){s+="["+this.nodes[i].key+"="+this.nodes[i].value+"]";}return s+="}";}
WTMap.prototype.save=function(){var wtpm='';for(var i=0;i<this.nodes.length;i++){if(i>0)wtpm=wtpm+';';wtpm=wtpm+this.nodes[i].key+':'+this.nodes[i].value;}_wtSCK(' wtpm='+_wtES(wtpm)+';');}

var _loadjs_wt = false;

function loadScript(callback){

if(_loadjs_wt==true)
{
	 callback();
	 return;
}
var gaJsHost = (("https:" == document.location.protocol) ? "https://yy1.webtrace.cn" : "http://yy1.webtrace.cn");
var url = gaJsHost + "/_wtacct.js?sd=106050";
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.async = true;
    if (script.readyState){  // IE
        script.onreadystatechange = function(){
            if (script.readyState == "loaded" || script.readyState == "complete"){
                script.onreadystatechange = null;
                _loadjs_wt = true;
                callback();
            }
        };
    } else {  // Others
        script.onload = function(){
            _loadjs_wt = true;
            callback();
        };
    }
    script.src = url;
  var tag=  document.getElementsByTagName("script")[0];
  if(tag) {
   tag.parentNode.insertBefore(script, tag);
  }

}


function _wtTracker(a, b, c, d)
{
         loadScript(function(){
		//	var _wttpm_= _toWTMapExt(d);
			var _wttpm_=d;
        	_wtTracker_load(a, b, c, _wttpm_);
        });

}


function  _ajax_WtTracker(page,title,extWTMap)
{
	
         loadScript(function(){
        //	var _wttpm_= _toWTMapExt(extWTMap);
			var _wttpm_ = extWTMap;
        	_wtTracker_load_ajax(page,title,_wttpm_);
        });
}



var getCookie=function(objName){ var strCookies = document.cookie; var cookieName = objName + '='; var valueBegin, valueEnd, value; 
valueBegin = strCookies.indexOf(cookieName); if (valueBegin == -1) return null; valueEnd = strCookies.indexOf(';', valueBegin); if (
valueEnd == -1) valueEnd = strCookies.length; value = strCookies.substring(valueBegin+cookieName.length,valueEnd); return value; };

//load js
//loadScript(function (){});
