String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}

// ==== FUNCTIONS FOR DEALING GENERIC FORMS ====
// ---- Functions called from onFocus & onBlur events in generic form elements
function clearSearch(objInput)
{if (objInput.value=="Recherche sur site") objInput.value = "";}

function clearProductFinder(objInput)
{if (objInput.value=="RECHERCHE PRODUITS") objInput.value = "";}

function resetSearch(objInput)
{if (objInput.value=="") {objInput.value = objInput.defaultValue;}}

function clearText(objInput)
{
}
// ---- Function called from onChange event in Product Finder "by type" dropdown
function fn_PF_by_type(objSel)
{
 if(objSel.value!="")
 {
  alert("Faire quelque chose avec l\047identifiant de type de produit" + objSel.value + "'");
 }
}

// ---- Function called from onChange event in Product Finder "by industry" dropdown
function fn_PF_by_industry(objSel)
{
 if(objSel.value!="")
 {
  alert("Faire quelque chose avec l\047identifiant d\047industrie" + objSel.value + "'");
 }
}

// ---- Function called from onSubmit event on Product Finder form
function fn_QuickSearch_Verify(objForm)
{
 var tmpVal = objForm.Query.value;
 if(tmpVal!="" && tmpVal!="Recherche sur site"){return true;}
 return false;
}
// ---- Function called from onSubmit event on Product Finder form
function fn_PF_Verify(objForm)
{
 var tmpVal = objForm.ProductSearch.value;
 if(tmpVal!="" && tmpVal!="RECHERCHE PRODUITS"){return true;}
 return false;
}

// ---- Function called from onChange event in a Service Centre region dropdown
function fn_SelectServiceRegion(objSel)
{
 if(objSel.value!="")
 {
  alert("Faire quelque chose avec l\047identifiant r\351gional" + objSel.value + "'");
 }
}

// ---- Function called from onChange event in Product Pages "Other related products" dropdown
function fn_RelatedProducts(objSel)
{
 if(objSel.value!="")
 {
  alert("Faire quelque chose avec l\047identifiant de produit" + objSel.value + "'");
 }
}
