// JavaScript Document
<!--
var moverStatus=new Array();
function mover(t) {
	l=t.src.length;
	if (t.src.substr(l-5,1)=='A' || t.src.substr(l-5,1)=='2') {
		moverStatus[t.src]='A';
		return;
	}
	e=t.src.substr(l-4,4);
	i=t.src.substr(0,l-4);
	t.src=i+"A"+e;
}
function mout(t) {
	l=t.src.length;
	if (moverStatus[t.src]=='A' || moverStatus[t.src]=='2') return;
	if (t.src.substr(l-5,1)=='A') {
		e=t.src.substr(l-4,4);
		i=t.src.substr(0,l-5);
		t.src=i+e;
	}
}

function validate(t) {
	var validmail=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	for(i=0; i<t.elements.length; i++) {
		f=t.elements.item(i);
		if (f.size==1 && (f.value=='' || f.value==f.name)) { alert(f.name+' is required'); f.focus(); return false;}
		if ((f.name=='email' || f.name=='email address' || f.name=='email adres') && !validmail.test(f.value) && f.value!=f.name) { alert(f.name+' is invalid'); f.focus(); return false;}
	}
	t.action="";
}
function fieldFocus(t) {
	if (t.value==t.name) t.value='';
}
function fieldBlur(t) {
	if (t.value=='') t.value=t.name;
}

function gmap() {
	var latlng = new google.maps.LatLng(52.5099983897178, 6.095470190048218);
	var myOptions = {
		zoom: 16,
		center: latlng,
		mapTypeId: google.maps.MapTypeId.HYBRID
	};
	var map = new google.maps.Map(document.getElementById("gmap"), myOptions);
	var marker = new google.maps.Marker({
		position: latlng, 
		map: map,
		title:"Hello World!"
	});
	google.maps.event.addListener(marker, 'click', function() {
		var newWindow=window.open('http://maps.google.com/maps?f=q&source=s_q&hl=en&q=bureau+htm&sll=52.509848,6.102734&sspn=0.036515,0.068836&ie=UTF8&t=h&split=1&filter=0&rq=1&ev=p&radius=1.74&hq=bureau+htm&hnear=&ll=52.511468,6.102734&spn=0.036513,0.068836&z=14&iwloc=A&cid=11407011945182747518','_blank');
		newWindow.focus();
		return false;
	});
}

var video=0;

function videoScroll() {
	m=($('#videoContainer').width()/480)-2;
	//window.status='m:'+m;
	if (video<=0) { video=0; $('#prev').hide(); } else $('#prev').show();
	if (video>=m) { video=m; $('#next').hide(); } else $('#next').show();
	$('#scroll').animate({scrollLeft: video*480},300);
}

$(document).ready(function() {
	$('#next').click(function() {
		video++;
		videoScroll();
	});
	$('#prev').click(function() {
		video--;
		videoScroll();
	});
});
