/***************************
*  version: 0.1
*  functions: LinkBlinker
*  Copyright by: Igor Pavloviæ
*  Since: 22/04/2004
*****************************/

        function LinkBlinker(timeout,bcolor) {

            this.timeout = timeout;
            blinkColor = bcolor;
            link_array = new Array();
            current_link = 0;
            this.blinking;


            //alert(this.blinkColor);
            
            this.startBlinking = function(_this) {
                this.blinking =  window.setInterval('blink();',_this.timeout);
            }
            
            this.stopBlinking = function(_this) {
                window.clearInterval(_this.blinking);
            }

            this.addLink = function(link_object) {
                link_array.push(link_object);
            }

            blink = function() {

                if (this.current_link > this.link_array.length) this.current_link = 0;
                //alert("b " + this.blinkColor);
                for (i = 0;i < this.link_array.length;i++) {

                    switch (i == this.current_link) {

                        case true:
                            //this.link_array[i].visibility = "hidden";
                            
                            this.link_array[i].style.color = this.blinkColor;
                        break;

                        default:
                            this.link_array[i].style.color = "";
                            //this.link_array[i].visibility = "visible";
                        break;
                    }
                }

                this.current_link += 1;
            }
        }

