var AdObj = {
	TopRightBar:null	//ÓÒ²à·´Ò³
}
//auto update end
AdObj.TopCouplet = '<!-- BEGIN LivePerson Button Code --><div  ><table border="0" cellspacing="2" cellpadding="2"><tr><td align="center"></td><td align="center"><a id="_lpChatBtn" href="http://server.iad.liveperson.net/hc/11332378/?cmd=file&file=visitorWantsToChat&site=11332378&byhref=1&imageUrl=http://gold4rs.com/images/gold_07.gif" target="chat11332378"  onClick="lpButtonCTTUrl = \'http://server.iad.liveperson.net/hc/11332378/?cmd=file&file=visitorWantsToChat&site=11332378&imageUrl=http://gold4rs.com/images/gold_07.gif&referrer=\'+escape(document.location); lpButtonCTTUrl = (typeof(lpAppendVisitorCookies) != \'undefined\' ? lpAppendVisitorCookies(lpButtonCTTUrl) : lpButtonCTTUrl); window.open(lpButtonCTTUrl,\'chat11332378\',\'width=475,height=500,resizable=yes\');return false;" ></a><script type="text/javascript"> var img=new Image();img.style.border="0";img.name="hcIcon";img.src="http://www.gold4rs.com/images/gold_07.gif";var par=document.getElementById("_lpChatBtn");if(par!=null){par.appendChild(img);}</script></td> </tr></table> </div><!-- END LivePerson Button code -->';




//var delta=0.015;
var delta=0.15;
var collection;
var closeB=false;
function floaters() {
this.items = [];
this.addItem = function(id,x,y,content)
{
document.write('<DIV id='+id+' style="Z-INDEX: 10; POSITION: absolute; left:'+(typeof(x)=='string'?eval(x):x)+';top:'+content+'</DIV>');
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()',30);
}
}
function getScroll() {
var t, l, dde=document.documentElement, db=document.body;
if (dde && (dde.scrollTop || dde.scrollLeft)) {
t = dde.scrollTop;
l = dde.scrollLeft;
} else if (db) {
t = db.scrollTop;
l = db.scrollLeft;
} else {}
return { top: t, left: l };
}
function play()
{
if(screen.width<=800 || closeB)
{
for(var i=0;i<collection.length;i++)
	collection[i].object.style.display = 'none';
return;
}
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;
}
var viewpos = getScroll();
if(followObj.offsetTop!=(viewpos.top+followObj_y)) {
	var dy=(viewpos.top+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 closeBanner1(index)
{
	document.getElementById('followDiv' + index).outerHTML = '';
}

if (AdObj.TopCouplet!=null || AdObj.BottomCouplet!=null){
	var theFloaters = new floaters();	//Ê×Ò³¶ÔÁª

	if (AdObj.TopCouplet!=null){
		theFloaters.addItem('followDiv1',0,0,AdObj.TopCouplet);
	}

	if (AdObj.BottomCouplet1!=null) theFloaters.addItem('followDiv3',0,'document.documentElement.clientHeight-140',AdObj.BottomCouplet1);
	if (AdObj.BottomCouplet1!=null) theFloaters.addItem('followDiv4','document.documentElement.clientWidth-100','document.documentElement.clientHeight-140',AdObj.BottomCouplet2);

	theFloaters.play();
}

