/*
*******************************************************
Author: Daisy
Date:	28/04/2005
Desc:
This controls the button that should be clicked when 
the user presses return in a text field

The following should also be added to the code behind
TextBox1.Attributes.Add("onkeypress", "return clickButton(event,'" + Button1.ClientID + "')");

------------------------------------------------------------------
 Web: http://weblogs.asp.net/rajbk/archive/2003/12/11/43023.aspx
------------------------------------------------------------------
*/
function clickButton(e, buttonid){ 
	var bt = document.getElementById(buttonid); 
	if (typeof bt == 'object'){ 
			if(navigator.appName.indexOf("Netscape")>(-1)){ 
				if (e.keyCode == 13){ 
						bt.click(); 
						return false; 
				} 
			} 
			if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1)){ 
				if (event.keyCode == 13){ 
						bt.click(); 
						return false; 
				} 
			} 
	} 
} 