function brtest(){
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent.toLowerCase()
	this.dom=document.getElementById?1:0
	this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera 
	this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera   
	this.ie5 = (this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6)
	this.ie55 = (this.ie5 && this.agent.indexOf("msie 5.5")>-1)
	this.ie6 = (this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6)
	this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6)
	this.ie = (this.ie4 || this.ie5 || this.ie6)
	this.mac=(this.agent.indexOf("mac")>-1)
	this.osx=(this.agent.indexOf("x")>-1)
	this.win=(this.agent.indexOf("windows")>-1)
	this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar)
	this.ns4=(!this.dom && document.layers)?1:0;
	this.good=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6)
	this.opacity= ((this.ie6 ||this.ie55 || this.ie5)&&this.win)
	this.usedom= this.ns6//Use dom creation
	this.reuse = this.ie||this.usedom //Reuse layers
	this.px=this.dom&&!this.op5?"px":""
	return this
}
var br = new brtest();

function dynElm(obj,nest){
	nest = (!nest)?'':'document.'+nest+'.'
	this.elm = br.ie4?document.all[obj]:br.ns4?eval(nest+'document.'+obj):document.getElementById(obj)
	this.css = br.dom||br.ie4?this.elm.style:this.elm
	this.doc = br.dom||br.ie4?document:this.css.document
	this.obj = obj+'dynElm'; eval(this.obj+'=this')
	this.x = (br.ns4||br.op5)?this.css.left:this.elm.offsetLeft
	this.y = (br.ns4||br.op5)?this.css.top:this.elm.offsetTop
	this.w = (br.ie4||br.ie5||br.ie6||br.ns6)?this.elm.offsetWidth:br.ns4?this.elm.clip.width:br.op5?this.css.pixelWidth:0
	this.h = (br.ie4||br.ie5||br.ie6||br.ns6)?this.elm.offsetHeight:br.ns4?this.elm.clip.height:br.op5?this.css.pixelHeight:0
	this.r = this.x + this.w;
	this.c=0
	if((br.dom || br.ie4) && this.css.clip) {
		this.c=this.css.clip; this.c=this.c.slice(5,this.c.length-1); 
		this.c=this.c.split(' ');
		for(var i=0;i<4;i++){
			this.c[i]=parseInt(this.c[i])
		}
	}
	this.ct=this.css.clip.top||this.c[0]||0; 
	this.cr=this.css.clip.right||this.c[1]||this.w||0
	this.cb=this.css.clip.bottom||this.c[2]||this.h||0; 
	this.cl=this.css.clip.left||this.c[3]||0
	this.vis = 0
}

dynElm.prototype.clipTo = function(t,r,b,l,setwidth){ 
  this.ct=t; this.cr=r; this.cb=b; this.cl=l
  if(br.ns4){
    this.css.clip.top=t;this.css.clip.right=r
    this.css.clip.bottom=b;this.css.clip.left=l
  }else{
    if(t<0)t=0;if(r<0)r=0;if(b<0)b=0;if(b<0)b=0
    this.css.clip="rect("+t+","+r+","+b+","+l+")";
    if(setwidth){this.css.pixelWidth=this.css.width=r; 
    this.css.pixelHeight=this.css.height=b}
  }
}

dynElm.prototype.moveTo = function(x,y){
	if(x!=null){this.x=x; this.css.left=x+br.px}
	if(y!=null){this.y=y; this.css.top=y+br.px}
}

dynElm.prototype.moveBy = function(x,y){this.moveTo(this.x+x,this.y+y)}
dynElm.prototype.showIt = function(o){this.css.visibility="visible"; this.vis=1; if(br.op5&&this.arr){ this.arr.showIt(); }}//alert('showing arrow')}} 
dynElm.prototype.hideIt = function(no){this.css.visibility="hidden"; this.vis=0;}

dynElm.prototype.toggle = function(x,y){
	this.moveTo(x,y);
	this.showIt();
}

function dlSlideShow(){

}

function initObjects(){
	oheader = new dynElm('header',null);
	oborder = new dynElm('border',null);
	orightimage = new dynElm('rightimage',null);
	ofooter = new dynElm('footer',null);
	menus = new Array();
	for(var i=2;i<=nummenus;i++){
		menus[i] = new Array();
		menus[i][0] = new dynElm('menu'+i,null);
		menus[i][1] = new dynElm('menu'+i+'a','menu'+i);
		menus[i][2] = new dynElm('menu'+i+'b','menu'+i);
	}
	ofake = new dynElm('blank',null);
	onav = new dynElm('nav',null);
	onavB = new dynElm('navB','nav');
}

function posObjects(){
	var wide = (br.ie)?document.body.offsetWidth : window.innerWidth;
	var l = wide/2 -325;
	if(l < 0) l = 0;
	oheader.toggle(l,0);
	oborder.toggle(l,75);
	ofooter.toggle(l,466);
	orightimage.toggle(l+480,0);
	onav.toggle(l+6,75);
	menus[2][0].moveTo(l+86,97);
	menus[3][0].moveTo(l+146,97);
	setThings(l);
}

dynElm.prototype.op= 100;
dynElm.prototype.opacityTim= null;
dynElm.prototype.setOpacity= function(num){
	this.css.filter= 'alpha(opacity='+num+')';
	this.css.MozOpacity= num/100;
	this.op= num;
}
