function init()
{
	
	var a = document.getElementsByTagName('a');
	var link_path=document.location.href;
	for(var i=0; i<a.length; i++)
	{	
		// menus
		if(a[i].href==link_path)
		{
			a[i].removeAttribute('href');
			a[i].className='current';
			/*@cc_on a[i].disabled='disabled'; @*/ // IE only
		}
		
		// popups
		if(a[i].className=='popup' && window.open)
		{
			var path = a[i].href;
			a[i].onclick=function()
			{
				window.open(this.href, '_blank', 'width=900, height=550, resizable=yes, scrollbars=yes, location=no, toolbar=no, menubar=no');
				return false;
			}		
		}
	}
	

	// encrypted email
	var span=document.getElementsByTagName('span');
	for(var i=0; i<span.length; i++)
	{
		if(span[i].className=='email')
		{
			var noscript_text=span[i].firstChild;
			var encoded = noscript_text.nodeValue;
			var decoded=encoded.replace(' at ', '@');
			decoded=decoded.replace(' dot ', '.');
			var a=document.createElement('a');
			a.href='mailto:'+decoded;
			var link_text = document.createTextNode(decoded);
			a.appendChild(link_text);			
			span[i].replaceChild(a, noscript_text);	
		}
	}	
	
}

