
function StartMeUp ()
{
	document.getElementById("Player1").controls.Play();
}

function Pausar() 
{
	document.getElementById("Player1").controls.Pause();
} 

function ShutMeDown ()
{
	document.getElementById("Player1").controls.Stop();
}

function CambioImagen(Boton,Imagen)
{

	document.getElementById(Boton).src=Imagen;
}
                    
function MM_openBrWindow(theURL,winName,features) 
{ 
	window.open(theURL,winName,features);
}

function KeyDownHandlerFix(e,btn)	{  
	// process only the Enter key  
	if(e && e.which){   
		characterCode = e.which  
	} else {  
		characterCode = e.keyCode;  
	}  
	if (characterCode == 13)	{  
	   // cancel the default submit  
       e.returnValue=false;  
       e.cancel = true;  
       // submit the form by programmatically clicking the specified button  
       btn.click();  
     }  
}  

function KeyDownHandler(e,btn)	{  
	// process only the Enter key  
	if(e && e.which){   
		characterCode = e.which  
	} else {  
		characterCode = e.keyCode;  
	}  
	if (characterCode == 13)	{  
	   // cancel the default submit  
       e.returnValue=false;  
       e.cancel = true;  
       // submit the form by programmatically clicking the specified button  
       btn.click();  
     }  
}  

function KeyDownHandlerVal(btn)
{
	// process only the Enter key
	if (event.keyCode == 13) 
	{
		// cancel the default submit
		event.returnValue=false;
		event.cancel = true;
		// submit the form by programmatically clicking the specified button
		btn.click();
	}
}

function ZoomImagen(x,y,ruta,referencia)  
{ 
	window.opener=self; 
	window.open(ruta + '/Imagen.aspx?Imagen='+ referencia + '&ancho=' + x,null,"resizable = 0, width=" + x + ",height=" + y);
}

//Función para desplegar los menus de la izquierda
function sfHoverMenuDesplegable()  
{ 

	if (document.getElementsByName("panel_izquierdo").length> 0) 
	{
		var sfEls = document.getElementById("panel_izquierdo").getElementsByTagName("li"); 
		for (var i=0; i<sfEls.length; i++) 
		{ 
			sfEls[i].onmouseover=function() { this.className+=" sfhover"; } 
			sfEls[i].onmouseout=function()  { this.className=this.className.replace(new RegExp(" sfhover\\b"),"");} 
		}
	} 
} 


//Función para desplegar los menus de la derecha
function sfHoverMenuDesplegableDerecha()  
{ 

	if (document.getElementsByName("panel_derecho").length> 0) 
	{
		var sfEls = document.getElementById("panel_derecho").getElementsByTagName("li"); 
		for (var i=0; i<sfEls.length; i++) 
		{ 
			sfEls[i].onmouseover=function() { this.className+=" over"; } 
			sfEls[i].onmouseout=function()  { this.className=this.className.replace(" over","");}											  
		}
	} 
} 

//Función para desplegar los menus del localizador
function sfHoverMenuDesplegableLocalizador()  
{ 

	if (document.getElementsByName("localizador").length> 0) 
	{
		var sfEls = document.getElementById("localizador").getElementsByTagName("li"); 
		for (var i=0; i<sfEls.length; i++) 
		{ 
			sfEls[i].onmouseover=function() { if (this.className!="separador") this.className+=" over"; } 
			sfEls[i].onmouseout=function()  { if (this.className!="separador") this.className=this.className.replace(" over","");}
		}
	} 	
} 


//sacado de generalweb para los scripts de los menus como el de futuver
function sfHoverMenuFutuver() 
{ 
	var sfEls = document.getElementById("barrapanel_panel_opciones").getElementsByTagName("a"); 
	for (var i=0; i<sfEls.length; i++) 
	{ 
		sfEls[i].onmouseover=function() 
							 {
								this.className="efectobrillo";
								var sfEls2 = document.getElementById("barrapanel_panel_opciones").getElementsByTagName("a");
								for (var i2=0; i2<sfEls.length; i2++) 
								{
									if (this.value!=i2)sfEls[i2].className="Quitarefectobrillo";
								}
								document.getElementById("_jj"+this.value).className="panel_visible"; 
								document.getElementById("comodin").className="panel_invisible"; 
								for (var nn=0; nn<sfEls.length; nn++)
								{
									if (nn!=this.value) document.getElementById("_jj"+nn).className="panel_invisible"; 
								} 
							}
	}
}

function infoscroll(nombre)  
{ 
	window.status="-- " + nombre+ " --"; 
	var cmd="infoscroll('"+ nombre + "')";
    timerTwo=window.setTimeout(cmd,200); 
} 

/*Muestra el control*/
function ShowPartOculta(mostrar,ocultar)
{

	document.getElementById(mostrar).style.display="none";
	document.getElementById(ocultar).style.display="block"; 
}

/*Oculta el control*/
function ShowPartVisible(mostrar,ocultar)
{

	document.getElementById(ocultar).style.display="none";
	document.getElementById(mostrar).style.display="block";
}
