DownloadPage = function()
{
	Unyk.Web.UI.Page.call(this);
};

YAHOO.lang.extend(DownloadPage, Unyk.Web.UI.Page, 
{

	//*************************************************************************
	//
	//	Fields
	//
	//*************************************************************************
	_defaultForm : "frmMain",
	_ToolbarFlashContent : 
		'<object width="400" height="200" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
		'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">' +
		'<param name="movie" value="{0}" />' +
		'<param name="quality" value="high" />' +
		'<param name="loop" value="true" />' +
		'<param name="menu" value="false" />' +
		'<embed width="400" height="200" src="{0}" quality="high" ' +
		' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ' +
		' type="application/x-shockwave-flash"></embed></object>',
		
	_UnykSyncroFlashContent :
		'<object width="316" height="201" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
		' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">' +
		'<param name="movie" value="{0}">' +
		'<param name="quality" value="high">' +
		'<param name="loop" value="true">' +
		'<param name="menu" value="false">' +
		'<embed width="316" height="201" src="{0}" quality="high" ' +
		' pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" ' +
		' type="application/x-shockwave-flash"></embed></object>',
	
	
	
	//*************************************************************************
	//
	//	Events
	//
	//*************************************************************************
	
	//
	//	Handles the Page Load event.
	//
	Page_Load : function(e, args)
	{
	    // Assign the default form to post back to.
	    this.Form = this._defaultForm;
	    
	    // Init all the page listeners.
	    this.InitListeners();
	    
	    // Render flash movies
	    if ($("toolbar-anim"))
			$("toolbar-anim").innerHTML = this._ToolbarFlashContent.format(PageLewt.ToolbarFlashMovieUrl);
			
		if ($("unyksyncro-anim"))
			$("unyksyncro-anim").innerHTML = this._UnykSyncroFlashContent.format(PageLewt.UnykSyncroFlashMovieUrl);
	},
	
	
	//
	//	Handles the lnkInstallToolbar click event.
	//
	lnkInstallToolbar_Click : function(e, args)
	{
		Omniture.TrackDownloadLink(e, "Toolbar Download", {eVar9: PageLewt.CurrentLang}, ["event17"]);
	},
	
	
	
	//*************************************************************************
	//
	//	Private API
	//
	//*************************************************************************
	
	//
	//	...
	//	
	InitListeners : function()
	{
		Event.on("lnkInstallToolbar", "click", this.lnkInstallToolbar_Click, null, this);
	}

});

// Makes DownloadPage a singleton.
DownloadPage = new DownloadPage();

	

//
//	This is the js implementation of the .asp page's Page Methods.
//
PageMethods = function()
{
	Unyk.Web.PageMethodsProxy.call(this);
};

YAHOO.lang.extend(PageMethods, Unyk.Web.PageMethodsProxy, 
{
});

PageMethods = new PageMethods();
PageMethods.Path = "/Help/Download.asp";
