function setHeaderHeight() {
if($(window).scrollTop() > 40) {
$('.ixlsite').removeClass('ixlhdrhigh');
$('.ixlsite').addClass('ixlhdrlow');
} else {
$('.ixlsite').removeClass('ixlhdrlow');
$('.ixlsite').addClass('ixlhdrhigh');
}
}
function setCookieSelection(v) {
setCookie(window.location.hostname, 'cc', v, 180);
}
function toggleVisDiv(divIdStr) {
if (getDivVis(divIdStr)) {
setVisDivToInVis(divIdStr);
}
else {
setVisDivToVis(divIdStr);
}
}
function getDivVis(divIdStr) {
var divobj = document.getElementById(divIdStr);
if (typeof divobj == 'object' && divobj != null) {
return(divobj.className.indexOf('ixlvisible') >= 0)
}
}
function setVisDivToVis(divIdStr) {
var divobj = document.getElementById(divIdStr);
if (typeof divobj == 'object' && divobj != null) {
divobj.className = divobj.className.replace('ixlinvisible', 'ixlvisible');
}
}
function setVisDivToInVis(divIdStr) {
var divobj = document.getElementById(divIdStr);
if (typeof divobj == 'object' && divobj != null) {
divobj.className = divobj.className.replace('ixlvisible', 'ixlinvisible');
}
}
function addQspToUrl(uri, key, value) {
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
var separator = uri.indexOf('?') !== -1 ? "&" : "?";
if (uri.match(re)) {
return uri.replace(re, '$1' + key + "=" + value + '$2');
}
else {
return uri + separator + key + "=" + value;
}
}
function getElementInDiv(div, elId) {
var elm = {};
var elms = div.getElementsByTagName("*");
for (var i = 0; i < elms.length; i++) {
if (elms[i].id === elId) {
elm = elms[i];
break;
}
}
return elm;
}
function setCookie(domain, name, value, days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name + "=" + value + expires + "; path=/; domain=" + domain;
}
function getCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
function eraseCookie(name) {
createCookie(name, "", -1);
}
function scrollToGbIfHash(gbHash, gbId) {
if (window.location.hash.toLowerCase() == '#'+gbHash.toLowerCase()) {scrollToDiv(gbId);}
}
function scrollToDiv(divId) {
$('html, body').stop().animate({scrollTop: $('#'+divId).offset().top}, 1000);
}
function trackPageview(devMode, taalId, profielId, dotId, objId, page, indialog) {
var actAuthtokenId = getCookie('actat');
if (actAuthtokenId === null) {actAuthtokenId = ''};
var orgAuthtokenId = getCookie('orgat');
if (orgAuthtokenId === null) {orgAuthtokenId = ''};
if (!(orgAuthtokenId.length > 0)) {
var url = (devMode === 1 ? 'https://apihetleerportaalnl.interxl.com/' : 'https://api.hetleerportaal.nl/') + '1.0/createPageview/';
url = addQspToUrl(url, 'insthost', 'www.hetleerportaal.nl');
url = addQspToUrl(url, 'at', actAuthtokenId);
var usertokenId = getCookie('ut');
var sessiontokenId = getCookie('st');
var trackingtokenId = getCookie('tt');
var post = 'usertokenid=' + (usertokenId === null ? '' : usertokenId);
post = post + '&sessiontokenid=' + (sessiontokenId === null ? '' : sessiontokenId);
post = post + '&trackingtokenid=' + (trackingtokenId === null ? '' : trackingtokenId);
post = post + '&taalid=' + (taalId === null ? '' : taalId);
post = post + '&profielid=' + (profielId === null ? '' : profielId);
post = post + '&dotid=' + (dotId === null ? '' : dotId);
post = post + '&objid=' + (objId === null ? '' : objId);
post = post + '&page=' + (page === null ? '' : page);
post = post + '&indialog=' + (indialog === null ? 0 : indialog);
post = post + '&title=' + escape(document.title);
post = post + '&url=' + escape(document.URL);
post = post + '&screenwidth=' + screen.width;
post = post + '&screenheight=' + screen.height;
post = post + '&screeninnerwidth=' + window.innerWidth;
post = post + '&screeninnerheight=' + window.innerHeight;
post = post + '&refererfortracking=' + escape(document.referrer);
post = post + '&useragentfortracking=' + escape(navigator.userAgent);
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", url, true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
if (devMode == 1) {console.log(xmlHttp.responseText);};
responseObj = JSON.parse(xmlHttp.responseText);
if (responseObj.status == 'ok') {
setCookie(window.location.hostname, 'tt', responseObj.trackingtoken, 365)
setCookie(window.location.hostname, 'st', responseObj.sessiontoken, null)
setCookie(window.location.hostname, 'ut', responseObj.usertoken, null)
}
}
}
xmlHttp.send(post);
}
}
function share(devMode, taalId, platformId, profielId, dotId, objId, sharerUrlStr, actUrlQspStr) {
popupurl = addQspToUrl(sharerUrlStr, actUrlQspStr, window.location.href);
if (popupurl.length > 0) {
var trackurl = (devMode === 1 ? 'https://apihetleerportaalnl.interxl.com/' : 'https://api.hetleerportaal.nl/') + '1.0/createShare/';
trackurl = addQspToUrl(trackurl, 'insthost', 'www.hetleerportaal.nl');
trackurl = addQspToUrl(trackurl, 'at', getCookie('actat'));
var usertokenId = getCookie('ut');
var sessiontokenId = getCookie('st');
var trackingtokenId = getCookie('tt');
var post = 'usertokenid=' + (usertokenId === null ? '' : usertokenId);
post = post + '&sessiontokenid=' + (sessiontokenId === null ? '' : sessiontokenId);
post = post + '&trackingtokenid=' + (trackingtokenId === null ? '' : trackingtokenId);
post = post + '&taalid=' + (taalId === null ? '' : taalId);
post = post + '&platformid=' + (platformId === null ? '' : platformId);
post = post + '&profielid=' + (profielId === null ? '' : profielId);
post = post + '&dotid=' + (dotId === null ? '' : dotId);
post = post + '&objid=' + (objId === null ? '' : objId);
post = post + '&refererfortracking=' + escape(document.referrer);
post = post + '&useragentfortracking=' + escape(navigator.userAgent);
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST", trackurl, true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xmlHttp.onreadystatechange = function() {
if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
if (devMode == 1) {console.log(xmlHttp.responseText);};
responseObj = JSON.parse(xmlHttp.responseText);
if (responseObj.status == 'ok') {
setCookie(window.location.hostname, 'tt', responseObj.trackingtoken, 365)
setCookie(window.location.hostname, 'st', responseObj.sessiontoken, null)
setCookie(window.location.hostname, 'ut', responseObj.usertoken, null)
}
}
}
xmlHttp.send(post);
window.open(popupurl, '','width=600, height=460, left=' + (screen.width / 2 - 600 / 2) + ', top=' + (screen.height / 2 - 460 / 2) + ', scrollbars=yes, toolbar=no, location=yes');
}
}
function loadProp(inAppInt, taalAspId, profAspId, dotAspId, actObjIdLng, dopAspId, formitemDotAspId, formitemObjIdLng, overruleValDotIdLng, overruleValValueLng, forEditInt, forFilterInt, forListInt, forLabelInt) {
asyncLoad('ixlprop_' + dopAspId, '/_script/loadprop.asp' +
'?ia=' + inAppInt +
'&t=' + taalAspId +
'&pr=' + profAspId +
'&d=' + dotAspId +
'&o=' + actObjIdLng +
'&da=' + dopAspId +
'&fid=' + formitemDotAspId +
'&fio=' + formitemObjIdLng +
'&ovd=' + overruleValDotIdLng +
'&ovl=' + overruleValValueLng +
'&fo=' + forEditInt +
'&ff=' + forFilterInt +
'&fl=' + forListInt +
'&fb=' + forLabelInt)
}
function unloadProp(dopAspId) {
document.getElementById('ixlprop_' + dopAspId).innerHTML = '';
}
function loadGb(inAppInt, taalAspId, profAspId, dotAspId, actObjIdLng, gbTypeAspId, gbAspId, gbObjIdLng, gbDopToParentIdLng, gbParentDotIdLng, gbParentObjIdLng) {
asyncLoad('ixlgb_' + gbAspId + (gbObjIdLng !== null ? '_' + gbObjIdLng : ''), '/_script/loadgb.asp' +
'?ia=' + inAppInt +
'&t=' + taalAspId +
'&pr=' + profAspId +
'&d=' + dotAspId +
'&o=' + actObjIdLng +
'&gbt=' + gbTypeAspId +
'&gb=' + gbAspId +
'&go=' + gbObjIdLng +
'&dpd=' + gbDopToParentIdLng +
'&pd=' + gbParentDotIdLng +
'&po=' + gbParentObjIdLng)
}
function asyncLoad(elementid, url) {
try {var xmlHttpObj = new XMLHttpRequest();}
catch (e) {try {xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");}
catch (e) {xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");}
}
if (xmlHttpObj == null) {alert('Browser not supported.'); return;}
xmlHttpObj.onreadystatechange = function() {
if (this.readyState == 4) {
var iStatusLng = this.status;
var iResponseObj = this.responseXML;
if (iResponseObj != null) {
var iResponseHtmlObj = iResponseObj.getElementsByTagName('html')[0].firstChild;
var iResponseJsObj = iResponseObj.getElementsByTagName('js')[0].firstChild;
}
if (iStatusLng == 200) {
if (iResponseObj != null) {
document.getElementById(elementid).innerHTML = (iResponseHtmlObj != null) ? iResponseHtmlObj.nodeValue : '';
} else {
document.getElementById(elementid).innerHTML = '
< geen data >
'; } } else if (iStatusLng == 400) { if (iResponseObj != null) { document.getElementById(elementid).innerHTML = (iResponseHtmlObj != null) ? '' + iResponseHtmlObj.nodeValue + '
' : ''; } else { document.getElementById(elementid).innerHTML = '< geen data >
'; } } else { document.getElementById(elementid).innerHTML = 'Error: http-status ' + iStatusLng + '
'; }; //document.getElementById(elementid).innerHTML = 'debug: link
' + document.getElementById(elementid).innerHTML; eval((iResponseJsObj != null) ? iResponseJsObj.nodeValue : ''); //if (this.status == 200) { // if (this.responseXML != null) { // document.getElementById(elementid).innerHTML = (this.responseXML.getElementsByTagName('html')[0].firstChild != null) ? this.responseXML.getElementsByTagName('html')[0].firstChild.nodeValue : ''; // eval((this.responseXML.getElementsByTagName('js')[0].firstChild != null) ? this.responseXML.getElementsByTagName('js')[0].firstChild.nodeValue : ''); // } else { // document.getElementById(elementid).innerHTML = 'Empty response: ' + url; // } //} else { // document.getElementById(elementid).innerHTML = 'Error loading: ' + this.status; //}; }; }; xmlHttpObj.open('GET', url, true); xmlHttpObj.send(); } function controleerFormLoaded(obj) { melding = "Formulier nog niet volledig geladen"; if (languageKeyword == 'UK') { melding = "Form not entirely loaded"; } if (obj === undefined) { alert(melding); return(false); } if (obj.value != '1') { alert(melding); return(false); } return(true); } function toggleGbVis(div, gbid) { if (div.classList.contains('togglevis_closed')) { eval('loadgb_' + gbid + '()'); div.classList.replace('togglevis_closed', 'togglevis_open'); getElementInDiv(div, 'arrow').classList.replace('right', 'down'); } else { document.getElementById(gbid).innerHTML = ''; div.classList.replace('togglevis_open', 'togglevis_closed'); getElementInDiv(div, 'arrow').classList.replace('down', 'right'); } } function openDialog(dialogname) { document.getElementById('ixldialogbg').style.display = 'block'; document.getElementById('ixldialogcnt').style.display = 'none'; document.getElementById('ixldialogloading').style.display = 'block'; try {var xmlHttpObj = new XMLHttpRequest();} catch (e) {try {xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP");} } if (xmlHttpObj == null) {alert('Browser not supported.'); return;} xmlHttpObj.onreadystatechange = function() { if (this.readyState == 4) { if (this.status == 200) { processDialogXml(this.responseXML); } else { closeDialog(); alert("Error loading dialog: " + this.status); }; }; }; xmlHttpObj.open('GET', '/_script/opendialog.asp?dn=' + dialogname, true); xmlHttpObj.send(); } function processDialogXml(xmlObj) { var dlName = (xmlObj.getElementsByTagName('name')[0].firstChild != null) ? xmlObj.getElementsByTagName('name')[0].firstChild.nodeValue : ''; var dlRedirurl = (xmlObj.getElementsByTagName('redirurl')[0].firstChild != null) ? xmlObj.getElementsByTagName('redirurl')[0].firstChild.nodeValue : ''; var dlHtml = (xmlObj.getElementsByTagName('html')[0].firstChild != null) ? xmlObj.getElementsByTagName('html')[0].firstChild.nodeValue : ''; var dlJs = (xmlObj.getElementsByTagName('js')[0].firstChild != null) ? xmlObj.getElementsByTagName('js')[0].firstChild.nodeValue : ''; if (dlRedirurl.length != 0) { document.location.href = dlRedirurl; } else { document.getElementById('ixldialogloading').style.display = 'none'; document.getElementById('ixldialogcnt').style.display = 'block'; document.location.href = '#' + dlName; document.getElementById('ixldialogcontent').innerHTML = dlHtml; if (dlJs.length != 0) { var dialogscript = document.createElement('script'); dialogscript.type = 'text/javascript'; dialogscript.id = 'dialogscript'; try { dialogscript.appendChild(document.createTextNode(dlJs)); document.body.appendChild(dialogscript); } catch (e) { dialogscript.text = dlJs; document.body.appendChild(dialogscript); } } } } function closeDialog() { var dialogscript = document.getElementById('dialogscript'); if (dialogscript != null) { document.body.removeChild(dialogscript); }; document.getElementById('ixldialogcontent').innerHTML = ''; // anders blijven forms met validators actief etc document.getElementById('ixldialogbg').style.display = 'none'; window.history.replaceState('', '', document.location.href.replace(document.location.hash, '')); } var xmlHttpObj; var progressIdStr; var timeoutIdStr; function showPersitsProgress(pidStr) { try { xmlHttpObj = new XMLHttpRequest(); } catch (e) { try { xmlHttpObj = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttpObj = new ActiveXObject("Microsoft.XMLHTTP"); } } if (xmlHttpObj == null) { alert('Browser not supported.'); return; } document.getElementById('ixlgrid').style.display = 'none'; document.getElementById('ixlprogress').style.display = 'block'; progressIdStr = pidStr; updatePersitsProgress(); } function updatePersitsProgress() { xmlHttpObj.open('GET','/_script/persitsprogress.asp?pid=' + progressIdStr, (navigator.userAgent.indexOf('Chrome') >= 0 || navigator.userAgent.indexOf('Safari') >= 0)); xmlHttpObj.onreadystatechange = persitsProgressStateChanged; xmlHttpObj.send(null); } function persitsProgressStateChanged() { if (xmlHttpObj.readyState == 4) { if (xmlHttpObj.responseText == "") { clearTimeout(timeoutIdStr); timeoutIdStr = setTimeout('updatePersitsProgress()', 1000); return; } var xmlObj = xmlHttpObj.responseXML; if (!(xmlObj.getElementsByTagName('RemainingBytes')[0].firstChild.nodeValue == 0)) { document.getElementById('ixlprogresscontent').innerHTML = '' + ' ' + '