var hunterR = new Image();
var hunterS = new Image();
var main = new Image();
var browser = navigator.appName; 
var rollout = "";  

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
//
function centrer()
{
//	if(browser == "Netscape")
//	{
//	}
//	else
//	{	
		document.getElementById("promo_text").style.left = findPosX(document.getElementById("promotions")) + 70 + 'px';
		document.getElementById("promo_text").style.top  = findPosY(document.getElementById("promotions")) + 30 + 'px';
		document.getElementById("promo1btn").style.left = findPosX(document.getElementById("promo1")) + 10 + 'px';
		document.getElementById("promo1btn").style.top  = findPosY(document.getElementById("promo1")) + 80 + 'px';
		document.getElementById("promo2btn").style.left = findPosX(document.getElementById("promo2")) + 10 + 'px';
		document.getElementById("promo2btn").style.top  = findPosY(document.getElementById("promo2")) + 80 + 'px';
		document.getElementById("promo3btn").style.left = findPosX(document.getElementById("promo3")) + 10 + 'px';
		document.getElementById("promo3btn").style.top  = findPosY(document.getElementById("promo3")) + 80 + 'px';
}

function launchBuild()
{
	wwBuild = window.open('http://www.rhinomotorcycles.com/trim.php', 'Build', 'top=0,left=0,width=990, height=730,scrollbars,toolbar=0,menubar=0,location=0,status=0');
	wwBuild.focus();
}


function hover(laquelle)
{
	rollout = laquelle;
	document.images[laquelle].src = "images/" + laquelle + "_mo.jpg";
}

function out(laquelle)
{
	document.images[laquelle].src = "images/" + rollout + ".jpg";
}