// Browser

function showmovie(clip)
{
URL = "videos/" + clip + ".htm";
option = window_option('500','350');
window.open(URL,"",option);
}

function window_option(WinW,WinH)
{
var x,y;
x=(screen.width/2-(WinW/2));
y=(screen.height/2-(WinH/2));

option = "height=" + WinH +",width="+ WinW +",left=" + x +",top="+ y;
return option;
}

function isDefined(property)
{
return (typeof property != 'undefined');
}

// 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++)
{

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 SetActivePage()
{
ThisPage	= window.location.href;
ThisPage	= ThisPage.split("/");
ThisPage	= ThisPage[ThisPage.length-1];

if (document.getElementById("subnav"))
{
var NavUrls	= document.getElementById("subnav").getElementsByTagName("a");

for (var i=0; i<NavUrls.length; i++)
{
ThisURL		= NavUrls[i].href;
ThisURL		= ThisURL.split("/");
ThisURL		= ThisURL[ThisURL.length-1];

if (ThisURL == ThisPage)
{
NavUrls[i].className	= "Active";
}
}

}

}

function RunFunctions()
{
SetActivePage();
externalLinks();
BlurLinks();

if (document.getElementById("Tabs"))
{
initializetabcontent("Tabs");
}
}

// call rolloverInit when document finishes loading
if (isDefined(window.addEventListener))
{
window.addEventListener('load', RunFunctions, false);
}

else if (isDefined(window.attachEvent))
{
window.attachEvent('onload', RunFunctions);
}

