// UDMv4.42 //
/***************************************************************\

  ULTIMATE DROP DOWN MENU Version 4.42 by Brothercake
  http://www.udm4.com/
  
  This script may not be used or distributed without license

\***************************************************************/



//*** DO NOT REMOVE //start or //stop OR SIMILAR COMMENTS


//*** AVOID CHANGING THE ORDER OF FUNCTIONS AND METHODS - IT WILL AFFECT PHP PARSER

//*** WATCH OUT FOR PARSE NOTES WHERE STRINGS MUST BE IN A CERTAIN PLACE
//*** EG: PHP PARSER LOOKS FOR "if(um.hz)" IN THE FOLLOWING LINE:

//*** um.xx TOKENS ARE ALSO FOR PHP PARSER - DO NOT MOVE, REMOVE OR MODIFY THEM

//*** DO NOT USE UNESCAPED DOUBLE QUOTES



//pstart

//report to api receivers
um.ap=function(umC,umE)
{
	//if there are any receivers
	um.rl=um.rv.length;
	if(um.rl>0)
	{
		//for each receiver
		um.i=0;
		do
		{
			//if stored trigger code is empty
			if(um.rv[um.i][1]=='')
			{
				//call the function with event code and event object
				um.rv[um.i][0](umE,umC);
			}
			
			//else if the event code matches the stored trigger code
			else if(umC==um.rv[um.i][1])
			{
				//call the function with event object
				um.rv[um.i][0](umE);
			}
			um.i++;
		}
		while(um.i<um.rl);
	}
};


//.. gecko, safari and generic
//need to exclude konqueror specifically
//because it returns a function for window.addEventListener
//but window.addEventListener('load' doesn't reliably work
//*** PHP PARSER LOOKS FOR "if(!um.k&&typeof window.addEventListener!=um.un)" IN THE FOLLOWING LINE:
if(!um.k&&typeof window.addEventListener!=um.un)
{
	//setup window listener to call initialising function
	window.addEventListener('load',umIni,0);
}
//.. opera 7 
//testing for opera 7 instead of support for document.addEventListener
//is for the same reason as before - because konqueror returns support but it doesn't reliably work
//only opera 7, of the modern browsers, doesn't support window.addEventListener('load'
//because for opera 7 the load event comes from document, which is probably more correct -  
//and indeed - most other modern browsers support the document load handler as well
//but early gecko builds don't, so we can't use it for everyone
//and our opera test is far more robust than any gecko test could ever be
else if(um.o7)
{
	//setup document listener to call initialising function
	um.m.addEventListener('load',umIni,0);
}
//.. win/ie
else if(um.wie)
{
	//setup window handler to call initialising function
	window.attachEvent('onload',umIni);

	//store names of event handlers and DOM expando properties
	um.ex=['onmouseover','onmouseout','onmousedown','onmouseup','onclick','onmousewheel','onfilterchange','onkeydown','onfocus','onactivate','onscroll','over','out'];
	um.gg=um.ex.length;

	//onunload garbage collector
	//which compensates for a DOM memory leak in win/ie
	window.attachEvent('onunload',function()
	{
		//for each item in the document.all collection
		um.da=document.all.length;
		i=0;
		do
		{
			um.t=document.all[i];
			//for each named property
			j=0;
			do
			{
				//set it to null so it can be garbage collected
				um.t[um.ex[j]]=null;
				j++;
			}
			while(j<um.gg);
			i++;
		}
		while(i<um.da);
	});


}
//.. mac/ie, osx/msn and konqueror 
else 
{
	//if there's an existing onload function
	if(typeof window.onload=='function')
	{
		//store it
		um.on=onload;
		//setup handler
		window.onload=function()
		{
			//call it
			um.on();
			//call initialising function
			umIni();
		};
	}
	else
	{
		//setup handler to call initialising function
		window.onload=umIni;
	}
}










//initialising function
function umIni()
{
	//don't do this if it's already happened
	//which it might have if you're using the image onload trick to initialise the menu
	//also don't do it if this is konqueror < 3.2
	if(typeof um.ini!=um.un||(um.k&&typeof window.sidebar==um.un)){return;}
	
	//set the flag that says this has happened
	//doing this instead of using um.ready
	//because second call could come before the first initialisation has finished
	um.ini=1;
	
	//tree has focus flag used in keyboard navigation
	um.ha=0;

	//global <ul> tree object, set to null for unsupported browsers
	umTree=(um.b)?um.gd('udm'):null;
	
	//if tree exists and browser is fully-supported
	if(umTree!=null&&um.d)
	{
		//report
		um.ap('000',umTree);

		//look for menu defintion arrays
		//*** PHP PARSER LOOKS FOR "for(i in um.menuCode)" IN THE FOLLOWING LINE:
		for(i in um.menuCode)
		{
			//find a main list item with the same ID as array index
			um.nh=um.gd(i);
			//if it exists
			if(um.nh!=null)
			{
				//for mac/ie5
				if(um.mie)
				{
					//write line-breaks into HTML
					//otherwise the nav structure will collapse
					um.menuCode[i]=um.menuCode[i].replace(/<\/(li|ul)>/ig,'</$1>\n');
				}

				//write HTML into node hook
				um.nh.innerHTML+=um.menuCode[i];
				
				//for mac/ie5
				if(um.mie)
				{
					//explicitly hide the menu
					//otherwise they show up by default
					um.dm=um.gm(um.nh);
					um.xn(um.dm);
					um.xh(um.dm);
				}
			}
		}
		//*** PHP PARSER LOOKS FOR "um.xx=8;" IN THE FOLLOWING LINE:
		um.xx=8;
		

		//bubble flag, used to flag events in their bubble phase in onclick menus
		//where we can't just stop bubbling without breaking the structure in other ways
		um.bub=0;
		
		//whether whitespace has been removed from the tree
		//this is only necessary for keyboard navigation
		//but it's a heavy onload process, so it's offset 
		//to happen the first time the navbar receives the focus
		//um.cleanWhitespace(umTree);
		um.wsr=0;
		
		
		//detect writing mode
		um.rtl=um.m.getElementsByTagName('html')[0].getAttribute('dir')=='rtl';


		//shiftkeydown flag, used to differentiate 
		//mouse-initiated focus events from keyboard-initiated ones
		//and thereby detect the use of spatial navigation in opera 7
		um.kdf=0;

		//if this is opera 7
		if(um.o7)
		{
			//trap shiftkeydown events to set the keydown flag
			um.m.addEventListener('keydown',function(e){if(e.keyCode==16){um.kdf=1;}},0);

			//trap shiftkeyup events to clear the keydown flag
			um.m.addEventListener('keyup',function(e){if(e.keyCode==16){um.kdf=0;}},0);
		}
		
		
		//double check keyboard module
		//in case um.keys array is there but module itself is missing
		um.skb=(um.skb&&typeof umKM=='function');
		um.kb=(um.skb&&um.kb);
		
		//if keyboard module is partially or fully supported
		if(um.skb)
		{
			//create keyboard module object
			um.kbm=new umKM;
			
			//report
			um.ap('001',um.kbm);
			
		}
		//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
		um.xx=3;



		//double check speech module
		//in case arrays are there but module itself is missing
		um.sp=(um.sp&&typeof udmSpeechModule=='function');
		
		//if speech module is in use
		if(um.sp)
		{
			//create speech module object
			um.sapi=new udmSpeechModule;
			
			//report
			um.ap('002',um.sapi);
		}
		//*** PHP PARSER LOOKS FOR "um.xx=4;" IN THE FOLLOWING LINE:
		um.xx=4;

		//create udm navbar object
		um.n=new umNav(umTree);

		//report
		um.ap('009',um.n);
	

		//if this is win/ie and position:fixed
		//and js equivalent is enabled
		if(um.fe)
		{
			//move it now
			um.tr.style.left=(um.getScrollAmount(1))+'px';
			um.tr.style.top=(um.getScrollAmount())+'px';
			//bind onscroll handler
			window.attachEvent('onscroll',function()
			{
				um.tr.style.left=(um.getScrollAmount(1))+'px';
				um.tr.style.top=(um.getScrollAmount())+'px';
			});
		}
		
		
		//if this is safari
		if(um.s)
		{
			//set KhtmlOpacity on the tree
			umTree.style.KhtmlOpacity='1';
		}
		//now detect safari 1.1 or later by trying to read it
		um.s1=(typeof umTree.style.KhtmlOpacity!=um.un);


		//ready state flag for popup alignment
		//and used elsewhere as a menu-is-ready test
		um.ready=1;


		//report
		um.ap('010',um.tr);
	
	}
};







