//basisvariabelen theChosenFilter = "Kies een filter"; theChosenFilteron=""; theKeywords=""; advancedFilter=0; sortfield="training_naam"; sortorder="ASC"; minSearchLength = 0; maandaanbieding = 0; reservelijst = 0; txtLoading = "Bezig met laden..."; // "Bezig met laden..."; txtSearching = "Bezig met zoeken."; // ============================================================================== // Op de pagina moet als onloadstatement minimaal SmallSearch('','','',0) staan // ============================================================================== function SmallSearch(filter,filteron,keywords,advanced) { //advanced: 0 = ignore; 1 = alleen advanced; 2 = alleen OT theChosenFilter = filter; theChosenFilteron = filteron; theKeywords = keywords; advancedFilter = advanced; //alert("theCall"); DWREngine._errorHandler = errorHandler; DWREngine._execute(_cfscriptLocation, null, "fakesearch",theChosenFilter, theChosenFilteron,0,theKeywords,advancedFilter,sortfield,sortorder,SmallSearchResult); } function bigSearch(filter) { theChosenFilter = filter; document.getElementById("transveld").style.visibility = "visible"; document.getElementById("ip_training").style.visibility = "hidden"; document.getElementById("ip_training_home").style.visibility = "visible"; if (filter != '') { DWRUtil.setValue("ip_training", txtLoading); DWREngine._errorHandler = errorHandler; DWREngine._execute(_cfscriptLocation, null, "homesearch",theChosenFilter, theChosenFilteron,0,theKeywords,advancedFilter,sortfield,sortorder, homeSearchResult); } else { //CSBfleXcroll('traininglist_big'); } } function closeHomeSearch() { document.getElementById("transveld").style.visibility = "hidden"; document.getElementById("ip_training").style.visibility = "visible"; document.getElementById("ip_training_home").style.visibility = "hidden"; DWRUtil.setValue("ip_training_home", txtLoading); //alert("theCall"); DWREngine._errorHandler = errorHandler; DWREngine._execute(_cfscriptLocation, null, "fakesearch",theChosenFilter, theChosenFilteron,0,theKeywords,advancedFilter,sortfield,sortorder, SmallSearchResult); } function SmallSearchResult(returndata) { //alert("theResult"); DWRUtil.setValue("ip_training", returndata[1]); document.searchForm_fake.tq_fake.value = theKeywords; //DWRUtil.setValue("filter_naam",theChosenFilter); /* var tabs = $('trainsort').getElementsByTagName("a"); if ($('trainsort')) { for (var i=0; i < tabs.length; ++i) { tabBorder.render(tabs[i]); } } */ //CSBfleXcroll('traininglist_small'); } function homeSearchResult(returndata) { DWRUtil.setValue("ip_training_home", returndata[1]); //CSBfleXcroll('traininglist_big'); document.searchForm.tq.value = theKeywords; if (document.searchForm.tq) { document.searchForm.tq.focus(); } DWRUtil.setValue("filter_naam",theChosenFilter); DWREngine._execute(_cfscriptLocation, null, "getFilter", theChosenFilter, getFilterResult); } function getFilter(filter,containername) { theChosenFilter = filter; DWRUtil.setValue(containername,filter); DWREngine._execute(_cfscriptLocation, null, "getFilter", theChosenFilter, getFilterResult); } function getFilterResult(returndata) { DWRUtil.setValue("zoekfilter", returndata[1]); //CSBfleXcroll('optionwrapper_scroll_' + theChosenFilter + '_naam'); document.getElementById('optionwrapper_scroll_' + theChosenFilter + '_naam').toggle(0); if (returndata[0] == 1 && _referer) { location.href = _referer; } } function applyFilter(filteron,containername) { //alert(theChosenFilter); theChosenFilteron = filteron; var filterArray = new Array(txtSearching); DWRUtil.setValue("traininglist_container", filterArray[0]); DWRUtil.setValue(containername,theChosenFilteron); DWREngine._errorHandler = errorHandler; DWREngine._execute(_cfscriptLocation, null, "homesearch_search", 0,theChosenFilter, theChosenFilteron,0,theKeywords,advancedFilter,sortfield,sortorder,applyFilterResult); } function applyFilterResult(returndata) { //alert("theResult"); DWRUtil.setValue("traininglist_container", returndata[1]); //CSBfleXcroll('traininglist_big'); } function keywordSearch() { theKeywords = document.searchForm.tq.value; //alert(theKeywords); if(theKeywords.length >= minSearchLength) { DWREngine._errorHandler = errorHandler; DWREngine._execute(_cfscriptLocation, null, "homesearch_search", 0,theChosenFilter,theChosenFilteron,0,theKeywords,advancedFilter,sortfield,sortorder,applyFilterResult); } else { return } } function smallkeywordSearch() { theKeywords = document.searchForm.tq.value; if(theKeywords.length >= minSearchLength) { DWREngine._errorHandler = errorHandler; DWREngine._execute(_cfscriptLocation, null, "smallsearch_search", 0,theChosenFilter,theChosenFilteron,0,theKeywords,advancedFilter,sortfield,sortorder,applySmallFilterResult); } else { return } } function applySmallFilterResult(returndata) { //alert("theResult"); DWRUtil.setValue("traininglist_container", returndata[1]); //CSBfleXcroll('traininglist_small'); } function getTrainingData(fieldname,trainingId) { //alert('Yay! ' + trainingId); theObj = document.getElementById('select_wrapper_' + fieldname); //alert(theObj); DWRUtil.setValue("training_data", txtLoading); DWREngine._execute(_cfscriptLocation, null, "getTrainingData",trainingId,theObj.style.zIndex,getTrainingDataResult); } function checkAvailable(fieldname,dataId) { //alert('Yay! ' + dataId); //theObj = document.getElementById('select_wrapper_' + fieldname); //alert(theObj); //DWRUtil.setValue("training_data", txtLoading); //DWREngine._execute(_cfscriptLocation, null, "getTrainingData",trainingId,theObj.style.zIndex,getTrainingDataResult); //DWREngine._execute(_cfscriptLocation, null, "getDataBeschikbaar",dataId,checkAvailableResult); } function getTrainingDataResult(returndata) { maandaanbieding = 0; document.FrmInschrijf.maandaabieding.value = 'nee'; DWRUtil.setValue("training_data", returndata[1]); if(returndata[0] >= 5) { //reservelijst = 1 } if(returndata[0] == 2 || returndata[0] == 6) { DWREngine._execute(_cfscriptLocation, null, "getArrangement",getArrangementResult); } else if(returndata[0] == 3 || returndata[0] == 7) { maandaanbieding = 1; DWREngine._execute(_cfscriptLocation, null, "getAanbieding",getAanbiedingResult); } else if(returndata[0] == 4 || returndata[0] == 8) { maandaanbieding = 1; DWREngine._execute(_cfscriptLocation, null, "getArrangement",getArrangementResult); } else { DWRUtil.setValue("training_overnachting", ""); } } function getArrangementResult(returndata) { DWRUtil.setValue("training_overnachting", returndata[1]); if ( maandaanbieding == 1) { DWREngine._execute(_cfscriptLocation, null, "getAanbieding",getAanbiedingResult); } else { //DWRUtil.setValue("maandaanbieding", ""); } if ( reservelijst == 1) { DWREngine._execute(_cfscriptLocation, null, "getReservelijst",getReservelijstResult); } else { DWRUtil.setValue("reservelijst", ""); } } function getAanbiedingResult(returndata) { document.FrmInschrijf.maandaabieding.value = 'ja'; //DWRUtil.setValue("maandaanbieding", returndata[1]); if ( reservelijst == 1) { DWREngine._execute(_cfscriptLocation, null, "getReservelijst",getReservelijstResult); } else { DWRUtil.setValue("reserverlijst", ""); } } function getReservelijstResult(returndata) { DWRUtil.setValue("reservelijst", returndata[1]); } function antiSpamValididated(str) { var chck = document.getElementById('antiSpamValidation').value; return (hex_md5(str).toUpperCase() == chck.toUpperCase()); } function checkForm(formName,functionname) { var errorNum = 0; var firstfocus = ""; var errorTxt = "De volgende velden zijn onjuist: "; var currentFieldname = ''; //'Foutmelding
De verplichte velden met een • zijn niet (juist) ingevuld. Vul deze in en klik opnieuw op verzend.
'; var validateEmail = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-]+)+$/;//TO DO: Email validatie activeren for (var i=0;i