var inserted_frames = {}; function frame( name, insertion, ajax ) { if( inserted_frames[name] ) { return true; } inserted_frames[name] = true; html = ''; if( !insertion || (Prototype.Browser.IE && !ajax) ) { document.write(html); } else { new Insertion.Bottom($(document.body),html); } } function subForm( obj_id ) { var obj = document.getElementById(obj_id); if( obj ) obj.submit(); } function newwin(url,w,h) { var window_name = 'myWin_' + Math.round( Math.random()*1000 ) ; var myWin = open(url, window_name, 'location=0,menubar=0,toolbar=0,resizable=1,scrollbars=1,width='+w+',height='+h+''); if ( myWin ) myWin.focus(); } function showLayer( obj ) { if ( obj ) { obj.style.display = (obj.style.display == 'none') ? '' : 'none'; } } function changeOption( targ,selObj ) { eval(targ + ".location='"+selObj.options[selObj.selectedIndex].value + "'"); } function switchVisibility( obj_id ) { var obj = (typeof obj_id == 'object') ? obj_id : document.getElementById(obj_id); if( obj ) { obj.style.display = ( obj.style.display == 'block' ) ? 'none' : 'block'; } } function checkMail( obj_id ) { var obj = (typeof obj_id == 'object') ? obj_id : document.getElementById( obj_id ); if( ! obj ) { return false; } var is_valid_mail = ( /([A-Za-z0-9\-\_\.]{1,50})\@([a-z0-9\-\_]{1,30})\.([a-z]{2,4})/.test( obj.value ) ) ? true : false; return is_valid_mail; } function subscribe( unsubscribe_action ) { var the_form = $('subscribe_form'); var elements = Form.getElements(the_form); for(var i=0; i'; str += ''; str += ''; str += ''; str += '
'; str += ' '; str += '
'; str += '<\/div><\/body><\/html>'; myWin.document.write( str ); } function hasEnabledFlashPlugin() { var has_flash = false; for (i=0; i < navigator.plugins.length; i++) { if (navigator.plugins[i].name.indexOf("Shockwave Flash") != -1) { has_flash = true; } } return has_flash; } function showFlash( t_name, t_width, t_height, t_params ) { if( hasEnabledFlashPlugin ) { output_str = ''; output_str += ''; output_str += ''; output_str += ''; output_str += ''; output_str += ''; output_str += ''; } else { output_str = 'No ShockWave Flash Plugin Installed'; } document.write( '\n\t' + '
' + output_str + '
' + '\n' ); } function showDGArgusCounter(site_id) { if( !site_id ) return; var cz_str = "ua="+escape(navigator.userAgent); cz_str += "&id="+site_id; cz_str += "&du="+escape(document.URL); cz_str += "&rf="+escape(document.referrer); cz_str = "Статистика посещений от DG"; document.write(cz_str); } function showLocationForPrint(text) { document.write( '
'+text+'<\/span>' + document.location + '<\/span>'); } function showLiveInternetCounter() { document.write('') } function refreshWithout( key ) { var query = $H( document.location.href.toQueryParams() ); document.location.hash = ''; if( query[key] ) { query.remove( key ); query = query.toQueryString(); document.location.replace( '?'+query ); } else { document.location.reload(); } } function getFlash( block_id, src, width, height ) { var block = $(block_id); if( !block ) { return false; } var html = ''; html = ''; html += ''; html += ''; html += ''; html += '/,'<#{1} #{2}>').gsub(/\<(.*?)\/\>/,'<#{1}>'); } function inputDefault( object, action, css_class ) { css_class = ( typeof(css_class) == 'string' ? css_class : 'empty' ); switch( action ) { case 'focus': { if( object.value == object.title ) { object.value = ''; } object.removeClassName(css_class); break; } case 'blur': case 'init': case 'reset': { if( action == 'reset' ) { object.value = ''; } if( !object.value.strip() || (object.value == object.title) ) { object.value = object.title; object.addClassName(css_class); } break; } default: { object = $(object); Event.observe( object, 'focus', inputDefault.bind(this,object,'focus',css_class) ); Event.observe( object, 'blur', inputDefault.bind(this,object,'blur',css_class) ); inputDefault(object,'init',css_class); break; } } } // проверка на массив window.is_array = function( v ) { return Object.prototype.toString.apply(v) === '[object Array]'; }