function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function validateEmail(email) {
	
	if (email != null && email != "") {
		a = email.lastIndexOf("@");
		b = email.lastIndexOf(".");
		c = email.indexOf(":");
		d = email.indexOf("/");
		e = email.substring(0,a);
		f = e.indexOf("@");
		g = email.substring(a+1,email.length);
		h = g.indexOf("[");
		i = g.indexOf("]");
		j = g.indexOf("<");
		k = g.indexOf(">");
		l = email.substring(a+1,b);
		m = email.substring(b+1,email.length);
		n = email.substring(0,a);
		p = email.indexOf("'");
		q = email.indexOf("\"");
		o = 0;
		if (a > b) {o++};
		if (c != -1) {o++};
		if (d != -1) {o++};
		if (f != -1) {o++};
		if (h != -1) {o++};
		if (i != -1) {o++};
		if (j != -1) {o++};
		if (k != -1) {o++};
		if (l.length < 2) {o++};
		if (m.length < 2) {o++};
		if (n.length < 1) {o++};
		if (p != -1) {o++};
		if (q != -1) {o++};
		if (o != 0) {
			return false;
		}
	}
	return true;
}

function printpagina() {
	var printlink = document.getElementById("printtool");
	if(printlink) {
		printlink.onclick = function() {
			
			var url = document.location.toString();
			c = url.indexOf('#');
			if (c != -1) {
				url = url.substring(0,c);
			}	
			d = url.indexOf('?');
			if (d == -1) {
			 url = url +  "?print=Y";
			}
			else {
			 url = url + ",print=Y";
			}
			theWidth = 1000;
			theHeight = 500;
			theTop = (screen.height-theHeight*1.5)/2;
			theLeft = (screen.width-theWidth)/2;
			winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=0,width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft;
			smallwindow=window.open(url,"Detail",winopts);
			smallwindow.focus();
			return false;
		}
	}
}

function zoeken() {
	var lnk = document.getElementById("searchbutton");
	if(lnk) {
		lnk.onclick = function() {
			if (document.searchform.searchword.value == "") {
				alert(lbl_search_string);
			}
			else {
				document.searchform.submit();
			}
			return false;
		}
	}
	/*var lnk2 = document.getElementById("newsletterbutton");
	if(lnk2) {
		lnk2.onclick = function() {
			if(!validateEmail(document.newsletterform.email.value)) {
				alert(lbl_newsletter_validemail);
				
			}
			else {
				document.newsletterform.submit();
			}
			return false;
		}
	}*/
}

function jobcheck() {
	var form = document.jobformulier;
	if (form) {
		form.onsubmit = function() {
			return (validatejob(this)) ;
		}		
	}
}

function validatejob(theForm) {
	var msg = ""
	if(theForm.naam.value == "") {
		msg += "-" + lbl_jobs_naam + "\n";	
	}
	if(theForm.voornaam.value == "") {
		msg += "-" + lbl_jobs_voornaam + "\n";	
	}
	if(theForm.email.value == "" || !validateEmail(theForm.email.value)) {
		msg += "-" + lbl_jobs_email + "\n";	
	}
	if(theForm.motivering.value == "") {
		msg += "-" + lbl_jobs_motivering + "\n";	
	}
	if(theForm.cv.value == "" && theForm.cvverplicht.value == "Y") {
		msg += "-" + lbl_jobs_cv + "\n";	
	}
	if (msg != "") {
		msg = lbl_jobs_verplichtinvullen + " : \n" + msg;
		alert(msg);
		return false;
	}
	theForm.x.value = "abc123";
	return true;
}

function mailcheck() {
	var form = document.mailformulier;
	if (form) {
		form.onsubmit = function() {
			return (validatemail(this)) ;
		}		
	}
}

function validatemail(theForm) {
	var msg = ""
	if(theForm.email.value == "" || !validateEmail(theForm.email.value)) {
		msg += "-" + lbl_mail_email + "\n";	
	}
	if(theForm.onderwerp.value == "") {
		msg += "-" + lbl_mail_subject + "\n";	
	}
	if(theForm.info.value == "") {
		msg += "-" + lbl_mail_info + "\n";	
	}
	if (msg != "") {
		msg = lbl_mail_verplichtinvullen + " : \n" + msg;
		alert(msg);
		return false;
	}
	theForm.x.value = "abc123";
	return true;
}

