var brOK=false;
var mie=false;
var vmin=2;
var vmax=5;
var vr=1;
var timer1;
function movechip(chipname)
{
	if(brOK)
	{
		eval("chip="+chipname);
		if(!mie)
		{
			pageX=window.pageXOffset;
			pageW=window.innerWidth;
			pageY=window.pageYOffset;
			pageH=window.innerHeight;
		} 
		else
		{
			pageX=window.document.body.scrollLeft;
			pageW=window.document.body.offsetWidth-8;
			pageY=window.document.body.scrollTop;
			pageH=window.document.body.offsetHeight;
		}
		chip.xx=chip.xx+chip.vx;
		chip.yy=chip.yy+chip.vy;
		chip.vx+=vr*(Math.random()-0.5);
		chip.vy+=vr*(Math.random()-0.5);
		if(chip.vx>(vmax+vmin))  chip.vx=(vmax+vmin)*2-chip.vx;
		if(chip.vx<(-vmax-vmin)) chip.vx=(-vmax-vmin)*2-chip.vx;
		if(chip.vy>(vmax+vmin))  chip.vy=(vmax+vmin)*2-chip.vy;
		if(chip.vy<(-vmax-vmin)) chip.vy=(-vmax-vmin)*2-chip.vy;
		if(chip.xx<=pageX)
		{
			chip.xx=pageX;
			chip.vx=vmin+vmax*Math.random();
		}
		if(chip.xx>=pageX+pageW-chip.w)
		{
			chip.xx=pageX+pageW-chip.w;
			chip.vx=-vmin-vmax*Math.random();
		}
		if(chip.xx>=680)
		{
			chip.xx=chip.xx-20;
			chip.vx=-vmin-vmax*Math.random();
		}
		if(chip.yy<=pageY)
		{
			chip.yy=pageY;
			chip.vy=vmin+vmax*Math.random();
		}
		if(chip.yy>=pageY+pageH-chip.h)
		{
			chip.yy=pageY+pageH-chip.h;
			chip.vy=-vmin-vmax*Math.random();
		}
		if(!mie)
		{
			eval('document.'+chip.named+'.top ='+chip.yy);
			eval('document.'+chip.named+'.left='+chip.xx);
		}
		else
		{
			eval('document.all.'+chip.named+'.style.pixelLeft='+chip.xx);
			eval('document.all.'+chip.named+'.style.pixelTop ='+chip.yy);
		}
		chip.timer1=setTimeout("movechip('"+chip.named+"')",80);
	}
}

function stopme(chipname)
{
	if(brOK)
	{
		eval("chip="+chipname);
		if(chip.timer1!=null)
		{
			clearTimeout(chip.timer1)
		}
	}
}

if(navigator.appName.indexOf("Internet Explorer")!=-1){
	if(parseInt(navigator.appVersion.substring(0,1))>=4) brOK=navigator.javaEnabled();mie=true;
}
if(navigator.appName.indexOf("Netscape")!=-1){
	if(parseInt(navigator.appVersion.substring(0,1))>=4) brOK=navigator.javaEnabled();
}

function outMove(divname,isflash,pic,alt,url,flashurl,width,height){
	document.write('<span id="' + divname + '" style="height:49px;left:178px;position:absolute;top:1237px;width:70px; z-index:1000">');
	if (isflash>0){
		document.write("<EMBED src='" + flashurl + "' quality=high  WIDTH='" + width + "' HEIGHT='" + height + "' TYPE='application/x-shockwave-flash'></EMBED>");
	}else{
		document.write("<a href='" + url + "' target=_blank onmouseover=stopme('" + divname + "'); onmouseout=movechip('" + divname + "');>");
		document.write("<img src='" + pic + "' alt='" + alt + "' border=0 width='" + width + "' height='" + height + "'></a>");
	}
	document.write("</span>");
}

function addMove(divname,isflash,pic,alt,url,flashurl,width,height,x,y){
	outMove(divname,isflash,pic,alt,url,flashurl,width,height);
	eval("theDiv="+divname);
	theDiv.named=divname;
	theDiv.vx=vmin+vmax*Math.random();
	theDiv.vy=vmin+vmax*Math.random();
	theDiv.w=1;
	theDiv.h=1;
	theDiv.xx=x;
	theDiv.yy=y;
	theDiv.timer1=null;
	movechip(divname);
}
	
	var delta=0.15
	var collection;
	function floaters() {
		this.items	= [];
		this.addItem	= function(id,x,y,content)
				  {
					document.write('<span id='+id+' style="Z-INDEX: 10; POSITION: absolute;  width:100px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'</span>');
					
					var newItem				= {};
					newItem.object			= document.getElementById(id);
					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.body.scrollLeft+followObj_x)) {
					var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
					dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
					followObj.style.left=followObj.offsetLeft+dx;
					}

				if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
					var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
					dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
					followObj.style.top=followObj.offsetTop+dy;
					}
				//followObj.style.display	= '';
			}
		}	
		
	var theFloaters		= new floaters();

	theFloaters.addItem("followDivR_1",'document.body.clientWidth-113',67,"<table bgcolor='#ffffff' width='110' border='0' cellspacing='0' cellpadding='0' style='border: 1px solid #cccccc;'><tr><td height='25' align='center'><img src='/images/online_customer_head.gif'></td></tr><tr><td><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='center'><a href='http://wpa.qq.com/msgrd?V=1&amp;Uin=425681361&amp;Site=www.worldlabel.com.cn&amp;Menu=yes' title='请确保已安装好QQ软件' target=_blank><img border='0' src='http://wpa.qq.com/pa?p=1:425681361:4' alt='QQ留言' style='font-size:11px;'>:425681361</a><td></tr></table></td></tr><tr><td height='32' align='center'><a href='#'><img src='/images/online_customer_tail.gif' border='0'></a></td></tr></table>");	

	//theFloaters.addItem('followDivL_1',0,68,'<img src=/images/gglogo/wb_right.GIF border=0 usemap=#MapL1><map name=MapL1><area shape=rect coords=67,233,114,252 href=javascript:; onclick=closeL1FloatAD() style=cursor:hand></map>');

	theFloaters.play();


/*
function closeL1FloatAD(){
	try{
	//document.all("followDiv1").style.display="none";
	document.all("followDiv1").style.display="none";
	document.all("pf1").style.display="none";
	document.all("pf2").style.display="none";
	}
	catch(e){}
}*/