// Detect if browser is Netscape 3 + or IE 4 +.
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
var nMenuOn = '0';

    if ((bName == "Netscape" && bVer >= 3) ||
        (bName == "Microsoft Internet Explorer" && bVer >= 4)) br = "n3";
    else br = "n2";

	if (br== "n3")
	{
	   img1on = new Image();
	   img1on.src = "images/home-b.jpg";
	   img2on = new Image();
	   img2on.src = "images/services-b.jpg";
	   img3on = new Image();
	   img3on.src = "images/portfolio-b.jpg";
	   img4on = new Image();
	   img4on.src = "images/contact-b.jpg";
	   img5on = new Image();
	   img5on.src = "images/about-b.jpg";

	   img1off = new Image();
	   img1off.src = "images/home-a.jpg";
	   img2off = new Image();
	   img2off.src = "images/services-a.jpg";
	   img3off = new Image();
	   img3off.src = "images/portfolio-a.jpg";
	   img4off = new Image();
	   img4off.src = "images/contact-a.jpg";
	   img5off = new Image();
	   img5off.src = "images/about-a.jpg";

	 }
// Function to set pop up frame size and display images.

	function Jon(dest, imgNum)
	{

		var PickedImg = ("img" + nMenuOn);
		imgName = ("img" + imgNum);

		if (br == "n3")
		{
			//First turn off the one that was picked
			if (nMenuOn != '0')
			{
				document[PickedImg].src = eval("img" + nMenuOn + "off.src");
			}

			//Now set the one selected
			nMenuOn = imgNum;
			document[imgName].src = eval("img" + imgNum + "on.src");
		}

		//window.name = 'base_window2';
		window.open(dest, 'floater2', 'history=yes,location=yes,scrollbars=yes,toolbar=yes,menubar=yes,statusbar=yes,locationbar=yes,resizable=yes,directories=yes,width=800,height=500');

	}

// Function to "activate" images.
function imgAct(imgName)
{
    if (br == "n3")
    {
    document[imgName].src = eval(imgName + "on.src");
    }
}

// Function to "deactivate" images.
function imgInact(imgName)
{
	var PickedImg = ("img" + nMenuOn);

    if (br == "n3")
    {
		//We do not want to deactivate the one selected
		if (PickedImg != imgName)
		{
			document[imgName].src = eval(imgName + "off.src");
		}
    }
}

function imgSet(imgNum)
{
	var PickedImg = ("img" + nMenuOn);
	imgName = ("img" + imgNum);

    if (br == "n3")
    {
		//First turn off the one that was picked
		if (nMenuOn != '0')
		{
			document[PickedImg].src = eval("img" + nMenuOn + "off.src");
		}

		//Now set the one selected
		nMenuOn = imgNum;
		document[imgName].src = eval("img" + imgNum + "on.src");
	}

}