function showMemberData(url,id) {
	window.location.href=url+id;
}

function stappersversturen(){
	form_values = Form.serialize('stappersform');
	$('stappersform').innerHTML = '<div style="padding: 20px; background: #903d00; border: 5px solid #5c0b00;">Je aanvraag wordt verstuurd...</div>';
	handler= 'site/arrangement_mailto.php';
	post = form_values;
	
	new Ajax.Updater(
		'',
		'ajax.php',
		{
			method: 'post',
			parameters : 'page='+handler+"&"+post,
			requestHeaders: ['Expires', 'Thu, 17 May 2001 10:17:17 GMT', 'Cache-Control', 'no-cache, must-revalidate', 'Pragma', 'no-cache'],
			onComplete: function () {
				$('stappersform').innerHTML = '<div style="padding: 20px; background: #903d00; border: 5px solid #5c0b00;">Bedankt voor je aanvraag! Wij nemen snel contact met je op.</div>';
			}
		});
}

function show_picture(picture) {
	$('photoholder_large').innerHTML="<img id='largepic' src='"+picture+"' >";
	Effect.Appear('photoholder_large', {duration: .5});
}

function submitPhotoGallery(id,afbeelding) {
	
	$('photogallery').id.value=id;
	$('photogallery').afbeelding.value=afbeelding;
	
	var form_id = document.getElementById("photogallery");
	form_id.submit();
	
}

function show_picture_home(pictures) {
	$('photo').innerHTML="<img src='"+picture+"' alt='' title='' style='position:absolute; z-index:2; left:10px; top:22px; width:148px; height:114px;'>";
	Effect.Appear('photo', {duration: .5});
}

var home_pics;

function slide_picture(direction) {
	current  = $('photo').src;
	previous = 'none';
	next     = 'none';
	
	for (i = 0; i < home_pics.length; i++) {
		if (home_pics[i] == current) {
			if (i > 0) previous = home_pics[i-1];
			if (i < home_pics.length - 1) next = home_pics[i+1];
			break;
		}
	}
	
	if (direction == -1) {
		if (previous != 'none') $('photo').src = previous;
	} else {
		if (next != 'none') $('photo').src = next;
	}
}

function slide_picture_gallery(direction) {
	current  = $('largepic').src;
	//alert(current);
	previous = 'none';
	next     = 'none';
	
	for (i = 0; i < foto_pics.length; i++) {
		if (foto_pics[i] == current) {
			if (i > 0) previous = foto_pics[i-1];
			if (i < foto_pics.length - 1) next = foto_pics[i+1];
			break;
		}
	}
	
	if (direction == -1) {
		if (previous != 'none') $('largepic').src = previous;
	} else {
		if (next != 'none') $('largepic').src = next;
	}
}


function changeTour(page) {
	$('vtour').innerHTML="<iframe frameborder='0' scrolling='no' src='"+page+"' width='400' height='450'></iframe>";
}

function showNextBanners() {
	var shownum = 0; //aantal zichtbare banners
	$$('div.banner_item').each(function(s) {
		if(s.visible()) {
			shownum++;
		}
	});
	var shown = 0;
	var hidden = 0;
	$$('div.banner_item').each(function(s) {
		if(s.visible()) {
			s.hide();
			hidden++;
		} else if(shown < shownum && hidden > 0) {
			s.show();
			shown++;
		}
	});
	//zijn er wel genoeg banners aangezet??
	if(shown < shownum) {
		$$('div.banner_item').each(function(s) {
			if(shown < shownum) {
				s.show();
				shown++;
			}
		});
	}
	id=window.setTimeout ("showNextBanners()", 5000);
}

function show_form() {
	Effect.Appear('solliciteer', {duration: 1});
   $('dialoggray').style.visibility = 'visible';
   $('html').style.overflow = 'hidden';
}

function hide_form() {
   Effect.Fade('solliciteer', {duration: 0.8});
   $('dialoggray').style.visibility = 'hidden';
   $('html').style.overflow = 'auto';
}  


