﻿DefaultPage = new Object();

// loads the slideshow for the homepage
DefaultPage.load = function()
{
	var bannerContent = document.getElementById("BannerContent");
	
	if (bannerContent)
	{
		var path = Tactica.basePath;
		
		bannerContent.style.position = "relative";

		for (var i = 0; i <= 5; i++)
		{
			var elm = bannerContent.appendChild(document.createElement("div"));
			
			elm.style.backgroundImage = "url(\"" + path + "images/banner_right_0" + (i + 1) + ".jpg" + "\")";
			elm.style.backgroundPosition = "right top";
			elm.style.backgroundRepeat = "no-repeat";
			elm.style.filter = "alpha(opacity=" + (i == 0 ? 100 : 0) + ")";
			elm.style.height = "188px";
			elm.style.right = "0px";
			elm.style.opacity = i == 0 ? 1 : 0;
			elm.style.position = "absolute";
			elm.style.top = "0px";
			elm.style.width = "480px";
			
			Slideshow.items[i] = elm;
		}

		Slideshow.start();
	}
}


// check for common script
if (!Tactica)
{
	alert("Required script 'scripts/tactica.js' is missing. Did you forget a script tag?");
}

// load required scripts
Tactica.loadScript("scripts/tactica.animation.js");
Tactica.loadScript("scripts/tactica.animation.fade.js");
Tactica.loadScript("scripts/tactica.animation.slideshow.js");

// set startup script
Tactica.addLoadFunction(DefaultPage.load);
