            var bookmarkurl="http://www.voordeelvloeren.nl"
            var bookmarktitel="Voordeel Vloeren | Goedkoop met laminaat vloeren."
            function favorieten(){
                if (document.all) {
                    window.external.AddFavorite(bookmarkurl,bookmarktitel)
                }
            }
            function get_my(what) {
                if (what=='search') {
                    document.frm_search.submit();
                }
                if (what=='searchagain') {
                    document.frm_searchagain.submit();
                }
            }
            if (document.images) {
                img_open = new Image;
                img_close = new Image;
                img_open.src = 'images/blokje_blauw.gif';
                img_close.src= 'images/blokje_oranje.gif'
            }
            function grow(what) {
                //wordt gebruikt om de afbeeldingen in de content van de product detail te vergroten
                if (what !='restore') {
                    old_value=document.getElementById('viewer').innerHTML;
                    document.getElementById('viewer').innerHTML='<img src="images\/spacer.gif" alt="" border="0" height="7" width="1"><br><img src="folders\/'+what+'" alt="" onClick="javascript:grow(\'restore\')" style="cursor:pointer;" class="secundaire_border">';
                } else {
                    document.getElementById('viewer').innerHTML=old_value;
                }
            }
            function getCookie(c_name) {
                if (document.cookie.length>0) {
                    c_start=document.cookie.indexOf(c_name + "=");
                    if (c_start!=-1) {
                        c_start=c_start + c_name.length+1;
                        c_end=document.cookie.indexOf(";",c_start);
                        if (c_end==-1) {
                            c_end=document.cookie.length;
                        }
                        return unescape(document.cookie.substring(c_start,c_end));
                    }
                }
                return "";
            }
            function show_nav(what) {
                if (getCookie('navsub')!='') {
                    var to_close=getCookie('navsub');
                    document.getElementById(to_close).style.height="0px";
                }
                //welk cat in de linker navigatie wordt uitgeklapt?
                document.getElementById('navsub'+what).style.height="100%";
                document.cookie='navsub'+ "=" +escape('navsub'+what);
            }
            function close_leftnav() {
                if (getCookie('navsub')!='') {
                    var to_close=getCookie('navsub');
                    document.getElementById(to_close).style.height="0px";
                    var d = new Date();
                    document.cookie = "navsub="+to_close+";expires=" + d.toGMTString() + ";" + ";";
                }
            }
            function show_help(what) {
                if (getCookie('helpsub')!='') {
                    var to_close=getCookie('helpsub');
                    document.getElementById(to_close).style.height="0px";
                    document.getElementById(to_close+'head').style.fontWeight="normal";
                    document.getElementById(to_close).style.visibility="hidden";
                    document.getElementById(to_close).style.overflow="hidden";
                    document.getElementById(to_close+'blokjespan').innerHTML='<img src="images/blokje_oranje.gif" id="'+to_close+'blokje" width="6" height="6" alt="" style="margin:0px 6px 0px 0px;" border="0">';
                    if (document.getElementById(to_close+'img')) {
                        document.getElementById(to_close+'img').style.height="0px";
                        document.getElementById(to_close+'img').style.border="0px";
                    }
                }
                document.cookie='helpsub'+ "=" +escape('helpsub'+what);
                document.getElementById('helpsub'+what).style.height="100%";
                document.getElementById('helpsub'+what).style.visibility="visible";
                document.getElementById('helpsub'+what+'head').style.fontWeight="600";
                document.getElementById('helpsub'+what+'blokjespan').innerHTML='<img src="images/blokje_blauw.gif" width="6" height="6" alt="" style="margin:0px 6px 0px 0px;" border="0">';
                if (document.getElementById('helpsub'+what+'img')) {
                    document.getElementById('helpsub'+what+'img').style.height="";
                    document.getElementById('helpsub'+what+'img').style.border="#A4D4E4 1px solid";
                }
            }
            function show_afl_adr() {  //in de kassa
                if (document.frm_kassa.ander_afl_adres.checked) {
                    document.getElementById('afl_adr').style.visibility="visible";
                    document.getElementById('afl_adr').style.height="100%";
                } else {
                    //wordt uitgevinkt. Dan de andere adresvelden legen. Anders worden ze alsnog meegestuurd en gebruikt
                    document.getElementById('afl_adr').style.visibility="hidden";
                    document.getElementById('afl_adr').style.height="0px";
                    document.getElementById('afl_adr').style.overflow="hidden";
                    document.getElementById('DeliverAddress').value='';
                    document.getElementById('DeliverPostalCode').value='';
                    document.getElementById('DeliverCity').value='';

                }
            }
            function show_login() { //in de kassa en offerte
                document.getElementById('login').style.visibility="visible";
                document.getElementById('login').style.height="100px";
                document.getElementById('login').style.overflow="visible";
                document.getElementById('pers_data').style.visibility="hidden";
                document.getElementById('pers_data').style.height="0px";
                document.getElementById('pers_data').style.overflow="hidden";
                document.getElementById('login_info').style.visibility="hidden";
                document.getElementById('login_info').style.overflow="hidden";
                document.getElementById('login_info').style.height="0px";
            }
            function show_login_info() {
                document.getElementById('login').style.visibility="hidden";
                document.getElementById('login').style.overflow="hidden";
                document.getElementById('login').style.height="0px";
                document.getElementById('pers_data').style.visibility="visible";
                document.getElementById('pers_data').style.height="100%";
                document.getElementById('login_info').style.visibility="visible";
                document.getElementById('login_info').style.height="100%";
                document.getElementById('msg').innerHTML='';
            }
            function leeg_mandje() { //in de basket
                var answer = confirm("Weet u zeker dat u alles wilt verwijderen?")
                if (answer) {
                    document.frm_delall.submit();
                }
            }
             var ProductID_aantal;
            function wis_aantal(what) {
                if (document.getElementById(what).aantal.value>0) {
                    ProductID_aantal=document.getElementById(what).aantal.value;
                    document.getElementById(what).aantal.value=0;
                } else {
                    document.getElementById(what).aantal.value=ProductID_aantal;
                }
            }
            function openWindow( url, name, width, height) {
                var outStr = 'height=' + height + ',width=' + width;
                {
                    outStr = outStr +',menubar=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=yes,top=100,left=100';
                }
                window.open(url, name, outStr);
            }
            function ToClearOrNotToClearThatsTheQuestion() {
                //emailveld in basket pagina
                if (document.frm_mailmand.ToEmail.value=='Emailadres naar keuze') {
                    document.frm_mailmand.ToEmail.value='';
                }
            }
            function check_vwd() {
                if (!document.frm_kassa.alg_vwd.checked) {
                    document.getElementById('gringo').style.visibility="visible";
                    document.getElementById('gringo').style.overflow="visible";
                }
            }
            function change_login_fields() {
                document.frm_login.action.value='login';
                if (document.frm_login.lost.checked) {
                    old_value=document.getElementById('pwd2').innerHTML;
                    document.getElementById('pwd1').innerHTML='&nbsp;';
                    document.getElementById('pwd2').innerHTML='<img src="images/spacer.gif" height="23" width="1" alt=""><font color="#FF0000">Vul uw email adres in en druk op Verzenden.</font>';
                    document.getElementById('inloggen').src="images/verzenden-wit.gif";
                    document.getElementById('inloggen').style.marginLeft='-4px';
                } else {
                    document.getElementById('pwd1').innerHTML='Wachtwoord';
                    document.getElementById('pwd2').innerHTML=old_value;
                    document.getElementById('inloggen').src="images/inloggen-wit.gif";
                    document.getElementById('inloggen').style.marginLeft='-12px';
                }
            }

