function getel(l)
{	return document.getElementById(l);	}

//----------------------------------------------------------------------------------------------------
//	####	Script to dynamically show or hide text		####	
//----------------------------------------------------------------------------------------------------

function hideshow(el)
{	if (!document.getElementById)
		return;
	if (getel(el).style.display == "inline")
		getel(el).style.display="none";
	else
		getel(el).style.display="inline";
}

//----------------------------------------------------------------------------------------------------
//	####	Script to display external link warning		####	
//----------------------------------------------------------------------------------------------------

var newdomain = new Array();
newdomain[0] = "Paymentshield Limited";
newdomain[1] = "BBC Business News";
newdomain[2] = "BBC News";
newdomain[3] = "Financial Services Authority";
newdomain[4] = "W3C.org XHTML Validation";
newdomain[5] = "W3C.org CSS Validation";
newdomain[6] = "MultiMap";

function thirdparty(co)
{	var mess = " " + newdomain[co] + "\n";
	mess += "_________________________________________________________________\n\n";
	mess += "Please note: by following this link, you are entering the " + newdomain[co]; 
	mess += " website.\n\n";
	mess += "Leggett & Co LLP accepts no responsibility for the content displayed ";
	mess += "on external websites.\n\n";
	mess += "If you wish to proceed, click 'OK', otherwise click 'Cancel'."; 
	return window.confirm(mess);
}

//----------------------------------------------------------------------------------------------------
//	####	Script to generate mail addresses in links	####	
//----------------------------------------------------------------------------------------------------

function mailsend(a, tgt)
{	a.href = 'mailto:' + tgt + '@leggett-co.co.uk';
	return true;
}

//----------------------------------------------------------------------------------------------------
//	####	Script to show custom status bar msg for mail links ####	
//----------------------------------------------------------------------------------------------------

function stat(ev, mr)
{	if (!ev) var ev = window.event;
	window.status = (ev.type == "mouseover") ? 'E-mail ' + mr : window.defaultStatus;
	return true;
}

//----------------------------------------------------------------------------------------------------
//	####	Script to counter IE's refusal to hover universally	####	
//----------------------------------------------------------------------------------------------------

startList = function()
{	if ( document.all && document.getElementById ) 
	{	navRoot = document.getElementById("navlist");
		for ( i = 0; i < navRoot.childNodes.length; i++ ) 
		{	var node = navRoot.childNodes[i];
			if ( node.nodeName == "LI" ) 
			{	node.onmouseover = 
				function() {  	this.className += " over"; }
  				node.onmouseout = 
				function() {  	this.className = this.className.replace(" over", ""); }
   			}
  		}
 	}
}
window.onload = startList;