//navbar object constructor
function umNav(umTree)
{
	//this
	um.n=this;

	//ul tree
	um.tr=umTree;
	
	//a colorname is used to detect when colors are off in win/ie
	//but we don't want it to affect other browsers
	if(um.wie){um.tr.style.color='black';}
	
	//nullified links are created by setting "javascript:void(0)" as the href
	//so save that string for applying and testing the value
	um.jv='javascript:void(0)';
	
	//if rigid overflow is in use
	//*** PHP PARSER LOOKS FOR "if(um.rg" IN THE FOLLOWING LINE:
	if(um.rg)
	{
		//start recording nav width
		um.rw=0;
	}
	//*** PHP PARSER LOOKS FOR "um.xx=2;" IN THE FOLLOWING LINE:
	um.xx=2;
	
	//get all list items
	um.li=umTree.getElementsByTagName('li');
	um.ll=um.li.length;
	
	//for each list item
	i=0;
	do
	{
		//cascade ad-hoc item classes if there are any
		//*** PHP PARSER LOOKS FOR "if(um.wl>0)" IN THE FOLLOWING LINE:
		if(um.wl>0)
		{
			//store object reference
			um.t=um.li[i];
		
			//store classname, converting null reference for kde's benefit
			um.t8=um.es(um.t.className);

			//if list item has no class name and parent isn't the root <ul>
			if(um.t8==''&&!um.ne(um.t))
			{
				//store object reference to parent <li>
				//*** There may be a problem here due to whitespace
				//*** Might need a "get parent ul" method, and use that where necessary
				um.t=um.gp(um.li[i].parentNode);

				//store classname, converting null reference for kde's benefit
				um.t8=um.es(um.t.className);
	
				//if parent <li> does have a classname and _its_ parent <ul> isn't the root <ul>
				if(um.t8!=''&&!um.ne(um.t))
				{
					//apply the same classname to original list item
					um.li[i].className=um.t8;
				}
			}
		}
		//*** PHP PARSER LOOKS FOR "um.xx=7;" IN THE FOLLOWING LINE:
		um.xx=7;
		
		//initialise
		this.it(um.li[i]);
		i++;
	}
	//querying the length property here because it changes
	while(i<um.li.length);
	
	
	//cascade ad-hoc menu classes if there are any
	//*** PHP PARSER LOOKS FOR "if(um.wl>0)" IN THE FOLLOWING LINE:
	if(um.vl>0)
	{
		//get collection of menus
		um.mo=um.gu(um.tr);
		um.en=um.mo.length;
		
		//if there are any
		if(um.en>0)
		{		
			i=0;
			do
			{
				//store classname, converting null reference for kde's benefit
				um.t8=um.es(um.mo[i].className);

				//if menu has no class name
				if(um.t8=='')
				{
					//store object reference to parent <ul>
					um.t=um.mo[i].parentNode.parentNode;

					//store classname, converting null reference for kde's benefit
					um.t8=um.es(um.t.className);

					//if parent <ul> does have a classname, and it isn't the root <ul>
					if(um.t8!=''&&um.t8!='udm')
					{
						//apply the same classname
						um.mo[i].className=um.t8;
					}
				}
				i++;
			}
			while(i<um.en);
		}
	}
	//*** PHP PARSER LOOKS FOR "um.xx=7;" IN THE FOLLOWING LINE:
	um.xx=7;
	
	
	//mousedown flag is used to prevent the clicking of a link
	//from opening a menu via keyboard module's onactivate/onfocus event
	//it uses mousedown so that it happens before a linkObj.onclick would fire
	um.mf=0;

	//link-down flag is used to differentiate onclick events generated by the mouse
	//from onclick events generated by the keyboard, or trigger events from onfocus
	um.lf=0;

	//identify supported method of adding encapsulated event listeners
	um.ety=typeof document.addEventListener!=um.un?'addEventListener':typeof document.attachEvent!=um.un?'attachEvent':'';

	//set event name prefix
	um.epx=um.ety=='attachEvent'?'on':'';

	//if encapsulated event listening is supported setup click to close handlers
	//which is everyone except mac/ie5
	if(um.ety!='')
	{
		//add document mousedown handler
		um.m[um.ety](um.epx+'mousedown',function(e)
		{
			//convert event argument
			if(!e){e=window.event;}
			
			//set mousedown flag
			um.mf=1;
			
			//if keyboard module is at all supported
			//*** PHP PARSER LOOKS FOR "if(um.skb" IN THE FOLLOWING LINE:
			if(um.skb)
			{
				//reset focus flag
				um.ha=0;
			}
			//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
			um.xx=3;
				
			//cancel any current open timer
			//so that if a link is clicked it doesn't open menu anyway
			//just due to length of time mouse is over the link
			clearInterval(um.oc);
			um.or=0;
			
			//if document click reset is not turned off
			if(um.reset[0]!='no')
			{
				//if select-element hiding is being used
				//*** PHP PARSER LOOKS FOR "if(um.hz)" IN THE FOLLOWING LINE:
				if(um.hz)
				{
					//if event came from outside the tree 
					if(!um.tr.contains(event.srcElement))
					{
						//show selects
						um.n.ts('visible');
					}
				}
				
				//close all menus
				//*** PHP PARSER LOOKS FOR "um.xx=0;" IN THE FOLLOWING LINE:
				um.xx=0;
					
				//close all menus
				um.cm(e);
			}
		},0);	
		
		//add document mouseup handler
		um.m[um.ety](um.epx+'mouseup',function()
		{
			//clear mousedown flag
			um.mf=0;
		},0);
	}
	
	
	//if keyboard module is fully supported
	//*** PHP PARSER LOOKS FOR "if(um.kb" IN THE FOLLOWING LINE:
	if(um.kb)
	{
		//bind document handlers
		um.kbm.bdh();
	}
	//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
	um.xx=3;
	
	//if keyboard module is partially supported and this is opera 7 or 8
	//*** PHP PARSER LOOKS FOR "if(um.skb" IN THE FOLLOWING LINE:
	if(um.skb&&um.o7)
	{
		//bind document handlers 
		um.kbm.bfh();
	}
	//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
	um.xx=3;

	
	//if rigid overflow is in use
	//*** PHP PARSER LOOKS FOR "if(um.rg" IN THE FOLLOWING LINE:
	if(um.rg)
	{
		//apply rigid width
		this.aw();
	}
	//*** PHP PARSER LOOKS FOR "um.xx=2;" IN THE FOLLOWING LINE:
	um.xx=2;

	//clock variables
	um.cc=null,um.cr=0,um.oc=null,um.or=0;


	//custom contains method not necessary for win/ie5, and errs in mac/ie5 anyway
	//not actually necessary for O7 either .. but I'm superstitious
	if(!um.ie)
	{
		//contains based on a method by by jkd (http://www.jasonkarldavis.com/)
		//see http://www.codingforums.com/showthread.php?t=16823 for details
		um.tr.contains=function(umN)
		{
			return (umN==null)?false:(umN==this)?true:this.contains(umN.parentNode);
		};
	}

	//remember the window dimensions
	um.lw=um.getWindowDimensions();
	
	//remember height of first navbar link
	um.lh=um.gc(um.tr).offsetHeight;
	
	//for old gecko with a continuation strip
	if(um.og&&um.hstrip[0]!='none')
	{
		//set <ul> height with margin bottom if necessary
		um.tr.style.height=(um.hstrip[1]=='yes')?(um.lh+um.e[17])+'px':um.lh+'px';
	}
	
	//look for and disable any udm-purecss stylesheet 
	//we have to do this because pure css triggers conflict with the open and close timers
	//but we can't put the purecss stylesheet inside a <noscript> section
	//because <noscript> in the <head> is not allowed
	um.pss=um.m.getElementById('udm-purecss');
	if(um.pss!=null){um.pss.disabled=1;}
	
	//start a timer for window and text size changes
	um.vs=setInterval('um.n.ws()',55);
	
};




