//Default browsercheck, added to all scripts!
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
bw=new checkBrowser()
//With nested layers for netscape, this function hides the layer if it's visible and visa versa
function showHide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	if(obj.visibility=='visible' || obj.visibility=='show') obj.visibility='hidden'
	else obj.visibility='visible'
}
//Shows the div
function show(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='visible'
}
//Hides the div
function hide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
	obj.visibility='hidden'
}

	//Makes crossbrowser object.
function makeObj(obj){								
   	this.css=bw.dom? document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?document.layers[obj]:0;	
   	this.wref=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj].document:0;		
	return this
}

//Capturing mousemove
var descx,descy;
function popmousemove(e){descx=bw.ns4?e.pageX:event.x; descy=bw.ns4?e.pageY:event.y}

//Initiates page
var anyThingChanged = false;
var isLoaded=true;;

// BEGIN: script to press the i-th button
function genitem(i){
    if(isLoaded){
		var thisMenu = eval("parent.frames.content.item" + i);
		thisMenu.css.visibility='visible';
	
		anyThingChanged = true;
	    }
}
// END: press script

// BEGIN: script to unpress the i-th button
function dagpopup(i){
    if(isLoaded){
		var thisMenu = eval("parent.frames.content.item" + i);
		thisMenu.css.visibility='hidden';
	
		anyThingChanged = true;
	    }
}

function popupInit(){
    menu1_1=new makeObj('menu1');
    menu1_2=new makeObj('menu3');
    menu1_3=new makeObj('menu2');
    menu1_4=new makeObj('menu5');
	menu1_5=new makeObj('menu4');
	menu1_6=new makeObj('menu6');
	menu1_7=new makeObj('menu7');
	menu1_8=new makeObj('menu8');
	menu1_9=new makeObj('menu9');
	}
	
function hidebutton(){
		menu1_1.css.visibility='hidden';
		menu1_2.css.visibility='hidden';
		menu1_3.css.visibility='hidden';
		menu1_4.css.visibility='hidden';
		menu1_5.css.visibility='hidden';
		menu1_6.css.visibility='hidden';
		menu1_7.css.visibility='hidden';
		menu1_8.css.visibility='hidden';
		menu1_9.css.visibility='hidden';
		}

function hideitem() {		
		parent.frames.content.hidepopup();
		}

function ExplorerFix() {
		for (a in document.links) document.links[a].onfocus = document.links[a].blur; 
		}
		if(document.all) document.onmousedown = ExplorerFix;
		
