/***************************************************************************************************
***********************************                              ***********************************
*****                                      MOUSEOVER MENU                                      *****
***********************************                              ***********************************
****************************************************************************************************

     This script is intended for use with a set of table cells, and will change the appearance of the cell (based on the class styles specified in the corresponding css style sheet) and the mouse pointer while the mouse is hovering over it.  Clicking on the cell will execute a hyperlink to the location specified by the "elink" attribute into the window/frame specified by the "tframe" attribute.  The "href" attribute is not used and should not be specified.  This script will also display details in the status bar when the menu item is "hovered" upon.  There is also a seperate function to display status bar information for other items on the page when hovered upon.  The script requires that special attributes be set before calling any of the functions.  Without the these attributes or correct class names for style settings, this script will not function properly.  This has been done intentionally as a form of copy protection.  This script is copyright 2006 by Jamie Okland and may not be modified, sold, copied, or redistributed in any form without express written consent by its author.

Required files: a linked html page containing a call to one of the functions with the required attributes, a correctly named class containing style information for each of the toggle functions.


**************************************************
****************** Begin Script ******************
**************************************************
*/

function ToggleOn(Obj)
/* This function will change the contents of a table cell
to the style specified in a css class called td.HiLite.
It will also set the status bar and tooltip to display the
string information in "title". */
{
  Obj.className = "HiLite";
	window.defaultStatus = Obj.title;
}


function ToggleOff(Obj)
/* This function will change the contents of a table cell
to the style specified in a css class called td.Normal.
It will then set the status bar to display the page title. */
{
  Obj.className = "Normal";
  ClearTitle();
}


function Go(Obj)  
/* This function will execute a hyperlink to the location
specified in "elink".  The target frame defaults to "_self",
but can be specified in the "tframe" property of the calling
object. */
{
	var LinkTo = Obj.getAttribute('elink');
	var TF = Obj.getAttribute('tframe');
	var TargetWindow = "_self";
	if (TF != null)
		TargetWindow = TF;
	window.open(LinkTo,TargetWindow);
}


function ClearTitle()
/* This function will make the status bar display the page 
title as specified in the html head. */
{
  window.defaultStatus = document.title;
}


function SetTitle(Obj) 
/* This function will set the status bar to display the "title" 
propery of the object. */
{
	window.defaultStatus = Obj.title;
}

function GalleryWindow(dir)
/* This function will open a new window with the Automated Photo
Gallery page from the link on the php code examples. */
{
	var page = dir + "PhotoGallery.php";
	window.open(page, '_blank', 'toolbar=no, directories=no, location=no, status=yes, menubar=no, resizable=yes, scrollbars=auto, width=750, height=650, left=25, top=1'); 
	return false;
}

/**********************************************
*****            END OF SCRIPT            *****
***********************************************
*****     Copywrite 2006 Jamie Okland     *****
**********************************************/
