function changeBackGround_start(obj,bgImage){
//bij laden wordt de hoofdvisual als background image van de tabel veranderd
//de naamgeving van het relevante pad en het plaatje dienen gelijk te zijn
   	if (document.getElementById) {
		document.getElementById(obj).style.backgroundImage ='url('+bgImage+')';
	}
}

function changeBackGround(obj,bgImage){
//bij laden wordt de hoofdvisual als background image van de tabel veranderd
//de naamgeving van het relevante pad en het plaatje dienen gelijk te zijn
   	if (document.getElementById) {
		document.getElementById(obj).style.backgroundImage ='url('+bgImage+')';
	}
	hoogteDiv('td_content');
}

function hoogteDiv(obj_div){
//hoogte bepalen van de td met alle content en linkermenu
//de hoogte wordt volledig opgevuld, om het linkermenu en het midden content gedeelte
//van een grijze haarlijn te voorzien.
	var breedte_scherm = body.clientWidth
	var hoogte_scherm = body.clientHeight
	var hoogte_top = 98;
	var hoogte_content_div = document.getElementById('content').style.height
	
	var hoogte_content = document.getElementById('td_content').style.height;
	var hoogte_linkermenu = document.getElementById('linkernavigatie').clientHeight
	var hoogte_footer = document.getElementById('footer_content').clientHeight

	var hoogte_div = hoogte_scherm - (hoogte_top + 10);
	var hoogte_linker = hoogte_scherm - (hoogte_top + hoogte_footer + hoogte_linkermenu);

	document.getElementById('content').style.width = breedte_scherm - 20;
	document.getElementById('td_content').style.height = hoogte_div;
	//document.getElementById('menu_rest').style.height = hoogte_linker;
}

function hoogteEigenTijd(obj_div){
	var hoogte_scherm = body.clientHeight
	var hoogte_top = 98;
	var hoogte_footer = document.getElementById('footer_content').clientHeight
	var hoogte_div = hoogte_scherm - (hoogte_footer + hoogte_top)-30;
	document.getElementById('menu_hoogte').style.height = hoogte_div;
}

//begin script mouseovertekst in de topnavigatie
iens6=document.all||document.getElementById;
var tekstArray = new Array
tekstArray[1]="U gaat naar Particulieren voor:inzicht in uw pensioen, het zelf regelen van meer pensioen, gebeurtenissen die van invloed zijn op uw pensioen, het doorgeven van wijzigingen in uw situatie en Eigentijd.";
tekstArray[2]="U gaat naar Werkgevers voor: uitleg over pensioenproducten, ondersteuning bij uw pensioenadministratie, extra diensten en producten, Onlinedesk en contact met de Werkgeversdesk.";
tekstArray[3]="U gaat naar Over Ons voor meer informatie over: pers- en nieuwsberichten;cijfers;standpunten;<br/>corporate informatie;het beleggingsbeleid.";
//tekstArray[4]="Go to About PGGM for: corporate information; figures; press releases and news items, investment policy.";

