var MaxValue=7 //(Example 2 is equal to: 0,1,2)
var NumUnique=1  //The number of unique numbers required
var Found=false
var Current = new Array()
var Count=0
var Current = new Array(NumUnique)

var AdImg = new Array()
var AdTitle = new Array()
var AdLink = new Array()
var Display = new Array()

AdImg[0]="<img src='http://www.axiomint.com/images/ads/ad_250x210_filefixer.jpg' alt='Fix any MicroStation file automatically!' border='0'>";
AdImg[1]="<img src='http://www.axiomint.com/images/ads/ad_250x180_ceb.jpg' alt='Instant Google-like search capabilities for MicroStation!' border='0'>";
AdImg[2]="<img src='http://www.axiomint.com/images/ads/ad_250x180_gwm.jpg' alt='Manage every MicroStation workspace without leaving your desk!' border='0'>";
AdImg[3]="<img src='http://www.axiomint.com/images/ads/ad_250x210_changer.jpg' alt='Make unlimited changes to multiple design files quickly and easily!' border='0'>";
AdImg[4]="<img src='http://www.axiomint.com/images/ads/ad_250x210_garage.jpg' alt='Save time and increase MicroStation productivity!' border='0'>";
AdImg[5]="<img src='http://www.axiomint.com/images/ads/ad_250x210_office.jpg' alt='Import spreadsheet and word processing data into MicroStation with perfect formatting!' border='0'>";
AdImg[6]="<img src='http://www.axiomint.com/images/ads/ad_250x210_tbm.jpg' alt='Achieve title block consistency automatically!' border='0'>";
AdImg[7]="<img src='http://www.axiomint.com/images/ads/ad_250x210_rasdgn.jpg' alt='Easily edit raster reference files -- in color -- without leaving MicroStation!' border='0'>";

AdTitle[0]="FileFixer";
AdTitle[1]="CadExplore Browser";
AdTitle[2]="Global Workspace Manager";
AdTitle[3]="Global File Changer";
AdTitle[4]="MicroStation Acceleration Garage";
AdTitle[5]="Microsoft Office Importer";
AdTitle[6]="Title Block Manager";
AdTitle[7]="RasterDGN";

AdLink[0]="http://www.axiomint.com/microstation/file-fixer/";
AdLink[1]="http://www.axiomint.com/microstation/cad-explorer/";
AdLink[2]="http://www.axiomint.com/microstation/global-workspace-manager/";
AdLink[3]="http://www.axiomint.com/microstation/global-file-changer/";
AdLink[4]="http://www.axiomint.com/microstation/garage/";
AdLink[5]="http://www.axiomint.com/microstation/microsoft-office-importer/";
AdLink[6]="http://www.axiomint.com/microstation/title-block-manager/";
AdLink[7]="http://www.axiomint.com/microstation/raster-dgn/";

GetUnique()

//alert("The unique numbers are: " + Current[0] + ", " + Current[1] + ", and " + Current[2])
//alert("Number is: " + Current[0]);
LinkOne=Current[0];
//LinkTwo=Current[1];
//LinkThree=Current[2];

Display[0]="<p><a href='"+AdLink[LinkOne]+"' title='"+AdTitle[LinkOne]+"'>"+AdImg[LinkOne]+"</a></p>";

//Display[1]="<p><a href='"+AdLink[LinkTwo]+"' title='"+AdTitle[LinkTwo]+"'>"+AdImg[LinkTwo]+"</a></p>";
//Display[2]="<p><a href='"+AdLink[LinkThree]+"' title='"+AdTitle[LinkThree]+"'>"+AdImg[LinkThree]+"</a></p>";


  function GetUnique(){
    for (i=0;Count<NumUnique;Count++){
      Found=false
      var rndValue = get_random()
      var j=0
      for (j=0;j<Current.length;j++){
        if (Current[j] == rndValue){
          Found=true
          break
        }
      }
      if (Found){
        Count--
      } else {
        Current[Count]=rndValue
      }
    }
  }
  function get_random(){
    var ranNum= Math.round(Math.random()*MaxValue);
    return ranNum;
  }
  
  document.write(Display[0]);
//  document.write(Display[1]);
// document.write(Display[2]);
