
if((typeof console)=="undefined"||(typeof console.log)=="undefined")
{console={log:function(v){}}}
Ext.BLANK_IMAGE_URL="ext/resources/images/default/s.gif";TraCorp.lms=function()
{return({lms_name:'TraCorp LMS7',xtra_copyright:'',xtra_footer:'',lms_version:'7',timestamp:'n/j/Y g:ia',datestamp:'n/j/Y',time:'g:ia',news_datestamp:'l F jS, Y',view:null,userdata:null,lms_opts:null,uf_list:null,ul:null,custom:{},init:function()
{var i,j;var ul=TraCorp.lms.userlang;Ext.apply(this.custom,TraCorp.custom);if(this.custom.lms_name!='')this.lms_name=this.custom.lms_name;if(this.custom.xtra_copyright!='')this.xtra_copyright=this.custom.xtra_copyright;if(this.custom.xtra_footer!='')this.xtra_footer=this.custom.xtra_footer;if(this.custom.lms_version!='')this.lms_version=this.custom.lms_version;for(i=0;i<this.custom.custom_buttons.length;i++)
{if((typeof this.custom.custom_buttons[i].menu)!='undefined')
{for(j=0;j<this.custom.custom_buttons[i].menu.items.length;j++)
{this.custom.custom_buttons[i].menu.items[j].scope=this;}}
else
this.custom.custom_buttons[i].scope=this;}
for(i=0;i<this.custom.custom_admin_buttons.length;i++)
{if((typeof this.custom.custom_admin_buttons[i].menu)!='undefined')
{for(j=0;j<this.custom.custom_admin_buttons[i].menu.items.length;j++)
{this.custom.custom_admin_buttons[i].menu.items[j].scope=this;}}
else
this.custom.custom_admin_buttons[i].scope=this;}
Ext.destroy(Ext.get("loading"));Ext.destroy(Ext.get("loading-mask"));this.view=new Ext.Viewport({id:"lms_viewport",layout:"border",items:[{region:"north",html:"<table  style=\"width: 100%;\"><tr><td class=\"lms-header\" style=\"width: 33%;\">"+this.lms_name+"</td><td style=\"width: 34%;\"><div id=\"title_banner\"></div></td><td style=\"width: 33%;\"><div class=\"title_logo\"></div></td></tr></table>",autoHeight:true,id:"lms_main_header",bbar:new Ext.Toolbar({id:"lms_top_toolbar",scope:this,height:26})},{region:"center",id:"lms_main_win",cls:"lms-body",layout:"card",border:false,activeItem:0,items:[{}]},{region:"south",id:"lms_main_footer",autoHeight:true,border:false,html:"<h1 class=\"x-panel-header lms-footer\">"+this.lms_name+" "+this.lms_version+" copyright TraCorp, Inc."+(this.xtra_copyright!=""?" and "+this.xtra_copyright:"")+".  "+this.lms_name+" was developed by <a href=\"http://www.tracorp.com/\" target=\"_blank\">TraCorp, Inc.</a>"+(this.xtra_footer!=""?"<br>"+this.xtra_footer:"")+"</h1>"}]});Ext.QuickTips.init();Ext.form.Field.prototype.msgTarget='under';Ext.Window.prototype.constrainHeader=true;Ext.data.Connection.prototype.timeout=1000*60*60;setInterval(function(){var now=new Date();Ext.Ajax.request({url:'io.php?cache='+now.valueOf(),callback:Ext.emptyFn,params:{page_mode:"touch"}});},1000*60*10);try
{this.getuser();if(this.userdata.custom_style!=undefined&&this.userdata.custom_style!="")
{var new_style=document.createElement("link");new_style.setAttribute("rel","stylesheet");new_style.setAttribute("type","text/css");new_style.setAttribute("href",this.userdata.custom_style);document.getElementsByTagName("head")[0].appendChild(new_style);}}
catch(ex)
{}
try
{this.getLanguage();}
catch(ex)
{}
try
{this.startup();}
catch(ex)
{}},get_user_data:function(name)
{var ul=TraCorp.lms.userlang;if(this.userdata==null)
return null;for(var i in this.userdata)
{if(i==name)
return this.userdata[i];}
return null;},update_user_data:function(data)
{var ul=TraCorp.lms.userlang;this.userdata=Ext.apply(this.userdata,data,this.userdata);var tb=Ext.getCmp("lms_top_toolbar");tb.items.get(4).getEl().innerHTML=ul.logged_in_as+" "+this.get_user_data("fullname")+" ("+this.get_user_data("username")+")";},submit_failure:function(frm,act,mask)
{ul=TraCorp.lms.userlang;if((typeof mask)!="undefined"&&(typeof mask.hide)=="function")
mask.hide();obj=Ext.util.JSON.decode(act.response.responseText);if(act.failureType=="server")
{if(typeof(obj.errors.reason)!="undefined")
{Ext.Msg.show({title:"Warning",msg:"Submit failed!"+' '+obj.errors.reason,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}
else
{Ext.Msg.show({title:"Warning",msg:"Submit failed! Please review the form for errors.",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}}
else if(act.failureType=="client")
{Ext.Msg.show({title:"Warning",msg:"Submit failed! Please review the form for errors.",buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}
else if(act.failureType=="connect"||act.failureType=="load")
{Ext.Msg.show({title:"Warning",msg:"The server was not able to be contacted, this may happen during times of high traffic.  Please refresh the page and try again.  Failure type:"+" "+act.failureType,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}
else
{msgtxt="Submit error!";if(typeof(obj.errors.reason)!="undefined")
msgtxt+=" "+obj.errors.reason;Ext.Msg.show({title:"Warning",msg:msgtxt,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}},get_content_type:function(num)
{var ul=TraCorp.lms.userlang;if((typeof num)=="string")
num=parseInt(num,10);switch(num)
{case 1:return ul.online_training;case 2:return ul.offline_class_train;case 3:return ul.online_test_questionnaire;case 4:return ul.other_online;case 5:return ul.lo_training;}},load_options:function(callback_fn)
{var ul=TraCorp.lms.userlang;Ext.Ajax.request({url:'io.php',params:{page_mode:"get_all_options"},scope:this,callback:function(options,success,response)
{var resp_obj;if(success&&response.status==200)
{resp_obj=Ext.util.JSON.decode(response.responseText);this.lms_opts=resp_obj.data;if(typeof callback_fn=="function")
{callback_fn.call(this);}}
else
{Ext.Msg.show({title:"Warning",msg:"Communication with the server failed.  Please refresh the page."+"  "+response.status+": "+response.statusText,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}}});},toggle_user_active:function(recid)
{var ul=TraCorp.lms.userlang;var store=Ext.getCmp('user_grid').getStore();var rec=store.getById(recid);var user=rec.data.id;if(rec.data.active=="1")
{rec.beginEdit();rec.set("active","0");rec.commit();rec.endEdit();var active=0;}
else
{rec.beginEdit();rec.set("active","1");rec.commit();rec.endEdit();var active=1;}
var ajax_con=new Ext.data.Connection({url:"io.php",method:"post"});var load_mask=new Ext.LoadMask(Ext.getCmp('user_grid').body,{msg:ul.updating_txt+'...'});load_mask.show();ajax_con.request({params:{page_mode:"set_user_active",active:active,id:user},scope:this,callback:function(options,success,response)
{load_mask.hide();var resp_obj;if(success&&response.status==200)
{}
else
{Ext.Msg.show({title:"Warning",msg:"Communication with the server failed.  Please refresh the page."+"  "+response.status+": "+response.statusText,buttons:Ext.Msg.OK,icon:Ext.Msg.WARNING});}}});},choose_usergroup:function(callback)
{var ul=TraCorp.lms.userlang;var ug_win=new Ext.Window({id:"choose_ug_win",layout:"fit",title:ul.choose_ug,height:250,width:400,modal:true,plain:true,items:[{xtype:"masktree",id:'choose_ug_tree',autoScroll:true,cls:'ug-tree',enableDD:false,maskConfig:{msg:ul.loading_ug+"..."},loader:new Ext.tree.TreeLoader({dataUrl:'io.php',baseParams:{page_mode:"get_ug_nodes"}}),root:new Ext.tree.AsyncTreeNode({text:ul.all_ug,allowDrag:false,expanded:true})}],buttons:[{text:ul.select_ug,handler:function()
{var tree=Ext.getCmp("choose_ug_tree");var curnode=tree.getSelectionModel().getSelectedNode();var ug_id=0;var ug_title=ul.all_ug;if(curnode!=null&&!curnode.isRoot)
{ug_id=new String(curnode.id);ug_id=parseInt(ug_id.replace(/ug_node_/,""),10);ug_title=curnode.attributes.info.title;}
ug_win.close();if((typeof callback)=="function")
{callback(ug_id,ug_title);}},scope:this}]});ug_win.show();},select_users:function(opts)
{var ul=TraCorp.lms.userlang;var params=opts.params||{};var note=opts.note||"";var callback=opts.callback||Ext.emptyFn;var prompt=opts.prompt||"";var userTypes=opts.userTypes||[[1,ul.students],[2,ul.instructs],[3,ul.ug_admins],[4,ul.sub_admins],[5,ul.main_admins]];var single=opts.singleSelect||false;var dims=this.view.getSize();var user_store=new Ext.data.JsonStore({id:"user_store",url:"io.php",baseParams:params,root:'data',totalProperty:'totalCount',remoteSort:true,reader:new Ext.data.JsonReader({},Ext.data.Record.create(['id','username','fname','lname','email','active','date_registered','last_login','last_ip','main_admin','ug_admin','sub_admin','instructor','field1','field2','field3','field4','field5','field6','field7','field8','field9','field10','field11','field12','field13','field14','field15','field16','field17','field18','field19','field20','field21','field22','field23','field24','field25','field26','field27','field28','field29','field30','idle'])),fields:["id",{name:"username",sortType:Ext.data.SortTypes.asUCString},{name:"fname",sortType:Ext.data.SortTypes.asUCString},{name:"lname",sortType:Ext.data.SortTypes.asUCString},{name:"email",sortType:Ext.data.SortTypes.asUCString},"active","date_registered","last_login","last_ip","main_admin","ug_admin","sub_admin","instructor","field1","field2","field3","field4","field5","field6","field7","field8","field9","field10","field11","field12","field13","field14","field15","field16","field17","field18","field19","field20","field21","field22","field23","field24","field25","field26","field27","field28","field29","field30","idle"]});var user_cols=[{header:ul.active,sortable:false,dataIndex:"active",renderer:function(val,meta,rec,row,col,store)
{var retval="<a href=\"javascript:void(0);\" ";if(rec.data.active=="0")
retval+='class="x-icon-inactive" title="'+ul.user_inactive+'"';else if(rec.data.idle=="1")
retval+='class="x-icon-idle" title="'+ul.user_idle+'"';else
retval+='class="x-icon-active" title="'+ul.user_active+'"';retval+=">&nbsp;</a>";return retval;},width:50,fixed:true,menuDisabled:true,resizable:false},{header:ul.username,sortable:true,dataIndex:"username"},{header:ul.first_name,sortable:true,dataIndex:"fname"},{header:ul.last_name,sortable:true,dataIndex:"lname"},{header:ul.email_addr,sortable:true,dataIndex:"email"}];var user_filter_where_opts=[['username',ul.username],['fname',ul.first_name],['lname',ul.last_name],['email',ul.email_addr]];for(var i=0;i<this.uf_list.length;i++)
{if(this.uf_list[i].searchable==1)
{user_filter_where_opts.push([this.uf_list[i].id,this.uf_list[i].description]);newcol={header:this.uf_list[i].description,sortable:true,dataIndex:this.uf_list[i].id};if(this.uf_list[i].dropdown==1)
{var renderer=function(val,meta,record,rowIndex,colIndex,store)
{var uf_idx=0;var idx=colIndex-5;var nr=0;for(var j=0;j<this.uf_list.length;j++)
{if(this.uf_list[j].searchable==1)
{if(nr==idx)
{uf_idx=j;break;}
nr++;}}
for(var j=0;j<this.uf_list[uf_idx].drop_options.length;j++)
{if(this.uf_list[uf_idx].drop_options[j][2]==val)
return this.uf_list[uf_idx].drop_options[j][1];}}
newcol.renderer=renderer.createDelegate(this);}
user_cols.push(newcol);}}
var user_win=new Ext.Window({id:"choose_user_win",layout:"anchor",title:ul.select_users,height:dims.height<600?dims.height-10:600,width:dims.width<1000?dims.width-10:1000,modal:true,plain:true,items:[{xtype:'grid',id:'select_user_grid',anchor:note==''?'99% 99%':'99% 94%',stripeRows:true,loadMask:{msg:ul.retrieving_users+"..."},cm:new Ext.grid.ColumnModel(user_cols),sm:new Ext.grid.RowSelectionModel({singleSelect:single}),store:user_store,viewConfig:{autoFill:true,forceFit:true,emptyText:ul.no_users_match_search,deferEmptyText:false},tbar:new Ext.Toolbar({items:[ul.filter_user,{xtype:'combo',allowBlank:true,id:'select_user_filter_where',editable:false,triggerAction:'all',forceSelection:true,mode:'local',width:120,store:new Ext.data.SimpleStore({fields:['val','label'],data:user_filter_where_opts}),displayField:'label',valueField:'val',validateOnBlur:false,value:"username"},' ',{xtype:'combo',allowBlank:true,id:'select_user_filter_how',editable:false,triggerAction:'all',forceSelection:true,mode:'local',width:80,store:new Ext.data.SimpleStore({fields:['val','label'],data:[[1,ul.starts_with],[2,ul.contains],[3,ul.ends_with]]}),displayField:'label',valueField:'val',validateOnBlur:false,value:1},' ',{xtype:'textfield',allowBlank:true,id:'select_user_filter_what',width:80,validateOnBlur:false,enableKeyEvents:true},' ',{xtype:'button',id:'select_btn_use_filter',scope:this,handler:function()
{var where=Ext.getCmp('select_user_filter_where').getValue();var how=Ext.getCmp('select_user_filter_how').getValue();var what=Ext.getCmp('select_user_filter_what').getValue();Ext.getCmp('select_user_grid').getStore().baseParams=Ext.apply({filter:where,mode:how,term:what,inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue()},params);Ext.getCmp('select_user_grid').getStore().load({params:Ext.apply({filter:where,mode:how,term:what,inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue(),start:0,limit:this.lms_opts.recs_per_page},params)});},text:'Go'},'-',{xtype:'button',id:'select_btn_clear_filter',scope:this,handler:function(){Ext.getCmp('select_user_grid').getStore().baseParams=Ext.apply({inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue()},params);Ext.getCmp('select_user_grid').getStore().load({params:Ext.apply({start:0,limit:this.lms_opts.recs_per_page},params)});},text:ul.clear},'-',{xtype:'button',id:'select_btn_toggle_inactive',scope:this,toggleHandler:function(){Ext.getCmp('select_user_grid').getStore().baseParams=Ext.apply({inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue()},params);Ext.getCmp('select_user_grid').getStore().load({params:Ext.apply({start:0,limit:this.lms_opts.recs_per_page},params)});},text:ul.show_inactive,enableToggle:true,allowDepress:true,pressed:false},'-',ul.user_type+':',{xtype:'combo',allowBlank:false,id:'select_user_filter_type',editable:false,triggerAction:'all',forceSelection:true,mode:'local',width:120,store:new Ext.data.SimpleStore({fields:['val','label'],data:userTypes}),displayField:'label',valueField:'val',validateOnBlur:false,value:userTypes[0][0],listeners:{'select':function(c,r,i)
{Ext.getCmp('select_user_grid').getStore().baseParams=Ext.apply({inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:r.data.val},params);Ext.getCmp('select_user_grid').getStore().load({params:Ext.apply({start:0,limit:this.lms_opts.recs_per_page},params)});},scope:this}}]}),bbar:new Ext.PagingToolbar({pageSize:this.lms_opts.recs_per_page,store:user_store,displayInfo:true,displayMsg:ul.display_users_total,emptyMsg:ul.no_users_to_display}),listeners:{'rowdblclick':function()
{if((typeof callback)=="function")
{if(Ext.getCmp("select_user_grid").getSelectionModel().getCount()==0)
{Ext.Msg.alert(ul.error,ul.no_users_selected);return;}
var sel=Ext.getCmp("select_user_grid").getSelectionModel().getSelections();if(prompt!="")
{Ext.Msg.confirm(ul.confirm,prompt,function(b)
{if(b=='yes')
callback.call(this,sel);},this);}
else
{callback.call(this,sel);}}},'render':function(p)
{if(this.userdata.ug_admin)
{var where=Ext.getCmp('select_user_filter_where').getValue();var how=Ext.getCmp('select_user_filter_how').getValue();var what=Ext.getCmp('select_user_filter_what').getValue();Ext.getCmp('select_user_grid').getStore().baseParams=Ext.apply({filter:where,mode:how,term:what,inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue()},params);Ext.getCmp('select_user_grid').getStore().load({params:Ext.apply({filter:where,mode:how,term:what,inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue(),start:0,limit:this.lms_opts.recs_per_page},params)});}},scope:this},buttons:[{text:ul.select_user,handler:function()
{if((typeof callback)=="function")
{if(Ext.getCmp("select_user_grid").getSelectionModel().getCount()==0)
{Ext.Msg.alert(ul.error,ul.no_users_selected);return;}
var sel=Ext.getCmp("select_user_grid").getSelectionModel().getSelections();if(prompt!="")
{Ext.Msg.confirm(ul.confirm,prompt,function(b)
{if(b=='yes')
callback.call(this,sel);},this);}
else
{callback.call(this,sel);}}},scope:this}]},{xtype:"panel",border:false,bodyStyle:"background: transparent; text-align: right;",anchor:note==""?'0% 0%':'99% 5%',html:note}]});user_win.show();var key_nav=new Ext.KeyNav("select_user_filter_what",{'enter':function()
{var where=Ext.getCmp('select_user_filter_where').getValue();var how=Ext.getCmp('select_user_filter_how').getValue();var what=Ext.getCmp('select_user_filter_what').getValue();Ext.getCmp('select_user_grid').getStore().baseParams=Ext.apply({filter:where,mode:how,term:what,inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue()},params);Ext.getCmp('select_user_grid').getStore().load({params:Ext.apply({filter:where,mode:how,term:what,inactive:Ext.getCmp('select_btn_toggle_inactive').pressed,user_type:Ext.getCmp('select_user_filter_type').getValue(),start:0,limit:this.lms_opts.recs_per_page},params)});},scope:this});},remove_children:function(comp)
{var ul=TraCorp.lms.userlang;if((typeof comp.removeAll)=="function")
comp.removeAll();else if((typeof comp.items)!="undefined")
{var items=comp.items.getRange();for(var i=0;i<items.length;i++)
{comp.remove(items[i].id);}}},sanitizeForWord:function(str)
{return this.removeMSWordChars(this.cleanWordHTML(str));},removeMSWordChars:function(str)
{var myReplacements=[],myCode,strReplacement;myReplacements[8216]="'";myReplacements[8217]="'";myReplacements[8218]="'";myReplacements[8220]='"';myReplacements[8221]='"';myReplacements[8222]='"';myReplacements[8211]='-';myReplacements[8212]='-';myReplacements[8230]='...';myReplacements[710]='^';myReplacements[8249]='<';myReplacements[8250]='>';myReplacements[732]=' ';str=String(str);for(c=str.length-1;c>=0;c--){var myCode=str.charCodeAt(c);if(myReplacements[myCode]!=undefined){strReplacement=myReplacements[myCode];str=str.substr(0,c)+strReplacement+str.substr(c+1);}}
return str;},cleanWordHTML:function(str)
{str=String(str);str=str.replace(/<!--[\s\S]*?-->/gi,'');str=str.replace(/<META[^>]*>/gi,'');str=str.replace(/<LINK[^>]*>/gi,'');str=str.replace(/<STYLE[^>]*>[\s\S]*?<\/STYLE>/gi,'');str=str.replace(/<o:p>[\s\S]*?<\/o:p>/g,"");str=str.replace(/\s*mso-[^:]+:[^;"]+;?/gi,"");str=str.replace(/\s*MARGIN: 0cm 0cm 0pt\s*;/gi,"");str=str.replace(/\s*MARGIN: 0cm 0cm 0pt\s*"/gi,"\"");str=str.replace(/\s*TEXT-INDENT: 0cm\s*;/gi,"");str=str.replace(/\s*TEXT-INDENT: 0cm\s*"/gi,"\"");str=str.replace(/\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi,"\"");str=str.replace(/\s*FONT-VARIANT: [^\s;]+;?"/gi,"\"");str=str.replace(/\s*tab-stops:[^;"]*;?/gi,"");str=str.replace(/\s*tab-stops:[^"]*/gi,"");str=str.replace(/\s*face="[^"]*"/gi,"");str=str.replace(/\s*face=[^ >]*/gi,"");str=str.replace(/\s*FONT-FAMILY:[^;"]*;?/gi,"");str=str.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,"<$1$3");str=str.replace(/<div[\s]* style="(text-align:[\s]*[^;"]*;)">/gi,'<div x-style="$1">');str=str.replace(/<(\w[^>]*) style="([^\"]*)"([^>]*)/gi,"<$1$3");str=str.replace(/<div[\s]* x-style="(text-align:[\s]*[^;"]*;)">/gi,'<div style="$1">');str=str.replace(/\s*style="\s*"/gi,'');str=str.replace(/<SPAN\s*[^>]*>\s*&nbsp;\s*<\/SPAN>/gi,'&nbsp;');str=str.replace(/<SPAN\s*[^>]*><\/SPAN>/gi,'');str=str.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,"<$1$3");str=str.replace(/<\\?\?xml[^>]*>/gi,"");str=str.replace(/<\/?\w+:[^>]*>/gi,"");str=str.replace(/<H\d>\s*<\/H\d>/gi,'');str=str.replace(/<H1([^>]*)>/gi,'');str=str.replace(/<H2([^>]*)>/gi,'');str=str.replace(/<H3([^>]*)>/gi,'');str=str.replace(/<H4([^>]*)>/gi,'');str=str.replace(/<H5([^>]*)>/gi,'');str=str.replace(/<H6([^>]*)>/gi,'');str=str.replace(/<\/H\d>/gi,'<br>');str=str.replace(/<SPAN\s*>([\s\S]*?)<\/SPAN>/gi,'$1');str=str.replace(/<FONT[^>]*>([\s\S]*?)<\/FONT>/gi,'$1');str=str.replace(/<SPAN\s*>([\s\S]*?)<\/SPAN>/gi,'$1');str=str.replace(/<FONT[^>]*>([\s\S]*?)<\/FONT>/gi,'$1');str=str.replace(/<SPAN\s*>([\s\S]*?)<\/SPAN>/gi,'$1');str=str.replace(/<FONT[^>]*>([\s\S]*?)<\/FONT>/gi,'$1');str=str.replace(/<(U|I|STRIKE|B|P)>&nbsp;<\/\1>/gi,'&nbsp;');str=str.replace(/<(U|I|STRIKE|B|P)>&nbsp;<\/\1>/gi,'&nbsp;');str=str.replace(/<(U|I|STRIKE|B|P)>&nbsp;<\/\1>/gi,'&nbsp;');str=str.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/gi,'');str=str.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/gi,'');str=str.replace(/<([^\s>]+)[^>]*>\s*<\/\1>/gi,'');str=str.replace(/<(U|I|STRIKE|B|P)>&nbsp;<\/\1>/gi,'&nbsp;');str=str.replace(/<(U|I|STRIKE|B|P)>&nbsp;<\/\1>/gi,'&nbsp;');str=str.replace(/<(U|I|STRIKE|B|P)>&nbsp;<\/\1>/gi,'&nbsp;');str=str.replace(/<SPAN\s*>([\s\S]*?)<\/SPAN>/gi,'$1');str=str.replace(/<FONT[^>]*>([\s\S]*?)<\/FONT>/gi,'$1');str=str.replace(/size\s*=\s*([\d]{1})/gi,'');return str;}});}();

