var m = {	
	$e: function(z){
		return typeof(z)=="object"?z:document.getElementById(z);
	},
	$E: function(o,z){
		return typeof(o)=="string"?ge(o).getElementsByTagName(z):o.getElementsByTagName(z);
	},
	tagCutover: function(tagObj, listName){
		
		if(!this.$e(tagObj)) return;
		var tg = this.$e(tagObj), tgList = this.$E(tg, "a");
		if(!listName) listName = "ul";
		var cnList = this.$E(tg.parentNode, listName);
		tg.cnList = cnList;
		
		for(i=0; i<tgList.length; i++){
			tgList[i].no = i;
			tgList[i].href = "javascript:;"
			cnList[i].style.display = "none";			
			if(tgList[i].parentNode.className == "current"){
				tg.current = tgList[i];
				cnList[i].style.display = "";
			}
			tgList[i].onclick = function(){
				var tp = this.parentNode;
				tg.current.parentNode.className = '';
				tg.cnList[tg.current.no].style.display = "none";
				tp.className = "current";
				tg.cnList[this.no].style.display = "block";
				tg.current = this;				
				this.blur();				
			}			
		}
		//end for
	},
	selection: function(t, n) {
	    if (!this.$e(t)) return;
	    var _t = this;
	    var root = this.$e(t);
	    var tb = this.$E(root, "div")[0],
			tl = this.$E(root, "div")[1],
			tla = this.$E(tl, "a"),
			v = this.$E(tb, "i")[0];
	    tb.openStatus = false;
	    tb.onmouseover = function() {
	        v.className = "hover";
	        this.onmouseout = function() { if (!this.openStatus) v.className = ""; };
	    }
	    tb.onclick = function() {
	        tl.style.width = this.clientWidth + "px";
	        if (this.openStatus) {
	            tl.style.display = "none";
	            tb.openStatus = false;
	        } else {
	            tl.style.display = "block";
	            tb.openStatus = true;
	        }
	    }
	    //        for (i = 0; i < tla.length; i++) {
	    //            tla[i].href = "javascript:;";
	    //            tla[i].onclick = function() {
	    //                _t.$E(tb, "em")[0].innerHTML = this.innerHTML;
	    //                tl.style.display = "none";
	    //                tb.openStatus = false;
	    //                v.className = "";
	    //            }
	    //        }
	}

}
function coopScroll(){
	var cp = m.$e("coop"),
		p = m.$E(cp,"p")[0],
		a = m.$E(cp,"a");
	if (a.length > 0 && a[0].clientWidth * a.length > cp.clientWidth) {
	    p.innerHTML = p.innerHTML + p.innerHTML;
	    p.style.width = a[0].clientWidth * a.length + "px";
	    var cinter = setInterval(function() { cp.scrollLeft = cp.scrollLeft < p.clientWidth / 2 ? cp.scrollLeft + 1 : 0; }, 20);
	    cp.onmouseover = function() { clearInterval(cinter); }
	    cp.onmouseout = function() { cinter = setInterval(function() { cp.scrollLeft = cp.scrollLeft < p.clientWidth / 2 ? cp.scrollLeft + 1 : 0; }, 20); }
	}
}

function getEvent(){     //同时兼容ie和ff的写法　　取得操作对像
	 if(document.all)    return window.event;        
	 func=getEvent.caller;            
	 while(func!=null){    
		 var arg0=func.arguments[0];
		 if(arg0){
			 if((arg0.constructor==Event || arg0.constructor ==MouseEvent)
				 || (typeof(arg0)=="object" && arg0.preventDefault && arg0.stopPropagation)){    
				 return arg0;
			 }
		 }
		 func=func.caller;
	 }
	 return null;
}

//Add Function
function innerSWF(obj,src,name,width,height,version,parameter){
	var so = new SWFObject(src, name, width, height, version);
	so.addParam("quality", "high");
	so.addParam("menu", "false");
	so.addParam("wmode", "transparent");
	if(parameter) so.addParam("FlashVars", parameter);		
	so.write(obj);
}

try {
    document.execCommand('BackgroundImageCache', false, true);
} catch (e) { } 