

/*									*/
/* 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 form = (document.forms.length) ? document.forms[0] : null;
		if (form)
		{
			var qs = new Array();
			qs.push('isin=' + QueryString.Item('isin'));
			for (var i=0; i<form.elements.length; i++)
			{
				var el = form.elements.item(i);
				if (el)
				{
					qs.push(el.name + '=' + el.value);
				}
			}
		}

		//form.method = 'post';
		form.action = 'pdf.asp?' + qs.join('&');

		form.submit();
	}
	catch (ex)
	{
		throw (ex);
	}
};


/*				*/
/* end of file	*/
/*				*/


