function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function param_redirect(strFrag) {	
  // take the new argument value(s)
  // and create a new querystring,
  // subbing out old values for no dupes
  
  // parse the new querystring fragment into an array
  newPairs = new Array();
  Pairs = strFrag.split("&");
  for (i=0;i<Pairs.length;i++) {
    thisPair = Pairs[i].split("=");
    // filter out the params[..]
    if (thisPair[0].substring(0,7)=='params['){
      thisPair[0] = thisPair[0].split("[")[1];
      thisPair[0] = thisPair[0].split("]")[0];
    }
    newPairs[i] = thisPair
  }
  // build the new querystring
  // first with the new values
  strQ = new String;
  start_year = 0
  end_year = 0
  start_contribution_year = 0
  end_contribution_year = 0
  start_expenditure_year = 0
  end_expenditure_year = 0  
  for (i=0;i<newPairs.length;i++) {
    if (i > 0) strQ += "&";
    strQ += newPairs[i][0] + "=" + newPairs[i][1];
    
    
    
    if (newPairs[i][0] == 'start_year') start_year = newPairs[i][1];
    if (newPairs[i][0] == 'end_year') end_year = newPairs[i][1];
    if (newPairs[i][0] == 'start_contribution_year') start_contribution_year = newPairs[i][1];
    if (newPairs[i][0] == 'end_contribution_year') end_contribution_year = newPairs[i][1];
    if (newPairs[i][0] == 'start_expenditure_year') start_expenditure_year = newPairs[i][1];
    if (newPairs[i][0] == 'end_expenditure_year') end_expenditure_year = newPairs[i][1];
  }
  // make sure it's valid
  // both for summary page and inside
  if (start_year != 0 && end_year != 0) {
    if (start_year > end_year) {
      alert("Start year must be earlier than end year");
      return;
    }
  }
  if (start_contribution_year != 0 && end_contribution_year != 0) {
    if (start_contribution_year > end_contribution_year) {
      alert("Start year must be earlier than end year");
      return;
    }
  }
  if (start_expenditure_year != 0 && end_expenditure_year != 0) {
    if (start_expenditure_year > end_expenditure_year) {
      alert("Start year must be earlier than end year");
      return;
    }
  }
  
  // parse the existing querystring into an array
  oldPairs = new Array();
  var strOld=window.location.href.split("?")[1];
  if (strOld != undefined) {
    Pairs = strOld.split("&");
    for (i=0;i<Pairs.length;i++) {
      thisPair = Pairs[i].split("=");
      oldPairs[i] = thisPair;
    }
    // add any old values that aren't dupes
    for (i=0;i<oldPairs.length;i++) {
      if(!contains(oldPairs[i][0], newPairs)){
        strQ += "&" + oldPairs[i][0] + "=" + oldPairs[i][1];
      }
    }
  }
  function contains(strX, arrX) {
    for(j=0;j<arrX.length;j++)if(arrX[j][0]==strX)return true;
    return false;
  }
  window.location = window.location.href.split("?")[0] + '?' + strQ;
}
