function presskey(eventobject){
if(event.ctrlKey && window.event.keyCode==13){ValidateForm()
this.document.form.submit();
}
}

function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")
}

function replac(){
txt2=prompt("查找内容","");
if (txt2 != "") {txt=prompt("替换为：",txt2)}else {replac()}
var Otext = txt2; var Itext = txt; document.form.content.value = eval('form.content.value.replace(/'+Otext+'/'+'g'+',"'+Itext+'")')
}

function DoTitle(addTitle) {
var revisedTitle;var currentTitle = document.form.topic.value;revisedTitle = addTitle+currentTitle;document.form.topic.value=revisedTitle;document.form.topic.focus();
}


function title_color(color){document.form.topic.style.color = color;}

function ValidateForm(){
MessageLength=document.form.content.value.length;
if(MessageLength<2){alert("文章内容不能小于2个字符！");return false;}
if(MessageLength>100000){alert("文章内容不能超过100000个字符！");return false;}
sending.style.visibility="visible";
}

function CheckLength(){
var MessageMax="100000";
MessageLength=document.form.content.value.length;
alert("最大字符为 "+MessageMax+ " 字节\n您的内容已有 "+MessageLength+" 字节");
}



function addcontent(theSmilie){
document.form.content.value += theSmilie + ' ';
document.form.content.focus();
}
function emoticon(theSmilie){
document.form.content.value += theSmilie + ' ';
document.form.content.focus();
}
function showadv(){
if (document.form.advshow.checked == true) {
adv.style.display = "";
}else{
adv.style.display = "none";
}
}
function showbq(){
if (document.form.bqshow.checked == true) {
bq.style.display = "";
}else{
bq.style.display = "none";
}
}
function showbf(){
if (document.form.bfshow.checked == true) {
bf.style.display = "";
}else{
bf.style.display = "none";
}
}
function showfl(){
if (document.form.flshow.checked == true) {
fl.style.display = "";
}else{
fl.style.display = "none";
}
}
function showtx(){
if (document.form.txshow.checked == true) {
tx.style.display = "";
}else{
tx.style.display = "none";
}
}
function showword(){
if (document.form.wordshow.checked == true) {
word.style.display = "";
}else{
word.style.display = "none";
}
}


