
    function stay (src, pause, speed, count){
        this.setProperties(src, pause, speed, count);
    };

    stay.prototype = new BaseSequence();
    stay.prototype.constructor = new BaseSequence;
    stay.superclass = BaseSequence.prototype;

    stay.prototype.setProperties = function(src, pause, speed, count){

		this.prog = "speak('', 500)";

		stay.superclass.setProperties.call(this, src, pause, speed, count);

		this.name        = "stay";

		var rnd_num = this.get_random_number(6);

		if (rnd_num > 4) this.return_mode = MODE_LOOK_AROUND;
		else this.return_mode = MODE_WOOF;

		// this.return_mode = MODE_STAY;


		return this;
    };

    stay.prototype.mouse_notover = function(){
		// this.return_mode = MODE_NORMAL;
		this.stop();
	};

    stay.prototype.actout = function actout(){

        if (this.first_time) this.first_time = false;
        else {

			stay.superclass.actout.call(this);

			var rnd_num = this.get_random_number(9);

			if ( this.beats() < 5)     this.prog = "look_s()";
			else {

				this.pause = 1000; // this overrides after first few beats

				switch(rnd_num){
					case 1:  this.prog = "nothing()";  break;
					case 2:  this.prog = "nothing()";  break;
					case 3:  this.prog = "nothing()";  break;
					case 4:  this.prog = "nothing()";  break;
					case 5:  this.prog = "nothing()";  break;
					default: this.prog = "blink()";    break;
				}
			}
	    }

        return(this.prog);
    }



