Often in some sites to see QQ customer service effect, when the customer service staff online, the QQ on the Web page displayed as online status, not the line, the page on the QQ display offline status, this is achieved through JavaScript.
<script language=javascript>
function Picsize (obj,maxwidth) {
Img=new image ()//Create a new Image object, with the width of this object will not appear a width of 0 phenomenon
Img.src= "/FK/BLOG/OBJ.SRC";
if (img.width>maxwidth)
{
return maxwidth;
}
Else
{
return img.width;
}
}
</script>
<style>
<!--
div {font-size:12px;}
-->
</style>
<body>
<SCRIPT>
var online= new Array ();
if (!document.layers)
document.write (' <div id= "Divstaytopleft" style= "Position:absolute" > ")
</SCRIPT>
<layer id= "Divstaytopleft" >
<table border= "0" width= "cellspacing=" 0 "cellpadding=" 0 ">
<TR><TD width= "></td></tr>
<script src= "http://webpresence.qq.com/getonline?Type=1&391193603:471133041:" ></script>
<!--set two QQ numbers, corresponding to the following two-->
<TR><TD valign=middle background= "Images/mid5.gif" >
<script>
if (online[0]==0)
document.write ("<div align=center><a class=" QQB '
Target=blank href= ' http://wpa.qq.com/msgrd? V=1&uin=391193603&site= Online Consulting & Menu=no ' title= ' customer service is not on line, please leave a message ' > Technician </a></div> ');
Else
document.write ("<div align=center><a class= ' Qqa ')
Target=blank href= ' http://wpa.qq.com/msgrd?V=1&Uin=391193603&Site= online consultation &menu= no ' t
itle= ' online instant conversation ' > Technician </a></div> ');
</script>
</td></tr>
<TR><TD valign=middle background= "Images/mid5.gif" >
<script>
if (online[1]==0)
document.write ("<div align=center><a class=" QQB '
Target=blank href= ' http://wpa.qq.com/msgrd?V=1&Uin=471133041&Site= online consultation & Menu=no ' title= ' customer service is not on line,
Please leave a message ' > guest service </a></div> '];
Else
document.write ("<div align=center>
<a class= ' Qqa ' Target=blank
Href= ' http://wpa.qq.com/msgrd?V=1&Uin=471133041&Site= online &menu= no ' title= ' online instant chat ' >
Customer Service </a></div> ");
</script>
</td></tr>
<TR><TD width= "></td></tr>
</table>
<script type= "Text/javascript" >
Enter "Frombottom" or "Fromtop"
var verticalpos= "Frombottom"
if (!document.layers)
document.write (' </div> ')
function Jsfx_floattopdiv ()
More javascript:http://
{
var startx = 6,
Starty = 150;
var ns = (navigator.appName.indexOf ("Netscape")!=-1);
var d = document;
function ml (ID)
{
var El=d.getelementbyid?d.getelementbyid (ID):d. all?d.all[id]:d. Layers[id];
if (d.layers) El.style=el;
El.sp=function (x,y) {this.style.left=x;this.style.top=y;};
el.x = StartX;
if (verticalpos== "Fromtop")
El.y = Starty;
else{
EL.Y = ns? pageYOffset + InnerHeight:document.body.scrollTop + document.body.clientHeight;
EL.Y-= Starty;
}
Return el;
}
Window.staytopleft=function ()
{
if (verticalpos== "Fromtop") {
var PY = ns? PageYOffset:document.body.scrollTop;
Ftlobj.y + = (PY + starty-ftlobj.y)/8;
}
else{
var PY = ns? pageYOffset + InnerHeight:document.body.scrollTop + document.body.clientHeight;
Ftlobj.y + + = (PY-STARTY-FTLOBJ.Y)/8;
}
FTLOBJ.SP (ftlobj.x, FTLOBJ.Y);
SetTimeout ("Staytopleft ()", 10);
}
Ftlobj = ml ("Divstaytopleft");
Staytopleft ();
}
Jsfx_floattopdiv ();
</script>
<br>
<br>
<br>
<br>
</body>