var bImagesLoaded = 0;
//****************************************************
//* ImageCallout Object -
//* This object contains the images to show when the mouse is over an image
//*   and for when the mouse is no longer over an image
//* It also contains 2 methods, MosueOver & MouseOut to perform these tasks. 
//****************************************************
function ImageCallout(imageName, pbHighlight)
{   
    if(document.images)
    { 
        var sBaseFileName // Image File Name without extension
        var sFileExtension // extension of Image file Name (.gif, .jpg, etc - assuming 3 letter extension name)
        this.imageName = imageName;
        // Define ImageOut property
        this.imageOut  = new Image();
        this.imageOut.src  = document.images[this.imageName].src;
		
        // Define ImageOver property
        this.imageOver = new Image();

		// if image being passed is in highlight mode, we want the "MouseOver" picture to be the normal picture        
        if (pbHighlight == 1)
			sBaseFileName = this.imageOut.src.substring(0, this.imageOut.src.length - 4)
		else
			sBaseFileName = this.imageOut.src.substring(0, this.imageOut.src.length - 4) + "_F2"	

        sFileExtension = this.imageOut.src.substring(this.imageOut.src.length - 4)
		
		this.imageOver.src = sBaseFileName + sFileExtension 								
        this.valid = true;
        
    }
    else
       this.valid = false;
    
    this.MouseOver = ImageCalloutMouseOver;
    this.MouseOut  = ImageCalloutMouseOut;
}
//****************************************************
//* MouseOver event handler for the ImageCallout object.
//****************************************************
function ImageCalloutMouseOver()
{
	if (this.valid)
	{
		document.images[this.imageName].src = this.imageOver.src;		
	}
	return true;
}

//****************************************************
//* MouseOut event handler for the ImageCallout object.
//****************************************************
function ImageCalloutMouseOut()
{
	if (this.valid)
    {
		document.images[this.imageName].src = this.imageOut.src;
    }
    return true;
}
