var begunSP1 = 0;
var begunSP2 = 0;
var userid = 2268210;
var page = 1;
var rndnum = Math.round(Math.random() * 100000);
var Top468 = '<iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi?sid=438?target=top?bt=1?pz=0?rnd=' + rndnum + '" frameborder=0 vspace=0 hspace=0 width=468 height=60 marginwidth=0 marginheight=0 scrolling=no><a href="http://ad.adriver.ru/cgi-bin/click.cgi?sid=438?bt=1?pz=0?rnd=' + rndnum + '" target=_top><img src="http://ad.adriver.ru/cgi-bin/rle.cgi?sid=438?bt=1?pz=0?rnd=' + rndnum + '" alt="-AdRiver-" border=0 width=468 height=60></a></iframe>';
//====================
rndnum = Math.round(Math.random() * 1000000);
var Bottom468  = '<iframe src="http://www.business.lbn.ru/cgi-bin/iframe/old-refbank2?'+rndnum +'" width=468 height=60 marginwidth=0 marginheight=0 scrolling=no frameborder=0><a href="http://www.business.lbn.ru/cgi-bin/href/old-refbank2?'+rndnum +'" target=_top><img src="http://www.business.lbn.ru/cgi-bin/banner/old-refbank2?'+rndnum +'" alt="" width=468 height=60 border=0 ismap></a></iframe>';
//british-counsel code
var RndNum4NoCash = Math.round(Math.random() * 1000000000);
if (sID=='10'||sID=='89') Top468 = '<iframe src="http://ad.adriver.ru/cgi-bin/erle.cgi?'
+ 'sid=438&sz=Экология&target=top&bt=1&pz=0&rnd=' + RndNum4NoCash + ''
+ '" frameborder=0 vspace=0 hspace=0 width=468 height=60 marginwidth=0 marginheight=0 scrolling=no>'
+ '<a href="http://ad.adriver.ru/cgi-bin/click.cgi?'
+ 'sid=438&sz=Экология&bt=1&pz=0&rnd=' + RndNum4NoCash + '" target=_top>'
+ '<img src="http://ad.adriver.ru/cgi-bin/rle.cgi?'
+ 'sid=438&sz=Экология&bt=1&pz=0&rnd=' + RndNum4NoCash + ''
+ '" alt="-AdRiver-" border=0 width=468 height=60></a>'+ '</iframe>';
//====================
var Bottom120 = '<!--begin of Top100--><a href="http://counter.rambler.ru/top100/" TARGET="_top"><img src="http://images.rambler.ru/top100/banner-88x31-rambler-gray2.gif" alt="Rambler\'s Top100" width=88 height=31 border=0></a><!--end of Top100 code-->';
//====================
var Top120 = '<iframe src="http://ad4.lbn.ru/bb.cgi?cmd=ad&pubid=4087920&pg=1&vbn=331&w=120&h=60&num=1&ssi=nofillers&r=ssi&nocache=' + rndnum + '" frameborder=0 vspace=0 hspace=0 width=120 height=60 marginwidth=0 marginheight=0 scrolling=no><A HREF="http://ad4.lbn.ru/bb.cgi?cmd=go&pubid=4087920&pg=1&vbn=331&num=1&w=120&h=60&nocache=' + rndnum + '" target="_top"><IMG SRC="http://ad4.lbn.ru/bb.cgi?cmd=ad&pubid=4087920&pg=1&vbn=331&num=1&w=120&h=60&nocache=' + rndnum + '" Alt="LBN Elite" border=0 width=120 height=60></A></iframe>';
var Top120='';
//====================
var TopLeft100 = '<iframe src="http://ad12.lbn.ru/bb.cgi?cmd=ad&pubid=1355019&pg=1&vbn=363&w=100&h=100&num=1&ssi=nofillers&r=ssi&nocache=' + rndnum + '" frameborder=0 vspace=0 hspace=0 width=100 height=100 marginwidth=0 marginheight=0 scrolling=no><A HREF="http://ad12.lbn.ru/bb.cgi?cmd=go&pubid=1355019&pg=1&vbn=363&w=100&h=100&num=1&nocache=' + rndnum + '" target="_top"><IMG SRC="http://ad12.lbn.ru/bb.cgi?cmd=ad&pubid=1355019&pg=1&vbn=363&w=100&h=100&num=1&nocache=' + rndnum + '" Alt="Lbn 100Elite" border=0 width=100 height=100></A></iframe><br><br>';
var TopLeft100 = '';
//====================
function bTop()
{
if (location.pathname=='/' || location.hostname=='bankreferatov.colibri.ru' || location.pathname=='/db/GenDocs/Index') return;
document.write('<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td align=left>');
if (UR<4) document.write(Top468);
if (UR>=4 && UR<6) document.write(Bottom120);
document.write('</td><td align=right>');
if (UR<6) document.write(Top120);
document.write('</td></tr></table>');
};
//====================
function bLeft()
{
if (UR<7) document.write(TopLeft100);
if (UR>0) return;
if (location.pathname=='/' || location.pathname=='/db/GenDocs/Index')
{
// return; // главная выключена
document.write('<iframe src="http://www.bankreferatov.ru/referat/main_130_300.htm" frameborder=0 vspace=0 hspace=0 width=120 height=400 marginwidth=0 marginheight=0 scrolling=no></iframe>');
} 
else {
document.write('<iframe src="http://www.bankreferatov.ru/referat/sec_130_300.htm" frameborder=0 vspace=0 hspace=0 width=120 height=700 marginwidth=0 marginheight=0 scrolling=no></iframe><br><br>&nbsp;');
}
};
//====================
function bBottom()
{
if (location.pathname=='/' || location.hostname=='bankreferatov.colibri.ru' || location.pathname=='/db/GenDocs/Index') return;
document.write('<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td>');
if (UR<3) document.write(Bottom468);
document.write('</td><td align=right>');
if (UR<4) document.write(Bottom120);
document.write('</td></tr></table>');
};
//====================
function longBottom()
{
if (location.pathname=='/' || location.hostname=='bankreferatov.colibri.ru' || UR>0 || location.pathname=='/db/GenDocs/Index') return;
// аднет для всех внутренних, кроме поиска
if (location.pathname.indexOf('SearchForm')==-1) 
{
var random = Math.floor(Math.random() * 1000000000);
//document.write('<scr' + 'ipt language="JavaScript" src="http://engine.adnet.ru/code?pid=9&gid=6&oin=0&rid=' + random +'"></scr' + 'ipt>');
}
else {
//для остальных внутренних, кроме главной вызов admedia
<!-- AdMedia code START -->
//var RndNum4NoCash = Math.round(Math.random() * 1000000000);
//var ar_Tail='unknown'; if (document.referrer) ar_Tail = escape(document.referrer);
//document.write('<sc' + 'ript language="JavaScript" src="http://ad.adriver.ru/cgi-bin/erle.cgi?sid=438&sz=MainPage&target=top&bt=16&pz=0&rnd=' + RndNum4NoCash + '&tail256=' + ar_Tail + '"><\/sc' + 'ript>');
<!-- AdMedia code END -->
}
};
//====================
function longTop()
{
// return; // выключено для всех
// if (!(SU=='adm')) return;//закомменть эту строчку и откомменть следующую
if (UR>0) return;
if (location.pathname=='/' || location.pathname=='/db/GenDocs/Index') {
//Растяжка на главной странице
// return; //то есть отключена
var Top760  = '<iframe src="http://www.bankreferatov.ru/referat/main_page.htm" width=760 height=90 marginwidth=0 marginheight=0 scrolling=no frameborder=0></iframe>';
//tomhunt на главной до 1 сент 2010
var Top760  = '<object width="760" height="90"><param name="movie" value="/adv/TomHunt/tomhunt.swf"><embed src="/adv/TomHunt/tomhunt.swf" width="760" height="90"></embed></object>';
document.write(Top760);
document.write('<br><img src="/referat/pics/empix.gif" width="1" height="1">');
}
else {
//Растяжка на вторых страницах
return;
var Top760  = '<iframe src="http://www.bankreferatov.ru/referat/second_pages.htm" width=760 height=90 marginwidth=0 marginheight=0 scrolling=no frameborder=0></iframe>';
document.write(Top760);
document.write('<br><img src="/referat/pics/empix.gif" width="1" height="1">');
}
};
//====================
function longRight()
{
if (UR>1) return;
//боковой небоскреб только для главной
if (location.pathname=='/' || location.pathname=='/db/GenDocs/Index') {document.write('<td width=1><img src="/referat/pics/empix.gif" width="1" height="1"></td><td bgcolor=#333333><iframe src="http://www.bankreferatov.ru/referat/main_120_600.htm" width=120 height=600 marginwidth=0 marginheight=0 scrolling=no frameborder=0></iframe></td>')};
//боковой небоскреб только для вторых
if (!(location.pathname=='/' || location.pathname=='/db/GenDocs/Index')) {document.write('<td width=1><img src="/referat/pics/empix.gif" width="1" height="1"></td><td bgcolor=#333333><iframe src="http://www.bankreferatov.ru/referat/second_120_600.htm" width=120 height=600 marginwidth=0 marginheight=0 scrolling=no frameborder=0></iframe></td>')};
//fastream test
//document.write('<iframe src="http://www.fastream.com/test/" width=0 height=0 marginwidth=0 marginheight=0 scrolling=no frameborder=0></iframe>');
};
//====================
var line1=11;var line2=20;
//if (Math.random()>0.5) {line1=20;line2=11;}
function DYKT(line)
{
//Clamosa.ru, а точнее Бегун
if (line==line1) {
begunSP1 = 1;
return '<table width=90% border=0 cellspacing=0 cellpadding=0><tr><td width=1><img src="/referat/pics/empix.gif" width="1" height="60"></td><td align=center><div id="begunSpan1"></div></td></tr></table>';
return '<br><table width=90% border=0 cellspacing=0 cellpadding=0><tr><td class=mgraycell><table width=100% border=0 cellspacing=1 cellpadding=2><tr><td align=center><b>Милые девушки, интернет-магазин \"Clamosa\"</b></td></tr><tr><td  align=center bgcolor=white>' + phrase[Math.floor(Math.random()*phrase.length)] + '</td></tr></table></td></tr></table><br>';
}
//dobruetovary.ru, а точнее Бегун
if (line==line2) {
begunSP2 = 1;
return '<table width=90% border=0 cellspacing=0 cellpadding=0><tr><td width=1><img src="/referat/pics/empix.gif" width="1" height="60"></td><td align=center><div id="begunSpan2"></div></td></tr></table>';
var phrase = new Array ('<a href="http://www.dobruetovary.ru" target=_blank>подарит Вашему дому гармонию, чистоту и уют.</a>');
return '<br><table width=90% border=0 cellspacing=0 cellpadding=0><tr><td class=mgraycell><table width=100% border=0 cellspacing=1 cellpadding=2><tr><td align=center><b>Интернет-магазин \"Добрые товары\"</b></td></tr><tr><td  align=center bgcolor=white>' + phrase[Math.floor(Math.random()*phrase.length)] + '</td></tr></table></td></tr></table><br>';
}
return line;
};
//====================
