
<!-- hide this script for older browsers


function ConvertString(s3) {
 var nLen= s3.length;
 for( i=0; i <= nLen; i++)
    {
    if (s3.substring(i,i+1)== " ")
      {
      s3 = s3.substring(0,i) + "+" + s3.substring(i+1,nLen);
      }
    }
return(s3);
}


function ProcessIt(form, strState) {
        var selection;
        var strTest;
        var strLocation;
        var intChosen;
        var strSearch;
        intChosen = 999;  //dummy variable
        // process the form
        if (!form.SearchChoice.length)
        {  // single radio buttons
          if (form.SearchChoice.checked) {
            intChosen = 1;
            selection = form.SearchChoice.value;
          } else {  // not checked 
             alert("Please choose one of the search options\nby clicking on a button.");
          } 
          
        } else { // multiple radio buttons     
            for ( var i = 0 ; i < form.SearchChoice.length ; i++ ) 	
	    { 
		   if (form.SearchChoice[i].checked) 
		   {
			  intChosen = i;
  			  break;
		   }
	    } // end for
            if (intChosen == 999) {
               alert("Please choose one of the search options\nby clicking on a button.");
            } else {       
	       selection = form.SearchChoice[intChosen].value;
            }
            
        } // end if else
        // make sure that one of the radio buttons was chosen
        if (intChosen != 999) {
               
          strSearch = ConvertString(form.SearchWords.value);

          strTest = CreateIt(selection, strSearch);
 
  	      // set up HTML for chosen search
          strLocation = BuildSearchFrame(strTest, strState);
         } 
       	return (false);
}
// This function builds html code that will contain the search results. The html
// code is returned as a string so that it can be written out to the browser.
//    This creates a window with 2 frames: a small All Law frame on the top and 
//                                         the search results on the bottom 
function BuildSearchFrame(strURL, strState){
  var strHTML;

  strHTML = CreateSearchHTML(strURL, strState);  
  // open search results
  document.writeln(strHTML);
  document.close();

  return strHTML;
}

function CreateSearchHTML(strURL, strState) {
return "<html><head>\n" +
         "<meta http-equiv='Content-Type' content='text/html charset=windows-1252'>\n" +  
         "<title>All Law - State Law Search</title>\n" + 
         "</head> \n" +
         "<frameset framespacing=0 border=0 frameborder=0 rows='70,*'>\n" +
         "<frame name='header' scrolling='no' noresize target='main' src='http://www.alllaw.com/state_law_search/" + strState +"/Search_top.htm'>\n" + 
         "<frame name='main' src='" + strURL + "' scrolling='auto'>\n" +
         "<noframes><body>\n" +  
         " <p>\n" + 
         "<p>This page uses frames, but your browser doesn't support them.</p>\n" +
         "</body>\n" +
         "</noframes>\n" +
         "</frameset></html>"

}

//end -->
