if (!window.Splash)
	window.Splash = {};

Splash.Page = function() 
{
}
var count = 0;

var iOp1 = 0;
var iOp2 = 0;
var iOp3 = 0;

Splash.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;



		setTimeout ('PulseTimer()', 25 );
		
	},
	
	// Sample event handler
	handleMouseDown: function(sender, eventArgs) 
	{
		// The following line of code shows how to find an element by name and call a method on it.
		// this.control.content.findName("Timeline1").Begin();

	}
}


		function GoSilverlight()
		{
			window.location = "Silverlight/index.htm"
		}
		

		function PulseTimer()
		{
		    var s1 = document.getElementById('SilverlightControlSplash');

			var nameString = "image" + count;

			if(count == 5)
			{
				setTimeout ('GoSilverlight()', 1000 );
			}
			else
			{
				if (iOp1 < 0.95)
				{
					iOp1 = iOp1 + 0.05;
					s1.content.findName(nameString).Opacity = iOp1;
					s1.content.findName(nameString).Visibility = "Visible";

					if(count == 4)
					{
						s1.content.findName("TextBlock").Opacity = iOp1;
						s1.content.findName("TextBlock").Visibility = "Visible";
					}
					
					if (iOp1 > 0.40)
					{
						if(count != 4)
						{
							iOp2 = iOp2 + 0.05;
							var nameString2 = "image" + (count+1);
							s1.content.findName(nameString2).Opacity = iOp2;
							s1.content.findName(nameString2).Visibility = "Visible";
						}

						if(count == 3)
						{
							s1.content.findName("TextBlock").Opacity = iOp2;
							s1.content.findName("TextBlock").Visibility = "Visible";
						}

					}


					if (iOp1 > 0.80)
					{
						if(count < 3)
						{
							iOp3 = iOp3 + 0.05;
							var nameString3 = "image" + (count+2);
							s1.content.findName(nameString3).Opacity = iOp3;
							s1.content.findName(nameString3).Visibility = "Visible";
						}


					}
				}
				else
				{
					iOp1 = iOp2;
					iOp2 = iOp3;
					iOp3 = 0;
					count++;
				}

				setTimeout ('PulseTimer()', 35 );
			}

		}

/*			for (var i=0; i < 5; i++) {
				var nameString = "image" + i;
//				sender.findName(nameString).Opacity = 1;
				s1.content.findName(nameString).Visibility = "Visible";
			}

			

		}
*/
		
