function font(obj){
var fontlength=reallength(trimTag(obj.value));
document.getElementById("fontcount").innerHTML=fontlength;
return false;
}
function reallength(s){
var worLen=0;
var s1=s.match(/[^/x00-/xff]/gi);
if(s1!=null){
var sl1=s1.join("").replace(/ /g,"");
worLen+=sl1.length;
}
var slEn=s.match(/[/x00-/xff]/gi);
if(slEn!=null){
slEn=slEn.join("").replace(//s/g,"");
worLen+=slEn.length;
}
return worLen;
}
function trimTag(inputString){
var temstr=inputString.replace(/<(.|/n)+?>/gi, "");
temstr=temstr.replace(/(^/s*)|(/s*$)/g, "");
return temstr;
}