String.prototype.formatage = function(type) {
	var x=this.toString();
	switch(type){
		case '00':
			if(x.length == 1) return '0'+x;
			return x;
			break;
	}
	return(x);
};

String.prototype.encode = function(){
	var x=this.toString();
    retour = x.gsub("#","[diez]");
    retour = retour.gsub("%","[pourcent]");
    retour = retour.gsub("&","[esperluette]");
    retour = retour.gsub("'","[apos]");
    retour = retour.gsub(/\?/,"[point_int]");
    return(retour);
};
