
    function BaseSequence(src, pause, speed, count){
        this.setProperties(src, pause, speed, count);
    }

    BaseSequence.prototype.setProperties = function(src, pause, speed, count){

		this.pos_unknown  = -1;
		this.pos_over     = 0;

		this.pos_n  = 1;
		this.pos_ne = 2;
		this.pos_e  = 3;
		this.pos_se = 4;
		this.pos_s  = 5;
		this.pos_sw = 6;
		this.pos_w  = 7;
		this.pos_nw = 8;

		this.pos_bullseye = 9;

		this.name        = "default";

		this.first_time  = true;
		this.mouse_relative_position = this.pos_unknown;

		this.pause = pause;
		this.speed = speed;
		this.count = count;

		this.rent    = src;
		this.mmcount = 0;

		this.start_count = count;
		this.next_time = pause;

		this.def_prog    = "def_face()"
		this.alt_prog    = "alt_face()"
		this.prog        = "start_face()";

		this.posX = 0;
		this.posY = 0;

		this.lastX = 0;
		this.lastY = 0;

		this.color = "#333333";

		this.return_mode = MODE_NORMAL;

		return this;
    };

    BaseSequence.prototype.md = function(posX, posY){

	    var t = this.findPosY();
	    var l = this.findPosX();
	    var h = this.rent.objArt.clientWidth;
	    var w = this.rent.objArt.clientHeight;

	    var cx = l + (w/2);  // center points
	    var cy = t + (h/2);

		if (((posX > l) && (posX < (l + w))) && ((posY > t) && (posY < (t + h)))) {
			return(true);
	    }

        return(false);
    }

    BaseSequence.prototype.mp = function(posX, posY){

	    var t = this.findPosY();
	    var l = this.findPosX();

	    var h = this.rent.objArt.clientWidth;
	    var w = this.rent.objArt.clientHeight;

	    var cx = l + (w/2);  // center points
	    var cy = t + (h/2) + 10;

	    var pad = 10; // aka "pad center"

	    this.mmcount += 1;

		if ((posY > t) && (posY < t + h)){
			if (posX < l) this.mouse_relative_position  = this.pos_w;
			else this.mouse_relative_position  = this.pos_e;
		}
		else if (posY < t){
			if (posX < l) this.mouse_relative_position  = this.pos_nw;
			else if (posX > l + h) this.mouse_relative_position  = this.pos_ne;
			else this.mouse_relative_position  = this.pos_n;
		}
		else {
			if (posX < l) this.mouse_relative_position  = this.pos_sw;
			else if (posX > l + h) this.mouse_relative_position  = this.pos_se;
			else this.mouse_relative_position  = this.pos_s;
		}

		// window.defaultStatus = "pos: " + this.mouse_relative_position;

		if (((posX > l) && (posX < (l + w))) && ((posY > t) && (posY < (t + h)))) {
			this.mouse_over();
	    }
		else {
			this.mouse_notover();
	    }

		return this;
	};

    BaseSequence.prototype.get_random_number = function(seed){
        return(Math.round(seed * Math.random()));
	};

    BaseSequence.prototype.mouse_over = function(){
		return this;
	};

    BaseSequence.prototype.mouse_notover = function(){
		return this;
	};

    BaseSequence.prototype.stop = function(){
        this.count = -100;
        super_looper(this.rent.index);
    };

    BaseSequence.prototype.toString = function(){
        return this.name;
    };

    BaseSequence.prototype.beats = function() {
		return(this.start_count - this.count);
	}


    BaseSequence.prototype.fini = function() {
        if (this.count <= 0) return (true);
        return (false);
    };

    BaseSequence.prototype.current_prog =  function (){
        return (this.prog);
	};

    BaseSequence.prototype.behavior =  function (){
        return (this.return_mode);
	};

    BaseSequence.prototype.next_time =  function (){
        return this.next_time;
	};

    BaseSequence.prototype.findPosX = function () {

	    var curleft = 0;
	    var obj = this.rent.objArt;

	    if (obj.offsetParent){

		    while (obj.offsetParent){
			    curleft += obj.offsetLeft
			    obj = obj.offsetParent;
		    }
	   }
	   else if (obj.x) curleft += obj.x;

	   this.posX = curleft;

	   return curleft;
    };

    BaseSequence.prototype.findPosY = function (){

	        var obj = this.rent.objArt;
			var curtop = 0;

			if (obj.offsetParent){

				while (obj.offsetParent){
					curtop += obj.offsetTop
					obj = obj.offsetParent;
				}
			}
			else if (obj.y) curtop += obj.y;

	        this.posY = curtop;

			return curtop;
	};

    BaseSequence.prototype.actout =  function (){

        if (this.first_time) {
			this.first_time = false;
			this.rent.obj.color = this.color;
			// window.defaultStatus = this.color;
		}
        else if(this.prog == this.def_prog) this.prog = this.alt_prog;
        else this.prog = this.def_prog;

        this.mmcount  -= 10;
        this.count    -= 1;
        this.next_time = this.pause;

        // if (this.name != "default") window.defaultStatus = this.name + " " + this.count;

        return this.prog;
    }





