// We work out whether we are in the frameset or frame context by looking
// for a 'nowritefs' parameter
var str = location.search;
var writeFrames = (str.indexOf("nowritefs")) && (top.window.length == 0);

if (writeFrames)
{
  // We are in the frameset context - write the framset out
  if (str == "")
  {
    var mainFrame = window.location + "?nowritefs";
  }
  else
  {
    var mainFrame = window.location + "&nowritefs";
  }
  document.write(
  '<frameset cols="*,1020,*" frameborder="NO" border="0" framespacing="0" scrolling="no">', 
  	'<frame name="links" scrolling="NO" noresize src="links.htm" frameborder="NO">',
  		'<frameset rows="*,600*" frameborder="NO" border="0" framespacing="0" scrolling="no">',
    		'<frame name="boven" src="boven.htm" scrolling="NO" noresize frameborder="NO" framespacing="0">',
			'<frameset cols="200,820" frameborder="NO" border="0" framespacing="0" scrolling="no">',
	 			'<frame name="navframe" src="navigatie-home.htm" frameborder="NO" border="0" framespacing="0" scrolling="no">', 
	  			'<frame name="mainFrame" src="' + mainFrame + '" frameborder="NO" border="0" framespacing="0" scrolling="auto">',
	 		'</frameset>',
  		'</frameset>',
	'<frame name="rechts" src="rechts.htm" scrolling="NO" noresize frameborder="NO">',
  '</frameset>');
}
