/**************************************************************************************************/
/* Standard function to replace formatting charcters in 'xmlfiles' content                        */ 
/* receives 'string'                                                                              */
/* replaces: [^] by <br />, [~] by '&nbsp;', tab charcaters by nothing, '[' by '<' and ']' by '>' */
/* returns: updated string.  Usage: var newstring = replaceFormatting(string);                    */
/**************************************************************************************************/
/**/
function replaceFormatting(string) {
	return string.replace(/\[\^\]/g,"<br \/>").replace(/\[\~\]/g,"&nbsp;").replace(/\[/g,"<").replace(/\]/g,">").replace(/\t/g,"");
}