function ConnetAD(_ADID,_ADType,_ADName,_ADUrl,_FlashWmode,_LinkUrl,_LinkTarget,_LinkAlt) {
  this.ADID        = _ADID;
  this.ADType      = _ADType;
  this.ADName      = _ADName;
  this.ADUrl       = _ADUrl;
  this.FlashWmode  = _FlashWmode;
  this.LinkUrl     = _LinkUrl;
  this.LinkTarget  = _LinkTarget;
  this.LinkAlt     = _LinkAlt;
}
function ZoneAD(_ID,_ZoneName,_ZoneWidth,_ZoneHeight,_ZoneFloat,_ADStopTime,_ADWipeStyle,_ADmotion,_ADduration,_ADGradientSize,_Active) {
  /* Define Variables*/
  this.ZoneID             = _ID;
  this.ZoneName           = _ZoneName;
  this.ZoneWidth          = _ZoneWidth;
  this.ZoneHeight         = _ZoneHeight;
  this.ZoneFloat          = _ZoneFloat ;
  this.ADStopTime         = _ADStopTime;
  this.ADDuration         = _ADduration;
  this.ADGradientSize     = _ADGradientSize;
  this.ADmotion           = _ADmotion;
  this.ADWipeStyle        = _ADWipeStyle;
  this.Div                = "";
  this.Active             = _Active;
  
  this.NowFrame           = 0;
  this.MaxFrame           = 0;
  this.bStart             = 0; 
/* Define Objects */
  this.AllAD              = new Array();  
/* Define Functions */
  this.AddAD              = ZoneAD_AddAD;
  this.Show               = ZoneAD_Show;
  this.fnToggle           = ZoneAD_fnToggle;
}
function ZoneAD_AddAD(_AD) {
 var i=this.AllAD.length;
 if(_AD.ADType==1){
  this.AllAD[i] ="<a href='"+_AD.LinkUrl+"' target='"+((_AD.LinkTarget == 0) ? "_self" : "_blank") + "' title='" + _AD.LinkAlt+ "'>";
  this.AllAD[i] +="<img id='"+this.ZoneID+(i+1)+"' src='"+_AD.ADUrl+"'";
      
  this.AllAD[i] += " width='" + this.ZoneWidth  + "'";
  this.AllAD[i] += " height='" + this.ZoneHeight + "'";
  this.AllAD[i] += " border='0'"+((i==0)?" style='display: ;'":" style='display: none;'")+" ></a>";
	  
 }else{
  this.AllAD[i]="<embed id='"+this.ZoneID+(i+1)+"' src='"+_AD.ADUrl+"' quality='autohigh' play='1'";
  if (_AD.FlashWmode == 1)  this.AllAD[i] += " wmode='Transparent'";
  this.AllAD[i] += " width='" + this.ZoneWidth  + "'";
  this.AllAD[i] += " height='" + this.ZoneHeight + "'";
  this.AllAD[i] += " pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' "+((i==0)?" style='display: ;'":" style='display: none;'")+"></embed>";
 }
}
function ZoneAD_Show() {
  if (!this.AllAD || !this.Active)
    return;
  document.write("<div id='"+this.ZoneID+"' style=\"FILTER: progid:DXImageTransform.Microsoft.GradientWipe(duration="+this.ADDuration +",GradientSize="+this.ADGradientSize+", motion='"+this.ADmotion+"',WipeStyle="+this.ADWipeStyle+"); WIDTH: "+this.ZoneWidth+"px; HEIGHT: "+this.ZoneHeight+"px;float:"+this.ZoneFloat+";\">");
	for(i=0;i<this.AllAD.length;i++)
	  document.write(this.AllAD[i]);
  document.write("</div>");
  this.Div=document.getElementById(this.ZoneID);
  this.NowFrame = 1;
  this.MaxFrame = this.AllAD.length;
  this.bStart = 0;
  if(this.MaxFrame>1)
    this.fnToggle();
}
function ZoneAD_fnToggle(){
 var next = this.NowFrame + 1;
			if(next == this.MaxFrame+1){
			   this.NowFrame = this.MaxFrame;
			   next = 1;
			  }
			if(this.bStart == 0){
			     this.bStart = 1;
				 setTimeout(this.ZoneID+'.fnToggle()', this.ADStopTime);
				 return;
			}else{
    		 this.Div.filters[0].Apply();
		      document.all[this.ZoneID+next].style.display = ""
			  document.all[this.ZoneID+this.NowFrame].style.display = "none";
			 this.Div.filters[0].play(this.ADDuration);
			 if(this.NowFrame == this.MaxFrame){
			   this.NowFrame = 1;
			 }else{
			   this.NowFrame++;
			 }
			}
			 setTimeout(this.ZoneID+'.fnToggle()', this.ADStopTime);
}
ZoneAD_ad001=new ZoneAD('ZoneAD_ad001','首页通栏标语（1）','960','103','none','4000',0,'forward',1,0.25,1);
objAD_1= new ConnetAD('1','1','首页通栏标语（一）','/AD/UploadFile/20091127200017c3636.jpg','1','','1','');
ZoneAD_ad001.AddAD(objAD_1);
ZoneAD_ad001.Show();