function display(){

  // embed titel
  if (document.getElementById('titel')){
    heading  = document.getElementById('titel');
    titeltag = heading.innerHTML;
    html = EmbedFlash('flash/titel.swf', 'titel', 'kleur=' + titelkleur + '&titel=' + titeltag, 600, 36);
    heading.innerHTML = html;


    // embed menu
    flashvars  = 'pagina=' + document.getElementById('pagina').innerHTML + '&';
    flashvars += 'taal=' + document.getElementById('taal').innerHTML;
    if (document.getElementById('menukleur')){
    	flashvars += '&menukleur=' + document.getElementById('menukleur').innerHTML;
    }
    html = EmbedFlash('flash/menu.swf', 'menu', flashvars, 744, 40);
    document.getElementById("menu").innerHTML = html;
  }
}


function EmbedFlash(movie, id, flashvars, width, height){

  html  = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
  html += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"';
  html += 'id="' + id + '" width="' + width + '" height="' + height + '">';
  html += '<param name="movie" value="' + movie + '">';
  html += '<param name="bgcolor" value="#FFFFFF">';
  html += '<param name="quality" value="high">';
  html += '<param name="loop" value="false">';
  html += '<param name="flashvars" value="'+ flashvars + '"';
  html += '<param name="menu" value="false">';
  html += '<param name="wmode" value="transparent">';
  html += '<param name="allowscriptaccess" value="samedomain">';
  if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) {
    html += '<embed name="' + id + '" src="' + movie + '"';
    html += 'quality="high" bgcolor="#FFFFFF" menu="false" swLiveConnect="true" allowScriptAccess="sameDomain"';
    html += 'width="' + width + '" height="' + height + '" wmode="transparent"';
    html += 'type="application/x-shockwave-flash"';
    html += 'flashvars="' + flashvars + '"';
    html += 'pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
  }
  html += '</object>';
  return html;
}

function createRichText(naam, flashvars, width, height){
  writeln(EmbedFlash('flash/texteditor.swf', 'naam', 'width=' + width + '&' + 'height=' + height + '&' + flashvars, width, height));
}


function getRichText(id){
  var movie = eval('window.document.flash_' + id);
  if (movie.PercentLoaded() == 100) {
    alert(movie.GetVariable('textcontent'));
    document.getElementById(id).value = movie.GetVariable('textcontent');
  } else {
    alert('flash_' + id + ' is niet volledig geladen');
  }

}

function writeFlash(contents){
	document.writeln(contents);
}


window.onload = display;

p = escape(document.location.href);
rfr = escape(document.referrer);
if (rfr == "undefined"){ rfr = "";}
sx = screen.width;
sy = screen.height;
sc = (navigator.appName.indexOf("Microsoft") > -1) ? screen.colorDepth : screen.pixelDepth;
src = 'stats.php?p=' + p + '&rfr=' + rfr + '&sx=' + sx + '&sy=' + sy + '&sc=' + sc;
src = '<img src="' + src + '" width="1" height="1" border="0" alt="stats" />';
document.write(src);


