CurDate = new Date();

if ( ((CurDate.getDate()>=15) && (CurDate.getMonth()==11) ) ||  ((CurDate.getDate()<=15) && (CurDate.getMonth()==0) ) ) {


  var LeftPictures = new Array(7)
  {
    LeftPictures[0]="NewYear/DMl1.JPG"
    LeftPictures[1]="NewYear/DMl2.JPG"
    LeftPictures[2]="NewYear/DMl3.JPG"
    LeftPictures[3]="NewYear/DMl4.JPG"
    LeftPictures[4]="NewYear/DMl5.JPG"
    LeftPictures[5]="NewYear/DMl6.JPG"
    LeftPictures[6]="NewYear/DMl7.JPG"


  }
  var RightPictures = new Array(7)
  {
    RightPictures[0]="NewYear/DMr1.JPG"
    RightPictures[1]="NewYear/DMr2.JPG"
    RightPictures[2]="NewYear/DMr3.JPG"
    RightPictures[3]="NewYear/DMr4.JPG"
    RightPictures[4]="NewYear/DMr5.JPG"
    RightPictures[5]="NewYear/DMr6.JPG"
    RightPictures[6]="NewYear/DMr7.JPG"

  }

  var UpperLeft = new Array(3)
  {
    UpperLeft[0]="NewYear/Ul1.JPG"
    UpperLeft[1]="NewYear/Ul2.JPG"
    UpperLeft[2]="NewYear/Ul3.JPG"

  }

  var UpperRight = new Array(3)
  {
    UpperRight[0]="NewYear/Ur1.JPG"
    UpperRight[1]="NewYear/Ur2.JPG"
    UpperRight[2]="NewYear/Ur3.JPG"
  }

    PictureBuffer=new Array(6);

  var MiddleLeft = new Array(2)
  {
    MiddleLeft[0]="NewYear/MiddleL1.JPG"
    MiddleLeft[1]="NewYear/MiddleL2.JPG"
  }

  var MiddleRight = new Array(2)
  {
    MiddleRight[0]="NewYear/MiddleR1.JPG"
    MiddleRight[1]="NewYear/MiddleR2.JPG"
  }


}


 else
{
  var LeftPictures = new Array(13)
  {
    LeftPictures[0]="Pics/LeftBorder1.GIF"
    LeftPictures[1]="Pics/LeftBorder2.GIF"
    LeftPictures[2]="Pics/LeftBorder3.GIF"
    LeftPictures[3]="Pics/LeftBorder4.GIF"
    LeftPictures[4]="Pics/LeftBorder5.GIF"
    LeftPictures[5]="Pics/LeftBorder6.GIF"
    LeftPictures[6]="Pics/LeftBorder7.GIF"
    LeftPictures[7]="Pics/LeftBorder8.GIF"
    LeftPictures[8]="Pics/LeftBorder9.GIF"
    LeftPictures[9]="Pics/LeftBorder10.GIF"
    LeftPictures[10]="Pics/LeftBorder11.gif"
    LeftPictures[11]="Pics/LeftBorder12.gif"
    LeftPictures[12]="Pics/LeftBorder13.gif"


  }
  var RightPictures = new Array(13)
  {
    RightPictures[0]="Pics/RightBorder1.GIF"
    RightPictures[1]="Pics/RightBorder2.GIF"
    RightPictures[2]="Pics/RightBorder3.GIF"
    RightPictures[3]="Pics/RightBorder4.GIF"
    RightPictures[4]="Pics/RightBorder5.GIF"
    RightPictures[5]="Pics/RightBorder6.GIF"
    RightPictures[6]="Pics/RightBorder7.GIF"
    RightPictures[7]="Pics/RightBorder8.GIF"
    RightPictures[8]="Pics/RightBorder9.GIF"
    RightPictures[9]="Pics/RightBorder10.GIF"
    RightPictures[10]="Pics/RightBorder11.gif"
    RightPictures[11]="Pics/RightBorder12.gif"
    RightPictures[12]="Pics/RightBorder13.gif"

  }

    PictureBuffer=new Array(8);

  var UpperLeft = new Array(3)
  {
    UpperLeft[0]="Pics/UpLeft2.GIF"
    UpperLeft[1]="Pics/UpLeft4.GIF"
    UpperLeft[2]="Pics/UpLeft5.GIF"
//    UpperLeft[3]="Pics/UpLeft6.gif"

  }

  var UpperRight = new Array(3)
  {
    UpperRight[0]="Pics/UpRight2.GIF"
    UpperRight[1]="Pics/UpRight4.GIF"
    UpperRight[2]="Pics/UpRight5.GIF"
//    UpperRight[3]="Pics/UpRight6.gif"

  }

  var MiddleLeft = new Array(2)
  {
    MiddleLeft[0]="Pics/Uzor1_1.GIF"
    MiddleLeft[1]="Pics/Uzor1_2.GIF"

  }

  var MiddleRight = new Array(2)
  {
    MiddleRight[0]="Pics/Uzor1_1.GIF"
    MiddleRight[1]="Pics/Uzor1_2.GIF"
  }
}

