function dw(str)
{
	document.write(str);
}

function WriteSeriesInTitle(Series)
{
dw('');
dw('    <p class="TitlesSerieHeader">'+Series+'</p>');
}

function WriteGenreInTitle(Genre,GenreFolderName,WriterFileOnDrive,bIsCurrent)
{
dw('<td width="20%" class="TitlesGenreCell">');
if (bIsCurrent) dw('<p class="TitlesGenreText">'+Genre+'</p>');
else dw('<a href="../'+GenreFolderName+'/'+WriterFileOnDrive+'.html" class="TitlesGenreLink">'+Genre+'</a>');

dw('</td>');
}

function WriteBeginGenreInTitle()
{
dw('<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>');
}

function WriteEndGenreInTitle()
{
dw('</tr></table>');
}

function WriteAuthorInTitle(Author)
{
dw('<p class="TitlesAuthorHeader">'+Author+'</p>');
}

function BeginSeriesInTitle()
{
dw('    <table border="0" width="100%" cellspacing="0" cellpadding="0">');
}

function WritePostScriptumInTitle()
{
dw('<br>');
dw('<p class="TitlesPostScriptum"><br><br><br>Все тексты в библиотеке представлены с целью ознакомления<br>Любое коммерческое использование текстов запрещено<br>В случае нарушения авторских прав ответственность несёт<br>библиотека, незаконно хранящая тексты в свободном доступе</p>');
}

function WriteTitleInGenre(Genre)
{
dw('');
dw('<br>');
dw('     <p class="AuthorsGenreHeader">'+Genre+'</p>');
}

function BeginAuthorsListInGenre()
{
dw('    <center>');
dw('    <table border="0" cellspacing="0" cellpadding="0" class="AuthorsListTable">');
}

function EndAuthorsListInGenre()
{
dw('    </table>');
}

function BeginInfoPage()
{
dw('    <center>');
dw('    <table border="1" width="100%" cellspacing="1"  cellpadding="2" class="WelcomeTable">');
}

function EndInfoPage()
{
dw('    </table>');
}

function BeginHomePage()
{
dw('    <center>');
dw('    <table border="1" width="100%" cellspacing="1"  cellpadding="2" class="WelcomeTable">');
}

function EndHomePage()
{
dw('    </table>');
}

function WriteNewTitlesDate(strDate)
{
dw('     <p class="NewTitlesDate">'+strDate+'</p>');
}

function WriteNewTitlesGenre(strGenre,strGenreLink)
{
dw('     <center><br><a href="'+strGenreLink+'" class="NewTitlesGenre" title="Перейти в раздел">'+strGenre+'</a></center><br>');
}

function WriteNewTitlesTitle(strDate,strCover,strAnnotation,strTitleID,strAuthor,strAuthorLink,intSeriesID,strSeriesTitle,strTitle,strTitleLink,strDownloadLink)
{
bIsRead = (strTitleLink != '');
bIsDownload = (strDownloadLink != '');
bIsCover = (strCover != '');
bIsAnnotation = (strAnnotation != '');
bIsSeries = (intSeriesID > 50);
dw('&nbsp;&nbsp;&nbsp;');
dw('<a class="NewTitle" href="title.php?t='+strTitleID+'" title="Перейти на страницу книги">');
dw('<em>'+strDate+'</em><br>');
if (bIsCover)
  dw('<noindex><img src="'+strCover+'" class="leftimg"></noindex>');
dw('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><big>'+strAuthor+' - '+strTitle);
if (bIsSeries) dw(' ('+strSeriesTitle+')');
dw('</big>  </strong><br>');
if (bIsAnnotation)
  {
    dw(strAnnotation);
  };
dw('</a>');
dw('<br>');
}