function contactcheck() {
	var form = document.contactformulier;
	if (form) {
		form.onsubmit = function() {
			return (validatecontact(this)) ;
		}		
	}
	var form2 = document.detailnewsletterform;
	if (form2) {
		form2.onsubmit = function() {
			return (validateNewsletter(this)) ;
		}		
	}
}

function validateNewsletter(theForm) {
	var msg = ""
	if(theForm.naam.value == "") {
		msg += "-" + lbl_contact_naam + "\n";	
	}
	if(theForm.voornaam.value == "") {
		msg += "-" + lbl_contact_voornaam + "\n";	
	}
	if(theForm.email.value == "" || !validateEmail(theForm.email.value)) {
		msg += "-" + lbl_contact_email + "\n";	
	}
	if (msg != "") {
		msg = lbl_contact_verplichtinvullen + " : \n" + msg;
		alert(msg);
		return false;
	}
	theForm.x.value = "abc123";
	return true;
}

function validatecontact(theForm) {
	var msg = ""
	if(theForm.naam.value == "") {
		msg += "-" + lbl_contact_naam + "\n";	
	}
	if(theForm.voornaam.value == "") {
		msg += "-" + lbl_contact_voornaam + "\n";	
	}
	if(theForm.email.value == "" || !validateEmail(theForm.email.value)) {
		msg += "-" + lbl_contact_email + "\n";	
	}
	if(theForm.tel.value == "") {
		msg += "-" + lbl_contact_tel + "\n";	
	}
	if (msg != "") {
		msg = lbl_contact_verplichtinvullen + " : \n" + msg;
		alert(msg);
		return false;
	}
	theForm.x.value = "abc123";
	return true;
}

function addGuestBookValidation() {
	var frmGuestbook = document.getElementById("gastenboek");
	if(frmGuestbook) {
		frmGuestbook.onsubmit = function () {
			return validateGuestbook(this);
		}
	}	
}

function validateGuestbook(theForm) {
	var error = 0;
	var msg = "";
	if(theForm.tekst.value.length==0) {
		msg += "\n- " + lbl_guestbook_bericht;
		error++;
	}
	if(theForm.naam.value.length==0) {
		msg += "\n- " + lbl_guestbook_naam;
		error++;
	}
	if(theForm.voornaam.value.length==0) {
		msg += "\n- " + lbl_contact_voornaam;
		error++;
	}
	if(theForm.email.value.length==0 || !validateEmail(theForm.email.value)) {
		msg += "\n- " + lbl_guestbook_email;
		error++;
	}
	if(theForm.checkcaptcha.value.length==0) {
		msg += "\n- " + lbl_guestbook_insertcode;
		error++;
	}
	if(error) {
		alert(lbl_guestbook_verplichte_velden + msg);
		return false;
	}
	theForm.x.value = "abc123";
	return true;
}

function concierge() {
	var virt = document.getElementById("vcselection");
	if(virt) {
		virt.onchange = function () {
			var item = virt.options[virt.selectedIndex].value;
			if (item != '*') {
				document.location = item;
			}
		}
	}	
}

function ecardcheck() {
	var form = document.ecardform;
	var pv = document.getElementById("previewcard");
	if(pv) {
		pv.onclick = function () {
			if (validateecard(form)) {
				theWidth = 500;
				theHeight = 500;
				theTop = (screen.height-theHeight*1.5)/2;
				theLeft = (screen.width-theWidth)/2;
				winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=0,width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft;
				window.open('','Preview',winopts);
				form.target = "Preview";
				form.action = "/previewecard.dhtml"
				form.submit();
			}
		}
	}	
	var se = document.getElementById("sendcard");
	if(se) {
		se.onclick = function () {
			if (validateecard(form)) {
				form.target = "_self";
				form.action = "/"+form.taal.value+"/"+form.cardid.value;
				form.submit();
			}
		}
	}	
}

function show_popup(item,language) {
	theWidth = 1000;
	theHeight = 500;
	theTop = (screen.height-theHeight*1.5)/2;
	theLeft = (screen.width-theWidth)/2;
	winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=0,width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft;
	smallwindow=window.open("/ecardpreview.dhtml?item="+item+",language="+language,"Detail",winopts);
	smallwindow.focus();
}

