﻿// 默认右边
// 在IE6上总是无法显示出窗口，经过多次调试，发现在用 div + css 布局的网站上，该代码只是独立的放到最后，不能直接放在 web.bottom.asp 中，而 table 布局的网站，则没有这个问题
document.write('<div id="script_im" style="position:absolute; z-index:1000; !important;position:absolute; right:0px;">');
document.write('	<div id="script_im_top_min" style="width:66px; height:17px; background:url(system/im/10_03/top.jpg) no-repeat top; overflow:hidden; display:block;">');
document.write('		<div style="float:left; width:50px; height:17px;"></div>');
document.write('		<div id="script_im_min_id" style="float:left; width:16px; height:17px; cursor:hand;"><img src="system/im/10_03/min.jpg" width="16" height="17" border="0" onclick="javascript:script_im_min();" /></div>');
document.write('	</div>');
document.write('	<div id="script_im_top_max" style="width:66px; height:17px; background:url(system/im/10_03/top.jpg) no-repeat top; overflow:hidden; display:none">');
document.write('		<div style="float:left; width:50px; height:17px;"></div>');
document.write('		<div id="script_im_max_id" style="float:left; width:16px; height:17px; cursor:hand;"><img src="system/im/10_03/max.jpg" width="16" height="17" border="0" onclick="javascript:script_im_max();" /></div>');
document.write('	</div>');
document.write('	<div id="script_im_list_online" style="width:66px; background:url(system/im/10_03/list.jpg) repeat-y;">');
document.write('		<div style="font-weight:bold; padding:0px 0px 5px 8px;">在线咨询</div>');
document.write('	</div>');
document.write('	<div id="script_im_list" style="width:66px; background:url(system/im/10_03/list.jpg) repeat-y;">');
document.write('		<div style="padding:0px 0px 5px 8px;">深圳</div>');
document.write('		<div style="padding:0px 0px 5px 8px;">');
document.write('			<a href="tencent://message/?uin=274143148&Site=&Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=1:274143148:8" /></a>');
document.write('		</div>');
document.write('		<div style="padding:0px 0px 5px 8px;">');
document.write('			<a href="tencent://message/?uin=1422971670&Site=&Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=1:1422971670:8" /></a>');
document.write('		</div>');
document.write('		<div style="padding:0px 0px 5px 8px;">北京</div>');
document.write('		<div style="padding:0px 0px 5px 8px;">');
document.write('			<a href="tencent://message/?uin=1637687656&Site=&Menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=1:1637687656:8" /></a>');
document.write('		</div>');
// document.write('		<div style="padding:0px 0px 5px 8px;">');
// document.write('			<a href=tencent://message/?uin=274143148&Site=&Menu=yes><img src="system/im/10_03/qq.jpg" width="49" height="42" border="0" alt="" /></a>');
// document.write('		</div>');
// document.write('		<div style="padding:0px 0px 5px 8px;">');
// document.write('			<a href="msnim:chat?contact=realone-yourker@hotmail.com"><img src="system/im/10_03/msn.jpg" width="49" height="42" border="0" /></a>');
// document.write('		</div>');
// document.write('		<div style="padding:0px 0px 5px 8px;">');
// document.write('			<a href="skype:realone-yourker?call"><img src="system/im/10_03/skype.jpg" width="49" height="42" border="0" /></a>');
// document.write('		</div>');
document.write('	</div>');
document.write('	<div id="script_im_bottom" style="width:66px; height:10px; background:url(system/im/10_03/bottom.jpg) no-repeat top; overflow:hidden;"></div>');
document.write('</div>');

function auto_scroll()
{
	// document.getElementById("script_im").style.top = document.documentElement.scrollTop;
	var startY = 450;
	if(document.getElementById("script_im_top_min").style.display == "none")
	{
		startY = 53;	
	}
	var y = document.documentElement.scrollTop + document.documentElement.clientHeight;
	document.getElementById("script_im").style.top = y - startY;
}

window.onscroll = auto_scroll;
window.onresize = auto_scroll;
// 以下代码可能会与其他地方有冲突，因为 window.onload 只能运行一次，直接改为运行函数即可
// window.onload = auto_scroll;
auto_scroll();

function script_im_min()
{
	document.getElementById("script_im_list").style.display = "none";
	document.getElementById("script_im_top_min").style.display = "none";
	document.getElementById("script_im_top_max").style.display = "block";
	auto_scroll();
}

function script_im_max()
{
	document.getElementById("script_im_list").style.display = "block";
	document.getElementById("script_im_top_min").style.display = "block";
	document.getElementById("script_im_top_max").style.display = "none";
	auto_scroll();
}
