	var ns = (document.layers)? true:false;
	var ie = (document.all)? true:false;

			
	//Event Handlers
	function Body_OnLoad()
	{		

		document.onkeydown = handler; 
		window.onkeydown = handler; 
		document.frmContactSearch.onkeydown = handler;
		document.onkeypress = handler; 
		window.onkeypress = handler; 
		document.frmContactSearch.onkeypress = handler;
		
	
		if (ns)
		{
			document.frmContactSearch.lstProviderType.onkeydown = handler;			
			document.frmContactSearch.lstInstitutionRegion.onkeydown = handler; 
			document.frmContactSearch.lstProviderNameMatch.onkeydown = handler; 
			document.frmContactSearch.txtProviderName.onkeydown = handler; 
		}

		
		return;
	}

	function handler(e)
	{	if(ie)
		{
			e = window.event;
			if (e.keyCode == 13)
				search();
		}		
		else
		{
			if(e.which == 13)
				search();
		}
	}

	function search()
	{
		document.frmContactSearch.hdnMode.value = "search";
		document.frmContactSearch.submit();
	}
	
	function ShowHelpPopup(anchor)
	{	
		var popupwidth, popupheight;
		var popupleft, popuptop;
		var WindowOptions
		
		if(anchor == "showall")
		{
			popupwidth = window.screen.width - 200;
			popupheight = window.screen.height - 200;
		}
		else
		{
			popupwidth = 400;
			popupheight = 450;
		}
		
		popupleft = (window.screen.width - popupwidth) / 2;
		popuptop = (window.screen.height - popupheight) / 2;
		
		WindowOptions = "width=" + popupwidth + ",height=" + popupheight + "," + 
						"scrollbars=yes,top=" + popuptop + ",left=" + popupleft + "";
							
		window.open("ContactHelp.aspx?anchor=" + anchor, "Help", WindowOptions);
	}
