//Global varsvar enl_buttonurl = new Array(), enl_buttontxt = new Array(), enl_buttonoff = new Array(); //for imagezoomvar pathname = window.location.pathname.toLowerCase();var path = pathname.substring(0, (pathname.lastIndexOf('.nsf') + 4));var _sitelanguage = 'nl';/** * * Function to open in popup * **/function showPopup(url, width, height){    var pu = window.open(url, 'popup', 'toolbar=no,statusbar=no,scrollbars,width=' + width + ',height=' + height);    try {        pu.focus();    }     catch (e) {        alert('De pagina kan niet geopend worden in een nieuw scherm. Controleer of uw pop-up blokker dit blokkeert.');    }    }/** * * Function to open content in contentonly iframe for flashbased websites * called once on initial load of the flashpage * **/function openContentOnly(theurl){    //first check if iframe exists    var coiframe = $("#coiframe");    if (coiframe) {        //alert('iframe bestaat wel. url=' + theurl );    }    else {        //iframe bestaat nog niet, aanmaken        //alert('iframe bestaat niet, aanmaken. url=' + theurl);        var el = new Element('iframe', {            id: 'coiframe',            name: 'coiframe',            width: '100%',            frameborder: '0',            scrolling: 'no'        });        //el.addEvent('load', function(e) {resizeCOFrame();});        var elcontainer = $("#co-container");        elcontainer.before(el);        elcontainer.remove(); //verwijderen uit de DOM    }    //then open url in de contentonly iframe    //$("#coiframe").src=theurl;    $("#coiframe").attr("src", theurl);    return false;    }/** * * Function to check all links and append co=1 to querystring * and make them open in contentonly iframe for flashbased websites * only called once on intial load on the flashpage * pages in iframe call the appendCOQueryString() function onload * **/function initFlashPage(){    //get all links    jQuery.each($("a"), function(index){        var theurl = $(this).attr("href");        //check if url is content from this db        if (theurl.indexOf('.nsf') > -1 && theurl.indexOf('javascript:') == -1 && theurl.indexOf('&co=1') == -1 && theurl.indexOf('mailto:') == -1 && theurl != '#') {            //check nu of er ?open in de url staat toegevoegd            var qs = ''; //the querystring            if (theurl.indexOf('?') == -1 ) {                //toevoegen                 qs = '?open';            }            //en voeg de querystring co=1 toe            //zodat enkel de contentonly tekst van de pagina wordt geopend (zonder de flash)            qs += '&co=1';            theurl += qs;            //alert(theurl);            //en link openen in de contentonly iframe            $(this).click(function(){                openContentOnly(theurl);                return false;            });        }    });        //create the contentonly iframe and make it hidden    //	var el = new Element('iframe', {id: 'coiframe', name: 'coiframe', width: '100%', frameborder: '0', scrolling: 'no'});    //el.addEvent('load', function(e) {resizeCOFrame();});    //	el.setStyle('display','none');    //	var elcontainer = $('co-container');    //	el.inject(elcontainer,'before');}/** * * Function to check all links and append co=1 to querystring * and make them open in contentonly iframe for flashbased websites * called onload on the content only pages in the coiframe * since the links are already in the iframe, no target is needed * **/function appendCOQueryString(){    //get all links    jQuery.each($("a"), function(index){        var theurl = $(this).attr("href");        //check if url is content from this db        if (theurl && theurl.indexOf('http') == -1 && theurl.indexOf('javascript:') == -1 && theurl.indexOf('&co=1') == -1 && theurl.indexOf('mailto:') == -1 && theurl != '#') {            //check nu of er ?open in de url staat toegevoegd            var qs = ''; //the querystring            if (theurl.indexOf('?') == -1 ) {                //toevoegen                 qs = '?open';            }            //en voeg de querystring co=1 toe            //zodat enkel de contentonly tekst van de pagina wordt geopend (zonder de flash)            qs += '&co=1';            //en querystring toevoegen aan de href            $(this).attr("href", theurl + qs);        }    });    resizeCOFrame(); //tevens iframe resizen	}/** * * Function to check all links in the searchresults and append co=1 to querystring * and make them open in contentonly iframe for flashbased websites * called onload on the searchresult page in the coiframe * since the links are in the searchresult iframe, targeting to coiframe is  needed * **/function appendCOSearchQueryString(){    //get all links    jQuery.each($("a"), function(index){        var theurl = $(this).attr("href");        //check if url is content from this db        if (theurl.indexOf('.nsf') > -1 && theurl.indexOf('javascript:') == -1 && theurl.indexOf('mailto:') == -1 && theurl.indexOf('&co=1') == -1 && theurl != '#') {            //check nu of er ?open in de url staat toegevoegd            var qs = ''; //the querystring            if (theurl.indexOf('?') == -1) {                //toevoegen                 qs = '?open';            }            //en voeg de querystring co=1 toe            //zodat enkel de contentonly tekst van de pagina wordt geopend (zonder de flash)            qs += '&co=1';            //en link openen in de contentonly iframe            $(this).click(function(){                parent.location.href = theurl + qs;                return false;            });                    }    });    resizeCOFrame(); //tevens iframe resizen	}/** * * Function to resize height for ContentOnly frame * so content always fits in the iframe without scrollbars * **/function resizeCOFrame(){    if (self == parent) {		return false; //zit niet in een iframe	}    //De evt aanwezige co-container verwijderen    var elcontainer = parent.document.getElementById("co-container");    if (elcontainer) {        //indien aanwezig, dan co-container verwijderen        //hierin staat namelijk nog de initiele content van de pagina        parent.$("#co-container").remove(); //verwijderen uit de DOM    }    //var myIframe = parent.document.getElementById("coiframe");    var myIframe = parent.document.getElementById("coiframe");    if (myIframe) {        //iframe unhiden        myIframe.style.display = "block";        if (myIframe.contentDocument && myIframe.contentDocument.body.offsetHeight) {            //w3c and mozilla            var w3cHeight = myIframe.contentDocument.body.offsetHeight;            myIframe.height = w3cHeight;            //myIframe.height = myIframe.contentDocument.body.offsetHeight;        }        else             if (myIframe.Document && myIframe.Document.body.scrollHeight) {                //ie                var ieHeight = myIframe.Document.body.scrollHeight;                myIframe.height = ieHeight;            //myIframe.height = myIframe.Document.body.scrollHeight;            }    }    }function resizeContentFrame(){    if (self == parent) {		return false; //zit niet in een iframe	}    var myIframe = parent.document.getElementById("contentframe");    if (myIframe) {        if (myIframe.contentDocument && myIframe.contentDocument.body.offsetHeight) {            //w3c and mozilla            var w3cHeight = myIframe.contentDocument.body.offsetHeight + 10;            w3cHeight < 480 ? myIframe.height = 480 : myIframe.height = w3cHeight;            //myIframe.height = myIframe.contentDocument.body.offsetHeight;        }        else             if (myIframe.Document && myIframe.Document.body.scrollHeight) {                //ie                var ieHeight = myIframe.Document.body.scrollHeight;                ieHeight < 480 ? myIframe.height = 480 : myIframe.height = ieHeight;            //myIframe.height = myIframe.Document.body.scrollHeight;            }    }}/** * * Function to disable user created links when in preview mode * **/function resetLinks(){    for (var x = 0; x < document.links.length; x++) {        document.links[x].href = "javascript: void(0)";    }}/**** Function to fix basketback link in webwinkel***/function basketBackLink() {	var sysC = $('#sysContinue'), myC = $('#myContinue');    if (sysC) {		var oc = sysC.attr('onclick').toString(), bu = oc.match(/\b(https?|ftp|file):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i)[0];	}    if (sysC && myC) {        sysC.hide();        myC.attr('href', bu).show();    }}//TRIM STRING PROTOTYPEString.prototype.trim = function(){    return (this.replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/, '$1'));};/** * * Send Initial Search for Flash website in order to create coiframe * **/function doSearchCO(url){    var fld = document.forms[0].Query ? document.forms[0].Query : document.forms[1].Query;    if (fld.value == "" || fld.value == "Zoeken...") {        //return false;    }    else {        //indien een flashheader, dan dient de zoekresultaten in het coiframe geopend te worden        //indien coiframe niet bestaat, dan eerst aanmaken        var thequery = buildQuery(fld.value);        //check ofcoiframe bestaat        if ($("#coiframe")) {        }        else {            //iframe bestaat nog niet, aanmaken            var el = new Element('iframe', {                id: 'coiframe',                width: '100%',                frameborder: '0',                scrolling: 'no'            });            var elcontainer = $("#co-container");            elcontainer.before(el);            elcontainer.remove(); //verwijderen uit de DOM        }        //then open searchresults in de contentonly iframe        $("#coiframe").attr("src", url + thequery);        //return false; // see NOTE    }}/** * * Send Search for Non-Flash website en Flash Website second searches * **/function doSearch(url){    var fld = document.forms[0].Query ? document.forms[0].Query : document.forms[1].Query;    if (fld.value == "" || fld.value == "Zoeken...") {        //return false;    }    else {        location.href = url + buildQuery(fld.value);    }}/** * * Send Search for Non-Flash website en Flash Website second searches * Identiek aan doSearch, but uses unigue name * **/function doSearchSite(url){    var fld = document.forms[0].Query ? document.forms[0].Query : document.forms[1].Query;    if (fld.value == "" || fld.value == "Zoeken...") {        //return false;    }    else {        top.location.href = url + buildQuery(fld.value);    }}/** * * Send Vacature Search for Non-Flash website en Flash Website second searches * Identiek aan doSearch, but uses unigue name * **/function doSearchVacatures(url){    var fld = document.forms['vacatureform'].Query;    if (fld.value == "" || fld.value == "Zoeken...") {        //return false;    }    else {        location.href = url + buildQuery(fld.value);    }}/** * * Send Search to webwinkel for searchin products * **/function doSearchWebwinkel(url){    var fld = document.forms['webwinkelsearch'].ShopQuery;    if (fld.value == "" || fld.value == "Zoek artikel...") {        //return false;    }    else {	    var q = encodeURIComponent(fld.value);        location.href = url + '&_globalsearch=' + q;    }}/** * * Function to build domino search query * **///Rewrites a search query to a Lotus Domino search queryfunction buildQuery(q){    //var fld = document.forms[0].Query ? document.forms[0].Query : document.forms[1].Query;    //var q = fld.value;            //PUT # IN FRONT AND AFTER QUOTES FOR SPLITTING    var s = (" " + q).replace(/-\"/g, "#-\"");    s = s.replace(/ \"/g, " #\"");    s = s.replace(/\" /g, "\"# ");        //HANDLE + e.g. mike+golding  e.g. news +it    s = s.replace(/ \+/g, " ");    s = s.replace(/\+/g, " AND ");        s = s.trim();    //CHECK FOR FIRST CHARACTER BEING A #    if (s.substring(0, 1) == "#") {        var s = s.substring(1, s.length);    }        //alert("|" + s + "|");        //SPLIT ELEMENTS INTO AN ARRAY    var array = s.split("#");        //REPLACE KEYWORDS NOT, AND, OR WHEN NOT IN A QUOTED STRING    for (var i = 0; i < array.length; i++) {        var e = array[i].replace(/\$1/g, "").trim();        //alert("|" + e + "|");        if (e.indexOf("\"") < 0) {                    //REPLACE - (minus) WITH NOT (CLOSED SPACES)            e = (" " + e).replace(/ -/g, " NOT");                        //CLOSE SPACES BETWEEN ORs SO ANDs ARE NOT PUT IN            e = e.replace(/ OR /g, "OR");                                    //REMOVE EXISTING ANDs for SPACES or ""            e = e.replace(/ AND /g, " ");            e = e.replace(/ AND/g, "");            e = e.replace(/AND /g, "");                                    //REPLACE ALL SPACES FOR ANDs            e = e.trim().replace(/ /g, " AND ");                        //PUT NOTs BACK IN            e = e.replace(/NOT/g, " NOT ");            //PUT ORs BACK IN            e = e.replace(/OR/g, " OR ");                    }        else {            //REPLACE ANY - AT START OF QUOTED STRING            e = e.replace(/-\"/g, "NOT \"");        }        array[i] = e;        //alert(array[i]);    }            //JOIN ARRAY WITH ANDs    var domQ = array.join(" AND ").trim();    //REPLACE DOUBLE KEYWORDS ARFTER JOINING EVERYTHING WITH AND    domQ = domQ.replace(/  AND/g, "").replace(/AND  /g, "");    domQ = domQ.replace(/ AND OR/g, " OR");    domQ = domQ.replace(/ AND NOT/g, " NOT");    domQ = domQ.replace(/ AND AND/g, " AND");            //alert( domQ);    return domQ;    }function noCache(){    var datum = new Date();    return datum.getTime();}/* ************************************************************************************* *\ * Functions to handle jQuery XHR requests * \* ************************************************************************************* */jQuery().ajaxStart(function(){    jQuery('#frmflds').hide();    jQuery('#errormsg').hide();    if (_sitelanguage == 'en') {        jQuery('#submitmsg').before('<div id="waitmsg">Please wait a moment...</div>');    }    else         if (_sitelanguage == 'de') {            jQuery('#submitmsg').before('<div id="waitmsg">Bitte einen Moment warten...</div>');        }        else {            jQuery('#submitmsg').before('<div id="waitmsg">Bezig met verzenden<br><br>Een ogenblik geduld a.u.b....</div>');        }}).ajaxStop(function(){    jQuery('#waitmsg').remove();}).ajaxError(function(a, b, e){    jQuery('#frmflds').show();    jQuery('#errormsg').show();    if (_sitelanguage == 'en') {        jQuery('#errormsg').html('An error has occured.<br>Please try again later.');    }    else         if (_sitelanguage == 'de') {            jQuery('#errormsg').html('Ein Fehler ist aufgetreten.<br>Bitte probieren Sie sp&auml;ter wieder.');        }        else {            jQuery('#errormsg').html('Er is een fout opgetreden tijdens het verzenden. <br>Probeer het later nog eens.');        }    return false;});//webwinkel functie voor tonen grote afbeelding in prodcut detail info//bij onmouse over van thumbvar showProdImg = function(curimg,imgsrc) {	$('#prod-img-big').attr('src',imgsrc);};/**** Webwinkelfunctie om de scroolposte te verkrijgen* Bij selecteren variant kan dan naar de exacte positie teruggekeerd worden***/function getScrollPosInet(){		//if(f&&f["xy"]){			var xy="";			try{				if(document.all){					if(document.documentElement)xy=document.documentElement.scrollLeft+';'+document.documentElement.scrollTop;					else xy=document.body.scrollLeft+';'+document.body.scrollTop;				}				else xy=window.pageXOffset+';'+(window.pageYOffset);			}			catch(e){};			//f["xy"].value=xy;			return xy;		//}	}	/**** Webwinkelfunctie om na onload van productvariant* naar de exacte vorige positie op de pagina terug te keren***/function setScrollPosInet(xy){	if(xy!=''){			var l=xy.split(';');			if(l.length>1){				window.scrollTo(l[0],l[1])			}		}}//webwinkel functie voor selecteren andere productvariant keuze//toont het productvariant met de desbetreffende keuzes//obj = het select box fieldfunction selectProductVariant(obj, querystring) {	val = obj.options[obj.selectedIndex].value;	//indien val niet leeg, dan productvariant openen ahv val	//tevens scrollpositie meegeven om terug te keren naar exacte scrollpositie	var xy = getScrollPosInet();	if (val != "") {		location.href = val + '.html?open' + querystring + '&xy=' + xy;	}}//webwinkel functie voor selecteren andere productvariant keuze//melding indien zowel kleur als maatariant keuzes//in dat geval eerst de kleur kiezen indien maat geselecteerd wordt//obj = het select box fieldfunction selectKleurFirst(obj) {	alert('U dient eerst een kleur te selecteren!');	obj.selectedIndex=0;	//return false;}//webwinkel functie voor selecteren 2e productvariant keuze//melding indien 1e variant keuze nog niet geslecteerd is//obj = het select box field//fldlabel = naam van het 1e productvariant veld function selectVariantFirst(obj, fldlabel) {	alert('U dient eerst de ' + fldlabel + ' te selecteren!');	obj.selectedIndex=0;	//return false;}//Toont melding indien product niet op voorraad is bij klikken op bestelbuttonfunction noVoorraadMsg() {	alert('This product is out of stock!');	return false;}/* ************************************************************************************* *\ * Functions to handle field validation. Does not submit form (use for YMLP) * \* ************************************************************************************* */function validateFields(formid, errorcontainer){          $(formid).validate({        //errorLabelContainer:$("#errormsg"),        invalidHandler: function(e, validator){            var errors = validator.numberOfInvalids();            if (errors) {                if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {                    var message = 'Please fill in the required fields.';                }                else                     if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                        var message = 'Bitte f&uuml;llen Sie den markierten Feldern aus.';                    }                    else {                        var message = 'Vul a.u.b. de gemarkeerde velden in.';                    }                $(errorcontainer).html(message);                $(errorcontainer).show();            }            else {                $(errorcontainer).hide();            }        },        onkeyup: false    });    }/* ************************************************************************************* *\ * Functions to handle form submit by ajax including field validation * \* ************************************************************************************* */function validateForm(formid, posturl, method){	$("#errormsg").hide();	    var options = {        dataType: 'xml',        url: posturl + '&nc=' + noCache(),        type: method || 'POST',        success: showXMLResponse,        cache: false,        timeout: 300000    };        var v = $(formid).validate({        //errorLabelContainer:$("#errormsg"),        invalidHandler: function(e, validator){            var errors = validator.numberOfInvalids();            if (errors) {                if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {                    var message = 'Please fill in the required fields.';                }                else                     if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                        var message = 'Bitte f&uuml;llen Sie den markierten Feldern aus.';                    }                    else {                        var message = 'Vul a.u.b. de gemarkeerde velden in.';                    }                $("#errormsg").html(message);                $("#errormsg").show();            }            else {                $("#errormsg").hide();            }        },        onkeyup: false,        submitHandler: function(form){            $(form).ajaxSubmit(options);            return false;        }    });    }/* ************************************************************************************* *\ * Function to show review form * \* ************************************************************************************* */function showWriteReview() {		$('#review-writeblock').show();}/* ************************************************************************************* *\ * Functions to handle review form submit by ajax including field validation * \* ************************************************************************************* */function validateReviewForm(formid, posturl, method){	$("#errormsg").hide();	    var options = {        dataType: 'xml',        url: posturl + '&nc=' + noCache(),        type: method || 'POST',        success: showReviewXMLResponse,        cache: false,        timeout: 300000    };        var v = $(formid).validate({        //errorLabelContainer:$("#errormsg"),        invalidHandler: function(e, validator){            var errors = validator.numberOfInvalids();            if (errors) {                if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {                    var message = 'Please fill in the required fields.';                }                else                     if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                        var message = 'Bitte f&uuml;llen Sie den markierten Feldern aus.';                    }                    else {                        var message = 'Vul a.u.b. de gemarkeerde velden in.';                    }                $("#errormsg").html(message);                $("#errormsg").show();            }            else {                $("#errormsg").hide();            }        },        onkeyup: false,        submitHandler: function(form){            $(form).ajaxSubmit(options);            return false;        }    });    }function showReviewXMLResponse(responseXML){    try {        var statustext = $('status', responseXML).text();        var statusmsg = $('msg', responseXML).text();        if (statustext == 'ok') {            var redirect = $('redirect', responseXML).text();            if (redirect) {                location.replace(redirect);            }            else {                $('#submitmsg').html(statusmsg);                var script = $('script', responseXML).text();                if (script) {                    eval(script);                }                            }        }        else {            $('#frmflds').show();            $('#errormsg').show();            $('#errormsg').html(statusmsg);			  var script = $('script', responseXML).text();                if (script) {                    eval(script);                }        }    }     catch (e) {        $('#frmflds').show();        $('#errormsg').show();        if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {            $('#errormsg').html('An error has occured.<br>Please try again later.');        }        else             if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                $('#errormsg').html('Ein Fehler ist aufgetreten.<br>Bitte probieren Sie sp&auml;ter wieder.');            }            else {                $('#errormsg').html('Er is een fout opgetreden tijdens het verzenden. <br>Probeer het later nog eens.');            }    }}/* ************************************************************************************* *\ * Functions to handle lost password submit by ajax including field validation * \* ************************************************************************************* */function validatePWForm(formid, posturl, method){	jQuery.validator.messages.email='';    var options = {        dataType: 'xml',        url: posturl + '&nc=' + noCache(),        type: method || 'POST',        success: showXMLResponse,        cache: false,        timeout: 8000    };        var v = $(formid).validate({        //errorLabelContainer:$("#errormsg"),        invalidHandler: function(e, validator){            var errors = validator.numberOfInvalids();            if (errors) {                if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {                    var message = 'Please fill in the required fields.';                }                else                     if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                        var message = 'Bitte f&uuml;llen Sie den markierten Feldern aus.';                    }                    else {                        var message = 'Vul a.u.b. een geldige gebruikersnaam in.';                    }                $("#errormsg").html(message);                $("#errormsg").show();            }            else {                $("#errormsg").hide();            }        },        onkeyup: false,        submitHandler: function(form){            $(form).ajaxSubmit(options);            return false;        }    });    }function showXMLResponse(responseXML){    try {        var statustext = $('status', responseXML).text();        var statusmsg = $('msg', responseXML).text();        if (statustext == 'ok') {            var redirect = $('redirect', responseXML).text();            if (redirect) {                location.replace(redirect);            }            else {                $('#submitmsg').html(statusmsg);                var script = $('script', responseXML).text();                if (script) {                    eval(script);                }                            }        }        else {            $('#frmflds').show();            $('#errormsg').show();            $('#errormsg').html(statusmsg);			  var script = $('script', responseXML).text();                if (script) {                    eval(script);                }        }    }     catch (e) {        $('#frmflds').show();        $('#errormsg').show();        if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {            $('#errormsg').html('An error has occured.<br>Please try again later.');        }        else             if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                $('#errormsg').html('Ein Fehler ist aufgetreten.<br>Bitte probieren Sie sp&auml;ter wieder.');            }            else {                $('#errormsg').html('Er is een fout opgetreden tijdens het verzenden. <br>Probeer het later nog eens.');            }    }}/* ************************************************************************************* *\ * Functions to handle tell a friend form submit by ajax including field validation * \* ************************************************************************************* */function validateTAFForm(formid, posturl, method){    var options = {        dataType: 'xml',        url: posturl + '&nc=' + noCache(),        type: method || 'POST',        success: showTAFResponse,        cache: false,        timeout: 8000    };        var v = $(formid).validate({        //errorLabelContainer:$("#errormsg"),        invalidHandler: function(e, validator){            var errors = validator.numberOfInvalids();            if (errors) {                if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {                    var message = 'Please fill in the required fields.';                }                else                     if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                        var message = 'Bitte f&uuml;llen Sie den markierten Feldern aus.';                    }                    else {                        var message = 'Vul a.u.b. de gemarkeerde velden in.';                    }                $("#errormsg").html(message);                $("#errormsg").show();            }            else {                $("#errormsg").hide();				$('#TAFMailbody').hide();				$('#TAFinleiding').hide();            }        },        onkeyup: false,        submitHandler: function(form){            $(form).ajaxSubmit(options);            return false;        }    });    }/** * Show response after Tell a Friend form submit * * Toont het te verzenden tell a friend e-mail bericht * * */function showTAFResponse(responseXML){    try {        var statustext = $('status', responseXML).text();        var statusmsg = $('msg', responseXML).text();        if (statustext == 'ok') {			if (document.forms[0].SendNr.value == "1") {				//daadwerkelijk versturen van de mail				$('#errormsg').hide();				$('#TAFMailbody').hide();				$('#TAFinleiding').hide();				$('#TAFFields').hide();				$('#submitmsg').html(statusmsg);				setTimeout("parent.$.fn.colorbox.close()", 2500); //sluit dialog				}			else {				//velden zijn juist ingevoerd. Nu dienen we het te verzenden e-mail				//bericht te tonen. Is verplicht volgens de wetgeving				document.forms[0].SendNr.value="1";				$('#btnNext').hide();				$('#btnSend').show();				$('#inleiding').hide();				$('#TAFFields').hide();				$('#TAFMailbody').html(statusmsg);				$('#TAFMailbody').show();				$('#TAFinleiding').show();			}        }        else {            $('#errormsg').show();            $('#errormsg').html(statusmsg);        }    }     catch (e) {        $('#errormsg').show();        if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {            $('#errormsg').html('An error has occured.<br>Please try again later.');        }        else             if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                $('#errormsg').html('Ein Fehler ist aufgetreten.<br>Bitte probieren Sie sp&auml;ter wieder.');            }            else {                $('#errormsg').html('Er is een fout opgetreden tijdens het verzenden. <br>Probeer het later nog eens.');            }    }}/* ************************************************************************************* *\ * Functions to handle Voorraad mail form submit by ajax including field validation * \* ************************************************************************************* */function validateVoorraadMailForm(formid, posturl, method){    var options = {        dataType: 'xml',        url: posturl + '&nc=' + noCache(),        type: method || 'POST',        success: showVoorraadMailResponse,        cache: false,        timeout: 8000    };        var v = $(formid).validate({        //errorLabelContainer:$("#errormsg"),        invalidHandler: function(e, validator){            var errors = validator.numberOfInvalids();            if (errors) {                if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {                    var message = 'Please fill in a valid e-mail address.';                }                else                     if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                        var message = 'Bitte f&uuml;llen Sie den markierten Feldern aus.';                    }                    else {                        var message = 'Vul een geldig e-mail adres in.';                    }                $("#errormsg").html(message);                $("#errormsg").show();            }            else {                $("#errormsg").hide();				$('#Mailbody').hide();	            }        },        onkeyup: false,        submitHandler: function(form){            $(form).ajaxSubmit(options);            return false;        }    });    }/** * Show response after Voorraad mail form submit * * Toont het te verzenden voorraad e-mail bericht * * */function showVoorraadMailResponse(responseXML){    try {        var statustext = $('status', responseXML).text();        var statusmsg = $('msg', responseXML).text();        if (statustext == 'ok') {				//daadwerkelijk versturen van de mail				$('#errormsg').hide();				$('#Mailbody').hide();				$('#VoorraadFields').hide();				$('#submitmsg').html(statusmsg);				setTimeout("parent.$.fn.colorbox.close()", 3500); //sluit dialog	        }        else {			 $('#frmflds').show();            $('#errormsg').show();            $('#errormsg').html(statusmsg);        }    }     catch (e) {		 $('#frmflds').show();        $('#errormsg').show();        if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'en') {            $('#errormsg').html('An error has occured.<br>Please try again later.');        }        else             if (typeof _sitelanguage != 'undefined' && _sitelanguage == 'de') {                $('#errormsg').html('Ein Fehler ist aufgetreten.<br>Bitte probieren Sie sp&auml;ter wieder.');            }            else {                $('#errormsg').html('Er is een fout opgetreden tijdens het verzenden. <br>Probeer het later nog eens.');            }    }}/** * Portfolio overzicht * * Toont grote thumbnail in catitem bij mouseover * * */var showCatItemThumb = function(imgsrc){    $('#thumb-big').html('<img src="' + imgsrc + '" width="300">');};/** * Vacature module script * * Toont veld 'anders' bij selecteren Anders bij Opleidingen (onchange) * * */var selectOpleidingAnders = function(veld, veldnr){	var keuze = veld.options[veld.selectedIndex].value;	var andersfld = document.getElementById('OpleidingAnders' + veldnr);	if(keuze=="Anders") {		//toon vrij invulveld		andersfld.style.display='block';	} else {		//hide vrij invulveld		andersfld.style.display='none';		andersfld.value = '';	}};/** * Vacature module script * * Toont veld 'anders' bij selecteren Anders bij Functie (onchange) * * */var selectFunctieAnders = function(veld, veldnr){	var keuze = veld.options[veld.selectedIndex].value;	var andersfld = document.getElementById('FunctieAnders' + veldnr);	if(keuze=="Anders") {		//toon vrij invulveld		andersfld.style.display='block';	} else {		//hide vrij invulveld		andersfld.style.display='none';		andersfld.value = '';	}};/** * Occasion module script * Send Occasion Search * **/function doOccasionSearch(){    //bouw de searchquery voor de occasions    var merk = $('AutoMerk').get('value');    var model = $('AutoModel').get('value');    var brandstof = $('AutoBrandstof').get('value');    var q = merk == '0' ? '' : merk + '&';    q += model == '0' ? '' : model + '&';    q += brandstof == '0' ? '' : brandstof;    if (q == '') {        location.href = _dbpath + 'occasions?readform';    }    else {        location.href = _dbpath + 'searchoccasions?readform&search=' + q;    }}/** * Occasion module script * * Add click to Occasions tablerows to open oaccsions info doc * * */var rowSelect = {    showInfo: function(details){        if (details.row) {            if (details.row.getElementsByTagName("th").length != 0) {                // return false to tell the script not to select this row                return false;            }            if (details.cell.className != "fotolink" && details.cell.className != "foto") {                top.location.href = path + '/vcontent/' + details.row.id;            }        }            }};/** * Occasion module script * * Toont grote thumbnail in occasion info bij mouseover * * */var showThumbAuto = function(imgsrc){    $('thumb-big').set('html', '<img src="' + imgsrc + '" width="300">');};/** * Occasion module script * * Toont occasion modellen bij selecteren merk (onchange) * * */var getOccasionModel = function(){    var merk = $('AutoMerk').get('value');    if (merk == '0') {        thehtml = '<select name="AutoModel" id="AutoModel">';        thehtml += '<option value="0">Kies eerst het merk</select>';        $('fldModel').set('html', thehtml);            }    else {        var occRequest = new Request({            url: _dbpath + 'getOccModel?readform&merk=' + merk + '&nc=' + noCache(),            method: 'get',            evalScripts: false,            onFailure: occFailure,            onSuccess: occSuccess        });        occRequest.setHeader('Last-Modified', 'Sat, 1 Jan 2005 05:00:00 GMT');        occRequest.setHeader('Cache-Control', 'no-cache');        occRequest.send();    }};//-- bouw de selectbox voor het modelvar occSuccess = function(responseText, responseXML){    //'$('waitmsg').destroy();    thehtml = '<select name="AutoModel" id="AutoModel">';    thehtml += responseText;    thehtml += '</select>';    $('fldModel').set('html', thehtml);    return false;};var occFailure = function(o){    //'$('waitmsg').destroy();    thehtml = '<select name="AutoModel" id="AutoModel">';    thehtml += '<option value="0">Er kan geen model gevonden worden van dit merk</select>';    $('fldModel').set('html', thehtml);    return false;};/** * ImageResizer * * Resizes images to fit in container * http://unstoppablerobotninja.com/entry/fluid-images/ * */var imgSizer = {    Config: {        imgCache: [],        spacer: "/images/blank.gif"    },    collate: function(aScope){        var isOldIE = (document.all && !window.opera && !window.XDomainRequest) ? 1 : 0;        if (isOldIE && document.getElementsByTagName) {               var c = imgSizer;            var imgCache = c.Config.imgCache;                        var images = (aScope && aScope.length) ? aScope : document.getElementsByTagName("img");            for (var i = 0; i < images.length; i++) {                images[i].origWidth = images[i].offsetWidth;                images[i].origHeight = images[i].offsetHeight;                                imgCache.push(images[i]);                c.ieAlpha(images[i]);                images[i].style.width = "100%";            }                        if (imgCache.length) {                c.resize(function(){                    for (var i = 0; i < imgCache.length; i++) {                        var ratio = (imgCache[i].offsetWidth / imgCache[i].origWidth);                        imgCache[i].style.height = (imgCache[i].origHeight * ratio) + "px";                    }                });            }        }    },    ieAlpha: function(img){        var c = imgSizer;        if (img.oldSrc) {            img.src = img.oldSrc;        }        var src = img.src;        img.style.width = img.offsetWidth + "px";        img.style.height = img.offsetHeight + "px";        img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";        img.oldSrc = src;        img.src = c.Config.spacer;    } // Ghettomodified version of Simon Willison's addLoadEvent() -- http://simonwillison.net/2004/May/26/addLoadEvent/    ,    resize: function(func){        var oldonresize = window.onresize;        if (typeof window.onresize != 'function') {            window.onresize = func;        }        else {            window.onresize = function(){                if (oldonresize) {                    oldonresize();                }                func();            };        }    }};Input = {    text: {        onFocus: function(){            if (!this.defaultValue) {				this.defaultValue = this.value;			}                        if (this.value === this.defaultValue) {				this.value = '';			}        },                onBlur: function(){            if (this.value === '') {				this.value = this.defaultValue;			}        }    }};function MM_swapImgRestore(){ //v3.0    var i, x, a = document.MM_sr;    for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) {		x.src = x.oSrc;	}}function MM_preloadImages(){ //v3.0    var d = document;    if (d.images) {        if (!d.MM_p) {			d.MM_p = new Array();		}        var i, j = d.MM_p.length, a = MM_preloadImages.arguments;        for (i = 0; i < a.length; i++) {			if (a[i].indexOf("#") != 0) {				d.MM_p[j] = new Image();				d.MM_p[j++].src = a[i];			}		}    }}function MM_findObj(n, d){ //v4.01    var p, i, x;    if (!d)         d = document;    if ((p = n.indexOf("?")) > 0 && parent.frames.length) {        d = parent.frames[n.substring(p + 1)].document;        n = n.substring(0, p);    }    if (!(x = d[n]) && d.all)         x = d.all[n];    for (i = 0; !x && i < d.forms.length; i++)         x = d.forms[i][n];    for (i = 0; !x && d.layers && i < d.layers.length; i++)         x = MM_findObj(n, d.layers[i].document);    if (!x && d.getElementById)         x = d.getElementById(n);    return x;}function MM_swapImage(){ //v3.0    var i, j = 0, x, a = MM_swapImage.arguments;    document.MM_sr = new Array;    for (i = 0; i < (a.length - 2); i += 3)         if ((x = MM_findObj(a[i])) != null) {            document.MM_sr[j++] = x;            if (!x.oSrc)                 x.oSrc = x.src;            x.src = a[i + 2];        }}/** * Scroll follow */(function($){    $.scrollFollow = function(box, options){        box = $(box);        var position = box.css('position');        function ani(){            box.queue([]);            var viewportHeight = parseInt($(window).height());            var pageScroll = parseInt($(document).scrollTop());            var parentTop = parseInt(box.cont.offset().top);            var parentHeight = parseInt(box.cont.attr('offsetHeight'));            var boxHeight = parseInt(box.attr('offsetHeight') + (parseInt(box.css('marginTop')) || 0) + (parseInt(box.css('marginBottom')) || 0));            var aniTop;            if (isActive) {                if (options.relativeTo == 'top') {                    if (box.initialOffsetTop >= (pageScroll + options.offset)) {                        aniTop = box.initialTop;                    }                    else {                        aniTop = Math.min((Math.max((-parentTop), (pageScroll - box.initialOffsetTop + box.initialTop)) + options.offset), (parentHeight - boxHeight - box.paddingAdjustment));                    }                }                else                     if (options.relativeTo == 'bottom') {                        if ((box.initialOffsetTop + boxHeight) >= (pageScroll + options.offset + viewportHeight)) {                            aniTop = box.initialTop;                        }                        else {                            aniTop = Math.min((pageScroll + viewportHeight - boxHeight - options.offset), (parentHeight - boxHeight));                        }                    }                if ((new Date().getTime() - box.lastScroll) >= (options.delay - 20)) {                    box.animate({                        top: aniTop                    }, options.speed, options.easing);                }            }        };        var isActive = true;        if ($.cookie != undefined) {            if ($.cookie('scrollFollowSetting' + box.attr('id')) == 'false') {                var isActive = false;                $('#' + options.killSwitch).text(options.offText).toggle(function(){                    isActive = true;                    $(this).text(options.onText);                    $.cookie('scrollFollowSetting' + box.attr('id'), true, {                        expires: 365,                        path: '/'                    });                    ani();                }, function(){                    isActive = false;                    $(this).text(options.offText);                    box.animate({                        top: box.initialTop                    }, options.speed, options.easing);                    $.cookie('scrollFollowSetting' + box.attr('id'), false, {                        expires: 365,                        path: '/'                    });                });            }            else {                $('#' + options.killSwitch).text(options.onText).toggle(function(){                    isActive = false;                    $(this).text(options.offText);                    box.animate({                        top: box.initialTop                    }, 0);                    $.cookie('scrollFollowSetting' + box.attr('id'), false, {                        expires: 365,                        path: '/'                    });                }, function(){                    isActive = true;                    $(this).text(options.onText);                    $.cookie('scrollFollowSetting' + box.attr('id'), true, {                        expires: 365,                        path: '/'                    });                    ani();                });            }        }        if (options.container == '') {            box.cont = box.parent();        }        else {            box.cont = $('#' + options.container);        }        box.initialOffsetTop = parseInt(box.offset().top);        box.initialTop = parseInt(box.css('top')) || 0;        if (box.css('position') == 'relative') {            box.paddingAdjustment = parseInt(box.cont.css('paddingTop')) + parseInt(box.cont.css('paddingBottom'));        }        else {            box.paddingAdjustment = 0;        }        $(window).scroll(function(){            $.fn.scrollFollow.interval = setTimeout(function(){                ani();            }, options.delay);            box.lastScroll = new Date().getTime();        });        $(window).resize(function(){            $.fn.scrollFollow.interval = setTimeout(function(){                ani();            }, options.delay);            box.lastScroll = new Date().getTime();        });        box.lastScroll = 0;        ani();    };    $.fn.scrollFollow = function(options){        options = options ||        {};        options.relativeTo = options.relativeTo || 'top';        options.speed = options.speed || 500;        options.offset = options.offset || 0;        options.easing = options.easing || 'swing';        options.container = options.container || this.parent().attr('id');        options.killSwitch = options.killSwitch || 'killSwitch';        options.onText = options.onText || 'Turn Slide Off';        options.offText = options.offText || 'Turn Slide On';        options.delay = options.delay || 0;        this.each(function(){            new $.scrollFollow(this, options);        });        return this;    };})(jQuery);/** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */if (typeof deconcept == "undefined") {    var deconcept = new Object();}if (typeof deconcept.util == "undefined") {    deconcept.util = new Object();}if (typeof deconcept.SWFObjectUtil == "undefined") {    deconcept.SWFObjectUtil = new Object();}deconcept.SWFObject = function(_1, id, w, h, _5, c, _7, _8, _9, _a){    if (!document.getElementById) {        return;    }    this.DETECT_KEY = _a ? _a : "detectflash";    this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);    this.params = new Object();    this.variables = new Object();    this.attributes = new Array();    if (_1) {        this.setAttribute("swf", _1);    }    if (id) {        this.setAttribute("id", id);    }    if (w) {        this.setAttribute("width", w);    }    if (h) {        this.setAttribute("height", h);    }    if (_5) {        this.setAttribute("version", new deconcept.PlayerVersion(_5.toString().split(".")));    }    this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();    if (!window.opera && document.all && this.installedVer.major > 7) {        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 = "<embed type=\"application/x-shockwave-flash\" src=\"" + this.getAttribute("swf") + "\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\"";            _19 += " id=\"" + this.getAttribute("id") + "\" name=\"" + this.getAttribute("id") + "\" ";            var _1a = this.getParams();            for (var key in _1a) {                _19 += [key] + "=\"" + _1a[key] + "\" ";            }            var _1c = this.getVariablePairs().join("&");            if (_1c.length > 0) {                _19 += "flashvars=\"" + _1c + "\"";            }            _19 += "/>";        }        else {            if (this.getAttribute("doExpressInstall")) {                this.addVariable("MMplayerType", "ActiveX");                this.setAttribute("swf", this.xiSWFPath);            }            _19 = "<object id=\"" + this.getAttribute("id") + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + this.getAttribute("width") + "\" height=\"" + this.getAttribute("height") + "\" style=\"" + this.getAttribute("style") + "\">";            _19 += "<param name=\"movie\" value=\"" + this.getAttribute("swf") + "\" />";            var _1d = this.getParams();            for (var key in _1d) {                _19 += "<param name=\"" + key + "\" value=\"" + _1d[key] + "\" />";            }            var _1f = this.getVariablePairs().join("&");            if (_1f.length > 0) {                _19 += "<param name=\"flashvars\" value=\"" + _1f + "\" />";            }            _19 += "</object>";        }        return _19;    },    write: function(_20){        if (this.getAttribute("useExpressInstall")) {            var _21 = new deconcept.PlayerVersion([6, 0, 65]);            if (this.installedVer.versionIsValid(_21) && !this.installedVer.versionIsValid(this.getAttribute("version"))) {                this.setAttribute("doExpressInstall", true);                this.addVariable("MMredirectURL", escape(this.getAttribute("xiRedirectUrl")));                document.title = document.title.slice(0, 47) + " - Flash Player Installation";                this.addVariable("MMdoctitle", document.title);            }        }        if (this.skipDetect || this.getAttribute("doExpressInstall") || this.installedVer.versionIsValid(this.getAttribute("version"))) {            var n = (typeof _20 == "string") ? document.getElementById(_20) : _20;            n.innerHTML = this.getSWFHTML();            return true;        }        else {            if (this.getAttribute("redirectUrl") != "") {                document.location.replace(this.getAttribute("redirectUrl"));            }        }        return false;    }};deconcept.SWFObjectUtil.getPlayerVersion = function(){    var _23 = new deconcept.PlayerVersion([0, 0, 0]);    if (navigator.plugins && navigator.mimeTypes.length) {        var x = navigator.plugins["Shockwave Flash"];        if (x && x.description) {            _23 = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));        }    }    else {        if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0) {            var axo = 1;            var _26 = 3;            while (axo) {                try {                    _26++;                    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + _26);                    _23 = new deconcept.PlayerVersion([_26, 0, 0]);                }                 catch (e) {                    axo = null;                }            }        }        else {            try {                var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");            }             catch (e) {                try {                    var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");                    _23 = new deconcept.PlayerVersion([6, 0, 21]);                    axo.AllowScriptAccess = "always";                }                 catch (e) {                    if (_23.major == 6) {                        return _23;                    }                }                try {                    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");                }                 catch (e) {                }            }            if (axo != null) {                _23 = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));            }        }    }    return _23;};deconcept.PlayerVersion = function(_29){    this.major = _29[0] != null ? parseInt(_29[0]) : 0;    this.minor = _29[1] != null ? parseInt(_29[1]) : 0;    this.rev = _29[2] != null ? parseInt(_29[2]) : 0;};deconcept.PlayerVersion.prototype.versionIsValid = function(fv){    if (this.major < fv.major) {        return false;    }    if (this.major > fv.major) {        return true;    }    if (this.minor < fv.minor) {        return false;    }    if (this.minor > fv.minor) {        return true;    }    if (this.rev < fv.rev) {        return false;    }    return true;};deconcept.util = {    getRequestParameter: function(_2b){        var q = document.location.search || document.location.hash;        if (_2b == null) {            return q;        }        if (q) {            var _2d = q.substring(1).split("&");            for (var i = 0; i < _2d.length; i++) {                if (_2d[i].substring(0, _2d[i].indexOf("=")) == _2b) {                    return _2d[i].substring((_2d[i].indexOf("=") + 1));                }            }        }        return "";    }};deconcept.SWFObjectUtil.cleanupSWFs = function(){    var _2f = document.getElementsByTagName("OBJECT");    for (var i = _2f.length - 1; i >= 0; i--) {        _2f[i].style.display = "none";        for (var x in _2f[i]) {            if (typeof _2f[i][x] == "function") {                _2f[i][x] = function(){                };            }        }    }};if (deconcept.SWFObject.doPrepUnload) {    if (!deconcept.unloadSet) {        deconcept.SWFObjectUtil.prepUnload = function(){            __flash_unloadHandler = function(){            };            __flash_savedUnloadHandler = function(){            };            window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);        };        window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);        deconcept.unloadSet = true;    }}if (!document.getElementById && document.all) {    document.getElementById = function(id){        return document.all[id];    };}var getQueryParamValue = deconcept.util.getRequestParameter;var FlashObject = deconcept.SWFObject;var SWFObject = deconcept.SWFObject;
