"});b=b.replace(/\[td\s*(?:=\s*(\d{1,2})\s*,\s*(\d{1,2})\s*(?:,\s*(\d{1,4}%?))?)?\s*\]/ig,function(h,i,a,k){return"1?' colspan="'+i+'"':"")+(a>1?' rowspan="'+a+'"':
"")+(k?' width="'+k+'"':"")+">"});b=b.replace(/\[\/(table|tr|td)\]/ig,"$1>");b=b.replace(/\[\*\]((?:(?!\[\*\]|\[\/list\]|\[list\s*(?:=[^\]]+)?\])[\s\S])+)/ig,"$1");b=b.replace(/\[list\s*(?:=\s*([^\]"]+?)(?:"[^\]]*?)?)?\s*\]/ig,function(h,i){var a=""});b=b.replace(/\[\/list\]/ig," ");for(f=1;f<=n;f++)b=b.replace("[\tubbcodeplace_"+f+"\t]",p[f]);return b=b.replace(/(^|<\/?\w+(?:\s+[^>]*?)?>)([^<$]+)/ig,function(h,i,a){return i+a.replace(/[\t ]/g,
function(k){return{"\t":" "," ":" "}[k]})})}
function html2ubb(f){function o(g){var c;if(c=g.match(/\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i)){for(g=(c[1]*65536+c[2]*256+c[3]*1).toString(16);g.length<6;)g="0"+g;g="#"+g}return g=g.replace(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i,"#$1$1$2$2$3$3")}var b={"xx-small":1,"8pt":1,"x-small":2,"10pt":2,small:3,"12pt":3,medium:4,"14pt":4,large:5,"18pt":5,"x-large":6,"24pt":6,"xx-large":7,"36pt":7},p=/\s+src\s*=\s*(["']?)\s*(.+?)\s*\1(\s|$)/i,n=/\s+width\s*=\s*(["']?)\s*(\d+(?:\.\d+)?%?)\s*\1(\s|$)/i,
h=/\s+height\s*=\s*(["']?)\s*(\d+(?:\.\d+)?%?)\s*\1(\s|$)/i,i=/(?:background|background-color|bgcolor)\s*[:=]\s*(["']?)\s*((rgb\s*\(\s*\d{1,3}%?,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\))|(#[0-9a-f]{3,6})|([a-z]{1,20}))\s*\1/i,a=String(f),k=[],m=0;a=a.replace(/\s*\r?\n\s*/g,"");a=a.replace(/<(script|style)(\s+[^>]*?)?>[\s\S]*?<\/\1>/ig,"");a=a.replace(/ |