adHost = "http://adhost.totalmetal.ru";
adHrefDir = "/phpads/adclick.php?n=";
adImgDir = "/phpads/adview.php?what=zone:2&n=";
adAccount="";
adTitle="";

//<a href='http://www.totalmetal.net/phpads/adclick.php?n=1'><img src='http://www.totalmetal.net/phpads/adview.php?what=zone:2&n=1' border='0'></a>

ad100Host = "http://rb2.design.ru";
ad100HrefDir = "/cgi-bin/href/";
ad100ImgDir = "/cgi-bin/banner/";
ad100Account="wlcross";
ad100Title="RB2 Network.";

adlink1='<a href="' + adHost + adHrefDir;
adlink2=' target="_blank">';
adimg1='<img src="' + adHost + adImgDir;
adimg2= '" hspace=4 vspace=5 border=1 height=60 align=left width=468>';

ad100link1='<a href="' + ad100Host + ad100HrefDir + ad100Account + '?';
ad100link2=' target="_blank">';
ad100img1='<img src="' + ad100Host + ad100ImgDir + ad100Account + '?';
ad100img2= ' alt="' + ad100Title + '" hspace=5 vspace=5 border=1 height=100 width=100 ismap>';


toDate = new Date();
ourDay = toDate.getDay();
ourDate = toDate.getDate();
ourMonth = toDate.getMonth();
ourYear = toDate.getYear();
ourYear = ourYear%100;
ourHours = toDate.getHours();
ourMinutes = toDate.getMinutes();
ourSeconds = toDate.getSeconds();
Days = new Array("воскресенье", "понедельник", "вторник", "среда", "четверг", "п\ятница", "суббота");
Months = new Array("\январ\я", "феврал\я", "марта", "апрел\я", "ма\я", "июн\я", "июл\я", "августа", "сент\ябр\я", "окт\ябр\я", "но\ябр\я", "декабр\я");

mdays = new Array (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
if(!(ourYear % 4)) mdays[1] = 29;
ourMonth++; if (ourMonth<10) ourMonth = "0" + ourMonth;
if (ourMinutes<10) ourMinutes = "0" + ourMinutes;
if (ourYear == 98 || ourYear == 99) ourYear = "19" + ourYear;
else ourYear = 2000 + ourYear%100;

function go(form)
{
self.location.href=form.day.options[form.day.selectedIndex].value+','+form.volume.options[form.volume.selectedIndex].value;
}

function optiondate (term)
{
    m1=ourMonth;
	d1=ourDate+1;
	y1=ourYear;
	for (i=0; i<term; i++) {
      d1--;
      if(d1<1) {
	     if(m1==0) {m1=11; y1--} else m1--;
	     d1 = mdays[m1];
      }
	  cdate = new Date(y1, m1, d1);
      d=cdate.getDate();
	  m=cdate.getMonth(); m++;
	  y=cdate.getYear();
      y=y%100;    
      if (y == 98 || y == 99) y = "19" + y;
	  else y = 2000 + y%100;
	  if (d<10) d = "0" + d;
      if (m<10) m = "0" + m;
	  pdate=d+'.'+m+ '.'+y;
	  document.write('<option>'+pdate);
  }
}

function ad_insert()
{
  timemask='1'+ourHours+'2'+ourMinutes+'3'+ourSeconds;

  adstring = adlink1 + timemask + '"' + adlink2 + adimg1 + timemask + '"' + adimg2 + '</a>';
  document.write(adstring);
  
}


function ad100_insert()
{
  timemask1='1'+ourHours+'2'+ourMinutes+'3'+ourSeconds;
  timemask2='4'+ourHours+'5'+ourMinutes+'6'+ourSeconds;
  ad100string1 = ad100link1 + timemask1 + '"' + ad100link2 + ad100img1 + timemask1 + '"' + ad100img2 + '</a>';
  separator="<br>";
  ad100string2 = ad100link1 + timemask2 + '"' + ad100link2 + ad100img1 + timemask2 + '"' + ad100img2 + '</a>';
  
  document.write(ad100string1);
  document.write(separator);
  document.write(ad100string2);
  
}


function phpad_insert100(n)
{
   random = parseInt(Math.random()*1000);
   for (i=0; i<n; i++){
     random++;   
     b100 = '<a href="http://adhost.totalmetal.ru/phpads/adclick.php?';
     b100 += 'n=' + random + '">'; 
     b100 += '<img src="http://adhost.totalmetal.ru/phpads/adview.php?what=zone:7&'; 
     b100 += 'n=' + random + '" width=100 height=100'; 
     b100 += ' hspace=5 vspace=5 border=1 align=texttop></a><br>';
    document.write(b100); 
    }
}

function phpad100_insert()
{
   random = parseInt(Math.random()*1000);
   for (i=7; i<9; i++){
     random++;   
     b100 = '<a href="http://adhost.totalmetal.ru/phpads/adclick.php?';
     b100 += 'n=' + random + '">'; 
     b100 += '<img src="http://adhost.totalmetal.ru/phpads/adview.php?what=zone:' + i + '&'; 
     b100 += 'n=' + random + '" width=100 height=100'; 
     b100 += ' hspace=5 vspace=5 border=1 align=texttop></a><br>';
    document.write(b100); 
    }
}

function ear_insert(n)
{
   random = parseInt(Math.random()*1000);
 //<a href='http://www.totalmetal.net/phpads/adclick.php?n=1'><img src='http://www.totalmetal.net/phpads/adview.php?what=zone:1&n=1' border='0'></a>
   for (i=0; i<n; i++){
     random++;   
     ear = '<a href="http://adhost.totalmetal.ru/phpads/adclick.php?';
     ear += 'n=' + random + '">'; 
     ear += '<img src="http://adhost.totalmetal.ru/phpads/adview.php?what=zone:1&'; 
     ear += 'n=' + random + '" width=144 height=60'; 
     ear += ' hspace=1 vspace=2 border=0 align=texttop></a>';
    document.write(ear); 
    }
}

