var triathlonRollOversI = new Image;
var triathlonRollOvers = new Array('images/charts/triathlon_one.gif','images/charts/triathlon_two.gif')
for(var r=0;r<triathlonRollOvers.length;r++){
	triathlonRollOversI.src = triathlonRollOvers[i];
}

function swapBikeImage(el){
	// Array(ThumbnailImage, UseChart, OrigBGImage, NewBGImage, Array(Materials),weightChartNumber)
 var diamas_slx = new Array('images/triathlon/kameha_slx_sm.jpg','one',Array('materials_c'),1); 
 var diamas_sl = new Array('images/triathlon/kameha_sl_sm.jpg','two',Array('materials_c'),2);

 var mnu = new Array('kameha_slx','kameha_sl');


 for(var i=0;i<mnu.length;i++){
	 getElement(mnu[i]).className = eval(mnu[i]+"[1]");
	 getElement("weight"+ (i+1) ).src = "images/charts/triathlonweight/"+ (i+1) +"off.gif";
 }

 var bikeEl = getElement('bike_sm');
	 bikeEl.src = eval(el+"[0]");
	
	 getElement(el).className = eval(el+"[1]+\"active\"");
	 
 var elWeight = eval(el+"[3]");	 
	 getElement("weight"+ elWeight).src = "images/charts/triathlonweight/"+ elWeight +"on.gif";

	 resetMaterials();

 var materials = eval(el+"[2]");
	for(var i=0;i<materials.length;i++){
		var tmpEl = getElement(materials[i]);
		tmpEl.style.color='#47A3D4';
		tmpEl.style.fontWeight='bold';
	}
	
	getElement('chart').src = eval("\"images/charts/triathlon_\"+"+el+"[1]+\".gif\"");

}

	function resetMaterials(){
		var materials = new Array('materials_c','materials_tc','materials_t','materials_s');
		for(var i=0;i<materials.length;i++){
			getElement(materials[i]).style.color='#CCCCCC';
			getElement(materials[i]).style.fontWeight="normal";
		}
		return true;
	}
	
