var delta=0.1
	var collection;
	function floaters() {
		this.items	= [];
		this.addItem = function(id,x,y,content)
				  {
					mydiv=document.createElement("div");
					mydiv.setAttribute("id",id);
					mydiv.setAttribute("style","Z-INDEX: 100; POSITION: absolute; width:105px; border:1px solid #00f; text-align:center; height:300px;vertical-align:TOP; left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'");
					mydiv.style.cssText="Z-INDEX: 100; POSITION: absolute; width:105px; text-align:center; height:300px;vertical-align:TOP; left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'";
					mydiv.innerHTML=content;
					document.body.appendChild(mydiv);
					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+"px";
					//alert(followObj.style.height)
				}

				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+"px";
					}
				followObj.style.display	= '';
			}
		}
function leftAD(){
	/*
	var kf=("<div style=\"width:105px; font-size:12px;\">");
		kf+=("<div style=\"background:url(..\/images\/kf2.gif) no-repeat 0 0; height:43px; width:105px\"><img alt=\"关闭\" onclick=\"followDiv2.style.visibility=\'hidden\';followDiv1.style.visibility=\'hidden\'\" style=\"float:right; margin-right:6px; margin-top:3px; cursor:pointer\" src=\"..\/images\/kf1.gif\" width=\"10\" height=\"10\" \/><\/div>");
		if(typeof ActiveXObject=="undefined"){
			kf+=("<div style=\"border:1px solid #BDBDBD; background:#fff; border-bottom:0; border-top:0;height:200px; width:103px\">");
		}else{
			kf+=("<div style=\"border:1px solid #BDBDBD; background:#fff; border-bottom:0; border-top:0;height:200px; width:105px\">");	
		}
		kf+=("	<div style=\"width:60px; height:16px; padding-top:6px; background:url(..\/images\/kf3.gif) no-repeat center bottom; color:#f00; margin:0 auto;text-align:center\">客服电话<\/div>");
		kf+=("	<div style=\"width:100%; height:30px; margin-top:5px; text-align:center;line-height:135%; font-size:11px;letter-spacing:-1px\">(010)68730599-6677<br \/>(010)68730599-7766<\/div>");
		kf+=("	<div style=\"width:60px; height:16px; background:url(..\/images\/kf3.gif) no-repeat center bottom; color:#f00; margin:0 auto; margin-top:6px;text-align:center\">客服QQ<\/div>");
		kf+=("	<div style=\"width:100%; height:45px; margin-top:5px; text-align:center;font-size:12px;letter-spacing:normal\"><a target=_self href=tencent:\/\/message\/?uin=100918011&Site=www.zhcw.com&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:100918011:9 style=\"margin-bottom:3px\" alt=\"客服1：无须验证，立刻和我们联系\"><\/a><br \/><a target=_self href=tencent:\/\/message\/?uin=100918009&Site=www.zhcw.com&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:100918009:9 alt=\"客服2：无须验证，立刻和我们联系\"><\/a><\/div>");
		kf+=("	<div style=\"width:60px; height:16px; background:url(..\/images\/kf3.gif) no-repeat center bottom; color:#f00; margin:0 auto; margin-top:6px; text-align:center\">代购平台<\/div>");
		kf+=("	<div style=\"width:100%; height:20px; margin-top:5px; text-align:center;line-height:135%; font-size:11px;letter-spacing:-1px\">(010)68730599-6640<br \/><a target=_self href=tencent:\/\/message\/?uin=100918016&Site=www.zhcw.com&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:100918016:9 style=\"margin-bottom:3px\" alt=\"合买代购客服：无须验证，立刻和我们联系\"><\/a><\/div>");
		kf+=("<\/div>");
		if(typeof ActiveXObject=="undefined"){
			kf+=("<div style=\"background:url(..\/images\/kf5.gif) repeat-x 0 0;border:1px solid #BDBDBD;border-bottom:0; border-top:0; height:39px; padding-top:7px; font-size:12px;letter-spacing:normal; line-height:150%;  width:103px; text-align:center\"><a href=\"http:\/\/service.zhcw.com\/dajia\/\" title=\"3.15中彩网特别专题-打击网络诈骗，提高彩民防范意识\" target=\"_blank\">骗子网站投诉<\/a><br \/>");
		}else{
			kf+=("<div style=\"background:url(..\/images\/kf5.gif) repeat-x 0 0;border:1px solid #BDBDBD;border-bottom:0; border-top:0; height:39px; padding-top:7px; font-size:12px;letter-spacing:normal; line-height:150%;  width:105px; text-align:center\"><a href=\"http:\/\/service.zhcw.com\/dajia\/\" title=\"3.15中彩网特别专题-打击网络诈骗，提高彩民防范意识\" target=\"_blank\">骗子网站投诉<\/a><br \/>");
		}
		kf+=("  <a href=\"http:\/\/www.zhcw.com\/help\/user.htm\" target=\"_blank\" title=\"客服帮助中心\">常见问题解答<\/a><\/div>");
		kf+=("<div style=\"background:url(..\/images\/kf4.gif) no-repeat 0 0;  height:6px; width:105px;\"><\/div>");
		kf+=("<\/div>");
		*/
	var kf=("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"position:absolute; width:118px; height:55px; z-index:10; left: 0px; top: 80px\">");
	    kf+=("<tr><td background=\"http:\//www.buyboon.com\/images\/up_new_002.gif\" align=\"center\">百帮在线交流</td></tr>");
		kf+=("<tr><td background=\"http:\//www.buyboon.com\/images\/mid_new_002.gif\" width=\"118\">");
		kf+=("<div align=\"center\"><br>");
		kf+=("<a target=_self href=tencent:\/\/message\/?uin=44347353&Site=www.buyboon.com&Menu=yes><img border=\"0\" SRC=images\/10_online.gif style=\"margin-bottom:3px\" alt=\"百帮客服①：无须验证，立刻和我们联系\"><br>百帮客服①<\/a><br \/>");
	    // kf+=("<a target=_self href=tencent:\/\/message\/?uin=334126266&Site=www.buyboon.com&Menu=yes><img border=\"0\" SRC=http:\/\/wpa.qq.com\/pa?p=1:334126266:16 style=\"margin-bottom:3px\" alt=\"百帮客服②：无须验证，立刻和我们联系\"><br>百帮客服②<\/a><br \/>");

	    kf+=("<a href=\"callto:\//buyboon\" onclick=\"return skypeCheck();\"><img src=\"http:\//www.buyboon.com\/images\/skype.gif\" border=\"0\" alt=\"呼叫客服\"><br>百帮Skype<\/a><br>");

	    kf+=("<a href=\"msnim:chat?contact=94easy@live.cn\" target=\"_blank\"><img src=\"http:\//www.buyboon.com\/images\/msn.gif\" border=\"0\" alt=\"点击与94easyMSN即时对话\" \/><br>百 帮MSN①<\/a><br>");

	    kf+=("<a href=\"http:\//amos1.taobao.com\/msg.ww?v=1&uid=yulephone&s=1\" target=\"_blank\"><img src=\"http:\//amos1.taobao.com\/online.ww?v=1&uid=yulephone&s=1\" border=\"0\" alt=\"点击与yulephone阿里旺旺（淘宝）即时对话\" \/><br>百帮旺旺①<\/a><br>");
	    kf+=("<a href=\"http:\//amos1.taobao.com\/msg.ww?v=1&uid=hfyugf163&s=1\" target=\"_blank\"><img src=\"http:\//amos1.taobao.com\/online.ww?v=1&uid=hfyugf163&s=1\" border=\"0\" alt=\"点击与hfyugf163阿里旺旺（淘宝）即时对话\" \/><br>百帮旺旺②<\/a><br>");
	    kf+=("<a href=\"http:\//web.im.alisoft.com\/msg.aw?v=2&uid=yulephone&site=cnalichn&s=2\" target=\"_blank\"><img src=\"http:\//web.im.alisoft.com\/online.aw?v=2&uid=yulephone&site=cnalichn&s=2\" border=\"0\" width=\"77\" height=\"20\"  alt=\"点击与yulephonea阿里旺旺（贸易通）即时对话\" \/><br>百帮贸易通<\/a><br>");
		kf+=("<br><\/div>");
        kf+=("</td></tr>");
		kf+=("<tr><td background=\"http:\//www.buyboon.com\/images\/down_new_002.gif\" align=\"center\">www.buyboon.com</td></tr>");
		kf+=("</table>");
    
  
	    
	var theFloaters	= new floaters();
	//右面
	//theFloaters.addItem('followDiv1','document.body.clientWidth-110',80,'<EMBED src=images/banner/hemai_3.swf quality=high  WIDTH=110 HEIGHT=307 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>');
	//左面
	//theFloaters.addItem('followDiv2',6,80,'<a onclick=followDiv2.style.visibility=\'hidden\' target="javascript:void(0)"   style="position:absolute;top:6px; left:95px"><span style="cursor:hand;">×</span></a>');
	theFloaters.addItem('followDiv2',0,80,kf);
	theFloaters.play();
}


var activex = ((navigator.userAgent.indexOf('Win')  != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 ));
var CantDetect = ((navigator.userAgent.indexOf('Safari')  != -1) || (navigator.userAgent.indexOf('Opera')  != -1));
function oopsPopup() {
	var windowName = "oops";
	var URLtoOpen = "http://download.skype.tom.com/Tom-SkypeSetup.exe";
	oopswindow = window.open(URLtoOpen, windowName);
	return false;
}
if(typeof(detected) == "undefined" && activex) {
    document.write(
        ['<script language="VBscript">',
        'Function isSkypeInstalled()',
        'on error resume next',
        'Set oSkype = CreateObject("Skype.Detection")',
        'isSkypeInstalled = IsObject(oSkype)',
        'Set oSkype = nothing',
        'End Function',
        '</script>'].join("\n")
    );
}
function skypeCheck() {
    if(CantDetect) {
        return true;
    } else if(!activex) {
        var skypeMime = navigator.mimeTypes["application/x-skype"];
        detected = true;
        if(typeof(skypeMime) == "object") {
            return true;
        } else {
            return oopsPopup();
        }
    } else {
        if(isSkypeInstalled()) {
            detected = true;
            return true;
        }
    }
    
    detected = true;
    return oopsPopup();
}
