/* author: Edward Debevec */
/* Creation date: 4/12/2002 */
	//	var bV=parseInt(navigator.appVersion);
	//	NS4=(document.layers) ? true : false;
	//	IE4=((document.all)&&(bV>=4)) ? true : false;
	//	NS6=(document.getElementById&&!document.all) ? true : false;
	//	ver4 = (NS4 || IE4 || NS6) ? 1 : 0;
		
	//	function MM_reloadPage(init) {  //reloads the window if Nav4 resized
	//		if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
	//			document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	//		else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
	//	}
	//	MM_reloadPage(true);
		
	function makeArray() {
			for (i = 0; i<makeArray.arguments.length; i++)
			this[i + 1] = makeArray.arguments[i];
		}
		
		var resOn = 1;
		
	function aLayer(id, n, boxX, boxY, boxZ, boxW, boxH, vis) {
	    this.id = id;
		this.n = n;
		this.boxX = boxX;
		this.boxY = boxY;
		this.boxZ = boxZ;
		this.boxW = boxW;
		this.boxH = boxH;
		this.vis = vis;
		this.makeLayer = makeLayer;
	}
	
	function bLayer(id, boxX, boxY, boxW, boxH, boxZ, bg) {
		this.id = id;
		this.boxX = boxX;
		this.boxY = boxY;
		this.boxW = boxW;
		this.boxH = boxH;
		this.boxZ = boxZ;
		this.bg = bg;
		this.makeBLayer = makeBLayer;
	}
    
	function makeBLayer() {
		document.write(
		   '<STYLE TYPE="text/css">',
		   '#box', this.id, ' { position:absolute; ',
		       'left:', this.boxX, '; top:', this.boxY, '; ',
			   'width:', this.boxW, '; height:', this.boxH, '; ',
			   'z-index:', this.boxZ, '; border: 1px solid ', this.bg ,'; visibility: visible; ',
			   'background-color:', this.bg, '; layer-background-color:', this.bg, ' }',
		   '</STYLE>\n',
		   '<DIV ID="box', this.id, '">&nbsp;</DIV>\n'
		);
	}
	
	function makeLayer(layerCode) {
	    var padding = (NS4) ? '' : 'padding: 3 0 3 3;';
		document.write(
		   '<STYLE TYPE="text/css">',
		   '#box', this.id, ' { position:absolute; ',
		       'left:', this.boxX, '; top:', this.boxY, '; ',
			   'width:', this.boxW, '; visibility:', this.vis, '; ',
			   'z-index:', this.boxZ, '; }',
		   '</STYLE>\n',
		   '<DIV ID="box', this.id, '">', layerCode, '</DIV>\n'
		);
	}
	
	function togglePointer(img_n,state) {
		image_n = 'pointer' + img_n;
	//	source = 'images/pointer_' + state + '.gif';
	//	document[image].src = 'images/pointer_' + state + '.gif';
		if(IE4) document.images[image_n].src = 'http://mercury.bio.uaf.edu/images/pointer_' + state + '.gif';
		if(NS4) document.layers['boxleftText'].document.images[image_n].src = 'http://mercury.bio.uaf.edu/images/pointer_' + state + '.gif';
		if(NS6) document.images[image_n].src = 'http://mercury.bio.uaf.edu/images/pointer_' + state + '.gif';
	}
	
	function open_win(URL,w,h,m) {
		newWin = window.open(URL,'nWindow','width='+w+',height='+h+',menubar='+m+',scrollbars=1,resizeable=1,location=0,status=0');
		newWin.focus();
	}
	
	function upDate(elem,text) {
		if (!ver4) { return };
			if (NS4) {
				whichEl = eval("document." + elem + ".document");
				with (whichEl) {
					open();
					write(text);
					close();
				}
			}
			else if (IE4) {
				whichEl = eval("document.all." + elem);
				whichEl.innerHTML = text;
			}
			else if (NS6) {
				whichEl = document.getElementById(elem);
				whichEl.innerHTML = text;
			}
	}

