if (document.images)
{
	buthoffen = new Image(216,68); buthoffen.src = "/images/button_down_en.gif";
	buthonen = new Image(216,68); buthonen.src = "/images/button_up_en.gif";
	
	buthoffru = new Image(216,68); buthoffru.src = "/images/button_down_ru.gif";
	buthonru = new Image(216,68); buthonru.src = "/images/button_up_ru.gif";
	
	butmoffen = new Image(216,68); butmoffen.src = "/images/button_down_moz_en.gif";
	butmonen = new Image(216,68); butmonen.src = "/images/button_up_moz_en.gif";
	
	butmoffru = new Image(216,68); butmoffru.src = "/images/button_down_moz_ru.gif";
	butmonru = new Image(216,68); butmonru.src = "/images/button_up_moz_ru.gif";
}

function imgover(lang, source)
{
		eval("document['install" + source + "'].src = but" + source + "on" + lang + ".src");
}

function imgout(lang, source)
{
		eval("document['install" + source + "'].src = but" + source + "off" + lang + ".src");
}

function install(ev)
{
	try
	{
		if ( ev.target.parentNode.href )
		{
			if (!ev.target.parentNode.href.match(/^.+\.xpi$/))
			{
				return false;
			}
			
			var params = new Array();
			params['Serp-Easy-Surf'] = {
				URL: ev.target.parentNode.href,
				toString: function () { return this.URL; }
			};

			InstallTrigger.install(params);
		}
		else
		{
			if (!ev.target.href.match(/^.+\.xpi$/))
			{
				return false;
			}
			
			var params = new Array();
			params['Serp-Easy-Surf'] = {
				URL: ev.target.href,
				toString: function () { return this.URL; }
			};

			InstallTrigger.install(params);
		}
	}
	catch(e)
	{
	}

	return false;
}