    function RenderingSource(theBox)
    {
       theBox.innerText = rp(theBox.innerText);
       var data = theBox.innerHTML;
       var reCat = /\&lt;(.+?)\&gt;/gm;
       
       //转换成小写
       var text = data.replace(reCat,Rep);
       
       //标亮属性
       text = text.replace(/(\s+\w+)\s*=\s*("[^"]*")/g,"<span style='color:#FF0000'>$1</span><span style='color:#0000FF'>=$2</span>");  
       
       text = text.replace(/&lt;\/ */g,"<span style='color:#0000FF'>&lt;/</span>");        //标亮</
       text = text.replace(/\/&gt;/g,"<span style='color:#0000FF'>/&gt;</span>");          //标亮/>
       
       text = text.replace(/(&lt;)([^%])/g,"<span style='color:#0000FF'>$1</span>$2");     //标亮<
       text = text.replace(/([^%])(&gt;)/g,"$1<span style='color:#0000FF'>$2</span>");     //标亮>
       
       //标亮<% ... %>
       text = text.replace(/(&lt;%)([^%]+)(%&gt;)/g,"<span style='background-color:#FFEE62; color:#000000'>$1</span><span style='color:#000000'>$2</span><span style='background-color:#FFEE62; color:#000000'>$3</span>");
       


       
       theBox.innerHTML = text;
    }
    
    function Rep(word)
    {
        if(word != null && word.length > 0)
        {
        word = word.toLowerCase();
        word = "<span style='color:#A31515'>" + word +"</span>";
        }
        
        return word;
    }
    
    
    
    
     function rp(str)
     { 
          var reg1 = /(\s+\w+)\s*=\s*([^<>"\s]+)(?=[^<>]*>)/ig;
          var reg2 = /"'([^'"]*)'"/ig; 
          str=str.replace(reg1,'$1="$2"').replace(reg2,'\"$1\"'); 
          return str;
     }

function ReplaceUrl(str)
{
var recat = /(src|href) *= *['|"| ]([^'"]+)['|"| ]/gm;
str = str.replace(recat,replaceUrl); 
return str;
}

function replaceUrl(ddd)
{
var name = arguments[1];
var url = arguments[2];
url = url.toLowerCase();
url = url.replace(dirUrl,"");
url = url.replace(baseUrl,"");
//alert(dirUrl);
//alert(baseUrl);
return name + "=\"" + url+"\"";
}