//  This file defines the initializations and functions necessary to perform
//  image mouse rollover effects.  This file would need to be included in 
//  HTML files that will use a rollover effect.  In the anchor tag, onmouseover
//  and onmouseout events should call the imageOn and imageOff functions 
//  respectively.  Both functions take the name of the image as variable.

//  ex.
//  <a href="yourdomain.com" onmouseover="imageOn('button'); return true;" onmouseout="imageOff('button'); return true;">
//  <img src="button_1.jpg" name="button">
//  </a>

if (document.images)
    {
    //  create "on" array and populate with Image objects
    var onImgArray = new Array();
    onImgArray["plasticsurgery"] = new Image(233, 46);
    onImgArray["pipsadvantage"] = new Image(233, 24);
    onImgArray["servicesfees"] = new Image(233, 24);
    onImgArray["discounts"] = new Image(233, 24);
    onImgArray["financing"] = new Image(233, 24);
    onImgArray["pipstips"] = new Image(233, 24);
    onImgArray["testimonials"] = new Image(233, 24);
    onImgArray["facility"] = new Image(233, 24);
    onImgArray["contact"] = new Image(233, 24);
    //  set URLs for the "on" images
    onImgArray["plasticsurgery"].src = "images/1_0_plasticsurgeryroll.jpg";    
    onImgArray["pipsadvantage"].src = "images/2_0_pipsadvantageroll.jpg";
    onImgArray["servicesfees"].src = "images/3_0_servicesfeesroll.jpg";
    onImgArray["discounts"].src = "images/4_0_discountsroll.jpg";
    onImgArray["financing"].src = "images/5_0_financingroll.jpg";
    onImgArray["pipstips"].src = "images/6_0_pipstipsroll.jpg";
    onImgArray["testimonials"].src = "images/7_0_testimonialsroll.jpg";
    onImgArray["facility"].src = "images/8_0_facilityroll.jpg";
    onImgArray["contact"].src = "images/9_0_contactroll.jpg";
        
   //  create "off" array and populate with Image objects
    var offImgArray = new Array();
    offImgArray["plasticsurgery"] = new Image(233, 46);
    offImgArray["pipsadvantage"] = new Image(233, 24);
    offImgArray["servicesfees"] = new Image(233, 24);
    offImgArray["discounts"] = new Image(233, 24);
    offImgArray["financing"] = new Image(233, 24);
    offImgArray["pipstips"] = new Image(233, 24);
    offImgArray["testimonials"] = new Image(233, 24);
    offImgArray["facility"] = new Image(233, 24);
    offImgArray["contact"] = new Image(233, 24);
    //  set URLs for the "off" images
    offImgArray["plasticsurgery"].src = "images/1_0_plasticsurgery.jpg";
    offImgArray["pipsadvantage"].src = "images/2_0_pipsadvantage.jpg";
    offImgArray["servicesfees"].src = "images/3_0_servicesfees.jpg";
    offImgArray["discounts"].src = "images/4_0_discounts.jpg";
    offImgArray["financing"].src = "images/5_0_financing.jpg";
    offImgArray["pipstips"].src = "images/6_0_pipstips.jpg";
    offImgArray["testimonials"].src = "images/7_0_testimonials.jpg";
    offImgArray["facility"].src = "images/8_0_facility.jpg";
    offImgArray["contact"].src = "images/9_0_contact.jpg";
    }
    
function imageOn(imgName)
    {
    if (document.images)
        {
        document.images[imgName].src = onImgArray[imgName].src;
        }
    }
    
function imageOff(imgName)
    {
    if (document.images)
        {
        document.images[imgName].src = offImgArray[imgName].src;
        }
    }