var Horisontal = new Array(2)
{
  Horisontal[0]="Pics/Horisontal1.gif";
  Horisontal[1]="Pics/Horisontal2.gif";
}


 RightStr="";

  function Reset()
//***********************************************************************
  {
    for(i=0; i<PictureBuffer.length;i++) PictureBuffer[i]=-1;    //>
    RightStr="";
  }

  function ShowLeftPictureInternal(RootPath)
//***********************************************************************
  {
    pr=0;
    while(pr==0)
    {
      k=Math.floor(Math.random()*LeftPictures.length);
      j=0;
      for(i=0;i<PictureBuffer.length;i++)    //>
      {
        if(PictureBuffer[i]==k) j++;
      }
      if (j==0) pr++;
     }
     for(i=0;i<PictureBuffer.length-1;i++)         //>
     {
        PictureBuffer[i]=PictureBuffer[i+1]
     }
    PictureBuffer[PictureBuffer.length-1]=k;
     document.write("<IMG SRC="+RootPath+LeftPictures[k]+"><BR>");
    RightStr=RightStr+"<IMG SRC="+RootPath+RightPictures[k]+"><BR>"
  }

function ShowLeftPicture(RootPath,PicCount)
///////////////////////////////////////////////////////////////////////////
{
 for (ShowLeftPicturei=1;ShowLeftPicturei<=PicCount;ShowLeftPicturei++)
 {
   ShowLeftPictureInternal(RootPath)
 }
}

function ShowUpperLeft(RootPath)
///////////////////////////////////////////////////////////////////////////
{
  ShowUpperI=Math.floor(Math.random()*UpperLeft.length);

  document.write("<IMG SRC="+RootPath+UpperLeft[ShowUpperI]+"><BR>");
  UpperRightStr="<IMG SRC="+RootPath+UpperRight[ShowUpperI]+"><BR>"
}
function ShowUpperRight()
///////////////////////////////////////////////////////////////////////////
{
 document.write(UpperRightStr);
}


function ShowMiddleLeft(RootPath)
///////////////////////////////////////////////////////////////////////////
{
  ShowMiddleI=Math.floor(Math.random()*MiddleLeft.length);

  document.write("<IMG SRC="+RootPath+MiddleLeft[ShowMiddleI]+"><BR>");
  MiddleRightStr="<IMG SRC="+RootPath+MiddleRight[ShowMiddleI]+"><BR>"
}
function ShowMiddleRight()
///////////////////////////////////////////////////////////////////////////
{
 document.write(MiddleRightStr);
}

 Reset()

function ShowHeader(RootDir,Title)
///////////////////////////////////////////////////////////////////////////
{
  document.write('<TABLE WIDTH="100%"   >          ');
  document.write('<TR>                             ');
  document.write('<TD ALIGN= "LEFT">               ');

  document.write('  <SCRIPT language="JavaScript"> ');
  document.write('    ShowUpperLeft("'+RootDir+'");');
  document.write('  </SCRIPT>                      ');
  document.write('                                 ');
  document.write(' </TD>                           ');

  document.write('<TD ALIGN= center>               ');
  document.write('  <SCRIPT language="JavaScript"> ');
  document.write('     ShowMiddleLeft("'+RootDir+'")');
  document.write('  </SCRIPT>                      ');
  document.write('</TD>                            ');
  document.write('                                 ');
  document.write('<TD ALIGN=CENTER>                ');

  document.write(Title);
  document.write('</TD>                            ');
  document.write('<TD ALIGN= center>               ');
  document.write('                                 ');
  document.write('  <SCRIPT language="JavaScript"> ');
  document.write('     ShowMiddleRight()           ');
  document.write('  </SCRIPT>                      ');

  document.write("</TD>                            ");
  document.write("<TD ALIGN= right>                ");
  document.write("                                 ");
  document.write('  <SCRIPT language="JavaScript"> ');
  document.write("    ShowUpperRight();            ");
  document.write("  </SCRIPT>                      ");

  document.write("</TD>                            ");
  document.write("</TR>                            ");
  document.write("</TABLE>                         ");

}

