var AMAZON_PRODUCT_LINK = 'http://www.amazon.com/gp/product/';
var AMAZON_IMAGE_BASE   = 'http://www.amazon.com/gp/product/images/';  // Where we go to manually derive the image index.
var AMAZON_IMAGE_LINK   = 'http://ecx.images-amazon.com/images/I/';
var ALT_IMAGE_LINK      = 'images/no_image_available.jpg';

var bookTitle = new Array();
var bookType  = new Array();
var bookIndex = new Array();
var bookDesc  = new Array();
var imageLink = new Array();
var siteLink  = new Array();
var videoLink = new Array();

// -----------------------------------------------------
// NO CHANGES ABOVE THIS LINE, EXCEPT BY WEB PROGRAMMER.
// -----------------------------------------------------

// -----------------------------------------------------------------------------------------------------------
// NOTE: When adding anything within the single-quoted areas, if your text includes an apostrophe -- which is
//       the same as a single quote -- you must insert a backslash (\) in front of it (e.g. \').  Otherwise
//       it will be mistakened for the end of the string, causing the webpage to display incorrectly.
// -----------------------------------------------------------------------------------------------------------

// -----------------------------------------------------------------------------------------
// Titles are listed and numbered sequentially in the order in which we want them to appear.
// Fiction and non-fiction titles appear on separate webpages, but may be intermixed below.
// -----------------------------------------------------------------------------------------

bookTitle[0] = 'To Christopher: From A Father To His Son';
bookType[0]  = 'nonfiction';
bookIndex[0] = '0595204546';
imageLink[0] = '41GRQUM72TL._SS500_.jpg';
bookDesc[0]  = 'Under the guise of a book to my adolescent son, I\'ve written one for adults. It guides the reader on a journey through the values, hopes and promises of the last three generations. Through personal experiences, teaching stories, and the social and cultural history of the last 100 years, I discuss with Christopher the values we must hold for the future and why we are here. I hoped that the book may act as both sage words for the reader and a valuable guide to Christopher as he grows up.';

bookTitle[1] = 'Launching Your Yahoo! Business';
bookType[1]  = 'nonfiction';
bookIndex[1] = '0789735334';
imageLink[1] = '51Y7BWjvyAL._SS500_.jpg';
bookDesc[1]  = 'You\'ve made the decision to take your business online, but where do you go from here?  Launching Your Yahoo! Business helps you do everything from creating a business plan to using basic marketing strategies to promote your business to managing a Yahoo! store. It also includes tips and warnings on how to avoid common pitfalls, as well as terms and directions to web resources for additional information. This book will show you how to put the "e" in e-commerce with a successful Yahoo! store.';

bookTitle[2] = 'Succeeding At Your Yahoo! Business';
bookType[2]  = 'nonfiction';
bookIndex[2] = '0789735342';
imageLink[2] = '51j-6I7ietL._SS500_.jpg';
bookDesc[2]  = '<i>Succeeding At Your Yahoo! Business</i> teaches you how to customize a Yahoo! Store using the basic elements of the popular web design program Dreamweaver, including architecting an eCommerce web site. It then takes three different types of Yahoo! Stores and deconstructs them, showing you how they are formed and how they sell the products or services they offer. There is also an entire section on how to position a Yahoo! Store, acquire customers, and retain those customers. Finally, the book will show you how to set up the necessary accounting and operations systems, and how to hire the staff necessary to successfully run your business.';

bookTitle[3] = 'Write a Business Plan In No Time';
bookType[3]  = 'nonfiction';
bookIndex[3] = '0789733722';
imageLink[3] = '51YN6PMDZXL._SS500_.jpg';
bookDesc[3]  = 'How many times have you thought about opening your own business? Is it a bakery to sell your delicious apple pies? Or maybe a financial consulting firm to help people safely invest their money? Or even an indulgent day-spa? The idea is great, but if you\'re like most would-be entrepreneurs, you know that going from thinking to doing takes more time than you may have. Writing a business plan is the important, and intimidating, first step to starting your own business, and now there is a comprehensive source on the subject that can teach you how to write your plan the fast, simple and easy way. <i>Write a Business Plan In No Time</i> is the working entrepreneur\'s answer to giving ideas life. Entrepreneur, businessman and author <b>Frank Fiore</b> walks you through writing a business plan step-by-step using easy-to-follow to-do lists. He\'ll help you determine the type of plan you need, what the various pieces of the plan should be and how to avoid common mistakes while writing your plan. Learn from the included sample business plans that illustrate the best language to use and approach to take depending on the purpose of the plan. You\'ll also be able to download worksheets, to-do lists and other helpful information from the book\'s website. With the help of <i>Write a Business Plan In No Time</i>, you will start to make your dream a reality.';

