/*ADDED BY MAJOLEE INFOTECH
 * FOR HELPER FUNCTIONS IN SEARCH
 * 
 */
 
 function formatSearchString(strCriteria)
 {
	var retValue;
	var convertActualDashes;
	convertActualDashes=strCriteria.replace(/-/g,"##_##");
	retValue= removeExtraDashedSpaces(convertActualDashes.replace(/\s/g, "-"));
	retValue = retValue.replace(/\#\#\_\#\#/g,"-");
	return retValue;
 }
 
 /*recursively removes two consecutive dashes and makes them as one dash
  * 
  */
 function removeExtraDashedSpaces(strWithDashedSpace)
 {
	 //alert(strWithDashedSpace);
	 if (strWithDashedSpace.indexOf("--")>=0)
	 {
		 strWithDashedSpace=removeExtraDashedSpaces(strWithDashedSpace.replace(/--/g, "-"));
	 }
	 return strWithDashedSpace; 
 }
