/*
author: Kevin Yank
source: http://www.sitepoint.com/article/standards-compliant-world
*/

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";
		}
	}
window.onload = externalLinks;



<!--

//----------------- __RAND_O_RAMA_ROTATOR__ ------------------->
//------------------- random image rotator -------------------->

/* 
 *  name all images the same - whatever name you like - except:
 *  every image file must have number (sequential, starting with '1') in name 
 *  e.g. 'images/myPic1.gif', 'images/myPic2.gif', 'images/myPic3.gif' (or: 'images/3.gif')
 *  specify 'generic_filepath' below, replacing number with '@'
 *  e.g. 'images/myPic@.gif'
 */

var generic_filepath = 'images/header@.jpg';
var num_images = 4; //number of images
var rand_o_speed = 8; //display frequency (in seconds)
var rand_o_fade = 2; //crossfade duration (in seconds)

//------------------------------------------------------------->

var rand_o_timer = null;
var preloadObj = new Image();

function rand_o_rama() //call onload
{
	var idx_array, idx_str, first_idx, curr_image, isIE = (window.createPopup) ? 1 : 0;
	if (!/__RAND_O_RAMA_ROTATOR__/.test(self.name))
	{
		var ind1, ind2, temp, tempLength = num_images - 1, i = 0;
		idx_array = new Array(tempLength);
		for (i; i < tempLength; ++i)
			idx_array[i] = i + 2;
		for (i = 0; i < num_images; ++i)
		{
			ind1 = Math.floor(Math.random() * tempLength);
			ind2 = Math.floor(Math.random() * tempLength);
			temp = idx_array[ind1];
			idx_array[ind1] = idx_array[ind2];
			idx_array[ind2] = temp;
		}
		idx_array[idx_array.length] = 1;
		preloadObj = new Image();
		preloadObj.src = generic_filepath.replace(/@/, idx_array[0]);
		self.name = '__RAND_O_RAMA_ROTATOR__' + idx_array.join(',');
		rand_o_timer = setTimeout('rand_o_rama()', rand_o_speed * 1000);

		return;
	}

	idx_str = self.name.split('__RAND_O_RAMA_ROTATOR__')[1];
	idx_array = idx_str.split(',');
	first_idx = idx_array.splice(0,1);
	curr_image = generic_filepath.replace(/@/, first_idx);
	idx_array[idx_array.length] = first_idx;
	idx_str = idx_array.join(',');
	self.name = '__RAND_O_RAMA_ROTATOR__' + idx_str;
	if (preloadObj.complete)
	{
		
		if (isIE)
		{
			document.images.rand_o_box.style.filter = 'blendTrans(duration=2)';
			document.images.rand_o_box.style.filter = 'blendTrans(duration='+rand_o_fade+')';
			document.images.rand_o_box.filters.blendTrans.Apply();
		}
		document.images.rand_o_box.src = curr_image;
		if (isIE) 
			document.images.rand_o_box.filters.blendTrans.Play();
	}
	preloadObj = new Image();
	preloadObj.src = generic_filepath.replace(/@/, idx_array[0]);
	rand_o_timer = setTimeout('rand_o_rama()', rand_o_speed * 1000);
}