//initialise list items
umNav.prototype.it=function(umI)
{
	
	//linkObj.onfocus doesn't work properly in win/ie (it doesn't bubble)
	//but linkObj.onactivate isn't available in win/ie5.0
	if(um.wie)
	{
		//so attach focus handler this way
		um.of=(um.wie55)?'onactivate':'onfocus';
		um.gc(umI).attachEvent(um.of,
			function()
			{
				//if keyboard module is in use 
				//and linkdown flag is not set, trigger menus
				//*** PHP PARSER LOOKS FOR "if(um.kb" IN THE FOLLOWING LINE:
				if(um.kb&&!um.lf)
				{
					//reset the bubble flag
					um.bub=0;
					
					//pass to over function
					//um.gp(um.gc(umI)).over(1,um.gc(umI));
					umI.over(1,um.gc(umI));
				}
				//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
				um.xx=3;
			}
		);
	}


	//store <li> classname, converting null reference for kde's benefit
	um.t3=um.es(umI.className);

	//use mouseover event by default
	//or onclick if <li> has a className of 'onclick'
	um.vh=(um.t3.indexOf('onclick')!=-1)?'onclick':'onmouseover';

	//is this a navbar or menu item
	um.ii=um.ne(umI);

	//get menu object//doing this undefined check avoids a strict warning in moz
	var umM=(typeof um.gu(umI)[0]!=um.un)?um.gu(umI)[0]:null;
	
	//if this is the first item to get here
	if(typeof um.fl==um.un)
	{
		//save a reference to its link
		//which we'll need later for the .cck method (check styles are enabled)
		//and can also reuse in the keyboard navigation mount navbar routine
		um.fl=um.gc(umI);
	}

	//insert arrow if trigger has a menu
	//but not for no arrows group
	//*** PHP PARSER LOOKS FOR "if(umM!=null&&!um.nr)" IN THE FOLLOWING LINE:
	if(umM!=null&&!um.nr)
	{
		//if arrows are in use and colors/styles are enabled
		if(((um.ii&&um.e[45]!='none')||(!um.ii&&um.e[89]!='none'))&&um.n.cck())
		{
			//top-level items
			if(um.ii)
			{
				//image address / arrow text
				um.ac=um.e[45];
				//alt text, or double-pipe token if indicator is not an image
				um.aa=(um.ni)?um.e[48]:'¦¦';
			}
			//or menu items
			else
			{
				//image address / arrow text
				um.ac=um.e[89];
				//alt text, or double-pipe token if indicator is not an image
				um.aa=(um.mi)?um.e[92]:'¦¦';
				
				//if there's an ad-hoc class which applies here
				if(typeof um.w[um.t3]!=um.un)
				{
					//ad-hoc image address / arrow text
					um.ac=um.w[um.t3][23];
					//ad-hoc alt text, or double-pipe token if indicator is not an image
					um.aa=(um.mi)?um.w[um.t3][25]:'¦¦';
				}
			}
			
			//if alt text is double-pipe token then this is a textual symbol
			if(um.aa=='¦¦')
			{
				//create arrow container
				um.at={'class':'udmA','text':um.ac};
				um.ar=um.ar=um.gc(umI).appendChild(um.createElement('span',um.at));
			}
			
			//otherwise it's an image
			else
			{
				//if this is win/ie
				if(um.wie)
				{
					//create an image using innerHTML, and then set the src
					//this technique avoids an image-loading bug 
					//http://support.microsoft.com/default.aspx?scid=KB;EN-US;269802
					//*** DON'T CHANGE THESE ESCAPED SINGLE-QUOTES INTO DOUBLE-QUOTES 
					//*** PHP PARSER NEEDS THEM LIKE THIS
					//um.gc(umI).innerHTML+='<img class=\'udmA\' alt=\''+um.aa+'\' title=\'\' />';
					um.gc(umI).insertAdjacentHTML('beforeEnd','<img class=\'udmA\' alt=\''+um.aa+'\' title=\'\' />');
					um.ar=um.gc(umI).lastChild;
					um.ar.src=um.baseSRC+um.ac;
				}
				//for safari and konqueror
				else if(um.s||um.k)
				{
					//create an image inside a <span>
					//it has to be like this or some weird space appears in h-nav items
					//we can't do it else{like this} for everyone 
					//because it fucks up relative h-nav in firefox
					um.at={'class':'udmA'};
					um.ar=um.gc(umI).appendChild(um.createElement('span',um.at));
					um.at={'src':um.baseSRC+um.ac,'alt':um.aa,'title':''};
					um.ar.appendChild(um.createElement('img',um.at));
				}
				//for other browsers
				else
				{
					//create an image in the optimal way
					um.at={'class':'udmA','alt':um.aa,'title':''};
					um.ar=um.gc(umI).appendChild(um.createElement('img',um.at));
					//except set the src manually instead of passing it in the attributes list
					//because the createElement function initially sets the value to ''
					//but that causes moz to make another request for the host page
					//see http://www.brothercake.com/Ref/empty-src/
					//and also https://bugzilla.mozilla.org/show_bug.cgi?id=263239
					um.ar.src=um.baseSRC+um.ac;
				}
			}
			
			
			//if this is onclick handler, return false onmousedown
			//this prevents it from following the link
			//but it still bubbles up, so it still works as an opener trigger
			if(um.vh=='onclick'){um.ar.onmousedown=function(){return false;}};
			
			//arrow mouseover
			um.ar.onmouseover=function(e)
			{
				//get collection of items
				//which are siblings of this arrow's parent link
				um.t=um.gp(this.parentNode).parentNode.childNodes;
				um.tl=um.t.length;
				
				//for each item
				i=0;
				do
				{
					//if this item is not a text node, and has a menu
					if(um.t[i].nodeName!='#text'&&um.gu(um.t[i]).length>0)
					{
						//and the menu is already visible
						if(um.gu(um.t[i])[0].style.visibility=='visible')
						{
							//stop event bubbling
							(!e)?event.cancelBubble=1:e.stopPropagation();
							//increase z-order of link in case mouse goes straight from menu to arrow
							//other rollover styles aren't affected by non bubbling as they have :hover
							this.parentNode.style.zIndex=um.e[6]+=2;
							//maybe superstitious, maybe makes a difference; can't remember :)
							return false;
							//break the loop
							break;
						}
						//this is so that moving mouse over arrow
						//on the way to a menu, doesn't close menu
						//but initially moving mouse directly over arrow
						//will open a menu after all
					}
					
					//otherwise reset open clock
					//because it's about to be re-started
					clearInterval(um.oc);
					um.or=0;
					
					i++;
				}
				while(i<um.tl);
					
				return true;
				
			};
			
			//arrow mouseout followed by item mouseover over a by-passing link
			//could open its menu straight away, which interferes with open timers
			um.ar.onmouseout=function()
			{
				//so reset open clock
				clearInterval(um.oc);
				um.or=0;
			};
			
			//even though this already has block display
			//O7[.2?] wants us to touch the style object
			//otherwise the class rules don't kick in..
			//it could be style.anything
			um.xd(um.ar);
			
			//for main items
			if(um.ii)
			{
				//apply arrow padding
				this.wp(um.ar,umI,um.e[26],um.e[18],1);
			}
			//we can't do this for menu items because they're non displayed
			//so that will happen when the menu is opened
		}
	}
	//*** PHP PARSER LOOKS FOR "um.xx=5;" IN THE FOLLOWING LINE:
	um.xx=5;
	
	
	
	//if this is mac/ie5
	if(um.mie)
	{
		//if link has a first-child <span> element
		um.spn=umI.getElementsByTagName('span')[0];
		if(typeof um.spn!=um.un)
		{
			//bind click handler to it
			um.spn.onclick=function()
			{
				//click parent link
				this.parentNode.click();
				//otherwise clicking the span won't activate the link
				//this is needed to make sure that IR nav works in mac/ie5
			};
		}
	}
	
	
	
	//if rigid overflow is in use and this is a navbar item
	//*** PHP PARSER LOOKS FOR "if(um.rg" IN THE FOLLOWING LINE:
	if(um.rg&&um.ne(umI))
	{
		//add to rigid width
		um.n.dw(umI);
	}
	//*** PHP PARSER LOOKS FOR "um.xx=2;" IN THE FOLLOWING LINE:
	um.xx=2;
	
	//mac/ie doesn't do rollovers if you mouseover the
	//containing box of non-links, rather than the text
	if(um.mie)
	{
		//store reference to link
		um.t=um.gc(umI);
		
		//if link is a non-link
		if(um.t.className&&/nohref/.test(um.t.className))
		{
			//add a void href to the link to make it work properly
			um.gc(umI).href=um.jv;
		}
	}


	//if keyboard module is partially or fully supported
	if(um.skb)
	{
		//bind focus handlers to menu triggers
		um.kbm.bth(umI);
	}
	//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
	um.xx=3;


	//add mousedown handler to set link-down flag
	//this is used to differentiate a mouse onclick event from a keyboard onclick event
	//the latter should follow the link, not trigger the menu
	//otherwise the links will be inaccessible to screenreaders
	//and the onclick blur() will also lose the focus in IE
	umI.onmousedown=function(e)
	{
		//set link-down flag
		um.lf=1;
		
		//document.title = 'lf=1' + ' --- ' + Math.random();
		
		//report
		um.ap('030',um.gc(this));
		
		//stop event bubbling
		(!e)?event.cancelBubble=1:e.stopPropagation();
	};
	
	//this is just for the API (needed it for Active Styles extension)
	umI.onmouseup=function(e)
	{
		//report
		um.ap('035',um.gc(this));
		
		//stop event bubbling
		(!e)?event.cancelBubble=1:e.stopPropagation();
	};
	
	//if onclick is not in use
	if(um.vh!='onclick')
	{
		//add click handler to close all menus if target link is active
		//this is so that the menus properly close if used to open pages in an iframe
		umI.onclick=function(e)
		{
			//if bubble flag is not set, pass link href to qualified menu closer
			if(!um.bub){um.qc(um.gc(this).href);}

			//we can't stop event bubbling or the links won't work in safari
			//because events can come from text nodes, so we need to allow them to bubble
			//because afaik there's no way to say "stop propagation for the parentNode of e.target"
			//but if we just allow the event to go through, the menu will re-open as soon as it's closed
			//so set the bubble flag, so we can detect the bubble phase in the open function
			um.bub=1;
		};
	}
	
	//else if onclick is in use
	//additional mouseover handler to bolster onclick
	else if(!um.mie)
	{
		//mouseover handler does link rollover
		//which is necessary for submenu onclick items in win/ie
		//and will also restore rollover persistence
		//it also resets the bubble flag
		umI.onmouseover=function(){um.n.lr(um.gc(umI),1);um.bub=0;};
	}
	

	//exclude mac/ie5 and msn from onclick 
	//for usability reasons, because they don't have indicator arrows
	//and because mac/ie5 doesn't have click to close
	//and because onclick from nohref items doesn't work in msn
	if(!(um.mie&&um.vh=='onclick'))
	{

		//bind mouseover/onclick handlers to menu triggers
		umI[um.vh]=function(e)
		{
			//convert event target
			//not doing a 'if(!e){e=event;}' conversion here
			//because in this case it breaks in mac/ie5 
			//i think it has issues with writing properties to the event object
			//anyway we need "e" to be unconverted, for testing again later on
			um.tv=(um.ie)?window.event.srcElement:e.target;

			//if event target is a text node for an onclick event
			//set target to parent node, which is necessary for safari
			//because events can come from text nodes
			if(um.tv.nodeName=='#text'&&e.type=='click'){um.tv=um.tv.parentNode;}
			
			//store parent list-item classname, converting null reference for kde's benefit
			um.t7=um.es(um.gp(um.tv).className);

			//see if link-down flag is set, and menus are enabled
			//and onclick is being used on this link
			um.uc=(um.lf&&!um.nm&&um.t7.indexOf('onclick')!=-1);
			
			//if that's the case
			if(um.uc)
			{
				//remember open timer setting 
				//and then temporarily set it to 1
				um.rt=um.e[10];um.e[10]=1;
			}
			
			//if this is a mouseover item we need to reset the bubble flag
			if(um.t7.indexOf('onclick')==-1){um.bub=0;}
			
			//if it's an onclick item BUT the linkdown flag is NOT set
			//then this is pressing enter to activate a link when keyboard navigating
			else if(!um.lf)
			{
				//so if bubble flag is not set, pass link href to qualified menu closer
				if(!um.bub){um.qc(um.tv.href);}

				//we can't stop event bubbling or the links won't work in safari
				//because events can come from text nodes, so we need to allow them to bubble
				//because afaik there's no way to say "stop propagation for the parentNode of e.target"
				//but if we just allow the event to go through, the menu will re-open as soon as it's closed
				//so set the bubble flag, so we can detect the bubble phase in the open function
				um.bub=1;
			}
			
			//pass target to function
			this.over(0,um.tv);
			
			//if this is an onclick
			if(um.uc)
			{
				//set open timer back to its real value
				um.e[10]=um.rt;
				
				//clear link-down flag
				um.lf=0;

				//if it's not a text node and it has a menu
				if(um.tv.nodeName!='#text'&&um.gu(um.gp(um.tv)).length>0)
				{
					//if we can blur this link
					if(typeof um.tv.blur!=um.un)
					{
						//blur it so that full reset happens 
						//from subsequent menu mouseout
						um.tv.blur();
					}
					
					//if this menu is already displayed
					if(um.gu(um.gp(um.tv))[0].style.display=='block')
					{
						//close all menus from item parent menu
						//this is so that switch menu has 
						//proper open/close implementation
						um.n.cd(this.parentNode);
					
						//stop event bubbling
						(!e)?event.cancelBubble=1:e.stopPropagation();
						
						//don't follow the link
						return false;
					}
					
					//stop event bubbling
					(!e)?event.cancelBubble=1:e.stopPropagation();
					
					//store parent list-item classname, converting null reference for kde's benefit
					um.t7=um.es(um.gp(um.tv).className);

					//don't follow the link 
					//unless list-item classname contains (true) flag
					return (um.t7.indexOf('(true)')!=-1);
				}
				
				//else it doesn't have a menu
				else
				{
					//pass link href to qualified menu closer
					um.qc(um.tv.href);

					//we can't stop event bubbling or the links won't work in safari
					//because events can come from text nodes, so we need to allow them to bubble
					//because afaik there's no way to say "stop propagation for the parentNode of e.target"
					//but if we just allow the event to go through, the menu will re-open as soon as it's closed
					//so set the bubble flag, so we can detect the bubble phase in the open function
					um.bub=1;
				}
				
			}
			
			//stop event bubbling
			//*** EXPERIMENTAL and PROBLEMATIC
			//(!e)?event.cancelBubble=1:e.stopPropagation();
			
			//convert event argument
			if(!e){e=window.event;}

			//if this is a click event, return true so that it works
			//if it's another event, return false so that status text works in IE
			//but return true for Opera 7 or MSN, else the status text doesn't work!
			//(and the links all have a default cursor..)
			return (e.type=='click'||um.o7||um.mx);
		};
	
		//bind mouseout handlers to menu triggers
		umI.onmouseout=function(e)
		{
			//pass event to mouseout function
			this.out(e);
		};

	}


	//"mouseover" function
	umI.over=function(umF,umT)
	{
		//if the bubble flag is set don't continue
		//or if this event is not showing as from the keyboard
		//but the focus and keydown flags are set don't continue
		//this is because spatial navigation in opera 7
		//generates both mouseover and focus events
		//we want to ignore the mouseover and handle the focus
		//otherwise the opener will be triggered twice
		//if(um.bub||(!umF&&(um.ha||um.kdf))){return false;}
		//using or means you can't mouse navigate a menu 
		//if it was opened with the keyboard
		if(um.bub||(!umF&&um.ha&&um.kdf)){return false;}
		
		//we need to prevent the menu toggles from working
		//when CSS is off but javascript is on
		//so check that CSS is enabled
		um.cf=um.n.cck();
		
		//and don't continue if it's not (return false below)
		
		//also, don't continue if the mousedown flag is set
		//this is to prevent the clicking of a link
		//from calling the onactivate/onfocus handler
		if(!um.cf||um.mf)
		{
			//reset the mousedown flag
			//so that the menus still work
			//if you click a link then don't follow it
			//which is unlikely .. but just in case
			um.mf=0;
			
			//if colors are deemed to be not enabled in IE
			if(!um.ec)
			{
				//if there's a child menu
				if(um.gm(this)!=null)
				{
					//physically remove the menu node
					//to prevent errors from trying to focus it (IE with Windows in High-Contrast mode)
					this.removeChild(um.gm(this));
				}
			}
			
			//don't continue
			return false;
		}
		

		//if this event is from the keyboard
		if(umF)
		{
			//if whitespace hasn't already been removed, do so and set the flag 
			if(!um.wsr){um.kbm.cws(umTree);um.wsr=1;}

			//if speech module is present
			if(um.sp)
			{
				//pass link to speech buffer
				um.sapi.speechBuffer(um.gc(umI));
				
				//stop event bubbling
				event.cancelBubble=1;
			}	
			//*** PHP PARSER LOOKS FOR "um.xx=4;" IN THE FOLLOWING LINE:
			um.xx=4;
	
			//set hasFocus flag to true so that
			//if the navbar acheives focus via tab or IE-accesskey
			//the hotkey still responds intuitively
			um.ha=1;
			
			//if alt key is pressed in Internet Explorer
			if(um.ie&&event.altKey)
			{
				//do iterative link rollouts from parent menu
				//this is to prevent multiple items being highlighted
				//when focussing nav links using accesskeys
				//it will also happen with hotkey mount
				//if the hotkey modifier is alt
				//but that's not inappropriate, so it's okay
				um.n.ck(um.gp(umT).parentNode);
				//this does mean that for anyone who tries to navigate
				//with the alt key continually pressed
				//the menus will respond a lot more slowly
				//because this will be happening every time
				//but that's very unlikely, and not disastrous if it happens
			}

			//report
			um.ap('040',umT);

		}
		//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
		um.xx=3;
		
		//if this event is not from the keyboard
		if(!umF)
		{
			//get node name (converted for O7 in XHTML mode)
			um.nn=um.vn(umT.nodeName).toLowerCase();
			
			//don't respond to events which come directly from <li> or <ul>
			//which means only respond to those that bubble up from <a> or deeper
			//this is so that <li> can have padding with respect to <a>
			//without open timer being called multiple times
			//it used to be an inverse condition - if node name is not 'a' or '#text'
			//but this allows events to bubble from other elements inside,
			//for example if <a> contains an <img> but no text
			if(/(li|ul)/.test(um.nn))
			{		
				return false;
			}
		
			//but if kbd module is in use
			if(um.skb)
			{
				
				//set timers back to their real values
				//this is here so that the timer is turned back on
				//if you mouseover a menu which was originally opened by keyboard
				//but don't do that if linkdown flag is set
				//because then this was an onclick event
				//and we want the timer to be zeroed
				if(!um.lf)
				{
					um.e[10]=um.mt[0];
					um.e[11]=um.mt[1];
				}
				
				//set next focus temporarily to this focus
				//so that mouseover reset from focussed item
				//always has an object to work with
				um.nf=um.gc(this);

				//if the hasFocus flag is true
				//then any currently opened menus must have been key opened
				if(um.ha)
				{
					//do iterative link rollouts on parent menu
					um.n.ck(umI.parentNode);
					
					//call close all menus from parent menu
					//to reset currently open menu
					um.n.cd(um.gp(umT).parentNode);
					
					//focus then blur selected link
					//to reset currently focussed link!
					um.nf.focus();
					um.nf.blur();
					
					//and set focus flag to false
					um.ha=0;
				}
			}
			//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
			um.xx=3;

			//report
			um.ap('020',umT);

		}
			
	
		//cancel close timer
		clearInterval(um.cc);
		um.cr=0;

		//do link rollover
		um.n.lr(um.gc(umI),1);

		//start new open primer
		um.n.pr(umM,umI,umF,umT);


		return umI;
	};



	//mouseout function
	umI.out=function(e)
	{
		//don't continue if this is opera 7, and the focus and keydown flags are both set
		//which filters out spatial navigation mouseout events 
		if(um.o7&&um.ha&&um.kdf){return;}
		
		//if you click down on a link then drag the mouse off the navbar
		//the rollover will remain in place due to the use of :active styles
		//but the arrows will reset, because they're tied to the navbar mouseout
		//this will also happen if you move your mouse straight off the menu 
		//having clicked a link and before the new page loads
		//so to avoid this visual discrepancy, blur the target link
		//but we can only safely do that for mouse users
		//we can't fuck with the focus for people using the keyboard
		//so only do this if the linkdown flag is set
		if(um.lf){um.gc(this).blur();}
		//when :active is used this only works reliably in IE 
		//when :active isn't used it works in moz and safari as well
		//so :active is fed as IE-only rules
		//and .. well it's unfortunate for opera, but not life-threatening - it's only a visual quirk
		//it doesn't seem to work in mac/ie5, but it doesn't have arrows anyway
		
		//clear link-down flag
		um.lf=0;

		//convert event argument
		if(!e){e=window.event;e.relatedTarget=e.toElement;}

		//if event came from outside current trigger branch
		if(!umI.contains(e.relatedTarget))
		{
			//if event came from outside the tree completely
			if(!um.tr.contains(e.relatedTarget))
			{
				//reset existing close timer
				//this is necessary to prevent menus from closing instantly
				//probably because the mouseout from the link starts a timer
				//and the mouseout from the tree starts another one
				//and so the end condition would happen straight away
				clearInterval(um.cc);
				um.cr=0;
			}			
			
			//start new close primer
			um.n.cp(umM,umI);

			//report
			um.ap('025',um.gc(this));
		}
	};




	//custom contains method not necessary for win/ie, and errs in mac/ie5 anyway
	//not actually necessary for O7 either .. but I'm superstitious
	if(!um.ie)
	{
		//contains based on a method by jkd (http://www.jasonkarldavis.com/)
		//see http://www.codingforums.com/showthread.php?t=16823 for details
		umI.contains=function(umN)
		{
			return (umN==null)?false:(umN==this)?true:this.contains(umN.parentNode);
		};
	}


	
	//report
	um.ap('008',umI);
	
};