function CreateNavigationMenu()
{
dw('<p align="center">');

Pages = 2;
Rand = Math.ceil(Pages*Math.random());

dw('<noindex><span class="Link" onclick=window.open("http://roleplay.lainurol.com")><img src="http://nautlib.ru/lainurol/rpgbanner.jpg" title="Игровой мир Lainurol" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');

if (Rand == 1)
{
dw('<noindex><span class="Link" onclick=window.open("http://www.cimmeria.ru")><img src="http://www.cimmeria.ru/knopka.jpg" title="Киммерия - электронная библиотека героического фэнтези" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://lib.aldebaran.ru")><img src="http://nautlib.ru/images/aldeb.jpg" title="Альдебаран - сетевая библиотека" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://book-world.narod.ru")><img src="http://book-world.narod.ru/baners/baner88_31.gif" title="Библиотека Мир Книг" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://www.maryland.ru")><img src="http://www.maryland.ru/pics/maryland.gif" width=88 height=31 border=0 title="MaryLAND" title="The MaryLAND. On-line Strategiс Game"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://bestbooks.ru")><img src="http://bestbooks.ru/Images/bb88x31.gif" title="Best Book\'s - он-лайн библиотека популярных книг" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://www.fenzin.org")><img src="http://www.fenzin.org/images/fenzin.gif" title="Фензин - сайт фантастики и фэнтези" border="0" width="88" height="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://allbooks.com.ua")><img src=http://allbooks.com.ua/baners/banner88x31.gif border=0 title=\'Библиотека "Все книги"\'></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://book.pp.ru")><img src="http://nautlib.ru/images/biblionet.gif" title="OCR Библио Net" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://www.borisba.com/litlib/cbibl_.html")><img src="http://nautlib.ru/images/berdich.gif" title="Литературная библиотека Бориса Бердичевского" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://smallweb.ru/library/index.htm")><img src="http://nautlib.ru/images/smallweb.gif" title="Маленькая Паутинка" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://stratford.narod.ru/index.html")><img src="http://stratford.narod.ru/banner.gif" border=0 title=\'Кто такой Шекспир?\'></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://lib.obninsk.org")><img src="http://lib.obninsk.org/findbook.gif" title="Поиск Электронных Книг" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');
};

if (Rand == 2)
{
dw('<noindex><span class="Link" onclick=window.open("http://lib.ru")><img src="http://nautlib.ru/images/moshkow.gif" title="Библиотека Мошкова" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://bestlibrary.ru")><img src="http://nautlib.ru/images/bestlibrary.gif" title="Онлайн-библиотека BestLibrary" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://smallweb.ru/library/index.htm")><img src="http://nautlib.ru/images/smallweb.gif" title="Маленькая Паутинка" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://ff.lame.ru")><img src="http://www.lame.ru/fant/images/catalogff3.gif" border="0" width="88" height="31" title="Каталог фантастики и фэнтези"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://rt.gena.lib.ru/?AdvertSrc=Noutilus")><img src="http://nautlib.ru/images/genas_library_88x31.gif" title="Gena\'s Library" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://www.maryland.ru")><img src="http://www.maryland.ru/pics/maryland.gif" width=88 height=31 border=0 title="MaryLAND" title="The MaryLAND. On-line Strategiс Game"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://artefact.lib.ru")><img src="http://artefact.lib.ru/artefact.gif" title="Библиотека «Артефакт»" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://lib.obninsk.org")><img src="http://lib.obninsk.org/findbook.gif" title="Поиск Электронных Книг" border="0" WIDTH="88" HEIGHT="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://vision.dyns.net")><img src="http://nautlib.ru/images/another.gif" title="Another\'s Vision" border="0" WIDTH="88" HEIGHT="31"></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://www.fenzin.org")><img src="http://www.fenzin.org/images/fenzin.gif" title="Фензин - сайт фантастики и фэнтези" border="0" width="88" height="31"></span></noindex><br>');
dw('<noindex><span class="Link" onclick=window.open("http://stratford.narod.ru/index.html")><img src="http://stratford.narod.ru/banner.gif" border=0 title=\'Кто такой Шекспир?\'></span></noindex>');
dw('<noindex><span class="Link" onclick=window.open("http://allbooks.com.ua")><img src=http://allbooks.com.ua/baners/banner88x31.gif title=\'Библиотека "Все книги"\' border=0></span></noindex><br>');
};
dw('<br>');
dw('</p>');
}
