function findObject(objectId) { if(window.document.getElementById && window.document.getElementById(objectId)) return window.document.getElementById(objectId); else if (window.document.all && window.document.all(objectId)) return window.document.all(objectId); else if (window.document.layers && window.document.layers[objectId]) return window.document.layers[objectId]; else return null; } function loadPopup(sHref, sWidth, sHeight) { var LeftPosition=(screen.width)?(screen.width-sWidth)/2:100; var TopPosition=(screen.height)?(screen.height-sHeight)/2:100; var settings='width='+sWidth+',height='+sHeight+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; var theWindow = window.open(sHref, '_blank', settings); if (theWindow != null) theWindow.focus(); return theWindow; } window.onload = function() { InitializeLightBox(); } function InitializeLightBox() { if (typeof(initLightbox) == 'function') { initLightbox(); } } function ToggleContainer(id, bExpand) { try { var _objContainer = findObject(id); if (_objContainer != null) { PageMethods.ToggleProductContainer(id, bExpand, function(response) { _objContainer.innerHTML = response; }); } } catch(e) { } return false; } /*function SetFilter(sID, sFilter, sValue) { try { var _objProductList = findObject('productlist'); if (_objProductList != null) { PageMethods.SetFilter(sID, sFilter, sValue, function(response) { if(response) { window.document.location.reload(); } }); } } catch(e) { alert(e); } return false; }*/ /*function RemoveFilter(FilterName, CategoryId) { PageMethods.RemoveFilter(FilterName, CategoryId, function(response) { if(response) { window.document.location.reload(); } }); return false; }*/ function ExpandFilters(obj) { var filterList = findObject('filters'); var expandButton = findObject('filterExpander'); if (filterList != null) { filterList.id = 'filters_expanded'; expandButton.className = 'filter_collapse'; expandButton.innerText = 'Verberg filter opties'; } else { filterList = findObject('filters_expanded'); if (filterList != null) { filterList.id = 'filters'; expandButton.className = 'filter_expand'; expandButton.innerText = 'Toon alle filter opties'; } } }