var w_dim_27373 = 'px'; if((String(b2bctb_[27373].w)).match(/%/)) w_dim_27373 = '%'; var w_dig_27373 = (String(b2bctb_[27373].w)).replace (/[px%]/gi, ''); var count_27373 = (b2bctb_[27373].type == 1) ? ((typeof(b2bctb_[27373].count) != "undefined") ? b2bctb_[27373].count : 1) : 1; var td_w_dig_27373 = parseInt(w_dig_27373/count_27373); var pre_header_color_27373; var pre_header_background_27373 = 'F9D883'; if(typeof(b2bctb_[27373].pre_header_background) != "undefined") { if(b2bctb_[27373].pre_header_background == 'bordo') { pre_header_background_27373 = 'B34D6A'; } else if(b2bctb_[27373].pre_header_background == 'black') { pre_header_background_27373 = '676767'; } else if(b2bctb_[27373].pre_header_background == 'grey_blue') { pre_header_background_27373 = '8B9CAC'; } else if(b2bctb_[27373].pre_header_background == 'white') { pre_header_background_27373 = 'FFFFFF'; } else if(b2bctb_[27373].pre_header_background == 'orange') { pre_header_background_27373 = 'F9D883'; } else { pre_header_background_27373 = b2bctb_[27373].pre_header_background; } if(typeof(b2bctb_[27373].pre_header_location) != "undefined") { if((b2bctb_[27373].pre_header_location == 1) || (b2bctb_[27373].pre_header_location == 3) || (b2bctb_[27373].pre_header_location == 5) || (b2bctb_[27373].pre_header_location == 6)) { if(b2bctb_[27373].pre_header_background == 'bordo') { pre_header_color_27373 = 'FFFFFF'; } else if(b2bctb_[27373].pre_header_background == 'black') { pre_header_color_27373 = 'FFFFFF'; } else if(b2bctb_[27373].pre_header_background == 'grey_blue') { pre_header_color_27373 = 'FFFFFF'; } else if(b2bctb_[27373].pre_header_background == 'white') { pre_header_color_27373 = '0000FF'; } else if(b2bctb_[27373].pre_header_background == 'orange') { pre_header_color_27373 = '000000'; } else { pre_header_color_27373 = b2bctb_[27373].pre_header_color; } } } } if(typeof(pre_header_color_27373) == "undefined") { pre_header_color_27373 = (typeof(b2bctb_[27373].pre_header_color) != "undefined") ? b2bctb_[27373].pre_header_color : '000000'; } var b2bcontext_browser = ''; var b2bcontext_ua = navigator.userAgent.toLowerCase(); if (b2bcontext_ua.indexOf("msie") != -1 && b2bcontext_ua.indexOf("opera") == -1 && b2bcontext_ua.indexOf("webtv") == -1) b2bcontext_browser = "msie"; if (b2bcontext_ua.indexOf("opera") != -1) b2bcontext_browser = "opera"; if (b2bcontext_ua.indexOf("gecko") != -1) b2bcontext_browser = "gecko"; if (b2bcontext_ua.indexOf("safari") != -1) b2bcontext_browser = "safari"; /************* css **************/ var b2bctb_css_27373 = '.b2bctb_001 * '+ '{'+ 'border: none !important;'+ 'clear: none !important;'+ 'clip: auto !important;'+ 'float: none !important;'+ 'font-style: normal !important;'+ 'font-variant: normal !important;'+ 'font-weight: normal !important;'+ 'height: auto !important;'+ 'letter-spacing: normal !important;'+ 'line-height: normal !important;'+ 'margin: 0 !important;'+ 'overflow: visible !important;'+ 'position: static !important;'+ 'text-decoration: none !important;'+ 'text-indent: 0 !important;'+ 'text-transform: none !important;'+ 'visibility: visible !important;'+ 'white-space: normal !important;'+ 'word-spacing: normal !important;'+ 'z-index: auto !important;'+ '}'+ '.table_block_content_'+b2bctb_[27373].id+ '{'+ 'width: 100% !important;'+ 'table-layout: auto !important;'+ 'background: #'+b2bctb_[27373].background+' !important;'+ ((typeof(b2bctb_[27373].border) != "undefined") ? 'border: '+b2bctb_[27373].border+' !important;' : '')+ ((typeof(b2bctb_[27373].elem_spacing) != "undefined") ? 'border-collapse: separate !important; border-spacing: '+b2bctb_[27373].elem_spacing+' !important;' : '')+ '}'+ '.td_block_content_'+b2bctb_[27373].id+ '{'+ ((typeof(b2bctb_[27373].direction) != "undefined") ? ((b2bctb_[27373].direction == 1) ? 'width: '+td_w_dig_27373+w_dim_27373+' !important;' : '' ) : '')+ 'text-align: left !important;'+ 'padding: 5px !important;'+ 'vertical-align: top !important;'+ ((typeof(b2bctb_[27373].elem_border) != "undefined") ? 'border: '+b2bctb_[27373].elem_border+' !important;' : '')+ ((typeof(b2bctb_[27373].elem_background) != "undefined") ? 'background: #'+b2bctb_[27373].elem_background+' !important;' : '')+ '}'+ '.header_'+b2bctb_[27373].id+ '{'+ ((typeof(b2bctb_[27373].header_line_h) != "undefined") ? 'line-height: '+b2bctb_[27373].header_line_h+' !important;' : '')+ ((typeof(b2bctb_[27373].header_align) != "undefined") ? 'text-align: '+b2bctb_[27373].header_align+' !important;' : '')+ '}'+ '.header_'+b2bctb_[27373].id+' a'+ '{'+ ((typeof(b2bctb_[27373].header_weight) != "undefined") ? 'font-weight: '+b2bctb_[27373].header_weight+' !important;' : '')+ ((typeof(b2bctb_[27373].header_style) != "undefined") ? 'font-style: '+b2bctb_[27373].header_style+' !important;' : '')+ ((typeof(b2bctb_[27373].header_size) != "undefined") ? 'font-size: '+b2bctb_[27373].header_size+'px !important;' : '')+ ((typeof(b2bctb_[27373].header_family) != "undefined") ? 'font-family: '+b2bctb_[27373].header_family+' !important;' : '')+ ((typeof(b2bctb_[27373].header_color) != "undefined") ? 'color: #'+b2bctb_[27373].header_color+' !important;' : '')+ ((typeof(b2bctb_[27373].header_align) != "undefined") ? 'text-align: '+b2bctb_[27373].header_align+' !important;' : '')+ 'text-decoration: underline !important;'+ 'cursor: pointer !important;'+ 'display: inline !important;'+ '}'+ '.header_'+b2bctb_[27373].id+' a:after'+ '{display: inline !important;}'+ '.header_'+b2bctb_[27373].id+' a:hover'+ '{'+ ((typeof(b2bctb_[27373].header_hover_color) != "undefined") ? 'color: #'+b2bctb_[27373].header_hover_color+' !important;' : '')+ '}'+ '.text_'+b2bctb_[27373].id+ '{'+ ((typeof(b2bctb_[27373].direction) != "undefined") ? ((b2bctb_[27373].direction == 1) ? ((typeof(b2bctb_[27373].text_line_h) != "undefined") ? 'line-height: '+b2bctb_[27373].text_line_h+' !important;' : '') : ((b2bctb_[27373].direction == 2) ? 'line-height: '+((typeof(b2bctb_[27373].text_line_h) != "undefined") ? b2bctb_[27373].text_line_h : '10px')+' !important;' : '') ) : '')+ 'padding-top: 4px !important;'+ ((typeof(b2bctb_[27373].text_weight) != "undefined") ? 'font-weight: '+b2bctb_[27373].text_weight+' !important;' : '')+ ((typeof(b2bctb_[27373].text_style) != "undefined") ? 'font-style: '+b2bctb_[27373].text_style+' !important;' : '')+ ((typeof(b2bctb_[27373].text_size) != "undefined") ? 'font-size: '+b2bctb_[27373].text_size+'px !important;' : '')+ ((typeof(b2bctb_[27373].text_family) != "undefined") ? 'font-family: '+b2bctb_[27373].text_family+' !important;' : '')+ ((typeof(b2bctb_[27373].text_color) != "undefined") ? 'color: #'+b2bctb_[27373].text_color+' !important;' : '')+ ((typeof(b2bctb_[27373].text_align) != "undefined") ? 'text-align: '+b2bctb_[27373].text_align+' !important;' : '')+ '}'+ '.url_'+b2bctb_[27373].id+ '{'+ ((typeof(b2bctb_[27373].url_weight) != "undefined") ? 'font-weight: '+b2bctb_[27373].url_weight+' !important;' : '')+ ((typeof(b2bctb_[27373].url_style) != "undefined") ? 'font-style: '+b2bctb_[27373].url_style+' !important;' : '')+ ((typeof(b2bctb_[27373].url_size) != "undefined") ? 'font-size: '+b2bctb_[27373].url_size+'px !important;' : '')+ ((typeof(b2bctb_[27373].url_family) != "undefined") ? 'font-family: '+b2bctb_[27373].url_family+' !important;' : '')+ ((typeof(b2bctb_[27373].url_color) != "undefined") ? 'color: #'+b2bctb_[27373].url_color+' !important;' : '')+ ((typeof(b2bctb_[27373].url_align) != "undefined") ? 'text-align: '+b2bctb_[27373].url_align+' !important;' : '')+ '}'+ '.td_links_content_'+b2bctb_[27373].id+ '{'+ 'text-align: right !important;'+ 'padding-right: 5px !important;'+ 'padding-bottom: 10px !important;'+ 'vertical-align: top !important;'+ '}'+ '.td_links_content_'+b2bctb_[27373].id+' a'+ '{'+ ((typeof(b2bctb_[27373].links_weight) != "undefined") ? 'font-weight: '+b2bctb_[27373].links_weight+' !important;' : '')+ ((typeof(b2bctb_[27373].links_style) != "undefined") ? 'font-style: '+b2bctb_[27373].links_style+' !important;' : '')+ ((typeof(b2bctb_[27373].links_size) != "undefined") ? 'font-size: '+b2bctb_[27373].links_size+'px !important;' : '')+ ((typeof(b2bctb_[27373].links_family) != "undefined") ? 'font-family: '+b2bctb_[27373].links_family+' !important;' : '')+ ((typeof(b2bctb_[27373].links_color) != "undefined") ? 'color: #'+b2bctb_[27373].links_color+' !important;' : '')+ 'text-decoration: underline !important;'+ 'cursor: pointer !important;'+ '}'+ '.zayavka_'+b2bctb_[27373].id+ '{'+ ((typeof(b2bctb_[27373].zayavka_weight) != "undefined") ? 'font-weight: '+b2bctb_[27373].zayavka_weight+' !important;' : '')+ ((typeof(b2bctb_[27373].zayavka_style) != "undefined") ? 'font-style: '+b2bctb_[27373].zayavka_style+' !important;' : '')+ ((typeof(b2bctb_[27373].zayavka_size) != "undefined") ? 'font-size: '+b2bctb_[27373].zayavka_size+'px !important;' : '')+ ((typeof(b2bctb_[27373].zayavka_family) != "undefined") ? 'font-family: '+b2bctb_[27373].zayavka_family+' !important;' : '')+ ((typeof(b2bctb_[27373].zayavka_color) != "undefined") ? 'color: #'+b2bctb_[27373].zayavka_color+' !important;' : '')+ ((typeof(b2bctb_[27373].zayavka_align) != "undefined") ? 'text-align: '+b2bctb_[27373].zayavka_align+' !important;' : '')+ '}'+ '.date_'+b2bctb_[27373].id+ '{'+ ((typeof(b2bctb_[27373].date_weight) != "undefined") ? 'font-weight: '+b2bctb_[27373].date_weight+' !important;' : '')+ ((typeof(b2bctb_[27373].date_style) != "undefined") ? 'font-style: '+b2bctb_[27373].date_style+' !important;' : '')+ ((typeof(b2bctb_[27373].date_size) != "undefined") ? 'font-size: '+b2bctb_[27373].date_size+'px !important;' : '')+ ((typeof(b2bctb_[27373].date_family) != "undefined") ? 'font-family: '+b2bctb_[27373].date_family+' !important;' : '')+ ((typeof(b2bctb_[27373].date_color) != "undefined") ? 'color: #'+b2bctb_[27373].date_color+' !important;' : '')+ ((typeof(b2bctb_[27373].date_align) != "undefined") ? 'text-align: '+b2bctb_[27373].date_align+' !important;' : '')+ '}'; if((b2bcontext_browser == "opera") || (b2bcontext_browser == "gecko") || (b2bcontext_browser == "safari")) { b2bctb_css_27373 = b2bctb_css_27373 + '.vertical_'+b2bctb_[27373].id+' object'+ '{'+ 'width: 12px !important;'+ 'height: 60px !important;'+ 'display: block !important;'+ '}'+ '.vertical_'+b2bctb_[27373].id+' a { display: none !important; }'; } function view_advertisement ( header, text, url, href, keyword, bid, advertisement_subotr_weight, result_weigth ) { var nWidth = 700; var nHeigth = 200; var left = (window.screen.width - nWidth) / 2; var top = (window.screen.height - nHeigth) / 2; var view_win = window.open("", "_blank", "width="+nWidth+", height="+nHeigth+", left="+left+", top="+top+", toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes"); view_win.document.open(); view_win.document.write("Объявление `" + header + "`"); view_win.document.write(""); view_win.document.write(""); view_win.document.write(""); view_win.document.write("
Заголовок:" +header + "
Текст:" +text + "
Ссылка:" + url + "
"); view_win.document.write("
"); view_win.document.write(""); view_win.document.write(""); view_win.document.write(""); view_win.document.write("
Слово:`" +keyword + "`
Ставка:" +bid + "
Семантический вес объявления:" +advertisement_subotr_weight + "
Итоговый вес объявления:" +result_weigth + "
"); view_win.document.write(""); view_win.document.close(); } var first_blok_27373; // Необязательно function b2bctbLoadUpdate_27373(update_num) { if (document.getElementById('b2bctb_script_container' + (update_num) + '_' + b2bctb_[27373].id) != null) { var b2bctb_time_of_load_update = b2bctb_time_of_loading_27373; var b2bctb_update_key = 'Bn5D09fCa92cKszj' + parseInt(100000000 * Math.random() ); var count = b2bctb_[27373].count; var src_update_27373 = src_27373.replace (/div_conteiner_id/, 'update_key='+b2bctb_update_key+'&div_conteiner_id'); if (src_update_27373.match (/count_from=\d+/)) { src_update_27373 = src_update_27373.replace (/count_from=\d+/, 'count_from='+count*(update_num-2)); src_update_27373 = src_update_27373.replace (/count_total=\d+/, 'count_total='+count*100); } else { src_update_27373 = src_update_27373.replace (/count=\d+/, 'count='+count+'&count_from='+count*(update_num-2)+'&count_total='+count*100); } document.getElementById('b2bctb_script_container' + update_num + '_' + b2bctb_[27373].id).src = src_update_27373 + Math.random(); var b2bctb_update_27373 = setInterval(function() { b2bctb_time_of_loading_27373 += 40; var b2bctb_conteiner_temp_in = document.getElementById('b2bcontext_div_conteiner_temp_' + b2bctb_[27373].id ).innerHTML; if( b2bctb_conteiner_temp_in.match(b2bctb_update_key) && (b2bctb_time_of_loading_27373 > (b2bctb_time_of_load_update + 8000)) ) { b2bctb_update_27373 = clearInterval(b2bctb_update_27373); //if(!is_IE) // Если объявления в полученном блоке ещё есть... if (document.getElementById('b2bcontext_div_conteiner_temp_' + b2bctb_[27373].id ).innerHTML.match (/exists_advertisements/) && document.getElementById('b2bctb_script_container' + (update_num + 1) + '_' + b2bctb_[27373].id) != null) { if (update_num == 3) first_blok_27373 = document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id).innerHTML; document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id ).innerHTML = document.getElementById('b2bcontext_div_conteiner_temp_' + b2bctb_[27373].id ).innerHTML; b2bctbLoadUpdate_27373(update_num+1); } else // Если объявлений больше нет... { if (first_blok_27373) document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id ).innerHTML = first_blok_27373; } } }, 40 ); } } if((b2bctb_[27373].type == 1) && (typeof(b2bctb_[27373].by_tender) == "undefined")) { if((typeof(b2bctb_[27373].count_from) == "undefined") || (typeof(b2bctb_[27373].count_total) == "undefined")) { var count_total_27373 = 0; for (var ii in b2bctb_) { if((b2bctb_[ii].type != 1) || (typeof(b2bctb_[ii].by_tender) != "undefined")) continue; count_total_27373 += b2bctb_[ii].count; } if (b2bctb_[27373].count != count_total_27373) { var count_from_27373 = 0; for (var ii in b2bctb_) { if ((b2bctb_[ii].type != 1) || (typeof(b2bctb_[ii].by_tender) != "undefined")) continue; if (ii != 27373) { count_from_27373 += b2bctb_[ii].count; } else { break; } } b2bctb_[27373].count_from = count_from_27373; b2bctb_[27373].count_total = count_total_27373; } } } var b2bctb_b_count_27373; if((b2bctb_[27373].type == 2) && (typeof(b2bctb_[27373].by_tender) == "undefined")) { b2bctb_b_count_27373 = 0; for (var ii in b2bctb_) { if ((b2bctb_[ii].type != 2) || (typeof(b2bctb_[ii].by_tender) != "undefined")) continue; b2bctb_b_count_27373++; } } var src_27373 = 'http://b2bcontext.ru/service/advertisement/getcontent'+ '?block_id='+b2bctb_[27373].id+'&lg=e&lb=x'+ '&type='+b2bctb_[27373].type+ '&w='+b2bctb_[27373].w; if(typeof(b2bctb_[27373].h) != "undefined") src_27373+= '&h='+b2bctb_[27373].h; if((b2bcontext_browser != "opera") && (b2bcontext_browser != "gecko") && (b2bcontext_browser != "safari")) { if(typeof(b2bctb_[27373].is_utf8) != "undefined") src_27373+= '&is_utf8='+b2bctb_[27373].is_utf8; if(typeof(b2bctb_[27373].is_koi8) != "undefined") src_27373+= '&is_koi8='+b2bctb_[27373].is_koi8; } if( (top != self) && (document.referrer.search(/http:\/\/(www\.)?(\w+\.)?b2bcontext\.ru\/admin/i) == 0) ) src_27373+= '&tester_engine=1'; if(typeof(b2bctb_[27373].favicon) != "undefined") src_27373+= '&favicon='+b2bctb_[27373].favicon; if(typeof(b2bctb_[27373].by_tender) != "undefined") src_27373+= '&by_tender='+b2bctb_[27373].by_tender; if(typeof(b2bctb_[27373].direction) != "undefined") src_27373+= '&direction='+b2bctb_[27373].direction; if(typeof(b2bctb_[27373].count) != "undefined") src_27373+= '&count='+count_27373; if(typeof(b2bctb_[27373].count_from) != "undefined") src_27373+= '&count_from='+b2bctb_[27373].count_from; if(typeof(b2bctb_[27373].count_total) != "undefined") src_27373+= '&count_total='+b2bctb_[27373].count_total; if(typeof(b2bctb_b_count_27373) != "undefined") src_27373+= '&b_count='+b2bctb_b_count_27373; if(typeof(b2bctb_[27373].deny_more) != "undefined") src_27373+= '&deny_more='+b2bctb_[27373].deny_more; if(typeof(b2bctb_[27373].elem_spacing) != "undefined") src_27373+= '&elem_spacing='+b2bctb_[27373].elem_spacing; if(typeof(b2bctb_[27373].date_absent) != "undefined") src_27373+= '&date_absent='+b2bctb_[27373].date_absent; if(typeof(b2bctb_[27373].nowrap) != "undefined") src_27373+= '&nowrap='+b2bctb_[27373].nowrap; if(typeof(b2bctb_[27373].pre_header_location) != "undefined") src_27373+= '&pre_header_location='+b2bctb_[27373].pre_header_location; if(typeof(b2bctb_[27373].pre_header_short) != "undefined") src_27373+= '&pre_header_short='+b2bctb_[27373].pre_header_short; if(typeof(b2bctb_[27373].pre_header_family) != "undefined") src_27373+= '&pre_header_family='+b2bctb_[27373].pre_header_family; if(typeof(b2bctb_[27373].pre_header_size) != "undefined") src_27373+= '&pre_header_size='+b2bctb_[27373].pre_header_size; if(typeof(b2bctb_[27373].pre_header_weight) != "undefined") src_27373+= '&pre_header_weight='+b2bctb_[27373].pre_header_weight; if(typeof(b2bctb_[27373].pre_header_style) != "undefined") src_27373+= '&pre_header_style='+b2bctb_[27373].pre_header_style; src_27373+= '&pre_header_color='+pre_header_color_27373; src_27373+= '&pre_header_background='+pre_header_background_27373; document.getElementById('b2bctb_script_container2_' + b2bctb_[27373].id).src = src_27373 + '&' + Math.random(); var b2bctb_banner_loaded_27373 = 0; var b2bctb_time_of_loading_27373 = 0; // ms var b2bctb_check_first_load_27373 = setInterval(function() { b2bctb_time_of_loading_27373 += 40; var b2bctb_conteiner_in_27373 = document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id ).innerHTML; if(b2bctb_conteiner_in_27373 != '') { document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id ).innerHTML = '' + b2bctb_conteiner_in_27373; // var b2bctb_conteiner_27373 = document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id ); if (typeof document.addEventListener != 'undefined') { b2bctb_conteiner_27373.addEventListener( "mouseover", function() { setLinkg_27373(); }, false ); b2bctb_conteiner_27373.addEventListener( "mouseout", function() { setLinkb_27373(); }, false ); } else { b2bctb_conteiner_27373.attachEvent( "onmouseover", function() { setLinkg_27373(); } ); b2bctb_conteiner_27373.attachEvent( "onmouseout", function() { setLinkb_27373(); } ); } // if(b2bctb_[27373].type == 2) b2bctb_banner_loaded_27373 = 1; b2bctb_check_first_load_27373 = clearInterval(b2bctb_check_first_load_27373); setTimeout('void(0)', 100); if (b2bctb_conteiner_in_27373.match(/a3cT712QFc7N34D4/) && (b2bctb_[27373].type == 1) && (document.getElementById('b2bcontext_div_conteiner_temp_' + b2bctb_[27373].id) != null) ) { var b2bctb_time_of_first_load = b2bctb_time_of_loading_27373; src_27373 = src_27373.replace (/block_id/, 'index_and_load=1&block_id'); document.getElementById('b2bctb_script_container3_' + b2bctb_[27373].id).src = src_27373 + '&' + Math.random(); var b2bctb_check_index_and_load_27373 = setInterval(function() { b2bctb_time_of_loading_27373 += 40; var b2bctb_conteiner_temp_in = document.getElementById('b2bcontext_div_conteiner_temp_' + b2bctb_[27373].id ).innerHTML; if ((b2bctb_conteiner_temp_in != '') && (b2bctb_time_of_loading_27373 > (b2bctb_time_of_first_load + 4000))) { b2bctb_check_index_and_load_27373 = clearInterval(b2bctb_check_index_and_load_27373); document.getElementById('b2bcontext_div_conteiner_' + b2bctb_[27373].id ).innerHTML = '' + document.getElementById('b2bcontext_div_conteiner_temp_' + b2bctb_[27373].id ).innerHTML; } }, 40 ); } // if( !b2bctb_conteiner_in_27373.match(/a3cT712QFc7N34D4/) && (b2bctb_[27373].type == 1) && (b2bctb_[27373].update == 1) ) { b2bctbLoadUpdate_27373(3); } } }, 40 ); function setLinkg_27373() { var i_27373 = 1; while(document.getElementById('e'+b2bctb_[27373].id+'_'+i_27373) != null) { document.getElementById('b2bctb_link_'+b2bctb_[27373].id+'_'+i_27373).href = document.getElementById('e'+b2bctb_[27373].id+'_'+i_27373).value; i_27373++; } } function setLinkb_27373() { var i_27373 = 1; while(document.getElementById('x'+b2bctb_[27373].id+'_'+i_27373) != null) { document.getElementById('b2bctb_link_'+b2bctb_[27373].id+'_'+i_27373).href = document.getElementById('x'+b2bctb_[27373].id+'_'+i_27373).value; i_27373++; } }