

function HtmlComponentHistoricReturn()
{
	try
	{
		var button = document.getElementById('Button.HtmlComponenent.HistoricReturn.Show');
		if (button)
		{
			button.onclick = function()
			{
				try
				{
					if (typeof(Page.Form) != 'undefined')
					{
						var target = document.getElementById('graph_historicreturn');
						if (target)
						{
							var qs = new Array();
							qs.push('isin=' + QueryString.Item('isin'));

							var period = Page.Form.getValueByName('slct3')
							qs.push('slct3=' + period);

							target.src = 'historicreturn.asp?' + qs.join('&');

							return false; //supress native postback event
						}
					}
					else
					{
						var form = (document.forms.length) ? document.forms[0] : null;
						if (form)
						{
							form.action = '#historic_return';
						}
					}

					//postback will occur automaticly!



/*					if (typeof(Page.Form) != 'undefined')
					{
						var form = Page.Form.getFormObject();
						if (form)
						{
							form.action = '#historic_return';
						}
					}
					else
					{
						var form = (document.forms.length) ? document.forms[0] : null;
						if (form)
						{
							form.action = '#historic_return';
						}
						else
						{
							window.alert('Vi beklager!\n\nDet er i øjeblikket ikke muligt at skifte perioden.');

							return false; //supress native postback event
						}
					}

					//postback will occur automaticly!

*/
				}
				catch (ex)
				{
					throw (ex);
				}
			};
		}
	}
	catch (ex)
	{
		throw (ex);
	}
};