?
var isMouseDown=false;
var isFirst=true;
var centerdivObj;
var ndiv1;
var ndiv2;
var ndiv3;
var kjX;
var kjY;
window.οnerrοr=function()
{
??? return true;
};
var thurl='http://qq.jutoo.net/';
var wzId='12345';
function createDiv()
{?
??? var sW=screen.width;
??? var sH=screen.height;
???
??? createDivObj();
??? //中間div
??? centerdivObj.style.position="absolute";
??? centerdivObj.id="cd_id";
??? centerdivObj.style.left=(sW-439)/2+"px";
??? centerdivObj.style.top=(sH-159-200)/2+"px";
??? centerdivObj.style.width="439px";
??? centerdivObj.style.height="159px";
??? centerdivObj.style.overflow="hidden";
??? centerdivObj.style.cursor="move";
??? centerdivObj.style.backgroundImage="url("+thurl+"Image/tt.bmp)";
???
??? document.body.appendChild(centerdivObj);
??? //左邊div
??? var leftDivObj=document.createElement("div")
??? leftDivObj.style.position="absolute";
??? leftDivObj.style.left="10px";
??? leftDivObj.style.top="50px";
??? leftDivObj.style.visibility="visible";
??? document.body.appendChild(leftDivObj);
???
??? //左邊小div頭部
??? var leftDivMinObj=document.createElement("div")
??? leftDivMinObj.style.position="absolute";
??? leftDivMinObj.style.cursor="pointer";
??? leftDivMinObj.style.left="10px";
??? leftDivMinObj.style.top="50px";
??? leftDivMinObj.style.width="117px";
??? leftDivMinObj.style.height="20px";
??? leftDivMinObj.style.backgroundImage="url("+thurl+"Image/leftt.gif)";
??? leftDivMinObj.style.visibility="hidden";
??? leftDivMinObj.οnclick=function()
??? {
??????? leftDivObj.style.visibility="visible";
??????? leftDivMinObj.style.visibility="hidden";
??? };
??? document.body.appendChild(leftDivMinObj);
???
??? //左邊div頭部
??? var leftDivHeadObj=document.createElement("div");
??? leftDivHeadObj.style.cursor="pointer";
??? leftDivHeadObj.style.width="117px";
??? leftDivHeadObj.style.height="20px";
??? leftDivHeadObj.style.backgroundImage="url("+thurl+"Image/leftt.gif)";
??? leftDivHeadObj.οnclick=function()
??? {
??????? leftDivObj.style.visibility="hidden";
??????? leftDivMinObj.style.visibility="visible";
??? };
??? leftDivObj.appendChild(leftDivHeadObj);
???
??? //左邊div中間部
??? var leftDivbodyObj=document.createElement("div");
??? if(document.compatMode=="CSS1Compat")
??????? leftDivbodyObj.style.width="111px";
??? else if(document.compatMode=="BackCompat")
??????? leftDivbodyObj.style.width="117px";?? //不要指定高,指定了高div就不會延伸了(兼容問題)
??? leftDivbodyObj.style.overflowX="hidden";
??? leftDivbodyObj.style.border="rgb(0,100,191) solid 3px";
??? leftDivbodyObj.style.borderTop="none";
??? leftDivbodyObj.style.borderBottom="none";
??? leftDivbodyObj.style.backgroundColor="white";
??? leftDivbodyObj.style.fontSize="10pt";
??? leftDivbodyObj.style.paddingTop="5px";
??? leftDivbodyObj.innerHTML="<img src='http://qq.jutoo.net/Image/kzx.bmp' width='111px' height='16px'/><br><img src='http://qq.jutoo.net/Image/klx.bmp' width='111px' height='16px'/><br><a href='#' style='text-decoration:none;color:black' οnclick="+"javascript:window.open(encodeURI('http://qq.jutoo.net/LeaveWord.aspx?wzid=12345&bumen=在線客服'),'','width=650px,height=455px,resizable=yes')"+"><img src='http://qq.jutoo.net/Image/offline.ico' border='0' width='10px' height='10px' style='margin:8px 0 8px 0' align='absmiddle'>在線客服<img src='http://qq.jutoo.net/Image/offline.gif' border='0'></a><br><a href='#' style='text-decoration:none;color:black' οnclick="+"javascript:window.open(encodeURI('http://qq.jutoo.net/LeaveWord.aspx?wzid=12345&bumen=技術部'),'','width=650px,height=455px,resizable=yes')"+"><img src='http://qq.jutoo.net/Image/offline.ico' border='0' width='10px' height='10px' style='margin:8px 0 8px 0' align='absmiddle'>技術部<img src='http://qq.jutoo.net/Image/offline.gif' border='0'></a><br>";//
??? leftDivObj.appendChild(leftDivbodyObj);
???
??? //左邊div低部
??? var leftDivfootObj=document.createElement("div");
??? leftDivfootObj.style.width="117px";
??? leftDivfootObj.style.height="11px";
??? leftDivfootObj.style.overflow="hidden";
??? leftDivfootObj.style.backgroundImage="url("+thurl+"Image/leftd.gif)";
???
??? leftDivObj.appendChild(leftDivfootObj);
??? //2個按鈕外層的div
??? ndiv1=document.createElement("div");
??? ndiv1.style.position="absolute";
??? ndiv1.style.left="120px";
??? ndiv1.style.top="120px";
??? ndiv1.style.width="300px";
??? ndiv1.style.height="30px";
??? ndiv1.style.cursor="pointer";
??? ndiv1.align="center";
???
??? centerdivObj.appendChild(ndiv1);
???
??? ndiv1.innerHTML="<a href='#' οnclick="+"javascript:document.getElementById('cd_id').style.visibility='hidden';window.open(encodeURI('http://qq.jutoo.net/LeaveWord.aspx?wzid=12345&bumen=在線客服'),'','width=650px,height=455px,resizable=yes')"+"><img src='http://qq.jutoo.net/Image/ly.bmp' border='0'></a> ";
???
??? var xxbutton=document.createElement("input");
??? xxbutton.type="image";
??? xxbutton.src=thurl+"Image/xx.bmp";
??? xxbutton.οnclick=function()
??? {
??????? centerdivObj.style.visibility="hidden";
??????? window.open(encodeURI(thurl + "HandSetNote.aspx?wzid=" + wzId),"","width=650px,height=455px,resizable=yes");
??? };
???
??? ndiv1.appendChild(xxbutton);
???
??? var kgtext=document.createTextNode(" ");
???
??? ndiv1.appendChild(kgtext);
???
??? var callbutton=document.createElement("input");
??? callbutton.type="image";
??? callbutton.src=thurl+"Image/dh.bmp";
??? callbutton.οnclick=function()
??? {
??????? centerdivObj.style.visibility="hidden";
??????? window.open(encodeURI(thurl + "TelCall.aspx?wzid=" + wzId),"","width=650px,height=455px,resizable=yes");
??? };
???
??? ndiv1.appendChild(callbutton);
???
??? ndiv2=document.createElement("div");
??? ndiv2.style.position="absolute";
??? ndiv2.style.left="140px";
??? ndiv2.style.top="50px";
??? ndiv2.style.width="260px";
??? ndiv2.style.height="60px";
??? ndiv2.innerHTML="<font style='font-size:10pt'>歡迎您光臨!請您給 在線客服 留言。</font>";
???
??? centerdivObj.appendChild(ndiv2);
???
??? ndiv3=document.createElement("div");
??? ndiv3.style.position="absolute";
??? ndiv3.style.left="420px";
??? ndiv3.style.top="5px";
??? ndiv3.style.width="20px";
??? ndiv3.style.height="20px";
??? ndiv3.innerHTML="<font color='white'>X</font>";
??? ndiv3.style.cursor="pointer";
??? ndiv3.οnclick=function()
??? {
??????? centerdivObj.style.visibility="hidden";
??? };
??? centerdivObj.appendChild(ndiv3);
???
??? //div的滾動
??? var divtop=centerdivObj.style.top.replace("px","")-0;
??? var thdivtop=leftDivObj.style.top.replace("px","")-0;
??? var leftmintop=leftDivMinObj.style.top.replace("px","")-0;
???
??? window.οnscrοll=function()
??? {
??????? if(document.compatMode=="CSS1Compat")
??????? {
??????????? centerdivObj.style.top=document.documentElement.scrollTop+divtop+"px";? //有 dtd 用這個
??????????? leftDivObj.style.top=document.documentElement.scrollTop+thdivtop+"px";
??????????? leftDivMinObj.style.top=document.documentElement.scrollTop+leftmintop+"px";
??????? }???
??????? else if(document.compatMode=="BackCompat")
??????? {
??????????? centerdivObj.style.top=document.body.scrollTop+divtop+"px";?? //沒有 dtd 用這個
??????????? leftDivObj.style.top=document.body.scrollTop+thdivtop+"px";
??????????? leftDivMinObj.style.top=document.body.scrollTop+leftmintop+"px"
??????? }
??? };
???
??? centerdivObj.οnmοusedοwn=divMouseDown;
??? centerdivObj.οnmοusemοve=function(){divMouseMove(getWindowEvent(getWindowEvent))};
??? centerdivObj.οnmοuseup=divMouseUp;
}
function divMouseDown()
{
??? isMouseDown=true;
}
function divMouseMove(e)
{
??? if(isMouseDown)
??? {
??????? if(window.navigator.appName.toLowerCase()=="microsoft internet explorer")
??????????? centerdivObj.setCapture();
???????
??????? var mouseX=e.clientX;
??????? var mouseY=e.clientY;
??????? var divLeft=centerdivObj.style.left.replace("px","")-0;
??????? var divTop=centerdivObj.style.top.replace("px","")-0;
???????
??????? if(isFirst)? //第一次取
??????? {
??????????? kjX=mouseX-divLeft;
??????????? kjY=mouseY-divTop;
???????????
??????????? isFirst=false;
??????? }
??????? centerdivObj.style.left=mouseX-kjX+"px";
??????? centerdivObj.style.top=mouseY-kjY+"px"
??? }
}
function divMouseUp()
{
??? isMouseDown=false;
??? isFirst=true;
???
??? if(window.navigator.appName.toLowerCase()=="microsoft internet explorer")
??????? centerdivObj.releaseCapture();
}
function createDivObj()
{
??? centerdivObj=document.createElement("div");
}
createDiv();
function getWindowEvent(methodName)
{
??? if(document.all)
??????? return window.event;
??? else
??????? return methodName.caller.arguments[0];
}