function test() {
	alert(1);
}

searching = false;

function showSearchScreen() {
 searchScreen = document.getElementById("footer-searchscreen");
 searchScreen.style.display = "block";

 var windowHeight = document.body.clientHeight;
 var targetHeight = 1;
 var windowWidth = (document.body.clientWidth / 2) + 70;
 searchScreen.style.left = windowWidth;
 searchScreen.style.top = windowHeight - 70;
 setTimeout("hideSearchScreen()", 5000);
}

function hideSearchScreen() {
 searchScreen.style.display = "none";
}

function submitSearchForm() {
 if (document.searchForm.key.value == '') {
  return false;
 }
 if (searching == false) {
  showSearchScreen();
  return false;
 } else {
  return true;
 }
}

function setHeaderColor(pageId, lastMainPage) {
  currentPageId = 'headerlink-' + pageId;
  lastPageId = 'headerlink-' + lastMainPage;
	setHeaderColorImpl();
}

function setHeaderColorImpl() {
	var headerlink = document.getElementById(currentPageId);
  var lastHeaderLink = document.getElementById(lastPageId);
  if (headerlink != null) {
    headerlink.style.color = 'white';
  }
  if (lastHeaderLink != headerlink && lastHeaderLink != null) {
    lastHeaderLink.style.color = '#fdcc00';
  }
}

function checkContactForm(contactform) {
	if (contactform.firstname.value == '') {
		alert("Vul uw voornaam in.");
		return false;
	}
	if (contactform.lastname.value == '') {
		alert("Vul uw achternaam in.");
		return false;
	}
	if (contactform.email.value == '') {
		alert("Vul uw emailadres in.");
		return false;
	}
	if (contactform.question.value == '') {
		alert("Stel een vraag.");
		return false;
	}
	return true;
}

function setFocusInContactForm() {
	document.forms.contactForm.name.focus();
}

function showFilmImage(image) {
	imageDiv = document.getElementById('flvplayer_x');
	var html = '<table width="100%" cellspacing="0" cellpadding="0"><tr height="356" valign="top"><td align="center"><img src="' + image + '" border="0" width="350" /></td></tr></table>';
	imageDiv.innerHTML = html;
}

function showFilmMovie(movie) {
  imageDiv = document.getElementById('flvplayer_x');	
  var s1 = new SWFObject('/engine/movie/player.swf','mediaplayer','480','356','9',"#000000");
  s1.addParam("allowfullscreen","true");
  s1.addVariable("fullscreen", "true");
  s1.addVariable("controlbar", "over");
  s1.addVariable("autostart", "true");
  s1.addVariable("file", movie);
  s1.write(imageDiv);		
}

function showVerdiepingsMovie(movie, description) {
  var movieNameDiv = document.getElementById('verdiepingsMovieDescription');
  movieNameDiv.innerHTML = description;
  var verdiepingsDiv = document.getElementById('flvplayer_verdieping');
  var s1 = new SWFObject('/engine/movie/player.swf','mediaplayer','350','260','9',"#000000");
  s1.addParam("allowfullscreen","true");
  s1.addVariable("fullscreen", "true");
  s1.addVariable("controlbar", "over");
  s1.addVariable("autostart", "true");
  s1.addVariable("file", movie);
  s1.write(verdiepingsDiv);
}

function resizeWindow() {
   var h = document.body.clientHeight - 130;
   $('divcontent').style.height = h;
   var h2 = document.body.clientHeight - 25;
   $('divfooter').style.top = h2;
   var w = document.body.clientWidth;
   var topmenuW = (w - 1000) / 2;   
   var contentW = (w - 1020) / 2;
   var footerW = (w - 1000) / 2;   
   if (topmenuW < 0) {
    topmenuW = 0;
   }
   if (contentW < 0) {
    contentW = 0;
   }
   if (footerW < 0) {
    footerW = 0;
   }
   $('divtopmenu').style.left = topmenuW + 'px';
   $('divcontent').style.left = contentW + 'px';
   $('divfooter').style.left = footerW + 'px';
   $('divtopmenu').style.zIndex = 999;
   $('divcontent').style.zIndex = 1;
   $('divfooter').style.zIndex = 0;
}

