var updateURL2Link=function(D,A){D=YAHOO.util.Dom.get(D);var B=[];if(D.length){while(a=D.shift()){B.push(a);}}else{B.push(D);}A=A||{};A.allowTags=A.allowTags||["abbr","acronym","address","applet","b","bdo","big","blockquote","body","caption","center","cite","code","dd","del","div","dfn","dt","em","fieldset","font","form","h1","h2","h3","h4","h5","h6","i","iframe","ins","kdb","li","object","pre","p","q","samp","small","span","strike","s","strong","sub","sup","td","th","tt","u","var"];if(!YAHOO.lang.isArray(A.allowTags)){throw ("The allowTags attribute must be an array.");return ;}A.urlRegexp=A.urlRegexp||/(https?:\/\/[^(\)\s)+\"\<\>]+)/ig;if(!/\/(\\[^\x00-\x1f]|\[(\\[^\x00-\x1f]|[^\x00-\x1f\\\/])*\]|[^\x00-\x1f\\\/\[])+\/[gim]*/.test(A.urlRegexp.toString())){throw ("The urlRegexp attribute is not a validate regular expression.");return ;}var E=function(H,G){G(H);H=H.firstChild;while(H){E(H,G);H=H.nextSibling;}};var C=function(G){var H=[];E(G,function(I){if(I.nodeType==3){H.push(I);}});return H;};var F=function(I){var T=C(I);for(var K=T.length-1;K>=0;K--){var J=T[K];var S=false;for(var O in A.allowTags){if(J.parentNode.nodeName.toLowerCase()===A.allowTags[O]){S=true;break;}}if(!S){T.splice(K,1);continue;}var N=J.nodeValue.match(A.urlRegexp);if(!N){T.splice(K,1);}}for(var K in T){var J=T[K];var L=document.createElement("span");var G=J.nodeValue;J.parentNode.replaceChild(L,J);A.urlRegexp.lastIndex=0;for(var M=null,H=0;(M=A.urlRegexp.exec(G));){var P=G.substring(H,M.index);var R=document.createTextNode(P);L.appendChild(R);var Q=document.createElement("a");Q.setAttribute("href",M[0]);Q.appendChild(document.createTextNode(M[0]));L.appendChild(Q);H=A.urlRegexp.lastIndex;}var P=G.substring(H);L.appendChild(document.createTextNode(P));if(L.normalize){L.normalize();}}};while(a=B.shift()){F(a);}};
