/**/	var delta=0.08
	var collection;
	function floaters() {
		this.items	= [];
		this.addItem	= function(id,x,y,content_b,content_s,state,fside)
				  {
					var contral,hider,divname
					var textright = ""
					if (fside=="right")textright = "text-align: right;"
					divname="followDiv_"+id;
					document.write('<DIV id='+divname+' style="Z-INDEX: 10; POSITION: absolute; width:90px; height:200px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+';'+textright+'"><div id='+divname+'_tb>'+content_b+'</div><div id='+divname+'_ts style="display:none;">'+content_s+'</div><div id='+divname+'_b style="text-align: center;line-height:14px;padding-top:2px;"><a href="javascript:void(0);" onclick="hidefloaters(\''+id+'\',\''+fside+'\')"><img src="images/close.gif" /></a></div></DIV>');
					
					var newItem				= {};
					newItem.object			= document.getElementById(divname);
					newItem.x				= x;
					newItem.y				= y;

					this.items[this.items.length]		= newItem;
				  }
		this.play	= function()
				  {
					collection				= this.items
					setInterval('play()',10);
				  }
		}
		function play()
		{
			for(var i=0;i<collection.length;i++)
			{
				
				var followObj		= collection[i].object;
				var followObj_x		= (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
				var followObj_y		= (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

				if(followObj.offsetLeft!=(document.documentElement.scrollLeft+followObj_x)) {
					var dx=(document.documentElement.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
					dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
					followObj.style.left=followObj.offsetLeft+dx+"px";
					}

				if(followObj.offsetTop!=(document.documentElement.scrollTop+followObj_y)) {
					var dy=(document.documentElement.scrollTop+followObj_y-followObj.offsetTop)*delta;
					dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
					followObj.style.top=followObj.offsetTop+dy+"px";
					}
				followObj.style.display	= '';
			}
		}
		function gerResCode(file,ftype,url,size){
			if(ftype==1&&size)return "<EMBED src="+file+" quality=high  WIDTH=90 HEIGHT=180 TYPE=application/x-shockwave-flash wmode=opaque></EMBED>";
			if(ftype==1&&!size)return "<EMBED src="+file+" quality=high  WIDTH=20 HEIGHT=180 TYPE=application/x-shockwave-flash wmode=opaque></EMBED>";
			if(ftype==2&&size)return "<a href="+url+" target=blank><img src="+file+" width=90 height=180 border=0></a>";
			if(ftype==2&&!size)return "<a href="+url+" target=blank><img src="+file+" width=20 height=180 border=0></a>";
		}
		function createfloaters(){
			if(floaters.length==0)return false;
			var l_height = 30,r_height = 30;
			var res = '';
			for(i=0;i<floaters.length;i++){
				if(floaters[i][0]=="left"){
					theFloaters.addItem(i,5,l_height,gerResCode(floaters[i][3],floaters[i][1],floaters[i][5],true),gerResCode(floaters[i][4],floaters[i][2],floaters[i][5],false),true,floaters[i][0]);
					l_height += 300;
				}
				if(floaters[i][0]=="right"){
					theFloaters.addItem(i,'document.documentElement.clientWidth-95',r_height,gerResCode(floaters[i][3],floaters[i][1],floaters[i][5],true),gerResCode(floaters[i][4],floaters[i][2],floaters[i][5],false),true,floaters[i][0]);
					r_height += 300;
				}
			}
		}
		function hidefloaters(f_id,f_side){
			if(f_id==''){
			}else{
				if (document.getElementById("followDiv_"+f_id+"_tb")==undefined||document.getElementById("followDiv_"+f_id+"_ts")==undefined){
					return false;
				}else{
					document.getElementById("followDiv_"+f_id+"_tb").style.display = "none";
					document.getElementById("followDiv_"+f_id).style.width = "20px";
					document.getElementById("followDiv_"+f_id+"_b").innerHTML = "<a href=\"javascript:void(0);\" onclick=\"showfloaters('"+f_id+"','"+f_side+"')\"><img src=\"images/repeat.gif\" /></a>"
					if(f_side=="right"){
						document.getElementById("followDiv_"+f_id+"_ts").style.paddingLeft = "70px";
						document.getElementById("followDiv_"+f_id+"_b").style.paddingLeft = "75px";
					}
					document.getElementById("followDiv_"+f_id+"_ts").style.display = "";
					
				}
			}
		}
		
		function showfloaters(f_id,f_side){
			if(f_id==''){
			}else{
				if (document.getElementById("followDiv_"+f_id+"_tb")==undefined||document.getElementById("followDiv_"+f_id+"_ts")==undefined){
					return false;
				}else{
					document.getElementById("followDiv_"+f_id+"_ts").style.display = "none";
					document.getElementById("followDiv_"+f_id).style.width = "90px";
					document.getElementById("followDiv_"+f_id+"_b").innerHTML = "<a href=\"javascript:void(0);\" onclick=\"hidefloaters('"+f_id+"','"+f_side+"')\"><img src=\"images/close.gif\" /></a>"
					if(f_side=="right"){
						document.getElementById("followDiv_"+f_id+"_ts").style.paddingLeft = "";
						document.getElementById("followDiv_"+f_id+"_b").style.paddingLeft = "";
					}
					document.getElementById("followDiv_"+f_id+"_tb").style.display = "";
				}
			}
		}
		function hideALLfloaters(){
			if(floaters.length==0)return false;
			for(i=0;i<floaters.length;i++){
				if (document.getElementById("followDiv_"+i)!=undefined){
					hidefloaters(i.toString(),floaters[i][0]);
				}
			}
		}

	var theFloaters		= new floaters();
	var floaters = new Array();
	/*
	*20090209
	*说明：floaters.push([“位置”,“广告格式a”,“广告格式b”,“广告路径a”,“广告路径b”,"广告链接"]);
	*其中广告格式，1为FLASH广告，2为图片
	*广告a为大广告，尺寸180X90，b为小广告，尺寸180X20
	*广告链接只对图片广告有效
	*允许大小广告格式不一样
	*左右广告顺序可以交叉
	*/
//	floaters.push(["left",1,1,"testad_1.swf","testad_2.swf",""]);
//	floaters.push(["left",1,1,"testad_1.swf","testad_2.swf",""]);
	floaters.push(["left",1,1,"flash/gyxc20111115.swf","flash/gyxc20_180.swf",""]);
	floaters.push(["right",1,1,"flash/ygc20111115.swf","flash/ygc20x180.swf",""]);
	floaters.push(["left",1,1,"flash/xhyz20111124.swf","flash/xhd20_180.swf",""]);
	floaters.push(["right",1,1,"flash/mjj.swf","flash/mjj20_180.swf",""]);
	//floaters.push(["left",2,2,"http://wh.ahhouse.com/res/jhdy_90x180.jpg","http://wh.ahhouse.com/res/jhdy_20x180.jpg","http://bbs.wh.ahhouse.com/viewthread.php?tid=378623&from=indexheats"]);
//	floaters.push(["left",1,1,"testad_1.swf","testad_2.swf",""]);
	
	createfloaters();
	theFloaters.play();
	//展示时间，单位毫秒
	if (document.documentElement.clientWidth<1150){setTimeout('hideALLfloaters()',15000);}
	
