var load = false;
var net6;
function lib_bwcheck(){ 
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; 
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  this.net6=(this.dom && parseInt(this.ver) >= 5 && parseInt(this.ver) <= 7) ?1:0; 
  this.ns4=(document.layers && !this.dom)?1:0;
  this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera5)
  return this
}
bw=new lib_bwcheck()


function lib_obj(obj,nest){ 
  nest=(!nest)?"":'document.'+nest+'.'
  this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
  this.writeref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+"document.layers." +obj+".document"):0;
  this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight
  this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight
  this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth;
  this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth
  this.x=0; 
  this.y=0;
  this.ref=bw.dom||bw.ie4?document:this.css.document;
  this.x=parseInt(this.css.left)||this.css.pixelLeft||this.el.offsetLeft||0; 					//positie t.o.v. linkerkant
  this.y=parseInt(this.css.top)||this.css.pixelTop||this.el.offsetTop||0;						//positie t.o.v. bovenkant
  this.w=this.el.offsetWidth||this.css.clip.width||this.ref.width||this.css.pixelWidth||0; 		//breedte object
  this.h=this.el.offsetHeight||this.css.clip.height||this.ref.height||this.css.pixelHeight||0;	//hoogte object
  this.c=0 //Clip values
  if((bw.dom || bw.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.lay_visible = f_visible;
  this.lay_hide = f_hide;
  this.lay_display = f_display;
  this.lay_none = f_none;
  this.lay_height = f_height;
  this.lay_width = f_width;
  this.bg = f_bg;
  this.clip_to = f_clipTo;
  this.font_col = f_font_col;
  this.font_style = f_font_style;
  this.writeLayer = f_writeLayer;
  
  this.obj = obj + "Object"; eval(this.obj + "=this")
  return this
}

function f_bg(color){ 
	if(bw.opera5) this.css.background=color;
	else if(bw.dom || bw.ie4) this.css.backgroundColor=color;
	else if(bw.ns4) this.css.bgColor=color ; 
}

function f_width(lengte){ 
	if(bw.opera5 || bw.ie4) this.css.pixelWidth=lengte;
	else if(bw.dom ) this.el.style.width=lengte;
	else if(bw.ns4) this.css.document.width=lengte;
}

function f_height(hoogte){ 
	if(bw.opera5 || bw.ie4) this.css.pixelHeight=hoogte;
	else if(bw.dom ) this.el.style.height=hoogte;
	else if(bw.ns4) this.css.document.height=hoogte;
}

function f_visible(){
	if (bw.dom || bw.ie4||bw.opera5){
		 this.css.visibility = "visible";
		 }
	if(bw.ns4){
		this.el.visibility="show";
		}
	}

function f_hide(){
	if (bw.dom || bw.ie4||bw.opera5) {
	this.css.visibility = "hidden";
	}
	if(bw.ns4) {
	this.css.visibility="hide"
	};
	}

function f_display(){
	if (bw.dom || bw.ie4||bw.opera5){
		 this.css.display = "block";	
		 this.css.visibility = "visible";
		 }
	if(bw.ns4){
		this.el.visibility="show";
		}
	}	
	
function f_none(){
	if (bw.dom || bw.ie4||bw.opera5) {
	this.css.display = "none";
	this.css.visibility = "hidden";
	}
	if(bw.ns4) {
	this.css.visibility="hide"
	};
	}

	
function f_clipTo(t,r,b,l,setwidth){ 
  this.ct=t; this.cr=r; this.cb=b; this.cl=l
  if(bw.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}
  }
}	

function f_font_style(waarde){
this.css.fontWeight=waarde;
}

function f_font_col(color){ 
	if(bw.opera5) this.css.color=color;
	else if(bw.dom || bw.ie4) this.css.color=color;
	else if(bw.ns4) this.css.Color=color ; 
}


function f_writeLayer(txt){
if(bw.dom){this.writeref.innerHTML = txt;}
else if(bw.ie4){this.writeref.innerHTML=txt;}
else if(bw.ns4){with(this.writeref){
                        open();
                        write(txt);
                        close();
                  }
            }
}



//Document size object ********
function lib_doc_size(){ 
  this.x=0;
  this.breed=bw.ie && document.body.offsetWidth-20||innerWidth||0;
  this.y=0;
  this.hoog=bw.ie && document.body.offsetHeight-5||innerHeight||0;
  
  if(!this.breed||!this.hoog) {
  								this.breed = 1024;
								this.hoog = 639;
								} 
  this.x50=this.breed/2;
  this.y50=this.hoog/2;
  return this;
}

load=true;