//   java.js
// controls images swapping
// Designed by Freetimers.com

document.onMouseUp = setTimeout("self.focus()",100);
// get rid of annoying border round links in msie.

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

if ((browserName == "Netscape" && browserVer >= "3")||(browserName == "Microsoft Internet Explorer" && browserVer >= "4"))
{
	version = "OK";
}
else
{
	version = "OLD";
}

if (version == "OK")
{
	//LINKZ - ON
	button1on = new Image(56,12);
	button1on.src = "./images/abouton.gif";
	button2on = new Image(83,12);
	button2on.src = "./images/rangeon.gif";
	button3on = new Image(112,12);
	button3on.src = "./images/orderon.gif";
	button4on = new Image(132,12);
	button4on.src = "./images/contacton.gif";

	//LINKZ - OFF
	button1off = new Image(56,12);
	button1off.src = "./images/about.gif";
	button2off = new Image(83,12);
	button2off.src = "./images/range.gif";
	button3off = new Image(112,12);
	button3off.src = "./images/order.gif";
	button4off = new Image(132,12);
	button4off.src = "./images/contact.gif";

	//LINKZ INSIDE SITE- ON
	button5on = new Image(20,20);
	button5on.src = "./images/dot.gif";
	button6on = new Image(20,20);
	button6on.src = "./images/dot.gif";
	accesbuton = new Image(20,20);
	accesbuton.src = "./images/dot.gif";
	button7on = new Image(20,20);
	button7on.src = "./images/dot.gif";
	button8on = new Image(20,20);
	button8on.src = "./images/dot.gif";
	button9on = new Image(20,20);
	button9on.src = "./images/dot.gif";

	//LINKZ INSIDE SITE- OFF
	button5off = new Image(20,20);
	button5off.src = "./images/invisible.gif";
	button6off = new Image(20,20);
	button6off.src = "./images/invisible.gif";
	accesbutoff = new Image(20,20);
	accesbutoff.src = "./images/invisible.gif";
	button7off = new Image(20,20);
	button7off.src = "./images/invisible.gif";
	button8off = new Image(20,20);
	button8off.src = "./images/invisible.gif";
	button9off = new Image(20,20);
	button9off.src = "./images/invisible.gif";
}

function img_act(imgName)
{
	if (version == "OK")
	{
		if(document.layers)
		{
			/*
			imgOn = eval(imgName + "on.src");
			document.layers.["toplinks"][imgName].src = imgOn;
			*/
		}
		else
		{
			imgOn = eval(imgName + "on.src");
			document[imgName].src = imgOn;
		}
	}
}

function img_inact(imgName)
{
	if (version == "OK")
	{
		if(document.layers)
		{
			/*
			imgOff = eval(imgName + "off.src");
			document.layers["toplinks"][imgName].src = imgOff;
			*/
		}
		else
		{
			imgOff = eval(imgName + "off.src");
			document[imgName].src = imgOff;
		}
	}
}

function doFrame(where)
{
	if(self.location.href == parent.location.href)
	{
		eval("parent.location.href='./frame.html?" + where +"';");
	}
}