function main() {
	if(crnt!=null) resetCrnt();
	}

// Fonction générale de rollovers
function rollIO(id,state) {
	if(id != crnt) 	eval("document." + id + ".src = \'/BRPHtml/XTeam/" + crntLang + "/images/bt_" + id + "_" + state + ".gif\'");
	}

function resetCrnt() {

	eval("document." + crnt + ".src = '/BRPHtml/XTeam/" + crntLang + "/images/bt_" + crnt + "_on.gif\'");
	}

function goRacer()
	{
	if (document.racerChanger.racers.options[document.racerChanger.racers.selectedIndex].value != "none")
		{
		location = document.racerChanger.racers.options[document.racerChanger.racers.selectedIndex].value
		}
	}
function goTeam()
	{
	if (document.TeamChanger.Team.options[document.TeamChanger.Team.selectedIndex].value != "none")
		{
		location = document.TeamChanger.Team.options[document.TeamChanger.Team.selectedIndex].value
		}
	}
	
function racerNav(incr)
	{
	var index = null;
	var racerMin = 2;
	var racerMax = document.racerChanger.racers.options.length-1;
	var racerNewIndex = document.racerChanger.racers.selectedIndex + incr;
	
	if (racerNewIndex > racerMax){ index = racerMin; }
	else if (racerNewIndex < racerMin){ index = racerMax; }
	else { index = racerNewIndex; }
	location.href = document.racerChanger.racers.options[index].value
	}

function setDropValue() {
/*
Note: This function has been replaced by a "nothing to set" function at the bottom of each racer pages
*/
	document.racerChanger.racers.selectedIndex=dropValue;
}


	
function popwin(url,name,width,height,center,top,left,scroll,resize)
/*
url = URL of the document
name = Name of the window object
width = Width of the window object
height = Height of the window object
center = boolean (1 = centered, 0 = top/left positionning)
top = Top position of the window (can be negative for centered windows)
left = Left position of the window (can be negative for centered windows)
scroll = boolean (1 = with scrolls, 0 = no scrolls)
resize = boolean (1 = resizable, 0 = not resizable)
*/
	{
	if (center==1)
		{
		var winleft = parseInt((screen.width - width ) / 2 + left);
		var wintop = parseInt((screen.height - height) / 2 + top);
		}
	else
		{
		var winleft = left;
		var wintop = top;
		}
//	alert("winleft:" + winleft + "\nwintop:" + wintop);
	window.open(url,name,"width=" + width + ",height=" + height + ",top=" + wintop + ",left=" + winleft + "menubar=0,status=0,scrollbars=" + scroll + ",resizable=" + resize + ",toolbar=0,location=0,directories=0").focus();
	}

function goImgWin(myImage,myWidth,myHeight) 
{
	TheImgWin = window.open(myImage,'image','height=' + myHeight + ',width=' + myWidth +
	',toolbar=yes,directories=yes,status=no,' + 'menubar=yes,scrollbars=yes,resizable=yes');

	TheImgWin.document.write('<html><body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">');
	TheImgWin.document.write('<img src=' + myImage + '>');
	TheImgWin.document.write('</body></html>');
	TheImgWin.focus();
}