//check that nav styles are enabled
umNav.prototype.cck=function()
{
	//retrieve the computedStyle display of the first link
	//this is mozilla and opera 7.2+
	if(typeof document.defaultView!=um.un&&typeof document.defaultView.getComputedStyle!=um.un)
	{
		um.sa=document.defaultView.getComputedStyle(um.fl,'').getPropertyValue('display');
	}
	//retrieve the currentStyle display of the first link
	//this is internet explorer
	else if(typeof um.fl.currentStyle!=um.un)
	{
		um.sa=um.fl.currentStyle.display;
	}
	
	
	//menus can be visible
	um.mv=1;
	
	//color test is used to determine if colors are enabled in win/ie
	//if it returns anything other than 'black' then colors are deemed to be not enabled
	//because even if default color is black, it will come back as a hex value
	//"#000000" rather than "black"
	um.ec=(!um.wie||um.tr.currentStyle.color=='black');
	
	//if display is not 'inline' then CSS is deemed to be enabled
	//this is also the fallback position if no property is defined (which is Safari and Opera < 7.2)
	//all providing that colors are deemed enababled 
	return ((um.sa!='inline'||typeof um.sa==um.un)&&um.ec);
	//the test is !='inline' rather than =='block'
	//because in OSX MSN the value comes back as "inline-block" - don't know why
};




//link rollover method
umNav.prototype.lr=function(umL,umV)
{
	//if item has a link
	//but don't do persistent rollovers for popup menus in osx/msn - it fucks up somehow
	if(umL!=null&&typeof umL.style!=um.un&&!(um.p&&um.mx))
	{
		//store classname, converting null reference for kde's benefit
		um.cl=um.es(umL.className);

		//find nav or menu arrow
		um.ii=um.ne(um.gp(umL));

		//rollovers
		if(umV)
		{
			//increase z-order to bring each highlighted link above the previous
			//this allows for simulated border-collapse using negative top margin
			umL.style.zIndex=um.e[6]+=2;
			
			//O7 requires that we check for existing class name before setting it
			//maybe it doesn't allow class=' something'
			//don't allow rollover class to be set multiple times
			//because it *might be* exacerbating an image loading bug in win/ie
			//http://support.microsoft.com/default.aspx?scid=KB;EN-US;269802
			(um.cl=='')?umL.className='udmR':umL.className+=(umL.className.indexOf('udmR')==-1)?' udmR':'';
		}
		
		//rollouts
		else
		{
			//change class name
			if(um.cl.indexOf('udmR')!=-1){umL.className=um.cl.replace(/([ ]?udmR)/g,'');}
			//the first test condition prevents a problem in win/ie5.0
			//where if you clicked on the page, this reset would cause
			//all the links in an h-nav without menus to become invisible
			//the second is to support you are here extension
		}
		
		//do arrow rollover
		//*** PHP PARSER LOOKS FOR "um.n.wv(umL,um.ii);" IN THE FOLLOWING LINE:
		um.n.wv(umL,um.ii);
		//*** PHP PARSER LOOKS FOR "um.xx=5;" IN THE FOLLOWING LINE:
		um.xx=5;
		
	}
};






//open primer
umNav.prototype.pr=function(umG,umJ,umK,umR)
{
	//if keyboard module is active and event came from the keyboard
	if(um.skb&&umK)
	{
		//close previously opened menu
		um.kbm.cu(umG,umJ,umR);
	}
	//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
	um.xx=3;

	//if menus are in use, and trigger has a menu which is not already visible
	//the visibility prevents this happening multiple times,
	if(!um.nm&&umG!=null&&umG.style.visibility!='visible')
	{
		//in win/ie
		if(um.wie)
		{
			//when using item margins
			if(um.e[61]>0)
			{
				//need to add margin top to first link which couldn't added in CSS
				//*** will this work for <li> - it's <li> in the stylesheet
				//*** so maybe that would be better for consistency 
				um.gc(umG).style.marginTop=um.e[61]+'px';
			}
			//else when using border-collapse
			else if(um.e[63]=='collapse')
			{
				//need to add margin top to first child which couldn't added in CSS
				umG.firstChild.style.marginTop=0+'px';
			}
		}

		//if keyboard module is present and event came from the keyboard
		//open menu now
		//***DO NOT CHANGE THIS TO TERNARY SYNTAX - PHP PARSER NEEDS IT LIKE THIS
		if(um.skb&&umK){um.n.ou(umG);}
		//*** PHP PARSER LOOKS FOR "um.xx=3;" IN THE FOLLOWING LINE:
		um.xx=3;
		
		//otherwise start a new open-timer
		if(!(um.skb&&umK)){um.n.tu(umG,null);}
		
	}
	
	//if item doesn't have a menu
	if(umG==null)
	{
		//start an open timer with null menu
		//so that currently open menu eventually gets closed
		um.n.tu(null,umJ);
	}
		
};