function show_vakantie_popup(txt,vis, options) {
    document.body.style.backgroundColor='#D5D546';
  // Pass true to gray out screen, false to ungray
  // options are optional.  This is a JSON object with the following (optional) properties
  // opacity:0-100         // Lower number = less grayout higher = more of a blackout
  // zindex: #             // HTML elements with a higher zindex appear on top of the gray out
  // bgcolor: (#xxxxxx)    // Standard RGB Hex color code
  // grayOut(true, {'zindex':'50', 'bgcolor':'#0000FF', 'opacity':'70'});
  // Because options is JSON opacity/zindex/bgcolor are all optional and can appear
  // in any order.  Pass only the properties you need to set.
  var options = options || {};
  var zindex = options.zindex || 50;
  var opacity = options.opacity || 70;
  var opaque = (opacity / 100);
  var bgcolor = options.bgcolor || '#000000';
  var dark=document.getElementById('darkenScreenObject');
  if (!dark) {
    // The dark layer doesn't exist, it's never been created.  So we'll
    // create it here and apply some basic styles.
    // If you are getting errors in IE see: http://support.microsoft.com/default.aspx/kb/927917
    var tbody = document.getElementsByTagName("body")[0];
    var tnode = document.createElement('div');           // Create the layer.
        tnode.style.position='absolute';                 // Position absolutely
        tnode.style.top='0px';                           // In the top
        tnode.style.left='0px';                          // Left corner of the page
        tnode.style.overflow='hidden';                   // Try to avoid making scroll bars
        tnode.style.display='none';                      // Start out Hidden
        tnode.id='darkenScreenObject';                   // Name it so we can find it later
    tbody.appendChild(tnode);                            // Add it to the web page
    dark=document.getElementById('darkenScreenObject');  // Get the object.
  }
  //some uncovered space is left. cover it with expanding the offsetWidth and height.
  //Different value for different browsers
  var browser=get_browser();
  if (browser=='IE') {
    extra_width=20;
  } else if (browser=='Safari') {
    extra_width=0;
  } else {
    extra_width=16;
  }
  if (vis) {
    // Calculate the page width and height
    if (document.body && ( document.body.scrollWidth || document.body.scrollHeight ) ) {
        var pageWidth = document.body.scrollWidth+extra_width+'px';
        var pageHeight = document.body.scrollHeight+extra_width+'px';
    } else if( document.body.offsetWidth ) {
      var pageWidth = document.body.offsetWidth+extra_width+'px';
      var pageHeight = document.body.offsetHeight+extra_width+'px';
    } else {
       var pageWidth='100%';
       var pageHeight='100%';
    }
    //set the shader to cover the entire page and make it visible.
    dark.style.opacity=opaque;
    dark.style.MozOpacity=opaque;
    dark.style.filter='alpha(opacity='+opacity+')';
    dark.style.zIndex=zindex;
    dark.style.backgroundColor=bgcolor;
    dark.style.width= pageWidth;
    dark.style.height= pageHeight;
    dark.style.display='block';
  //show the popup
    document.getElementById("vakantie").style.top='100px';
    document.getElementById("vakantie").style.left=(window.screen.availWidth/2)-150+'px';
    document.getElementById("vakantie").style.visibility='visible';
    document.getElementById("vakantie").style.height='350px';
    document.getElementById("vakantie").style.width='350px';
    document.getElementById("vakantie").style.zIndex='75';
    document.getElementById("vakantie").style.background='#FFFFFF';
    document.getElementById("vakantie").innerHTML='<p class="primaire_border" style="width:100%; height:100%;background:url(/images/bg_vakantie_popup_zomer.jpg);background-size: 100%; background-repeat: no-repeat;padding:10px;"><img src="/images/close.png" alt="Afsluiten" style="float:right;cursor:hand" onClick="show_vakantie_popup(null,false);"><br><br><br><b>'+txt+'</b><\/p>';
    document.cookie='vakantie=showed expires=0, path=/';
  } else {
     dark.style.display='none';
     document.getElementById("vakantie").style.height=0+'px'
     document.getElementById("vakantie").style.width=0+'px'
     document.getElementById("vakantie").style.visibility='hidden';
     document.getElementById("vakantie").innerHTML='';
  }
}

