// JavaScript Document
document.writeln("<div id=\"ads_14\" class=\"ads_14\"> ");
document.writeln("	<div id=\"drag\"><div id=\"small\"></div><div id=\"close\"></div> ");
document.writeln("    	<a href=\"tencent://message/?uin=12748418&amp;Site=www.top-import.com&amp;Menu=yes\"><IMG ");
document.writeln("alt=\"业务咨询\" src=\"http://wpa.qq.com/pa?p=1:12748418:3\"></a> <a href=\"msnim:chat?contact=seahog2009@hotmail.com\"><img src=\"/templets/images/msn.gif\" /></a>");
document.writeln("	</div>");
document.writeln("</div> ");
document.writeln("<div id=\"hidden\"></div> ");
document.writeln("<!--伸缩广告结束--> ");
document.writeln("<!--开始--> ");
document.writeln("<script language=\"javascript\"> ");
document.writeln("var data = { ");
document.writeln("\'bs\' : \'http://www.test.com\', ");
document.writeln("\'as\': \'http://localhost/adsformat/\', ");
document.writeln("\'ad\' :[[\'2\',\'images/2007032256654.jpg\', \'rd?go=eJxNjk1rwz\']] ");
document.writeln("}; ");
document.writeln("function msgBox() ");
document.writeln("{ ");
document.writeln("this.container = \"ads_14\"; ");
document.writeln("this.dragArea = \"drag\"; ");
document.writeln("this.width = 200; ");
document.writeln("this.height = 35; ");
document.writeln("this.smallHeight = 27; ");
document.writeln("this.smallId = \"small\"; ");
document.writeln("this.closeId = \"close\"; ");
document.writeln("this.area = ( document.compatMode.toLowerCase()==\"css1compat\" ) ? document.documentElement : document.body; ");
document.writeln("this.space = 15; ");
document.writeln("this.timer; ");
document.writeln("this.timeOut = 150; ");
document.writeln("this.smalled = false; ");
document.writeln("window.msgBoxListener = this; ");
document.writeln("this.$(this.smallId).onclick= function(){msgBoxListener.toSmall()}; ");
document.writeln("this.$(this.closeId).onclick = function(){msgBoxListener.close()}; ");
document.writeln("} ");
document.writeln("msgBox.prototype.flow = function() ");
document.writeln("{ ");
document.writeln("this.$(this.container).style.position = \"absolute\"; ");
document.writeln("this.$(this.container).style.zIndex = \"1000\"; ");
document.writeln("if(this.smalled) ");
document.writeln("{ ");
document.writeln("this.$(this.container).style.top = this.area.scrollTop + this.area.clientHeight - this.smallHeight - this.space + \"px\"; ");
document.writeln("}else{ ");
document.writeln("this.$(this.container).style.top = this.area.scrollTop + this.area.clientHeight - this.height - this.space + \"px\"; ");
document.writeln("} ");
document.writeln("this.$(this.container).style.left = this.area.scrollLeft + this.area.clientWidth - this.width - this.space + \"px\"; ");
document.writeln("} ");
document.writeln("msgBox.prototype.toSmall = function() ");
document.writeln("{ ");
document.writeln("if(this.smalled) ");
document.writeln("{ ");
document.writeln("this.$(this.smallId).src = \"images/skin/small.gif\"; ");
document.writeln("this.$(this.container).style.marginTop = -this.height + \"px\"; ");
document.writeln("this.$(this.container).style.height = this.height + \"px\"; ");
document.writeln("this.$(this.container).style.overflow = \"hidden\"; ");
document.writeln("this.smalled = false; ");
document.writeln("this.flow(); ");
document.writeln("this.$(this.container).style.marginTop = \"0px\"; ");
document.writeln("}else{ ");
document.writeln("this.$(this.smallId).src = \"images/skin/big.gif\"; ");
document.writeln("this.$(this.container).style.height = this.smallHeight + \"px\"; ");
document.writeln("this.$(this.container).style.overflow = \"hidden\"; ");
document.writeln("this.smalled = true; ");
document.writeln("this.flow(); ");
document.writeln("} ");
document.writeln("} ");
document.writeln("msgBox.prototype.close = function() ");
document.writeln("{ ");
document.writeln("document.body.removeChild(this.$(this.container)); ");
document.writeln("} ");
document.writeln("msgBox.prototype.auto = function() ");
document.writeln("{ ");
document.writeln("this.flow(); ");
document.writeln("window[\"onresize\"]=function(){msgBoxListener.flow();}; ");
document.writeln("window[\"onscroll\"]=function(){msgBoxListener.flow();}; ");
document.writeln("document.onmousedown = function(){clearInterval(msgBoxListener.timer);msgBoxListener.drag(msgBoxListener.container, msgBoxListener.dragArea);}; ");
document.writeln("} ");
document.writeln("msgBox.prototype.drag = function(container, drag) ");
document.writeln("{ ");
document.writeln("var IMOUSEDOWN = true; ");
document.writeln("var isIE = (navigator.appVersion.indexOf(\"MSIE\") != -1) ? true : false; ");
document.writeln("container = document.getElementById(container); ");
document.writeln("drag = document.getElementById(drag); ");
document.writeln("if(drag) ");
document.writeln("{ ");
document.writeln("try{ ");
document.writeln("if(IMOUSEDOWN){ ");
document.writeln("drag.onmousedown=function(a){ ");
document.writeln("var d=document; ");
document.writeln("if(!a)a=window.event; ");
document.writeln("drag.style.cursor=\"move\"; ");
document.writeln("var x=a.layerX?a.layerX:a.offsetX,y=a.layerY?a.layerY:a.offsetY; ");
document.writeln("if(drag.setCapture) ");
document.writeln("drag.setCapture(); ");
document.writeln("else if(window.captureEvents) ");
document.writeln("window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); ");
document.writeln("d.onmousemove=function(a){ ");
document.writeln("if(!a)a=window.event; ");
document.writeln("");
document.writeln("if(!a.pageX)a.pageX = (a.clientX<0 ?0:a.clientX); ");
document.writeln("if(!a.pageY)a.pageY = (a.clientY <0 ?0:a.clientY); ");
document.writeln("var tx = a.pageX-x, ty = a.pageY-y; ");
document.writeln("if(isIE){ ");
document.writeln("ty = ty + document.documentElement.scrollTop - document.documentElement.clientTop; ");
document.writeln("} ");
document.writeln("container.style.position = \"absolute\"; ");
document.writeln("container.style.left = tx+\"px\"; ");
document.writeln("container.style.top = ty+\"px\"; ");
document.writeln("}; ");
document.writeln("d.onmouseup=function(){ ");
document.writeln("if(drag.releaseCapture) ");
document.writeln("drag.releaseCapture(); ");
document.writeln("else if(window.captureEvents) ");
document.writeln("window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP); ");
document.writeln("d.onmousemove=null; ");
document.writeln("d.onmouseup=null; ");
document.writeln("}; ");
document.writeln("}; ");
document.writeln("}else{ ");
document.writeln("container.style.cursor=\"pointer\"; ");
document.writeln("drag.style.cursor=\"move\"; ");
document.writeln("} ");
document.writeln("}catch(e){ ");
document.writeln("alert(e); ");
document.writeln("} ");
document.writeln("} ");
document.writeln("} ");
document.writeln("msgBox.prototype.$ = function(ele) ");
document.writeln("{ ");
document.writeln("return document.getElementById(ele); ");
document.writeln("} ");
document.writeln("var msgBox1 = new msgBox(); ");
document.writeln("msgBox1.auto(); ");
document.writeln("</script>");