//open timer
umNav.prototype.tu=function(umG,umJ)
{
	//close timer is in mid-loop
	if(um.cr)
	{
		//cancel timer
		clearInterval(um.oc);
		//transfer values
		um.oj=umG;
		um.ij=umJ;
		um.or=1;
		//reset interval
		um.oc=setInterval('um.n.tu(um.oj,um.ij)',um.e[10]);
	}

	//or second timer loop
	else if(um.or)
	{
		//cancel timer
		clearInterval(um.oc);
		um.or=0;
		//open the menu
		this.ou(umG,umJ);
	}
	//or first loop
	else
	{
		//report
		um.ap('061',umG);

		//transfer values
		um.oj=umG;
		um.ij=umJ;
		um.or=1;
		//set interval
		um.oc=setInterval('um.n.tu(um.oj,um.ij)',um.e[10]);
	}
};







//actually open the menu
umNav.prototype.ou=function(umO,umP)
{
	//if there is no menu to be opened, route trigger's parent menu to close siblings
	//this is so that sibling menus eventually close if you mouseover an item with no menu
	if(umO==null)
	{
		this.cd(umP.parentNode);
		//then don't proceed any further
		return false;
	}
	
	//close sibling menus from parent <ul>
	this.cd(um.gp(umO).parentNode);
			
	
	//*** OFFLEFT
	//reset offleft positioning all the way down the branch
	//otherwise it's dog slow in internet explorer
	//so .. if we haven't already done this 
	if(typeof umO.m==um.un)
	{
		//get collection of child menus
		umO.m=um.gu(umO);
		umO.l=umO.m.length;
		
		//if there are any
		if(umO.l>0)
		{
			//for each one
			for(var i=0;i<umO.l;i++)
			{
				//hide and undisplay the menu
				um.xh(umO.m[i]);
				um.xn(umO.m[i]);
			}
		}
	}
	
	
	//*** OFFLEFT
	//if this is an expanding menu
	if(um.ep)
	{
		//set the menu position to relative
		umO.style.position='relative';
	}	
	
	
	//if select-element hiding is being used
	//*** PHP PARSER LOOKS FOR "if(um.hz)" IN THE FOLLOWING LINE:
	if(um.hz)
	{
		//hide selects
		this.ts('hidden');
	}
	//now pre-display this menu so we can read values from it
	//*** PHP PARSER LOOKS FOR "um.xx=0;" IN THE FOLLOWING LINE:
	um.xx=0;um.xd(umO);
	
	
	
	//compensate for arrow insertion
	//not for no arrows group or when menu arrows are not in use
	//*** PHP PARSER LOOKS FOR "if(!um.nr&&um.e[89]!='none')" IN THE FOLLOWING LINE:
	if(!um.nr&&um.e[89]!='none')
	{

		//store length of child nodes collection
		um.kl=umO.childNodes.length;
	
		//for each child node
		i=0;
		do
		{
			//store reference to node
			um.tn=umO.childNodes.item(i);
			
			//get node name (converted for O7 in XHTML mode)
			um.nn=um.vn(um.tn.nodeName).toLowerCase();
			
			//if this is a list item
			if(um.nn=='li')
			{
				//get arrow object
				um.ar=um.n.ga(um.gc(um.tn));
				
				//if arrow exists
				if(um.ar!=null)
				{
					//apply arrow padding
					this.wp(um.ar,um.tn,um.e[70],um.e[62],0);
				}
			}
			i++;
		}
		while(i<um.kl);
	}
	//*** PHP PARSER LOOKS FOR "um.xx=5;" IN THE FOLLOWING LINE:
	um.xx=5;
	
	
	
	
	//report
	um.ap('058',umO);

	
	//position menu
	this.pu(umO);
	
	//reposition menu to stay inside the viewport
	//*** PHP PARSER LOOKS FOR "if(um.e[12]=='yes')" IN THE FOLLOWING LINE:
	if(um.e[12]=='yes')
	{
		this.ru(umO);
	}
	

	//get menu position
	//for no readily explicable reason
	//this prevents flickering in moz when
	//shadow function is not present
	//*** PHP PARSER LOOKS FOR "um.mp={x:" IN THE FOLLOWING LINE:
	um.mp={x:(umO.offsetLeft),y:(umO.offsetTop)};

	//add dropshadow layer
	um.sh=null;
	//*** PHP PARSER LOOKS FOR "if(!um.ns&&um.e[58]!='none')" IN THE FOLLOWING LINE:
	if(!um.ns&&um.e[58]!='none')
	{
		this.hl(umO);
	}
	//*** PHP PARSER LOOKS FOR "um.xx=1;" IN THE FOLLOWING LINE:
	um.xx=1;
	
	//create iframe layer to cover windowed objects for win/ie5.5+
	//if that functionality is in use
	//*** PHP PARSER LOOKS FOR "if(um.wie55&&(um.e[13]=='default'||um.e[13]=='iframe'))" IN THE FOLLOWING LINE:
	if(um.wie55&&(um.e[13]=='default'||um.e[13]=='iframe'))
	{
		this.il(umO);
	}


	//look for filter
	//the typeof discriminator is to prevent errors 
	//in IE when activeX associations are disabled
	//due to security settings and particular versions of DirectX
	//should also catch the pre-filter IE5.5 builds as well
	//*** PHP PARSER LOOKS FOR "um.hf=(um.wie55&&typeof" IN THE FOLLOWING LINE:
	um.hf=(um.wie55&&typeof umO.filters!='unknown'&&umO.filters&&umO.filters.length>0);

	
	//if there's a filter
	if(um.hf)
	{
		//apply filter
		umO.filters[0].Apply();
	}
	
	
	//for win/ie with an h-nav, increase z-order of parent list-item
	//this ensures that menus can go above the navbar 
	//because dynamic z-index of <a> doesn't work
	//when <li> is also relatively positioned
	if(um.wie&&um.h)
	{
		um.t=umO.parentNode;
		//toggling the positioning value between the zindex change
		//stops the cells from wobbling when it happens
		//don't know why though .. why it happens, or why this crap helps
		if(um.ne(um.t))
		{
			um.t=um.t.style;
			um.t.position='absolute';
			um.t.zIndex=um.e[6]+=2;
			um.t.position='relative';
		}
	}
	
	
	//show menu
	um.xv(umO);
	
	//get parent link for re-enforcing its cursor style
	um.pk=um.gc(umO.parentNode);
	
	//if there's a filter
	if(um.hf)
	{
		//report
		um.ap('065',umO);

		//play filter
		umO.filters[0].Play();
		
		//if there's a shadow
		if(um.sh!=null)
		{
			//when filter has finished
			umO.onfilterchange=function()
			{
				//show shadow
				um.xd(um.sh);

				//we now have to re-enforce the cursor style
				//otherwise it turns back into a default cursor..
				//um.n.ric(um.pk);
				
				//report
				um.ap('066',umO);
			};
		}
		//*** PHP PARSER LOOKS FOR "um.xx=1;" IN THE FOLLOWING LINE:
		um.xx=1;
	}
	
	//else if there's a shadow
	else if(um.sh!=null)
	{
		//show shadow
		um.xd(um.sh);
	}
	//*** PHP PARSER LOOKS FOR "um.xx=1;" IN THE FOLLOWING LINE:
	um.xx=1;
	
	
	//if this is win/ie5.0
	if(um.wie50)
	{
		//flicker menu display
		//which prevents rendering bugs
		//that made items invisible on first showing
		um.xn(umO);
		um.xd(umO);
	}
	
	
	//report
	um.ap('060',umO);

	return umO;
};







//close descendent menus
umNav.prototype.cd=function(umD)
{
	//check for sibling menus
	//** this probably won't work for created elements in O7.3 in XHTML mode
	//we're using a custom method for mac/ie5
	//because it doesn't always return enough members for getElementsByTagName
	um.sm=(um.mie&&!um.mx)?um.gt(umD,'ul'):um.gu(umD);
	um.sml=um.sm.length;
	i=-1;
	while(++i<um.sml)
	{
		//and close them
		this.clm(um.sm[i]);
	}
};








//do iterative link rollouts
umNav.prototype.ck=function(umD)
{
	//look for links
	//** this probably won't work for created elements in O7.3 in XHTML mode
	//we're using a custom method for mac/ie5
	//because it doesn't always return enough members for getElementsByTagName
	um.lk=(um.mie&&!um.mx)?um.gt(umD,'a'):umD.getElementsByTagName('a');
	um.lkl=um.lk.length;
	i=-1;
	while(++i<um.lkl)
	{
		//do link rollout
		this.lr(um.lk[i],0);
	}
};





//call link rollouts and menu closing timer
umNav.prototype.cp=function(umG,umA)
{
	//cancel open timer
	clearTimeout(um.oc);
	um.or=0;

	//do link rollout
	this.lr(um.gc(umA),0);
	
	//if menus are in use and this trigger has one
	if(!um.nm&&umG!=null)
	{
		//pass menu to close timer
		this.cot(umG);
	}
};





//menu closing timer
umNav.prototype.cot=function(umQ)
{
	//second loop
	if(um.cr)
	{
		//cancel timer
		clearInterval(um.cc);
		um.cr=0;
	
		//close the menu
		this.clm(umQ);
	
	}
	
	//first loop
	else if(um.e[11]!='never')
	{
		//report
		um.ap('071',umQ);

		//transfer values
		um.cb=umQ;
		um.cr=1;
		//set interval
		um.cc=setInterval('um.n.cot(um.cb)',um.e[11]);
	}
};






