';
return s;
};
this.embedBanner = function (id, width, height, extension, zeropxLinkUrl, positionCode) {
var bannerHtml = this.getBannerHtml(id, width, height, extension, zeropxLinkUrl, positionCode);
if (bannerHtml) {
document.write(bannerHtml);
return true;
} else {
return false;
}
};
this.data = {};
this.positionCountList = {};
this.positionData = {};
this.getBannerDataByPosition = function (code, limit) {
if (!this.positionCountList[code]) {
this.positionCountList[code] = 0;
}
this.positionCountList[code] ++;
if (limit && (this.positionCountList[code] > limit)) {
return false;
}
if (this.data[code] && this.data[code].length) {
var x = (this.rotationCount + this.positionCountList[code]) % this.data[code].length;
var bannerData = this.data[code][x];
if (this.positionData[code]) {
for (var key in this.positionData[code]) {
bannerData[key] = this.positionData[code][key];
}
}
return bannerData;
}
return false;
};
this.getBannerHtmlByPosition = function (code, before, after, limit) {
var bannerData = this.getBannerDataByPosition(code, limit);
if (bannerData) {
if (bannerData.p2) { // 2b (2a+b)
if (!this.positionCountList[bannerData.p2]) {
this.positionCountList[bannerData.p2] = 0;
}
this.positionCountList[bannerData.p2] ++;
}
if (bannerData.p3) { // 1c (1a+b+c)
if (!this.positionCountList[bannerData.p3]) {
this.positionCountList[bannerData.p3] = 0;
}
this.positionCountList[bannerData.p3] ++;
}
var s = '';
switch (typeof before) {
case 'function': s += before(bannerData); break;
case 'string': s += before; break;
}
s += this.getBannerHtml(bannerData.i, bannerData.w, bannerData.h, bannerData.e, bannerData.z, code);
switch (typeof after) {
case 'function': s += after(bannerData); break;
case 'string': s += after; break;
}
return s;
} else {
return false;
}
};
this.embedPosition = function (code, before, after, limit) {
var bannerHtml = this.getBannerHtmlByPosition(code, before, after, limit);
if (bannerHtml) {
document.write(bannerHtml);
return true;
} else {
return false;
}
};
// position L
this.embedBanner2 = function (id, width, height, extension, zeropxLinkUrl, positionCode) {
var viewPath1 = this.viewPath;
var viewGifPath1 = this.viewGifPath;
this.viewPath = viewPath1.replace('view', 'view2');
this.viewGifPath = viewGifPath1.replace('view', 'view2');
var result = this.embedBanner(id, width, height, extension, zeropxLinkUrl, positionCode);
this.viewPath = viewPath1;
this.viewGifPath = viewGifPath1;
return result;
};
this.embedBannerNoIncr = function (id, width, height, extension, zeropxLinkUrl, positionCode) {
var noIncr1 = this.noIncr;
this.noIncr = true;
var result = this.embedBanner(id, width, height, extension, zeropxLinkUrl, positionCode);
this.noIncr = noIncr1;
return result;
};
// position O
this.embedPositionNoIncr = function (code, before, after, limit) {
var noIncr1 = this.noIncr;
this.noIncr = true;
var result = this.embedPosition(code, before, after, limit);
this.noIncr = noIncr1;
return result;
};
this.htmlEntityDecode = function (str) {
return String(str).replace(/"/g, '"').replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&');
};
return this;
}(window);
function bnrobjectPositionCallback() {
var code = this.getAttribute('data-code');
var before = this.hasAttribute('data-before') ? this.getAttribute('data-before') : null;
if (typeof before == 'string') {
before = bnrobject.htmlEntityDecode(before);
}
var after = this.hasAttribute('data-after') ? this.getAttribute('data-after') : null;
if (typeof after == 'string') {
after = bnrobject.htmlEntityDecode(after);
}
var limit = this.hasAttribute('data-limit') ? this.getAttribute('data-limit') : null;
var bannerHtml = bnrobject.getBannerHtmlByPosition(code, before, after, limit);
if (bannerHtml) {
this.innerHTML = bannerHtml;
} else {
this.innerHTML = '';
}
}
bnrobject.data = {"I8":[{"i":6712,"e":"jpg","w":1270,"h":211,"p":"I8"},{"i":6708,"e":"jpg","w":1270,"h":211,"p":"I8"},{"i":6721,"e":"jpg","w":1270,"h":211,"p":"I8"},{"i":6734,"e":"png","w":1270,"h":211,"p":"I8"},{"i":6735,"e":"jpg","w":1270,"h":211,"p":"I8"},{"i":6746,"e":"jpg","w":1270,"h":211,"p":"I8"}],"IS5":[{"i":6688,"e":"jpg","w":295,"h":320,"p":"IS5"},{"i":6705,"e":"jpg","w":295,"h":320,"p":"IS5"},{"i":6758,"e":"png","w":295,"h":320,"p":"IS5"},{"i":6615,"e":"jpg","w":295,"h":320,"p":"IS5"}],"IL1":[{"i":6689,"e":"jpg","w":945,"h":100,"p":"IL1"},{"i":6728,"e":"jpg","w":945,"h":100,"p":"IL1"},{"i":6772,"e":"jpg","w":945,"h":100,"p":"IL1"}],"IS4":[{"i":6715,"e":"jpg","w":295,"h":320,"p":"IS4"},{"i":6738,"e":"jpg","w":295,"h":320,"p":"IS4"},{"i":6754,"e":"jpg","w":295,"h":320,"p":"IS4"}],"IL":[{"i":6503,"e":"jpg","w":945,"h":90,"p":"IL"},{"i":6723,"e":"jpg","w":945,"h":90,"p":"IL"},{"i":6724,"e":"jpg","w":945,"h":90,"p":"IL"}],"I11":[{"i":6504,"e":"jpg","w":945,"h":157,"p":"I11"},{"i":6645,"e":"jpg","w":945,"h":157,"p":"I11"},{"i":6711,"e":"jpg","w":945,"h":157,"p":"I11"},{"i":6732,"e":"jpg","w":945,"h":157,"p":"I11"},{"i":6747,"e":"jpg","w":945,"h":157,"p":"I11"},{"i":6749,"e":"jpg","w":945,"h":157,"p":"I11"},{"i":6752,"e":"jpg","w":945,"h":157,"p":"I11"}],"_7b":[{"i":6505,"e":"jpg","w":240,"h":200,"p":"_7b","c":"Участки с готовыми коммуникациями в благоустроенном посёлке, у леса и озера","head":"Красноозерное","comment":null,"l":"http:\/\/www.pfa-group.ru\/cottage\/kottedzhnye-poselki-v-leningradskoy-oblasti\/krasnoozyernoe-2\/"}],"IS2":[{"i":6506,"e":"jpg","w":295,"h":320,"p":"IS2"},{"i":6699,"e":"jpg","w":295,"h":320,"p":"IS2"},{"i":6720,"e":"jpg","w":295,"h":320,"p":"IS2"},{"i":6755,"e":"jpg","w":295,"h":320,"p":"IS2"},{"i":6773,"e":"jpg","w":295,"h":320,"p":"IS2"}],"IH":[{"i":6507,"e":"gif","w":1270,"h":100,"p":"IH","z":"https:\/\/mc.yandex.ru\/pixel\/8689037759145550306?rnd=%aw_random%"},{"i":6509,"e":"gif","w":1270,"h":100,"p":"IH","z":"https:\/\/mc.yandex.ru\/pixel\/6685822926774270867?rnd=%aw_random%"},{"i":6510,"e":"gif","w":1270,"h":100,"p":"IH"}],"_72b":[{"i":6621,"e":"jpg","w":240,"h":200,"p":"_72b","c":"","head":"Комплекс таунхаусов OLLILA","comment":null,"l":"http:\/\/ollila.ru\/"},{"i":6696,"e":"jpg","w":240,"h":200,"p":"_72b","c":"","head":"Комплекс таунхаусов OLLILA","comment":null,"l":"http:\/\/ollila.ru\/"},{"i":6709,"e":"jpg","w":240,"h":200,"p":"_72b","c":"У Петергофа. Уникальные домовладения от 190 кв.м. 3 км от КАД. Все коммуникации. Рассрочка. Специальные предложения.","head":"КП «Шале парк»","comment":null,"l":"http:\/\/www.shalepark.ru"}],"_71b":[{"i":6636,"e":"jpg","w":240,"h":200,"p":"_71b","c":"Земельные участки без подряда во Всеволожском р-не от 99 000 руб\/сотка.","head":"КП Агалатово 3","comment":null,"l":"http:\/\/www.agalatovo3.ru\/plan"},{"i":6714,"e":"jpg","w":240,"h":200,"p":"_71b","c":"","head":"Участки в Ломоносовском районе, от 30 тыс.р. за сотку","comment":null,"l":"http:\/\/baltzem.ru"}],"_73d":[{"i":6637,"e":"jpg","w":240,"h":200,"p":"_73d","c":"Земельные участки без подряда во Всеволожском р-не от 99000 руб\/сотка.","head":"КП Агалатово 3","comment":null,"l":"http:\/\/www.agalatovo3.ru\/plan"}],"_73a":[{"i":6641,"e":"jpg","w":240,"h":200,"p":"_73a","c":"","head":"КП «Белый остров»","comment":null,"l":"http:\/\/www.beliyostrov.ru\/"},{"i":6710,"e":"jpg","w":240,"h":200,"p":"_73a","c":"","head":"Дачный поселок «Гостилицкое»","comment":null,"l":"http:\/\/dacha-lomonosov.ru\/"}],"_71a":[{"i":6649,"e":"jpg","w":240,"h":200,"p":"_71a","c":"","head":"КП «Всеволожский»","comment":null,"l":"http:\/\/www.vsevsev.ru"}],"_72c":[{"i":6673,"e":"jpg","w":240,"h":200,"p":"_72c","c":"","head":"КП «Ламбери»","comment":null,"l":"http:\/\/lambery.ru\/genplan\/houses\/1\/"}],"b":[{"i":6690,"e":"png","w":180,"h":90,"e2":"jpg","p":"b","c":"","head":"Коттеджные посёлки бизнес- и премиум-класса от компании \"Строительный трест\". Кузьмолово. Петергоф. Токсово.","comment":null,"l":"http:\/\/www.stroytrest.spb.ru\/kottedzhnye-poselki\/sad-vremeni\/?utm_source=referal&utm_medium=cpc&utm_campaign=sad"},{"i":6702,"e":"png","w":180,"h":90,"e2":"jpg","p":"b","c":"","head":"На берегу озера Вуокса 8,5 гектаров.\r\nПотрясающий вид на острова.","comment":null,"l":"http:\/\/lenoblland.ru"},{"i":6726,"e":"png","w":180,"h":90,"e2":"jpg","p":"b","c":"","head":"Продажа земельных участков на Финском заливе