		/*
		* Javascript External Links v1.1
		* by John Olival adapted from script by Mark Howells (www.mark.ac)
		* http://www.explican.com
		* Copyright (c) 2002 John Olival. All Rights Reserved.
		* this script may be re-used so long as this comment is kept in tact.
		*
		* Call the script using: onload="outLinks();"
		* 
		* This script will change all external links so they open in an external window
		*/
		
		var linkTarget = "dmaExternal";
		var localHost = "localhost"; //development server
		//var liveHost = "www.the-dma.org.uk"; //live server
		
		function openWindow()
			{
			myWin=window.open(this.href, linkTarget); 
			myWin.focus(); 
			return false;
			}
		
		//function to assign all external anchors to open a new window
		//isExternal if http:// and (not loalhost and not liveHost) or (validator and (localhost or livehost))
		//validator is for W3C validator links where the sites url is included in the link href
		function outLinks()
			{
			//alert(liveHost);
			var isExternal = false;
			if(document.getElementById)
				{
				for (var i = 0; i <= (document.links.length-1); i++) 
					{
			 		isExternal = ( (document.links[i].href.indexOf("http://")!=-1) && ( (document.links[i].href.indexOf(localHost)==-1) && (document.links[i].href.indexOf(liveHost)==-1) ) || ( (document.links[i].href.indexOf("validator")!=-1) && ( (document.links[i].href.indexOf(localHost)==-1) || (document.links[i].href.indexOf(liveHost)==-1) ) ) )
					if(isExternal)
						{
						//document.links[i].target = linkTarget;
						document.links[i].onclick = openWindow; 
						}
					}
				}
			}

