function dhAdShow(){
	//author:dh20156
	this.rid = null;
	this.bannerAd = new Array();
	this.style = 0;
	this.autoid = null;
	this.nowindex = 0;
	this.startindex = 0;
	this.timeset = 3000;
	this.width = 205;
	this.height = 146;
	this.target = "_blank";
	this.targetObj = null;
	this.onlypic = false;
	var dh = this;
	var objA = null;
	var objI = null;
	var objS = null;
	var objT = null;
	var imgPL = new Array();
	var badl = 0;
	this.setup = function(){
		var numstr = "";
		try{
		if(this.bannerAd && this.bannerAd.length>0){
			badl = this.bannerAd.length;
			for(var i=0;i<badl;i++){
				imgPL[i]=new Image();
				imgPL[i].src=this.bannerAd[i].src;
				numstr += '<button hideFocus="hideFocus" style="border:none;cursor:pointer;margin-left:1px;padding-left:4px;padding-right:4px;text-align:center !important;height:20px;background-color:black;color:white;" onclick="'+this.rid+'.clearslideShow('+i+');return false;">'+(i+1)+'</button>';
			}
		}
		objA = document.createElement("A");
		objI = document.createElement("IMG");
		objS = document.createElement("SPAN");
		objT = document.createElement("A");
		objA.style.display = "block";
		objA.style.width = this.width;
		objA.style.height = this.height;
		objA.style.overflow = "hidden";
		objA.href = "#";
		objA.target = this.target;
		objA.title = "dh_adShow";
		objS.style.position = "relative";
		objS.style.zIndex = "100";
		objS.style.display = "block";
		objS.style.width = "100%";
		objS.style.height = "20px";
		objS.style.lineHeight = "20px";
		objS.style.marginTop = "-20px";
		objS.style.backgroundColor = "white";
		objS.style.filter = "alpha(opacity=50)";
		objS.style.opacity = "0.5";
		objS.style.textAlign = "right";
		objS.innerHTML = numstr;
		/**
		objT.style.backgroundColor="#2A282A";
		objT.style.color="#FFFFFF";
		objT.style.display="block";
		objT.style.textAlign="center";
		objT.style.width = this.width;
		objT.style.height = "25px";
		objT.style.lineHeight = "25px";
		objT.style.whiteSpace = "nowrap";
		objT.style.overflow = "hidden";
		objT.style.textOverflow = "ellipsis";
		objT.target = this.target;
		objT.innerHTML = "dh_adShow Ver2.5.0"
		*/
		switch(this.style){
			case 0:objI.style.filter = "blendTrans(duration=3)";break;
			case 1:objI.style.filter = "progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0, wipeStyle=0, motion='forward', duration=3)";break;
			default:objI.style.filter = "revealTrans(Transition=23,Duration=1)";break;
		}
		objI.style.verticalAlign = "top";
		objI.width = this.width;
		objI.height = this.height;
		objI.border = 0;
		objI.alt = "dh_adShow Ver2.5.0";

		objA.appendChild(objI);
		if(!this.onlypic){
			objA.appendChild(objS);
		}
		
		if(badl > 0){
			objI.src = imgPL[0].src;
			objI.alt = this.bannerAd[0].tips;
			objA.href = this.bannerAd[0].url;
			objA.title = this.bannerAd[0].tips;
			objT.href = this.bannerAd[0].url;
			objT.title = this.bannerAd[0].tips;
			//objT.innerHTML = this.bannerAd[0].tips;
		}

		if(this.targetObj == null || this.targetObj == "document.body"){
			var scriptObj = document.getElementsByTagName("script");
			for(var i=0;i<scriptObj.length;i++){
				if(scriptObj[i].innerHTML.indexOf("new dhAdShow()") > -1 && scriptObj[i].parentNode.tagName != "HEAD"){
					this.targetObj = scriptObj[i].parentNode;
				}
			}
		}

		this.targetObj.appendChild(objA);
		if(!this.onlypic){
			this.targetObj.appendChild(objT);
		}

		}catch(e){}
	}

	this.slideShow = function(){
		if(this.startindex >= badl){
			this.startindex = 0;
		}
		this.showFrame(this.startindex);
		this.autoid = window.setTimeout(function(){dh.slideShow()},this.timeset)
	}
	this.showFrame = function(index){
		if(index<=0 || index>=badl){
			index = 0;
		}
		try{
		if(badl > index && index>=0 && objA != null && objI != null){
			if(document.all){
				switch(this.style){
					case 0:objI.filters.blendTrans.apply();break;
					case 1:objI.filters[0].apply();break;
					default:objI.filters[0].apply();objI.filters[0].Transition=23;break;
				}
			}
			objI.src = imgPL[index].src;
			objI.alt = this.bannerAd[index].tips;
			var tmph = objI.offsetHeight;tmph = null;
			objA.href = this.bannerAd[index].url;
			objA.title = this.bannerAd[index].tips;
			//objT.innerHTML = this.bannerAd[index].tips;
			objT.href = this.bannerAd[index].url;
			objT.title = this.bannerAd[index].tips;
			if(document.all){
				switch(this.style){
					case 0:objI.filters.blendTrans.play();break;
					case 1:objI.filters[0].Play();break;
					default:objI.filters[0].Play();break;
				}
			}
			if(this.nowindex != null && index != this.nowindex){
				objS.childNodes[this.nowindex].style.backgroundColor = "black";
			}
			objS.childNodes[index].style.backgroundColor = "red";
			this.nowindex = index;
			this.startindex = index+1;
		}
		}catch(e){}
	}
	this.clearslideShow = function(index){
		window.clearTimeout(this.autoid);
		this.startindex = index;
		this.slideShow();
	}
}
