﻿var _timer = 5000;
var IsFirst=true;  
  
    function slideFirstStart(_tab)
    { 
      _slide=window.setTimeout("slideStart('" + (_tab) + "')", _timer);
    }
      function slideStart(_tab)
    {
      if (IsSlide){
      _tab = parseInt(_tab);
      if(_tab>DETabsNum){_tab=1;}
      
       ChangeDeal(_tab);
      _slide=window.setTimeout("slideStart('" + (_tab+1) + "')", _timer);}
       else{ slideStop();}
    }
  

        function slideStop(){
            window.clearTimeout(_slide);
        }

    function ChangeDeal(_tab) {
     
        document.getElementById("DEDivImage").style.display = "none";
        var len = parseInt(DETabsNum,10);
        for (i=1; i <= len; i++) {
            document.getElementById("DEtab" + i).className = "deOff";
            document.getElementById("DETxt" + i).className = "deTdOff" + DEColorStr ;
            document.getElementById("DEdiv" + i).style.display = "none";  
        }
        document.getElementById("DEtab" + _tab).className = "deOn";
        document.getElementById("DETxt" + _tab).className = "deTdOn" + DEColorStr;
        document.getElementById("DEdiv" + _tab).style.display = ""; 
    }