//actually close the menu
umNav.prototype.clm=function(umH)
{
	//if menu is visible 
	if(umH.style.visibility=='visible')
	{
		//if sliding menus extension is not in use or not supported
		//or the has focus flag is set, ie event was from the keyboard
		if(typeof um.sim==um.un||!um.sim||um.ha)
		{
			//hide menu
			um.xh(umH);
			um.xn(umH);
			
			//if select-element hiding is being used
			//*** PHP PARSER LOOKS FOR "if(um.hz)" IN THE FOLLOWING LINE:
			if(um.hz)
			{
				//if this is a main navbar link
				if(um.ne(umH.parentNode))
				{
					//show selects
					this.ts('visible');
				}
			}
			
			//temporary properties - classnames of cover / shadow layers
			//*** PHP PARSER LOOKS FOR "um.t=['udmC','udmS'];" IN THE FOLLOWING LINE:
			um.t=['udmC','udmS'];
			
			i=0;
			do
			{
				//check for cover layers in win/ie5.5+ on first loop
				//or shadow layers on second loop
				if(um.wie55||i>0)
				{
					//store node reference
					um.t2=umH.parentNode.lastChild;

					//if there's a node with a classname there - ie, one we added
					if(um.t2.className)
					{
						//and it has the right class name
						if(um.t2.className.indexOf(um.t[i])!=-1)
						{
							//remove the node
							umH.parentNode.removeChild(um.t2);
						}
					}
				}
				i++;
			}
			while(i<2);
		}
			
		//report
		um.ap('070',umH);

	}
};










//get arrow object
umNav.prototype.ga=function(umL)
{	
	//set arrow object to null
	um.ta=null;
	
	//array of elements to look for
	//this must be span first, then img
	//because if it's other way round
	//it doesn't work reliably in konqueror
	um.t=['span','img'];
	var k=0;
	do
	{
		//get elements inside link
		um.lss=umL.getElementsByTagName(um.t[k]);
		um.lsl=um.lss.length;
		
		//iterate through collection
		j=-1;
		while(++j<um.lsl)
		{
			//store classname, converting null reference for kde's benefit
			//even though it's safe to compare (null == 'string') .. I'm superstitious when it comes to browsers
			um.t8=um.es(um.lss[j].className);

			//if this is an arrow indicator
			if(um.t8=='udmA')
			{
				//set arrow object
				um.ta=um.lss[j];
				break;
			}
		}
	}
	while(++k<2);
	
	//return arrow object
	return um.ta;
};



//apply arrow padding       //arrow object, item object, padding property, border property, isNavArrow
umNav.prototype.wp=function(umY,umS,umZ,umB,umW)
{
	//copy all function arguments because we need to pass them globally
	umY.fn=arguments;

	//if arrow height is greater than 0 then the image has loaded (if it is an image)
	//if it's not an image it will still be greater than zero, so that's fine
	//but don't do it straight away for opera whatever it says
	//becausesometimes the initial dimensions are wrong in opera
	//which results in over-clipping that makes the arrow invisible
	//not too sure why, but the initial delay seems to avoid it
	if(umY.offsetHeight>0&&!um.o7)
	{
		//so call positioning function
		this.wpo(umY.fn[0],umY.fn[1],umY.fn[2],umY.fn[3],umY.fn[4]);
	}
	//if it's zero then it's an unloaded image
	//or if it's opera we'll treat it as though it were
	//so initiate a timer to check the image dimensions
	//with a timeout counter in case the image doesn't resolve
	//we're not doing this straight off the bat because
	else
	{
		umY.c=0;
		umY.ti=window.setInterval(function()
		{
			//if arrow height is greater than 0 then the image has loaded (if it is an image)
			//if it's not an image it will still be greater than zero, so that's fine
			if(umY.offsetHeight>0)
			{
				//cancel the timer
				clearInterval(umY.ti);

				//call positioning function
				um.n.wpo(umY.fn[0],umY.fn[1],umY.fn[2],umY.fn[3],umY.fn[4]);
			}
			//otherwise arrow is an unloaded image
			else
			{
				//increase the counter
				umY.c++;

				//if the counter reaches 100 [5.5 seconds]
				//timeout the request by cancelling the timer
				if(umY.c>=100){clearInterval(umY.ti);}
			}
		},55);
	}
	
	return true;
};



//apply arrow position       //arrow object, item object, padding property, border property, isNavArrow
umNav.prototype.wpo=function(umY,umS,umZ,umB,umW)
{

	//get link object
	um.t2=um.gc(umS);
	
	//get dimensions of arrow
	um.t4=[umY.offsetWidth,umY.offsetHeight];
	
	//apply top margin to arrow to v-position it
	//middle point is (link height minus arrow height)/2 minus border size
	umY.style.marginTop=um.pi(((um.t2.offsetHeight-um.t4[1])/2)-umB)+'px';
	
	//extra padding for link to compensate for arrow insertion
	//which is the width of the arrow itself, plus the left/right padding again
	um.t2.style[(um.a||um.rtl)?'paddingLeft':'paddingRight']=((umZ*2)+um.t4[0])+'px';

	//if this is win/ie with RTL text
	if(um.wie&&um.rtl)
	{
		//set inverse arrow margin 
		umY.style.marginRight=((umW)?(0-um.e[26]):(0-um.e[70]))+'px';
		//bidi-override trick doesn't apply here
		//because the arrow is inside an <a> - and that still has RTL writing mode
	}

	//win/ie5.0 with right-alignment 
	//or win/ie5.5+ with RTL 
	//h-nav navbar arrows need a different tweak
	if(((um.wie50&&um.a)||(um.wie55&&um.rtl))&&umW&&um.h)
	{
		//shift arrow in by item border
		umY.style.top=(umB)+'px';
		umY.style.left=(umB)+'px';
	}



	//if this is an image arrow
	if((umW&&um.ni)||(!umW&&um.mi))
	{
		//apply arrow clip to recreate previous clipping abilities of background image
		//direction and inversion of clip value depends on main alignment
		um.ak=((umW)?um.e[47]:um.e[91]);
		//if difference is negative then set difference to width, hence apply no clip
		if((um.t4[0]-um.ak)<0){um.ak=um.t4[0];}
		//have to use offset dimensions instead of "auto" to make it work in safari
		umY.style.clip=(um.a||um.rtl)?'rect(0,'+um.ak+'px,'+um.t4[1]+'px,0)':'rect(0,'+um.t4[0]+'px,'+um.t4[1]+'px,'+(um.t4[0]-um.ak)+'px)';
	}
	
	//make the arrow visible
	um.xv(umY);
	
	return true;
};





//arrow rollovers         //link object, isNavArrow
umNav.prototype.wv=function(umX,umW)
{
	//not for no arrows group
	if(um.nr){return false;}
	
	//get arrow object
	um.ta=this.ga(umX);
	
	//if there is an arrow
	if(um.ta!=null)
	{	
		//store link classname, converting null reference for kde's benefit
		um.t8=um.es(umX.className);

		//is this a rollover 
		um.io=(um.t8.indexOf('udmR')==-1);
		
		//override for you are here class
		if(um.t8.indexOf('udmY')!=-1){um.io=0;}

		//store parent list-item classname, converting null reference for kde's benefit
		um.t7=um.es(um.gp(umX).className);

		//get rollover or rollout arrow image value //ad-hoc if a class applies else default
		//and change arrow image src with it
		//image object is um.ta.firstChild for safari or konqoerir, 
		//or um.ta for others, because safari has a span around the img
		um.tm=(um.s||um.k)?um.ta.firstChild:um.ta;
		um.tm.src=um.baseSRC+((umW)?(um.io)?um.e[45]:um.e[46]:(typeof um.w[um.t7]!=um.un)?(um.io)?um.w[um.t7][23]:um.w[um.t7][24]:(um.io)?um.e[89]:um.e[90]);
	}

	return um.ta;
};







//position menu
umNav.prototype.pu=function(umU)
{
	//*** OFFLEFT
	//reset offleft positioning properties
	umU.style.height='auto';
	umU.style.overflow='visible';
	
	//is this a sub or child menu
	um.is=(um.ne(umU.parentNode));
	
	//get some properties
	um.t=umU.parentNode;
	um.pp={
		tw:um.t.offsetWidth,
		th:um.t.offsetHeight,
		mw:umU.offsetWidth,
		//this is width of parent link for submenu
		//or width of parent menu for child menu
		pw:(um.is)?um.gc(um.t).offsetWidth:um.t.parentNode.offsetWidth
		};
	
	//position values
	um.x=(um.p)?2000:0;
	um.y=(um.p)?2000:0;

	//menus other than h-nav or v.a. submenu
	if(!((um.h||um.p)&&um.is))
	{
		//left position
		um.x=(um.is)?(um.a?(0-um.pp.mw):um.pp.pw):((um.a?(0-um.pp.mw):um.pp.pw)-um.e[51]-um.e[55]);
		//top position
		um.y=(0-um.pp.th);
	}
	
	//right aligned h-nav submenu
	else if(um.h&&um.is&&um.a)
	{
		//left position
		um.x=(0-um.pp.mw+um.pp.tw);
	}

	//regular inverted-right or left menu offset
	um.x+=(um.is)?(um.a?(0-um.e[14]):um.e[14]):(um.a?(0-um.e[49]):um.e[49]);
	
	//top menu offset
	um.y+=(um.is)?(um.e[2]=='bottom')?(0-um.e[15]):um.e[15]:um.e[50];
	
	
	//with a submenu
	if(um.is)
	{
		//with an an h-nav submenu
		if(um.h)
		{
			//adjust for bottom positioning
			if(um.e[2]=='bottom')
			{
				um.y-=(umU.offsetHeight+um.pp.th);
			}
			
			//tweaks for safari  
			if(um.s)
			{
				//if border-collapse is in use
				//and nav is left aligned
				if(um.nc&&!um.a)
				{
					//decrease x by nav border size
					um.x-=um.e[18];
				}
				
				//irrational tweaks for 1.0 relpos
				if(!um.s1&&um.rp)
				{
					//increase position by nav real position
					um.x+=um.getRealPosition(um.tr,'x');
					um.y+=um.getRealPosition(um.tr,'y');
				}
			}
			
			
			//tweaks for mac/ie5
			if(um.mie)
			{
				//decrease by width of previous sibling link
				um.x-=um.gc(um.t).offsetWidth;
				
				//if border-collapse is in use
				//and nav is right aligned
				//but not for osx/msn
				if(um.nc&&um.a&&!um.mx)
				{
					//incease x by nav border size
					um.x+=um.e[18];
				}
				
				//increase by height of parent item
				um.y+=um.pp.th;
			}


			//in internet explorer but not osx/msn when using margin echo 
			if(um.ie&&!um.mx&&um.hstrip[1]=='yes')
			{
				//decrease y position by margin
				um.y-=um.e[17];
			}

		}
		
		//with a v-nav submenu
		//for any version of IE 
		//when border collapse is in use
		else if(um.ie&&um.nc)
		{
			//decrease top position by border size
			um.y-=um.e[18];
		}
	}
	
	//set positions // use margin-right for win/ie with RTL text
	//umU.style[(um.wie&&um.rtl)?'marginRight':'marginLeft']=um.x+'px';
	//umU.style.marginTop=um.y+'px';

	//set positions
	umU.style.marginLeft=um.x+'px';
	umU.style.marginTop=um.y+'px';
	
	//*** OFFLEFT
	//if this is not popup menus, or it is but it's a child-menu
	//bring it onto the screen to reset offleft positioning
	if(!um.p||!um.is){umU.style.left='auto';umU.style.top='auto';}

	//for win/ie5.0, toggle display off and on again
	//otherwise when using repom, if a menu hasn't previously been displayed,
	//its returned co-ordinates are actually those of its parent!
	//or something .. I think that's what's going on,
	//but I don't definitely know .. or care..
	//this sorts it .. and I've long since stopped wondering..
	if(um.wie50)
	{
		um.xn(umU);
		um.xd(umU);
	}
};







