﻿document.writeln('<div style="position: absolute; left: 90%; height: 190px; top: 910px; display:none; bgcolor:#ffffff" id="floatChat">');
document.writeln("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("<tr>");
document.writeln("  <td><img src=\"image/closeq.gif\" width=\"107\" height=\"55\" /></td>");
document.writeln("</tr>");
document.writeln("<tr> ");
document.writeln("<td height=\"104\" valign=\"top\" background=\"image/bot_001.gif\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">");
document.writeln("  <tr>");
document.writeln("    <td align=\"center\"><div></div><a href=\"http://wpa.qq.com/msgrd?v=3&uin=382572963&site=qq&menu=yes\" target=\"_blank\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:382572963:41\" alt=\"点击这里给我发消息\" title=\"点击这里给我发消息\"></a></td>");
document.writeln("  </tr>");
document.writeln("  <tr>");
document.writeln("    <td align=\"center\"><div></div><a href=\"http://wpa.qq.com/msgrd?v=3&uin=382572963&site=qq&menu=yes\" target=\"_blank\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:382572963:41\" alt=\"点击这里给我发消息\" title=\"点击这里给我发消息\"></a></td>");
document.writeln("  </tr>");
document.writeln("    <td align=\"center\"><div></div><a href=\"http://wpa.qq.com/msgrd?v=3&uin=287842622&site=qq&menu=yes\" target=\"_blank\"><img border=\"0\" src=\"http://wpa.qq.com/pa?p=2:287842622:41\" alt=\"点击这里给我发消息\" title=\"点击这里给我发消息\"></a></td>");
document.writeln("</table></td>");
document.writeln("</tr>");
document.writeln("</table>");
document.writeln('</div>');

obj=document.getElementById("floatChat");
obj.style.top=(window.screen.availHeight*0.25)+"px";
 
lastScrollYChat=0;
function floatDiv(){ 
	var diffY;
	if (document.documentElement && document.documentElement.scrollTop)
		diffY = document.documentElement.scrollTop;
	else if (document.body)
		diffY = document.body.scrollTop
	else{/*Netscape stuff*/}
		
	percent=.1*(diffY-lastScrollYChat); 
	if(percent>0)percent=Math.ceil(percent); 
	else percent=Math.floor(percent);
	document.getElementById("floatChat").style.top=parseInt(document.getElementById("floatChat").style.top)+percent+"px";
	lastScrollYChat=lastScrollYChat+percent;
}
setTimeout(function(){if(getCookie("chatCancel")!="y"){document.getElementById('floatChat').style.display = '';window.setInterval("floatDiv()",1);}}, 1500);

function chatCancel(){
	setCookie ("chatCancel","y");
	document.getElementById('floatChat').style.display = 'none';
}
function SendRequest(){
	document.getElementById('floatChat').style.display = 'none';
	popup=window.open("/customer/win_call.net", '_blank');
	if (!popup.opener)	popup.opener = self;
	popup.focus();
}
function setCookie(name, value)
{
	var expire = "";
	expire = new Date((new Date()).getTime() + (1000*60*60));
	expire = "; expires=" + expire.toGMTString();
	document.cookie = name + "=" + escape(value) + expire;
}

function getCookie(name)
{
	var cookieValue = "";
	var search = name + "=";
	if(document.cookie.length > 0)
	{ 
		offset = document.cookie.indexOf(search);
		if (offset != -1)
		{ 
			offset += search.length;
			end = document.cookie.indexOf(";", offset);
			if (end == -1) end = document.cookie.length;
			cookieValue = unescape(document.cookie.substring(offset, end))
		}
	}
	return cookieValue;
}
var popUpWin=0;
