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("| Заголовок: | " +header + " |
");
view_win.document.write("| Текст: | " +text + " |
");
view_win.document.write("| Ссылка: | " + url + " |
");
view_win.document.write("
");
view_win.document.write("| Слово: | `" +keyword + "` |
");
view_win.document.write("| Ставка: | " +bid + " |
");
view_win.document.write("| Семантический вес объявления: | " +advertisement_subotr_weight + " |
");
view_win.document.write("| Итоговый вес объявления: | " +result_weigth + " |
");
view_win.document.write("");
view_win.document.close();
}
var b2bcontext_div_conteiner_id = parseInt(100000000 * Math.random() );
/* ************** */
var w_dim_12345 = 'px';
if((String(b2bcontext_block_w)).match(/%/)) w_dim_12345 = '%';
var w_dig_12345 = (String(b2bcontext_block_w)).replace (/[px%]/gi, '');
var count_12345 = (b2bcontext_block_type == 1) ?
((typeof(b2bcontext_block_count) != "undefined") ?
b2bcontext_block_count : 1) : 1;
var td_w_dig_12345 = parseInt(w_dig_12345/count_12345);
var pre_header_color_12345;
var pre_header_background_12345 = 'F9D883';
if(typeof(b2bcontext_block_pre_header_background) != "undefined")
{
if(b2bcontext_block_pre_header_background == 'bordo') { pre_header_background_12345 = 'B34D6A'; }
else if(b2bcontext_block_pre_header_background == 'black') { pre_header_background_12345 = '676767'; }
else if(b2bcontext_block_pre_header_background == 'grey_blue') { pre_header_background_12345 = '8B9CAC'; }
else if(b2bcontext_block_pre_header_background == 'white') { pre_header_background_12345 = 'FFFFFF'; }
else if(b2bcontext_block_pre_header_background == 'orange') { pre_header_background_12345 = 'F9D883'; }
else { pre_header_background_12345 = b2bcontext_block_pre_header_background; }
if(typeof(b2bcontext_block_pre_header_location) != "undefined")
{
if((b2bcontext_block_pre_header_location == 1) ||
(b2bcontext_block_pre_header_location == 3) ||
(b2bcontext_block_pre_header_location == 5) ||
(b2bcontext_block_pre_header_location == 6))
{
if(b2bcontext_block_pre_header_background == 'bordo') { pre_header_color_12345 = 'FFFFFF'; }
else if(b2bcontext_block_pre_header_background == 'black') { pre_header_color_12345 = 'FFFFFF'; }
else if(b2bcontext_block_pre_header_background == 'grey_blue') { pre_header_color_12345 = 'FFFFFF'; }
else if(b2bcontext_block_pre_header_background == 'white') { pre_header_color_12345 = '0000FF'; }
else if(b2bcontext_block_pre_header_background == 'orange') { pre_header_color_12345 = '000000'; }
else { pre_header_color_ = b2bcontext_block_pre_header_color; }
}
}
}
if(typeof(pre_header_color_12345) == "undefined")
{
pre_header_color_12345 = (typeof(b2bcontext_block_pre_header_color) != "undefined") ?
b2bcontext_block_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_12345 =
'.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_'+b2bcontext_div_conteiner_id+
'{'+
'width: 100% !important;'+
'table-layout: auto !important;'+
((typeof(b2bcontext_block_background) != "undefined") ? 'background: #'+b2bcontext_block_background+' !important;' : '')+
'}'+
'.td_block_content_'+b2bcontext_div_conteiner_id+
'{'+
((typeof(b2bcontext_block_direction) != "undefined") ?
((b2bcontext_block_direction == 1) ? 'width: '+td_w_dig_12345+w_dim_12345+' !important;' : '' ) : '')+
'text-align: left !important;'+
'padding: 5px !important;'+
'vertical-align: top !important;'+
'}'+
'.header_'+b2bcontext_div_conteiner_id+
'{'+
((typeof(b2bcontext_block_header_line_h) != "undefined") ? 'line-height: '+b2bcontext_block_header_line_h+' !important;' : '')+
'}'+
'.header_'+b2bcontext_div_conteiner_id+' a'+
'{'+
((typeof(b2bcontext_block_header_weight) != "undefined") ? 'font-weight: '+b2bcontext_block_header_weight+' !important;' : '')+
((typeof(b2bcontext_block_header_style) != "undefined") ? 'font-style: '+b2bcontext_block_header_style+' !important;' : '')+
((typeof(b2bcontext_block_header_size) != "undefined") ? 'font-size: '+b2bcontext_block_header_size+'px !important;' : '')+
((typeof(b2bcontext_block_header_family) != "undefined") ? 'font-family: '+b2bcontext_block_header_family+' !important;' : '')+
((typeof(b2bcontext_block_header_color) != "undefined") ? 'color: #'+b2bcontext_block_header_color+' !important;' : '')+
((typeof(b2bcontext_block_header_align) != "undefined") ? 'text-align: '+b2bcontext_block_header_align+' !important;' : '')+
'text-decoration: underline !important;'+
'cursor: pointer !important;'+
'}'+
'.text_'+b2bcontext_div_conteiner_id+
'{'+
((typeof(b2bcontext_block_direction) != "undefined") ?
((b2bcontext_block_direction == 1) ?
((typeof(b2bcontext_block_text_line_h) != "undefined") ?
'line-height: '+b2bcontext_block_text_line_h+' !important;' : '') :
((b2bcontext_block_direction == 2) ?
'line-height: '+((typeof(b2bcontext_block_text_line_h) != "undefined") ?
b2bcontext_block_text_line_h : '10px')+' !important;' : '') ) : '')+
'padding-top: 4px !important;'+
((typeof(b2bcontext_block_text_weight) != "undefined") ? 'font-weight: '+b2bcontext_block_text_weight+' !important;' : '')+
((typeof(b2bcontext_block_text_style) != "undefined") ? 'font-style: '+b2bcontext_block_text_style+' !important;' : '')+
((typeof(b2bcontext_block_text_size) != "undefined") ? 'font-size: '+b2bcontext_block_text_size+'px !important;' : '')+
((typeof(b2bcontext_block_text_family) != "undefined") ? 'font-family: '+b2bcontext_block_text_family+' !important;' : '')+
((typeof(b2bcontext_block_text_color) != "undefined") ? 'color: #'+b2bcontext_block_text_color+' !important;' : '')+
((typeof(b2bcontext_block_text_align) != "undefined") ? 'text-align: '+b2bcontext_block_text_align+' !important;' : '')+
'}'+
'.url_'+b2bcontext_div_conteiner_id+
'{'+
((typeof(b2bcontext_block_url_weight) != "undefined") ? 'font-weight: '+b2bcontext_block_url_weight+' !important;' : '')+
((typeof(b2bcontext_block_url_style) != "undefined") ? 'font-style: '+b2bcontext_block_url_style+' !important;' : '')+
((typeof(b2bcontext_block_url_size) != "undefined") ? 'font-size: '+b2bcontext_block_url_size+'px !important;' : '')+
((typeof(b2bcontext_block_url_family) != "undefined") ? 'font-family: '+b2bcontext_block_url_family+' !important;' : '')+
((typeof(b2bcontext_block_url_color) != "undefined") ? 'color: #'+b2bcontext_block_url_color+' !important;' : '')+
((typeof(b2bcontext_block_url_align) != "undefined") ? 'text-align: '+b2bcontext_block_url_align+' !important;' : '')+
'}'+
'.td_links_content_'+b2bcontext_div_conteiner_id+
'{'+
'text-align: right !important;'+
'padding-right: 5px !important;'+
'padding-bottom: 10px !important;'+
'vertical-align: top !important;'+
'}'+
'.td_links_content_'+b2bcontext_div_conteiner_id+' a'+
'{'+
((typeof(b2bcontext_block_links_weight) != "undefined") ? 'font-weight: '+b2bcontext_block_links_weight+' !important;' : '')+
((typeof(b2bcontext_block_links_style) != "undefined") ? 'font-style: '+b2bcontext_block_links_style+' !important;' : '')+
((typeof(b2bcontext_block_links_size) != "undefined") ? 'font-size: '+b2bcontext_block_links_size+'px !important;' : '')+
((typeof(b2bcontext_block_links_family) != "undefined") ? 'font-family: '+b2bcontext_block_links_family+' !important;' : '')+
((typeof(b2bcontext_block_links_color) != "undefined") ? 'color: #'+b2bcontext_block_links_color+' !important;' : '')+
'text-decoration: underline !important;'+
'cursor: pointer !important;'+
'}'+
'.zayavka_'+b2bcontext_div_conteiner_id+
'{'+
((typeof(b2bcontext_block_zayavka_weight) != "undefined") ? 'font-weight: '+b2bcontext_block_zayavka_weight+' !important;' : '')+
((typeof(b2bcontext_block_zayavka_style) != "undefined") ? 'font-style: '+b2bcontext_block_zayavka_style+' !important;' : '')+
((typeof(b2bcontext_block_zayavka_size) != "undefined") ? 'font-size: '+b2bcontext_block_zayavka_size+'px !important;' : '')+
((typeof(b2bcontext_block_zayavka_family) != "undefined") ? 'font-family: '+b2bcontext_block_zayavka_family+' !important;' : '')+
((typeof(b2bcontext_block_zayavka_color) != "undefined") ? 'color: #'+b2bcontext_block_zayavka_color+' !important;' : '')+
((typeof(b2bcontext_block_zayavka_align) != "undefined") ? 'text-align: '+b2bcontext_block_zayavka_align+' !important;' : '')+
'}'+
'.date_'+b2bcontext_div_conteiner_id+
'{'+
((typeof(b2bcontext_block_date_weight) != "undefined") ? 'font-weight: '+b2bcontext_block_date_weight+' !important;' : '')+
((typeof(b2bcontext_block_date_style) != "undefined") ? 'font-style: '+b2bcontext_block_date_style+' !important;' : '')+
((typeof(b2bcontext_block_date_size) != "undefined") ? 'font-size: '+b2bcontext_block_date_size+'px !important;' : '')+
((typeof(b2bcontext_block_date_family) != "undefined") ? 'font-family: '+b2bcontext_block_date_family+' !important;' : '')+
((typeof(b2bcontext_block_date_color) != "undefined") ? 'color: #'+b2bcontext_block_date_color+' !important;' : '')+
((typeof(b2bcontext_block_date_align) != "undefined") ? 'text-align: '+b2bcontext_block_date_align+' !important;' : '')+
'}';
if((b2bcontext_browser == "opera") || (b2bcontext_browser == "gecko") || (b2bcontext_browser == "safari"))
{
b2bctb_css_12345 = b2bctb_css_12345 +
'.vertical_'+b2bcontext_div_conteiner_id+' object'+
'{'+
'width: 12px !important;'+
'height: 60px !important;'+
'display: block !important;'+
'}'+
'.vertical_'+b2bcontext_div_conteiner_id+' a { display: none !important; }';
}
var b2bcontext_block_h_div;
if (typeof(b2bcontext_block_h) != "undefined")
{
if (b2bcontext_block_type == 2 )
{
b2bcontext_block_h_div = b2bcontext_block_h_full + 5
}
else
{
b2bcontext_block_h_div = b2bcontext_block_h
}
}
var b2bcontext_block_w_dim = (!((String(b2bcontext_block_w)).match(/%/)) && !((String(b2bcontext_block_w)).match(/px/))) ? 'px' : '';
var src = 'http://b2bcontext.ru/service/advertisement/getcontent'+
'?block_id='+b2bcontext_div_conteiner_id+
'&type='+b2bcontext_block_type+
'&w='+b2bcontext_block_w;
if(typeof(b2bcontext_block_h) != "undefined") src+= '&h='+b2bcontext_block_h;
if ((b2bcontext_browser != "opera") && (b2bcontext_browser != "gecko") && (b2bcontext_browser != "safari"))
{
if(typeof(b2bcontext_block_is_utf8) != "undefined") src+= '&is_utf8='+b2bcontext_block_is_utf8;
if(typeof(b2bcontext_block_is_koi8) != "undefined") src+= '&is_koi8='+b2bcontext_block_is_koi8;
}
if( (top != self) && (document.referrer.search(/http:\/\/(www\.)?(\w+\.)?b2bcontext\.ru\/admin/i) == 0) ) src+= '&tester_engine=1';
if(typeof(b2bcontext_block_by_tender) != "undefined") src+= '&by_tender='+b2bcontext_block_by_tender;
if(typeof(b2bcontext_block_direction) != "undefined") src+= '&direction='+b2bcontext_block_direction;
if(typeof(b2bcontext_block_count) != "undefined") src+= '&count='+b2bcontext_block_count;
if(typeof(b2bcontext_block_deny_more) != "undefined") src+= '&deny_more='+b2bcontext_block_deny_more;
if(typeof(b2bcontext_block_zayavka_family) != "undefined") src+= '&zayavka_family='+b2bcontext_block_zayavka_family;
if(typeof(b2bcontext_block_zayavka_size) != "undefined") src+= '&zayavka_size='+b2bcontext_block_zayavka_size;
if(typeof(b2bcontext_block_zayavka_weight) != "undefined") src+= '&zayavka_weight='+b2bcontext_block_zayavka_weight;
if(typeof(b2bcontext_block_zayavka_color) != "undefined") src+= '&zayavka_color='+b2bcontext_block_zayavka_color;
if(typeof(b2bcontext_block_pre_header_location) != "undefined") src+= '&pre_header_location='+b2bcontext_block_pre_header_location;
if(typeof(b2bcontext_block_pre_header_short) != "undefined") src+= '&pre_header_short='+b2bcontext_block_pre_header_short;
if(typeof(b2bcontext_block_pre_header_family) != "undefined") src+= '&pre_header_family='+b2bcontext_block_pre_header_family;
if(typeof(b2bcontext_block_pre_header_size) != "undefined") src+= '&pre_header_size='+b2bcontext_block_pre_header_size;
if(typeof(b2bcontext_block_pre_header_weight) != "undefined") src+= '&pre_header_weight='+b2bcontext_block_pre_header_weight;
src+= '&pre_header_color='+pre_header_color_12345;
src+= '&pre_header_background='+pre_header_background_12345;
if(typeof(b2bcontext_block_date_absent) != "undefined") src+= '&date_absent='+b2bcontext_block_date_absent;
if(typeof(b2bcontext_block_date_family) != "undefined") src+= '&date_family='+b2bcontext_block_date_family;
if(typeof(b2bcontext_block_date_size) != "undefined") src+= '&date_size='+b2bcontext_block_date_size;
if(typeof(b2bcontext_block_date_weight) != "undefined") src+= '&date_weight='+b2bcontext_block_date_weight;
if(typeof(b2bcontext_block_date_color) != "undefined") src+= '&date_color='+b2bcontext_block_date_color;
if(typeof(b2bcontext_block_links_family) != "undefined") src+= '&links_family='+b2bcontext_block_links_family;
if(typeof(b2bcontext_block_links_size) != "undefined") src+= '&links_size='+b2bcontext_block_links_size;
if(typeof(b2bcontext_block_links_weight) != "undefined") src+= '&links_weight='+b2bcontext_block_links_weight;
if(typeof(b2bcontext_block_links_color) != "undefined") src+= '&links_color='+b2bcontext_block_links_color;
document.write('');
document.write('');
document.write('');
var b2bctb_banner_loaded = 0;
var b2bctb_check_first_load_ = setInterval(function() {
var b2bctb_conteiner_in_ = document.getElementById('b2bcontext_div_conteiner_' + b2bcontext_div_conteiner_id ).innerHTML;
if(b2bctb_conteiner_in_ != '')
{
b2bctb_check_first_load_ = clearInterval(b2bctb_check_first_load_);
b2bctb_banner_loaded = 1;
}
}, 40 );