﻿<!--
//2007.8.28 升级，QQ支持拖动及缩放
//已知问题：当层遇到下拉框时总是挡不了select框，其实这是IE的BUG,其它的浏览器没有这个问题
//虽然用iframe作载体可以档住select层，但无法做边框透明效果
//2010.1.30 升级，解决是否在线问题
//E-Mail:m.zy@163.com  QQ:17948700 米

tmphtml="<di"
tmphtml+="v id='divStayTopLeft' style='z-index: 100; position: absolute; border:0px solid; visibility: "
tmphtml+="visible; LEFT: "
tmphtml+="-"
tmphtml+="850px; WIDTH: 110px; POSITION: absolute; TOP: 35px; HEIGHT: 105px'>"
tmphtml+="<di"
tmphtml+="v id='controlor' style='BORDER-RIGHT: 0px solid; BORDER-TOP: 0px solid; LEFT: 116px; BORDER-LEFT: 0px solid; WIDTH: 20px; CURSOR: hand; BORDER-BOTTOM: 0px solid; POSITION: absolute; TOP: 23px' onclick='reloadqq()'>"
tmphtml+="<img title='[点击隐藏]' height='0' src='/qqmoban/images/qq/colsed_2.gif' onload='d=1;' wdith='0'><img id='col' ondrag='return false' title='[点击隐藏]' src='/qqmoban/images/qq/colsed_1.gif'>"
tmphtml+="<di"
tmphtml+="v id='onlinetalk' ondrag='return false' onmouseover='reloadqq();d+=1' style='display: none; font-size: 12px; width: 50px; color: #990000; height: 60px; text-align: right; border-left: 0px solid; border-right: 1px solid #cc9900; border-top: 1px solid #cc9900; border-bottom: 1px solid #cc9900; padding-top: 2px; padding-bottom: 3px; background: #ffffeb;'>"
tmphtml+="<img ondrag='return false' src='/qqmoban/images/qq/talk.gif'><b>"
tmphtml+="千千名片客服"
tmphtml+="</b></div></div><"
tmphtml+="table id='table6' border='0' cellspacing='0' cellpadding='0'>"
tmphtml+="<tr><td><img border=0 src=/qqmoban/images/qq/up1.gif style='cursor: move;'></td></tr>"
tmphtml+="<tr><td><"
tmphtml+="table width=118 border=0 bgcolor=#FFFFFF background=/qqmoban/images/qq/mid1.gif>"

tmphtml+="<tr><td align=center><"
tmphtml+="img style='CURSOR: pointer'"
tmphtml+=" onclick='javascript:window.open("
tmphtml+='"http://webchat.tq.cn/sendmain.jsp?uin=8358888&amp;ltype=0&amp;page=&amp;localurl="'
tmphtml+="+document.location.href+"
tmphtml+='"&amp;uingroup=8358888|8355888&amp;chattype=5&amp;transferpage=1&amp;tq_bottom_ad_url=http://qtt.tq.cn/post/sendmain.html&amp;tq_right_infocard_url=http://qtt.tq.cn/showcard.do&amp;buttonsflag=&amp;buttonsflag=&amp;iscallback=&amp;agentid=0&amp;isnoshowuser=no","","width=432,height=462,location=no,resizable=0,scrollbars=0,status=no,toolbar=no,menu=no,top=100,left=200")'
tmphtml+="' src="
tmphtml+='"/qqmoban/images/qq/talk.gif" alt="TQ:8358888-在线业务咨询">'
tmphtml+='</td>'
tmphtml+='<td align="left"><'
tmphtml+="a class='b' "
tmphtml+='target=blank style="CURSOR: pointer" onclick='
tmphtml+="'javascript:window.open("
tmphtml+='"http://webchat.tq.cn/sendmain.jsp?uin=8358888&amp;ltype=0&amp;page=&amp;localurl="+document.location.href+"&amp;uingroup=8358888|8355888&amp;chattype=5&amp;transferpage=1&amp;tq_bottom_ad_url=http://qtt.tq.cn/post/sendmain.html&amp;tq_right_infocard_url=http://qtt.tq.cn/showcard.do&amp;buttonsflag=&amp;buttonsflag=&amp;iscallback=&amp;agentid=0&amp;isnoshowuser=no","","width=432,height=462,location=no,resizable=0,scrollbars=0,status=no,toolbar=no,menu=no,top=100,left=200")'
tmphtml+="' alt="
tmphtml+='"TQ:8358888-在线业务咨询">'
tmphtml+="<font color='#FF0000'>在线业务咨询</font></a></td></tr>"

