
$(function(){
	imageRotator();
});

function imageRotator() {
	$('.imagerotator li').css({opacity:0});
	$('.imagerotator li:first').css({opacity:1}).addClass('show');
	setInterval('imageRotate()', 6000);
}

function imageRotate() {
	var current = ($('.imagerotator li.show')) ?  $('.imagerotator li.show') : $('.imagerotator li:first');
	var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('.imagerotator li:first') :current.next()) : $('.imagerotator li:first'));	
	next.css({opacity: 0.0}).addClass('show').animate({opacity:1}, 1000);
	current.animate({opacity:0}, 1000).removeClass('show');
}

function printPage() {
  window.print();
}

function swapImage(id, img) {
	document.getElementById(id).src = img;
}

function goBack(totalSteps){
  parent.history.go(-totalSteps);
}

function setLocation(sForm, sValue) {
	oObj = document.forms[sForm].locatie;
	nOptions = oObj.length;
	for (var i=0; i<nOptions; i++) {
		if (oObj.options[i].value == sValue) {
			oObj.selectedIndex = i;
		}
	}
}