	//---------------------------------------------------------------
	//	General rollover support
	//---------------------------------------------------------------

	function rollover_on(image_name) 
	{
		if (document.images) {
    		document.images[image_name].src = eval(image_name + "_on.src");
		}

		else if (document.getElementById) 
		{
			elem = document.getElementById(image_name);
    		elem.src = eval(image_name + "_on.src");
		}

		return(true);
	}

	function rollover_off(image_name) 
	{
		if (document.images) {
    		document.images[image_name].src = eval(image_name + "_off.src");
		}

		else if (document.getElementById) 
		{
			elem = document.getElementById(image_name);
    		elem.src = eval(image_name + "_off.src");
		}

		return(true);
	}

	/*---------------------------------------------------------------
		PNG rollover buttons need special handling in IE 5.5 and 6.

		*)	A runtime filter handles PNG transparency.

		*)	That filter draws into the image area, but the image
			itself also needs an image to display, so we use a
			1 pixel transparent gif, temporarily.

		*)	This approach works because the real image is stored
			in an intermediate variable which is never modified.
	---------------------------------------------------------------*/

	function png_rollover_on(image_name) 
	{
		if (document.getElementById) 
		{
			image 	  = document.getElementById(image_name);
    		image.src = eval(image_name + "_on.src");

			image.style.width  = image.width  + "px";
			image.style.height = image.height + "px";
			
			image.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + image.src + "', sizingMethod='scale')";

			image.src = BASE_URL + "/images/transparent_pixel.gif";
		}

		else if (document.images) {
    		document.images[image_name].src = eval(image_name + "_on.src");
		}

		return(true);
	}

	function png_rollover_off(image_name) 
	{
		if (document.getElementById) 
		{
			image     = document.getElementById(image_name);
    		image.src = eval(image_name + "_off.src");

			image.style.width  = image.width  + "px";
			image.style.height = image.height + "px";
			
			image.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + image.src + "', sizingMethod='scale')";

			image.src = BASE_URL + "/images/transparent_pixel.gif";
		}
		else if (document.images) {
    		document.images[image_name].src = eval(image_name + "_off.src");
		}

		return(true);
	}

	//---------------------------------------------------------------
	//	Runtime FORM support...
	//---------------------------------------------------------------

	//---------------------------------------------------------------
	//	To prevent ENTER from causing a form submission, use this
	//	function and add this to each text input field:
	//
	//		onkeypress="return defeat_enter();"	
	//---------------------------------------------------------------

	function defeat_enter() 
	{
  		if (window.event && window.event.keyCode == 13)
			return(false);
		else
			return(true);
	}


	function set_form_field(form_name, field_name, new_value) 
  	{
   		document.forms[form_name].elements[field_name].value = new_value;

//alert("set: " + document.forms[form_name].elements[field_name].value);

		return(true);
  	} 

	function submit_form(form_name) 
  	{
/*
alert("submit: " + form_name);
alert("set 1: " + document.forms[form_name].elements[0].name);
alert("set 1: " + document.forms[form_name].elements[0].value);
alert("set 2: " + document.forms[form_name].elements[1].name);
alert("set 2: " + document.forms[form_name].elements[1].value);

		if (document.forms[form_name].submit)
			alert("submit method exists for " + form_name);
*/
   		document.forms[form_name].submit();

		return(true);
  	} 

	//---------------------------------------------------------------
	//  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; 
		}
		*/
	}
