//--EXPLICACIÓN:
//*********************************************************************************************
//Nombre archivo: mouseover.js
//Accion:
//						-	Funciones a raiz de pasar el mouse por encima de un enlace
//						-  .js activado desde el archivo inc_abierto.php
//*********************************************************************************************

//--CONTENIDO:
function menu_1_mouseover(a)  //Al pasar por encima de item del menu_1
{ document.getElementById("id_menu_1").innerHTML=a;
}
function menu_1_mouseout(a)  //Al salir de item del menu_1
{ document.getElementById("id_menu_1").innerHTML=a;
}

function apa_mouseover(a)  //Al pasar por Apartado X
{ elemento = "apa"+a;
	document.getElementById(elemento).style.background = "#DADADA";
}
function apa_mouseout(a)  //Al salir de apartado X
{  elemento = "apa"+a;
	document.getElementById(elemento).style.background = "white";
}

function cal_mouseover(a,b,c)  //Al pasar por calendario c= ACT o FES
{  document.getElementById("cal_texto").innerHTML = "<span style=\"color:"+b+";font-weight:bold;\"><span style=\"color:black;\">"+c+"</span>"+a+"</span>";
}
function cal_mouseout()  //Al salir del calendario
{  document.getElementById("cal_texto").innerHTML = "Pasa el cursor por las fechas";
}

function ima_mouseover(a,b,c)  //Al pasar por imagen. a = id del espacio <td> b = valor del texto. c = valor por defecto.
{        
			document.getElementById(a).innerHTML=a+"&nbsp;.&nbsp;<span style='color:#900000;'>"+b+"</span>";

}
function ima_mouseout(a,b)  //Al salir dela imagen a = id b = texto anterior.
{  document.getElementById(a).innerHTML = b;
}

function admin_mouseover(a,b,c)  //Al pasar por imagen. a = id del espacio <td> b = valor del texto. c = valor por defecto.
{		
	document.getElementById(a).innerHTML=c+"&nbsp;.&nbsp;<span style='color:#008000;font-weight:bold;'>"+b+"</span>";

}
function admin_mouseout(a,b)  //Al salir dela imagen a = id b = texto anterior.
{  document.getElementById(a).innerHTML = b;
}
function ayuda_mouseover(a,b)	//a = identificador ayuda b = texto ayuda
{	ayuda = "ay"+a;
	texto = "tx"+a;
	
	document.getElementById(ayuda).style.display="";
	document.getElementById(texto).innerHTML =b;
}
function ayuda_mouseout(a,b)	//a = identificador ayuda b = texto ayuda
{	ayuda = "ay"+a;
	document.getElementById(ayuda).style.display="none";
}

function redireccion(a,b,c,d,e)
{  //a   =  extension
	//b   =	formulario
	//c   =	valor variable
	//d   =  nombre variable
	//e   =  URL.
	forma = document.forms[b];
	
	forma.action = e + a + "&" + d + "=" + c;
	
	forma.submit();
}

function comprobar_forums(a,b)
{  forma = document.forms[a];
 	var ok = "1";
	error = "";
	if (b = "agregar_tema")
	{  if (forma.titulo_tema.value.length == 0)
	   {  var ok = "0";
	      error +="- Escriba un titulo de tema\n";
	   }
	   
	   if (ok == "0")
	   {  alert(error);
	   }
	   return ok;
	}
}

var nav4 = window.Event ? true : false;
function acceptNum_b(evt,b)
{// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57
	var key = nav4 ? evt.which : evt.keyCode;
	if (b == "agregar_tema")
	{	return (key != 34);
	}

}