function SubmitForm() {
	var f=document.getElementById('buscarEmpresas');
	var priceLow=0;
	var priceHigh=0;
	if (f.price1[0].checked) {priceHigh=999999};
	if (f.price1[1].checked) {priceLow=1000000;priceHigh=9999999};
	if (f.price1[2].checked) {priceLow=10000000;priceHigh=''};
	f.priceLow.value=priceLow;
	f.priceHigh.value=priceHigh;
	f.salesLow.value=removePeriods(f.salesLow.value);
	f.salesHigh.value=removePeriods(f.salesHigh.value);
	f.submit();
}

function removePeriods( strValue ) {
/************************************************
DESCRIPTION: Removes commas from source string.

PARAMETERS:
  strValue - Source string from which commas will
    be removed;

RETURNS: Source string with commas removed.
*************************************************/	
	var objRegExp = /\./g; //search for periods globally
	strValue=String(strValue);
	//replace all matches with empty strings
	return strValue.replace(objRegExp,'');
}

function addPeriods ( strValue ) {
/************************************************
DESCRIPTION: Inserts commas into numeric string.

PARAMETERS:
  strValue - source string containing commas.

RETURNS: String modified with comma grouping if
  source was all numeric, otherwise source is
  returned.

REMARKS: Used with integers or numbers with
  2 or less decimal places.
*************************************************/
  strValue=removePeriods(strValue);
  var objRegExp  = new RegExp('(-?[0-9]+)([0-9]{3})');
  strValue=String(strValue);

    //check for match to search criteria
    while(objRegExp.test(strValue)) {
       //replace original string with first group match,
       //a comma, then second group match
       strValue = strValue.replace(objRegExp, '$1\.$2');
    }
  return strValue;
}
