function arrangementHover() {

	arrangementen = $$('.arrangement_inner');

	arrangementen.each(function(event) {

		event.observe('mouseover', function(eventover) {
				event.setStyle({
					background:'#eff5c6'
				});
		});

		event.observe('mouseout', function(eventover) {
				event.setStyle({
					background:'#ffffff'
				});
		});

	});

}

function initiateSwitchArr() {
	arrangementen_specials = $$('.arr_special_afb_small1');
	arrangementen_specials_twee = $$('.arr_special_afb_small2');
	arrangementen_specials_wrap = $$('.arr_special_afb');

	arrangementen_specials.each(function(event, s) {

		event.observe('click', function(e) {

			or_afb = arrangementen_specials_wrap[s].readAttribute("rel");
			or_small1 = event.readAttribute("rel");

			arrangementen_specials_wrap[s].writeAttribute("src", or_small1);
			arrangementen_specials_wrap[s].writeAttribute("rel", or_small1);
			//gesplit = or_afb.split('.');
			//event.writeAttribute("src", gesplit[0] + "_small." + gesplit[1]);
			event.writeAttribute("src", or_afb);
			event.writeAttribute("rel", or_afb);

		});

	});

	arrangementen_specials_twee.each(function(event, s) {

		event.observe('click', function(e) {

			or_afb = arrangementen_specials_wrap[s].readAttribute("rel");
			or_small2 = event.readAttribute("rel");

			arrangementen_specials_wrap[s].writeAttribute("src", or_small2);
			arrangementen_specials_wrap[s].writeAttribute("rel", or_small2);
			//gesplit = or_afb.split('.');
			//event.writeAttribute("src", gesplit[0] + "_small." + gesplit[1]);
			event.writeAttribute("src", or_afb);
			event.writeAttribute("rel", or_afb);

		});

	});
}

function switchZoomed() {
	Afbeeldingen = $$('.afb');


	Afbeeldingen.each(function(event, s){
		event.observe('click',function(e) {
			org_afb = $('canvas_afbeeldingen').readAttribute('src');
			$('canvas_afbeeldingen').writeAttribute('src', event.readAttribute('src'));
			event.writeAttribute('src',org_afb);
		});
	});
}


function GoogleMap(param) {

	// default values
	this.param = param || {};
	this.param.center  = this.param.center  || new google.maps.LatLng('51.9', '5.4152592343749895');
	this.param.center  = this.checkLatLng(this.param.center);
	this.param.zoom    = this.param.zoom    || 7;
	this.param.mapType = this.param.mapType || google.maps.MapTypeId.TERRAIN;
	this.active_infoWindow;
	this.markers;
	this.map;

	this.mapOptions = {
		zoom:      this.param.zoom,
		center:    this.param.center,
		mapTypeId: this.param.mapType,
		mapTypeControl: false,
		navigationControl: true,
		navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}
	}

	// handle which map-construct is used
    if(!param.centerByGeo)
		this.map = new google.maps.Map(document.getElementById(param.elementId), this.mapOptions);
	else
		this.constructByGeo();

	this.setCenter = function(latlng) {
		this.map.setCenter(this.checkLatLng(latlng));
	}

	this.setZoom = function(zoom) {
		this.map.setZoom(zoom);
	}

	this.setMapType = function(maptype) {
		this.map.setMapTypeId(maptype);
	}

	this.setCenterByGeo = function(address) {

		var obj = this;

		geocoder = new google.maps.Geocoder();
		geocoder.geocode( { address: address}, function(results, status) {
			if (status == google.maps.GeocoderStatus.OK && results.length) {
				if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
					obj.setCenter(results[0].geometry.location);
				}
			} else {
				alert("Geocode was unsuccessful due to: " + status);
			}
		});
	}

	this.addMarkerByGeo = function(address, color, content) {

		var obj = this;

		geocoder = new google.maps.Geocoder();
		geocoder.geocode( { address: address}, function(results, status) {
			if (status == google.maps.GeocoderStatus.OK && results.length) {
				if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
					obj.addMarker(results[0].geometry.location, color, content);
				}
			} else {
				alert("Geocode was unsuccessful due to: " + status);
			}
		});

	}

	this.addMarker = function(latlng, color, content) {

		var obj = this;

		var infowindow = new google.maps.InfoWindow({content: content});
		var marker = new google.maps.Marker({
				position: this.checkLatLng(latlng),
				map: this.map,
				icon: "/images/googlemapsicon_"+color+".png"
			})

		google.maps.event.addListener(marker, 'click', function(event) {
			if (obj.active_infoWindow)
				obj.active_infoWindow.close();
			obj.active_infoWindow = infowindow;
			infowindow.open(obj.map, marker);
		});

	}

}

