function flash_ad(url,w,h,id,divid){
	document.getElementById(divid).innerHTML="<object id='"+id+"' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0' width='"+w+"' height='"+h+"'><param name='movie' value='"+url+"'><param name='wmode' value='opaque'><param name='allowScriptAccess' value='always'><param name='allowFullScreen' value='false' /><param name='quality' value='high'><param name='menu' value='false'><embed width='"+w+"' height='"+h+"' src='"+url+"' name='"+id+"' allowScriptAccess='always' allowFullScreen='false' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='opaque' type='application/x-shockwave-flash'></embed></object>";
}

function get_cookie(name){
	var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
	if(arr!=null){return unescape(arr[2]);}else{return null;}
}

function bindFun(o,fun){
	return function(){
		return fun.apply(o,arguments);
	}
}
var Class={
	create:function(){
		return function(){
			this.initialize.apply(this,arguments);
		}
	}
}
var Zooms=Class.create();
Zooms.prototype={
	initialize:function(id,h){
		this.id=document.getElementById(id);
		this.h=h;
		this.max=this.h=h;
		this.v=0;
	},
	reNew:function(){
		this.go=setInterval(bindFun(this,Goto),10);
		function Goto(){
			this.v=this.max>this.id.offsetHeight?Math.ceil((this.max-this.id.offsetHeight)/5):Math.floor((this.max-this.id.offsetHeight)/5);
			this.id.style.height=(this.id.offsetHeight+this.v)+"px";
			if(this.v==0){
				clearInterval(this.go);
				this.max!=0?this.EndOpen():this.EndClose();
			}
		}
	},
	Open:function(){this.max=this.h;this.StartOpen();this.reNew();},
	Close:function(){this.max=0;this.StartClose();this.reNew();},
	StartOpen:function(){},
	StartClose:function(){},
	EndOpen:function(){},
	EndClose:function(){}
}

//************************************************************************
function thisMovie(movieName){return window[movieName] || document[movieName];}
function clickMMM(movieName){thisMovie(movieName).silenceMe();}
function replayMMM(movieName){thisMovie(movieName).replayMe();}
//***********************************************************************


//流程
//1.setTimeout调用izoom.Open();
//2.setTimeout设置izoom.Close();
//3.网页中重播按钮调用izoom.Open();
//4.添加StartOpen、StartClose、EndOpen、EndClose事件来处理页面中其它事件。
