var NeedOpenAuth=false; var ie6 = !window.getComputedStyle && navigator.appVersion.indexOf("MSIE 7") == -1; var _html; window.onload = function () { _html = $T("HTML")[0]; if(ie6){ window.onresize = function(){ window.scrollTo(0, _html.scrollTop); } } init_auth( ); if(window.init_alert){ init_alert(); } if (NeedOpenAuth) { open_auth(); } var SearchText = 'Поиск по каталогу'; var SearchForm = document.getElementById('SearchForm'); if (SearchForm) { SearchForm.onsubmit = function ( ) { if ( this.searchtext.value == '' || this.searchtext.value == SearchText ) { return false; } } var str = document.location.href; str= str.replace("http:\/\/", ""); var arr = str.split("\/"); if ( arr.length > 3 ) { if (!SearchForm.searchtext.value){ SearchForm.searchtext.value = SearchText; } SearchForm.searchtext.onfocus = function ( ) { if ( this.value == SearchText ) { this.value=''; } } SearchForm.searchtext.onblur = function ( ) { if ( this.value == '' ) { this.value=SearchText; } } } } AuthHoverBlur( ); } var LoginText = 'Логин'; var PassText = 'Пароль'; function AuthHoverBlur( ) { var AuthForm = document.getElementById('AuthForm'); if ( AuthForm ) { AuthForm.onsubmit = function ( ) { if ( this.AuthLogin.value == '' || this.AuthLogin.value == LoginText || this.AuthPass.value == '' || this.AuthPass.value == PassText ) { return false; } } AuthForm.AuthLogin.value = LoginText; AuthForm.AuthLogin.onfocus = function ( ) { if ( this.value == LoginText ) { this.value=''; } } AuthForm.AuthLogin.onblur = function ( ) { if ( this.value == '' ) { this.value=LoginText; } } AuthForm.AuthPass.value = PassText; AuthForm.AuthPass.onfocus = function ( ) { if ( this.value == PassText ) { this.value=''; } } AuthForm.AuthPass.onblur = function ( ) { if ( this.value == '' ) { this.value=PassText; } } } } function init_auth(){ var root = $('auth'); if(!root){ return; } var btn = $T('H2', root)[0]; if (btn) { btn.clicked = false; btn.openBottom = 0; btn.closeBottom = -(root.offsetHeight - 30); btn.onclick = function(){ if(this.clicked){ root.style.bottom = this.closeBottom + "px"; }else{ root.style.bottom = this.openBottom + "px"; } this.clicked = !this.clicked; } } } function open_auth(){ var root = $('auth'); if(!root){ return; } var btn = $T('H2', root)[0]; if (btn) { btn.clicked = true; root.style.bottom = "0px"; } } function check_min_width(){ var m_root = $("min-width"); var root = $("text-content"); var items = ($T("IMG", root) || []).concat($T("table", root) || []); _html = $T("HTML")[0]; items.each(function(item){ if(item.offsetWidth > c_min_width){ var delta = item.offsetWidth - c_min_width; if(ie6){ min_width = 1000 + delta; print(min_width); m_root.style.width = min_width + "px"; }else{ m_root.style.minWidth = 1000 + delta + "px" } } item.style.position = "static"; item.style.visibility = "visible"; }); if(min_width && ie6){ window.onresize = function(){ m_root.style.width = document.body.clientWidth <= min_width ? min_width : "auto"; window.scrollTo(0, _html.scrollTop); } } } function wo(link,ww,hh,title) { w=window.open(link,'',(ww ? 'width='+ww+',' : '')+(hh ? 'height='+hh+',' : '')+'toolbar=0,scrollbars=0,resizable'); if (link.indexOf('.html')==-1) { if (document.layers) title=''; w.document.open(); w.document.write('