function SearchByPayment(){

    //min price
    var pmin=document.theform_1.MyPriceBottom.value;
    
    if ( (pmin > 1) && (pmin < 5000) ) {
      //Use 1 dollar as the min...
      pmin = 1;
      }
    else if ( (pmin > 5000) && (pmin < 10000) ) {
      //Use 5000 as the min...
      pmin = 5000;
      }
    else if ( (pmin > 10000) && (pmin < 15000) ) {
      //Use 10000 as the min...
      pmin = 10000;
      }
    else if ( (pmin > 15000) && (pmin < 20000) ) {
      //Use 15000 as the min...
      pmin = 15000;
      }
    else if ( (pmin > 20000) && (pmin < 30000) ) {
      //Use 20000 as the min...
      pmin = 20000;
      }
      
    //max price
    var pmax=document.theform_1.MyPriceTop.value;
    
    if ( (pmax > 2500) && (pmax < 5000) ) {
      //Use 2500 dollars as the min...
      pmax = 2500;
      }
    else if ( (pmax > 5000) && (pmax < 10000) ) {
      //Use 5000 as the min...
      pmax = 5000;
      }
    else if ( (pmax > 10000) && (pmax < 15000) ) {
      //Use 10000 as the min...
      pmax = 10000;
      }
    else if ( (pmax > 15000) && (pmax < 20000) ) {
      //Use 15000 as the min...
      pmax = 15000;
      }
    else if ( (pmax > 20000) && (pmax < 30000) ) {
      //Use 20000 as the min...
      pmax = 20000;
      }
    else if (pmax > 30000) {
      //Use 30000 as the min...
      pmax = 30000;
      }

    //Find out if it's for a new or used vehicle, and adjust the link accordingly (JRP - added 1/25/07)...
    var strQString
    if ( document.calculatorform.newused.options[document.calculatorform.newused.selectedIndex].value == "n" ) {
      strQString = "?s=n&d=&m=&y=&pricelow=" + pmin + "&pricehigh=" + pmax;
      window.location.href="/inventory/default.aspx" + strQString;
    }
    else {
      strQString = "?s=u&d=&m=&y=&pricelow=" + pmin + "&pricehigh=" + pmax;
      window.location.href="/inventory/listused.aspx" + strQString;
    }
    
}