function yg_Browser(){d = document;var nav=navigator; this.agt=nav.userAgent.toLowerCase(); this.major = parseInt(nav.appVersion); this.ns=(d.layers); this.dom=(d.getElementById)?1:0; this.ns4up=(this.ns && this.major >=4); this.ns6=(this.agt.indexOf("Netscape6")!=-1); this.op=(window.opera? 1:0); this.ie=(d.all); this.ie5=(d.all&&this.dom); this.fb=(this.agt.indexOf("firebird")!=-1); this.sf=(this.agt.indexOf("safari")!=-1); this.win=((this.agt.indexOf("win")!=-1) || (this.agt.indexOf("16bit")!=-1)); this.mac=(this.agt.indexOf("mac")!=-1);}
var oBw = new yg_Browser();
function yg_getW(o) { var w=0; w=(oBw.op)? o.style.pixelWidth:o.offsetWidth; return w; }
function yg_getH(o) { var h=0; h=(oBw.op)? o.style.pixelHeight:o.offsetHeight; return h; }
function yg_getPageX(o) { if (oBw.op) {  var x=0; while(eval(o)) { x+=o.style.pixelLeft; e=o.offsetParent; } return x; } else { var m=(oBw.mac&&oBw.ie)? document.body.leftMargin:0; var x=0; while(eval(o)) { x+=o.offsetLeft; o=o.offsetParent; } return parseInt(x)+parseInt(m) } }
function yg_getPageY(o) { if(oBw.ns) { var y=(o.pageY)? o.pageY:o.y; return y; } else if (oBw.op) {  var y=0; while(eval(o)) { y+=o.style.pixelTop; o=o.offsetParent; } return y; }  else { var m = (oBw.mac&&oBw.ie)? document.body.topMargin:0; var y=0; while(eval(o)) { y+=o.offsetTop; o=o.offsetParent; }  return parseInt(y)+parseInt(m); } }
function yg_show(o,disp) { (!disp)? 0:o.style.display=disp; o.style.visibility='visible'; }
function yg_hide(o,disp) { (!disp)? 0:o.style.display=disp; o.style.visibility='hidden'; }
function yg_addEvt(o,e,f,c){ if(o.addEventListener)o.addEventListener(e,f,c);else if(o.attachEvent)o.attachEvent("on"+e,f);else eval("o.on"+e+"="+f)}
function yg_remEvt(o,e,f) { if(o.removeEventListener)o.removeEventListener(e,f,false);else if(o.detachEvent)o.detachEvent('on'+e,f); }
function yshp_setPageX(o,x) { if(oBw.op) o.style.pixelLeft=x; else o.style.left=x;}
function yshp_setPageY(o,y) { if(oBw.op) o.style.pixelTop=y; else o.style.top=y;}
function yg_setZ(o,z) { if(oBw.ns)o.zIndex=z;else o.style.zIndex=z; }
