	function outputAd ()
		{	// Modify to reflect site specifics
			adserver	= "http://eb.adbureau.net"; 
			target		= "/site=SPELL/aamsz=300x250/pos=rec1"; 

			// Cache-busting and pageid values 
			random = Math.round(Math.random() * 10000000000); 
			if (!pageNum) var pageNum = Math.round(Math.random() * 10000000000); 
			document.write('<IFRAME SRC="'+adserver+'/hserver/acc_random='+ random + target + '/pageid=' + pageNum + '"'); 
			document.write(' NORESIZE SCROLLING=NO HSPACE=0 VSPACE=0 FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 WIDTH=300 HEIGHT=250 allowTransparency="true">'); document.write('<SCR'); 
			document.write('IPT SRC="' + adserver + '/jnserver/acc_random=' + random + target + '/pageid=' + pageNum + '">'); 
			document.write('</SCR'); 
			document.write('IPT>'); 
			document.write('</IFRAME>'); 
		};	

	// This function appends a subclass name to a CSS style class name.
	function appendCSSStyleName (name, subclass)
		{	return containsCSSStyleName(name, subclass) ? name : ( name + " " + subclass );
		}; // function appendCSSStyleName (name, subclass)

	// This function determines if a subclass name appears in a CSS style class name.
	function containsCSSStyleName (name, subclass)
		{	var pos = -1;
			
			// Didn't find the subclass name.
			if ( !name )
				{	return false;
				} // if ( !name )
			
			// Found the subclass name.
			else if ( name == subclass )
				{	return true;
				} // else if ( name == subclass )

			// Found the subclass name.
			else if ( name.indexOf(subclass + " ") == 0 )
				{	return true;
				} // else if ( name.indexOf(subclass + " ") == 0 )

			// Found the subclass name.
			else if ( (pos = name.indexOf(" " + subclass)) == (name.length - subclass.length - 1) && pos >= 0 )
				{	return true;
				} // else if ( (pos = name.indexOf(" " + subclass)) == (name.length - subclass.length - 1) && pos >= 0 )

			// Found the subclass name.
			else if ( name.indexOf(" " + subclass + " ") >= 0 )
				{	return true;
				} // else if ( name.indexOf(" " + subclass + " ") >= 0 )

			// Didn't find the subclass name.
			else
				{	return false;
				}; // else
		}; // function containsCSSStyleName (name, subclass)	

	// This function removes a subclass name appears in a CSS style class name.
	function removeCSSStyleName (name, subclass)
		{	var pos = -1;
		
			// Didn't find the subclass name.
			if ( !name )
				{	return "";
				} // if ( !name )
			
			// Found the subclass name.
			else if ( name == subclass )
				{	return "";
				} // else if ( name == subclass )

			// Found the subclass name.
			else if ( name.indexOf(subclass + " ") == 0 )
				{	return name.substring(subclass.length, name.length);
				} // else if ( name.indexOf(subclass + " ") == 0 )

			// Found the subclass name.
			else if ( (pos = name.indexOf(" " + subclass)) == (name.length - subclass.length - 1) && pos >= 0 )
				{	return name.substring(0, name.length - subclass.length - 1);
				} // else if ( (pos = name.indexOf(" " + subclass)) == (name.length - subclass.length - 1) && pos >= 0 )

			// Found the subclass name.
			else if ( name.indexOf(" " + subclass + " ") >= 0 )
				{	var pos = name.indexOf(" " + subclass + " ");
					return name.substring(0, pos) + name.substring(pos + subclass.length + 1, name.length);
				} // else if ( name.indexOf(" " + subclass + " ") >= 0 )

			// Didn't find the subclass name.
			else
				{	return name;
				}; // else
		}; // function removeCSSStyleName (name, subclass)
	
	// The current tab.
	var curr_tab = "tab_pane_words_study";

	// This function shows a tab pane.
	function showTabPaneById (id)
		{	// Get the current tab pane.
			var tab = document.getElementById(curr_tab);

			// Hide the tab.
			if ( tab )
				{	tab.style.display = "none";
				}; // if ( tab )

			// Get the tab pane to show.
			var tab = document.getElementById(id);

			// Show the tab.
			if ( tab )
				{	tab.style.display = "block";
				}; // if ( tab )

			// Save the new tab id.
			curr_tab = id;

			// Get the source.
			var source = document.getElementById(id + "_link");			

			// Get the list control.
			var parent = source ? source.parentNode : false;

			// Get all the li tags.
			var lis = parent ? parent.getElementsByTagName("li") : false;

			// Get the number of li tags.
			var num_lis = lis ? lis.length : 0;

			// Remove the active field from all the li elements.
			for ( var index = 0; index < num_lis; index++ )
				{	// Remove the active subclass.
					lis.item(index).className = removeCSSStyleName(lis.item(index).className, "active");
				}; // for ( var index = 0; index < num_lis; index++ )

			// Append the active subclass onto the parent.
			if ( source )
				{	source.className = appendCSSStyleName(source.className, "active");
				}; // if ( source.parentNode )
		}; // function showTabPaneById (id)

	function open_doc (uri, width, height)
		{	aWindow = window.open(uri, "pron_window","toolbar=no,scrollbars=yes,status=no,resizable=yes,menubar=yes,width=" + width + ",height=" + height);
		}; // function open_doc (uri, width, height)

	var curr_spell_tip = false;

	var spell_tip_window_listener =
		{	// This listener handles all window resize events.
			onWindowResized : function ()
				{	// Reposition the spelling tip.
					this.repaint();
				}, 

			// This listener handles all window scroll events.
			onWindowScrolled : function ()
				{	// Reposition the spelling tip.
					this.repaint();
				}, 

			// This method respositions the spelling tip which is currently displayed.
			repaint : function ()
				{	// Reposition the spelling tip.
					if ( curr_spell_tip )
						{	// Compute its new position.
							var x = getWindowScrollLeft() + Math.floor((getWindowWidth() - getElementWidth(curr_spell_tip)) / 2);
							var y = getWindowScrollTop() + Math.floor((getWindowHeight() - getElementHeight(curr_spell_tip)) / 2);					

							// Set the new x-position.
							curr_spell_tip.style.left = x + "px";
							curr_spell_tip.style.top = y + "px";
						}; // if ( curr_spell_tip )
				}
		}; 

	function getScreenCoords (node)
		{	var x = 0;
			var y = 0;

			while ( node && node.offsetParent )
				{	x		+= node.offsetLeft;
					y		+= node.offsetTop;
					node	= node.offsetParent;
				}; // while ( node )

			return { x: x, y: y };
		}; // function getScreenCoords (node)

	function show_spelling_tip (control, which)
		{	// Hide the current spelling tip.
			if ( curr_spell_tip )
				{	curr_spell_tip.style.display = "none";
				}; // if ( curr_spell_tip )

			// Get the next tip.
			curr_spell_tip = document.getElementById("tip_" + which);

			// Show the spelling tip.
			if ( curr_spell_tip )
				{	// Get the screen coordinates of the control.
					var coords = getScreenCoords(control);
				
					// Show the box.
					curr_spell_tip.style.display	= "block";

					// Compute the box's new coordinates.
					var width		= getElementWidth(curr_spell_tip);
					var height		= getElementHeight(curr_spell_tip);
					var pageWidth	= getPageWidth();
					var x			= (coords.x + width + 20) >= pageWidth ? (pageWidth - width - 20) : coords.x;
					var y			= Math.max(0, coords.y - height);

					// Set the box's new coordinates.
					curr_spell_tip.style.left	= x + "px";
					curr_spell_tip.style.top	= y + "px";

					// Reposition the spelling tip.
					//spell_tip_window_listener.repaint();
				}; // if ( curr_spell_tip )

			// Set up the window listener (if needed).
			//addWindowListener(spell_tip_window_listener);
		}; // function show_spelling_tip (which)

	// Returns the widget's height.
	function getElementHeight (element)
		{	if ( element )
				{	return element.style.pixelHeight ? element.style.pixelHeight : element.offsetHeight;
				} // if ( view )

			else
				{	return 0;
				}; // else
		};

	// Returns the widget's width.
	function getElementWidth (element)
		{	if ( element )
				{	return element.style.pixelWidth ? element.style.pixelWidth : element.offsetWidth;
				} // if ( view )

			else
				{	return 0;
				}; // else
		};

	// Returns the page height.
	function getPageHeight ()
		{	// The height values.
			var yScroll			= getWindowScrollHeight();
			var windowHeight	= getWindowHeight();

			// Get the final page height.
			return ( yScroll < windowHeight ) ? windowHeight : yScroll;
		};

	// Returns the page width.
	function getPageWidth ()
		{	// The horizontal and vertical scroll values.
			var xScroll		= getWindowScrollWidth();
			var windowWidth	= getWindowWidth();

			// Get the final page width.
			return ( xScroll < windowWidth ) ? windowWidth : xScroll;
		};

	// Returns the window's width.
	function getWindowWidth ()
		{	// All except Explorer.
			if ( self.innerHeight ) 
				{	return self.innerWidth;
				} // if ( self.innerHeight ) 
				
			// Explorer 6 Strict Mode
			else if ( document.documentElement && document.documentElement.clientHeight ) 
				{	return document.documentElement.clientWidth;
				} // else if ( document.documentElement && document.documentElement.clientHeight ) 
				
			// Other Explorers
			else if ( document.body ) 
				{	return document.body.clientWidth;
				} // else if ( document.body ) 

			// Oops!
			else
				{	return 0;
				}; // else
		};

	// Returns the window's height.
	function getWindowHeight ()
		{	// All except Explorer.
			if ( self.innerHeight ) 
				{	return self.innerHeight;
				} // if ( self.innerHeight ) 
				
			// Explorer 6 Strict Mode
			else if ( document.documentElement && document.documentElement.clientHeight ) 
				{	return document.documentElement.clientHeight;
				} // else if ( document.documentElement && document.documentElement.clientHeight ) 
				
			// Other Explorers
			else if ( document.body ) 
				{	return document.body.clientHeight;
				} // else if ( document.body ) 

			// Oops!
			else
				{	return 0;
				}; // else
		};

	// Return's the documents scroll top.
	function getWindowScrollTop ()
		{	return document.documentElement.scrollTop || window.pageYOffset || 0; 
		}; // function getWindowScrollTop ()

	// Return's the window's scroll left.
	function getWindowScrollLeft ()
		{	return document.documentElement.scrollLeft || window.pageXOffset || 0; 
		}; // function getScrollLeft ()

	// Returns the window's scroll height.
	function getWindowScrollHeight ()
		{	// Process as usual.
			if ( window.innerHeight && window.scrollMaxY ) 
				{	return window.innerHeight + window.scrollMaxY;
				} // if ( window.innerHeight && window.scrollMaxY ) 

			// All but Explorer Mac.
			else if ( document.body.scrollHeight > document.body.offsetHeight )
				{	return document.body.scrollHeight;
				} // else if ( document.body.scrollHeight > document.body.offsetHeight )
				
			 // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			else 
				{	return document.body.offsetHeight;
				}; // else
		};

	// Returns the window's scroll width.
	function getWindowScrollWidth ()
		{	// Process as usual.
			if ( window.innerHeight && window.scrollMaxY ) 
				{	return document.body.scrollWidth;
				} // if ( window.innerHeight && window.scrollMaxY ) 

			// All but Explorer Mac.
			else if ( document.body.scrollHeight > document.body.offsetHeight )
				{	return document.body.scrollWidth;
				} // else if ( document.body.scrollHeight > document.body.offsetHeight )
				
			 // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			else 
				{	return document.body.offsetWidth;
				}; // else
		};

	// A list of window listeners.
	var window_listeners = new Array();

	// This function adds a windows listern to the system.
	function addWindowListener (listener)
		{	// Check if the listener is already registered. If so, then don't readd it.
			for ( var index = 0; index < window_listeners.length; index++ )
				{	if ( window_listeners[index] == listener )
						{	return;
						}; // if ( window_listeners[index] == listener )
				}; // for ( var index = 0; index < window_listeners.length; index++ )

			// Add the listener.
			window_listeners[window_listeners.length] = listener;
		}; // function addWindowListener (listener)

	// Set up the window resize event handler.
	window.onresize = 
		function ()
			{	// Notify each listener of the event.
				for ( var index = 0; index < window_listeners.length; index++ )
					{	if ( window_listeners[index].onWindowResized )
							{	window_listeners[index].onWindowResized();
							}; // if ( window_listeners[index].onWindowResized )
					}; // for ( var index = 0; index < window_listeners.length; index++ )
			}; // function ()

	// Set up the window scroll event handler.
	window.onscroll = 
		function ()
			{	// Notify each listener of the event.
				for ( var index = 0; index < window_listeners.length; index++ )
					{	if ( window_listeners[index].onWindowScrolled )
							{	window_listeners[index].onWindowScrolled();
							}; // if ( window_listeners[index].onWindowScrolled )
					}; // for ( var index = 0; index < window_listeners.length; index++ )
			}; // function ()