// JavaScript Document
var browserType;

if (document.layers) {browserType = "nn4"}
if (document.all) {browserType = "ie"}
if (window.navigator.userAgent.toLowerCase().match("gecko")) {browserType= "gecko"}

//Functie om een div layer zichtbaar en onzichtbaar te maken

function hide(divName) {
  if (browserType == "gecko" )
     document.poppedLayer = eval('document.getElementById(divName)');
  else if (browserType == "ie")
     document.poppedLayer = eval('document.all[divName]');
  else
     document.poppedLayer = eval('document.layers[divName]');
  document.poppedLayer.style.visibility = "hidden";
  document.poppedLayer.style.display = "none";
}

function show(divName) {
  if (browserType == "gecko" )
     document.poppedLayer = eval('document.getElementById(divName)');
  else if (browserType == "ie")
     document.poppedLayer = eval('document.all[divName]');
  else
     document.poppedLayer = eval('document.layers[divName]');
  document.poppedLayer.style.visibility = "visible";
  document.poppedLayer.style.display = "";
}

//Functie om images te preloader

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

// JavaScript Document
//function flash(swf, w, h)
//{
//	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'">');
//	document.write('<param name="movie" value="'+swf+'"><embed src="'+swf+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object>');
//}
// JavaScript Document
function flash(swf, w, h, wmode, id)
{
	if(!wmode) wmode="opaque";
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" id="'+id+'" width="'+w+'" height="'+h+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+swf+'" /><param name="wmode" value="'+wmode+'" /><embed src="'+swf+'" id="'+id+'" name="'+id+'" wmode="'+wmode+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" swLiveConnect=true allowScriptAccess="sameDomain" /></object>');
}
// JavaScript Var to Flash
function flashVar(swf, w, h)
{
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="menu" width="'+w+'" height="'+h+'">');
	document.write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="'+swf+'" /><param name=FlashVars value="'+pagina+'" /><embed src="'+swf+'" id="menu" name="menu" FlashVars="'+pagina+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'" swLiveConnect=true allowScriptAccess="sameDomain" /></object>');
}
// Pop up Yes-R TV
function yesrtv(){
	window.open('http://www2.yes-r.nl/yes-r_tv.php','mywindow','width=875,height=620,location=no,left=20,top=20')
}
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function menu_DoFSCommand(command, args) {
	var menuObj = isInternetExplorer ? document.all.menu : document.menu;
	//
	if (command == "popup") {
  		yesrtv();
  	}
	//
}
// Hook for Internet Explorer.
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=\"VBScript\"\>\n');
	document.write('On Error Resume Next\n');
	document.write('Sub menu_FSCommand(ByVal command, ByVal args)\n');
	document.write('	Call menu_DoFSCommand(command, args)\n');
	document.write('End Sub\n');
	document.write('</script\>\n');
}

// Popup Fotos///////////////

function viewimage(imgId) {
	window.open("viewthumb.php?id="+imgId, "imageView", "width=640,height=480,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no,top=200,left=200", true);
}