var naamDiv
var welkObject
var kopij
var kopijBreedte
var kopijPositie
var kopijHoogte
var x=0
var y=0
var offsetx = 15
var offsety = 10
document.onmousemove=getXY
function MouseoverTekst(value) {
	text="<table width='"+(kopijBreedte-4)+"' height='"+(kopijHoogte - 4)+"' border='0'  cellspacing='0' cellpadding=0>"
	text+="<tr><td class='top_mouseover'  style='background-color:#FFFBE5;' width='"+(kopijBreedte-4)+"'>"+tekstArray[value]+"</td></tr></table>"
return text
}
function setObjecten(textelement,breedte,hoogte,positie) {
	kopijPositie=positie
	kopijBreedte=breedte + 5
	kopijHoogte=hoogte + 25

	kopij=MouseoverTekst(textelement)
	if (kopijPositie == "rechtsonder") { 
		x=x+offsetx
		y=y+offsety
	}
	if (kopijPositie == "linksonder") {
		x=x-(offsetx+2)-kopijBreedte
		y=y-offsety
	}
	if (kopijPositie == "rechtsboven") { 
		x=x+offsetx
		y=y+offsety-kopijHoogte
	}
	if (kopijPositie == "linksboven") {
		x=x-(offsetx+2)-kopijBreedte
		y=y+offsety-kopijHoogte
	}
	if(iens6){
		naamDiv = "mouseovertekst"
		welkObject=document.getElementById? document.getElementById(naamDiv):document.all.naamDiv
		welkObject.style.width=kopijBreedte
		welkObject.style.height=kopijHoogte
		welkObject.style.left=x
		welkObject.style.top=y
			if(iens6&&document.all) {
				welkObject.innerHTML = ""
				welkObject.insertAdjacentHTML("BeforeEnd","<table cellspacing=0 width="+kopijBreedte+" height="+kopijHoogte+" border=0><tr><td width=100% valign=top>"+kopij+"</td></tr></table>")
			}
			if(iens6&&!document.all) {
				welkObject.innerHTML = ""
				welkObject.innerHTML="<table cellspacing=0 width="+kopijBreedte+" height="+kopijHoogte+" border=0><tr><td width=100% valign=top>"+kopij+"</td></tr></table>"
			}
	}
	toonKopij()
}
function toonKopij() {
	if(iens6) {
		welkObject.style.visibility="visible"
	}
}
function verbergKopij() {
	if(iens6) {
		welkObject.innerHTML = ""
		welkObject.style.visibility="hidden"
	}
}
function getXY(e) {
	if (iens6&&document.all) {
		x=0
		y=0
		x=event.x; 
		y=event.y;
	}
	if (iens6&&!document.all) {
		x=0
		y=0
		x=e.pageX; 
		y=e.pageY;
	}
}
//einde script  mouseovertekst in de topnavigatie

function Zoeken(){
	if (document.frmZoeken.Searchstring.value != ""){
		document.frmZoeken.submit();
	}
}

//DirectNaar
menuStyle = "flat" 
cellPadding = 2    
cellBorder = 1     
verticalOffset = 0 
horizontalOffset = 0
subMenuDelay = 1    
subIndicate = 1     
indicator = "<img src='/html/images/pijl_direct_naar.gif' border='0' margin='0'>" 
                                                   
// Menu opties
borderColor = "#3A3D8E"  
menuBackground = "white" 
menuHoverBackground = "white" 
fontFace = "verdana" 
fontColour = "white" 
fontHoverColour = "#019F54" 
fontSize = "10px" 
fontDecoration = "none" 
fontWeight = "normal"

// Sub Menu opties
sborderColor = "white"  
smenuBackground = "white"
smenuHoverBackground = "white"
sfontFace = "verdana" 
sfontColour = "#3A3D8E" 
sfontHoverColour = "#019F54"
sfontSize = "10px"
sfontDecoration = "none"
sfontWeight = "normal" 
sShadow = 0
quantity = 1

var isIE = (document.getElementById && document.all)?true:false;
var isNS4 = (document.layers)?true:false;
var isNS6 = (document.getElementById && !document.all)?true:false;

var timer;
var objDirectNaar = (isIE)?"document.all":"document.getElementById"
styleBorder=(menuStyle.toLowerCase() == "flat")?cellBorder:0 

