function animObj(s_objname_fp) {
    /**** BEGIN PRIVATE VARIABLES ****/
    //all passed values are stored in arrays to facilitate complex actions
    var a_endvalue; //array of ending values for change
    var a_imgsrc; //array of img src paths
    var a_id; //array of ids of DOM object to be affected
    var a_increment; //array of increments of change
    var a_rate; //array of rates of change
    var a_startvalue; //array of starting values for change
    var i_loop; //keeps track of loop multiplier inside the timed recursions
    var i_routestg; //keeps track of the stage of a multistep action
    var s_objname;  //callback name (needed for timeouts to find their reference)
    //"CONSTANTS"
    //err lang
    var ERR_INIT = 'Proper syntax is: o_foo = new animObj(\'o_foo\');';
    var ERR_SETFSWAP1 = 'setImgFadeSwap: image id not defined';
    var ERR_SETFSWAP2 = 'setImgFadeSwap: filename is not defined';
    var ERR_SETFSWAP3 = 'setImgFadeSwap: milliseconds not defined';
    var ERR_SETFSWAP4 = 'setImgFadeSwap: fade rates not defined';
    var ERR_SETFSWAP5 = 'setImgFadeSwap: starting opacities not defined';
    //complex action switches
    var SW_IMGFSWAP = 'imgfadeswap';
    //misc
    var SWAPINTERVAL = 500;
    /**** END PRIVATE VARIABLES ****/


    /**** BEGIN PUBLIC METHOD POINTERS ****/
    this.doImgFade = doImgFade;
    this.doImgFadeSwap = doImgFadeSwap;
    this.doImgSwap = doImgSwap;
    this.doSimpleImgSwap = doSimpleImgSwap;
    this.routeAction = routeAction;
    this.setElementDisp = setElementDisp;
    this.setImgFadeSwap = setImgFadeSwap;
    /**** END PUBLIC METHOD POINTERS ****/


    /**** BEGIN "CONSTRUCTOR" ACTIONS ****/
    //make sure that an object name has been passed back
    if (s_objname_fp) {
        s_objname = s_objname_fp;
    } else {
        //alert(ERR_INIT);
    }
    /**** END "CONSTRUCTOR" ACTIONS ****/


    /**** BEGIN PUBLIC METHODS ****/
    /*this here is the basis for what really needs to happen
    but it needs to be extended and delegated
    should be setters that take arrays (or single values that can be treated appropriately) for: 
    1. target elements
    2. rate of change
    3. starting point & end point
    4. target CSS property
    
    */
    
    function setImgFadeSwap(s_id_fp,s_filename_fp,i_mseconds_fp,i_faderate1_fp,i_faderate2_fp,i_startopacity1_fp,i_startopacity2_fp) {
        //set all of the properties needed to execute an image fade & swap
        if (s_id_fp != null) {
            a_id = new Array(s_id_fp);
        } else {
            //alert(ERR_SETFSWAP1);
        }
        if (s_filename_fp != null) {
            a_imgsrc = new Array(s_filename_fp);
        } else {
            //alert(ERR_SETFSWAP2);
        }
        if (i_mseconds_fp != null) {
            a_rate = new Array();
            a_rate[0] = i_mseconds_fp;
        } else {
            //alert(ERR_SETFSWAP3);
        }
        if (i_faderate1_fp  != null && i_faderate2_fp != null) {
            a_increment = new Array(i_faderate1_fp,i_faderate2_fp);
        } else {
            //alert(ERR_SETFSWAP4);
        }
        if (i_startopacity1_fp != null && i_startopacity2_fp != null) {
            a_startvalue = new Array(i_startopacity1_fp,i_startopacity2_fp);
        } else {
            //alert(ERR_SETFSWAP5);
        }
    }

    function doImgFadeSwap() {
        //public method to initiate an image fade & swap
        i_routestg = 0;
        doImgFade(SW_IMGFSWAP);
    }

    function doImgFade(s_combo_fp) {
        //fade an image up or down in timed increments
        var o_timer; //timer object
        var i_index = outIndexImgFade(s_combo_fp);  //index to reference in value arrays
        //initiate the loop counting
        if (i_loop) {
            i_loop++;
        } else {
            i_loop = 1;
        }
        //determine current opacity value
        var i_opacity = a_startvalue[i_index] + (a_increment[i_index] * i_loop);
        //set the image's opacity
        setImgOpacity(a_id[0],i_opacity);
        //set/clear the timer
        if ((a_increment[i_index] > 0 && i_opacity < 100) || (a_increment[i_index] < 0 && i_opacity >= 0)) {
            o_timer = setTimeout(s_objname + ".doImgFade('" + s_combo_fp + "')", a_rate[0]);
        } else {
            i_loop = null;
            clearTimeout(o_timer);
            //alert('calling router');
            routeAction(s_combo_fp);
        }
    }

    function doImgSwap(i_idindex_fp,i_fileindex_fp,s_combo_fp) {
        //replace one img src with another
        //passing a null s_combo_fp will prevent any further action from firing
        //any other value for s_combo_fp causes the next action to fire after SWAPINTERVAL
        var o_timer;
        document.getElementById(a_id[i_idindex_fp]).src = a_imgsrc[i_fileindex_fp];
        if (s_combo_fp) {
            //alert('firing swap');
            o_timer = setTimeout(s_objname + ".routeAction('" + s_combo_fp + "')", SWAPINTERVAL);
        }
    }
    
    function doSimpleImgSwap(s_id_fp, s_file_fp) {
        document.getElementById(s_id_fp).src = s_file_fp;
    }

    function setImgOpacity(s_id_fp,i_opacity_fp) {
        //set an image's opacity for Safari 3, IE 7, Firefox 2/3
        //modern mozilla
        document.getElementById(s_id_fp).style.opacity = i_opacity_fp/100;
        //ie 7
        document.getElementById(s_id_fp).style.filter='progid:DXImageTransform.Microsoft.Alpha(opacity=' + i_opacity_fp + ');';
    }

    function setElementDisp(s_id_fp, s_value_fp) { 
        document.getElementById(s_id_fp).style.display = s_value_fp;
    }
    /**** END PUBLIC METHODS ****/


    /**** BEGIN PRIVATE METHODS ****/
    function routeAction(s_combo_fp) {
        //alert('router called');
        //router for complex actions that pass a s_combo_fp parameter
        if (s_combo_fp) {
            i_routestg++;
            switch (s_combo_fp) {
                case SW_IMGFSWAP:
                routeImgFadeSwap();
                break;
            }
        }
    }

    function routeImgFadeSwap() {
        //complex action for a fade-swap-fade
        if (i_routestg == 1) {
            //alert('calling swap');
            doImgSwap(0,0,SW_IMGFSWAP);
        }
        if (i_routestg == 2) {
            doImgFade(SW_IMGFSWAP);
        }
    }

    function outIndexImgFade(s_combo_fp) {
        //index-determining function for doImgFade()
        var i_index;
        if (s_combo_fp == SW_IMGFSWAP) {
            if (i_routestg == 0) {
                i_index = 0;
            }
            if (i_routestg == 2) {
                i_index = 1;
            }
        } else {
            i_index = 0;
        }
        return i_index;
    }
    /**** END PRIVATE METHODS ****/
}