function InternalDrawMenu(intTitles, intLinks, Spacing)
{
  i=0;
  for(i=0;i<intTitles.length;i++)
  {
    s=intTitles[i];
    if(intLinks[i]!="") s="<A A HREF='"+ intLinks[i]+"'TARGET='_top'>"+s+"</A>";

    if((i+1)!=intTitles.length) s=s+Spacing;

    document.write(s);

  }
}

var PhotoMenuPics = new Array(12)
{
 PhotoMenuPics[ 0]="Photos/Nifelung/NifelungLable.gif"
 PhotoMenuPics[ 1]="Photos/FW/FWLable.gif"
 PhotoMenuPics[ 2]="Photos/Ostranna/OstrannaLable.gif"
 PhotoMenuPics[ 3]="Photos/Dune/DuneLable.gif"
 PhotoMenuPics[ 4]="Photos/Vedmak/VedmakLable.gif"
 PhotoMenuPics[ 5]="Photos/Zilant99/Zilant99Lable.gif"
 PhotoMenuPics[ 6]="Photos/Videss/VidessLable.gif"
 PhotoMenuPics[ 7]="Photos/HI2000/HI2000Lable.gif"
 PhotoMenuPics[ 8]="Photos/Wodehouse/WodehouseLable.gif"
 PhotoMenuPics[ 9]="Photos/Kin-Dza-Dza/Kin-Dza-DzaLable.gif"
 PhotoMenuPics[10]="Photos/Zilant2k/Zilant2kLable.gif"
 PhotoMenuPics[11]="Photos/ChugunKon/ChugunKonLabel.gif"

}

var PhotoMenuPicsComents = new Array(12)
{
  PhotoMenuPicsComents[0]="Сокровища Нибелунгов 1998";
  PhotoMenuPicsComents[1]="Фаэрские войны";
  PhotoMenuPicsComents[2]="Остранна";
  PhotoMenuPicsComents[3]="Дюна";
  PhotoMenuPicsComents[4]="Ведьмак";
  PhotoMenuPicsComents[5]="Зилант'99";
  PhotoMenuPicsComents[6]="Видесс 2000";
  PhotoMenuPicsComents[7]="ХИ 2000";
  PhotoMenuPicsComents[8]="Вудхаус";
  PhotoMenuPicsComents[9]="Кин-дза-дза";
  PhotoMenuPicsComents[10]="Зилант 2000";
  PhotoMenuPicsComents[11]="Чугункон 2001";


}

var PhotoMenuLinks = new Array(12)
{
  PhotoMenuLinks[0]="Photos/Nifelung/Nifelung.html"
  PhotoMenuLinks[1]="Photos/FW/FW.html"
  PhotoMenuLinks[2]="Photos/Ostranna/Ostranna.html"
  PhotoMenuLinks[3]="Photos/Dune/Dune.html"
  PhotoMenuLinks[4]="Photos/Vedmak/Vedmak.html"
  PhotoMenuLinks[5]="Photos/Zilant99/Zilant99.html"
  PhotoMenuLinks[6]="Photos/Videss/Videss.html"
  PhotoMenuLinks[7]="Photos/HI2000/HI2000.html"
  PhotoMenuLinks[8]="Photos/Wodehouse/Wodehouse.html"
  PhotoMenuLinks[9]="Photos/Kin-Dza-Dza/Kin-Dza-Dza.html"
  PhotoMenuLinks[10]="Photos/Zilant2k/Zilant2k.html"
  PhotoMenuLinks[11]="Photos/ChugunKon/ChugunKon.html"
}


function ShowPhotoMenu(RootDir, Disact)
{
  intTitle= new Array(PhotoMenuPics.length)
  intLinks= new Array(PhotoMenuPics.length)

  for(i=0;i<intTitle.length;i++)
  {
    intTitle[i]="<IMG SRC='"+RootDir+PhotoMenuPics[i]+"'"+
                 ' ALT= "' +PhotoMenuPicsComents[i]+ '"'+

                 "' BORDER=0>";
    intLinks[i]=RootDir+PhotoMenuLinks[i];
    if (i==Disact) intLinks[i]="";
  }

 InternalDrawMenu(intTitle,intLinks,"");
}

var MainMenuPics = new Array(5)
{
  MainMenuPics[0]="Pics/Menu_AboutMe.gif"
  MainMenuPics[1]="Pics/Menu_Photos.gif"
  MainMenuPics[2]="Pics/Menu_Music.gif"
  MainMenuPics[3]="Pics/Menu_GuestBook.gif"
  MainMenuPics[4]="Pics/Menu_Links.gif"
}
var MainMenuPicsComents = new Array(5)
{
  MainMenuPicsComents[0]="О себе"
  MainMenuPicsComents[1]="Фотографии"
  MainMenuPicsComents[2]="Музыка"
  MainMenuPicsComents[3]="Летопить"
  MainMenuPicsComents[4]="Ссылки"
}
var MainMenuLinks = new Array(5)
{
  MainMenuLinks[0]="index.html"
  MainMenuLinks[1]="Photos/Photo_Index.html"
  MainMenuLinks[2]="Music/MusicIndex.htm"
  MainMenuLinks[3]="GuestBook.htm"
  MainMenuLinks[4]="MyBookMarks.html"
}

