/*
$HeadURL: svn+secure://svn.comminternet.com/main/websites/shorelineinteriors.com/branches/upgrade/web/common/framework/javascript/cxRollover.js $
$LastChangedRevision: 3976 $
$LastChangedDate: 2007-04-10 22:14:10 -0400 (Tue, 10 Apr 2007) $
*/

function cxRollover_attach(pElement, pHoverImageSrc)
{
    // Preload the hover image.
    var image = new Image();
    image.src = pHoverImageSrc;

    // We don't want this handler to be called again when one of the event handlers
    // changes the source of the image and the onload event fires again.
    pElement.onload = null;

    pElement.cxRollover_originalSrc = pElement.src;
    pElement.cxRollover_hoverSrc = pHoverImageSrc;

    pElement.onmouseover = function() { this.src = this.cxRollover_hoverSrc; }
    pElement.onmouseout = function() { this.src = this.cxRollover_originalSrc; }
}

/*
function cxRollover_attachImageMap(pElement, pMap)
{
    pElement.usemap = pMap;
}

function cxRollover_attachArea(pElement, pMap)
{
    // Preload the hover image.
    var image = new Image();
    image.src = pHoverImageSrc;

    // We don't want this handler to be called again when one of the event handlers
    // changes the source of the image and the onload event fires again.
    pElement.onload = null;

    pElement.cx_rollover_originalSrc = pElement.src;
    pElement.cx_rollover_hoverSrc = pHoverImageSrc;

    pElement.onmouseover = function() { this.src = this.cx_rollover_hoverSrc; }
    pElement.onmouseout = function() { this.src = this.cx_rollover_originalSrc; }
}
*/
