ie4 = ((navigator.appVersion.indexOf("MSIE")>0) && (parseInt(navigator.appVersion) >= 4));
function ani_div()
{
  this.count = 0;
  this.count2 = 0;
  this.add1 = 3;
  this.add2 = 10;
  this.div_id="";
  this.tb_ids_len=0;
  this.tb_cid=0;
  this.tb_ids=new Array();
  this.obj_ani_img=null;
  this.delay1=3000;
  this.delay2=1000;
  
  
  this.add_tb=function (tbid){
  	if(tbid!=null){
	  this.tb_ids[this.tb_ids_len]=tbid;
	  this.tb_ids_len++;
	}
  }
  this.chg_tb=function(){
     
  	 if(ie4){
	   // if(this.obj_ani_img!=null)
	        this.obj_ani_img.nextAd1();
	    if(document.all(this.tb_ids[this.tb_cid]).style.display!="none")
		{
		  document.all(this.tb_ids[this.tb_cid]).style.display="none";
		  this.tb_cid++;
		}
		if(this.tb_cid>=this.tb_ids_len)this.tb_cid=0;
		document.all(this.tb_ids[this.tb_cid]).style.display="";		
	 }
  }
  this.showdiv=function () {
    if (ie4) {
      this.count += this.add1;
	  this.count2 += this.add2;
	  this.delay = 30;
	  if(this.count2 > 100) this.count2 = 100;
	  if(this.count > 100) {
	    this.count = 100;
	    this.add1 = -10;
	    this.add2 = -3;
	    this.delay = this.delay1;
	  }
	  if(this.count < 0) this.count = 0;
	  if(this.count2 < 0) {
	    this.count2 = 0;
	    this.add1 = 3;
	    this.add2 = 10;
	    this.delay = this.delay2;
		this.chg_tb();
	  }
	  document.all(this.div_id).style.filter = "Alpha(Opacity="+this.count2+",FinishOpacity="+this.count+",style=2)"; 
    }
  }
}
function getlinkstr(strlink,str_m)
{
var str_link=strlink;
var str_href="href";
if(str_m!=null&&str_m!="")str_href=str_m+"=";//特征，默认为"href",
var str_temp="";
var n_begin=str_link.indexOf(str_href); //初始化地址的起始位置
var n_end=-1; //初始化地址的终止位置
if(n_begin>=0)//如果开始位置存在
  {
    n_begin+=str_href.length;
 str_temp=str_link.substring(n_begin,n_begin+1);//取href=后的第一个字符
 //如果此字符不为'或"号，那么地址的终止符必为空格或>,否则为'或"
 if(str_temp!="'"&&str_temp!="\"")
 {
     str_temp=" ";//先给str_temp赋值为空格
 }
 else
 {
     n_begin+=1;//跳过'或"号
 }
 n_end=str_link.indexOf(str_temp,n_begin);//搜索终止位置
 if(n_end==-1)n_end=str_link.indexOf(">",n_begin);//如果不存在，则搜索>号
 if(n_end>n_begin)//如果终止位置存在，终止位置一定大于起始位置
 {
    str_temp=str_link.substring(n_begin,n_end);//取得地址
    return str_temp;
 }
  }
  return null;
}

function ani_pic()
{
	this.imgcounts=0;
	this.imgUrl1=new Array();
	this.imgLink1=new Array();
	this.jumpUrl1="";
	this.img_id="";
	
	this.key=0;
	this.adNum1=0;
	this.addimg=function(str_src,str_url){
	this.imgcounts++;
		this.imgUrl1[this.imgcounts]=str_src;
		this.imgLink1[this.imgcounts]=str_url;
		
		this.jumpUrl1=this.imgLink1[this.imgcounts];
	}
	this.playTran1=function(){
		if (document.all)
		{
		    document.all(this.img_id).filters.revealTrans.play();
		}
	}
	this.nextAd1=function(){
		if(this.adNum1<this.imgcounts)this.adNum1++ ;
		else this.adNum1=1;
		if( this.key==0 ){
		  this.key=1;
		} else{
		   if (document.all){
		      document.all(this.img_id).filters.revealTrans.Transition=23;
			  document.all(this.img_id).filters.revealTrans.apply();
			  this.playTran1();
		    }
		}
		document.all(this.img_id).src=this.imgUrl1[this.adNum1];
	}
	this.goUrl1=function(){
		this.jumpUrl1=this.imgLink1[this.adNum1];
		var jumpTarget='_blank';
		if (this.jumpUrl1 != ''){
		  if (jumpTarget != '')window.open(this.jumpUrl1,jumpTarget);
		  else location.href=this.jumpUrl1;
		}
	}
}
