﻿/*
 * ----------------------------------------------------------------
 * This script is created by HakoSoft
 * Created By : HakoSoft, Nov 12 2008
 *
 * For Web/Application request, please visit http://www.hakosoft.com
 * You may use this script for your personal, non-commercial project(s)
 * However, the above text must remain intact and cannot be modified 
 * in any way 
 * ----------------------------------------------------------------
 */

var ssLimit=4;
var num=0;
var timeDelay;

function autoslideshow()
{
	num++;
	if (num>=ssLimit)
		num=0;	
	
	for(i=0; i<ssLimit; i++)
	{
		if(i == num)
		{
			document.getElementById('div_ss' + i).style.display = 'block';
			document.getElementById('ssTab' + i).className = 'active';
		}
		else
		{
			document.getElementById('div_ss' + i).style.display = 'none';
			document.getElementById('ssTab' + i).className = 'normal';
		}
	}
	timeDelay=setTimeout("autoslideshow()",5000);
}
function changeSS(chosen)
{
	num = chosen;
	clearTimeout(timeDelay);
	for(i=0; i<ssLimit; i++)
	{
		if(i == num)
		{
			document.getElementById('div_ss' + i).style.display = 'block';
			document.getElementById('ssTab' + i).className = 'active';
		}
		else
		{
			document.getElementById('div_ss' + i).style.display = 'none';
			document.getElementById('ssTab' + i).className = 'normal';
		}
	}
	timeDelay=setTimeout("autoslideshow()",8000);	
}