function load() {}

var i, j;
var flag;                      // Флажок, используемый для проверки совпадения
var banners_show468x60  = 1;   // Число показываемых на страничке баннеров
var banners_show160x160 = 1;   // Число показываемых на страничке баннеров
var banners_showTxt     = 1;   // Число показываемых на страничке баннеров

var banners468x60 = new Array(
//  "concurs.gif",      "Конкурс Лучший сайт 2007 года!", "http://www.bizhost.ru/best_site/2.html"

  "centr-uspeh.gif",  "Центр Успех - помощь в учебе!",  "http://www.centr-uspeh.ru/",
  "centr-uspeh.gif",  "Центр Успех - помощь в учебе!",  "http://www.centr-uspeh.ru/",
  "centr-uspeh.gif",  "Центр Успех - помощь в учебе!",  "http://www.centr-uspeh.ru/",
  "prakt.ru.gif",     "Помощь в прохождении практики",  "http://prakt.ru/",
  "prakt.ru2.gif",    "Помощь в прохождении практики",  "http://prakt.ru/",
//  "mypucmy.ru.gif",   "Туристический портал",           "http://mypucmy.ru/",
  "11dom.ru1.jpg",    "Они встретились здесь",          "http://11dom.ru/promo/history_of_success.phtml",
  "11dom.ru1.jpg",    "Знакомства в 11-ом доме",        "http://11dom.ru/promo/history_of_success.phtml",
  "11dom.ru1.jpg",    "Знакомства в 11-ом доме",        "http://11dom.ru/promo/history_of_success.phtml"
) 

var banners160x160 = new Array(
  "cusw.ru.gif",      "Все про АВТО!",                  "http://cusw.ru/",
  "cusw.ru.gif",      "Лучшие тачки!",                  "http://cusw.ru/",
//  "mypucmy.ru2.gif",  "Туристический портал",           "http://mypucmy.ru/index.htm?s=%D0%BE%D1%81%D1%82%D1%80%D0%BE%D0%B2",
//  "mypucmy.ru2.gif",  "Новогодние туры",                "http://mypucmy.ru/index.htm?s=%D1%82%D1%83%D1%80",
//  "nonam.ru.gif",     "Недвижимость-онлайн",            "http://nonam.ru/",
//  "nonam.ru.gif",     "Ипотека для студентов!",         "http://nonam.ru/index.htm?s=%D0%98%D0%BF%D0%BE%D1%82%D0%B5%D0%BA%D0%B0",
  "xemka.ru.gif",     "Лучшие фото!",                   "http://jmob.ru/",
  "xemka.ru.gif",     "Лучшие фото!",                   "http://jmob.ru/index.htm?s=%D0%A4%D0%BE%D1%82%D0%BE",
  "xemka.ru.gif",     "Знакомства-онлайн!",             "http://jmob.ru/index.htm?s=%D0%B7%D0%BD%D0%B0%D0%BA%D0%BE%D0%BC%D1%81%D1%82%D0%B2%D0%B0",
  "11dom.ru2.jpg",    "Они встретились здесь",          "http://11dom.ru/promo/history_of_success.phtml",
  "11dom.ru2.jpg",    "Знакомства в 11-ом доме",        "http://11dom.ru/promo/history_of_success.phtml"
) 

var bannersTxt = new Array(
  "Все про АВТО!",         	"http://cusw.ru/",                        
  "Лучшие тачки!",         	"http://cusw.ru/",                        
  "Аренда автомобилей",    	"http://cusw.ru/index.htm?s=%D0%90%D1%80%D0%B5%D0%BD%D0%B4%D0%B0%20%D0%B0%D0%B2%D1%82%D0%BE%D0%BC%D0%BE%D0%B1%D0%B8%D0%BB%D1%8F",                        
//  "Все про Недвижимость!",  	"http://nonam.ru/",                       
//  "Все про недвижимость!",  	"http://nonam.ru/",                       
//  "Ипотека для студентов!",  	"http://nonam.ru/index.htm?s=%D0%98%D0%BF%D0%BE%D1%82%D0%B5%D0%BA%D0%B0",                       
  "Знакомства-онлайн!",         "http://jmob.ru/",                        
  "Лучшие подарки!", 		"http://jmob.ru/index.htm?s=%D0%BF%D0%BE%D0%B4%D0%B0%D1%80%D0%BA%D0%B8",                        
  "Лучшая косметика!",     	"http://jmob.ru/index.htm?s=%D0%BA%D0%BE%D1%81%D0%BC%D0%B5%D1%82%D0%B8%D0%BA%D0%B0",                        
  "Все про Дом и Офис!",   	"http://infoprovse.ru/",                       
  "Все про Дом и Офис!",   	"http://tvojregion.ru/",                       
  "Квартиры в Коломне",   	"http://www.jwc.ru/",                       
  "Квартиры в Подмосковье",   	"http://www.jwc.ru/",                       
  "Квартиры от застройщика",   	"http://www.jwc.ru/",                       
  "Недвижимость в Коломне",	"http://www.jwc.ru/",                       
  "Недвижимость в Подмосковье",	"http://www.jwc.ru/"                       
) 

//-------------------------------------- 468x60 -------------------------------------------
function Show_Banner468x60(c) {
  n = rand468x60[c-1];
  document.write('<a href="' + banners468x60[n*3+2] + '" target=_blank rel=nofollow><img src="i/b/' + banners468x60[n*3] + '" border="0" width="468" height="60" alt="' + banners468x60[n*3+1] + '"></a>');
}

var rand468x60 = new Array(banners_show468x60);

for (i=0; i<banners_show468x60; i++) {
  do {
    flag=0;
    n = Math.floor(Math.random()*(banners468x60.length/3));
    for (j=0; j<i; j++) {
      if (n == rand468x60[j]) {
        flag=1;
      }
    }
  } while (flag);
  rand468x60[i] = n;
}

//-------------------------------------- 160x160 -------------------------------------------
function Show_Banner160x160(c) {
  n = rand160x160[c-1];
  document.write('<a href="' + banners160x160[n*3+2] + '" target=_blank rel=nofollow><img src="i/b/' + banners160x160[n*3] + '" border="0" width="160" height="160" alt="' + banners160x160[n*3+1] + '"></a>');
}

var rand160x160 = new Array(banners_show160x160);

for (i=0; i<banners_show160x160; i++) {
  do {
    flag=0;
    n = Math.floor(Math.random()*(banners160x160.length/3));
    for (j=0; j<i; j++) {
      if (n == rand160x160[j]) {
        flag=1;
      }
    }
  } while (flag);
  rand160x160[i] = n;
}

//-------------------------------------- Txt -------------------------------------------
function Show_BannerTxt(c) {
  n = randTxt[c-1];
  document.write('<a href="' + bannersTxt[n*2+1] + '" target=_blank rel=nofollow>' + bannersTxt[n*2] + '</a><br>');
}

var randTxt = new Array(banners_showTxt);

for (i=0; i<banners_showTxt; i++) {
  do {
    flag=0;
    n = Math.floor(Math.random()*(bannersTxt.length/2));
    for (j=0; j<i; j++) {
      if (n == randTxt[j]) {
        flag=1;
      }
    }
  } while (flag);
  randTxt[i] = n;
}

