

/*									*/
/* code beside for factsheet.asp	*/
/*									*/


var Page = new function()
{
	this.Form;
	this.Performance = (typeof(HtmlComponentPerformancegraph) != 'undefined') ? HtmlComponentPerformancegraph() : null;
	this.HistoricReturn = (typeof(HtmlComponentHistoricReturn) != 'undefined') ? HtmlComponentHistoricReturn() : null;
	this.AssetAllocation = (typeof(HtmlComponentAssetAllocation) != 'undefined') ? HtmlComponentAssetAllocation() : null;
};


window.onload = function()
{
	try
	{
		Page.Form = new Form((document.forms.length) ? document.forms[0] : null);


		var elements = document.getElementsByTagName('INPUT');
		for (var i=0; i<elements.length; i++)
		{
			var el = elements[i];
			if (el.type == 'image')
			{
				el.onmouseover = function(e)
				{
					try
					{
						this.src = '../../Shared/Images/button.show.graph.off.da.gif';
					}
					catch (ex)
					{
						throw (ex);
					}
				};

				el.onmouseout = function(e)
				{
					try
					{
						this.src = '../../Shared/Images/button.show.graph.on.da.gif';
					}
					catch (ex)
					{
						throw (ex);
					}
				};
			}
			
		}


		//set initial holding state
		if (document.fireEvent)
		{
			//////////////////////////////////////
			// note: only ie supports accurate	//
			// dynamic table re-rendering.		//
			// todo: a possible work around		//
			// could be fixed table?!			//
			//////////////////////////////////////

			if (typeof(table_holdings_changeview) != 'undefined')
			{
				table_holdings_changeview(document.getElementById('Link.AssetAllocation.Show10'));
			}
		}
		else
		{
			//do nothing...
			//hide footer
			var el = document.getElementById('component_holding_footer');
			if (el) { el.className = 'hide'; }
		}
	}
	catch (ex)
	{
		throw (ex);
	}
};


function print_to_pdf()
{
	try
	{
		var strURL = document.URL;
		var isin = strURL.split("=")[1];

		var form = (document.forms.length) ? document.forms[0] : null;
		if (form)
		{
			form.action = 'pdf.asp?isin=' + isin;

			form.submit();
		}

		return;
	}
	catch (ex)
	{
		throw (ex);
	}
};



/*				*/
/* end of file	*/
/*				*/