function get_browser() {
    var d, n, dom, nua;
    d = document;
    n = navigator;
    nua = n.userAgent;
    if ( !d.layers ){
        dom = ( d.getElementById );
        if (nua.indexOf('Opera')!=-1) {
            return 'Opera';
        } else if (nua.indexOf('Konqueror')!=-1) {
            return 'Konqueror';
        } else if (nua.indexOf('Safari')!=-1) {
            return 'Safari';
        } else if (nua.indexOf('Gecko')!=-1) {
            return 'Gecko';
        } else if (d.all) {
            return 'IE';
        } else {
            return 'unknown';
        }
    }
}
var ProductID=666;
var totalamount=false;
function mod_basket(id) {
  totalamount=false;
  if (document.getElementById("aantal"+id).value>0) {
   ProductID=id;
   var poststr = "ProductID=" + encodeURI(document.getElementById("ProductID"+id).value) +
                  "&s_o=" + encodeURI(document.getElementById("s_o"+id).value) +
                  "&aantal=" + encodeURI(document.getElementById("aantal"+id).value) +
                  "&target=basket";
   makePOSTRequest('rpc.php', poststr);
  }
}

var http_request = false;
function makePOSTRequest(url, parameters) {
   http_request = false;
   if (window.XMLHttpRequest) { // Mozilla, Safari,...
      http_request = new XMLHttpRequest();
      if (http_request.overrideMimeType) {
             // set type accordingly to anticipated content type
         //http_request.overrideMimeType('text/xml');
         http_request.overrideMimeType('text/html');
      }
   } else if (window.ActiveXObject) { // IE
      try {
         http_request = new ActiveXObject("Msxml2.XMLHTTP");
      } catch (e) {
         try {
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
         } catch (e) {}
      }
   }
   if (!http_request) {
      alert('Cannot create XMLHTTP instance');
      return false;
   }

   http_request.onreadystatechange = alertContents;
   http_request.open('POST', url, true);
   http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
   http_request.setRequestHeader("Content-length", parameters.length);
   http_request.setRequestHeader("Connection", "close");
   http_request.send(parameters);
}
function alertContents() {
   if (http_request.readyState == 4) {
      if (http_request.status == 200) {
          if (!totalamount) {
            document.getElementById("pricexaantal"+ProductID).innerHTML=http_request.responseText;
            totalamount=true;
            recalculate_totalamount();
          } else {
            document.getElementById("totaal_bedrag").innerHTML=http_request.responseText;
          }
      } else {
         alert('Er is een probleem met het bijwerken van de prijs');
      }
   }
}

function recalculate_totalamount(){
   var poststr ="target=basket_amount";
   makePOSTRequest('rpc.php', poststr);
}
