/* -------------------------------------------------------------------------------------------------------------- */
/* Funciones de manejo de Menu */
var menu_images = new Array();

function loadMenu(id){
	sfHover = function() {
		var sfEls = document.getElementById(id).getElementsByTagName("LI");
		menu_images["home"] = new Image();
		menu_images["home"].src = '__includes__/__templates__/frontend/imagenes/home/main_home_in.jpg';
		for (var i=0; i<sfEls.length; i++) {
			if (sfEls[i].id != undefined && sfEls[i].id != ""){
				if (document.images["imas_home"]){
					menu_images[sfEls[i].id] = new Image();
					menu_images[sfEls[i].id].src = '__includes__/__templates__/frontend/imagenes/home/'+ sfEls[i].className +'_in.jpg';
				}
					sfEls[i].onmouseover=function() {
						if (document.images["imas_home"]){
							document.images["imas_home"].src = menu_images[this.id].src;
						}
						var elm = this.getElementsByTagName("UL");
						elm[0].style.display = "block";
					}
					sfEls[i].onmouseout=function() {
						if (document.images["imas_home"]){
							document.images["imas_home"].src = menu_images['home'].src;
						}
						var elm = this.getElementsByTagName("UL");
						elm[0].style.display = "none";
					}
			}
		}
	}
	sfHover();
}

function tv_turfhistorico(url){
	window.open("tv_turf_historico.php?url="+url,"hapsatv","width=398,height=535");

	//__includes__/__templates__/frontend/hapsatv_demo1.html
}

function tv_turfhistoricoF(url){
	window.open("tv_turf_historicof.php?url="+url,"hapsatv","width=420,height=500");
}

function tv_turfvivo(url){
	window.open("tv_turf_vivo.php?url="+url,"hapsatv","width=398,height=535");

	//__includes__/__templates__/frontend/hapsatv_demo1.html
}

/* GENERAL / INICIALIZACION ----------------------------------------------------------------------------*/
function iniciar(){
	loadMenu('menuNav'); // ID de la lista UL del menu
	if (window.initScroll) initScroll();
	if (window.applyRollOverTables) applyRollOverTables();
}
iens6=document.all||document.getElementById;
ns4=document.layers;
if (window.attachEvent) window.attachEvent("onload"	, iniciar);
window.onload = iniciar;

/* -------------------------------------------------------------------------------------------------------------- */

function selecc_tipo(id){
	if ( id != 2 ) 
		window.location="registro.php?u=1"
	else
		window.location="registro.php?u=2"
}


