function bwcheck(){ //Browsercheck
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera=0;
	if (navigator.userAgent.indexOf("Opera")>-1 && this.dom) 
		this.opera=1
	
	this.konqueror=(navigator.userAgent.indexOf("Konqueror")>-1)?1:0
	this.ie=0
	this.ns=0
	if (this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera)
		this.ie=5
	else if (this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera)
		this.ie=6
	else if (document.all && !this.dom && !this.opera)
		this.ie=4
	else if (this.dom && parseInt(this.ver) >= 5 && !this.opera && !this.ie)
		this.ns=6
	else if (document.layers && !this.dom)
		this.ns=4
	this.bw=(this.ie || this.ns || this.opera || this.konqueror)
	this.mac=this.agent.indexOf("Mac")>-1
	return this
}
var bw=new bwcheck()

var mMenu=0
var mDiv1=0
var mUtrDiv=0

//if(document.layers){ //NS4 resize fix...
//	scrX= innerWidth; scrY= innerHeight;
//	onresize= function(){if(scrX!= innerWidth || scrY!= innerHeight){history.go(0)} }
//}

if(bw.opera){ //Opera resize fix.
	scrX= innerWidth; scrY= innerHeight;
	document.onmousemove= function(){
		if(scrX<innerWidth-2 || scrY<innerHeight-2 || scrX>innerWidth+2 || scrY>innerHeight+2){
			scrX = innerWidth;
			scrY = innerHeight;
			if (mMenu) foldInit()
			if (mDiv1) prepareDivs()
			if (mUtrDiv) initUtr()
		}
	};
}

/**Making cross-browser objects**/
function makeObj(obj,inest){
	nest=(!inest) ? "":'document.'+inest+'.';
	this.elm= bw.dom?document.getElementById(obj):bw.ie==4?document.all[obj]:bw.ns==4?eval(nest+'document.'+obj):0;
   	this.css= bw.dom || bw.ie==4?this.elm.style:bw.ns==4?eval(nest+"document.layers." +obj):0;
	this.ref= bw.dom || bw.ie==4?document:bw.ns==4?eval(nest+"document.layers." +obj+".document"):0;
	this.x= bw.ns==4?this.css.left:bw.opera?this.css.pixelLeft:this.elm.offsetLeft;
	this.y= bw.ns==4?this.css.top:bw.opera?this.css.pixelTop:this.elm.offsetTop;
	this.height= bw.ns==4?this.ref.height:bw.opera?this.css.pixelHeight:this.elm.offsetHeight;
	this.showIt= b_showIt;
	this.moveIt= b_moveIt;
	this.status= 0;
}

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||bw.opera?"":"px";

function b_showIt(show){this.css.visibility=show?"visible":"hidden";this.status=show;}
function b_moveIt(x,y){
	this.x=x; 
	this.y=y; 
	if (bw.ns==4 || bw.opera) {
		this.css.left=this.x; 
		this.css.top=this.y;
	}
	else {
		this.css.left=this.x+px; 
		this.css.top=this.y+px;
	}
}

/**Initiating the page and making the menu**/
function divExists(obj,inest)
{
  if (document.getElementById)
    return document.getElementById(obj)
  if (document.all)
    return document.all[obj]
  if (document.layers) {
    nest=(!inest)?"":('document.'+inest+'.');
    return eval(nest+'document.'+obj)
  }
  return 0;
}


/*
Text Link/Image Map Tooltip Script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, and 100's more DHTML scripts
Visit http://www.dynamicdrive.com
*/

if (!document.layers&&!document.all&&!document.getElementById)
	event="test"		
	
function showtip(current,e,text){
	if (bw.dom||bw.ie==4){
		thetitle=text.split('<br>')
		if (thetitle.length>1){
			thetitles=''
			for (i=0;i<thetitle.length;i++)
				thetitles+=thetitle[i]
			current.title=thetitles
		}
		else
			current.title=text
	}
}
