function featuredBooks()
{
  book1 = new books();
  book1.init(
  {
    xmlPath : "/books/data/featuredBooks.xml",
    delay : 1500, // time in ms
    bookID : "#books1",
    scrollID : 1
  });
}

function featuredJournals()
{
  book2 = new books();
  book2.init(
  {
    xmlPath : "/journals/data/featuredJournals.xml",
    delay : 1500, // time in ms
    bookID : "#books2",
    scrollID : 2
  });
}

function cdcSection()
{
  var div = document.getElementById( "opener" );
  clean( div );

  if ( ++index >= sections.length ) index = 0;

  var image = document.createElement( "img" );
  image.className = "cdcHomepageImage";
  image.src = sections[index].image;
  div.appendChild( image );

  var child = document.createElement( "div" );
  child.className = "text";
  child.innerHTML = sections[index].description;
  div.appendChild( child );

  var clear = document.createElement( "div" );
  div.className = clear;
  div.appendChild( clear );
}

function clean( parent )
{
  if ( parent.hasChildNodes() )
  {
    while ( parent.childNodes.length >= 1 )
    {
      parent.removeChild( parent.firstChild );
    }
  }
}

