// ***************************************************************************************************************************************
// Function :: Used to display Scroller Window / tray according to the Browser
function DispSliderWindow()
{
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		document.getElementById('SliderWindow').innerHTML = strJsIEWindow;
	}
	else
	{
		document.getElementById('SliderWindow').innerHTML = strJsNonIEWindow;
	}
}
// ***************************************************************************************************************************************
// Function :: Validate operation, mark windows to be slided and get started with sliding
function StartSliding(strOperation)
{
	if (strOperStatus == "Completed")
	{
		if (strOperation == "previous")
		{
			if (intCurrWindow == 1)
			{
				alert("Sorry! You are viewing first window.");
			}
			else
			{
				strWindowOne = "SlideWindow" + intCurrWindow;
				intCurrWindow = intCurrWindow - 1;
				strWindowTwo = "SlideWindow" + intCurrWindow;
				
				LRSlideWindows();
				strOperStatus = "Incomplete";
			}
		}
		else if (strOperation == "next")
		{
			if (intCurrWindow == intTotalWindows)
			{
				alert("Sorry! You are viewing last window.");
			}
			else
			{
				strWindowOne = "SlideWindow" + intCurrWindow;
				intCurrWindow = intCurrWindow + 1;
				strWindowTwo = "SlideWindow" + intCurrWindow;
				
				RLSlideWindows();
				strOperStatus = "Incomplete";
			}
		}
	}
}
// ***************************************************************************************************************************************
// Function :: Used to slides winodws one after another from left to right
function LRSlideWindows()
{
	if (parseFloat(document.getElementById(strWindowOne).style.left) < 693)
	{
		document.getElementById(strWindowOne).style.left = (parseFloat(document.getElementById(strWindowOne).style.left) + parseFloat(5)) + "px";
		document.getElementById(strWindowTwo).style.left = (parseFloat(document.getElementById(strWindowTwo).style.left) + parseFloat(5)) + "px";
		
		var delay = setTimeout("LRSlideWindows()", 0);
	}
	else
	{
		strOperStatus = "Completed";
	}
}
// ***************************************************************************************************************************************
// Function :: Used to slides winodws one after another from right to left
function RLSlideWindows()
{
	if (parseFloat(document.getElementById(strWindowOne).style.left) > -693)
	{
		document.getElementById(strWindowOne).style.left = (parseFloat(document.getElementById(strWindowOne).style.left) - parseFloat(5)) + "px";
		document.getElementById(strWindowTwo).style.left = (parseFloat(document.getElementById(strWindowTwo).style.left) - parseFloat(5)) + "px";
		
		var delay = setTimeout("RLSlideWindows()", 0);
	}
	else
	{
		strOperStatus = "Completed";
	}
}
// ***************************************************************************************************************************************