<!--
// Global variables
var isCSS, isW3C, isIE4, isNN4, isIE6CSS;
var tTimeout 

// initialize upon load to let all browsers establish content objects
function initDHTMLAPI( ) {
    if (document.images) {
        isCSS = (document.body && document.body.style) ? true : false;
        isW3C = (isCSS && document.getElementById) ? true : false;
        isIE4 = (isCSS && document.all) ? true : false;
        isNN4 = (document.layers) ? true : false;
        isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
    }
}

// Convert object name string or object reference
// into a valid element object reference
function getRawObject(obj)
{
	var theObj;

	if (typeof obj == "string") 
	{
		if (isW3C)
		{
			theObj = document.getElementById(obj);            
		}
		else if (isIE4)
		{
			theObj = document.all(obj);
		}
		else if (isNN4)
		{
			theObj = seekLayer(document, obj);
		}
	}
	else
	{
		// pass through object reference
    theObj = obj;
	}

    return theObj;
}

// Convert object name string or object reference
// into a valid style (or NN4 layer) reference
function getObject(obj)
{
	var theObj = getRawObject(obj);
	if (theObj && isCSS)
	{
		theObj = theObj.style;
	}

	return theObj;
}

// Seek nested NN4 layer from string name
function seekLayer(doc, name)
{
	var theObj;
	for (var i = 0; i < doc.layers.length; i++)
	{
		if (doc.layers[i].name == name)
		{
			theObj = doc.layers[i];
			break;
		}
	
		// dive into nested layers if necessary
		if (doc.layers[i].document.layers.length > 0)
		{
			theObj = seekLayer(document.layers[i].document, name);
		}
	}

	return theObj;
}

// shows pop-up window
// param : URL
function showPopUp(tcUrl)
{
	var lnLinks = screen.availWidth - ((screen.availWidth-796)/2+610);
	var lnBoven = 100;
	var loPopup;

	loPopup = window.open(tcUrl,"voorwaarden","width=600,height=400,left="+lnLinks+",top="+lnBoven+",toolbar=no,menubar=0,status=no,scrollbars=yes,resizable=no")
	//bij popup blockers bestaat het loPopup object niet. Dus eerst controle of deze bestaat
	if (loPopup)
		loPopup.focus()
}

// Finds and returns absolute x y coords
// of an element in the page
function getImageCoords (img)
{
	var x = 0;
	var y = 0;
	var el = img;
	do {
		x += el.offsetLeft;
		y += el.offsetTop;
	}
	
	while (el = el.offsetParent);
	
	return {x: x, y: y};
}

// Function does the  positioning of Booksteps
function setStappenlijn()
{
 	var stappenTabelObj = getRawObject("stappentabel");
 	//var stappenLijnObj  = getRawObject("stappenlijn");
 	var coords          = getImageCoords (stappenTabelObj);
 	
 	//stappenLijnObj.style.top = coords.y + 19;
}

// Function checks if email address is valid
// param : email (string)
function isEmailAddr(email) 
{
	var re = /^[a-z0-9\-\.\_]+@([a-z0-9\-]+\.)+[a-z]{2,4}$/i;

	if( !email.match(re))
	{
		return false;
	}

	return true;
}

function showLegenda()
{
	links = screen.availWidth - ((screen.availWidth-796)/2+610)
	boven = 100
	sUrl = "/dialogs/legenda.php";
	voorwaarden = open(sUrl,"voorwaarden","width=600,height=400,left="+links+",top="+boven+",toolbar=no,menubar=0,status=no,scrollbars=yes,resizable=no")
	voorwaarden.focus()
}

function checkAv()
{
	links = screen.availWidth - ((screen.availWidth-796)/2 + 570)
	boven = 120
	check = open("/dialogs/pop_checkbeschikbaar.html","check","width=560,height=390,left="+links+",top="+boven+",toolbar=no,menubar=0,status=no,scrollbars=no,resizable=no")
	check.focus()
}

var name;
var showMsg = navigator.userAgent != "Mozilla/4.0 (compatible; MSIE 4.0; Mac_PowerPC)";

function SetLinkStatus()
{
	for(i=0; i<document.links.length; i++)
	{
		var sTekst = document.links[i].innerHTML;
		
		//bij plaatjes niet de html tonen maar lege statusbar
		if (document.links[i] && sTekst.indexOf("<") == -1 && sTekst.indexOf(">") == -1)
		{
			document.links[i].onmouseover = function(){ statbar(this.innerHTML); }
			document.links[i].onmouseout  = function(){ statbar(''); }
		}
		else if(document.links[i])
		{
			document.links[i].onmouseover = function(){ statbar('') }
			document.links[i].onmouseout  = function(){ statbar('') }
		}
	}
}

function statbar(msgStr)
{
	document.returnValue = false;
	
	if (showMsg && msgStr)
	{
	  setTimeout("window.status = '"+msgStr+"'", 1);
	}
	else
	  setTimeout("window.status = ''", 1);

	document.returnValue = true;
}