tmphtml+="<tr><td align=center><"
tmphtml+="img style='CURSOR: pointer'"
tmphtml+=" onclick='javascript:window.open("
tmphtml+='"http://webchat.tq.cn/sendmain.jsp?uin=8355888&amp;ltype=0&amp;page=&amp;localurl="'
tmphtml+="+document.location.href+"
tmphtml+='"&amp;uingroup=8358888|8355888&amp;chattype=5&amp;transferpage=1&amp;tq_bottom_ad_url=http://qtt.tq.cn/post/sendmain.html&amp;tq_right_infocard_url=http://qtt.tq.cn/showcard.do&amp;buttonsflag=&amp;buttonsflag=&amp;iscallback=&amp;agentid=0&amp;isnoshowuser=no","","width=432,height=462,location=no,resizable=0,scrollbars=0,status=no,toolbar=no,menu=no,top=100,left=200")'
tmphtml+="' src="
tmphtml+='"/qqmoban/images/qq/talk.gif" alt="TQ:8355888-在线印刷报价">'
tmphtml+='</td>'
tmphtml+='<td align="left"><'
tmphtml+="a class='b' "
tmphtml+='target=blank style="CURSOR: pointer" onclick='
tmphtml+="'javascript:window.open("
tmphtml+='"http://webchat.tq.cn/sendmain.jsp?uin=8355888&amp;ltype=0&amp;page=&amp;localurl="+document.location.href+"&amp;uingroup=8358888|8355888&amp;chattype=5&amp;transferpage=1&amp;tq_bottom_ad_url=http://qtt.tq.cn/post/sendmain.html&amp;tq_right_infocard_url=http://qtt.tq.cn/showcard.do&amp;buttonsflag=&amp;buttonsflag=&amp;iscallback=&amp;agentid=0&amp;isnoshowuser=no","","width=432,height=462,location=no,resizable=0,scrollbars=0,status=no,toolbar=no,menu=no,top=100,left=200")'
tmphtml+="' alt="
tmphtml+='"TQ:8355888-在线印刷报价">'
tmphtml+="<font color='#FF0000'>在线印刷报价</font></a></td></tr>"


if (online[0]==0){;
tmphtml+="<!-- <tr><td align=center><"
tmphtml+="a class='c' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=583086601&Site=千千名片&Menu=no'><img alt='583086601千千名片客服离线' src=/qqmoban/images/qq/QQoff2.gif border=0 align=middle></a></td><td><"
tmphtml+="a class='c' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=583086601&Site=千千名片&Menu=no' alt='QQ:583086601千千名片客服离线'>印刷设计报价</a></td></tr> -->"
}else{;
tmphtml+="<!-- <tr><td align=center><"
tmphtml+="a class='b' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=583086601&Site=千千名片&Menu=no'><img alt='583086601千千名片客服在线' src=/qqmoban/images/qq/QQon2.gif border=0 align=middle></a></td><td><"
tmphtml+="a class='b' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=583086601&Site=千千名片&Menu=no' alt='QQ:583086601千千名片客服在线'>印刷设计报价</a></td></tr> -->"
};

