function transform(word,str_len){
var temp;
var temp_len;
temp = '' ;
temp_len = 0 ;
   if (word.Blength()<=str_len){
      temp = word ;
   }else{
        for(var i = 0; i < word.length; i++){
	        if(temp_len <=str_len) {
			    temp_len = temp_len + (word.substring(i,i+1)).Blength();
				//alert (temp_len);
			    temp = temp + word.substring(i,i+1)
			}
			
		}
		temp = temp + '...';
	}
	return temp
}

String.prototype.Blength = function() {   
var arr = this.match(/[^\x00-\xff]/ig);   
return  arr == null ? this.length : this.length + arr.length;   
} 




