// JavaScript Document - //open a new window with the anchors url
function offsite() {
	if (!document.getElementsByTagName) return false;
	
	var links = document.getElementsByTagName("A");
	
	for ( var i = 0; i < links.length; i++ )
	{
		var attributeValue = links[i].getAttribute("rel");
		if (attributeValue.search(/off-site/) != -1)
		{
			links[i].onclick = function() {
				if(!document.getElementById) return true;
				//open a new window with the anchors url
				window.open(this.getAttribute("href"));
				return false;
			}
		}
	}
}

function addLoadEvent(func) {
	var oldOnLoad = window.onload
	if (typeof window.onload != 'function')
	{
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldOnLoad();
			func();
		}
	}
}

addLoadEvent(offsite);