
init=function() { with (p)
{
	p.PageName = function(){return /\/(\w+?)(?:_\d+)?\.html$/i.test(URL)?RegExp.$1.toUpperCase():DEF_PAGE_NAME};
	p.PageNumb = function(){return /\/\w+_(\d+)\.html$/i.test(URL)?parseInt(RegExp.$1):0};
	
	p.URL			= d.location.href;
	p.DEF_PAGE_NAME	= 'INDEX';
	p.MENU			= $('CAP_MENU');
	p.NAVBAR		= $('CAP_NAVBAR');
	p.SUBHEAD		= $('CAP_SUBHEAD');
	p.CONTENT		= $('CAP_CONTENT');
	p.LINKS			= d.getElementsByTagName('a');
	p.PUBS			= $C('documents','table')[0];
	p.PG_NAME		= PageName();
	
	
	/*
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	MENU
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	*/
	MENU.r			= MENU.getElementsByTagName('h1');
	MENU.SELECTED	= null;
	MENU.Selected	= function(row){with(this)return(SELECTED!=null&&row.number==SELECTED.number)};
	MENU.Unhide		= function(x){x.className=x.className.replace(/removed/,"")};
	
	MENU.Select=function(row) { with (this)
	{
		SELECTED=row;
		SELECTED.className='omo';
		
		if (row.subs)
		{
			for (var i=0;i<row.subs.length;i++)
			{
				row.Prepare(row.subs[i],i+1);
				Unhide(row.subs[i])
			}
		}
	}
	};
	
	with (MENU)
	{
		for (var i=0;i<r.length;i++)
		{
			r[i].number		= i;
			r[i].text		= r[i].firstChild.innerHTML;
			r[i].alias		= r[i].title ? r[i].title : r[i].firstChild.innerHTML.replace(/&amp;/g,"").replace(/\W/g,"");
			r[i].alias		= r[i].alias.toUpperCase();
			r[i].title		= "";
			r[i].pointer	= r[i].firstChild;
			r[i].url		= r[i].firstChild.href;
			r[i].className	= '';
			
			r[i].onmouseover	= function(){with(p.MENU)if(!Selected(this))this.className='omo'};
			r[i].onmouseout		= function(){with(p.MENU)if(!Selected(this))this.className=''};
			r[i].Select			= function(child){child.opened=true;child.className+=' omo'};
			
			r[i].Prepare=function(child,n)
			{
				child.number		= n;
				child.opened		= false;
				child.text			= child.firstChild.innerHTML;
				child.onclick		= function(){d.location.href=this.firstChild.href};
				child.onmouseover	= function(){with(this)if(!opened)className+=' omo'};
				child.onmouseout	= function(){with(this)if(!opened)className=className.replace(/omo/,"")};
				
				if (child.number==p.PageNumb())
				{
					this.Select(child);
					
					with (p)
					{
						SUBHEAD.innerHTML=child.text;
						MENU.Unhide(SUBHEAD.parentNode)
					}
				}
			};
			
			if (eval('/'+PG_NAME+'/i').test(r[i].alias))
			{
				switch (i)
				{
					case 1:
					r[i].subs=p.MENU.getElementsByTagName('h2');
					break;
				}
				
				Select(r[i]);
			}
			
			r[i].onclick=function(){d.location.href=this.url};
		}
		
		if ($SIZEOF(MENU)[1] < $SIZEOF(CONTENT)[1]) $RESIZE(MENU,0,$SIZEOF(CONTENT)[1]+100);
	}
	
	
	/*
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	NAVIGATION BAR
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	*/
	with (NAVBAR)
	{
		NAVBAR.getElementsByTagName('td')[0].innerHTML=MENU.SELECTED.text
	}
	
	
	/*
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	PAGE MANAGER
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	*/
	switch (PageName())
	{
		case 'ANEMERGINGAGENDA':
		/*if (PageNumb()==0)
		{
			var url=PageName().toLowerCase()+'_'+(PageNumb()+1)+'.html';
			d.location.href=url
		}*/
		break;
	}
	
	
	/*
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	LINKS
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	*/
	for (var i=0;i<LINKS.length;i++) { with (LINKS[i])
	{
		switch (className)
		{
			default: if (/\.pdf$/i.test(href)) target='_blank'; break;
			case 'ex': target='_blank'; break;
		}
	}
	}
	
	
	/*
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	PUBLICATIONS
	IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
	*/
	if (PUBS) { with (PUBS)
	{
		PUBS.r=$C('row','tr',PUBS);
		
		for (var i=n=0;i<r.length;i++)
		{
			r[i].c						= r[i].getElementsByTagName('td');
			r[i].LINK					= r[i].getElementsByTagName('a')[0];
			r[i].firstChild.innerHTML	= ++n;
			r[i].LINK.target			= '_blank';
			
			for (var j=0;j<r[i].c.length;j++)
			{
				switch (j)
				{
					default: r[i].c[j].onclick=function(){window.open(this.parentNode.LINK.href)}; break;
					case 1: break;
				}
			}
		}
	}
	}
}
};
