function swap(ele) {
    var img = ele.getElementsByTagName('img')[0];
    if( img ) {
        current = img.src;
        new_img = null;
        if( current.match(/.*_on\.gif/) ) {
            //We're on, swap to off;
            new_img = current.replace("_on.gif", "_off.gif");
        } else {
            //We're off, swap to on.
            new_img = current.replace("_off.gif", "_on.gif");
        }
        
        if( new_img ) {
            img.src = new_img;
        }
    }
}