if (self != top) top.location.href = window.location.href;

function NewWindow(mypage, myname, w, h, scroll) {
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h -50) / 2;
        winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
		if ( arguments.length >5 ) winprops += ',' + arguments[5];
        if (w==0 && h==0) {
            if (parseInt(navigator.appVersion)>=4){
                target = new Date() ;
		  target = target.getTime();
                y='toolbar=yes,location=yes,resizable=yes,status=yes,scrollbars=yes,menubar=yes,width=';
            	win=window.open(mypage,target,y+((screen.width/100)*80)+",height="+(((screen.height/100)*85)-200)+",left="+((screen.width/100)*9)+",top="+((screen.height/100)*14))}
            else {target=window.open(mypage,target,y+"600,height=280")}}
        else { win = window.open(mypage, myname, winprops)}
    	if (mypage.indexOf(document.domain) > 0 && window.focus) {win.window.focus(); }
}

var winModalWindow
 
function IgnoreEvents(e)
{
  return false
}
 
 
function HandleFocus(e)
{
	if (!e) var e = window.Event
  if (winModalWindow)
  {
    if (!winModalWindow.closed)
    {
      winModalWindow.focus()
    }
    else
    {
      if(window.top.releaseEvents) window.top.releaseEvents (e.CLICK|e.FOCUS);
      window.top.onclick = ""
    }
  }
  return false
}


function WarnWindow(strHref, strLinkName)
{
	var w = 500;
	var h = 450;
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h -50) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,resizable'
	if (window.top.captureEvents) window.top.captureEvents (Event.CLICK|Event.FOCUS)
	window.top.onclick=IgnoreEvents
	window.top.onfocus=HandleFocus 
	strHref = 'warnwindow.php?strUrl=' + escape(strHref);
	if(strLinkName != undefined) strHref += '&amp;nkkexternlinktext=' + strLinkName;
	winModalWindow = window.open (strHref,"ModalChild", winprops)
	winModalWindow.focus();
	return(false);
}

function getWarnSiteName()
{
	strHref = document.location.search
	strHref = unescape(strHref.substr(8,strHref.length))
	if (strHref.indexOf("nkkexternlinktext")>-1)
	{
		strHref = strHref.substr(strHref.indexOf("nkkexternlinktext")+18,strHref.length)
	}
	if (strHref.indexOf("http://")>-1)
	{
		strHref = strHref.substr(7,strHref.length)
	}
	if (strHref.indexOf("/")>-1)
	{
		strHref = strHref.substr(0,strHref.indexOf("/"))
	}
	return strHref;
}

function TrackLink(strHref){
	if (strHref.indexOf("http://")>-1)
	{
		strHref = strHref.substr(7,strHref.length)
	}
	strHref = strHref.replace("../", '');
	strHref = "/track_link/" + strHref;
	urchinTracker	 (strHref);
}


function writeWarnSiteName()
{
	strHref = getWarnSiteName();
	document.writeln(strHref);
}

function writeWarnSiteLink(strLinkText)
{
	strLinkHref = document.location.search
	strLinkHref = unescape(strLinkHref.substr(8,strLinkHref.length))
	if (strLinkHref.indexOf("nkkexternlinktext")>-1)
	{
		strLinkHref = strLinkHref.substr(0,strLinkHref.indexOf("nkkexternlinktext")-1)
	}
	document.writeln('<a class="warngo" target="_blank" title="Bezoek de site" onclick="NewWindow(this.href,0,0,0,1);urchinTracker(' + "'/exit_site/' + '" + getWarnSiteName() + "'" + ');setTimeout(' + "'window.close();'" + ', 1);return(false);" href="' + strLinkHref + '">' + strLinkText + '</a>');
}


function writeMediaplayer(strMovie)
{
document.write('<object width="320" height="280" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"><param name="Filename" value="' + strMovie + '"><param name="AutoStart" value="True"><param name="ShowControls" value="True"><param name="ShowStatusBar" value="False"><param name="ShowDisplay" value="False"><param name="AutoRewind" value="False"><embed src="' + strMovie + '" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="0" showdisplay="0" AutoSize="1" showcontrols="1"pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="320" height="280"></embed></object>');

}

function InitializeMenu(strId)
{
	var navRoot = document.getElementById(strId);
	for (i=0; i<navRoot.childNodes.length; i++)
	{
		node = navRoot.childNodes[i];
		if (node.nodeName == "LI")
		{
			node.onmouseover=function()
			{
				this.className+=" over";
			}
			node.onmouseout=function()
			{
				this.className=this.className.replace(" over", "");
			}
		}
	}
}