

<!-- check for query first -->
// ---------------------------------------------------------------------------------------------------------------------
var query = (location.href.indexOf("?")+1);
if (query){
	queryString = location.href.substring(query);
}



<!--VARS -->
// ---------------------------------------------------------------------------------------------------------------------
	var targetSwfID = "mySWFid"; 
	var urlPlugin	= "http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"

	s  = "Om onze site te bekijken, "
	s += "<a href=" + urlPlugin + " target='_blank'>"
	s += "moet u de flashplugin downloaden"
	s += "</a>"
	s += ", dit duurt (afhankelijk van uw internetverbinding) ongeveer 1-2 minuten."

	var msgNoFlash	= s; 


<!--DETECT FLASHPLAYER -->

	var modeNeeded	= 0;
	var modeWanted	= 0;


    if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] 
    && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) 
    { 
		if (navigator.plugins && navigator.plugins["Shockwave Flash"] 
		&& (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1) 
		{
			var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-1, versionIndex);
			versionIndex = parseInt( versionString );
			if ( versionIndex >= versionNeeded ) { modeNeeded = 1;}
		}
    }
    else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	&& (navigator.userAgent.indexOf("Windows 95")>=0 
	|| navigator.userAgent.indexOf("Windows 98")>=0 
	|| navigator.userAgent.indexOf("Windows NT")>=0 
    )) {

		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
		document.write('on error resume next \n');
		document.write('modeNeeded	= (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + versionNeeded + '"))) \n');
		document.write('modeWanted	= (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + versionWanted + '"))) \n');
		document.write('</SCRIPT\> \n');
		document.write('<BODY bgcolor="'+ myBgColor + '">');
		document.write('</BODY>');	
    }

    //if ( !modeNeeded ) { writeMsg() } else { writeFlashObject(); }

// ---------------------------------------------------------------------------------------------------------------------
function writeMsg(){

	document.write('<BODY bgcolor="'+ myBgColor + '">');
	document.write('<TABLE width="300" align="center" height="100%"><tr><td valign="middle">');
	document.write(msgNoFlash);
	document.write('</td></tr></TABLE>');
	document.write('</BODY>');
}


<!--EMBED FLASH CONTENT --> 
// ---------------------------------------------------------------------------------------------------------------------
function writeFlashObject(){

	var mySource	= modeWanted == 1 ? srcWhenAsWanted : srcWhenAsNeeded
	var myScale		= "noscale"
	var myQuality	= "high"
	var myMenu		= "false"
	var myPlay		= "false"
	var myLoop		= "false"
	var myWmode		= "transparent"
	var myConnect	= "true"
	var winSize		= getWinSizeXY(false)
	var aWidth		= winSize[0]
	var aHeight		= winSize[1]
	var myQuery		= "?sizeChanged=" + 1
		myQuery		+= "&browsInWidth=" + aWidth
		myQuery		+= "&browsInHeight=" + aHeight


		//object
		document.write('<object ');
		document.write('classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"');
		document.write('id="'		+ 'mySWFid' + '"');
		document.write('width="'	+ myWidth	+ '"');
		document.write('height="'	+ myHeight	+ '">');

		document.write('<param name="MOVIE" value="'	+ mySource	+ myQuery + '">');
		document.write('<param name="BGCOLOR" value="'	+ myBgColor + '">');
		document.write('<param name="SCALE" value="'	+ myScale	+ '">');
		document.write('<param name="QUALITY" value="'	+ myQuality + '">');
		document.write('<param name="MENU" value="'		+ myMenu	+ '">');	
		document.write('<param name="PLAY" value="'		+ myPlay	+ '">');
		document.write('<param name="LOOP" value="'		+ myLoop	+ '">');
		document.write('<param name="SALIGN" value="'	+ myAlign	+ '">');

			//embed
			document.write('<embed ');
			document.write('pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"');
			document.write('type="application/x-shockwave-flash"');
			document.write('src="'			+ mySource	+ myQuery + '">');
			document.write('width="'		+ myWidth	+ '"');
			document.write('height="'		+ myHeight	+ '"');
			document.write('bgcolor="'		+ myBgColor + '"');
			document.write('scale="'		+ myScale	+ '"');
			document.write('quality="'		+ myQuality + '"');
			document.write('menu="'			+ myMenu	+ '"');
			document.write('play="'			+ myPlay	+ '"');
			document.write('loop="'			+ myLoop	+ '"');
			document.write('salign="'		+ myAlign	+ '"');
			document.write('wmode="'		+ myWmode	+ '"');
			document.write('swliveconnect="'+ myConnect + '"');
			document.write('</embed>');

		document.write('</object>');
	//document.write('</td></tr></table>');
}


<!--CUCTOMIZE FScommand FROM FLASH --> 
// ---------------------------------------------------------------------------------------------------------------------
	document.write(''
	+'\<SCRIPT LANGUAGE="VBScript"\>'
	+''
	+'	Sub ' + targetSwfID + '_FSCommand(ByVal command, ByVal args)'
	+'		call cookie_DoFSCommand(command, args)'
	+'	end sub'
	+''
	+'\</SCRIPT\>'
	+'');


<!--INIT BROWSER --> 
// ---------------------------------------------------------------------------------------------------------------------
function killScrollers(){

	var minX			=  770;
	var minY			=  550;
	
	var scrollNeeded	= 0
	var myBrowsWidth	= document.body.clientWidth;	var userMonitorWidth  = screen.availWidth; 
	var myBrowsHeigth	= document.body.clientHeight;	var userMonitorHeight = screen.availHeight;

	myBrowsWidth  < minX ? scrollNeeded = 1 : null;
	myBrowsHeigth < minY ? scrollNeeded = 1 : null;

	scrollNeeded == 0 ? document.body.scroll = 'no' : document.body.scroll = 'auto';
}



// ---------------------------------------------------------------------------------------------------------------------
function getWinSizeXY(returnToFlash) {


  var myWidth = 0, myHeight = 0;
  var winSize = new Array();

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      myWidth = document.documentElement.clientWidth;
      myHeight = document.documentElement.clientHeight;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }
    }
  }

  if (returnToFlash != false){
	window.document[targetSwfID].SetVariable("sizeChanged",1);
	window.document[targetSwfID].SetVariable("browsInHeight",myHeight);
	window.document[targetSwfID].SetVariable("browsInWidth",myWidth);
  }

  winSize[0] = myWidth
  winSize[1] = myHeight
  return winSize
}


