              
              

//----------Change top tabs
            var preTab ='0'
            var tabCase
            function changeTabs(obj, Case)
            { if(preTab !=obj)
              { tabCase =Case
              	setPreLoader(getObj('bestProductDiv'))
              	switch(Case)
              	{ case 1: loadBestProduct('new'); break;
                  case 2: loadBestProduct('best_seller'); break;
                  case 3: loadBestProduct('cheap'); break; }
              	obj.bgColor='white'
                obj.style.borderBottomWidth='0px'
                obj.style.color ='black'
                if(preTab !='0')
                { preTab.bgColor=''
                  preTab.style.borderBottomWidth='1px' }
                preTab =obj
            } }
            

//----------Best Product Changer
            function loadBestProduct(tsk)
			{ xmlFile =getXMLHttpObject()
		      if(xmlFile ==null) { alert("Browser does not support HTTP Request"); return }
			  url ='module/ajax/bestProduct.php?tsk='+ tsk
			  xmlFile.onreadystatechange =stateChanged_BestProduct
			  xmlFile.open("GET",url,true)
			  xmlFile.send(null) }
			      
			function stateChanged_BestProduct()
			{ if(xmlFile.readyState ==4 || xmlFile.readyState =="complete")
			  { getObj('bestProductDiv').innerHTML =xmlFile.responseText			    
			} }
