function AddText(FormName,Name,NewCode){
document.FormName.Name.value+=NewCode
}
function bold()
{
if (document.selection && document.selection.type == "Text") 
    {var range = document.selection.createRange();
     range.text = "" + range.text + "";
    }
}
function incline()
{
if (document.selection && document.selection.type == "Text") 
    {var range = document.selection.createRange();
     range.text = "" + range.text + "";
    }
}
function underline()
{
if (document.selection && document.selection.type == "Text") 
    {var range = document.selection.createRange();
     range.text = "" + range.text + "";
    }
}
function showcolor(a)
{
if (document.selection && document.selection.type == "Text" && a!="默认")
    {var range = document.selection.createRange();
     range.text = "[color:'"+a+"']" + range.text + "[/color]";
    }
}
function cfs(b)
{
if (document.selection && document.selection.type == "Text" && b!="默认")
    {var range = document.selection.createRange();
     range.text = "[size:'"+b+"']" + range.text + "[/size]";
    }
}
function center()
{
if (document.selection && document.selection.type == "Text") 
    {var range = document.selection.createRange();
     range.text = "[center]" + range.text + "[/center]";
    }
}
function dq(c)
{
if (document.selection && document.selection.type == "Text" && c!="默认")
    {var range = document.selection.createRange();
     range.text = "[$parab:"+c+"$]" + range.text + "[$/parab$]";
    }
}
function dh(d)
{
if (document.selection && document.selection.type == "Text" && d!="默认")
    {var range = document.selection.createRange();
     range.text = "[$para:"+d+"$]" + range.text + "[$/para$]";
    }
}