 function searchFormSubmit(form) {

// Herald Online has no newsbank listing
     if (form.aff.value == 'archives' || form.aff[1].checked == true) {
           window.location = "http://pqasb.pqarchiver.com/heraldonline/results.html?QryTxt=" + form.keywords.value + "&x=175&y=21&collection=archive";
//         window.location = "http://www.newslibrary.com/nlsearch.asp?search_mode=all&action=search&date_mode=year&year=last+180+days&sort=d%3Ah&nitems=10&region=none&dbquery=" + form.keywords.value;
	     form.whereto.value='';
             return false;
     } 
     else if (form.aff[2].checked == true || form.aff.value == 'web') {
	 form.whereto.value='';
         var encoded_keywords = encodeURIComponent(form.keywords.value);
         var section_num = '172';
         var url_version = 'ysr';
         var params = 'product=Yahoo%2COverture&' +
                      'collection=WEB&' +
                      'live_template=http%3A%2F%2Fwww.heraldonline.com%2F' + section_num + '%2Fv-' + url_version + '%2Findex.html&' + 
                      'error_template=http%3A%2F%2Fwww.heraldonline.com%2F' + section_num + '%2Fv-yerr%2Findex.html&' +
                      'preview_template=http%3A%2F%2Fpreview.heraldonline.com%2F' + section_num + '%2Fv-' + url_version + '%2Findex.html&' +
                      'results_per_page=10' +
		      '&prop_related=1&prop_dym=1';
         window.location = "http://search2.heraldonline.com/search-bin/search.pl.cgi?sf_Keywords=" + encoded_keywords + '&' + params;

         return false;
     }

// Haven't returned yet, must be a 'normal' search. Prep for anaconda! Set whereto.
     form.whereto.value='local';
     form.sf_pubsys_story.value=form.keywords.value;
     return true;
 }

// getParams *******************************************************************

function getParams(params) {
   var Params = new Object ();
   if ( ! params ) return Params; // return empty object
   var Pairs = params.split(/[;&]/);
   for ( var i = 0; i < Pairs.length; i++ ) {
      var KeyVal = Pairs[i].split('=');
      if ( ! KeyVal || KeyVal.length != 2 ) continue;
      var key = unescape( KeyVal[0] );
      var val = unescape( KeyVal[1] );
      val = val.replace(/\+/g, ' ');
      Params[key] = val;
   }
   return Params;

}

// end getParams *****************************************************************


