	// toggle visibility
	function multitoggle( targetId, selfId ) {
		if( document.getElementById ) {
			
			// If we are toggling a biography, check for spacing grid
			var bio_check = selfId.indexOf( "bio" );
			if( bio_check != -1 ) {
				// If grid exists, display it
				grid = selfId.replace( /([^\d]+)/, '' );
				grid = 'grid_' + grid;
				target = document.getElementById( grid );
				if( target ) {
					target.style.display = "block";
				} // end if
			} // end if

			// Toggle target elements to visibility
			target = document.getElementById( targetId );
			if( target.style.display == "" || target.style.display == "none" ) {
				target.style.display = "block";
			} // end if
			else {
				target.style.display = "inline";
			} // end else

			// Hide the original toggle button
			target = document.getElementById( selfId );
			target.style.display = "none";

		} // end if
	} // end function

	// Help Viewer; version 1.0, 121505; ( element database name = string, element name = string )
	// type 'general' = general source [bios], type 'specific' = specific source [dates]
	function sourceViewer( field, element ) {
		// Create the URL for the viewer to load
		if( field ) {
			url = "/encyclopedia/help/?field=" + field + "&element=" + element;
		} // end if
		else {
			url = "/encyclopedia/help/?error=1";
		} // end else
		// Open the new window for them to view the faq
		viewer = window.open( url, "helpViewer", "toolbar=no,location=no,scrollbars=no,resizable=no,width=450,height=300" );
		viewer.focus();
	} // end function
	
	// ThreeKingdoms.com Novel Link (Redirect)
	function novelChapter( chapter ) {
		url = 'http://threekingdoms.com/' + chapter + '.htm';
		window.open( url );
	} // end function

	// ThreeKingdoms.com Novel Link (Status Bar)
	function statusBar( chapter ) {
		self.status='Open "http://threekingdoms.com/' + chapter + '.htm" in a new window';
		return true;
	} // end function