//re-position menus
umNav.prototype.ru=function(umU,umS)
{
	//store menu classname, converting null reference for kde's benefit
	um.t8=um.es(umU.className);

	//do nothing if this menu has a 'nomove' class name
	if(/nomove/.test(um.t8)){return false;}
	
	//get window dimensions
	um.wz=um.getWindowDimensions();
	
	//get menu properties
	um.mp={
		x:um.getRealPosition(umU,'x'),
		y:um.getRealPosition(umU,'y'),
		w:umU.offsetWidth,			
		h:umU.offsetHeight,
		pw:umU.parentNode.parentNode.offsetWidth,
		m:32,						
		nx:-1,					
		ny:-1,
		sc:um.getScrollAmount(),
		scx:um.getScrollAmount(1)
		};
		
	//if this is win/ie5.0 with RTL text
	if(um.wie50&&um.rtl)
	{
		//subtract document width from returned menu x position
		//I don't why this is necessary
		um.mp.x-=um.m.body.clientWidth;
	}
		
	//if scrolling menus is in use
	if(typeof um.scr!=um.un)
	{
		//get clipped menu height
		um.mp.h=scr.gmh(umU);
	}

	//is this a sub or child menu
	um.is=(um.ne(umU.parentNode));

	//for safari
	if(um.s)
	{
		//position is wrong by the body margins
		//which we can work out from the <body> offset position
		um.mp.x-=um.m.body.offsetLeft;
		um.mp.y-=um.m.body.offsetTop;
	}
	//for mac/ie5
	else if(um.mie)
	{
		//position is wrong by (menu padding + border size)
		um.t=um.e[55]+um.e[51];
		um.mp.x-=um.t;
		um.mp.y-=um.t;
		//it's also wrong by an inverse of the body margins
		//but there's nothing we can do about that - no way to find out what they are
		//we can't read document.body.offsetLeft in mac/ie5
		//because body is the whole canvas
		//and document.body.leftMargin
		//only retrieves the oldskool body attribute
	}
	//for others
	else
	{
		//position goes progressively wrong by menu border size
		//so this iteratively adds the border size back in
		um.t=umU;
		while(!um.ne(um.t.parentNode))
		{
			um.mp.x+=um.e[51];
			um.mp.y+=um.e[51];
			um.t=um.t.parentNode.parentNode;
		}
	}
	
	//adjust for position fixed submenu
	if(!um.ie&&um.e[3]=='fixed'&&um.is)
	{
		um.mp.x+=um.mp.scx;
		um.mp.y+=um.mp.sc;
	}
	
	//if (left position+menu width) exceeds (window width minus safety margin plus x-scroll amount)
	um.t=[(um.mp.x+um.mp.w),(um.wz.x-um.mp.m+um.mp.scx)];
	if(um.t[0]>um.t[1])
	{
		//submenu
		if(um.is)
		{
			//new left position //calculate differently for popup alignment
			um.mp.nx=(((um.p)?um.mp.x:0)-(um.t[0]-um.t[1]));
		}
		//child menu
		else
		{
			//new left position //calculate differently for popup alignment
			um.mp.nx=(((um.p)?(0-um.mp.w-um.mp.pw+um.e[55]-um.e[49]):(0-um.mp.w-um.e[55]-um.e[51]))-um.e[49]);
		}
	}
	
	//if (left position) is less than (0)
	//** how can this be tested with popup alignment?
	if(um.mp.x<0)
	{
		//new childmenu left position
		if(!um.is)
		{
			um.mp.nx=(0-um.e[55]-um.e[51]+um.mp.pw+um.e[49]);
		}
		//there's no need to set a new position for submenus
		//because the (if x is still < 0) test later on will catch that
	}

	//if (top position+menu height) exceeds (window height minus safety margin plus y-scroll amount)
	um.yd=(um.mp.y+um.mp.h)-(um.wz.y-um.mp.m+um.mp.sc);
	//adjust for position fixed child menu
	if(um.f&&!um.is)
	{
			um.yd+=um.mp.sc;
	}
	if(um.yd>0)
	{
		//new top position
		//** do safari and mac/ie need different adjustments here?
		um.t=umU.parentNode;
		um.y=um.getRealPosition(um.t,'y');
		while(!um.ne(um.t))
		{
			um.y+=um.e[51];
			um.t=um.t.parentNode.parentNode;
		}
		um.mp.ny=(0-um.y-(um.mp.m*2)+um.wz.y+um.mp.sc-um.mp.h);
		//adjust for position fixed
		if(um.f)
		{
			um.mp.ny-=um.mp.sc;
		}
	}

	//if (top position) is less than (0)
	if(um.mp.y<0)
	{
		//new top position
		um.mp.ny=(0-(0-um.mp.y));
	}


	//if the left position needs to change
	if(um.mp.nx!=-1)
	{
		//shift the menu for popup alignment
		if(um.p)
		{
			umU.style.left=um.mp.nx+'px';
		}
		//shift the menu normally
		else
		{
			umU.style.marginLeft=um.mp.nx+'px';
		}
		//report
		um.ap('110',umU);
	}
	
	//if the top position needs to change
	if(um.mp.ny!=-1)
	{
		
		//compensate for 2000px margin on v.a. submenu
		if(um.p&&um.ne(umU.parentNode))
		{
			//shift the menu
			umU.style.marginTop=(2000-um.yd)+'px';
		}
		else
		{
			//shift the menu
			umU.style.marginTop=um.mp.ny+'px';
		}
		//report
		um.ap('120',umU);
	}
	
	
	//if (new top position minus scroll amount) is still less than 0
	//shift it back down to 0
	um.t=umU;
	//get the position in a convoluted way for win/ie5 when not using popup menus
	//because getRealPosition returns completely the wrong position
	//don't know why ... but otherwise the top position is wrong when the window is too small for the menu
	um.y=(um.wie50&&!um.p)?((um.pi(umU.style.marginTop)+umU.parentNode.offsetHeight+um.getRealPosition(umU.parentNode,'y'))-um.mp.sc):(um.getRealPosition(um.t,'y')-um.mp.sc);
	while(!um.ne(um.t.parentNode))
	{
		um.y+=um.e[51];
		um.t=um.t.parentNode.parentNode;
	}
	//adjust for position fixed
	if(um.f)
	{
		um.y+=um.mp.sc;
	}
	//do it
	if(um.y<0)
	{
		//shift the menu
		um.mp.ny=um.pi(umU.style.marginTop);
		if(isNaN(um.mp.ny)){um.mp.ny=0;}//returned value might be NaN
		umU.style.marginTop=(um.mp.ny-um.y)+'px';
	}
	
	//if (new left position minus scroll amount) is still less than 0
	//shift it back across to 0
	um.t=umU;
	um.x=um.getRealPosition(um.t,'x')-um.mp.scx;
	while(!um.ne(um.t.parentNode))
	{
		um.x+=um.e[51];
		um.t=um.t.parentNode.parentNode;
	}
	//do it
	if(um.x<0)
	{
		//shift the menu, accounting for 2000px margin on v.a. submenu
		//and including the discrepancy itself if the x-scroll is greater than 0
		umU.style.marginLeft=(um.p&&um.ne(umU.parentNode))?'2000px':(um.mp.scx>0?0-um.x:0)+'px';
		umU.style.left='0';
	}

	return true;
};








//add dropdshadow to menu
umNav.prototype.hl=function(umH)
{
	//create dropdshadow layer
	um.at={'class':'udmS'};
	
	//append shadow layer to parent <li>
	um.sh=umH.parentNode.appendChild(um.createElement('span',um.at));
	
	//store menu classname, converting null reference for kde's benefit
	um.cn=um.es(umH.className);

	//if menu has a class name
	if(um.cn!='')
	{
		//check for an ad-hoc menu class which applies
		if(typeof um.v[um.cn]!=um.un)
		{
			//add classname to shadow if necessary
			if(um.sh.className.indexOf(um.cn)==-1)
			{
				um.sh.className+=' '+um.cn;
			}
			
		}
	}

	//set dimensions to menu offset dimensions
	um.sh.style.width=umH.offsetWidth+'px';
	
	//get menu height for shadow height
	um.hh=umH.offsetHeight;

	//if scrolling menus is in use 
	if(typeof um.scr!=um.un)
	{
		//get clipped menu height
		um.hh=scr.gmh(umH);
	}

	//size dropshadow
	um.sh.style.height=um.hh+'px';

	//get menu position
	um.mp={
		x:(umH.offsetLeft),
		y:(umH.offsetTop)
		};
		
	//is this a sub or child menu
	um.is=um.ne(um.sh.parentNode);

	//irrational tweaks for safari 1.0 child menus
	if(um.s&&!um.s1&&!um.is)
	{
		//adjust x and y by menu border
		um.mp.x-=um.e[51];
		um.mp.y-=um.e[51];
	}
	
	//move shadow to menu position
	um.sh.style.left=um.mp.x+'px';
	um.sh.style.top=um.mp.y+'px';
	
	
	return um.sh;
};








//create iframe to cover windowed objects for ie5.5+
umNav.prototype.il=function(umH)
{
	//create iframe
	//tje javascript src prevents IE from trying to load a page
	//and hence avoids the "secure/insecure" dialogue issue on SSL pages
	um.at={'class':'udmC', 'src':'javascript:false;'};
	
	//append to parent <li>
	//yeah .. I know this invalidates the DOM on the fly
	//but it's necessary for the events to flow across it
	//and it's so much easier to position this way
	//and this is IE we're talking about
	//as I'm sure I've postulated before - invalid code is the only code it understands
	//in any case <iframe> itself is invalid XHTML 1.0 Strict or later
	//so I might be invalidating the whole document whatever I do
	//ultimately, it's either that, or don't properly support IE at all
	//take comfort from knowing that conforming user-agents see an always-valid DOM :)
	um.co=umH.parentNode.appendChild(um.createElement('iframe',um.at));

	//set negative tabindex to take it outside the tabbing order
	//this is necessary to prevent the focus moving to the iframe
	//when tabbing through a navbar where the links have no tabindex attributes
	um.co.tabIndex='-1';
	
	//set dimensions to menu offset dimensions
	um.co.style.width=umH.offsetWidth+'px';
	//if scrolling menus is in use, use clipped height, otherwise use offset height
	um.co.style.height=(typeof um.scr!=um.un?scr.gmh(umH):umH.offsetHeight)+'px';

	//move cover to menu position
	um.co.style.left=umH.offsetLeft+'px';
	um.co.style.top=umH.offsetTop+'px';
	
	return um.co;
};








