// Browser
if(document.all)
{
var thisbrowser="IE"
}

if(!document.all && document.getElementById)
{
var thisbrowser="NN6";
}

var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

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

}

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

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

}


function RunLoadFunctions()
{
externalLinks();
BlurLinks();
FormControls();

if (document.getElementById("TrackerTabs"))
{
TrackerTabsInt();
}

if ((window.attachEvent) && (document.getElementById("SubNav")))
{
sfHover();
}

if (document.getElementById("ShowCase"))
{
ShowCaseLinks();
}

}

function TrackerTabsInt()
{
var VTrackerTabs	= new ddtabcontent("TrackerTabs");
VTrackerTabs.setpersist(true);
VTrackerTabs.setselectedClassTarget("link");
VTrackerTabs.init();
}

function ShowCaseLinks()
{
lnks				= document.getElementById("ShowCase").getElementsByTagName("a");

for(i=0; i<lnks.length; i++)
{

if ((lnks[i].getAttribute("rel") == "flash") || (lnks[i].getAttribute("rel") == "flash"))
{
PopOverType			= lnks[i].getAttribute("rel");
PopOverLink			= lnks[i].href;
PopOverLink			= PopOverLink.replace("http://www.npbmedia.com", "");
PopOverDims			= lnks[i].getAttribute("title");
PopOverDims			= PopOverDims.split("x");
PopOverWidth		= PopOverDims[0];
PopOverHeight		= PopOverDims[1];

PopOverRef			= PopOverLink + "Collapse";
PopOverURL			= "ShowCaseWindow('" + PopOverType + "', '" + PopOverLink + "', " + PopOverWidth + ", " + PopOverHeight + ");";
lnks[i].title		= "";
lnks[i].onfocus		= new Function("this.blur()");
//lnks[i].onclick		= new Function(PopOverURL);
lnks[i].href		= "javascript:" + PopOverURL;
}

}


}