// style
document.writeln ('<style>');
document.writeln ('.rcMenuStatic {background-color:'+menuBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');
document.writeln ('.rcMenuHover  {background-color:'+menuHoverBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');
document.writeln ('.rcSubMenuStatic {font-family:'+sfontFace+';font-size:'+sfontSize+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuBackground+'; cursor:hand}');
document.writeln ('.rcSubMenuHover  {font-family:'+sfontFace+';font-size:'+sfontSize+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuHoverBackground+'; cursor:hand}');
document.writeln ('</style>');

// menu opties
function showMenus(quant,definedOrientation){
  if(definedOrientation!=""){orientation=definedOrientation}
  if (orientation.toLowerCase() == "vertical"){document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor+'">')}
  else{document.writeln ('<table border="0" cellpadding="0" cellspacing="0"><tr height=17>')}  
  for (x=0; x<eval("Menu"+quant).length; x++)
  {
    if (orientation.toLowerCase()=="vertical") document.writeln('<tr>')
    document.writeln ('<td onclick="Selecteer(\''+quant+'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown(\''+quant+'\','+x+', \''+quant+'button'+x+'\',\''+orientation+'\'); " onMouseOut="clearMenu('+quant+','+x+')" ')
    if (menuStyle.toLowerCase() == "3d"){document.writeln ('style="border:0px solid '+borderShadow+';"');}        
    document.writeln ('><div style="border:1px solid #3A3D8E;width:165;" id="'+quant+'button'+x+'"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td style="color:#3A3D8E;vertical-align:middle;height:17;width:163;background-color:white;" id="'+quant+'cell'+x+'" nowrap>');
    document.writeln ('&nbsp;- Maak uw keuze -<a id="'+quant+'mainLink'+x+'" href="#"></a></td>');
    if (subIndicate == 1&&eval("subMenu"+quant)[x].length>=1){
      document.writeln('<td class="rcMenuStatic" id="'+quant+'cell'+x+'a" align="right">');
      document.writeln ('<a id="'+quant+'mainLink'+x+'a" href="'+eval("Menu"+quant)[x][1]+'" target="'+eval("Menu"+quant)[x][2]+'" class="rcMenuStatic">'+indicator+'</a></td>');}
    document.writeln ('</tr></table></div></td>');    
    if (orientation.toLowerCase()=="vertical") document.writeln('</tr>')
  }
  if (orientation.toLowerCase() == "vertical"){document.writeln ('</table>');}
  else{document.writeln ('</tr></table>');}   
// sub menu items opbouwen
  for (x=0; x<eval("Menu"+quant).length; x++) { 
    if (eval("subMenu"+quant)[x].length > 0) {     
      document.writeln ('<div id="'+quant+'MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2;border:1px solid #3A3D8E;padding:3px;background-color:white" >');
      document.writeln ('<table style="width:175px"  border="0" cellpadding="'+cellPadding+'" cellspacing="'+styleBorder+'" bgColor="'+sborderColor+'">');
      for (y=0; y<eval("subMenu"+quant)[x].length; y++)
      {
        document.writeln ('<tr><td id="'+quant+'subMenu'+x+y+'" class="rcSubMenuStatic" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+',\'\','+quant+')" onMouseOut="clearMenu('+quant+','+x+');" onclick="Selecteer(\''+quant+'subLink'+x+y+'\')" nowrap')
        if (menuStyle.toLowerCase() == "3d"){document.writeln ('style="border-right:'+cellBorder+'px solid '+sborderShadow+';"');}
        document.writeln ('><a id="'+quant+'subLink'+x+y+'" href="'+eval("subMenu"+quant)[x][y][1]+'" target="'+eval("subMenu"+quant)[x][y][2]+'" class="rcSubMenuStatic">'+eval("subMenu"+quant)[x][y][0]+'</a></td></tr>');
      }
      document.writeln ('</table></div>');
    }
  }
} 

// kleurverandering hover
function highlightMenu(element,mainMenu,dropMenu,state,quant){
  hoverMenu();
  state=(state == "hover")?"rcMenuHover":"rcMenuStatic"
  if (element == "sub") {
    for (x=0; x < eval("subMenu"+quant)[mainMenu].length; x++) {
      eval(objDirectNaar+'("'+quant+'subMenu'+mainMenu+x+'").className = "rcSubMenuStatic"')
      eval(objDirectNaar+'("'+quant+'subLink'+mainMenu+x+'").className = "rcSubMenuStatic"')
    }   
    eval(objDirectNaar+'("'+quant+'subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
    eval(objDirectNaar+'("'+quant+'subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover"')
  }
  else
  {
    eval(objDirectNaar+'("'+quant+'cell'+mainMenu+'").className = "'+state+'"')
    eval(objDirectNaar+'("'+quant+'mainLink'+mainMenu+'").className = "'+state+'"')
    if (subIndicate == 1&&eval("subMenu"+quant)[mainMenu].length>=1)
    {
      eval(objDirectNaar+'("'+quant+'cell'+mainMenu+'a").className = "'+state+'"')
      eval(objDirectNaar+'("'+quant+'mainLink'+mainMenu+'a").className = "'+state+'"')
    }
  }
}
// positie sub menu items
function getOffset(objDirectNaar, dim) {
  if(dim=="left")  {     
    oLeft = objDirectNaar.offsetLeft;    
    while(objDirectNaar.offsetParent!=null) 
    {    
      oParent = objDirectNaar.offsetParent     
      oLeft += oParent.offsetLeft 
      objDirectNaar = oParent 	
    }
    return oLeft
  }
  else if(dim=="top")
  {
    oTop = objDirectNaar.offsetTop;
    while(objDirectNaar.offsetParent!=null) 
    {
      oParent = objDirectNaar.offsetParent
      oTop += oParent.offsetTop
      objDirectNaar = oParent 	
    }
    return oTop
  }
  else if(dim=="width")
  {
    oWidth = objDirectNaar.offsetWidth
    return oWidth
  }  
  else if(dim=="height")
  {
    oHeight = objDirectNaar.offsetHeight
    return oHeight
  }    
  else
  {
    alert("Error: invalid offset dimension '" + dim + "' in getOffset()")
    return false;
  }
}

// toon de sub menu items
function popDown(quant, param, id, orientation){
  var cellBorderOffset = (isNS6)?cellBorder:eval(cellBorder*2)
  var browserAdjustment = (isNS6)?cellBorder:0
  var menu;
  var button;

  if (id) {    
    getOffset(eval(objDirectNaar+'(id)'),'left');
    getOffset(eval(objDirectNaar+'(id)'),'top');    
    getOffset(eval(objDirectNaar+'(id)'),'width');  
    getOffset(eval(objDirectNaar+'(id)'),'height');
    
    if (eval("Menu"+quant+"["+param+"][3]")=="right"){ 
      oLeft=oLeft  
      oLeft=oLeft+oWidth; 
      getOffset(eval(objDirectNaar+'("'+quant+'MENU'+param+'")'),'width');
      oLeft=oLeft-oWidth ;
      alignAdjustment = cellBorder*2 + 1
    }
    else 
    {
      alignAdjustment = 0
      oLeft=oLeft
    }    
  }  
 
  n = 0;    
  while (n < eval("Menu"+quant).length)
  {          
    menu = quant+"MENU"+n
    if (param == n){
      theObj = eval(objDirectNaar+'(menu)');
      if (theObj)
      {
         theObj.style.visibility = "visible"

          if (orientation.toLowerCase()=="vertical"){
            theObj.style.left=(menuStyle.toLowerCase()=="flat")?oLeft+oWidth+cellBorder+horizontalOffset:oLeft+oWidth+cellBorderOffset+horizontalOffset;
            theObj.style.top=(menuStyle.toLowerCase()=="flat")?oTop-cellBorder+verticalOffset:oTop+verticalOffset-browserAdjustment}
          else{
            theObj.style.left=(menuStyle.toLowerCase()=="flat")?oLeft-cellBorder+horizontalOffset+alignAdjustment:oLeft+horizontalOffset-browserAdjustment+alignAdjustment;
            theObj.style.top=(menuStyle.toLowerCase()=="flat")?oTop+oHeight+cellBorder+verticalOffset:oTop+oHeight+cellBorderOffset+verticalOffset;}
        }
      
       highlightMenu('main',n,'','hover',quant)
       if (eval("subMenu"+quant)[param].length > 0){
         for (x=0; x<eval("subMenu"+quant)[param].length; x++)
         {
           eval (objDirectNaar+'("'+quant+'subMenu'+param+x+'").className = "rcSubMenuStatic"')
           eval (objDirectNaar+'("'+quant+'subLink'+param+x+'").className = "rcSubMenuStatic"')         
         }
       }
    }
    else 
    {  
      for (x=1; x<quantity+1; x++){       
        menu = x+"MENU"+n   
           
        if (eval(objDirectNaar+'(menu)')){
          eval(objDirectNaar+'(menu).style.visibility = "hidden"')            
        }
        highlightMenu ('main',n,'','static',quant)
      }
    }
    n++
  }  
}

function hoverMenu(){
  if(timer)
   clearTimeout(timer)
}

function clearMenu(quant,menu){
  setDelay = subMenuDelay*1000
  delay = (eval("subMenu"+quant)[menu].length > 0)?setDelay:1
  timer = setTimeout("popDown("+quant+","+(eval("Menu"+quant).length + 1)+")",delay)
}

function Selecteer(theElement){
  eval(objDirectNaar+'(theElement).click()')
}

function openSnelrekenaar(pagina)
{ 
	snelrekenaar=window.open(pagina,"", "top=250, left=187 ,width=675, height=" + (screen.AvailHeight - 300)+ ",toolbar=no,scrollbars=yes,resizable=no,status=no"); 
	snelrekenaar.focus();
} 

// Scroll mogelijk
function openAWindowWithScroll( pageToLoad, winName, width, height, center)
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center))
	{
	xposition = (screen.width - width) / 2;
	yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + ","
    + "height=" + height + ","
    + "location=0,"
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=1,"
    + "status=0,"
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only
    my_window = window.open( pageToLoad,winName,args );
}

