function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function createControl( width, height, id, url, bgcolor, play, loop, menu, quality, wmode ) {
  document.writeln("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"");
  document.writeln("  codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"");
  document.writeln("  width=\"" + width + "\""); 
  document.writeln("  height=\"" + height + "\""); 
  document.writeln("  id=\"" +id+ "\" align=\"middle\">");
  document.writeln("  <param name=\"allowScriptAccess\" value=\"sameDomain\" />");
	document.writeln("  <param name=\"movie\" value=\"" + url + "\" />");
	document.writeln("  <param name=\"play\" value=\"" + play + "\" />");
	document.writeln("  <param name=\"loop\" value=\"" + loop + "\" />");
  document.writeln("  <param name=\"menu\" value=\"" + menu + "\" />");
  document.writeln("  <param name=\"quality\" value=\"" + quality + "\" />");
  document.writeln("  <param name=\"wmode\" value=\"" + wmode + "\" />  ");
  document.writeln("  <param name=\"bgcolor\" value=\"" + bgcolor + "\" />");
	document.writeln("  <embed src=\"" + url + "\" quality=\"" + quality + "\" bgcolor=\"" + bgcolor + "\" wmode=\"" + wmode + "\" width=\"" + width + "\" height=\"" + height + "\" name=\"" + id + "\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
	document.writeln("</object>");
}

function InArray(arr, key) {
 	for ( var i=0; i < arr.length; i++ ) {
 		if ( arr[i] == key ) {
 			return true;
    }
 	}
 	return false;
}

function selectImage() {
  <!--
  //This is the script to take querystrings from the URL and convert them into
  //a Javascript array. "?search=whatever" becomes querystring["search"] 
  
  //this loads the portion of the url containing the querystring, and also
  //decodes any special character codes  
  var que = unescape(location.search);
  
  //remove the ? from the beginning of the string
  var que = que.substring(1, que.length);
  
  //detects multiple values and splits them into an array que[0], que[1] etc...
  var que = que.split("&");
  
  // creates the querystring array
  var queryString = new Array();
  
  //(for some strange reason the "for/next" loop wasn't working)
  var loop = 0;
  
  //This loop takes each value in the que array then seperates the "names" 
  //from the "values" by splitting it into "inter" arrays. the name becomes
  // "inter3" and the value becomes "inter2". querystring then loads the "inter2" 
  //value into a slot called "inter3"
  while ( loop < que.length ) {
   var inter = que[loop].split( "=" );
   var inter2 = inter[1];
   var inter3 = inter[0]
   que[loop] = inter2;
   queryString[inter3] = inter2
   loop = loop + 1;
  };
  //(C) Samuel Loy
  
  var imageUrl = '';
  var imagePath = 'fileadmin/templates/drienerburght/main/images/content/';
  
  var pageIds = new Array();
  pageIds[1] = new Array( 3, 3, 77);
  pageIds[2] = new Array( 46, 46 );
  pageIds[3] = new Array( 47, 47, 74 );
  pageIds[4] = new Array( 48, 48 );
  pageIds[5] = new Array( 4, 4 );
  pageIds[6] = new Array( 50, 50 );
  pageIds[7] = new Array( 51, 51 );
  pageIds[8] = new Array( 52, 52 );
  pageIds[9] = new Array( 5, 5, 71 );
  pageIds[10] = new Array( 13, 13, 72 );
  pageIds[11] = new Array( 14, 14, 73 );
  pageIds[12] = new Array( 6, 6, 55 );
  pageIds[13] = new Array( 54, 54 );
  pageIds[14] = new Array( 9, 9 );
  pageIds[15] = new Array( 8, 8, 68, 78, 79 );
  pageIds[16] = new Array( 94, 94, 95 );
  pageIds[17] = new Array( 57, 57, 69, 109 );
  pageIds[18] = new Array( 58, 58, 70 );
  pageIds[19] = new Array( 10, 10, 15, 75, 64, 65, 76 );
  pageIds[20] = new Array( 16, 16, 56, 66, 67 );
  pageIds[21] = new Array( 53, 53 );
  
  if ( InArray( pageIds[1], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_over_ons.jpg)';
  }
  else if ( InArray( pageIds[2], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_geschiedenis.jpg)';
  }
  else if ( InArray( pageIds[3], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_locatie_omgeving.jpg)';
  }
  else if ( InArray( pageIds[4], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_medewerkers.jpg)';
  }
  else if ( InArray( pageIds[5], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_hotel.jpg)';
  }
  else if ( InArray( pageIds[6], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_hotelkamer.jpg)';
  }
  else if ( InArray( pageIds[7], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_lunch_diner.jpg)';
  }
  else if ( InArray( pageIds[8], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_aperitief_receptie.jpg)';
  }
  else if ( InArray( pageIds[9], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_conferenties.jpg)';
  }
  else if ( InArray( pageIds[10], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_zaalopstelling.jpg)';
  }
  else if ( InArray( pageIds[11], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_verhuur_apparatuur.jpg)';
  }
  else if ( InArray( pageIds[12], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_arrangementen.jpg)';
  }
  else if ( InArray( pageIds[13], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_sport.jpg)';
  }
  else if ( InArray( pageIds[14], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_samenwerking.jpg)';
  }
  else if ( InArray( pageIds[15], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_reserveren.jpg)';
  }
  else if ( InArray( pageIds[16], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_tarieven.jpg)';
  }
  else if ( InArray( pageIds[17], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_kamer_reserveren.jpg)';
  }
  else if ( InArray( pageIds[18], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_zaal_reserveren.jpg)';
  }
  else if ( InArray( pageIds[19], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_contact.jpg)';
  }
  else if ( InArray( pageIds[20], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_route.jpg)';
  }
  else if ( InArray( pageIds[21], queryString["id"] ) ) {
    imageUrl = 'url(' + imagePath + 'content_header_photo_kunst_cultuur.jpg)';
  }
  else {
    imageUrl = 'url(' + imagePath + 'content_header_photo_over_ons.jpg)';
  }
  
  if ( document.getElementById("content_header") ) {
    document.getElementById("content_header").style.backgroundImage = imageUrl;
  }
  // --!>
}