if (online[1]==0){;
tmphtml+="<tr><td align=center><"
tmphtml+="a class='c' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=604796111&Site=千千名片&Menu=no'><img alt='604796111千千名片客服离线' src=/qqmoban/images/qq/QQoff2.gif border=0 align=middle></a></td><td><"
tmphtml+="a class='c' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=604796111&Site=千千名片&Menu=no' alt='QQ:604796111千千名片客服离线'>名片制作报价</a></td></tr>"
}else{;
tmphtml+="<tr><td align=center><"
tmphtml+="a class='b' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=604796111&Site=千千名片&Menu=no'><img alt='604796111千千名片客服在线' src=/qqmoban/images/qq/QQon2.gif border=0 align=middle></a></td><td><"
tmphtml+="a class='b' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=604796111&Site=千千名片&Menu=no' alt='QQ:604796111千千名片客服在线'>名片制作报价</a></td></tr>"
};

if (online[2]==0){;
tmphtml+="<tr><td align=center><"
tmphtml+="a class='c' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=17948700&Site=千千名片&Menu=no'><img alt='17948700千千名片客服离线' src=/qqmoban/images/qq/QQoff2.gif border=0 align=middle></a></td><td><"
tmphtml+="a class='c' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=17948700&Site=千千名片&Menu=no' alt='QQ:17948700千千名片客服离线'>技术支持</a></td></tr>"
}else{;
tmphtml+="<tr><td align=center><"
tmphtml+="a class='b' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=17948700&Site=千千名片&Menu=no'><img alt='17948700千千名片客服在线' src=/qqmoban/images/qq/QQon2.gif border=0 align=middle></a></td><td><"
tmphtml+="a class='b' target=blank href='http://wpa.qq.com/msgrd?V=1&Uin=17948700&Site=千千名片&Menu=no' alt='QQ:17948700千千名片客服在线'>技术支持</a>"
};
tmphtml+="</table></td></tr><tr><td><img border=0 src=/qqmoban/images/qq/down1.gif></td></tr></table></div>"
document.write(tmphtml)

self.divStayTopLeft.style.right = 2;
self.divStayTopLeft.style.top = 120;
self.onError=null;
currentX = 0;
currentY = 0;

whichIt = null;
lastScrollX = 0;
lastScrollY = 0;

NS = (document.layers) ? 1 : 0;
IE = (document.all) ? 1: 0;

function heartBeat() {
if(IE) { diffY = document.documentElement.scrollTop; diffX = document.documentElement.scrollLeft; }
if(NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; }
if(diffY != lastScrollY) {
percent = .1 * (diffY - lastScrollY);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.divStayTopLeft.style.pixelTop += percent;
if(NS) document.divStayTopLeft.top += percent;
lastScrollY = lastScrollY + percent;
}
if(diffX != lastScrollX) {
percent = .1 * (diffX - lastScrollX);
if(percent > 0) percent = Math.ceil(percent);
else percent = Math.floor(percent);
if(IE) document.all.divStayTopLeft.style.pixelLeft += percent;
if(NS) document.divStayTopLeft.left += percent;
lastScrollX = lastScrollX + percent;
}
}