function openAWindow( pageToLoad, winName, width, height, center)
{
    xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 4 ) && (center))
	{
	xposition = (screen.width - width) / 2;
	yposition = (screen.height - height) / 2;
    }
    args = "width=" + width + ","
    + "height=" + height + ","
    + "location=0,"
    + "menubar=0,"
    + "resizable=0,"
    + "scrollbars=0,"
    + "status=0,"
    + "titlebar=0,"
    + "toolbar=0,"
    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only
    my_window = window.open( pageToLoad,winName,args );
}

function popUp(pagina,positie,breedte,hoogte,automatisch){
var boven;
var links;
var hoogteScherm;
var breedteScherm;

if (automatisch > 0 ){
	breedteScherm = screen.AvailWidth / automatisch;
	hoogteScherm = screen.AvailHeight / automatisch
}else{
	hoogteScherm = hoogte;
	breedteScherm = breedte;
}
	if (positie ==1){ // linksboven
		boven = 0;
		links = 0;
	}	
	if (positie == 2){ //rechtsboven
		boven = 0;
		links = (screen.AvailWidth - breedteScherm - 5); // 5 is de padding
	}
	if (positie == 3){ // linksonder
		boven = (screen.AvailHeight - hoogteScherm - 5); // 5 is de padding;
		links = 0;
	}
	if (positie == 4){ // linksonder
		boven = (screen.AvailHeight - hoogteScherm - 5); // 5 is de padding;
		links = (screen.AvailWidth - breedteScherm - 5); // 5 is de padding
	}
nieuwScherm=window.open(pagina,"", "top="+ boven +"px, left="+ links +"px, width="+ (breedteScherm) +", height="+ (hoogteScherm)+",toolbar=no,scrollbars=yes,resizable=no,status=no"); 
nieuwScherm.focus();
}


