var r_span = new RegExp("</?span[^>]*>", "gim");
var r_style = new RegExp("style=\"[^\"]*\"", "gim");
var r_class = new RegExp("class=\"[^\"]*\"", "gim");
var r_width = new RegExp("width=\"[^\"]*\"", "gim");
var r_table = new RegExp("<table[^>]*>", "gim");

function HtmlEditor_CustomCommand(s, e)
{
	if (e.commandName != "ROS_CLEAR") return;
	s.SetHtml(
		s.GetHtml()
		.replace(r_span, "")
		.replace(r_class, "")
		.replace(r_table, "<table class=\"border_table\">")
		.replace(r_width, "")
		.replace(r_style, ""));
}

function CreateSymbolSec()
{
	var plength = 9;
	var keylistalpha1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var keylistalpha2 = "abcdefghijklmnopqrstuvwxyz";
	var keylistint = "0123456789";
	var keylistspec = "~!@#$%&*()_+|={}:;,.-";
	var temp = '';

	temp += keylistalpha1.charAt(Math.floor(Math.random() * keylistalpha1.length));
	temp += keylistalpha1.charAt(Math.floor(Math.random() * keylistalpha1.length));
	temp += keylistalpha2.charAt(Math.floor(Math.random() * keylistalpha2.length));
	temp += keylistalpha2.charAt(Math.floor(Math.random() * keylistalpha2.length));
	temp += keylistalpha2.charAt(Math.floor(Math.random() * keylistalpha2.length));
	temp += keylistint.charAt(Math.floor(Math.random() * keylistint.length));
	temp += keylistint.charAt(Math.floor(Math.random() * keylistint.length));
	temp += keylistspec.charAt(Math.floor(Math.random() * keylistspec.length));
	temp = temp.split('').sort(function () { return 0.5 - Math.random() }).join('');

	return temp;
}