﻿
var nextSwitchTmr = null;

function StartSwitchRubriques(idShop){
 if (nextSwitchTmr!=null)
   CancelSwitchRubriques(false);
   //else
   //ShowWaiter("ctl00_PnlRubriques");
 nextSwitchTmr = window.setTimeout("SwitchRubriques("+idShop+")",1000);
}


function CancelSwitchRubriques(hidewaiter){
  if (nextSwitchTmr!=null){
    window.clearTimeout(nextSwitchTmr);
    nextSwitchTmr = null;  
    //if (hidewaiter) HideWaiter();
  }
}

function SwitchRubriques(idShop){
  Anthem_InvokeMasterPageMethod(
      'ClientSwitchRubriques',
      [idShop],
      function(result) {  
         FlashElement(document.getElementById("ctl00_PnlRubriques"));
         //HideWaiter();
      }
  );
}