function openRoute(id) 
{     
	sUrl = "/eserver/route.html?ca_=" + id;
	oRoute = open(sUrl,"route","width=800,height=550,toolbar=no,menubar=no,statusbar=yes,scrollbars=yes,resizable=yes");
}

function toggleSubMenu(nIdMenu)
	 {
	 	 oSubMenu = document.getElementById("sub"+nIdMenu);
	 	 oHeader  = document.getElementById("header"+nIdMenu);
	 	 if (oSubMenu.style.display == 'block')
	 	 {
	 	 	 oHeader.className = 'header';
	 	 	 oSubMenu.style.display = 'none';
	 	 }
	 	 else
	 	 {
	 	 	 oHeader.className = 'header_active';
	 	   oSubMenu.style.display = 'block';
	   }
	 }

function openUitleg(logo)
{
	url = "/dialogs/pop_uitleg.html?pop=1&logo=" + logo
	venster = open(url, "Suncamp", "width=400,height=350,left=0,top=0,scrollbars=no,toolbar=no,menubar=no,status=no")
	venster.focus()
}

function LoadPage()
{ 
	document.getElementById('btext').style.display = 'block';
	document.getElementById('content').style.display = 'block';  	
	document.getElementById('bloading').style.display = 'none';
}

var Datum =new Date();
var ParseStartTime = Datum.getTime();
var FinalParseTime = 0;

function getParseTime()
{
	var Datum2 = new Date();
	var ParseEndTime = Datum2.getTime();
	
	FinalParseTime = (ParseEndTime-ParseStartTime);
	
	oDebug = document.getElementById('debug');
	if (oDebug)
	{
	  window.status = window.status + ' --- Browser Parsetime: ' + (FinalParseTime/1000) + ' s';
	  document.getElementById('debug').innerHTML = document.getElementById('debug').innerHTML + "<span>Browser Parsetime: " + (FinalParseTime/1000) + " seconds</span>"
	}
}

// this function is called on the onload of every page
var ListerLoaded = false
function initPage(PageExeptionIdentifier)
{	
	clearInterval(TimeOutID);
	
	//window.onresize = initPage;
	// Check if content height is smaller then screenheight
	// If so, adjust the content height to the screen height

	var TopMenuHeight  = 97; // This ugly hack is needed because topmenu is absolute positioned
	var ScreenHeight   = xClientHeight();
	var LeftDivHeight  = 900; //xClientHeight(); //- TopMenuHeight;	
	var MarginBottom   = 15;
		
	if (PageExeptionIdentifier)
	{
		switch(PageExeptionIdentifier)
		{
			case 'sitemap':
			var ContentDivHeight = 800;
			break;
			default:
			var ContentDivHeight = xHeight("content");
		}
	}
	else
	{
		var ContentDivHeight = xHeight("content");
	}
	
	// Uncomment to test
	//alert('ContentHeight:'+ ContentDivHeight +' & ScreenHeight:'+ ScreenHeight+'LeftDivHeight:'+LeftDivHeight );
	
	// Add Top menu height + content height	
	var ContentHeight  = ContentDivHeight + TopMenuHeight;
	LeftDivHeight  += TopMenuHeight;
	
	// Find the maximum height
	var UseHeight = Math.max(ContentHeight, ScreenHeight, LeftDivHeight);
	
	// substract topmenu
	UseHeight -= TopMenuHeight;
	
	// MarginBottom
	UseHeight += MarginBottom;
	
	/*
  if (ScreenHeight > ContentHeight)
  {
		//alert('ContentHeight:'+ ContentHeight +' & ScreenHeight:'+ ScreenHeight); 
		UseHeight -= TopMenuHeight;
	}
	*/
  
	// 01-08-2006 -- Mark UseHeight += 50; // alternatief

	xHeight("wrapper", UseHeight);
	xHeight("left"   , UseHeight);
	xHeight("leftCampingDetails" , UseHeight);
	
	// Call parsetime handler
	getParseTime();
	
	if (!ListerLoaded)
	{
		xAddEventListener(window, "resize", ResizeListener, false);
		ListerLoaded = true;
	}
}

var TimeOutID;
function ResizeListener()
{
	if (TimeOutID)
	{		
		clearInterval(TimeOutID);		
	}
	
	TimeOutID = setInterval("initPage()", 1000);	
}

function showdate() 
{
  var val = (document.all) ? "block" : "table-row";
  document.getElementById('date').style.display  = val;
  document.getElementById('date2').style.display = val;   	
}

function hidedate() 
{
  document.getElementById('date').style.display  = "none";
  document.getElementById('date2').style.display = "none";
}

function showCalendar()
{
	var val = (document.all) ? "block" : "table-row";
	document.getElementById('calenderarea').style.display  = val;
  document.getElementById('kalender_bg').style.display = val;
}

function hideCalendar()
{
	document.getElementById('calenderarea').style.display  = "none";
  document.getElementById('kalender_bg').style.display = "none";
}
-->