function ttt()


{
            alert("Invalid login or password");
            return false;
}

 

function rotator(objname,imgname, delayInterval)
{
            this.obj = objname;
            this.img = imgname;
            this.delay = delayInterval;
            this.imgs = new Array();
            this.currImg = 0;
            return this;
}
 

rotator.prototype.AddImg = function(imgpath)

{
            newInd = this.imgs.length;
            this.imgs[newInd] = new Image();
            this.imgs[newInd].src = imgpath;
            this.currImg = this.imgs.length - 1;
}

 
rotator.prototype.rotate = function()
{
          

            if(this.currImg == this.imgs.length - 1) this.currImg = 0;
            else this.currImg++;
            if(document.images[this.img]) document.images[this.img].src = this.imgs[this.currImg].src;
            w = window.setTimeout(this.obj+".rotate()", this.delay);
}

 

rotator.prototype.start = function()

{
            this.currImg = this.imgs.length;
            md = 1;
            if(this.currImg >= 10 && this.currImg <100) md = 2;
            if(this.currImg >= 100 && this.currImg <1000) md = 3;
            while(this.currImg >= this.imgs.length)

            {
                        l = Math.random()+"";
                        this.currImg = l.substr(2, md);
                        if(this.currImg.substr(0,1) == "0") this.currImg = this.currImg.substr(1,1);
            }
            document.images[this.img].src = this.imgs[this.currImg].src;
            eval(this.obj+".rotate()");
}

 

 

var rot1 = new rotator("rot1", "rotban", 5000);

rot1.AddImg("images/banners/b2.jpg");
rot1.AddImg("images/banners/b8.jpg");
rot1.AddImg("images/banners/b9.jpg");
rot1.AddImg("images/banners/b11.jpg");
rot1.AddImg("images/banners/b12.jpg");
rot1.AddImg("images/banners/b14.jpg");
rot1.AddImg("images/banners/b15.jpg");
rot1.AddImg("images/banners/b1.jpg");
rot1.AddImg("images/banners/b16.jpg");
rot1.AddImg("images/banners/b17.jpg");
rot1.AddImg("images/banners/b18.jpg"); 
//rot1.rotate();

 
var rot2 = new rotator("rot2", "rotban2", 5000);
rot2.AddImg("images/banners/b6.jpg");
rot2.AddImg("images/banners/b3.jpg");
rot2.AddImg("images/banners/b4.jpg");
rot2.AddImg("images/banners/b5.jpg");
rot2.AddImg("images/banners/b10.jpg");
rot2.AddImg("images/banners/b13.jpg");
rot2.AddImg("images/banners/b7.jpg");
rot2.AddImg("images/banners/b19.jpg");
rot2.AddImg("images/banners/b20.jpg");
rot2.AddImg("images/banners/b21.jpg");
//rot2.rotate();

 