function openVensterEnquete(){
	enquete=window.open('/asp/readSpeaker/enquete.asp',"", "top=304, left=287, width=400, height=250, toolbar=no, scrollbars=yes, resizable=no, status=no"); 
	enquete.focus();
}

function plaatjesWisselaar(welke,nieuwPlaatje){
	document.getElementById(welke).src = "/html/images/readSpeaker/"+nieuwPlaatje;
}


function plaatsCookie(naam, waarde, verloopt) {
	document.cookie = naam + "=" + escape(waarde) + ((verloopt == null) ? "" : ("; expires=" + verloopt.toGMTString())) + ";path=/";
}

function haalCookie(Naam) {
	var zoek = Naam + "=";
	if (document.cookie.length > 0)
	{ // if there are any cookies
		plaats = document.cookie.indexOf(zoek);
		if (plaats != -1)
		{ // if cookie exists 
		    plaats += zoek.length;
			// set index of beginning of value
			einde = document.cookie.indexOf(";", plaats);
			// set index of end of cookie value
			if (einde == -1){
				einde = document.cookie.length;
			}
			return unescape(document.cookie.substring(plaats, einde));
		} 
	}
}

function controleCookie(te_controleren_cookie) {
	var blnBestaat = false;
	var exp = new Date();
	exp.setTime(exp.getTime() + (1000 * 60 * 60 * 24 * 1));
	document.cookie = te_controleren_cookie + "=" + escape("none") + "; expires=" + exp.toGMTString() +  "; path=/";
	var cookie_naam = te_controleren_cookie + "=";
	var doc = document.cookie;
	if (doc.length > 0){
		begin_cookie = doc.indexOf(cookie_naam);
		if (begin_cookie != -1){
			blnBestaat = true;
			document.cookie = te_controleren_cookie + "=; expires=Thu, 01-Jan-70 00:00:01 GMT" +  "; path=/";
		}
		else
		{
			blnBestaat = false;
		}
	}
	else
	{
		blnBestaat = false;
	}
	return blnBestaat;
}

function openEnquete() {
	if (controleCookie("readspeaker")) {
		var welke_cookie = haalCookie("cookie_voor_enquete_readspeaker");
		if (welke_cookie == null) {
			welke_cookie = 1;
				var huidige_datum = new Date();
				var toekomstige_datum = new Date();
				toekomstige_datum.setTime(huidige_datum.getTime() + 1000*60*60*24*365);
				plaatsCookie("cookie_voor_enquete_readspeaker", welke_cookie, toekomstige_datum);
				openVensterEnquete()
		}
	}
}



