function readyMsgBox(){ Ext.MessageBox.show({ msg: 'Loading...', progressText: 'Loading...', width:300, wait:true, waitConfig: {interval:200} }); } function getElementsByName_iefix(tag, name) { var elem = document.getElementsByTagName(tag); var arr = new Array(); for(i = 0,iarr = 0; i < elem.length; i++) { att = elem[i].getAttribute("name"); if(att == name) { arr[iarr] = elem[i]; iarr++; } } return arr; } function changeTable(){ try{ //var contents = document.getElementsByName('res_content'); var contents = getElementsByName_iefix('div', 'res_content'); for(var i=0;i0){ var first_row = null; if(tables[0].tBodies!=null && tables[0].tBodies[0]){ first_row = tables[0].tBodies[0].rows[0]; }else if(tables[0].rows!=null && tables[0].rows[0]){ first_row = tables[0].rows[0]; } if(first_row!=null && first_row.cells && first_row.cells.length>0){ for(var j=0;j0){ for(var j=0;j') { if(oldString.charAt(i+1)=="<") { //dont do anything } else { inTag = false; //i++; } } if(!inTag) newString += oldString.charAt(i)+""; else newString += oldString.charAt(i); if(!inTag) flag = false; if(flag && inTag) firstTag = i; } firstbr = oldString.indexOf("
"); if(firstbr>=0 && firstbr<=firstTag){ newString = newString.replace(/
/, "<_br>"); } firstbr = oldString.indexOf("
"); if(firstbr>=0 && firstbr<=firstTag){ newString = newString.replace(//, "<_br>"); } newString = newString.replace(/
/gi, "").replace(//gi, ""); newString = newString.replace(/<_br>/gi, "
"); //alert(newString); return newString; } function changeLinks(name) { //var divs = document.getElementsByName('res_content'); var divs = getElementsByName_iefix("div", name); if(divs){ for(k=0;k=0) rid = div_id.replace("resource_", ""); if(a) { var n = a.length; for(i=0;i=0 || a[i].innerHTML.indexOf("https://")>=0 || a[i].innerHTML.indexOf("mms://")>=0){ var content = a[i].innerHTML; //content = content.replace(/
/gi, "").replace(//gi, ""); content = addwbr(content); content = content.replace(/&amp;/gi, "&"); content = content.replace(/&lt;/gi, "<"); content = content.replace(/&gt;/gi, ">"); content = content.replace(/&quot;/gi, """); content = content.replace(/&apos;/gi, "'"); try{ a[i].innerHTML = content; }catch(err){ //alert(content+" "+err.description); } } if(a[i].target=="") a[i].target = "_blank"; if(rid!=""){ res_infos = rid.split("_"); if(res_infos.length == 2){ a[i].onclick = new Function("addStatDetail('link', 'eng', '"+res_infos[0]+"', '"+res_infos[1]+"', '"+escape(a[i].href)+"', 'resource_link', '"+escape(a[i].innerHTML)+"');"); //a[i].setAttribute('onclick', "javascript:addStat('link', 'eng', '"+res_infos[0]+"', '"+res_infos[1]+"', '"+(a[i].href)+"', 'resource_link')"); //a[i].attachEvent('onclick', addStat('link', 'eng', res_infos[0], res_infos[1], escape(a[i].href), 'resource_link')); //a[i].setAttribute('onclick', "alert('here');"); } } } } wrap(divs[k],"http"); } } }