// JavaScript Document

function getObj(name)
{
	var RetVal = null;
	if (document.getElementById)
	{
		RetVal = document.getElementById(name);
	}
	else if (document.all)
	{
		RetVal = document.all[name];
	}
	else if (document.layers)
	{
		RetVal = getObjNN4(document,name);
		RetVal.style = RetVal;
	}
	return RetVal;
};


	<!-- Begin
	// quick browser tests
var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;
var activeMenuID = -1;

function toggleOtherDivs(aVal,aID,aCount)
{
	for(var i=1;i<aCount;i++)
	{
		if (i != aID)
		{
			aElm = getObj('allvids'+i);
			aElm.style.display = aVal;
			aElm = getObj('lst'+i);
			aElm.style.display = 'none';
		}
	}
}

function toggleDiv(aID,aCount)
{
	if (typeof display_aktuell != "undefined") {
			if	(display_aktuell == true) toggleAkt(0,'none'); 
	}
	
//alert("id " + aID + " , " + aCount);
	if (!aCount)
	{
		aCount = 8;
	}
	var aElm = null;
	aElm = getObj('lst'+aID);

	activeMenuID = aID;
	if ((aElm.style.display == "") || (aElm.style.display == "none"))
	{
		aElm.style.display = 'block';
		aElm = getObj('allvids'+aID);
		aElm.style.display = 'block';
		toggleOtherDivs('none',aID,aCount);
		toggleResetButton('block');
	}
	else
	{
		aElm.style.display = 'none';
		aElm = getObj('allvids'+aID);
		aElm.style.display = 'block';
		toggleOtherDivs('block',aID,aCount);
		toggleResetButton('none');
	}
}

//060424 - a3 code om actuell te laten zien 
//
var display_aktuell = "test";  //global var voor togglediv 

function toggleAkt(count,style) {	
	var aElm = null;
	aElm = getObj('aktuell');
	if (style == "none") { aElm.style.display = "none"; return; }
	
	if ((aElm.style.display == "") || (aElm.style.display == "none"))	{
		aElm.style.display = "block";
		toggleOtherDivs('none',0,count);
		display_aktuell = true;  // uitgeklapt en togglediv kan dat nu checken
	}
	else	{
		aElm.style.display = "none";
		toggleOtherDivs('block',0,count);
	}	
}

function toggleResetButton(aState)
{
	var aElm = getObj('resetButton');
	if (aElm != null)
	{
		aElm.style.display = aState;
	}
}
function show(sw,obj)
{
	//alert ("obj = " + obj);
	// show/hide the divisions
	if (sw && (ie4 || ie5) )
	{
		document.all[obj].style.visibility = 'visible';
	}
	else if (!sw && (ie4 || ie5) )
	{
		document.all[obj].style.visibility = 'hidden';
	}
	else if (sw && ns4)
	{
		document.layers[obj].visibility = 'visible';
	}
	else if (!sw && ns4)
	{
		document.layers[obj].visibility = 'hidden';
	}
	else
	{
		document.getElementById(obj).style.visibility = (sw) ? "visible" : "hidden";
	}
}
	// End -->

function popupje2(mylink) {window.open(mylink,'ftvwindow','toolbar=no,width=640,height=480,top=80,left=90,directories=no,status=no,scrollbars=no,resizable=no,menubar=no');
}

function sendToFriend(lang,id,ncms)
{
	// pid wordt gezet in aanroepende script
	//alert('pid = ' + pid);
	if (typeof pid == "undefined") pid = 'FTV';
	window.open('http://www.zoomin.tv/videoplayer/index.cfm?fuseaction=sendToFriend&language='+lang+'&video_id='+id+'&pid='+pid+'&ncms='+ncms,'MTC_window2','toolbar=no,width=329,height=450,top=80,left=90,directories=no,status=no,scrollbars=no,resizable=no,menubar=no');
}


function rsspopup(pid) {
	   var rsspopwin = window.open('http://bongo.zoomin.tv/xml/rss/index.cfm?pid='+pid,'MTV8_window','toolbar=no,width=200,height=300,top=80,left=90,directories=no,status=no,statusbar=0,scrollbars=no,resizable=no,menubar=no');
      rsspopwin.focus();
}
