

    function BaseBehaviors(objArt, index, behavior){
        this.setProperties(objArt, index, behavior);
        return this;
    }

    BaseBehaviors.prototype.setProperties = function(objArt, index, behavior){

        this.objArt  = objArt;
	    this.index   = index;

	    // the follwing is from a very useful hint
	    // via http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=14

	    this.obj      = objArt;  // this sets up the object to
        if(objArt) if( objArt.style ) {this.obj = objArt.style;}

	    this.noPx = document.childNodes ? 'px' : 0;

	    // thanks for the hint! j

	    this.visible = true;
	    this.active  = false; // can receive focus

        this.co = new BaseSequence(this, 1000, 100, 2);

        this.timeout_id = setTimeout('super_looper(' + this.index + ')', 100);
        if(this.obj) this.obj.color = "#333333";

	return this;
    };

    BaseBehaviors.prototype.mp = function(x, y){
	    this.co.mp(x, y);
	    return (this.co);
    };

    BaseBehaviors.prototype.md = function(posX, posY){
	    return (this.co.md(posX, posY));
    };

    BaseBehaviors.prototype.redraw = function(lnnum, newline){

       var span_count = 0;
       var objLine = this.objArt.childNodes[0];

	   for (i=0; i < this.objArt.childNodes.length; i++){ // this accomodates firefox + ie
		   objLine = this.objArt.childNodes[i];
           if (objLine.nodeName == "SPAN") if ((span_count += 1) == lnnum) break;
	   }

       newline = this.convert_spaces(newline);    // consolidate these two lines
       objLine.innerHTML = newline;

       return objLine;
	};

    BaseBehaviors.prototype.convert_spaces = function(newline){
        return(newline.replace(/\s/g, '&nbsp;')); // convert spaces
    };

    BaseBehaviors.prototype.super_looper = function (){
        if (this.co.fini()) this.co = new BaseSequence(this, 1000, 100, 2);
        this.output();
    };

    BaseBehaviors.prototype.output = function (){

        var prog = this.co.actout();

		clearTimeout(this.timeout_id);
		eval("this." + prog);
		this.timeout_id = setTimeout('super_looper(' + this.index + ')', this.co.next_time);
    };

    BaseBehaviors.prototype.start_face = function(){
        this.redraw (1, "");
    };

    BaseBehaviors.prototype.def_face = function(){
        this.redraw (1, "");
    };

    BaseBehaviors.prototype.alt_face = function(){
        this.redraw (1, "");
    };