function ShowMainMenu(RootDir, Disact)
{
  intTitle= new Array(MainMenuPics.length)
  intLinks= new Array(MainMenuPics.length)

  for(i=0;i<intTitle.length;i++)
  {
    intTitle[i]="<IMG SRC='"+RootDir+MainMenuPics[i]+"'"+
                 ' ALT= "' +MainMenuPicsComents[i]+ '"'+

                 "' BORDER=0>";
    intLinks[i]=RootDir+MainMenuLinks[i];
    if (i==Disact) intLinks[i]="";
  }

 InternalDrawMenu(intTitle,intLinks,"");
}

function ShowHorisontal(RootPath)
///////////////////////////////////////////////////////////////////////////
{
  i=Math.floor(Math.random()*Horisontal.length);
  document.write("<IMG SRC="+RootPath+Horisontal[i]+">");
}

function ShowSpyLogButton()
///////////////////////////////////////////////////////////////////////////
{
u="u969.79.spylog.com";d=document;nv=navigator;na=nv.appName;p=1;
bv=Math.round(parseFloat(nv.appVersion)*100);
n=(na.substring(0,2)=="Mi")?0:1;rn=Math.random();z="p="+p+"&rn="+rn;y="";
y+="<a href='http://"+u+"/cnt?f=3&p="+p+"&rn="+rn+"' target=_blank>";
y+="<img src='http://"+u+"/cnt?"+z+
"&r="+escape(d.referrer)+"&pg="+escape(window.location.href)+"' border=0 width=88 height=31 alt='SpyLOG'>";
y+="</a>"; d.write(y);if(!n) { d.write("<"+"!--"); }//-->
}
function ShowMailListButton()
///////////////////////////////////////////////////////////////////////////
{
//d=document;a='';a+=';r='+escape(d.referrer)js=10
//a+=';j='+navigator.javaEnabled()js=11
//s=screen;a+=';s='+s.width+'*'+s.heighta+=';
//d='+(s.colorDepth?s.colorDepth:s.pixelDepth)js=12
//js=13

//d.write('<a
//href="http://top.mail.ru/jump?from=304045"'+
//' target=_top><img src="http://top.list.ru/counter'+
//'?id=304045;t=160;js='+js+a+';rand='+Math.random()+
//'"alt="Рейтинг@Mail.ru"'+' border=0 height=40 width=88></a>')
//if(js>11)d.write('<'+'!--
//')


d=document;a='';a+=';r='+escape(d.referrer)
js=10
a+=';j='+navigator.javaEnabled()
js=11
s=screen;a+=';s='+s.width+'*'+s.height
a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth)
js=12
js=13
d.write('<a href="http://top.mail.ru/jump?from=304045"'+
' target=_top><img src="http://top.list.ru/counter'+
'?id=304045;t=160;js='+js+a+';rand='+Math.random()+
'" alt="Рейтинг@Mail.ru"'+' border=0 height=40 width=88></a>')
if(js>11)d.write('<'+'!-- ')
if(js>11)d.write('--'+'>')

}
function ShowBottom(RootPath, NoSpy)
///////////////////////////////////////////////////////////////////////////
{
document.write("<TABLE WIDTH='100%'   >                ");
document.write("  <TR>                                 ");
document.write("    <TD ALIGN='LEFT' VALIGN='BOTTOM' WIDTH=88>         ");
document.write("      <SCRIPT language='JavaScript'>   ");
if (NoSpy==0)  document.write("        ShowSpyLogButton()             ");

document.write("      </SCRIPT>                        ");
document.write("    </TD>                              ");
document.write("    <TD ALIGN= 'CENTER'>               ");
document.write("      <SCRIPT language='JavaScript'>   ");
document.write("        ShowHorisontal('"+RootPath+"') ");
document.write("      </SCRIPT>                        ");
document.write("    </TD>                              ");
document.write("    <TD ALIGN='RIGHT' WIDTH=88 >   ");

document.write("      <SCRIPT language='JavaScript'>   ");
if (NoSpy==0) document.write("        ShowMailListButton() ");
document.write("      </SCRIPT>                     ");

document.write("                                       ");
document.write("    </TD>                              ");
document.write("  </TR>                                ");
document.write("</TABLE>                               ");

}
