/**
 * This file holds the Menustructure and the needed Funktion to show them
 * 
 * LICENSE: For detailed license informations visist 
 * http://tippspiel4free.de/tippbuli/license.
 * 
 * NOTE: This Script use the other scripts there are
 * released under GNU/GPL. But this File is NOT released under GNU/GPL.
 *
 * @namespace        core::include::Menu
 * @version          $Id: class.menu.php 1009 2009-09-08 17:06:31Z tomtaz $
 * @author           Tomtaz
 * @LastChangedBy    $LastChangedBy: tomtaz $    
 * @date             2009-09-6 20:00 +0100
 * @LastChangedDate  $LastChangedDate: 2009-09-08 19:06:31 +0200 (Di, 08. Sep 2009) $
 * @Revision         $Revision: 1009 $
 * @copyright        (c) 2008-2009 by tippspiel4free.de All Rights reserved!
 * @license          „http://tippspiel4free.de/tippbuli/licence/ Tippspiel4free license“
 */
 
/**
 * @class pzHover
 * It add to all menu-entrys a additional classname
 *
 * @return  void
 *
 * @author  Tomtaz
 * @version
 * Version 1.0, 2009-05-07
 */
var self = null; 
pzHover = function()
{
	var pzEls = document.getElementById("top_menu").getElementsByTagName("li");
		
	for ( var i=0; i<pzEls.length; ++i )
	{
		pzEls[i].onmouseover = function()
		{
			clearTimeout(this.timer);
			
			if(this.className.indexOf("pzhover") == -1)
			{
				this.className+="pzhover";
			}
		}
	 
		pzEls[i].onmouseout=function()
		{
			this.className=this.className.replace(new RegExp("pzhover\\b"), "");
		}
	}
}

/**
 * Method to remove the additional added className
 *
 * @return  void
 *
 * @author  Tomtaz
 * @version
 * Version 1.0, 2009-05-07
 */
function pzHoverOut( obj )
{
	alert( obj );
	obj = document.getElementById( obj );
		
	clearTimeout(obj.timer);
	obj.className=obj.className.replace(new RegExp("pzhover\\b"), "");
}

/*
** Add window event for doing the job.
*/
if (Event.add) 
{
	Event.add(
		window,
		'load',
		pzHover
	);
}