//	open external links in a new window - replaces target="_blank"
	function externalLinks () { 
		if ( ! document.getElementsByTagName ) return; 
		var anchors = document.getElementsByTagName("a"); 
		for ( var i=0; i < anchors.length; i++ ) { 
			var anchor = anchors[i]; 
			if ( anchor.getAttribute("href") && anchor.getAttribute("rel") == "external" ) anchor.target = "_blank"; 
		} 
	} 

//	preload images
	function preload_images () {
		arImageSrc = new Array ();
		arImageList = new Array ();
		for (counter in arImageSrc) {
			arImageList[counter] = new Image();
			arImageList[counter].src = arImageSrc[counter];
		}
	}


//	add given page to favourites (bookmark)
	function setBookmark ( url, str ) {
		if ( str == '' ) str = url;
		if ( document.all ) window.external.AddFavorite( url, str );
		else alert( 'Sorry, this function only works in Internet Explorer.\n\nPlease press CTRL and D to add a bookmark to \n"' + str + '".' );
	}

//	toggle a given elements visibility
	function toggle (el) {
		if ( document.getElementById(el).style.display == 'none' ) {
			document.getElementById(el).style.display = '';
		} else {
			document.getElementById(el).style.display = 'none';
		}
	}

//	show a given element
	function show (el) {
		if ( document.getElementById(el) != undefined ) document.getElementById(el).style.display = '';
	}



//	perform the following functions when the page loads
	window.onload = function(e) {
		externalLinks();
	}