
		/*************************************************************************
		  This code is from Dynamic Web Coding at http://www.dyn-web.com/
		  Copyright 2001-3 by Sharon Paine 
		  See Terms of Use at http://www.dyn-web.com/bus/terms.html
		  regarding conditions under which you may use this code.
		  This notice must be retained in the code as is!
		*************************************************************************/
		
		// resize fix for ns4
		var origWidth, origHeight;
		if (document.layers) {
			origWidth = window.innerWidth; origHeight = window.innerHeight;
			window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
		}
		
		// link style change
		var cur_link;
		function doLinkClass(lnk) {
		  if (lnk && lnk.blur) lnk.blur();	// remove marquee
		  if (!lnk || cur_link == lnk) return;
		  if (cur_link) cur_link.className = "done";
		  lnk.className = "on";
		  cur_link = lnk;
		}
		
		var cur_lyr;	// holds id of currently visible layer
		function swapLayers(lnk,id,id2) {
		//Element.hide('drop_down1');
		Element.hide('drop_down2');
		//Element.hide('drop_down3');
		for (var i=0;i<7;i++){
		  	//if ( $('lyr'+i+'b').style.display!='none' ){
			//  	new Effect.Fade('lyr'+i+'b');
			//}else{
				Element.hide('lyr'+i+'b');
			//}
		}
		  doLinkClass(lnk);
		  if (cur_lyr) hideLayer(cur_lyr);
		  //new Effect.Appear(id2);
		  Element.show(id2);
		  Element.show(id);
		  showLayer(id);
		  showLayer(id2);
		  cur_lyr = id;
		}
		
		function showLayer(id) {
		  var lyr = getElemRefs(id);
		  if (lyr && lyr.css) lyr.css.visibility = "visible";
		}
		
		function hideLayer(id) {
		  var lyr = getElemRefs(id);
		  if (lyr && lyr.css) lyr.css.visibility = "hidden";
		}
		
		function getElemRefs(id) {
			var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? getLyrRef(id,document): null;
			if (el) el.css = (el.style)? el.style: el;
			return el;
		}
		
		// get reference to nested layer for ns4
		// from old dhtmllib.js by Mike Hall of www.brainjar.com
		function getLyrRef(lyr,doc) {
			if (document.layers) {
				var theLyr;
				for (var i=0; i<doc.layers.length; i++) {
			  	theLyr = doc.layers[i];
					if (theLyr.name == lyr) return theLyr;
					else if (theLyr.document.layers.length > 0) 
			    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
							return theLyr;
			  }
				return null;
		  }
		}
		
		function init(id,lyr) {
		  var lnk = getElemRefs(id);
		  swapLayers(lnk,lyr);
		}
		
		
		var inMenuDropDown = true;
		var inMenu = true;
		
		function leaveDropDown(){
			inMenuDropDown=false;
			//$('log').value = $('log').value + '\r\nleaveDropDrown();'+'\t'+inMenu+'\t'+inMenuDropDown;
			
			setTimeout('checkForOpenMenus()',100);
		}
		
		function enterDropDown(obj){
			inMenuDropDown=true;
			
			//$('log').value = $('log').value + '\r\nenterDropDrown();'+'\t'+inMenu+'\t'+inMenuDropDown+'\t'+obj.id;
		}
		
		function leaveMenu(){
			inMenu=false;
			//$('log').value = $('log').value + '\r\nleaveMenu();'+'\t'+inMenu+'\t'+inMenuDropDown
			setTimeout('checkForOpenMenus()',100);
		}
		
		function enterMenu(){
			inMenu=true;
			
//			$('log').value = $('log').value + '\r\nenterMenu();'+'\t'+inMenu+'\t'+inMenuDropDown
		}
		
		function checkForOpenMenus(){
//		$('log').value = $('log').value + '\r\ncheckForOpenMenus;\t'+inMenu+'\t'+inMenuDropDown
			//alert(inMenu + "-" + inMenuDropDown);
			
			var e = document.getElementsByTagName("div");
			
			if ( (inMenu == false) && (inMenuDropDown == false) ){
				for (var i=0; i < e.length; i++){
					if ( !isUndefined(e[i].id) ){
						if ( e[i].id.indexOf('lyr') != -1 ) {
							//if ( e[i].id.indexOf('b') != -1 ) {
								Element.hide(e[i]);	
							//}
						}
					}
				}
			}
			
		}
		
		function isUndefined(a) {
			return typeof a == 'undefined';
		} 
	