var d=document;
d.g=d.getElementById

function br(){ 
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=d.getElementById?1:0
  this.opera=this.agent.indexOf("Opera")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera)?1:0;
  this.ie7=(this.ver.indexOf("MSIE 7")>-1 && this.dom && !this.opera)?1:0;
  this.ie8=(this.ver.indexOf("MSIE 8")>-1 && this.dom && !this.opera)?1:0;	
  this.ie9=(this.ver.indexOf("MSIE 9")>-1 && this.dom && !this.opera)?1:0;	
  this.ie4=(d.all && !this.dom && !this.opera)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6||this.ie7||this.ie8||this.ie9
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5)?1:0; 
  this.ns4=(d.layers && !this.dom)?1:0;
  this.other=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera);
  return this
}
br=new br();

function f(n,i){return(n==null?d.g(i):n.d.g(i))}
function v(a){return(a?'visible':'hidden')}
function dp(a){return(a?(br.ie?'block':a):'none')}
function wL(n,i,c){f(n,i).innerHTML=c}
function vL(n,i,a){f(n,i).style.visibility=v(a)}
function dL(n,i,a){f(n,i).style.display=dp(a)}
function oL(n,i,a){with(f(n,i).style){br.ie?filter='alpha(opacity='+a+')':MozOpacity=a/100}}

function setXYWH(n,i,x,y,w,h){with(f(n,i).style){if(x)left=x;if(y)top=y;if(w)width=w;if(h)height=h}}
function getX(n,i){return(f(n,i).offsetLeft)}
function getY(n,i){return(f(n,i).offsetTop)}
function getW(n,i){return(f(n,i).offsetWidth)}
function getH(n,i){return(f(n,i).offsetHeight)}

function cL(n,i){
 var l=f(n,i),x,dx,y,dy;
 if(!l.style)l.style=l;
 x=br.ie?(d.body.clientWidth-l.offsetWidth)/2:(innerWidth-l.offsetWidth)/2
 y=br.ie?(d.body.clientHeight-l.offsetHeight)/2:(innerHeight-l.offsetHeight)/2
 dx=br.ie?d.body.scrollLeft:pageXOffset
 dy=br.ie?d.body.scrollTop:pageYOffset
 l.style.left=x+dx;l.style.top=y+dy
}

