	//---------------------------------------------------------------
	//	RUN_LOCAL must be set MANUALLY !!!
	//---------------------------------------------------------------

	var RUN_LOCAL = false;

	if (RUN_LOCAL)
		BASE_URL = "/herbbar";
	else
		BASE_URL = "http://www.herbbar.com";

	//	Default page configuration

	var  AUTO_RESIZE    = true;		//	resize browser to fit Acme pages?
	var  NO_RIGHT_CLICK = true;		//	disallow right click?
	var  AUTO_REFRAME   = false;	//	reframe the page?


	//	Check for browser version; this approach avoids a function call.

    var isNS = (navigator.appName == "Netscape" && 
				parseInt(navigator.appVersion) >= 4);

	//---------------------------------------------------------------
	//	General rollover support, with specific support for the
	//	"Acme Enterprises" logo at the bottom of every page
	//---------------------------------------------------------------

	function RolloverOn(image_name) 
	{
		if (document.images) 
    		document[image_name].src = eval(image_name + "_on.src");

		else if (document.getElementById) {
			elem = document.getElementById(image_name);
    		elem.src = eval(image_name + "_on.src");
		}
	}

	function RolloverOff(image_name) 
	{
    	if (document.images) 
        	document[image_name].src = eval(image_name + "_off.src");

		else if (document.getElementById) {
			elem = document.getElementById(image_name);
    		elem.src = eval(image_name + "_off.src");
		}
	}


	//---------------------------------------------------------------
	//  Size the page appropriately for the monitor
	//---------------------------------------------------------------

	function resize_browser(width, height) 
	{
		if (width && height) 
  			window.resizeTo(width, height);
		else
		{
  			if (screen.width <= 640)
    			win_width = 640;
  			else
    			win_width = 760;

  			if (screen.height <= 600)
    			win_height = 550;
  			else if (screen.height <= 768)
    			win_height = 740;
  			else 
    			win_height = 910;

  			window.resizeTo(win_width, win_height);
		}
	}

	/*---------------------------------------------------------------
		IE won't allow a window to change its own chrome via
		Javascript, though Netscape does (did?).  Popper-stoppers
		look for this.
	---------------------------------------------------------------*/

	function no_chrome()
	{

		//	Nope...
	
		window.self.menubar.visible     = false;
		window.self.toolbar.visible     = false;
		window.self.locationbar.visible = false;
		window.self.personalbar.visible = false;
		window.self.statusbar.visible   = false;

		//	Nope...

		var elem, str;

		str = "toolbar";
	
		if (document.getElementById) {
			elem = document.getElementById(str);
			elem.style.display = false;
		}
		else 
			document.all[str].style.display = false; 
	}


	//---------------------------------------------------------------
	//	Pop up a new copy of the browswer, aimed at the caller's URL
	//
	//	A handle to the new browser is returned, which can be
	//	use to close or otherwise control it.
	//---------------------------------------------------------------

	function new_browser(		//	open another copy of the browser	
		url						//	open this url, which may have args
	){
		obj = window.open(url);
		return(obj);
	}

	function close_browser(		//	open another copy of the browser	
		obj						//	open this url
	){
		obj.close();
	}

	//---------------------------------------------------------------
	//  Feeble attempt to dissuade copying via mouse right click
	//---------------------------------------------------------------

	function no_right_click(e) 
	{
  		var message = 
    	"Please respect these copyrighted materials.  You\n"         +
		"may link to any page, but not to a specific image.\n" 

  		if (document.all) 
  		{
    		if (event.button == 2) 
			{
      			alert(message);
      			return false;
    		}
  		}

		//	Only Navigator supports <LAYER>

  		if (document.layers) 
  		{
    		if (e.which == 3) 
			{
      			alert(message);
      			return false;
    		}
  		}
	}

	//	Configure mouse activity

	function init_mouse_clicks()
	{
		if (NO_RIGHT_CLICK) 
		{
   			if (document.layers) 
   	  			document.captureEvents(Event.MOUSEDOWN);

   	  		document.onmousedown=no_right_click;
		}
	}

	//	Based on globals, configure the page

	function init_page()
	{
		init_mouse_clicks();

		if (AUTO_RESIZE)
			resize_browser(0, 0);
	}

	//---------------------------------------------------------------
	//	If the browser winds up showing just a frame instead 
	//	of the entire frameset, reframe.  This happens when
	//	google (et al) refers to a "_main.php" page instead
	//	of the frameset page.
	//---------------------------------------------------------------

	function reframe_page(filename) 
	{
		//	CGB test
		//if (!RUN_LOCAL)
		//	AUTO_REFRAME = false;
 
		if (!AUTO_REFRAME)
			return(TRUE);

		if (top == self) 
		{ 
			var newURL = BASE_URL;

			if (filename.charAt(0) == "/")
				newURL += filename; 
			else
				newURL += "/" + filename; 

			top.location.replace(newURL); 
		} 

		/*	This doesn't seem to be necessary...

		var isLocalReferrer = false; 
		var referrerSupplied = 
			(document.referrer && (document.referrer.length > 1)); 

		if (referrerSupplied) { 
			var referrerIndex = document.referrer.indexOf(BASE_URL); 

			if ((referrerIndex >= 0) && (referrerIndex < 10)) 
				isLocalReferrer = true; 
		} 

		if (referrerSupplied && !isLocalReferrer) 
		{ 
			var newURL = BASE_URL + filename; 
			if (document.images) 
				top.location.replace(newURL); 
			else 
				top.location.href = newURL; 
		}
		*/
	}


	//---------------------------------------------------------------
	//  Almost anything in a FORM can prompt a "submit":
	//
    //		<INPUT 		
    //  		type=text
	//			size=30			
	//			onUnfocus="submit_form()"
    //			name=search_keywords
    //			value= whatever
	//		>
	//
	//	Caveat: seems to work best with FORM "get", not "post"
	//---------------------------------------------------------------

	function submit_form()
	{
		document.theform.submit()
	}

