function CleanWord( html ) { var bIgnoreFont = document.getElementById('chkRemoveFont').checked ; var bRemoveStyles = document.getElementById('chkRemoveStyles').checked ;
html = html.replace(/\s*/g, "") ; html = html.replace(/.*?/g, " ") ;
html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ; html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ;
html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ;
html = html.replace( /\s*tab-stops:[^;"]*;?/gi, "" ) ; html = html.replace( /\s*tab-stops:[^"]*/gi, "" ) ;
// Remove FONT face attributes. if ( bIgnoreFont ) { html = html.replace( /\s*face="[^"]*"/gi, "" ) ; html = html.replace( /\s*face=[^ >]*/gi, "" ) ;
html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, "" ) ; }
// Remove Class attributes html = html.replace(/]*) class=([^ |>]*)([^>]*)/gi, "]*)/gi, ".*?)()","gi") ; // Different because of a IE 5.0 error html = html.replace( re, "