

/*									*/
/* code beside for html web			*/
/* componenet 'performance graph'	*/
/*									*/


function HtmlComponentPerformancegraph()
{
	try
	{
		var element = document.getElementById('Button.HtmlComponenent.Performancegraph.Show');
		if (element)
		{
			element.onclick = function(e)
			{
				try
				{
					if (typeof(Page.Form) != 'undefined')
					{
						var target = document.getElementById('graph_performance');
						if (target)
						{
							var qs = new Array();
							qs.push('isin=' + QueryString.Item('isin'));

							var period = Page.Form.getValueByName('slct2')
							qs.push('period=' + period);

							var isin2 = Page.Form.getValueByName('slct1');

							if (isin2.length == 12)
							{
								qs.push('isin2=' + isin2);
							}

							target.src = 'performance.asp?' + qs.join('&');

							return false; //supress native postback event
						}
					}
					else
					{
						var form = (document.forms.length) ? document.forms[0] : null;
						if (form)
						{
							form.action = '#performancegraph';
						}
					}

					//postback will occur automaticly!
				}
				catch (ex)
				{
					throw (ex);
				}
			};
		}

		var element = document.getElementById('62356055-76ec-47fa-a486-087ef6133ab3'); //slct1
		if (element)
		{
			element.onchange = function(e)
			{
				try
				{
					if (this.options(this.selectedIndex).value < 0)
					{
						//illegal choice. adjust to above item
						this.selectedIndex--;
					}
				}
				catch (ex)
				{
					throw (ex);
				}
			};
		}
	}
	catch (ex)
	{
		throw (ex);
	}
};


/*				*/
/* end of file	*/
/*				*/