function validateecard(theForm) {
	var msg = ""
	if(theForm.recname.value == "") {
		msg += "-" + lbl_ecards_recname + "\n";	
	}
	if(theForm.recfirstname.value == "") {
		msg += "-" + lbl_ecards_rec_firstname + "\n";	
	}
	if(theForm.recemail.value == "" || !validateEmail(theForm.recemail.value)) {
		msg += "-" + lbl_ecards_recemail + "\n";	
	}
	if(theForm.yourname.value == "") {
		msg += "-" + lbl_ecards_yourname + "\n";	
	}
	if(theForm.yourfirstname.value == "") {
		msg += "-" + lbl_ecards_your_firstname + "\n";	
	}
	if(theForm.youremail.value == "" || !validateEmail(theForm.youremail.value)) {
		msg += "-" + lbl_ecards_youremail + "\n";	
	}
	theForm.x.value = "abc123";
	if (msg != "") {
		msg = lbl_ecards_verplichtinvullen + " : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}


var video_scrollerSpeed=6;
var video_pauseScroller=1;

// Change nothing below!
video_scrollerSpeed=(document.all)? video_scrollerSpeed : Math.max(1, video_scrollerSpeed-1); //slow speed down by 1 for NS
var video_copySpeed = video_scrollerSpeed;
var video_scroller, video_frame, video_scrollerHeight, video_frameHeight;
var video_pauseSpeed=(pauseScroller==0)? video_copySpeed: 0;

function initScrollerVideo(){
	video_frame = document.getElementById("video_scrollerFrame");
	video_scroller = document.getElementById("video_scrollerContent");
	video_buttonUp = document.getElementById("video_scrollUp");
	video_buttonDown = document.getElementById("video_scrollDown");
	if(video_frame && video_scroller && video_buttonUp && video_buttonDown) {
		video_buttonUp.onclick = function () {
			return false;
		}
		video_buttonUp.onmouseover = function () {
			video_leftTimeUp=setInterval('scrollUpVideo()',20);
		}
		video_buttonUp.onmouseout = function () {
			clearTimeout(video_leftTimeUp);
		}
	
		video_buttonDown.onclick = function () {
			return false;
		}
		video_buttonDown.onmouseover = function () {
			video_leftTimeDown=setInterval('scrollDownVideo()',20);
		}
		video_buttonDown.onmouseout = function () {
			clearTimeout(video_leftTimeDown);
		}

		
		video_scrollerHeight = video_scroller.offsetHeight;
		video_frameHeight = video_frame.offsetHeight;
		video_scroller.style.top="0px";

	}	
	
}

function scrollDownVideo(){
	video_scrollerHeight=video_scroller.offsetHeight; // nodig voor Safari
	
	if (parseInt(video_scroller.style.top) > (video_frameHeight-video_scrollerHeight)) {
		video_scroller.style.top=parseInt(video_scroller.style.top)-video_copySpeed+"px"
	}		
}

function scrollUpVideo(){
	if (parseInt(video_scroller.style.top) < 0) {
			video_scroller.style.top=parseInt(video_scroller.style.top)+video_copySpeed+"px"
	} 
}


var scrollerSpeed=6;
var pauseScroller=1;

// Change nothing below!
scrollerSpeed=(document.all)? scrollerSpeed : Math.max(1, scrollerSpeed-1); //slow speed down by 1 for NS
var copySpeed = scrollerSpeed;
var scroller, frame, scrollerHeight, frameHeight;
var pauseSpeed=(pauseScroller==0)? copySpeed: 0;

function initScroller(){
	frame = document.getElementById("scrollerFrame");
	scroller = document.getElementById("scrollerContent");
	buttonUp = document.getElementById("scrollUp");
	buttonDown = document.getElementById("scrollDown");
	if(frame && scroller && buttonUp && buttonDown) {
		buttonUp.onclick = function () {
			return false;
		}
		buttonUp.onmouseover = function () {
			leftTimeUp=setInterval('scrollUp()',20);
		}
		buttonUp.onmouseout = function () {
			clearTimeout(leftTimeUp);
		}
	
		buttonDown.onclick = function () {
			return false;
		}
		buttonDown.onmouseover = function () {
			leftTimeDown=setInterval('scrollDown()',20);
		}
		buttonDown.onmouseout = function () {
			clearTimeout(leftTimeDown);
		}

		
		scrollerHeight = scroller.offsetHeight;
		frameHeight = frame.offsetHeight;
		scroller.style.top="0px";

	}	
	
}

function scrollDown(){
	scrollerHeight=scroller.offsetHeight; // nodig voor Safari
	
/*	alert(frameHeight);
	alert(scrollerHeight);
	alert(parseInt(scroller.style.top));
*/	
	if (parseInt(scroller.style.top) > (frameHeight-scrollerHeight)) {
		scroller.style.top=parseInt(scroller.style.top)-copySpeed+"px"
	}		
}

function scrollUp(){
	if (parseInt(scroller.style.top) < 0) {
			scroller.style.top=parseInt(scroller.style.top)+copySpeed+"px"
	} 
}

function scrollpics() {
	var tst = document.getElementById('scrollerContent');
	if (tst) {
		var pics= tst.getElementsByTagName('a');
		for (var i=0;i<pics.length;i++) {
			pics[i].onclick = function() {
				var fid = this.id;
				fid = fid.replace("f","");
				showwich(fid);
				return false;
			}
		}
	}	
}

function preview() {
	var ps = document.getElementById('previewsendcard');
	if (ps) {
		ps.onclick = function() {
			var form = window.opener.document.ecardform;
			if (validateecard(form)) {
				form.target = "_self";
				form.action = "/"+form.taal.value+"/"+form.cardid.value;
				form.submit();
			}
			window.close();
		}
	}
	var pc = document.getElementById('previewclosewindow');
	if (pc) {
		pc.onclick = function() {
			window.close();
		}
	}
}

function tellafriendcheck() {
	var form = document.tellafriendform;
	if (form) {
		form.onsubmit = function() {
			return (validatetellafriend(this)) ;
		}		
	}
}

function validatetellafriend(theForm) {
	var msg = ""
	if(theForm.to.value == "") {
		msg += "-" + lbl_tellafriend_beste + " ...\n";	
	}
	if(theForm.from.value == "") {
		msg += "-" + lbl_tellafriend_groeten + ", ...\n";	
	}
	if(theForm.emailto.value == "") {
		msg += "-" + lbl_tellafriend_sendtoemail + "\n";	
	}
	if(theForm.emailfrom.value == "") {
		msg += "-" + lbl_tellafriend_sendfromemail + "\n";	
	}
	if (msg != "") {
		msg = lbl_tellafriend_invullen + " : \n" + msg;
		alert(msg);
		return false;
	}
	if(!validateEmail(theForm.emailto.value) || !validateEmail(theForm.emailfrom.value)) {
		alert(lbl_tellafriend_validemail);
		return false;
	}
	theForm.x.value = "abc123";
	return true;
}

function getDocument(theFrame) {
	if (theFrame.contentDocument)
	{
		// For NS6
		return theFrame.contentDocument; 
	}
	else if (theFrame.contentWindow)
	{
		// For IE5.5 and IE6
		return theFrame.contentWindow.document;
	}
	else if (theFrame.document)
	{
		// For IE5
		return theFrame.document;
	}
	else
	{
		return 0;
	}
}

function ikalender(yearfield, monthfield, dayfield, formulier, year, month,div,kalender_id) {
	aDoc = getDocument(document.getElementById(kalender_id));
	if (aDoc)
	{ 
		aDoc.location.replace("/kalender.dhtml?yearfield="+yearfield+",monthfield="+monthfield+",dayfield="+dayfield+",year="+year+",month="+month+",formulier="+formulier+",div="+div);
	}
}

function requests() {
	var lnk = document.getElementById("linkrequest1");
	if(lnk) {
		lnk.onclick = function() {
			ikalender('arrival_date_year','arrival_date_month','arrival_date_day','groups_requestformulier1',document.groups_requestformulier1.arrival_date_year.value,document.groups_requestformulier1.arrival_date_month.value,'kalenderdiv','kalender');
			return false;
		}
	}
	var lnk2 = document.getElementById("linkrequest2");
	if(lnk2) {
		lnk2.onclick = function() {
			ikalender('departure_date_year','departure_date_month','departure_date_day','groups_requestformulier1',document.groups_requestformulier1.departure_date_year.value,document.groups_requestformulier1.departure_date_month.value,'kalenderdiv2','kalender2');
			return false;
		}
	}
	var lnk3 = document.getElementById("linkrequest3");
	if(lnk3) {
		lnk3.onclick = function() {
			ikalender('alt_arrival_date_year','alt_arrival_date_month','alt_arrival_date_day','groups_requestformulier1',document.groups_requestformulier1.alt_arrival_date_year.value,document.groups_requestformulier1.alt_arrival_date_month.value,'kalenderdiv3','kalender3');
			return false;
		}
	}
	var lnk4 = document.getElementById("linkrequest4");
	if(lnk4) {
		lnk4.onclick = function() {
			ikalender('start_date_year','start_date_month','start_date_day','meeting_requestformulier1',document.meeting_requestformulier1.start_date_year.value,document.meeting_requestformulier1.start_date_month.value,'kalenderdiv4','kalender4');
			return false;
		}
	}
	var lnk5 = document.getElementById("linkrequest5");
	if(lnk5) {
		lnk5.onclick = function() {
			ikalender('end_date_year','end_date_month','end_date_day','meeting_requestformulier1',document.meeting_requestformulier1.end_date_year.value,document.meeting_requestformulier1.end_date_month.value,'kalenderdiv5','kalender5');
			return false;
		}
	}
	var lnk6 = document.getElementById("linkrequest6");
	if(lnk6) {
		lnk6.onclick = function() {
			ikalender('alt_start_date_year','alt_start_date_month','alt_start_date_day','meeting_requestformulier1',document.meeting_requestformulier1.alt_start_date_year.value,document.meeting_requestformulier1.alt_start_date_month.value,'kalenderdiv6','kalender6');
			return false;
		}
	}
	var select1 = document.getElementById("flexible_dates_meeting");
	if (select1) {
		select1.onchange = function() {
			if (this.value == "Y") {
				document.getElementById("flexible_meeting").style.display = "";
			}
			else {
				document.getElementById("flexible_meeting").style.display = "none";
			}
		}
	}
	var select2 = document.getElementById("flexible_dates_groups");
	if (select2) {
		select2.onchange = function() {
			if (this.value == "Y") {
				document.getElementById("flexible_groups").style.display = "";
			}
			else {
				document.getElementById("flexible_groups").style.display = "none";
			}
		}
	}
	var form1 = document.meeting_requestformulier1;
	if (form1) {
		form1.onsubmit = function() {
			return (validateMeetingRequest1(this)) ;
		}		
	}
	var form2 = document.meeting_requestformulier2;
	if (form2) {
		form2.onsubmit = function() {
			return (validateMeetingRequest2(this)) ;
		}		
	}
	var form3 = document.meeting_requestformulier3;
	if (form3) {
		form3.onsubmit = function() {
			return (validateMeetingRequest3(this)) ;
		}		
	}
	var form4 = document.meeting_requestformulier4;
	if (form4) {
		form4.onsubmit = function() {
			return (validateMeetingRequest4(this)) ;
		}		
	}
	
	var form1b = document.groups_requestformulier1;
	if (form1b) {
		form1b.onsubmit = function() {
			return (validateGroupRequest1(this)) ;
		}		
	}
	var form2b = document.groups_requestformulier2;
	if (form2b) {
		form2b.onsubmit = function() {
			return (validateGroupRequest2(this)) ;
		}		
	}
	var form3b = document.groups_requestformulier3;
	if (form3b) {
		form3b.onsubmit = function() {
			return (validateGroupRequest3(this)) ;
		}		
	}
	var form4b = document.groups_requestformulier4;
	if (form4b) {
		form4b.onsubmit = function() {
			return (validateGroupRequest4(this)) ;
		}		
	}
}

function validateMeetingRequest1(theForm) {
	var msg = ""
	if(theForm.start_date_day.value == "" || theForm.start_date_month.value == "" || theForm.start_date_year.value == "") {
		msg += "-"+lbl_requests_start_date+"\n";	
	}
	if(theForm.end_date_day.value == "" || theForm.end_date_month.value == "" || theForm.end_date_year.value == "") {
		msg += "-"+lbl_requests_end_date+"\n";	
	}
	if(theForm.number_participants.value == "") {
		msg += "-"+lbl_requests_number_participants+"\n";		
	}
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}

function validateMeetingRequest2(theForm) {
	var msg = ""
	if(theForm.company_name.value == "") {
		msg += "-"+lbl_requests_company_assoc_name+"\n";	
	}
	myOption = -1;
	for (i=theForm.contact_title.length-1; i > -1; i--) {
		if (theForm.contact_title[i].checked) {
			myOption = i; i = -1;
		}
	}
	if (myOption == -1) {
		msg += "-"+lbl_requests_title+"\n";	
	}
	if(theForm.first_name.value == "") {
		msg += "-"+lbl_requests_first_name+"\n";	
	}
	if(theForm.last_name.value == "") {
		msg += "-"+lbl_requests_last_name+"\n";	
	}
	if(theForm.email.value == "" || !validateEmail(theForm.email.value)) {
		msg += "-"+lbl_requests_email+"\n";	
	}
	if(theForm.phone.value == "") {
		msg += "-"+lbl_requests_phone+"\n";	
	}
	if(theForm.fax.value == "") {
		msg += "-"+lbl_requests_fax+"\n";	
	}
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}


function validateMeetingRequest3(theForm) {
	var msg = "";
	var error = 0;
	if(theForm.aantal_dagen.value >= 1) {
		if (theForm.meeting_day1.value == "" && theForm.board_day1.value == "") {
			error++;
		}
	}
	if(theForm.aantal_dagen.value >= 2) {
		if (theForm.meeting_day2.value == "" && theForm.board_day2.value == "") {
			error++;
		}
	}
	if(theForm.aantal_dagen.value >= 3) {
		if (theForm.meeting_day3.value == "" && theForm.board_day3.value == "") {
			error++;
		}
	}
	if(theForm.aantal_dagen.value >= 4) {
		if (theForm.meeting_day4.value == "" && theForm.board_day4.value == "") {
			error++;
		}
	}
	if(theForm.aantal_dagen.value >= 5) {
		if (theForm.meeting_day5.value == "" && theForm.board_day5.value == "") {
			error++;
		}
	}
	if (error != 0) {
		msg += "-"+lbl_requests_meeting_requirement+"\n";
		msg += "("+lbl_requests_numbersreq+")\n";
	}	
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}


function validateMeetingRequest4(theForm) {
	var msg = "";
	if(!theForm.contact_email.checked && !theForm.contact_post.checked && !theForm.contact_phone.checked && !theForm.contact_fax.checked) {
		msg += "-"+lbl_requests_how_contact+"\n";	
	}
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}


function validateGroupRequest1(theForm) {
	var msg = ""
	if(theForm.arrival_date_day.value == "" || theForm.arrival_date_month.value == "" || theForm.arrival_date_year.value == "") {
		msg += "-"+lbl_requests_arrival_date+"\n";	
	}
	if(theForm.departure_date_day.value == "" || theForm.departure_date_month.value == "" || theForm.departure_date_year.value == "") {
		msg += "-"+lbl_requests_departure_date+"\n";	
	}
	if(theForm.number_participants.value == "") {
		msg += "-"+lbl_requests_number_participants+"\n";		
	}
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}

function validateGroupRequest2(theForm) {
	var msg = ""
	if(theForm.company_name.value == "") {
		msg += "-"+lbl_requests_company_name+"\n";	
	}
	myOption = -1;
	for (i=theForm.contact_title.length-1; i > -1; i--) {
		if (theForm.contact_title[i].checked) {
			myOption = i; i = -1;
		}
	}
	if (myOption == -1) {
		msg += "-"+lbl_requests_title+"\n";	
	}
	if(theForm.last_name.value == "") {
		msg += "-"+lbl_requests_last_name+"\n";	
	}
	if(theForm.email.value == "" || !validateEmail(theForm.email.value)) {
		msg += "-"+lbl_requests_email+"\n";	
	}
	if(theForm.phone.value == "") {
		msg += "-"+lbl_requests_phone+"\n";	
	}
	if(theForm.fax.value == "") {
		msg += "-"+lbl_requests_fax+"\n";	
	}
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}

function validateGroupRequest3(theForm) {
	return true;
}

function validateGroupRequest4(theForm) {
	var msg = "";
	if(!theForm.contact_email.checked && !theForm.contact_post.checked && !theForm.contact_phone.checked && !theForm.contact_fax.checked) {
		msg += "-"+lbl_requests_how_contact+"\n";	
	}
	if (msg != "") {
		msg = lbl_requests_please_insert+" : \n" + msg;
		alert(msg);
		return false;
	}
	return true;
}

function show_popup2(url,theWidth,theHeight) {
	theTop = (screen.height-theHeight*1.5)/2;
	theLeft = (screen.width-theWidth)/2;
	winopts = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,copyhistory=0,width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft;
	smallwindow=window.open(url,"Detail",winopts);
	smallwindow.focus();
}


addLoadEvent(requests);
addLoadEvent(jobcheck);
addLoadEvent(mailcheck);
addLoadEvent(tellafriendcheck);
addLoadEvent(preview);
//addLoadEvent(scrollpics);	
addLoadEvent(initScrollerVideo);
addLoadEvent(initScroller);
addLoadEvent(ecardcheck);
addLoadEvent(concierge);
addLoadEvent(zoeken);
addLoadEvent(printpagina);
addLoadEvent(contactcheck);
addLoadEvent(addGuestBookValidation);
