﻿function MM_findObj(n, d) { //v4.01    var p, i, x;          // if document to search is not specified, use default document object    if(!d) d = document;         // if search id (n) contains a '?', then assume whatever comes after ? is a frame name    if((p = n.indexOf("?")) > 0 && parent.frames.length)     {        d = parent.frames[n.substring(p + 1)].document;        n = n.substring(0, p);    }      // see if document has an 'all' property, if so, use that to retrieve the object    if(!(x = d[n]) && d.all) x = d.all[n];         // search all forms in the document for the object    for (i = 0; !x && i < d.forms.length; i++)         x = d.forms[i][n];        // search all document layers for the object    for(i = 0; !x && d.layers && i < d.layers.length; i++)         x = MM_findObj(n, d.layers[i].document);      // if all else fails, fall back on using getElementById    if(!x && d.getElementById) x = d.getElementById(n);         return x;}function MM_preloadImages() { //v3.0    // get default document object    var d = document;         // does it support images?    if(d.images) {         // if doesn't exist, create an array called MM_p as a property of the document object        if(!d.MM_p) d.MM_p = new Array();                // get the size of the array        var j = d.MM_p.length;                // get back a list of the arguments supplied to this function, and run through them all        var a = MM_preloadImages.arguments;         for(var i = 0; i < a.length; i++)            if(a[i].indexOf("#")!=0)            {                 // if the image doesn't start with a #, add it to our MM_p array                d.MM_p[j] = new Image;                d.MM_p[j++].src = a[i];            }    }}function MM_swapImgRestore() { //v3.0    var x;        // run through our array of references to swapped images    var a = document.MM_sr;     for(var i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++)         x.src = x.oSrc; // replace with original image source}function MM_swapImage() { //v3.0    var x, j = 0;        // create an array to store references to swapped images    document.MM_sr = new Array;         // retrieve arguments supplied to the function and process them    var a = MM_swapImage.arguments;         for(var i = 0;i < (a.length-2); i+=3)    {        // look for the image with ID specified in argument with index 0 (of this set of arguments)        if((x = MM_findObj(a[i])) != null)        {            // found image, store a reference to it in our array            document.MM_sr[j++] = x;                         // create a property 'oSrc' on the image and let it remember original image location            if(!x.oSrc) x.oSrc = x.src;                         // swap with image specified in 3rd argument            x.src=a[i+2];        }    }}function MM_swapImgPNGRestore(){    var x;        // run through our array of references to swapped images    var a = document.MM_srPNG;     for(var i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++)         x.filters(0).src = x.oSrc; // replace with original image source}function MM_swapImagePNG(){    var x, j = 0;        // create an array to store references to swapped images    document.MM_srPNG = new Array;         // retrieve arguments supplied to the function and process them    var a = MM_swapImagePNG.arguments;         for(var i = 0;i < (a.length-2); i+=3)    {        // look for the image with ID specified in argument with index 0 (of this set of arguments)        if((x = MM_findObj(a[i])) != null && x.filters.length > 0)        {            // found span, store a reference to it in our array            document.MM_srPNG[j++] = x;                         // create a property 'oSrc' on the span and let it remember original image location            if(!x.oSrc) x.oSrc = x.filters(0).src;                         // swap with image specified in 3rd argument            x.filters(0).src = a[i+2];        }    }}