function checkFocus(x,y) {
stalkerx = document.divStayTopLeft.pageX;
stalkery = document.divStayTopLeft.pageY;
stalkerwidth = document.divStayTopLeft.clip.width;
stalkerheight = document.divStayTopLeft.clip.height;
if( (x > stalkerx && x < (stalkerx+stalkerwidth)) && (y > stalkery && y < (stalkery+stalkerheight))) return true;
else return false;
}
function grabIt(e) {
if(IE) {
whichIt = event.srcElement;
while (whichIt.id.indexOf("divStayTopLeft") == -1) {
whichIt = whichIt.parentElement;
if (whichIt == null) { return true; }
}
whichIt.style.pixelLeft = whichIt.offsetLeft;
whichIt.style.pixelTop = whichIt.offsetTop;
currentX = (event.clientX + document.body.scrollLeft);
currentY = (event.clientY + document.body.scrollTop);
} else {
window.captureEvents(Event.MOUSEMOVE);
if(checkFocus (e.pageX,e.pageY)) {

whichIt = document.divStayTopLeft;
StalkerTouchedX = e.pageX-document.divStayTopLeft.pageX;
StalkerTouchedY = e.pageY-document.divStayTopLeft.pageY;
}
}
return true;
}
function moveIt(e) {
if (whichIt == null) { return false; }
if(IE) {
if (whichIt.style.pixelLeft > -1){; //判断窗口是否在缩小在左边
newX = (event.clientX + document.body.scrollLeft);
newY = (event.clientY + document.body.scrollTop);
distanceX = (newX - currentX); distanceY = (newY - currentY);
currentX = newX; currentY = newY;
whichIt.style.pixelLeft += distanceX;
whichIt.style.pixelTop += distanceY;
if(whichIt.style.pixelTop  < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop;
if(whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft;
if(whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20;
if(whichIt.style.pixelTop  > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5;
event.returnValue = false;
};
} else {
whichIt.moveTo(e.pageX-StalkerTouchedX,e.pageY-StalkerTouchedY);
whichIt.left = 0+self.pageXOffset;
whichIt.top = 0+self.pageYOffset;
if( (whichIt.left + whichIt.clip.width) >= (window.innerWidth+self.pageXOffset-17)) whichIt.left = ((window.innerWidth+self.pageXOffset)-whichIt.clip.width)-17;
if( (whichIt.top + whichIt.clip.height) >= (window.innerHeight+self.pageYOffset-17)) whichIt.top = ((window.innerHeight+self.pageYOffset)-whichIt.clip.height)-17;
return false;
}
return false;
}
function dropIt() {
whichIt = null;
if(NS) window.releaseEvents (Event.MOUSEMOVE);
return true;
}
<!-- DRAG DROP CODE -->
if(NS) {
window.captureEvents(Event.MOUSEUP|Event.MOUSEDOWN);
window.onmousedown = grabIt;
window.onmousemove = moveIt;
window.onmouseup = dropIt;
}
if(IE) {

document.onmousedown = grabIt;
document.onmousemove = moveIt;
document.onmouseup = dropIt;
}
if(NS || IE) action = window.setInterval("heartBeat()",10);

//缩放

var IntCount = "";
var IntS = 0;

function inithosts()
		{
			try
			{
				var s=document.body.tagName;
				sysinit();
				if(initimer!=null)
					window.clearInterval(initimer);
			}
			catch(e)
			{
				if(initimer==null)
					initimer=window.setInterval("inithosts()",10);
			}
}

function clo()
	{
		if (document.getElementById("divStayTopLeft")==null)
		{
			return;
		}
		var oWidth = Number(document.getElementById("divStayTopLeft").style.width.replace("px",""));

		if(IntCount<=0&&IntS==1)
		{
			IntCount += 5;
			divStayTopLeft.style.left = IntCount;
			Titmer = setTimeout("clo()",10);

			if (IntCount==0)
			{
				IntS = 0;
				clearTimeout(Titmer);
			}
		}else{
			if (IntCount >= -oWidth)
			{
				IntCount -= 5;
				divStayTopLeft.style.left = IntCount;
				Titmer = setTimeout("clo(divStayTopLeft)",10);

				if (IntCount==-oWidth)
				{
					col.src='/qqmoban/images/qq/colsed_2.gif';
					col.title='[点击显示]';onlinetalk.style.display='inline';
					IntS = 1;
					clearTimeout(Titmer);
				}
			}
		}
}

function reloadqq(){
	clo(divStayTopLeft);
	if(onlinetalk.style.display=='inline'){
		col.src='/qqmoban/images/qq/colsed_1.gif';
		col.title='[点击隐藏]';
		onlinetalk.style.display='none';
	};
};
reloadqq();
-->