Copy Code code as follows:
Window.onresize = Baiduresizediv;
Window.onerror = function () {}
var divtop,divleft,divwidth,divheight,docheight,docwidth,objtimer,i = 0;
var px = document.doctype? " PX ": 0;
var scrollwidth = navigator.userAgent.indexOf ("Firefox") >0?16:0;
var iframeheight = navigator.userAgent.indexOf ("MSIE") >0?170-2:209-2;
String.prototype.Trim = function () {return this.replace (/^\s+|\s+$/g, "");}
function Baidu_collapse (obj) {
ct = document.getElementById (' Tab_c_iframe ');
if (ct.style.display== "None") {
Ct.style.display= "";
Obj.src=obj.src.replace ("B.gif", "a.gif");
} else {
Ct.style.display= "None";
Obj.src=obj.src.replace ("A.gif", "b.gif");
}
Baiduresizediv ();
}
function baidumsg ()
{
try{
Divtop = parseint (document.getElementById ("Emeng"). style.top,10);
Divleft = parseint (document.getElementById ("Emeng"). style.left,10);
Divheight = parseint (document.getElementById ("Emeng"). offsetheight,10);
Divwidth = parseint (document.getElementById ("Emeng"). offsetwidth,10);
var scrollpostop,scrollposleft,docwidth,docheight;
if (typeof window.pageyoffset!= ' undefined ') {
Scrollpostop = Window.pageyoffset;
Scrollposleft = Window.pagexoffset;
Docwidth = window.innerwidth;
Docheight = Window.innerheight;
else if (typeof document.compatmode!= ' undefined ' && document.compatmode!= ' Backcompat ') {
Scrollpostop = Document.documentElement.scrollTop;
Scrollposleft = Document.documentElement.scrollLeft;
Docwidth = Document.documentElement.clientWidth;
Docheight = Document.documentElement.clientHeight;
else if (typeof document.body!= ' undefined ') {
Scrollpostop = Document.body.scrollTop;
Scrollposleft = Document.body.scrollLeft;
Docwidth = Document.body.clientWidth;
Docheight = Document.body.clientHeight;
}
document.getElementById ("Emeng"). Style.top = parseint (scrollpostop,10) + docheight + + px;//divheight
document.getElementById ("Emeng"). Style.left = parseint (scrollposleft,10) + docwidth-divwidth-scrollwidth + px;
document.getElementById ("Emeng"). style.visibility= "Visible";
Objtimer = Window.setinterval ("Baidu_move_div ()", 10);
}catch (e) {}
}
function Baiduresizediv ()
{
I+=1;
try{
Divheight = parseint (document.getElementById ("Emeng"). offsetheight,10);
Divwidth = parseint (document.getElementById ("Emeng"). offsetwidth,10);
var scrollpostop,scrollposleft,docwidth,docheight;
if (typeof window.pageyoffset!= ' undefined ') {
Scrollpostop = Window.pageyoffset;
Scrollposleft = Window.pagexoffset;
Docwidth = window.innerwidth;
Docheight = Window.innerheight;
else if (typeof document.compatmode!= ' undefined ' && document.compatmode!= ' Backcompat ') {
Scrollpostop = Document.documentElement.scrollTop;
Scrollposleft = Document.documentElement.scrollLeft;
Docwidth = Document.documentElement.clientWidth;
Docheight = Document.documentElement.clientHeight;
else if (typeof document.body!= ' undefined ') {
Scrollpostop = Document.body.scrollTop;
Scrollposleft = Document.body.scrollLeft;
Docwidth = Document.body.clientWidth;
Docheight = Document.body.clientHeight;
}
document.getElementById ("Emeng"). Style.top = Docheight-divheight + parseint (scrollpostop,10) + px;
document.getElementById ("Emeng"). Style.left = Docwidth-divwidth + parseint (scrollposleft,10)-scrollwidth + px;
}catch (e) {}
}
function Baidu_move_div ()
{
var scrollpostop,scrollposleft,docwidth,docheight;
if (typeof window.pageyoffset!= ' undefined ') {
Scrollpostop = Window.pageyoffset;
Scrollposleft = Window.pagexoffset;
Docwidth = window.innerwidth;
Docheight = Window.innerheight;
else if (typeof document.compatmode!= ' undefined ' && document.compatmode!= ' Backcompat ') {
Scrollpostop = Document.documentElement.scrollTop;
Scrollposleft = Document.documentElement.scrollLeft;
Docwidth = Document.documentElement.clientWidth;
Docheight = Document.documentElement.clientHeight;
else if (typeof document.body!= ' undefined ') {
Scrollpostop = Document.body.scrollTop;
Scrollposleft = Document.body.scrollLeft;
Docwidth = Document.body.clientWidth;
Docheight = Document.body.clientHeight;
}
try{
if (parseint (document.getElementById ("Emeng"). style.top,10) <= (docheight-divheight + parseint (scrollPosTop,10)) )
{
Window.clearinterval (objtimer); Objtimer = Window.setinterval ("Baiduresizediv ()", 1);
}
Divtop = parseint (document.getElementById ("Emeng"). style.top,10);
document.getElementById ("Emeng"). Style.top = divTop-1 + px;
}catch (e) {}
}
function Baidumessbox (Shape,color,userid) {
var styles= ' Position:absolute;top:0px;left:0px;z-index:99999;visibility:hidden; ';
var copic= ' if (shape>1) window.onload = baidumsg;
else {styles= '; copic= '}
var s;
if (shape==2) {
S= ' <div id=emeng style= ' z-index:99999; left:0px; Position:absolute; top:0px; Visibility:hidden; " > '
+ ' <table width= "216" border= "0" cellpadding= "0" cellspacing= "0" class= "" id= "Tab_ ' + (color+3) + '" style= "border:0px;" > '
+ ' <tr> '
+ ' <td align= ' right ' ></td> '
+ ' </tr> '
+ ' <tr> '
+ ' <td><table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" > "
+ ' <tr> '
+ ' <td width= ' rowspan= "2" valign= "bottom" ></td> '
+ ' <td> </td> '
+ ' </tr> '
+ ' <tr> '
+ ' <td align=right style= ' font-size:12px; Background:url (gbook/images/bg_ ' +color+ '. gif); line-height:21px;height:21px;border-top:1px solid #808080; border-right:1px Solid #808080;p adding-right:6px;color: #FFFFFF; "ondblclick=" Baidu_collapse ( this.firstChild.nextSibling) "><a href=" http://www.xxrblog.cn "target=" _blank "style=" ><font color= "#FFFFFF" > Hillbilly blog xxrblog.cn</font></a> + ' </td> '
+ ' </tr> '
+ ' </table> '
+ ' </td> '
+ ' </tr> '
+''
+''
+''
+''
+''
+ ' </table> '
+ ' <iframe src= ' gbook/side.html?userid= ' +userid+ ' width= ' 216 ' height= ' + iframeheight + ' "frameborder=" 0 "id=" tab_ C_iframe "></iframe>"
+ "<table width=" 216 "border=" 0 "cellspacing=" 0 "cellpadding=" 3 "height=", "style=" BORDER-LEFT-WIDTH:1PX; Border-left-style:solid;border-left-color: #000; border-right-width:1px;border-right-style:solid; Border-right-color: #000; border-top-width:0;border-bottom-width:1px; Border-bottom-style:solid; Border-bottom-color: #000000; " ><TR><TD bgcolor= "#FFFFFF" ><table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" bgcolor= "#FFFFFF" ><tr><td style= "HEIGHT:3PX;" ></td></tr></table><table width= "100%" border= "0" cellpadding= "0" cellspacing= "0" style= " Background: #E70010; " ><TR><TD width= "31%" align= "center" valign= "middle" ></td><td><table" width= "100%" border= "0" cellspacing= "0" cellpadding= "0" style= " Font-size:12px;color: #FFFFFF; " ><TR><TD width= "38%" height= "valign=" "Bottom" > Customer service 1</td><td width= "62%" valign= "Bottom" > Customer Service 2</TD></TR><TR><TD height= "colspan=" 2 "><a href=" tencent://message/?uin=364738883 &site= Countryman Blog&menu=yes "></a> <a href=" Msnim:chat?contact=24525533@163.com "></a ></TD></TR><TR><TD height= colspan= "2" valign= "Top" > Tel: 13930042882</td></ Tr></table></td></tr></table><table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" bgcolor= "#FFFFFF" ><tr><td style= "HEIGHT:3PX;" ></td></tr></table><table width= "100%" border= "0" cellpadding= "0" cellspacing= "0" style= " Background: #E70010; " ></table></td></tr></table> '
+ ' </div> ';
else if (shape==3) {
S= ' <div id=emeng style= width:100%;background: #FFFFFF; ' +styles+ ' ">"
+ ' <table width= "100%" border= "0" cellpadding= "0" cellspacing= "0" style= "border:1px solid #808080;" id= "Tab_ ' +color+ ' > '
+ ' <tr> '
+ ' <td colspan= ' 3 "align=right style=" FONT-SIZE:12PX; Background:url (gbook/images/bg_ ' +color+ '. gif); Line-height:19px;height:19px;padding-right:6px;color: #FFFFFF; " ondblclick= "Baidu_collapse (this.firstChild.nextSibling)" > Message Board ' +copic
+ ' </tr> '
+ ' </tr> '
+ ' </table> '
+ ' <iframe src= ' bottom.html?userid= ' +userid+ ' "width=" 100% "height=" frameborder= "0" id= "tab_c_iframe" >< /iframe> '
+ ' </div> ';
}
Document.writeln (s);
}
Baidumessbox (2,1, 849620);