function verbergPopupPensioenplanner(){
	document.getElementById("popup_PP").style.display = "none";
}
function naarPlanner(){
var eersteKeer;
	if (controleCookie("popup_pensioenplanner")) {
		var welke_cookie = haalCookie("cookie_voor_popup_pensioenplanner");
		if (welke_cookie == null) {
			welke_cookie = 1;
			var huidige_datum = new Date();
			var toekomstige_datum = new Date();
			toekomstige_datum.setTime(huidige_datum.getTime() + 1000*60*60*24*365);
			plaatsCookie("cookie_voor_popup_pensioenplanner", welke_cookie, toekomstige_datum);
			eersteKeer = "ja";
			naarPensioenplanner(eersteKeer)

		}
		else
		{
			eersteKeer = "nee";
			naarPensioenplanner(eersteKeer)
		}
	}
	
}

function naarPensioenplanner(eersteKeer){
	if (eersteKeer == "ja"){
		window.open("https://www.uwpggmpensioen.nl");
		document.getElementById("popup_PP").style.display = "none";
	}
	else
	{
		toonPopupPensioenplanner()
	}
}

function toonPopupPensioenplanner(){
	if (controleCookie("popup_pensioenplanner")) {
		var welke_cookie = haalCookie("cookie_voor_popup_pensioenplanner");
		if (welke_cookie == 1){
			document.getElementById("popup_PP").style.display = "none";
		}
		else
		{
		document.getElementById("popup_PP").style.display = "";
		}
	}
}

function toonPlaatjesEigenTijd()
{

	//random tonen van visual boven linkermenu van Eigen Tijd
	_plaatje = new Array();
	_plaatje[0] = "/Html/images/EigenTijd/ET_Coverbeeld_1.jpg";
	_plaatje[1] = "/Html/images/EigenTijd/ET_Coverbeeld_2.jpg";
	_plaatje[2] = "/Html/images/EigenTijd/ET_Coverbeeld_3.jpg";

	var j = 0
	var p = _plaatje.length;

	var preBuffer = new Array()
	for (i = 0; i < p; i++)
	{
   		preBuffer[i] = new Image()
   		preBuffer[i].src = _plaatje[i]
	}

	var welkePlaatje = Math.round(Math.random()*(p-1));
	document.write('<img src="'+_plaatje[welkePlaatje]+'">&nbsp;');
}


/* functions for movie
function show_movie(movie) {
	if(el=document.getElementById('q_videoholder')) {
		switch(movie) {
			case 0:	src = 'http://v3.quadiatv.com/web/pggm/{9EDA66E6-F713-449D-80A0-90889123F40B}'; break;
			case 1:	src = 'http://v3.quadiatv.com/web/pggm/{DAB9AAB3-75D6-455D-B72F-6C23B62F581C}'; break;
			case 2:	src = 'http://v3.quadiatv.com/web/pggm/{3D0F4410-CF7E-4CDE-BEFD-D97F71B8FFAC}'; break;
			case 3:	src = 'http://v3.quadiatv.com/web/pggm/{3AABE40D-50EA-4BDD-9BCA-56917BFFAC23}'; break;
			case 4:	src = 'http://v3.quadiatv.com/web/pggm/{A4066BD2-B92A-414E-9AB6-E4F8E21F6BEF}'; break;
			case 5:	src = 'http://v3.quadiatv.com/web/pggm/{FC4B7663-DC47-429E-8164-D11B42592208}'; break;
		}
		
		output ='<iframe src="'+src+'"  id="q_videoframe" frameborder="0" scrolling="no" allowtransparency="true" width="100%" height="100%" class="q_frame">' +
				'</iframe>' +
				'<div class="q_closeframe">' +
					'<div>' + 
						'<a href="#" onClick="close_movie();return false;" id="q_videoholder_close">X Sluit Venster</a>' +
					'</div>' +
				'</div>';

				
		if (element = document.getElementById("readspeaker")) {
			element.style.display = 'none';
		}
		
		el.innerHTML= output;
		
	} else {
		alert("No video placeholder found.");
	}
}
function close_movie() {
	if(el=document.getElementById('q_videoholder')) {
		el.innerHTML = '';
		if (element = document.getElementById("readspeaker")) {
			element.style.display = 'block';
		}

	} else {
		alert("No video placeholder found.");
	}
}
*/

