	// Grafico de WFG en la Home
	var baserefNav = "/images/";
	var navImg = new Array();
	var chartImg = new Array();
	var modeImg = new Array();
	var cur_chart = "ibex";
	var cur_mode = "day";
	
	var chart_map = (
		'<map name="mf_nav_bar"><area href="#" shape="rect" coords="0,1,76,15" onmouseover="switch_to_ibex(); return true" onMouseOut="window.status = \'\'; return true">'+
		'<area href="#" shape="rect" coords="77,1,154,15" onmouseover="switch_to_eurostoxx(); return true;" onMouseOut="window.status = \'\'; return true">'+
		'<area href="#" shape="rect" coords="155,1,240,15" onmouseover="switch_to_nasdaq(); return true;" onMouseOut="window.status = \'\'; return true"></map>'+
		'<map name="mf_mode_bar"><area href="#" coords="0,0,120,17" shape="rect" onmouseover="switch_to_intraday(); return true;" onMouseOut="window.status = \'\'; return true">'+
		'<area href="#" coords="121,0,240,17" shape="rect" onmouseover="switch_to_month(); return true;" onMouseOut="window.status = \'\'; return true"></map>'
	);
	
	var contact_map = (
		'<map name="co_nav_bar"><area href="#" shape="rect" coords="0,0,80,40" onmouseover="switch_to_telephone(); return true" onMouseOut="window.status = \'\'; return true">'+
		'<area href="#" shape="rect" coords="81,0,156,40" onmouseover="switch_to_email(); return true;" onMouseOut="window.status = \'\'; return true">'+
		'<area href="#" shape="rect" coords="157,0,240,40" onmouseover="switch_to_address(); return true;" onMouseOut="window.status = \'\'; return true"></map>'
	);
	
	function switch_to_ibex() { cur_chart = "ibex"; switch_chart(); }
	function switch_to_eurostoxx() { cur_chart = "eurostoxx"; switch_chart(); }
	function switch_to_nasdaq() { cur_chart = "nasdaq"; switch_chart(); }
	function switch_to_intraday() { cur_mode = "day"; switch_chart(); }
	function switch_to_month() { cur_mode = "month"; switch_chart(); }
	function switch_chart() {
		document.mf_nav.src = baserefNav + navImg[cur_chart];
		document.mf_chart.src = chartImg[cur_chart + '_' + cur_mode];
		document.mf_mode.src = baserefNav + modeImg[cur_mode];
		return;
	} // switch_chart
	function switch_to_telephone() {
		if (document.getElementById) { // DOM3 = IE5, NS6
			document.getElementById("capacontacto1").style.visibility = "visible";
			document.getElementById("capacontacto2").style.visibility = "hidden";
			document.getElementById("capacontacto3").style.visibility = "hidden";
		} else {
			if (document.layers) { // Netscape 4
				document.capacontacto1.visibility = "visible";
				document.capacontacto2.visibility = "hidden";
				document.capacontacto3.visibility = "hidden";
				
			} else { // IE 4
				document.all.capacontacto1.style.visibility = "visible";
				document.all.capacontacto2.style.visibility = "hidden";
				document.all.capacontacto3.style.visibility = "hidden";
			}
		} 	
	 }
	 
	function switch_to_email() { 
		if (document.getElementById) { // DOM3 = IE5, NS6
			document.getElementById("capacontacto1").style.visibility = "hidden";
			document.getElementById("capacontacto2").style.visibility = "visible";
			document.getElementById("capacontacto3").style.visibility = "hidden";
		} else {
			if (document.layers) { // Netscape 4
				document.capacontacto1.visibility = "hidden";
				document.capacontacto2.visibility = "visible";
				document.capacontacto3.visibility = "hidden";
				
			} else { // IE 4
				document.all.capacontacto1.style.visibility = "hidden";
				document.all.capacontacto2.style.visibility = "visible";
				document.all.capacontacto3.style.visibility = "hidden";
			}
		} 	
	}
	
	function switch_to_address() { 
		if (document.getElementById) { // DOM3 = IE5, NS6
			document.getElementById("capacontacto1").style.visibility = "hidden";
			document.getElementById("capacontacto2").style.visibility = "hidden";
			document.getElementById("capacontacto3").style.visibility = "visible";
		} else {
			if (document.layers) { // Netscape 4
				document.capacontacto1.visibility = "hidden";
				document.capacontacto2.visibility = "hidden";
				document.capacontacto3.visibility = "visible";
				
			} else { // IE 4
				document.all.capacontacto1.style.visibility = "hidden";
				document.all.capacontacto2.style.visibility = "hidden";
				document.all.capacontacto3.style.visibility = "visible";
			}
		} 	
	}
	


	function init_all(path) {
		navImg['ibex'] = "topnav-ibex.gif"
		navImg['eurostoxx'] = "topnav-eurostoxx.gif"
		navImg['nasdaq'] = "topnav-nasdaq.gif"
		
		chartImg['ibex_day'] = path + "/grafica.php?cf=50107012&tipo=INT"
		chartImg['eurostoxx_day'] = path + "/grafica.php?cf=50190656&tipo=INT"
		chartImg['nasdaq_day'] = path + "/grafica.php?cf=50131017&tipo=INT"
		
		chartImg['ibex_month'] = path + "/grafica.php?cf=50107012&tipo=HIST"
		chartImg['eurostoxx_month'] = path + "/grafica.php?cf=50190656&tipo=HIST"
		chartImg['nasdaq_month'] = path + "/grafica.php?cf=50131017&tipo=HIST"
		
		modeImg['day'] = "bottomnav-intraday.gif";
		modeImg['month'] = "bottomnav-3monate.gif";
		
		for (i=0; i < navImg.length; i++) {
			var temp = new Image();
			temp.src = baserefNav + navImg[navImg[i]];
		}
		for (i=0; i < chartImg.length; i++) {
			var temp = new Image();
			temp.src = chartImg[chartImg[i]];
		}
		for (i=0; i < modeImg.length; i++) {
			var temp = new Image();
			temp.src = baserefNav + modeImg[modeImg[i]];
		}
	} // init_all

	