<!--COOKIES -->
//---------------------------------------------------------------------------------------------------------------------
function cookie_DoFSCommand(command, args){

	var DataArray = escape(args).split("%2C")

	//---------------------------------------
	if ( command == "SET" ){

		var expdate = new Date ();
		var expIndex = DataArray.length - 1

		expdate.setTime (expdate.getTime() + (DataArray[expIndex] * 24 * 60 * 60 * 1000))

		var numCookies = expIndex/2
		for (var i=0; i<numCookies; i++){
			document.cookie = DataArray[i] + "=" + DataArray[i+numCookies] + ((expdate) ? "; expires=" + expdate.toGMTString() : "")
		}
		window.document[targetSwfID].SetVariable("processed",1);
	}

	//---------------------------------------
	if ( command == "GET" ){
		GetCookie (DataArray[0],DataArray[1]);
	}

	//---------------------------------------
	if ( command == "DEL" ){

		var numCookies = DataArray.length
		for (var i=0; i<numCookies; i++){
			document.cookie = DataArray[i] + "=; expires=Thu, 01-Jan-70 00:00:01 GMT";
		}
		window.document[targetSwfID].SetVariable("processed",1);
	}
}

function GetCookie(CookieName,FlashVariableName){

	CookieValue = document.cookie;
	CookieName += "=";

	// Finds the location of the value of the cookie specified in CookieName
	startString = CookieValue.indexOf(CookieName);

	if (startString != -1){

		startString += CookieName.length;
		endString = CookieValue.indexOf(";", startString);

		endString == -1 ? endString = CookieValue.length : null ;

		// Retrieves the cookie value
		cookieResult=unescape(CookieValue.substring(startString,endString));
		// Sends the cookie value back to Flash
		window.document[targetSwfID].SetVariable("documentCookie",CookieValue);
		window.document[targetSwfID].SetVariable(FlashVariableName,cookieResult);
		window.document[targetSwfID].SetVariable("processed",1);

	} else {

		// If no value is is set (Internet Explorer) sends back the string 'undefined'
		window.document[targetSwfID].SetVariable(FlashVariableName,"undefined");
		window.document[targetSwfID].SetVariable("processed",1);
	}
}
