base_url='http://vindallekleding.nl';function doSearch()
{f=document.search_extended;url=base_url;if(f.section.value&&f.section.value!='alles')url=url+'/'+f.section.value+'';if(f.category.value&&f.category.value!='alles')url=url+'/'+f.category.value+'';url=url+'/vind';x=f.searchterms.value.replace(new RegExp("\\W","g"),"_");x=trim(x);x=trim(x,'_');if(x)url=url+'/term/'+x+'';if(parseInt(f.price_from.value)||parseInt(f.price_to.value))url=url+'/prijs/'+parseInt(f.price_from.value)+'-'+parseInt(f.price_to.value)+'';o='';if(f.searchtype.options[f.searchtype.selectedIndex].value=='or')o+='-or';for(i=0;i<f.opties.length;i++)if(f.opties[i].checked)o+='-'+f.opties[i].value;if(o.length)url+='/opties/'+o.substring(1);window.location=url;return false;}
function doHomeSearch()
{f=document.search_extended;url=base_url;if(f.section.value&&f.section.value!='alles')url=url+'/'+f.section.value+'';if(f.category.value&&f.category.value!='alles')url=url+'/'+f.category.value+'';url=url+'/vind';x=f.searchterms.value.replace(new RegExp("\\W","g"),"_");x=trim(x);x=trim(x,'_');if(x)url=url+'/term/'+x+'';window.location=url;return false;}
function doCatSearch()
{f=document.search_extended;url=base_url;if(f.categories.value)url=url+'/'+f.categories.value+'';x=f.searchterms.value.replace(new RegExp("\\W","g"),"_");x=trim(x);x=trim(x,'_');if(x)url=url+'/term/'+x+'';if(f.color){x=f.color.value.replace(new RegExp("\\W","g"),"_");x=trim(x);x=trim(x,'_');if(x)url=url+'/kleur/'+x+'';}
if(f.price_from&&f.price_to){var pricefrom=f.price_from.value;var priceto=f.price_to.value;pricefrom=(parseInt(pricefrom))?parseInt(pricefrom):0;priceto=(parseInt(priceto))?parseInt(priceto):0;if(priceto==999)priceto=0;if(pricefrom||priceto)url=url+'/prijs/'+pricefrom+'-'+priceto+'';}
window.location=url;return false;}
function doHeaderSearch()
{f=document.search_header;url=base_url;url=url+'/vind';x=f.searchterms.value.replace(new RegExp("\\W","g"),"_");x=trim(x);x=trim(x,'_');if(x)url=url+'/term/'+x+'';window.location=url;return false;}
function onlynumbers(x)
{return x.replace(new RegExp("\\D","g"),"");}
function trim(str,chars){return ltrim(rtrim(str,chars),chars);}
function ltrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("^["+chars+"]+","g"),"");}
function rtrim(str,chars){chars=chars||"\\s";return str.replace(new RegExp("["+chars+"]+$","g"),"");}
function ExtendedResults(listitem){var list=listitem;var link_name='expand_'+listitem;var status_list=document.getElementById(list).style.display;if(status_list=='block'){document.getElementById(list).style.display='none';document.getElementById(link_name).style.background='url(/img/template/products/plus.png) center left no-repeat';document.getElementById(link_name).innerHTML='Meer resultaten';}
if(status_list=='none'){document.getElementById(list).style.display='block';document.getElementById(link_name).style.background='url(/img/template/products/minus.png) center left no-repeat';document.getElementById(link_name).innerHTML='Minder resultaten';}}