// bannerdisplay.js//// © 2001 Berky Information Teknologies, Inc.,  All Rights Reserved//// This script may not be used or distributed without the expres permission of// Berky Information Teknologies, Inc.  Contact dave@berkyinfotek.com.// // This JavaScript file creates HTML code for a linked banner.  The banner to display is randomly generated.// This script file must be modified to identify the information for each banner to be displayed.//// Insert code into an HTML page as://    <SCRIPT src="bannerdisplay.js"></SCRIPT>//   ...//   <SCRIPT language="JavaScript">//   <!-- Hide//   writeBanner();//   // Unhide -->//   </SCRIPT>function objBanner (imgsrc, imgalt, imgborder, linkurl, linktarget, descr, comment, moreurl) {// This function creates the banner object and sets the properties.   this.imgsrc = imgsrc;   this.imgalt = imgalt;   this.imgborder = imgborder;   this.linkurl = linkurl;   this.linktarget = linktarget;   this.descr = descr;   this.comment = comment;   this.moreurl = moreurl;}function writeBanner(subdir){// This function generates a random number, creates the banner array and inserts the banner HTML code.// Determine if a subdir string was passed in (ex. "../" for calls from a subdir of the normal location)   var cSubDir = (typeof subdir == "string") ? subdir : "" ;// Identify the number of banners to be randomly displayed.   var nBanners = 8;// Generate the random number between 0 and the number of banners (minus 1)   var nSelectedBanner = Math.round(Math.random()*(nBanners-1));// Create the array of banners.   var aBanners = new Array(nBanners);// Create each banner object and assign it to an array element.  (array elements start with 0)// Function objBanner Parameters: //   1) Image file URL//   2) Image file "alt" text (displayed if image file is unavailable or graphics are turned off)//   3) Image border thickness (0 or 1 are most common)//   4) Link URL (location to navagate to when banner image is clicked)//   5) Link target ("_self" - display Link URL in current window, "_blank" - display Link URL in new window)//   6) Descripton text for the product//   7) Comment text (will be italicized)//   8) More URL (for the "more" link)//// The final HTML code should look like:////<table width="85%" align=center cellspacing=0 cellpadding=1 bgcolor=black><tr><td>//  <table width="100%" align=center cellspacing=0 callpadding=0 bgcolor=white><tr><td bgcolor=black>//    <center><A HREF="http://www.amazon.com/exec/obidos/redirect-home/berkyinformation">//    <img src="images/amazonlogo.gif" border=0></a></center>//    </td></tr>//    <tr><td align=center><font face="Verdana" size="1">//     <b>Required Reading</b><br>//     <img src="images/1892547112mfmoneyguide.jpg" border=0 vspace=10><br>//     500 questions & answers on almost all personal finance topics. Lists 100s of additional resources for each topic.<br><br>//     <I>"The best book on general personal finance topics I have ever read!"</I><br><br>//     <a href="book.html#moneyguide">more info</a>&nbsp;&nbsp;&nbsp;//     <a href="http://www.amazon.com/exec/obidos/redirect-home/berkyinformation">order now</a><br><br>//    </font>//    </td></tr></table>//</td></tr></table>//// Delete or add any groups of the following "aBanner[x]..." code as needed.aBanners[0] = new objBanner(  cSubDir+"images/1892547112mfmoneyguide.jpg",  "Money Guide",  "1",  "http://www.amazon.com/exec/obidos/ASIN/1892547112/berkyinformation",  "_blank",  "500 questions & answers on almost all personal finance topics.  Excellent practical advice and numerous tips.",  '"The best book on general personal finance topics I have ever read!"',  cSubDir+"books/requiredreading.html#1892547112");aBanners[1] = new objBanner(  cSubDir+"images/0964385627cashflowquad.jpg",  "Cashflow Quadrant",  "1",  "http://www.amazon.com/exec/obidos/ASIN/0446677477/berkyinformation",  "_blank",  "Learn where your money comes from and how that affects your economic level.  Change the source of your money and start building wealth.",  '"Now I understand why I am not getting where I want to go.  By changing the source of my money I can change my life!"',  cSubDir+"books/requiredreading.html#0446677477");aBanners[2] = new objBanner(  cSubDir+"images/0964385619richdadpoordad.jpg",  "Rich Dad, Poor Dad",  "1",  "http://www.amazon.com/exec/obidos/ASIN/0446677450/berkyinformation",  "_blank",  "Change your outlook on money and wealth.  What is a real &quot;asset&quot;?  Learn how you choose your economic status and how you can change it.",  '"This book has changed my life!  I now see what I have been doing wrong and what I need to do to get on the right path to wealth."',  cSubDir+"books/requiredreading.html#0446677450");aBanners[3] = new objBanner(  cSubDir+"images/0671015206millionairenextdoor.gif",  "The Millionaire Next Door",  "1",  "http://www.amazon.com/exec/obidos/ASIN/0671015206/berkyinformation",  "_blank",  "Learn the secret of over 90% of America's millionaires.  How did they achieve such staggering wealth and how you can to!",  '"I cant belive it!  I always figured they just inherited it.  I now realize that I too can easily become a millionarie."',  cSubDir+"books/requiredreading.html#0671015206");aBanners[4] = new objBanner(  cSubDir+"images/0451165209richestmanbabylon.jpg",  "The Richest Man in Babylon",  "1",  "http://www.amazon.com/exec/obidos/ASIN/0451165209/berkyinformation",  "_blank",  "Learn the secrets of accumulating vast wealth.  Anyone can do it!  Find out how.",  '"Its so easy even I can do it.  Just read the book and start today!"',  cSubDir+"books/requiredreading.html#0451165209");aBanners[5] = new objBanner(  cSubDir+"images/0449214923thinkgrowrich.jpg",  "Think & Grow Rich",  "1",  "http://www.amazon.com/exec/obidos/ASIN/0449214923/berkyinformation",  "_blank",  "Learn how to use your mind to create riches.  Anyone can do it with the right attitude and mental state.",  '"Change your outlook on money.  Wealth is where you create it."',  cSubDir+"books/requiredreading.html#0449214923");aBanners[6] = new objBanner(  cSubDir+"images/0671708635-7habits.gif",  "The 7 Habits of Highly Effective People",  "1",  "http://www.amazon.com/exec/obidos/ASIN/0671708635/berkyinformation",  "_blank",  "Learn how the successful do it.  This simple 7 step formula will build success in you.",  '"These are not hard to do.  You just have to prioritize and start today.  Anyone can do that!"',  cSubDir+"books/requiredreading.html#0671708635");aBanners[7] = new objBanner(  cSubDir+"images/055327757x-greatestsalesman.jpg",  "The Greatest Salesman in the World",  "1",  "http://www.amazon.com/exec/obidos/ASIN/055327757x/berkyinformation",  "_blank",  "Learn the master techniques of selling anything to anyone.  Everyone needs to learn these principles.",  '"Everyone sells and everyone needs to know the techniques taught in this classic book."',  cSubDir+"books/requiredreading.html#055327757x");// Compile and write the HTML code for the banner.   var cHTML   = '<table width="85%" align=center cellspacing=0 cellpadding=1 border=0 bgcolor=black><tr><td>';   cHTML = cHTML+'<table width="100%" align=center cellspacing=0 callpadding=0 border=0 bgcolor=white><tr><td bgcolor=black>';   cHTML = cHTML+'<center><A HREF="http://www.amazon.com/exec/obidos/redirect-home/berkyinformation">';   cHTML = cHTML+'<img src="'+cSubDir+'images/amazonlogo.gif" border=0></a></center>';   cHTML = cHTML+'</td></tr>';   cHTML = cHTML+'<tr><td align=center><font face="Verdana" size="1">';   cHTML = cHTML+'<b>Required Reading</b><br>';   cHTML = cHTML+'<a href="'+aBanners[nSelectedBanner].linkurl+'" target="'+aBanners[nSelectedBanner].linktarget+'">';   cHTML = cHTML+'<img src="'+aBanners[nSelectedBanner].imgsrc+'" vspace=10 ';   cHTML = cHTML+'alt="'+aBanners[nSelectedBanner].imgalt+'" border='+aBanners[nSelectedBanner].imgborder+'></A><br>';   cHTML = cHTML+aBanners[nSelectedBanner].descr+'<br><br>';   cHTML = cHTML+'<i>'+aBanners[nSelectedBanner].comment+'</i><br><br>';   cHTML = cHTML+'<a href="'+aBanners[nSelectedBanner].moreurl+'">more info</a>&nbsp;&nbsp;&nbsp;';   cHTML = cHTML+'<a href="'+aBanners[nSelectedBanner].linkurl+'" target="'+aBanners[nSelectedBanner].linktarget+'">';   cHTML = cHTML+'order now</a><br><br>';   cHTML = cHTML+'</font>';   cHTML = cHTML+'</td></tr></table>';   cHTML = cHTML+'</td></tr></table>';   document.writeln(cHTML);}