﻿

// JScript File


//<![CDATA[
var total = 4;
var standard = 1;
var pointer = 0;
var id;

function swap()
{
	pointer++;
	if(pointer > total)
	{
		pointer = standard;
	}
	tabSwap_Auto('tab_',pointer,total);
	// document.getElementById('tab_' + pointer).style.display='none';
}

function tabSwap(name, sw, count) {
	tabSwap_Auto(name, sw, count);
	pointer = sw;
	clearInterval(id);
	id = setInterval(swap, 5000);
}


function tabSwap_Auto(name, sw, count)
{
	for (i = 1; i <= count; i++) {
	if (sw == i) {  
		document.getElementById(name+i).style.display='block';
		} else {
		document.getElementById(name+i).style.display='none';
		}
	}
}

function btn_over(obj) { obj.src = obj.src.replace("_off", "_on");}
function btn_out(obj) { obj.src = obj.src.replace("_on", "_off");}

//]]>



tabSwap('tab_', standard, total);

