if (!String.prototype.trim) String.prototype.trim = function() { var r = /^\s*((?:.|\n)+?)\s*$/.exec(this); return r ? r[1]: this.toString(); } if( typeof document.getElementsByClassName == 'undefined' ){ document.getElementsByClassName = function(classname){ var all = document.all, elements = [], regexpr = new RegExp('\\b'+classname+'\\b','ig'); for(var x=0; xlen) { str=str.substring(0,len); } return str; }, displayError: function(HTML) { if (_get('error-box') != null) return; var pageSize = this.getPageSize(); var pageScroll = this.getPageScroll(); var entry = this.createElement('DIV',{"id":"error-box"},{"marginTop":pageScroll.y + 'px'}).appendChild(this.createElement('DIV',{"class":"entry"})); entry.innerHTML = '

Ошибка

' + HTML; var closer = entry.appendChild(this.createElement('A',{"title":"закрыть сообщение об ошибке","class":"closer"})); closer.href = 'javascript:void(0);'; closer.innerHTML = 'закрыть'; closer.onclick = function() { document.body.removeChild(this.parentNode.parentNode); } document.body.appendChild(entry.parentNode); return 0; } } Virta = new Virta; smrAJAX = new smrAJAX; function refreshConfirmCode() { if (window.refreshCC) return; var confirmCodeImg = _get('confirmCodeImg'); var newConfirmCode = confirmCodeImg.cloneNode(true); confirmCodeImg.src = './images/throbber.gif'; confirmCodeImg.style.width = '80px'; confirmCodeImg.style.height = '40px'; newConfirmCode.src = '/captcha/?key=' + Math.round(1000 * Math.random(), 0); refreshCC = window.setInterval( function() { if (newConfirmCode.complete) { confirmCodeImg.parentNode.replaceChild(newConfirmCode, confirmCodeImg); window.clearInterval(refreshCC); refreshCC = null; } }, 1); }