function menuout() { $$( '.submenu_all_h' ).each(function(e){Element.hide(e.id)}); $$( '.submenu_all' ).each(function(e){Element.show(e.id)}); } function menuover(e) { menuout(); Element.hide('submenu_'+e); Element.show('submenu_'+e+'_h'); } function addOption( s, v, t ) { var option_item = document.createElement( 'OPTION' ); option_item.setAttribute( 'value', v ); //option_item.appendChild( document.createTextNode( t ) ); option_item.innerHTML = t; s.appendChild( option_item ); } function makeSelectArhivMenu( e1, e2, items ) { e1 = $( e1 ); e2 = $( e2 ); if ( typeof( items ) != 'object' || ! e1 || ! e2 ) { return; } e1.innerHTML = ''; e2.innerHTML = ''; _arhiv_items = items; for ( var key in items ) { addOption( e1, key, items[ key ].year_title ); } for ( var key in items ) { var size = items[ key ].items.length; var item = null; for ( var i = 0; i < size; i++ ) { item = items[ key ].items[ i ]; addOption( e2, item.id, item.item ); } break; } }; function changeArhivSelect( s, e2 ) { if ( ! ( e2 = $( e2 ) ) ) { return; } var s_item = s.options[ s.selectedIndex ]; if ( _arhiv_items[ s_item.value ] ) { e2.innerHTML = ''; var size = _arhiv_items[ s_item.value ].items.length; var item = null; for ( var i = 0; i < size; i++ ) { item = _arhiv_items[ s_item.value ].items[ i ]; addOption( e2, item.id, item.item ); } } }; function viewPic(url, title) { if (url == '') return false; width = 300; height = 100; window_top = (screen.height - height) / 2; window_left = (screen.width - width) / 2; win = window.open(url, 'image', 'width='+width+', height='+height+', top='+window_top+', left='+window_left+', toolbar=0, statusbar=0, location=0, scrollbars=no, resizable=0'); win.document.open(); win.document.write(''+title+''); win.document.write('<' + 'script language="Javascript"> '); win.document.write('function body_on_load() {window.document.getElementById("text").innerHTML = ""; document.getElementById("photo").style.visibility = "visible"; window.resizeTo((document.images.photo.width+10),(document.images.photo.height+29)); window.moveTo((screen.width-document.images.photo.width)/2, (screen.height-document.images.photo.height)/2); window.focus(); }'); win.document.write(''); win.document.write('
Идет загрузка изображения...
'); win.document.write(''); win.document.close(); } function viewURL(url, width, height, scroll) { if (url == '') return false; if (width == null) width = 640; if (height == null) height = 480; if (scroll == null) scroll = 0; win = window.open(url, '', 'width='+width+', height='+height+', toolbar=0, statusbar=0, location=0, scrollbars='+scroll+', resizable=0'); win.moveTo((screen.width-width)/2, (screen.height-height)/2); }