 maxcount = 6;
            imgstr   = "/images/tab_";
            offtb      = "#FFFFFF";
            ontb      = "#E1E1E1";
            offtr       = "#666666";
            ontr       = "#E1E1E1";
            function swap_tabs(tabin){
             //Turn everything off

             for(i=0; i<=maxcount; i++){
                if(i == 0){
                  document.t0.src = imgstr + "left_off.gif";
                  bgs_off(1);
               }
              if(i == maxcount){
              document['t' + maxcount].src = imgstr + "right_off.gif";
             bgs_off(maxcount);
               if(maxcount > 1 && tabin == i){document['t' + (maxcount-1)].src = imgstr + "middle_righton.gif";}
                }
              if(i > 0 && i < maxcount){
            document['t'+i].src = imgstr + "middle_bothoff.gif";
            bgs_off(i);
             if(tabin == i){
            document['t'+(i-1)].src = imgstr + "middle_righton.gif";
            document['t'+i].src = imgstr + "middle_lefton.gif";
            bgs_on(i);                                                          
             }
             }
             }           
           //Turn left and right on
            if(tabin == 1){
            document.t0.src = imgstr + "left_on.gif";
             bgs_on(1);
            }
            if(tabin == maxcount){
           document['t' + maxcount].src = imgstr + "right_on.gif";
            bgs_on(maxcount);
           }
            }
			
			
			
// Quan Tran CrossBrowser
M=false;
N=false;
app=navigator.appName.substring(0,1);
if (app=='N') N=true; else M=true;

            function bgs_on(bgin){
				if (N){
					document.getElementById('tb' + bgin).style.backgroundColor = ontb;
					document.getElementById('tr' + bgin).style.backgroundColor = ontr;
					document.getElementById('fd' + bgin).style.display = "block";
				}
				else{
					document.all['tb' + bgin].style.backgroundColor = ontb;
					document.all['tr' + bgin].style.backgroundColor = ontr;                   
					document.all['fd' + bgin].style.display = "block";
				}
            }
			
            function bgs_off(bgin){
				if (N){
					document.getElementById('tb' + bgin).style.backgroundColor = offtb;
					document.getElementById('tr' + bgin).style.backgroundColor = offtr;
					document.getElementById('fd' + bgin).style.display = "none";
				}
				else{
					document.all['tb' + bgin].style.backgroundColor = offtb;
					document.all['tr' + bgin].style.backgroundColor = offtr;                   
					document.all['fd' + bgin].style.display = "none";
				}
            }            