<!--



/*#########################################################################################

  # Author : Khaled Elmougey        Email : khaled@futurecompany.com                      #

  # Website: www.futurecompany.com  Title  : Banner Rotator                               # 

  # Version : 1.0.0   Date : December,25,98                                               #  

  # Version : 1.1.0   Date : Febuaray,17,2000                                             #                                             

  # Bugs   : I did not encounter any.                                                     #

  # compatibility: It has been tested with MSIE 4.0, 5.0 and Netscape 3.0, 4.0, 4.6.      #

  # Copyrights: you can copy and paste it in to your website as along as this copyright   #

  #             is intact, copyrights99,2000 arabflex.com all rights are reserved.        #

  # Comments:                                                                             #

  #    1) do not forget to put the <IMG SRC=""> tags in the body.                         #

  #    2) all images suppose to have the same length and width                            #                                

  #    3)Please do email me for any bugs you encounter.                                   #                                 

  #    4)You can set these variables:                                                     #                                  

  #      a) numberOfBanners: number of banners.                                           #                                  

  #      b) displaytime    : how long the banner will be displayed                        # 

  #      c) getBanner      : name of each banner                                          #

  #      d) getSiteUrl     : The site url, when you click the banner                      #                      

  #      e) imageWidth     : The width of the image                                       #

  #      f) imageHeight    : The height of the image                                      #

  #      g) dir            : the location of the images, if their is no dir leave it as ""#

  #      h) pages          : The pages that a specific banners will be displayed on       #

  #      i) banners0       : The banners that will be displayed on a specific page.       #

  #      j) rotate         : Set it to true to rotate all banners or false to display     #

  #                          a random banner.                                             #

  ##########################################################################################*/



var numberOfBanners = 61;

var pause       = 5000; 

var imageWidth  = 420;

var imageHeight = 90;

var dir         = "";

var rotate      = "true";



var getBanner  = new Array("http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad1.gif",
"http://www.usacerteddiamonds.com/banners/ad25.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad2.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad4.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad5.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad6.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad7.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad8.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad10.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad11.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad12.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad13.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad16.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad17.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad18.gif",
"http://www.usacerteddiamonds.com/banners/ad21.gif",
"http://www.usacerteddiamonds.com/banners/ad100.gif",
"http://www.usacerteddiamonds.com/banners/ad101.gif",
"http://www.usacerteddiamonds.com/banners/ad19.gif");



var getSiteUrl = new Array(numberOfBanners);  

getSiteUrl[0]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[1]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[2]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[3]  = "http://www.usacerteddiamonds.com/biggestbang.html";
getSiteUrl[4]  = "http://www.usacerteddiamonds.com/virtual_nyc.html";
getSiteUrl[5]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[6]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[7]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[8]  = "http://www.usacerteddiamonds.com/testimonials2/testimonials.html";
getSiteUrl[9]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[10]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[11]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[12]  = "http://www.1americandiamondcalculator.com";
getSiteUrl[13]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[14]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[15]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[16]  = "http://www.usacerteddiamonds.com/moissanite.html";
getSiteUrl[17]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[18]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[19]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[20]  = "http://www.usacerteddiamonds.com/000000.html";   
getSiteUrl[21]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[22]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[23]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[24]  = "http://www.usacerteddiamonds.com/inventory/todaysspecials.html";
getSiteUrl[25]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[26]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[27]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[28]  = "http://www.usacerteddiamonds.com/dbg_index.html";
getSiteUrl[29]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[30]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[31]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[32]  = "http://www.usacerteddiamonds.com/heartsandarrows.html";
getSiteUrl[33]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[34]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[35]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[36]  = "http://www.usacerteddiamonds.com/settings.html";
getSiteUrl[37]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[38]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[39]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[40]  = "http://www.usacerteddiamonds.com/freecertsearch.html";
getSiteUrl[41]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[42]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[43]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[44]  = "http://www.usacerteddiamonds.com/iknowexactly.html";
getSiteUrl[45]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[46]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[47]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[48]  = "http://www.usacerteddiamonds.com/donations.html";
getSiteUrl[49]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[50]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[51]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[52]  = "http://www.pricescope.com/igs/default.asp";
getSiteUrl[53]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[54]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[55]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[56]  = "http://www.usacerteddiamonds.com/inventory/mainfloor.html";
getSiteUrl[57]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[58]  = "http://www.usacerteddiamonds.com/introindex.html";
getSiteUrl[59]  = "http://www.usacerteddiamonds.com/NEWYORKCLIENTS.html";
getSiteUrl[60]  = "http://www.usacerteddiamonds.com/inventory/mainfloor.html";






var pages   = new Array("topbanner2.html","topbannerservices2.html","topbannerdiamonds4sale2.html","topbannercontactus2.html","topbanneraboutus2.html","topbannerdiamondnews2.html","topbannertestimonials2.html");



var banners0 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13); 

var banners1 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13); 

var banners2 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners3 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners4 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners5 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners6 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners7 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners8 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners9 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);

var banners10 = new Array("0","1","2","3","4","5","6","7","8","9","10","11","12",13);



 

////////////////////////Nothing below this line need to be modified/////////////////////////////



var counter  = 0;

var nBanners = numberOfBanners;

var add      = "";

var b = new Banner(); 

b.desireBanners();



function Banner()

  {

  this.banner  = new Array(nBanners);  

  this.Url     = new Array(nBanners);                      

  this.banners = banners;

  this.address = address;

  this.desireBanners = desireBanners;

  this.setBanners = setBanners;

  }



function banners(tempBanner,i)

  {    

  this.banner[i]     = new Image(imageWidth,imageHeight);                 

  this.banner[i].src = dir + tempBanner; 

  }



function address(getUrl,i) 

  {this.Url[i] = getUrl;}



function desireBanners()

  {

  for (var i = 0; i < numberOfBanners; i++)

     {

     var loc    = location.pathname;

     var length = loc.length;

     var start  = loc.lastIndexOf('/') + 1;

     var desirPage = loc.substring(start,length);

     if (desirPage == pages[i])

     { 

       eval("nBanners = banners" + i +".length");

       for (var j = 0; j < nBanners; j++)

          {

          eval("this.banners(getBanner[banners" + i + "[" + j + "]]," + j + ")");

          eval("this.address(getSiteUrl[banners" + i + "[" + j + "]]," + j + ")");

          }

       return;

       }

     }

  for (var j = 0; j < nBanners; j++)

     {

     this.banners(getBanner[j],j);

     this.address(getSiteUrl[j],j);

     }

  }



function setBanners()  

  {

if(document.layers){

document.bannerid.document.img.src=this.banner[counter].src;

// document.banner_id.document.img.src=this.banner[counter].src;



}else{

  document.img.src = this.banner[counter].src;}   

  add = this.Url[counter];

  }



function displayBanners()

  {

  if (rotate == "false") {counter = Math.round(Math.random() * (nBanners - 1));}

  b.setBanners();

  if (rotate == "true")

    {

    counter++;                                 

    if (counter > (nBanners - 1)) {counter = 0;}

    setTimeout("displayBanners()",pause);

    }  

  }



function goTo() {parent.main.document.location.href = add;}



function show() {window.status = add;}

// End -->
