function findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } function setLyr(obj,lyr) { var newX = findPosX(obj) - 6; var newY = findPosY(obj) + 20; var x = new getObj(lyr); x.style.top = newY + 'px'; x.style.left = newX + 'px'; } function getObj(name) { if (document.getElementById) { this.obj = document.getElementById(name); this.style = document.getElementById(name).style; } else if (document.all) { this.obj = document.all[name]; this.style = document.all[name].style; } else if (document.layers) { if (document.layers[name]) { this.obj = document.layers[name]; this.style = document.layers[name]; } } } function findObj(n, d) { //v4.0 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p); } if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i=4) this.ns4 = (this.b=="ns" && this.v==4) this.ns5 = (this.b=="ns" && this.v==5) this.ie = (this.b=="ie" && this.v>=4) this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0) this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0) if (this.ie5) this.v = 5 this.min = (this.ns||this.ie) } is = new BrowserCheck() function css(id,left,top,width,height,other) { winW = (is.ns)? window.innerWidth : document.body.offsetWidth-20 var NewLeft = (winW/2) - 385 + left; var str = (left!=null && top!=null)? '#'+id+' {position:absolute; left:'+NewLeft+'px; top:'+top+'px;' : '#'+id+' {position:relative;' if (arguments.length>=4 && width!=null) str += ' width:'+width+'px;' if (arguments.length>=5 && height!=null) str += ' height:'+height+'px;' if (arguments.length==6 && other!=null) str += ' '+other str += '}\n' return str } function writeCSS(str,showAlert) { str = '' document.write(str) if (showAlert) alert(str) } function makeLiquid() { if ((is.ns && (winW!=window.innerWidth)) || is.ie) history.go(0) }