//add to rigid width
umNav.prototype.dw=function(umA)
{
	//add offset width to total
	um.rw+=umA.offsetWidth;
	//if margin is 0 and overflow collapse is in use
	if(um.nc)
	{
		//subtract border width
		um.rw-=um.e[18];
	}
	//otherwise
	else
	{
		//add margin
		um.rw+=um.e[17];
	}
};





//apply rigid width to navbar
umNav.prototype.aw=function()
{
	//for opera 7, mac/ie5 and quirks mode, add nav left position to total width
	//which is actually first <li> offsetLeft plus <ul> real left position
	if(um.o7||um.mie||um.q)
	{
		//for osx/msn we have to calculate it in a stupid way
		//because it returns 0 for all left position values
		if(um.mx)
		{
			um.rw+=um.pi(document.defaultView.getComputedStyle(um.tr,'').paddingLeft);
		}
		//even though these two individual values vary x-browser
		//they always add up to the same, so it's fine
		else
		{
			um.rw+=(um.gp(um.gc(um.tr)).offsetLeft+um.getRealPosition(um.tr,'x'));
		}
	}
	
	//increase by a factor to reduce rounding errors
	//this may cause occassional extraneous h-scroll
	//when window edge is right next to navbar right edge
	//but it prevents a rigid nav from sticking while split in two
	//mac/ie5 and old gecko browsers are affected enough to really need this
	if(um.mie||um.og){um.rw*=1.05;}
	
	//if window is narrower than rigid width
	if(um.getWindowDimensions().x<um.rw)
	{
		//apply rigid width
		um.tr.style.width=um.rw+'px';
	}
	//otherwise
	else
	{
		//set expression width for win/ie5.0
		if(um.wie50)
		{
			um.tr.style.setExpression('width','document.body.clientWidth');
		}
		//or apply 100% width for others
		else
		{
			um.tr.style.width='100%';
		}
	}
	
	//apply height for mac/ie otherwise it expands to fuck
	//and covers the whole page, making everything inert
	//this does mean that with very large text in a rel-pos h-nav
	//the cells will begin to overhang their space at the bottom
	//but that's a minor inconvenience - way preferable to not doing it
	//and in any case rigid overflow is designed for absolute positioning,
	//flexible overflow is more appropriate for relative positiong
	//so really this is just a safety condition
	if(um.mie)
	{
		um.tr.style.height=um.gc(um.tr).offsetHeight+'px';
	}
};







//toggle select-element visibility for win/ie5.0
umNav.prototype.ts=function(umZ)
{
	//get select elements collection
	um.se=um.m.getElementsByTagName('select');
	um.sl=um.se.length;
	//if there are any
	if(um.sl>0)
	{
		//show or hide elements
		i=0;
		do
		{
			um.se[i++].style.visibility=umZ;
		}
		while(i<um.sl);
		
		//report
		um.ap((umZ=='hidden')?'067':'077',um.se);
	}
};




//watch the view size
umNav.prototype.ws=function()
{
	//stop timer while this happens
	clearInterval(um.vs);

	//get current height of first navbar link
	um.ch=um.gc(um.tr).offsetHeight;
	
	//get current window dimensions
	um.cz=um.getWindowDimensions();
	
	//if any have changed
	if(
		//font size has changed
		//and reset from font size is not disabled
		(um.ch!=um.lh&&um.reset[2]!='no')
		||
		//window width or height has changed
		//and reset from window size is not disabled
		((um.cz.x!=um.lw.x||um.cz.y!=um.lw.y)&&um.reset[1]!='no')
		)
	{
		//close all menus
		um.closeAllMenus(); 
		
		//if rigid width is in use 
		//*** PHP PARSER LOOKS FOR "if(um.rg" IN THE FOLLOWING LINE:
		if(um.rg)
		{
			//recalculate rigid width by measuring navbar nodes
			um.rw=0;
			um.kn=um.tr.childNodes;
			um.kl=um.kn.length;
			i=0;
			do
			{
				//exclude text nodes
				if(um.kn[i].nodeName!='#text')
				{
					this.dw(um.kn[i]);
				}
				i++;
			}
			while(i<um.kl);

			//reapply rigid width
			this.aw();
		}
		//*** PHP PARSER LOOKS FOR "um.xx=2;" IN THE FOLLOWING LINE:
		um.xx=2;
	
	
		//set new size values
		um.lw=um.cz;
		um.lh=um.ch;

		//for old gecko with a continuation strip
		if(um.og&&um.hstrip[0]!='none')
		{
			//set <ul> height with margin bottom if necessary
			um.tr.style.height=(um.hstrip[1]=='yes')?(um.lh+um.e[17])+'px':um.lh+'px';
		}
	
	}
	
	//start timer again
	um.vs=setInterval('um.n.ws()',55);
};





//close menus after link click under qualified circumstances
um.qc=function(umLH)
{
	//if reset after following link is enabled
	//and this is an active link
	if(um.reset[3]=='yes'&&umLH!=''&&umLH!=um.jv)
	{
		//close the menus
		um.closeAllMenus();
	}
};


//convert node name for O7 in XHTML mode
um.vn=function(umNN)
{
	return umNN.replace(/html[:]+/,'');
};



//convert a null classname reference to empty string for kde's benefit
um.es=function(umCM)
{
	return umCM==null?'':umCM;
};




//get elements by tag name method by jkd (http://www.jasonkarldavis.com/)
um.gt=function(umRT,umTG,umCE)
{
	if(!umCE){umCE=[];}
	for(var i=0;i<umRT.childNodes.length;i++)
	{
		if(umRT.childNodes[i].nodeName.toUpperCase()==umTG.toUpperCase()||umTG=='*')
		{
			umCE[umCE.length]=umRT.childNodes[i];
		}
		umCE=um.gt(umRT.childNodes[i],umTG,umCE);
	}
	return umCE;
};



//get child <a>
um.gc=function(umRA)
{
	return umRA.getElementsByTagName('a')[0];
};



//get nested <ul> collection
um.gu=function(umE)
{
	return umE.getElementsByTagName('ul');
};



//get <ul> menu - faster than um.gu(root)[0] in some cases
//and necessary in others .. mostly because of mac/ie5 or msn
um.gm=function(umE)
{
	//set object initially to null
	um.mu=null;
	
	//get child nodes
	um.mn=umE.childNodes;
	um.ml=um.mn.length;
	
	//for each child node
	i=0;
	do
	{
		//get node name (convert for O7 in XHTML mode)
		um.nn=um.vn(um.mn[i].nodeName).toLowerCase();
		
		//if it's a <ul> element
		if(um.nn=='ul')
		{
			//select it
			um.mu=um.mn[i];
			
			//stop
			break;
		}
		i++;
	}
	while(i<um.ml);
	
	//return the object or null
	return um.mu;
};




//close all menus
um.cm=function(e)
{
	//convert event properties
	if(!e){e=window.event;}

	//if mouse event is not inside the tree
	//or event came from the keyboard
	if(!um.tr.contains(e.srcElement||e.target)||e.keyCode)
	{
		//close all menus
		um.closeAllMenus();
	}
};





//public close all menus
um.closeAllMenus=function()
{
	//close descendent menus from root
	um.n.cd(um.tr);

	//clear descendent links from root
	um.n.ck(um.tr);
		
	//set has focus flag to false
	um.ha=0;
};







//get window dimensions
um.getWindowDimensions=function()
{
	if(typeof window.innerWidth!=um.un)
	{
		um.wz={
			x:window.innerWidth,
			y:window.innerHeight
			};
	}
	else if(um.q)
	{
		um.wz={
			x:um.m.body.clientWidth,
			y:um.m.body.clientHeight
			};
	}
	else
	{
		um.wz={
			x:um.m.documentElement.offsetWidth,
			y:um.m.documentElement.offsetHeight
			};
	}
	return um.wz;
};





//get scroll amount
um.getScrollAmount=function(umDR)
{
	//return scroll property reference
	//if no direction argument is defined then get the y position
	//if an argument is defined then get the x position
	return ((typeof umDR==um.un||!umDR)?(typeof window.pageYOffset!=um.un?window.pageYOffset:um.q?um.m.body.scrollTop:um.m.documentElement.scrollTop):(typeof window.pageXOffset!=um.un?window.pageXOffset:um.q?um.m.body.scrollLeft:um.m.documentElement.scrollLeft));
};






//get real position
um.getRealPosition=function(umE,umX)
{
	um.ps=(umX=='x')?umE.offsetLeft:umE.offsetTop;
	um.te=umE.offsetParent;
	while(um.te!=null)
	{
		um.ps+=(umX=='x')?um.te.offsetLeft:um.te.offsetTop;
		um.te=um.te.offsetParent;
	}
	return um.ps;
};





//popup alignment activate menu
um.activateMenu=function(umNI,umXP,umYP)
{
	//store node reference
	var umVN=um.gd(umNI);

	//if there's a node and RTL text isn't in use
	if(umVN!=null&&!um.rtl)
	{
		//get menu object this way because of mac/ie5
		//because for some unknown reason
		//umVN.getElementsByTagName('ul')
		//returns an array that has 0 members - or specifically, 1 fewer than there should be
		//the same thing is true for osx/msn
		//except our custom gtn method doesn't work for that
		//it generates another 'out of memory' error
		//and anyway this method also seems faster
		um.vm=um.gm(umVN);
		
		//if there's a menu
		if(um.vm!=null)
		{
			//we need to prevent the menu toggles from working
			//when CSS is off but javascript is on
			//so check that CSS is enabled
			//and only continue if it is
			if(um.n.cck())
			{
				//close this branch in case it's already open
				//this [** mostly] prevents shadow layer from being left at previous position
				um.n.cd(umVN);
	
				//start new open primer
				um.n.pr(um.vm,umVN,0);
		
				//shift to position
				um.vm.style.left=umXP;
				um.vm.style.top=umYP;
			}
		}
	}
};





//popup alignment deactivate menu
um.deactivateMenu=function(umNI)
{
	//store node reference
	var umVN=um.gd(umNI);

	//if there's a node and RTL text isn't in use
	if(umVN!=null&&!um.rtl)
	{
		//send menu to close primer
		um.n.cp(um.gm(umVN),umVN);
	}
};



//pstop