bookTitle[4] = '2005 Online Shopping Directory For Dummies';
bookType[4]  = 'nonfiction';
bookIndex[4] = '0764574957';
imageLink[4] = '51JRS7G87HL._SS500_.jpg';
bookDesc[4]  = '* Shopping on the Web is increasing at a phenomenal rate, making this book a priceless tool for readers who want an online shopping experience that\'s fun, easy, secure, and saves both time and money<br />* Each site is rated by price, selection, service, convenience, and security, and extensive indices make it easy to find products by company name, product name, keywords, or URL<br />* Easy to use and read, this book provides descriptions of more than 1,500 of the best online shopping sites, grouped in useful categories such as apparel, computers and consumer electronics, home, garden, and food<br />* Includes sidebars on specialized shopping topics such as buying a car online, planning a wedding on the Web, and arranging dinner for two online<br />* Features a special section on purchasing services on the Web-everything from plumbing help to limousine services<br />* A unique "Trading With the Natives" section discusses online auction sites (including eBay) and classified ad sites<br />* Written and researched by Frank Fiore, the expert online shopping columnist at About.com';

bookTitle[5] = 'The Complete Idiot\'s Guide to Starting an Online Business';
bookType[5]  = 'nonfiction';
bookIndex[5] = '0789721937';
imageLink[5] = '51ZG20RW59L._SS500_.jpg';
bookDesc[5]  = 'The Complete Idiot\'s Guide to Starting an Online Business shows why and how to establish company Web sites and Intranets. It speaks specifically to the idea of distributed information as capital and how to use the Web and Web technologies to positively impact revenues. See how to set objectives, create strategies, and implement programs for Web-related communications that will impact your company\'s marketing, sales and financial activities. Learn to manage a Web site and maximize the use of information gleaned from an online presence. Also included: an overview of E-commerce, explanations of various Web software tools, the basics of Web design and how to set up a company Intranet.';

bookTitle[6] = 'e-Marketing Strategies';
bookType[6]  = 'nonfiction';
bookIndex[6] = '0789724758';
imageLink[6] = '41X2W8TNV0L._SS500_.jpg';
bookDesc[6]  = 'Selling anything, anywhere, anyway, anytime, and at any price will be the norm of doing business on the Net. To do that, businesses will have to understand the new \'Rules of the Road\' that apply to e-marketing. This book will give those responsible for creating marketing strategies for their e-business an understanding of how to position, price and promote their company to online consumers within the changing nature of the Internet. e-Marketing Strategies is the first book to cover all cutting-edge aspects and give a complete overview of e-marketing including: dynamic pricing, shopping bots, and wireless purchasing.';

bookTitle[7] = 'Successful Affiliate Marketing for Merchants';
bookType[7]  = 'nonfiction';
bookIndex[7] = '0789725258';
imageLink[7] = '51S9F70GV7L._SS500_.jpg';
bookDesc[7]  = 'If you\'re an online business, instead of paying for an ad, like a banner, you pay for the result the sale. This is called affiliate marketing. Pay for Performance will show anyone conducting business online, how to plan, implement, and manage a successful affiliate marketing program. The reader will find valuable Web resources such as tracking software and contract templates with the guidance of this book. There will also be direction for the reader to focus the content and develop the right affiliate model for the type of business. It will also provide case studies of successful programs as well as failures and scams to demonstrate and teach the lessons of building a successful program.';

bookTitle[8] = 'TechTV\'s Starting an Online Business';
bookType[8]  = 'nonfiction';
bookIndex[8] = '0789725649';
imageLink[8] = '518F5PM7TJL._SS500_.jpg';
bookDesc[8]  = 'Author Frank Fiore gives the reader a foundation for starting an online business. The book is divided into 5 parts. It starts with an explanation of e-commerce, what to sell, how to sell it, how to plan it and where to find the money to fund it. Then it gives the reader the basics of setting up shop on the Web, where to host it, some e-commerce Dos and Don\'ts, and how to take orders and ship them. Finally, it will cover the essentials of marketing and promoting their new business. The book is organized in such a way that the reader can quickly find a topic and get the information they need to set up their own online business.';

bookTitle[9] = 'Dr. Livingstone\'s Online Shopping Safari Guidebook';
bookType[9]  = 'nonfiction';
bookIndex[9] = '1885068077';
imageLink[9] = 'images/Livingstone_cover.jpg';
bookDesc[9]  = 'You think you know shopping? It\'s one thing to know the malls and the bargain stores, but what about the vast frontier of online shopping? The bargains, the products, the services you can find there are truly spectacular. But then, just like in your local stores, the pitfalls and rip-offs can be spectacular, too. Worry not. Dr. Livingstone will guide you to some of the best shopping you\'ve ever done--for everything from clothes to electronics to food to professional services.';

bookTitle[10] = 'Cyberkill<br /><span style="font-size:0.7em; font-style:italic;">"How Far Would an Artificial Intelligence Go for Revenge?"</span>';
bookType[10]  = 'fiction';
bookIndex[10] = '';
imageLink[10] = 'images/cyberkill_cover.jpg';
bookDesc[10]  = 'A brilliant programmer, Travis Cole, inadvertently creates an artificial intelligence (AI) lives on the Internet. After Cole attempts to terminate his creation, it stalks his young daughter through cyberspace in an attempt to reach Cole to seek revenge. When cyber-terrorism events threaten the United States, they turn out to stem from the forsaken and bitter AI. In the final conflict, it seeks to kill Cole - even if it has to destroy all of humanity to do it.';
siteLink[10]  = 'http://www.cyberkill.frankfiore.com';
videoLink[10] = 'http://www.youtube.com/watch?v=V_lRs2gg1Vk';

