if (/Mozilla\/5\.0/.test(navigator.userAgent)) { HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sText) { var r = document.createRange(); switch (sWhere) { case "beforeBegin": r.setStartBefore(this); this.parentNode.insertBefore(r.createContextualFragment(sText), this); break; case "afterBegin": r.setStartBefore(this.firstChild); this.insertBefore(r.createContextualFragment(sText), this.firstChild); break; case "beforeEnd": r.setStartAfter(this.lastChild); this.appendChild(r.createContextualFragment(sText)); break; case "afterEnd": r.setStartAfter(this); this.parentNode.insertBefore(r.createContextualFragment(sText),this.nextSibling); break; } } } function limitText(obj,maxLength) { if (typeof(maxLength)=="undefined") { var maxLength=500; } try { var _pBarColor=eval("pBarColor"+obj.name); } catch(e) {var _pBarColor=pBarColor;} try { var _bgColor=eval("bgColor"+obj.name); } catch(e) {var _bgColor=bgColor;} try { var _showPBar=eval("showPBar"+obj.name); } catch(e) {var _showPBar=showPBar;} try { var _showCharsLeft=eval("showCharsLeft"+obj.name); } catch(e) {var _showCharsLeft=showCharsLeft;} try { var _pString=eval("pString"+obj.name); } catch(e) {var _pString=pString;} var count = maxLength - obj.value.length; var progressName=obj.name + "Progress"; var pbarName=obj.name + "PBar"; var htmlStr; objWidth=obj.offsetWidth; if(!document.getElementById(progressName)) { if(_showCharsLeft) { htmlStr="