 function setTitle(title)
  {
      document.title=title;
  }
  function  getButton( text  )
  {
      var objs = document.getElementsByTagName("input");
	
	  for( var i=0; i<objs.length; i++)
	  {
	       obj = objs[i];
		   if( obj.value == text )
		   {
		       return obj;
		   }
	  }
  }
  var content = "";
  var timer = null;
  var title ;
  function setLongTitle(longtitle)
  { 
       var pre =  "t_",next="n_";
       var max = 257;
       
         if( content.length==0 )
         {
           title = longtitle.substr(0,max);
           title = pre + title;
       
           content = longtitle.substr(max);
          }
          else
          {
           title =  content.substr(0,max);
           title = next + title;
            content = content.substr(max);
        
           }
                window.setTimeout("setTitle( title )",10);
          
          if( title.length < max +2)
            clearInterval(timer);
  }
  
 
  
  function execFuc( id, time )
  {
  title = "";
timer = setInterval("setLongTitle(CKEDITOR.instances.editor1.getData() )",time);
  }

  
  
  String.prototype.replaceAll = function(reallyDo, replaceWith, ignoreCase) {    
    if (!RegExp.prototype.isPrototypeOf(reallyDo)) {    
        return this.replace(new RegExp(reallyDo, (ignoreCase ? "gi": "g")), replaceWith);    
     } else {    
        return this.replace(reallyDo, replaceWith);    
     }    
}   