if (!window.hd) { window.hd = {}; }
hd.header = function() { }
hd.header.prototype =
{
	handleLoad: function(control, userContext, rootElement) {
		this.headerControl = control;
		this.rootElement = rootElement;
		this.rootElement.findName('animation').Begin();
		this.rootElement.findName("animation").addEventListener("Completed", Silverlight.createDelegate(this, this.animation_completed))
		this.rootElement.findName("timer").addEventListener("Completed", Silverlight.createDelegate(this, this.timer_completed))
		
	},
	
	handleError: function(sender, eventArgs)
	{
	    //do nothing...
	},
	
    animation_completed	: function(sender, eventArgs) {
        this.rootElement.findName("timer").Begin();
    },
    timer_completed: function(sender, eventArgs) {
        this.rootElement.findName("timer").Stop();
        this.rootElement.findName("animation").Stop();
        this.rootElement.findName("animation").Begin();
    }	
}