﻿if (!window.project_sl_banner)
	window.project_sl_banner = {};

project_sl_banner.Page = function() 
{
}

project_sl_banner.Page.prototype =
{
	handleLoad: function(control, userContext, rootElement) 
	{
		this.control = control;
		
		// Sample event hookup:	
		rootElement.addEventListener("MouseLeftButtonDown", Silverlight.createDelegate(this, this.handleMouseDown));
	},
	
	// 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("Storyboard1").Begin();
	}
}

var timelines = new Array("de_logo_anim","iil_logo_anim","mpug_logo_anim","six_d_tech_logo_anim","pmpi_logo_anim");
var canvases = new Array("de_logo","iil_logo","mpug_logo","six_d_tech_logo","pmpi_logo");
var urls = new Array("http://www.decisionedge.com/landing_decisionedge_microsoft2007awareness.html","http://www.iil.com/msproject/2007_default.asp","http://www.mpug.com/","http://www.6dtech.com/","http://www.ms-project-training.com/")
//curranim=1;
currsection=0;



function playfirst(sender,eventArgs){
sender.findName(canvases[currsection]).visibility = "Visible";
sender.findname(timelines[currsection]).Duration="00:00:03";
	sender.findName(timelines[currsection]).begin();
/*sender.findName("de_logo").visibility="Visible";
sender.findName("de_logo_anim").begin();*/

}


function animcomplete(sender,eventArgs){

/*sender.findName(canvases[currsection]).visibility = "Collapsed";
	sender.findName(timelines[currsection]).stop();
	currsection++;

if (currsection == 5)
	{
		currsection = 0;
	}
	
	sender.findName(canvases[currsection]).visibility = "Visible";
	sender.findName(timelines[currsection]).begin();
	
*/}

function mouseover(sender,eventArgs){

//sender.findname(timelines[curranim]).pause();
sender.findname(timelines[currsection]).pause();
}

function mouseout(sender,eventArgs){
//sender.findname(timelines[curranim]).resume();
sender.findname(timelines[currsection]).resume();
}



function next(sender,eventArgs){
sender.findname(timelines[currsection]).Duration="00:00:03";
sender.findname(timelines[currsection]).begin();
sender.findname(canvases[currsection]).Visibility="Collapsed";
sender.findname(timelines[currsection]).stop();
currsection++;
	if (currsection == 5)
	{
		currsection = 0;
	}
	
sender.findname(canvases[currsection]).Visibility="Visible";
sender.findname(timelines[currsection]).Duration="00:00:03";
sender.findname(timelines[currsection]).begin();

}

function back(sender,eventArgs){
sender.findname(timelines[currsection]).Duration="00:00:04";
sender.findname(timelines[currsection]).begin();
sender.findname(canvases[currsection]).Visibility="Collapsed";
sender.findname(timelines[currsection]).stop();

if (currsection == 0)
	{
		currsection = 5;
	}
	currsection--;
sender.findname(canvases[currsection]).Visibility="Visible";
sender.findname(timelines[currsection]).Duration="00:00:03";
sender.findname(timelines[currsection]).begin();
}


function click(sender,eventArgs){
//sender.findname(timelines[curranim]).resume();
window.open(urls[currsection]);
}