﻿// JScript File
    function doClick()
    {
        //the purpose of this function is to allow the enter key to 
        //point to the correct button to click.
        var key;
        var buttonName;
        //buttonName = "ctl00$Header1$btnSearch"; // worked in .NET 2.0
        buttonName = "ctl00_Header1_btnSearch"; // works in .NET 3.0

         if(window.event)
              key = window.event.keyCode;     //IE
         else
              key = e.which;     //firefox

        if (key == 13)
        {
            //alert("doClick() here");
            //Get the button the user wants to have clicked
            var btn = document.getElementById(buttonName);
            if (btn != null)
            { //If we find the button click it
                btn.click();
                event.keyCode = 0
            }
        }
    }
    
    function submitForm()
    {
        var selectMenu = document.getElementById("SearchType")
        var chosenOption = selectMenu.options[selectMenu.selectedIndex].value
        //alert("here: " + chosenOption.value);  
        var searchText;
        searchText = this.frmHdrSearch.txtSearch.value;
        var newPage;
        newPage = "search.aspx?s=" + searchText + "&t=" + chosenOption;
      // alert("submitForm() here");
      //document.myform.submit();
      //document.frmHdrSearch.submit();
      //window.navigate('searchresults.aspx');

        window.navigate(newPage);

    }

