function DoSearch()
    {
    // collect the values from the form and call up the search page
    // the_type determines which folder to search in
    // jigs, reels, hornpipes, etc are in different folders under BIAB

    var i = document.TheForm.tune_type.options.selectedIndex;
    var the_type = document.TheForm.tune_type.options[i].text;

    // get the search string
    var theString = "";
    var search_type = "";

    if (document.TheForm.sstring[0].checked) // search by starting string
        {
        theString = document.TheForm.starts_with.value;
        search_type = "start"
        }

    else // string to be contained in the title
        {
        theString = document.TheForm.contains.value;
        search_type = "in"
        };


    var append = "?folder=" + the_type + "&look_for=" + theString + "&search_type=" + search_type;
    window.open("mgu_found.php" + append);
    }

