



function getExternalLink()	{

	/* check the browser is capable of recognising the DOM objects
	   we need to implement the script - otherwise return false and allow the normal link to be executed */
	   
	if(!document.getElementsByTagName) return false;

	if(!document.getElementsByTagName("a")) return false;
	
	
	
	/* get a listing of all the <li> elements in the page. Then check each one for a title tag of "extLink"
	   If we find such an element, go get a listing of all the childNodes it contains.
	   Then check each one of these for any text which contains "www" - if we find one we know we have a hyperlink
	   so set the target attribute to _blank to force the link to open in a new browser window.
	   We also assign the hyperlink text to the title tag to display for the user */
	
	
	var links = document.getElementsByTagName("li"); 
	var textToSearch
	
	//alert(links.length)
						
	if (links.length > 0) {

					for(i = 0; i < links.length; i++) {
								

						if(links[i].getAttribute("title") == "extLink") {
							//var activeLink = links[i].getElementsByTagName("a")
							
							
							for(j = 0; j < links[i].childNodes.length; j++) {
							
								//alert(links[i].childNodes[j].nodeValue + j)

								textToSearch = new String(links[i].childNodes[j])
								

								
									if(textToSearch.match("www")) {
										
										
										links[i].childNodes[j].setAttribute("target", "_blank")
										links[i].childNodes[j].setAttribute("title", "link to " + links[i].childNodes[j] + " in a new window") 
									
										
									
									}
									
							}
						
						}
				

									
																									
					}
			
	}	   
	
}
