 /*  ........................................................................ 
   JAVASCRIPT CODE TO UPDATE THE MAXPRICE BOX DEPENDING ON THE MINPRICE SELECTED
      by alvaro blanco
   
     -.. then on the select of the minPrice we need to add the code:  
     
   onchange="updateMaxPrice('idOftheMaxPriceSelect', this.options[this.selectedIndex].value)"
   ........................................................................
 */
 // TO use this the JS array  called      "arrayValues" must be initializated with the PHP values 

 function updateMaxPrice(selectID, newMinPrice)
			{
				// this function is loaded when the box of MinPrice changes.
				// Then it doenst allow to select lower price on the MaxPrice Select Box.		
			    maxPriceSelect = document.getElementById(selectID);
				
				//check the case in which there is already one object select in maxPrice and its lower than the new minPrice selected
				if (parseFloat (newMinPrice) > parseFloat (maxPriceSelect.options[maxPriceSelect.selectedIndex].value))
				  { maxPriceSelect.selectedIndex = 0; }
				//--------
				
				//now hides or show the option depending on if its bigger or lower that the minPrice
				for (var i = 1; i < arrayValues.length; i++){
				
					if (parseFloat(arrayValues[i]) <= parseFloat(newMinPrice))
					  {					   
					   maxPriceSelect.options[i].style.display = "none";
					  }else {
						maxPriceSelect.options[i].style.display = "";
					}
				}			
				
			}	
/* END OF THE JAVASCRIPT CODE TO UPDATE THE MAXPRICE IN CASE THE MINPRICE CHANGES*/

