//
// Banner JavaScript Source
//

a = new Array();
a[ 0] = "title";
a[ 1] = "t0";
a[ 2] = "t1";
a[ 3] = "t2";
a[ 4] = "t3";
a[ 5] = "t4";
a[ 6] = "t5";
a[ 7] = "t6";
a[ 8] = "t61";
a[ 9] = "t7";
a[10] = "t8";
a[11] = "t9";
a[12] = "t91";
a[13] = "t92";
a[14] = "t93";
a[15] = "t94";
a[16] = "t95";
a[17] = "t96";
a[18] = "t97";
a[19] = "t101";
a[20] = "t1011";
a[21] = "t1012";
a[22] = "t102";
a[23] = "t103";
a[24] = "t104";
a[25] = "t1041";
a[26] = "t1042";
a[27] = "t1043";
a[28] = "t1044";
a[29] = "t1045";
a[30] = "t1046";
a[31] = "t1047";
a[32] = "t1048";
a[33] = "t1049";
a[34] = "t9001";
var maxTitle = 34;

// Wait for all Objects
function WaitForAllObjects()
{
	for(i = 0; i <= maxTitle; i++)  {
		if(! IsObject(a[i]))  {
			setTimeout("WaitForAllObjects()", 300);
			return;
		}
	}
}

// Various Menu
function OnMouseOverVarious()
{
	b9.src = "images/h9.gif";
	Show("menu", true);
}

function HideMenu()
{
	Show("menu", false);
}

var timerMenu;
function HideMenuDelayed()
{
	timerMenu = setTimeout("HideMenu()", 700);
}

function KillDelay()
{
	clearTimeout(timerMenu);
}

// Titles
var period = 30;
var timerTitle = 0;
function ShowTitle(number)
{
	// Hide all Titles
	HideTitle();
	// Start Position
	SetLeft("title", ScreenWidth() - 90);
	Show("title", true);
	eval("Show('t" + number + "', true)");
	// Start
	timerTitle = setTimeout("SlideIn()", period);
}

var position = 145;
function SlideIn()
{
	pos = position + (GetLeft("title") - position) * 0.667;
	SetLeft("title", pos);
	if(Math.round(pos) > position)
		timerTitle = setTimeout("SlideIn()", period);
	else
		timerTitle = 0;
}

function HideTitle()
{
	WaitForAllObjects();
	if(timerTitle)
		clearTimeout(timerTitle);
	for(i = 0; i <= maxTitle; Show(a[i++], false));
}

