<!-- Other browser
// *******************************************************************************
// (C) Aiki Innovations Inc 2000.  Permission is granted to reuse and distribute
//     for commercial or personal use. Removal of this copyright notice is not
//     allowed and restricted. This source code may not be directly sold without
//     the approval of Aiki Innovations Inc. Email us at: aikiinc@aikiinc.com.
//     Please add a link back to our site: http://www.aikiinc.com/pgJavaScript.html.
//     However, this is not mandantory.
// Source:       banners.js
// Author:       Phillip Jahmani Chauvet
// Created:      05/23/2000 - 09/06/2000
// Process:      Generate Random banners
// Description:  Create a Random banner displayer
// Modifined:
//  09/06/2000   Add the Sign our guest book logo
// ********************************************************************************

 //*******  Third tier functions ************************

function dbgMsg(message, on) {
	if (on)
		alert("\n" + message);
}

function getRandNumber() {
		//Get a random number based on the time
		//inflow: Date
		//outflow: randNumber (0-9)
	today=new Date();
	timeMilSecond=today.getTime();
	theTime="" + timeMilSecond;
	randNumber=theTime.charAt((theTime.length - 2));
	return randNumber;
}

 //*******  Banner Functions ************************

function bannerRecords(num) {
	//The banner record
	//inflow: num - The number of records
    	//outflow: length - The number of records
	//         description - The description for the banner
	//         image - The banner's image
	//         url - The url for the banner
	this.length = num;
	this.description = new Array(length);
	this.image = new Array(length);
	this.url = new Array(length);
		//create the banner records
	this.crtRecord = crtbannerRecords;
}

function crtbannerRecords() {
	//Create the banner data
	//inflow: bannerRecord
	//outflow: nothing
		//The banner descriptions
	this.description[0]="We do JavaScript.";
	this.description[1]="We develop Websites.";
	this.description[2]="See our services.";
	this.description[3]="Sign our Guest Book and send your comments";
	this.description[4]="See our price.";
	this.description[5]="Sign our Guest Book and send your comments";
	this.description[6]="We develop Websites.";
	this.description[7]="Sign our Guest Book and send your comments";
	this.description[8]="See our Affiliates and Partners.";
	this.description[9]="We do SilverStream";
		//The banner image
	this.image[0]="Samples/Graphics/AikiBan0.gif";
	this.image[1]="Samples/Graphics/AikiBan1.gif";
	this.image[2]="Samples/Graphics/AikiBan2.gif";
	this.image[3]="Samples/Graphics/Signin.gif";
	this.image[4]="Samples/Graphics/AikiBan4.jpg";
	this.image[5]="Samples/Graphics/Signin.gif";
	this.image[6]="Samples/Graphics/AikiBan6.jpg";
	this.image[7]="Samples/Graphics/AikiBan7.jpg";
	this.image[8]="Samples/Graphics/Signin.gif";
	this.image[9]="Samples/Graphics/AikiBan9.jpg";
		//The banner url
	this.url[0]="pgJavaScript.html";
	this.url[1]="pgWebsite.html";
	this.url[2]="pgService.html";
	this.url[3]="pginsGuest.html";
	this.url[4]="pgPrice.html";
	this.url[5]="pginsGuest.html";
	this.url[6]="pgWebsite.html";
	this.url[7]="pgWebsite.html";
	this.url[8]="pginsGuest.html";
	this.url[9]="pgSilver.html";
}

booglebanner =
 "<script type=\"text/javascript\">\n"  +
 "<!--\n"  +
 "google_ad_client = \"pub-3202812869008232\";\n"  +
 "google_ad_width = 468\n"  +
 "google_ad_height = 60;\n"  +
 "google_ad_format = \"468x60_as\";\n"  +
 "google_ad_type = \"image\";\n"  +
 "//2007-04-19: http://www.aikiinc.com\n"  +
 "google_ad_channel = \"1903013741\";\n"  +
 "google_color_border = \"C3D9FF\";\n"  +
 "google_color_bg = \"C3D9FF\";\n"  +
 "google_color_link = \"000000\";\n"  +
 "google_color_text = \"000033\";\n"  +
 "google_color_url = \"000000\";\n"  +
 "//-->\n"  +
 "</script>\n"  +
 "<script type=\"text/javascript\"\n"  +
 "  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n"  +
 "</script>    \n"  +
 "";

booglebannertext=
 "<script type=\"text/javascript\"><!--\n"  +
 "google_ad_client = \"pub-3202812869008232\";\n"  +
 "google_ad_width = 468;\n"  +
 "google_ad_height = 60;\n"  +
 "google_ad_format = \"468x60_as\";\n"  +
 "google_ad_type = \"text\";\n"  +
 "//2007-04-19: http://www.aikiinc.com\n"  +
 "google_ad_channel = \"1903013741\";\n"  +
 "google_color_border = \"ffffff\";\n"  +
 "google_color_bg = \"ffffff\";\n"  +
 "google_color_link = \"0000ff\";\n"  +
 "google_color_text = \"0000ff\";\n"  +
 "google_color_url = \"0000ff\";\n"  +
 "//-->\n"  +
 "</script>\n"  +
 "<script type=\"text/javascript\"\n"  +
 "  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n"  +
 "</script>\n";


function dspRandomBanner() {
        //Display a banner based on a random number
        //inflow: banner, randNumber, bnrCount
        //outflow: window.document.AikiBanner.src

    banNumber=getRandNumber();
    if (banNumber > bnrCount)
            banNumber = 0;

    //window.document.AikiBanner.alt = banner.description[banNumber];
    //window.document.AikiBanner.src = banner.image[banNumber];
    //setTimeout("dspRandomBanner()", timeSpread);

}


function dspRandomBannerX() {
        //Display a banner based on a random number
        //inflow: banner, randNumber, bnrCount
        //outflow: window.document.AikiBanner.src

    banNumber=getRandNumber();

    if (banNumber > bnrCount)
            banNumber = 0;

            //Display the banner at the IMG tag name AikiBanner
    window.document.AikiBanner.alt = banner.description[banNumber];
    window.document.AikiBanner.src = banner.image[banNumber];
            //Display a banner every (timeSpread) seconds
    setTimeout("dspRandomBanner()", timeSpread);
}

function runBanner() {
	//Go and executue the banner URL
	//inflow: banner, banNumber
	//outflow: location
	location = banner.url[banNumber];
}

	//***************   BEGIN ***********
	//Create the banner records
	//Display the banners at the IMG tag name AikiBanner

var bnrCount = 9;				//Number of banners
var timeSpread = 5000;			//Time between next banner display
var banNumber;					//Current banner to execute
var banner = new bannerRecords(bnrCount);
banner.crtRecord();


// Other browser -->