bookTitle[11] = 'The Chronicles of Jeremy Nash<br />';
bookType[11]  = 'fiction';
bookIndex[11] = '';
imageLink[11] = 'images/Nash_still.jpg';
bookDesc[11]  = 'Combining the best of Indiana Jones, National Treasure and the X-Files, the Chronicles of Jeremy Nash © is a new continuing series featuring the skeptic and debunker Jeremy Nash ©. Each of the Nash chronicles in the series is a thriller that sends Nash on an investigation of a conspiracy theory, unsolved mystery, urban myth, New Age belief or paranormal practice. Though he doesn\'t believe in any of them, he is forced into pursuing them by threats to the lives of his family members, himself or his reputation.<br />&nbsp;<br />The thrilling formula of the chronicles forces Nash to pursue a series of clues and puzzles that he must solve; combined with an underlying real world threat of event, organization or persons that is somehow connected to what he is pursuing. All this makes for a good action/adventure read.';
siteLink[11]  = 'http://www.jeremynashonline.com';
videoLink[11] = 'http://video.google.com/videoplay?docid=1709708310403177461&ei=OfOWSumWDIKmrALhsKyRBw&q=Chronicles+of+Jeremy+Nash';


// -----------------------------------------------------
// NO CHANGES BELOW THIS LINE, EXCEPT BY WEB PROGRAMMER.
// -----------------------------------------------------

function lightLink(link)
{
  document.getElementById(link).style.backgroundImage = 'url(images/blue008light.jpg)';
}

function dimLink(link)
{
  document.getElementById(link).style.backgroundImage = 'url(images/blue008dark.jpg)';
}

function listBooks(booktype)
{
  var displayImage;
  var i;
  for (i=0; i<bookTitle.length; i++)
  {
    if (imageLink[i] == '')
    {
      displayImage = '"' + ALT_IMAGE_LINK + '" valign="bottom"';    // placeholder image
    }
    else if (imageLink[i].substr(0,7) == 'images/')
    {
      displayImage = '"' + imageLink[i] + '"';                      // local image
    }
    else
    {
      displayImage = '"' + AMAZON_IMAGE_LINK + imageLink[i] + '"';  // Amazon image
    }
    if (bookType[i] == booktype)
    {
      if (booktype == "fiction")
      {
        document.writeln('<tr>');
        document.writeln('  <td style="padding:10px;">');
        document.writeln('    <a class="alt" href="' + videoLink[i] + '" target=_blank><img style="float:left; border:1px solid #00f; margin:10px 15px;" src=' + displayImage + ' width="100" height="100" /></a>');
        document.writeln('    <div class="titletext1"><a class="alt" href="' + siteLink[i] + '" target=_blank>' + bookTitle[i] + '</a></div>');
        document.writeln('    <div class="subtext">' + bookDesc[i] + '</div>');
        document.writeln('  </td>');
        document.writeln('</tr>');
      }
      else
      {
        document.writeln('<tr>');
        document.writeln('  <td rowspan="2" width="260"><img src=' + displayImage + ' width="250" height="250" /></td>');
        document.writeln('  <td width="500">');
        document.writeln('    <div class="titletext">' + bookTitle[i] + '</div>');
        document.writeln('    <div class="subtext">' + bookDesc[i] + '</div>');
        document.writeln('  </td>');
        document.writeln('</tr>');
      }
      if (booktype != "fiction")
      {
        document.writeln('<tr>');
        document.writeln('  <td width="500">');
        document.writeln('    <div class="linktext">');
        if (bookIndex[i] != "")
        {
          document.writeln('      <a class="alt boxed" href="' + AMAZON_PRODUCT_LINK + bookIndex[i] + '" target=_blank>VIEW OR BUY!</a><br />');
        }
        else if (siteLink[i] != "" || videoLink[i] != "")
        {
          if (siteLink[i] != "")
          {
            document.writeln('      <a class="alt boxed" href="' + siteLink[i] + '" target=_blank>GO TO THE WEBSITE</a>');
          }
          if (videoLink[i] != "")
          {
            document.writeln('      <a class="alt boxed" href="' + videoLink[i] + '" target=_blank>WATCH THE TRAILER</a>');
          }
        }
        else
        {
          document.writeln('      <span class="boxed blue">WEBSITE LINK AVAILABLE SOON!</span>');
        }
        document.writeln('    </div>');
        document.writeln('  </td>');
        document.writeln('</tr>');
        document.writeln('<tr><td colspan="3" class="divider">&nbsp;</td></tr>');
      }
    }
  }
}