/*
   Milonic DHTML Menu Automatic Menu Opening Module  openmenusbyurl.js version 1.3 - 7th March 2005
   This module is only compatible with the Milonic DHTML Menu version 5.62 or higher

   Copyright 2004 (c) Milonic Solutions Limited. All Rights Reserved.
   This is a commercial software product, please visit http://www.milonic.com/ for more information.
   
   The object of this module is to re-open the menu or menus up to point where the user was on a previous page.
   Just add this module to your HTML page after the menu_data.js file.
*/

//mm_maxLevels=1;  // NONE-MANDATORY parameter [INTEGER] to fix the number of menus displayed to the specified maximum value.

resetAutoOpen=true // This bit allows the menu to re-open if sibling menus have been closed, displaying the menu again if required.

function _ocURL()
{
	_ombcu=new Array()
	if(_cip.length>0){
		for(_c=0;_c<_cip.length;_c++){
			_ci=_cip[_c];
			_mni=getParentItemByItem(_ci);
			if(_mni==-1)_mni=_ci			
			if(_mni+" "!=$u){
				while(_mni!=-1){
					_ombcu[_ombcu.length]=_mni
					_mni=getParentItemByItem(_mni);
					if(_mni+" "==$u)_mni=-1					
				}
			}
		}
	}
	
	if(_startM){
		setTimeout("_ocURL()", 300)
	}
	else
	{
		if(_ombcu.length){
			for(_oma=_ombcu.length-1;_oma>-1;_oma--){
				_popi(_ombcu[_oma])
				clickAction(_ombcu[_oma])
				_ofMT=1
				if(_oma==_W.mm_maxLevels)return
			}
		}
	}
}
_ocURL()

