    /**
     * Registry for all banners.
     */
    function BannerRegistry()
    {
        this.m_Initial = true;
        this.m_BannerIndex = 0;
        this.m_Banner = new Array();

        this.addBanner = BannerRegistry_addBanner;
        this.showNextBanner = BannerRegistry_showNextBanner;
        this.showCurrent = BannerRegistry_showCurrent;
        this.applyCurrent = BannerRegistry_applyCurrent;
    }

    /**
     * Add the banner to the registry.
     * @param banner the banner
     */
    function BannerRegistry_addBanner( banner )
    {
        this.m_Banner[this.m_Banner.length] = banner;
    }

    /**
     * Display the next banner image and remember the current banner position in the registry.
     */
    function BannerRegistry_showNextBanner()
    {
        /** show the first banner for display time milli seconds */
        if ( this.m_Initial )
        {
            this.m_Initial = false;
            window.setTimeout( 'bannerRegistry.showNextBanner()', this.m_Banner[this.m_BannerIndex].getDisplayTime() );
            return;
        }

        if ( ++this.m_BannerIndex == this.m_Banner.length )
        {
            this.m_BannerIndex = 0;
        }

        var currentBanner = this.m_Banner[this.m_BannerIndex];
        document.images['banner'].src = currentBanner.getImage();

        window.setTimeout( 'bannerRegistry.showNextBanner()', currentBanner.getDisplayTime() );
    }

    /**
     * Returns the url of the current banner.
     * @return the url of the current banner
     */
    function BannerRegistry_showCurrent()
    {
        window.location.href = this.m_Banner[this.m_BannerIndex].getUrl();
    }

    /**
     * Apply the url and target of the current banner to the given link.
     */
    function BannerRegistry_applyCurrent( link )
    {
        link.href = this.m_Banner[this.m_BannerIndex].getUrl();
        link.target = this.m_Banner[this.m_BannerIndex].getTarget();
    }

    /**
     * One banner with image, url, tooltip and display time.
     */
    function Banner()
    {
        this.m_Image = '';
        this.m_Url = '';
        this.m_DisplayTime = 10000;

        this.setImage = Banner_setImage;
        this.getImage = Banner_getImage;
        this.setUrl = Banner_setUrl;
        this.getUrl = Banner_getUrl;
        this.setDisplayTime = Banner_setDisplayTime;
        this.getDisplayTime = Banner_getDisplayTime;
    }

    /**
     * Set the path to the image of the banner.
     * @param image the path to the image
     */
    function Banner_setImage( image )
    {
        this.m_Image = image;
    }

    /**
     * Returns the path to the image of the banner.
     * @return the path to the image
     */
    function Banner_getImage()
    {
        return this.m_Image;
    }

    /**
     * Sets the url.
     * @param url the url
     */
    function Banner_setUrl( url )
    {
        this.m_Url = url;
    }

    /**
     * Returns the url.
     * @return the url
     */
    function Banner_getUrl()
    {
        return this.m_Url;
    }

    /**
     * Sets the display time in milli seconds.
     * @param displayTime the display time
     */
    function Banner_setDisplayTime( displayTime )
    {
        this.m_DisplayTime = displayTime;
    }

    /**
     * Returns the display time in milli seconds.
     * @return the display time
     */
    function Banner_getDisplayTime()
    {
        return this.m_DisplayTime;
    }

    window.bannerRegistry = new BannerRegistry();

    var banner1 = new Banner();
    banner1.setImage( 'assets/templates/loutsa/images/AttikaBanner.jpg' );
    banner1.setUrl( 'http://allnet.gr/' );
    banner1.setDisplayTime( 10000 );
    bannerRegistry.addBanner( banner1 );

    var banner2 = new Banner();
    banner2.setImage( 'assets/templates/loutsa/images/AttikaBanner1.jpg' );
    banner2.setUrl( 'http://www.rpg-foren.com/' );
    banner2.setDisplayTime( 20000 );
    bannerRegistry.addBanner( banner2 );
	
    var banner3 = new Banner();
    banner3.setImage( 'assets/templates/loutsa/images/AttikaBanner2.jpg' );
    banner3.setUrl( 'http://allnet.gr' );
    banner3.setDisplayTime( 30000 );
    bannerRegistry.addBanner( banner3 );
	
    var banner4 = new Banner();
    banner4.setImage( 'assets/templates/loutsa/images/AttikaBanner3.jpg' );
    banner4.setUrl( 'http://www.rpg-foren.com/' );
    banner4.setDisplayTime( 40000 );
    bannerRegistry.addBanner( banner4 );