// On Mouse events
function isDefined(property)
{
return (typeof property != 'undefined');
}

if (isDefined(window.addEventListener))
{
window.addEventListener("load", RunLoadFunctions, false);
}

else if (isDefined(window.attachEvent))
{
window.attachEvent("onload", RunLoadFunctions);
}

// Targets
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"; 
}

}

}

function BlurLinks()
{
lnks	= document.getElementsByTagName("a");

for(i=0;i<lnks.length;i++)
{
	
if ((lnks[i].getAttribute("rel") == "null") || (lnks[i].getAttribute("rel") == ""))
{
lnks[i].onfocus	= new Function("this.blur()");
lnks[i].onclick 	= function() { internalLink = true;}
}

}

// Input Buttons
inpts	= document.getElementsByName("input");

for(i=0;i<inpts.length;i++)
{
inpts[i].onfocus= new Function("this.blur()");
}

}

function LoginBox()
{
	
if ((document.getElementById("LoginLink")) && (document.getElementById))
{
document.getElementById("LoginLink").onclick	= new Function("return overlay(this, 'LoginBox', 'rightbottom')");
}

}

function RunLoadFunctions()
{
externalLinks();
BlurLinks();
LoginBox();
}