// JScript source code
function SetBackground(object,color)
{
    object.style.backgroundColor = "#" + color;
}

function toggle_visibility(id) {
    var e = document.getElementById(id);
    if(e.style.display == 'none')
        e.style.display = 'block';
    else
        e.style.display = 'none';
    }
    
    function Hide(id)
    {
        var e = document.getElementById(id);
        if(e.style.display != 'none')
        {
            e.style.display = 'none';
        }
    }
    
     function Show(id) {
        var e = document.getElementById(id);
        if(e.style.display != 'block')
        {
            e.style.display = 'block';
        }
}



// The following variable controls how much the picture is magnified.
// Try different values here, but keep your number small (less than 10, even on small images).
// Too big a number causes the image to look bad, pixelized, fuzzy.
// IMPORTANT: if the number forces the img bigger than the screen, you won't have a way to MouseOut. You'll probably have to leave the page.
var zoomAmt = 4.0;

// DO NOT alter the following 4 variables, the script controls these by itself.
var origWd;            // this is the original width of the img (per the Style Sheet)
var origHt;              // this is the original height of the img (per the Style Sheet)
var last_img;          // the last img which was clicked on
var img_state = 0;  // either 1 (zoomed) or 0 (not zoomed)

// This is the function which zooms the image that is clicked on
function larger(whichImg) {
	thisImg = whichImg;
	if (thisImg == last_img) {
		// do nothing (because you are clicking on an already zoomed image)
	} else {
		thisOne = document.getElementById(thisImg);
		origWd = thisOne.width;    // gets the original width of the image first
		origHt = thisOne.height;    // gets the original height of the image also
		thisOne.width = origWd * zoomAmt;    // change the width by the zoomAmt
		thisOne.height = origHt * zoomAmt;    // change the height by the zoomAmt
		last_img = thisImg;    // this var insures that further clicking does not continue to zoom the image
		img_state = 1;    // this var tells the script this image is in a zoomed state
	}
}

// This is the function which restores the image to original size if you MouseOut.
function smaller(whichimg) {
	if (img_state == 0) {
		// do nothing (if you MouseOut of an img which is NOT in a zoomed state)
	} else {
		thisimg = whichimg;
		thisone = document.getElementById(thisimg);  // gets the img object
		thisone.width = origWd;    // restores the original width
		thisone.height = origHt;    // restores the original height
		last_img = "";    // resets the last_img variable to null
		img_state = 0;   // resets the img_state variable to an unzoomed state
	}
}

//-- DeCloak (no need to cloak the script any longer)-->

