	
	
	// Error handling functionality
	
	function errorReport(msg, asp, line){
		// Set up the error object (in this case an image).
		var reportError = new Image()
		var ErrorMsg = escape(msg);// make the massages url friendly
		var casp = escape(asp);
		var title = escape(document.title)
		var os = escape(navigator.appVersion)
		
		// build up the error report
		var url = "http://pclancey.com/dombug/add_fh_error.asp?errorTitle="+ title +"&errorText="+ ErrorMsg +"&errorLine="+ line +"&errorAsp="+ casp +"&errorAppVer="+ os;
		
		// view report..	FOR DEBUGGING
		 prompt("errorUrl",msg +"  "+ line+"  "+asp);
		// send error..		FOR LIVE SITE
		//reportError.src = url;
		
		// Returning true forces the browser to ignore the error message
		// Javascript will continue to function on the page if the error 
		// is not too dramatic. 
		return true;
	}

	//window.onerror = errorReport;

	var navVer = navigator.appVersion.charAt(0);
	var dom = (document.getElementById) ? true : false;
	var ns4 = (document.layers) ? true : false;
	var all = (document.all) ? true : false;
	var ie4 = (all && !dom) ? true : false;
	var ie5 = (all && dom) ? true : false;
	var isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
	var userAgnt = navigator.userAgent.toLowerCase();
	var isOpera 	= ((userAgnt.indexOf("opera")!=-1) && navVer >= 4) ? true : false;
	var isMozilla = (userAgnt.indexOf("mozilla")!=-1) ? true : false;
	var isMoz5 = (isMozilla && dom && !all);
	
	/* menu settings */
	var OM_menuVersion = "2.2 20-04-2005";
	var OM_useMouseOver = true;/* mouseover or click root level only ? */
	var OM_transparent = true;/* using transparent layers */ 
	var OM_snapin = true;/* fade in ? (can't if using tranperency ) */
	var OM_snapout = true; /* fade out ? (can't if using tranperency ) */
	var OM_snapduration = 0.5; /* fade duration */ 
	var OM_offsetX = 5;/* left */
	var OM_offsetY = 5;/* top */
	var OM_offsetTop = -3;/* first menu */
	var OM_offsetLeft = 5;/* first menu */
	var OM_useGlobalMouseDownToClose = false;
	var OM_pageActionFunction = "optionAppend";
	var OM_topXY = null // top left ref if, not body defaul is null
	var OM_activeMenu = null;
	var OM_timerout = null;
	var OM_timer = 340;
	var OM_baseZindex = 40;
	var OM_borderWidth = 1;
	var OM_written = false;
	var OM_arrowFromRight = 0;/* extra right padding? */
	var OM_linkFromLeft = 0;/* what is the left+right padding in the style sheet for the menuItems? */	
	var OM_menuroot = "/menu/";
	var OM_i = userAgnt.indexOf("msie");/* assatain if browser is 5.5 or less */
	var OM_ieVer = false;
	if (OM_i >= 0) {
	    OM_ieVer = parseFloat(userAgnt.substr(OM_i + 4));
	}	
	var OM_useIe50bugFix = (OM_ieVer && OM_ieVer < 5.5) ? true : false ;/* use ie 5.0x bug fix function? */
	var OM_rootMenu = new Array;
	
	function OM_showAll(){
		document.getElementById("linkMenuCSS1").disabled = true;
		document.getElementById("linkMenuCSS2").disabled = false;
		OM_written = false;
	}
	function OM_hideAll(){
		document.getElementById("linkMenuCSS1").disabled = false;
		document.getElementById("linkMenuCSS2").disabled = true;
		OM_written = true;
	}
		
	/*		
	 *		which menu script ? 								
	 * 		note: Ie5 ver. is the same the Moz ver  			
	 * 		just in different files to eliminate  				
	 * 		the need for 'if ()' statements and allow 			
	 * 		browser spacific tweeks. 							
	 * 		Opera will use All version, but will only work 		
	 * 		if it is set to 'Identify as MSIE 5.0'!. 			
	 * 		ns4 uses old NS-Smith menu,
	 *		but will soon be dropped alltogether.						
	 *
	 */


	var menuJs = "Blank";
	if (ns4){
		//menuJs = "Smith"; // depricated
		menuJs = "Blank";
	} else if (isOpera) {
		menuJs = "Opera";
	} else if (ie5){
		if (isMac){
			menuJs = "Blank";// depricated
		} else {
			menuJs = "Ie";
		}
	} else if (isMoz5){
		menuJs = "Moz";
	} else if (ie4){
		menuJs = "Blank"; // depricated
	}

	if (menuJs != "Blank"){
		// don't load blank css, have link to blank css on page and disable if we are using the rollover menu
		if (document.getElementById("linkMenuCSS2")){
			document.getElementById("linkMenuCSS2").disabled = true;
		}	
		var src = "<scr" + "ipt src=\""+ OM_menuroot +"MENU_menu"+ menuJs +".js\" type=\"text/javascript\"></scr" + "ipt>";
		document.write(src);
		OM_written = true;
	}
	