GoogleMap.prototype.checkLatLng = function(latlng) {
		if (typeof latlng == 'string') {
			latlng = latlng.split(',');
			latlng = new google.maps.LatLng(latlng[0], latlng[1]);
		}
		return latlng;
}
// special constructor if address is given for construct
GoogleMap.prototype.constructByGeo = function() {

		var obj = this;

		geocoder = new google.maps.Geocoder();
		geocoder.geocode( { address: this.param.centerByGeo}, function(results, status) {
			if (status == google.maps.GeocoderStatus.OK && results.length) {
				if (status != google.maps.GeocoderStatus.ZERO_RESULTS) {
					obj.mapOptions.center = results[0].geometry.location;
					obj.map = new google.maps.Map(document.getElementById(obj.param.elementId), obj.mapOptions);
				}
			} else {
				alert("Geocode was unsuccessful due to: " + status);
			}
		});
}

function reserveer() {




            /*
	$('reserveer').observe('click', function(e) {

		if($('reserveer-more').visible() == false) {
			gasten = $('AG').value;
			english = new Array('','one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight');

			function getGuestForm(i) {
				return guestform = ''
					+'<fieldset id="guest_'+ english[i] + '" class="guest">'
						+'<label>Geslacht</label>'
							+'<select name="geslacht_'+ english[i] + '" id="geslacht_'+ english[i] + '" class="smallest">'
							+'<option value="man">Man</option><option value="vrouw">Vrouw</option>'
							+'</select>'
							+'<div id="geslacht_'+ english[i] + '_button" style="display:none;">M/V</div><div id="geslacht_'+ english[i] + '_replace" style="display:none;"></div><div class="clear"></div>'
						+'<label>Voornaam</label><input type="text" name="voornaam_'+ english[i] + '" id="voornaam_'+ english[i] + '" /><div class="clear"></div>'
						+'<label>Achternaam</label><input type="text" name="achternaam_'+ english[i] + '" id="achternaam_'+ english[i] + '" /><div class="clear"></div>'
						+'<label>E-mail</label><input type="text" name="email_'+ english[i] + '"	id="email_'+ english[i] + '" /><div class="clear"></div>'
						+'<label>In bezit van</label><select name="gvb_'+ english[i] + '" id="gvb_'+ english[i] + '" class="gvb_dropdown"><option value="geen gvb" selected="selected">Geen GVB</option><option value="gvb">GVB</option><option value="baanpermissie">Baanpermissie</option><option value="handicap">Handicap</option></select>'
							+'<div id="gvb_'+ english[i] + '_button" class="gvb_button" style="display:none;"></div><div id="gvb_'+ english[i] + '_replace" class="gvb_replace" style="display:none;"></div><div class="clear"></div>'
						+'<label>Handicap</label><input type="text" name="handicap_'+ english[i] + '" id="handicap_'+ english[i] + '" /><div class="clear"></div>'
					+'</fieldset>';

			}

			if(gasten > 5) {
				toevoegen = '';

				for(i=1; i < 5; i++) {
						toevoegen += '<h2 class="guest_header">Gast ' + i + '</h2>';
				}
				toevoegen += '<div class="clear"></div>';
				for(i=1; i < 5; i++) {
					toevoegen += getGuestForm(i);
				}
				toevoegen += '<div class="clear"></div>';
				for(i=5; i < gasten; i++) {
						toevoegen += '<h2 class="guest_header">Gast ' + i + '</h2>';
				}
				toevoegen += '<div class="clear"></div>';
				for(i=5; i < gasten; i++) {
					toevoegen += getGuestForm(i);
				}
				toevoegen += '<div class="clear"></div>';

				$('gasten').innerHTML = toevoegen;

				for(b=1; b < gasten; b++) {
					InitiateDropDown("geslacht_" + english[b]);
					InitiateDropDown("gvb_" + english[b]);
				}

			} else {
				toevoegen = '';
				for(i=1; i < gasten; i++) {
					toevoegen += '<h2 class="guest_header">Gast ' + i + '</h2>';
				}
					toevoegen += '<div class="clear"></div>';
				for(i=1; i < gasten; i++) {
					toevoegen += getGuestForm(i);
				}
				toevoegen += '<div class="clear"></div>';

				$('gasten').innerHTML = toevoegen;

				for(b=1; b < gasten; b++) {
					InitiateDropDown("geslacht_" + english[b]);
					InitiateDropDown("gvb_" + english[b]);
				}

			}
			new Effect.BlindDown('reserveer-more');
		}

	}); */

}


function indd(i) {
	english = new Array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight');

}
