/* Function that swaps images. */
function roll(id, newSrc) {
  if (document.images) {
	var theImage = FWFindImage(document, id, 0);
	if (theImage) {
		theImage.src = newSrc;
	}			  
	document[hilight].src = 'roll/brown_' + hilight_num + '.gif';
  }
}

function rollout(id, newSrc) {
  if (document.images) {
	var theImage = FWFindImage(document, id, 0);
	if (theImage) {
		theImage.src = newSrc;
	}			  
	document[hilight].src = 'roll/black_' + hilight_num + '.gif';
  }
}


/* Functions that track and set toggle group button states. */

function FWFindImage(doc, name, j) {
    var theImage = false;
    if (doc.images) {
        theImage = doc.images[name];
    }
    if (theImage) {
        return theImage;
    }
    if (doc.layers) {
        for (j = 0; j < doc.layers.length; j++) {
            theImage = FWFindImage(doc.layers[j].document, name, 0);
            if (theImage) {
                return (theImage);
            }
        }
    }
    return (false);
}


