function createCookie(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=/";}
function readCookie(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 getClientWidth(){var cltWidth=0;if(typeof(window.innerWidth)=='number'){cltWidth=window.innerWidth;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){cltWidth=document.documentElement.clientWidth;}else if(document.body&&document.body.clientWidth){cltWidth=document.body.clientWidth;}return cltWidth;}
function showSearchSugg() {if (readCookie('showSearchSugg') != 0){clientWidth = getClientWidth();	if(navigator.appName=="Microsoft Internet Explorer" && parseFloat(navigator.appVersion.split("MSIE")[1])>=7 && clientWidth >= 1000){document.write("<div class=\"topRight\"><div class=\"topRightClose\"><a href=\"#\" onClick=\"hideSearchSugg(60); return true;\"><img src=\"http://images.japsen.eu/removeIcon.gif\" id=\"removeIcon\"></a></div><div class=\"topRightContent\"><a href=\"#\" onClick=\"window.external.AddSearchProvider(&quot;http://www.vindproduct.be/osd/be.xml&quot;); hideSearchSugg(180); \"><img src=\"http://images.japsen.eu/searchbutton/add_ie_be.gif\" id=\"addButton\"/></a></div></div>");}else if(navigator.userAgent.indexOf("Firefox")!=-1 && parseFloat(navigator.userAgent.split("Firefox/")[1])>=1 && clientWidth >= 1000){document.write("<div class=\"topRight\"><div class=\"topRightClose\"><a href=\"#\" onClick=\"hideSearchSugg(60); return true;\"><img src=\"http://images.japsen.eu/removeIcon.gif\" id=\"removeIcon\"></a></div><div class=\"topRightContent\"><a href=\"#\" onClick=\"window.external.AddSearchProvider(&quot;http://www.vindproduct.be/osd/be.xml&quot;); hideSearchSugg(180); \"><img src=\"http://images.japsen.eu/searchbutton/add_ff_be.gif\" id=\"addButton\"/></a></div></div>");}}}
function hideSearchSugg(days){_gaq.push(['_trackPageview','/click_sb.cgi']);createCookie('showSearchSugg',0,days);window.location.reload();}
function twAddFavorite(title,url){if(document.all){window.external.AddFavorite(url,title);}else if(window.sidebar){window.sidebar.addPanel(title,url,"");}}
function visitLink(url,analytics){newWindow=window.open(url);if(analytics===2){_gaq.push(['_trackPageview','/click_bsl.cgi']);}else{_gaq.push(['_trackPageview','/click.cgi']);}}
function report(productid){url="http://www.vindproduct.be/report.cgi?id="+productid;newWindow=window.open(url);}
function HideContent(d){document.getElementById(d).style.display="none";}
function ShowContent(d){document.getElementById(d).style.display="block";}
function showAdvancedSearchForm(){HideContent('toggleAdvancedSearchForm');ShowContent('toggleSimpleSearchForm');ShowContent('searchFormCategoryField');ShowContent('searchFormAdvancedFields');document.getElementById('formMode').value="advanced";}
function showSimpleSearchForm(){HideContent('toggleSimpleSearchForm');HideContent('searchFormCategoryField');HideContent('searchFormAdvancedFields');ShowContent('toggleAdvancedSearchForm');document.getElementById('formMode').value="simple";}
