function IndexOf(c,b){for(var a=0;a<c.length;a++){if(c[a]==b){return a}}return -1}function onCheckSaleDiscount(a){showPopWin(345,76);LastSelectedCriteriaName="salediscount";ReInitLstStopRequest();removeClick("Page="+CurrentPageNumber);CurrentPageNumber=1;addClick("Page="+CurrentPageNumber);runStackManager("SaleDiscount",a.value);index=IndexOf(LstSaleDiscount,a.value);if(index!=-1){LstSaleDiscount.splice(index,1);removeClick("SaleDiscount="+a.value)}else{LstSaleDiscount.push(a.value);addClick("SaleDiscount="+a.value)}window.setTimeout("Search("+(LstStopRequest.length-1)+","+isLuxe+");",10)}function onEditBrand(e){var a=e.value.toUpperCase();elt=getElement_By_Id("tbBrand");for(var c=0;c<elt.rows.length;c++){for(var b=0;b<elt.rows[c].cells.length;b++){var d=elt.rows[c].cells[b].getElementsByTagName("Label")[0].innerHTML.toUpperCase();if(elt.rows[c].cells[b].className!="customBoxOff"){if(navigator.appName=="Netscape"){elt.rows[c].style.display="table-row"}else{elt.rows[c].style.display="block"
}if(a.length!=0){if(d.indexOf(a,0)==-1){elt.rows[c].style.display="none"}}}}}}function getChildElementByTag(d,b){var a=null;var c=getElement_By_Id(d);if(c!=null){a=c.getElementsByTagName(b)}return a}function CreateTableCells(){var e;if(NbProductPage%NbProductLine==0){e=NbProductPage/NbProductLine}else{e=parseInt(NbProductPage/NbProductLine)+1}var c=getElement_By_Id("Tab_Rslt");if(c!=null){var a=0;for(var d=0;d<e;d++){var f=c.insertRow(d);for(var b=0;b<NbProductLine;b++){var g=f.insertCell(b);g.setAttribute("id","c"+a);a=a+1}}}}function ClearResultPanel(){var c;if(NbProductPage%NbProductLine==0){c=NbProductPage/NbProductLine}else{c=parseInt(NbProductPage/NbProductLine)+1}var a=getElement_By_Id("Tab_Rslt");if(a!=null){for(var b=0;b<c;b++){a.deleteRow(0)}}}function SetDivVisible(a,b){elt=getElement_By_Id(a);if(elt!=null){elt.style.display=b;if(b=="none"&&a!="ResultPanelDiv"){elt.innerHTML=""}}}function trim(a){return a.replace(/^\s+/,"").replace(/\s+$/,"")}function onchangeFilterDropDown(){elt=getElement_By_Id("FilterDropDown");
if(elt!=null){SetFilter(elt.options[elt.selectedIndex].value)}}var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gPopupIsShown=false;function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){var b=17;var a=null;if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}}function getScrollTop(){if(self.pageYOffset){return self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else{if(document.body){return document.body.scrollTop}}}}function getScrollLeft(){if(self.pageXOffset){return self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft
}else{if(document.body){return document.body.scrollLeft}}}}var xDivResultPanel=0;var yDivResultPanel=0;function showPopWin(b,a){if(LuxeEnv==true){showPopWinLuxe();return}if(gPopupMask==null){gPopupMask=getElement_By_Id("popupMask")}if(gPopupContainer==null){gPopupContainer=getElement_By_Id("popupContainer")}if(gPopFrame==null){gPopFrame=getElement_By_Id("popupFrame")}if(gPopFrame!=null&&gPopupContainer!=null&&gPopFrame!=null){gPopupIsShown=true;gPopupMask.style.display="block";gPopupContainer.style.display="block";var c=getElement_By_Id("DivResultPanel");xDivResultPanel=$C("x",$("DivResultPanel"));yDivResultPanel=$C("y",$("DivResultPanel"));gPopupMask.style.width=c.offsetWidth+"px";gPopupMask.style.height=c.offsetHeight+"px";gPopupMask.style.top=yDivResultPanel+"px";gPopupMask.style.left=xDivResultPanel+"px";gPopupContainer.style.width=b+"px";gPopupContainer.style.height=a+"px";gPopupContainer.style.top=(yDivResultPanel+((c.offsetHeight)/2)-(a/2))+"px";gPopupContainer.style.left=(xDivResultPanel+((c.offsetWidth)/2)-(b/2))+"px"
}}function showPopWinLuxe(b,a){jQuery("#loader").show();jQuery("#divZoomVig").hide()}var gi=0;function centerPopWin(b,a){if(gPopupIsShown==true){if(b==null||isNaN(b)){b=gPopupContainer.offsetWidth}if(a==null){a=gPopupContainer.offsetHeight}var c=getElement_By_Id("DivResultPanel");xDivResultPanel=$C("x",$("DivResultPanel"));yDivResultPanel=$C("y",$("DivResultPanel"));gPopupMask.style.width=c.offsetWidth+"px";gPopupMask.style.height=c.offsetHeight+"px";gPopupMask.style.top=yDivResultPanel+"px";gPopupMask.style.left=xDivResultPanel+"px";gPopupContainer.style.width=b+"px";gPopupContainer.style.height=a+"px";gPopupContainer.style.top=(yDivResultPanel+((c.offsetHeight)/2)-(a/2))+"px";gPopupContainer.style.left=(xDivResultPanel+((c.offsetWidth)/2)-(b/2))+"px"}}window.onscroll=centerPopWin;window.onresize=centerPopWin;function hidePopWin(){gPopupIsShown=false;if(gPopupMask==null){gPopupMask=getElement_By_Id("popupMask")}if(gPopupContainer==null){gPopupContainer=getElement_By_Id("popupContainer")
}if(gPopupMask!=null&&gPopupContainer!=null){gPopupMask.style.display="none";gPopupContainer.style.display="none"}if(LuxeEnv==true){hidePopWinLuxe()}}function hidePopWinLuxe(){jQuery("#loader").hide();jQuery("#divZoomVig").hide()};