<!--

function dynmenu(e,submenus,submenuindex,submenuhref,f)
{

// ****************************************************************
// Dynamic, Javascript Generated Menu; ver. 1.5
// COPYRIGHT (C)2001 | WYKTOR ( wyktor@seznam.cz | www.wyktor.com )
// ****************************************************************
//
// You can adapt, use and distribute this code under GNU public licence, as long as:
// (1) You leave all the comment and credit lines in, including these ones
// (2) You don't sell it for profit (you can however, use it for your commercial projects)
// --
// If you make any improvements to this code, and you think it should 
// be implemented in next version, please contact me at wyktor@seznam.cz
// --
// Enjoy!
//
//
// onmouseover state for table background
onOver = '#CCCC00'
// onmouseout (Note: You can leave this empty (e.g. = '') and remove bgcolor from main Table to get only onMouseOver effect
onOut = 'white'
// this code will be written in front of inactive item of 2nd level
	a= "&nbsp;&nbsp;"
// variabe for Active state of menu 1st level if 2nd level isn't present
	b = "&#149;&nbsp;";
// variable for Active state of menu if 2nd level is present
	c = "&#149;&nbsp;";
// variable for 2nd level
	g = '&#149;&nbsp;';
// menu builder
 e -= 1;
 f -= 1;
onOver = " onmouseover=bgColor='" + onOver + "'"
onOut = " onmouseout=bgColor='" + onOut + "'"

for(var i = 0; i < menuitem.length; i++) 
	{
	if (i == e) // if menu is active following code will be written
		{
			if ( submenus == true) // if current active menu has submenus (2nd level) this will be written
			{
			document.write('<tr'+ onOver + onOut +' bgcolor=white><td valign=top><a class=SMenuA href=' + menuhref[i] + '>'+ c + menuitem[i] +'</a>' + '</td></tr>');
			for(var x = 0; x < submenuindex.length; x++) // 2nd level
				{document.write('<tr'+ onOver + onOut +' bgcolor=white><td valign=top><a class=SMenuB href=' + submenuhref[x] + '>&nbsp;'+ isactive(x) + submenuindex[x] +'</a>' + '</td></tr>');}
			}
			else // code for active menu (1st level) (if it doesn't have submenus)
			{
			document.write('<tr'+ onOver + onOut +' bgcolor=white><td valign=top><a class=SMenuA href=' + menuhref[i] + '>'+ b + menuitem[i] + '</a>' + '</td></tr>');
			}
		}
		
		else // code for inactive menus
		
		{
		document.write('<tr'+ onOver + onOut +' bgcolor=white><td valign=top><a class=SMenu href=' + menuhref[i] + '>'+ menuitem[i] +'</a>' + '</td></tr>');
		}
	}

// this function sets active state for 2nd level menu
function isactive(item)
{
	if (item == f)
		return g;
		else
		return a;}

}
//-->
