var ie6 = !window.getComputedStyle && navigator.appVersion.indexOf("MSIE 7") == -1; window.onload = function () { var SearchText = 'Поиск по каталогу'; var SearchForm = document.getElementById('SearchForm'); if (SearchForm) { if (!SearchForm.searchtext.value){ SearchForm.searchtext.value = SearchText; } SearchForm.onsubmit = function ( ) { if ( this.searchtext.value == '' || this.searchtext.value == SearchText ) { return false; } } SearchForm.searchtext.onfocus = function ( ) { if ( this.value == SearchText ) { this.value=''; } } SearchForm.searchtext.onblur = function ( ) { if ( this.value == '' ) { this.value=SearchText; } } } } 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(''+title+''); w.document.write('
'); w.document.close(); } w.focus(); } function init_dropdown(){ var root = $("menu"); var items = $C("m-item", root, "DIV"); items.each(function(item){ if(ie6){ item.onmouseover = function(){ if(this.className.indexOf("here") != -1){ return } this.className += " over"; } item.onmouseout = function(){ this.className = this.className.replace("over", ""); } } var dd = $C("dropdown", item, "DIV"); if(dd){ item.className += " initializing"; item.link = $T("A", item)[0]; item.dropdown = dd[0]; var links = $T("A", item.dropdown); var max_width = 0; links.each(function(link){ if(link.offsetWidth > max_width){ max_width = link.offsetWidth; } }); max_width += 30; item.dropdown.style.width = max_width + "px"; item.className = item.className.replace("initializing", ""); item.dropdown.top_corner = $C("corner", $C("dd-top", item, "DIV")[0], "DIV")[0]; item.dropdown.top_corner.style.left = max_width - 14 + "px"; } }) }