﻿function Rotator(divs)
{
    this.divstorotate = divs;
    this.index_nextnode = 0;
    this.Rotate = function()
    {
        this.index_nextnode++;
        if(this.index_nextnode > (this.divstorotate.length - 1))
        {
            this.index_nextnode = 0;
        }
        for(i=0; i<this.divstorotate.length; i++)
        {
            document.getElementById(this.divstorotate[i]).style.display = "none";
        }
        document.getElementById(this.divstorotate[this.index_nextnode]).style.display = "block";
    };
};
//objRotator = new Rotator(['r0', 'r1']);
//setInterval("objRotator.Rotate()", 5000);