//for IE bug: doesnt know indexOf function... sigh..
if (!Array.prototype.indexOf)
{
Array.prototype.indexOf = function(elt /*, from*/)
{
var len = this.length >>> 0;
var from = Number(arguments[1]) || 0;
from = (from < 0)
? Math.ceil(from)
: Math.floor(from);
if (from < 0)
from += len;
for (; from < len; from++)
{
if (from in this &&
this[from] === elt)
return from;
}
return -1;
};
}
function checkForm(){
if(document.form_aanvraag.name.value == ""){
document.form_aanvraag.name.style.border = "1px solid #F26522";
document.form_aanvraag.name.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.name.focus();
return false
}
else{
document.form_aanvraag.name.style.border = "1px solid #808080";
document.form_aanvraag.name.style.borderRight = "4px solid #F26522";
}
if(document.form_aanvraag.tel.value == ""){
document.form_aanvraag.tel.style.border = "1px solid #F26522";
document.form_aanvraag.tel.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.tel.focus();
return false
}
else{
document.form_aanvraag.tel.style.border = "1px solid #808080";
document.form_aanvraag.tel.style.borderRight = "4px solid #F26522";
}
if(document.form_aanvraag.mail.value == ""){
document.form_aanvraag.mail.style.border = "1px solid #F26522";
document.form_aanvraag.mail.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.mail.focus();
return false
}
else{
document.form_aanvraag.mail.style.border = "1px solid #808080";
document.form_aanvraag.mail.style.borderRight = "4px solid #F26522";
}
return true
}
function checkFormNew(minGroup){
if(document.form_aanvraag.name.value == ""){
document.form_aanvraag.name.style.border = "1px solid #F26522";
document.form_aanvraag.name.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.name.style.backgroundColor = '#fde8de';
document.form_aanvraag.name.focus();
return false
}
else{
document.form_aanvraag.name.style.border = "1px solid #808080";
document.form_aanvraag.name.style.borderRight = "4px solid #F26522";
}
if(document.form_aanvraag.tel.value == ""){
document.form_aanvraag.tel.style.border = "1px solid #F26522";
document.form_aanvraag.tel.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.tel.style.backgroundColor = '#fde8de';
document.form_aanvraag.tel.focus();
return false
}
else{
document.form_aanvraag.tel.style.border = "1px solid #808080";
document.form_aanvraag.tel.style.borderRight = "4px solid #F26522";
}
if(document.form_aanvraag.mail.value == ""){
document.form_aanvraag.mail.style.border = "1px solid #F26522";
document.form_aanvraag.mail.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.mail.style.backgroundColor = '#fde8de';
document.form_aanvraag.mail.focus();
return false
}
else{
document.form_aanvraag.mail.style.border = "1px solid #808080";
document.form_aanvraag.mail.style.borderRight = "4px solid #F26522";
}
if(document.form_aanvraag.groupsize.value!="" && document.form_aanvraag.groupsize.value < (minGroup-3)){
document.form_aanvraag.groupsize.style.border = "1px solid #F26522";
document.form_aanvraag.groupsize.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.groupsize.style.backgroundColor = '#fde8de';
document.form_aanvraag.groupsize.focus();
document.getElementById('deelnemererror').style.display = "block";
return false
}
else{
document.form_aanvraag.groupsize.style.border = "1px solid #808080";
//document.form_aanvraag.groupsize.style.borderRight = "4px solid #F26522";
}
if(document.form_aanvraag.duration.value == ""){
document.form_aanvraag.duration.style.border = "1px solid #F26522";
document.form_aanvraag.duration.style.borderWidth = "1px 4px 1px 1px";
document.form_aanvraag.duration.style.backgroundColor = '#fde8de';
document.form_aanvraag.duration.focus();
return false
}
else{
document.form_aanvraag.duration.style.border = "1px solid #808080";
document.form_aanvraag.duration.style.borderRight = "4px solid #F26522";
}
return true
}
function checkActivePage(){
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.indexOf('/') + 1);
var sFirst = sPage.substr(0,(sPage.indexOf('/') + 1));
var sSecondPath = sPage.substring(sPage.indexOf('/') + 1);
var sSecond = sSecondPath.substr(0,(sSecondPath.indexOf('/')));
var sFirstSecond = sFirst + sSecond;
if(sSecond){
var sItem = sFirstSecond;
} else if(sFirst){
var sItem = sPage;
} else {
var sItem = "pagina/home";
}
//alert(sItem);
var docList = document.getElementById('nav').getElementsByTagName('li');
for (var i = 0; i < docList.length; i++){
if(docList[i].firstChild.href.indexOf(sItem)!=-1){
//alert("href: "+docList[i].firstChild.href+" url: "+sPath);
docList[i].firstChild.parentNode.className = "active";
if(!docList[i].parentNode.parentNode.className){
docList[i].parentNode.parentNode.className = "active";
}
if(!docList[i].parentNode.parentNode.parentNode.parentNode.className){
docList[i].parentNode.parentNode.parentNode.parentNode.className = "active";
}
}
}
}
function checkFormActie(){
if(document.form_actie.name.value == ""){
document.form_actie.name.style.border = "1px solid #F26522";
document.form_actie.name.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.name.focus();
return false
}
else{
document.form_actie.name.style.border = "1px solid #808080";
document.form_actie.name.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.tel.value == ""){
document.form_actie.tel.style.border = "1px solid #F26522";
document.form_actie.tel.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.tel.focus();
return false
}
else{
document.form_actie.tel.style.border = "1px solid #808080";
document.form_actie.tel.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.mail.value == ""){
document.form_actie.mail.style.border = "1px solid #F26522";
document.form_actie.mail.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.mail.focus();
return false
}
else{
document.form_actie.mail.style.border = "1px solid #808080";
document.form_actie.mail.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.best1.value == ""){
document.form_actie.best1.style.border = "1px solid #F26522";
document.form_actie.best1.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.best1.focus();
return false
}
else{
document.form_actie.best1.style.border = "1px solid #808080";
document.form_actie.best1.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.best2.value == ""){
document.form_actie.best2.style.border = "1px solid #F26522";
document.form_actie.best2.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.best2.focus();
return false
}
else{
document.form_actie.best2.style.border = "1px solid #808080";
document.form_actie.best2.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.best3.value == ""){
document.form_actie.best3.style.border = "1px solid #F26522";
document.form_actie.best3.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.best3.focus();
return false
}
else{
document.form_actie.best3.style.border = "1px solid #808080";
document.form_actie.best3.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.best4.value == ""){
document.form_actie.best4.style.border = "1px solid #F26522";
document.form_actie.best4.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.best4.focus();
return false
}
else{
document.form_actie.best4.style.border = "1px solid #808080";
document.form_actie.best4.style.borderRight = "4px solid #F26522";
}
if(document.form_actie.best5.value == ""){
document.form_actie.best5.style.border = "1px solid #F26522";
document.form_actie.best5.style.borderWidth = "1px 4px 1px 1px";
document.form_actie.best5.focus();
return false
}
else{
document.form_actie.best5.style.border = "1px solid #808080";
document.form_actie.best5.style.borderRight = "4px solid #F26522";
}
return true
}
function trim(s)
{
return s.replace(/^\s+|\s+$/, '');
}
function checkField(field,status){
if(status == "required"){
if(field.value == ""){
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
} else {
field.style.border = "1px solid #70a825";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#edf8df';
}
} else if(status == "mail"){
var tfld = trim(field.value); // value of field with whitespace trimmed off
var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
if (field.value == "") {
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
//error = "You didn't enter an email address.\n";
} else if (!emailFilter.test(tfld)) { //test email for illegal characters
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
//error = "Please enter a valid email address.\n";
} else if (field.value.match(illegalChars)) {
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
//error = "The email address contains illegal characters.\n";
} else {
field.style.border = "1px solid #70a825";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#edf8df';
}
} else if(status == "phone"){
var stripped = field.value.replace(/[\(\)\.\-\ ]/g, '');
if (field.value == "") {
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
//error = "You didn't enter a phone number.\n";
} else if (isNaN(parseInt(stripped))) {
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
//error = "The phone number contains illegal characters.\n";
} else if (!(stripped.length > 8)) {
field.style.border = "1px solid #F26522";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#fde8de';
//error = "The phone number is the wrong length. Make sure you included an area code.\n";
} else {
field.style.border = "1px solid #70a825";
field.style.borderWidth = "1px 4px 1px 1px";
field.style.backgroundColor = '#edf8df';
}
} else {
field.style.border = "1px solid #70a825";
field.style.borderWidth = "1px";
field.style.backgroundColor = '#edf8df';
}
}
function phoneMe(txtName,txtTel,tg){
var boxObj = document.getElementById("phoneMe");
var nameObj = document.getElementById("phoneMeName");
var telObj = document.getElementById("phoneMeTel");
var msgObj = document.getElementById("phoneMeMsg");
var status = true;
// check if name is vallid
if(nameObj.value == txtName) {
nameObj.style.border = "1px solid #F26622";
if(tg != "studenten") msgObj.innerHTML = "Uw naam invullen a.u.b.";
else msgObj.innerHTML = "Je naam invullen a.u.b.";
nameObj.focus();
status = false;
return false;
}
else{
nameObj.style.border = "1px solid #808080";
msgObj.innerHTML = "";
}
// check if tel is vallid
if(telObj.value == txtTel) {
telObj.style.border = "1px solid #F26622";
if(tg != "studenten") msgObj.innerHTML = "Uw telefoonnummer invullen a.u.b.";
else msgObj.innerHTML = "Je telefoonnummer invullen a.u.b.";
telObj.focus();
status = false;
return false;
}
else{
telObj.style.border = "1px solid #808080";
msgObj.innerHTML = "";
}
// If check is ok... proceed and e-mail number
if(status == true){
var url = "/includes/php/mng_aanvraag.php?actionToDo=phoneMe&name="+nameObj.value+"&tel="+telObj.value;
loadXMLDoc(url);
}
}
var xmlhttp
function loadXMLDoc(url){
xmlhttp=null
// code for Mozilla, etc.
if (window.XMLHttpRequest) {
xmlhttp=new XMLHttpRequest()
}
// code for IE
else if (window.ActiveXObject) {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
}
if (xmlhttp!=null) {
xmlhttp.onreadystatechange=state_Change
xmlhttp.open("GET",url,true)
xmlhttp.send(null)
}
else {
alert("Your browser does not support XMLHTTP.")
}
}
function state_Change(){
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4) {
// if "OK"
if (xmlhttp.status==200) {
document.getElementById("phoneMe").innerHTML = ""+xmlhttp.responseText+"";
}
else {
alert("Problem retrieving XML data")
}
}
}
function disableselect(e){
return false
}
function reEnable(){
return true
}
function setPicture(picture) {
//alert(document.getElementById('boxFlashObjectTest').innerHTML);
document.getElementById('boxFlashObjectTest').innerHTML = picture;
}
function setYouTube(href) {
document.getElementById('youtube_banner').firstChild.href = href;
//alert(document.getElementById('youtube_banner').firstChild.href);
}
function setYouTubeNew(href) {
document.getElementById('youtube_banner').style.height='155px';
var soyt = new SWFObject("http://www.youtube.com/v/"+href+"&fs=1", "youtube", "220", "148", "8", "#FFFFFF");
soyt.addParam("wmode", "transparent");
soyt.write("youtube_banner");
}
function setYouTubeMovie(href) {
document.getElementById('youtube_banner_new').style.height='155px';
var soyt = new SWFObject("http://www.youtube.com/v/"+href+"&fs=1", "youtube", "220", "148", "8", "#FFFFFF");
soyt.addParam("wmode", "transparent");
soyt.write("youtube_banner_new");
}
function activeTab(shref){
//alert(shref);
var docTabList = document.getElementById('nav').getElementsByTagName('li');
for (var i = 0; i < docTabList.length; i++){
if(docTabList[i].firstChild.href.indexOf(shref)!=-1){
//alert("href: "+docList[i].firstChild.href+" url: "+shref);
docTabList[i].firstChild.parentNode.className = "active";
if(!docTabList[i].parentNode.parentNode.className){
docTabList[i].parentNode.parentNode.className = "active";
}
if(!docTabList[i].parentNode.parentNode.parentNode.parentNode.className){
docTabList[i].parentNode.parentNode.parentNode.parentNode.className = "active";
}
}
}
}
function openLink(href){
window.location = href;
}
function setCurrentTab(tabdata){
currentTab = tabdata;
}
function delCustomClass(tabNumber,tab){
document.getElementById('tab-'+tabNumber).className = "";
}
function makeTabLinkActive(tabnum,link){
document.getElementById('tab-'+tabnum).className = "ui-tabs-selected-custom tab-active";
if(link != ""){
document.getElementById(link).firstChild.className += " link-active";
}
}
function onClickInActive(clickTabs,inActiveTab){
var i=0;
for (i=0;i7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="