/* 
   Banner-O-Matic Javascript-bannerrotation 
   (c) 1999,2000,2001 by Christian Heilmann
   Free of charge with this copyright Notice and a link and/or some text explaining that
   this was done by me.
   In case of any emergency or questions mail me at info@onlinetools.org
*/
// Define Variables

function Rotobanner() {};
Rotobanner.prototype.Imgpath="/Banners/";
Rotobanner.prototype.Divtag="BannerPlace";
Rotobanner.prototype.banners = new Array ('6.jpg', 'cz.jpg', 'vip.jpg', 'cyprus.jpg', 'norway.jpg'); //'china-4.jpg');
Rotobanner.prototype.urls = new Array('http://search.versa-cruise.ru/cruise-collection/558980',
									'http://www.versa-travel.spb.ru/toursearch2007.phtml?Town=26&Country=C073&Tour=T01886&Go=1',
									'http://www.lux.versa-travel.ru',
									'http://www.versa-travel.spb.ru/toursearch2007.phtml?Town=26&Country=C067&Tour=T02585&Go=1',
									'http://www.scandinavia.versa-travel.ru/Stati/Skandinaviya/Novinki_sezona_-_turi_v_Norvegiyu_Daniyu/Gruppovie_turi/');
//									'http://www.versa-travel.spb.ru/toursearch2007.phtml?Town=26&Country=C074&Tour=T02246&Go=1');
Rotobanner.prototype.targets= new Array('_blank', '_self', '_blank', '_self', '_blank');
Rotobanner.prototype.rand=-1;
Rotobanner.prototype.Chosen=-1;
Rotobanner.prototype.Delay=3000;
Rotobanner.prototype.DivPrefix='Banner_';
Rotobanner.prototype.t=null;
Rotobanner.prototype.MyName='';

Rotobanner.prototype.rotate=function(time) {
if (document.getElementById(this.DivPrefix+this.Chosen)) document.getElementById(this.DivPrefix+this.Chosen).style.display='none';
this.Chosen++;
if (this.Chosen>=this.banners.length) this.Chosen=0
if (document.getElementById(this.DivPrefix+this.Chosen)) document.getElementById(this.DivPrefix+this.Chosen).style.display='';
this.t=setTimeout(this.MyName+'.rotate('+time+')',time)
}

Rotobanner.prototype.TimerOn=function(time) {
this.t=setTimeout(this.MyName+'.rotate('+time+')',time)
}

Rotobanner.prototype.Setup=function(RotoName) {
  this.MyName=RotoName;
  if (document.getElementById(this.Divtag)) {
     var h='';
     for (var i=0; i<this.banners.length; i++)
         h+='<div id="'+this.DivPrefix+i+'" style="display: none;"><a href="'+this.urls[i]+'" target="'+this.targets[i]+'"><img src="'+this.Imgpath+this.banners[i]+'" width=530 height=110 border=0 onMouseOut="'+RotoName+'.TimerOn('+RotoName+'.Delay)" onMouseOver="clearTimeout('+RotoName+'.t)"></a></div>';
     document.getElementById(this.Divtag).innerHTML=h;
     this.rotate(this.Delay);
    };
};

var MyBanner=new Rotobanner;

