function setTab(which){
	var tab = "tab" + which;
	var currentTab = "tab" + currTab ;
	
	var tabContent = "topseller" + which;
	var currentTabContent = "topseller" + currTab;
	document.getElementById(currentTabContent).style.display='none';
	document.getElementById(currentTab).removeAttribute("class", 'tabOn');
	document.getElementById(currentTab).removeAttribute("className", 'tabOn');

	if ( which == fstTab){
		for( i=fstTab+1;i<=lstTab;i++){
			document.getElementById("tab" + i).setAttribute("className","tabOff");
			document.getElementById("tab" + i).setAttribute("class","tabOff");
		}
	}
	else if ( (which>fstTab) && (which<lstTab)){

		for ( i=1;i<which;i++){
				document.getElementById("tab" + i ).setAttribute("className","tabOff fir");
				document.getElementById("tab" + i ).setAttribute("class","tabOff fir");
		}
		for(i=which+1;i<=lstTab;i++){
				document.getElementById("tab" + i ).setAttribute("className","tabOff");
				document.getElementById("tab" + i ).setAttribute("class","tabOff");
		}
		
	}
	else if ( which == lstTab){
		for( i=1;i<lstTab;i++){
			document.getElementById("tab"+i).setAttribute("className","tabOff");
			document.getElementById("tab"+i).setAttribute("class","tabOff");
		}
	}
	
	document.getElementById(tabContent).style.display='block';
	
	document.getElementById(tab).removeAttribute("class", 'tabOff');
	document.getElementById(tab).setAttribute("class","tabOn");
	document.getElementById(tab).removeAttribute("className", 'tabOff');
	document.getElementById(tab).setAttribute("className","tabOn");

	currTab=which;
}
