// Library page operations

// presents title; append word library if missing
function lInsertTitle()
{
   document.write('<br><span tabIndex="0"><strong><font face="' + cGeneralFont + '" size="6">' + lTitle + '</font></strong></span><br>');
   if( ( lDesc != null ) && ( lDesc != "" ) )
   {
     document.write('<br><span tabIndex="0"><font face="' + cGeneralFont + '" size="3">' + lDesc + '</font></span><br>');
   }
   else
   {
     document.write('<br><span><font face="' + cGeneralFont + '" size="3">' + '</font></span><br>');
   }
}

// standard header style on the library page
function toLibraryHeader(text, aurl)
{
   var result = "";
   if (isAssigned(aurl))
   {
     result = '<a href="' + aurl.toString() + '" tabIndex="0"><span><strong><font face="' + cGeneralFont + '" size="3">' + text + '</font></strong></span></a>';
   }
   else
   {
     result = '<span tabIndex="0"><strong><font face="' + cGeneralFont + '" size="3" style="text-decoration: underline;">' + text + '</font></strong></span>';
   }
   return result;
}

// normal text style on the library page
function toLibraryNormal(text)
{
   return '<span tabIndex="0"><font face="' + cGeneralFont + '" size="2">' + text + '</font></span>';
}

// inserts page items 
function lInsertItems()
{ 
   if (HasInstance(lTitles) && HasInstance(lDescs) && (lDescs.length == lTitles.length))
   {
      document.write('<table border="0" cellpadding="0" cellspacing="16">');
      for (var i = 0; i < lTitles.length; i++)
      {
         document.write('<tr><td align="center">');
         document.write('<a title="' + getString("rJS_Common_Str_01") + ': ' + lTitles[i] + '" href="' + lUrls[i] + '">');
         document.write('<img src="images/book.gif" border="0" alt="' + getString("rJS_Common_Str_01") + ': ' + lTitles[i] + '"></a>');
         document.write('</td>');
         document.write('<td align="center">' + toLibraryHeader(lTitles[i], lUrls[i]) + '<br>');
         document.write(toLibraryNormal(lDescs[i]));
         document.write('</td></tr>');
      }
      document.write('</table>');
   }
}

// presents footer
function lInsertPublishedDate()
{
   document.write('<br>' + toPublishedDate(lPublished) + '<br>');
}

