//Función para el cambio de color de celdas

function mOvr(src,id) {

	document.getElementById("TD"+id+"_"+src).bgColor = '#FAFBD0';

	}



function mOut(src,color,id) {

	document.getElementById("TD"+id+"_"+src).bgColor = color;

}



function mOvrPA(src,i) {

	document.getElementById("TPA1_"+src+"_"+i).bgColor = '#FAFBD0';

	document.getElementById("TPA2_"+src+"_"+i).bgColor = '#FAFBD0';

	document.getElementById("TPA3_"+src+"_"+i).bgColor = '#FAFBD0';

	document.getElementById("TPA4_"+src+"_"+i).bgColor = '#FAFBD0';

	document.getElementById("TPA5_"+src+"_"+i).bgColor = '#FAFBD0';

	}



function mOutPA(src,color,i) {

	document.getElementById("TPA1_"+src+"_"+i).bgColor = color;

	document.getElementById("TPA2_"+src+"_"+i).bgColor = color;

	document.getElementById("TPA3_"+src+"_"+i).bgColor = color;

	document.getElementById("TPA4_"+src+"_"+i).bgColor = color;

	document.getElementById("TPA5_"+src+"_"+i).bgColor = color;

}



//función que crea el objeto XMLHTTP

function nuevoAjax()

{ 

	var xmlhttp=false; 

	try 

	{ 

		// Creacion del objeto AJAX para navegadores no IE

		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 

	}

	catch(e)

	{ 

		try

		{ 

			// Creacion del objet AJAX para IE 

			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 

		} 

		catch(E) { xmlhttp=false; }

	}

	if (!xmlhttp && typeof XMLHttpRequest!='undefined') { xmlhttp=new XMLHttpRequest(); } 



	return xmlhttp; 

} 



//AYUDA 

function show_help(title,texto,ejemplo){

	document.getElementById("output").style.visibility = "visible";

	if(ejemplo.length<=0){

		var ex = "&nbsp;";

		ejemplo = "&nbsp;";

	}

	else{

		var ex = '<strong>Ejemplos:</strong><br>';

	}

	//obtenemos la posicion del puntero, para mostrar la capa en ese lugar

	posicX = event.clientX + document.body.scrollLeft; 

	posicY = event.clientY + document.body.scrollTop

	if (posicX < 0) {posicX = 0}; 

	if (posicY < 0) {posicY = 0}; 

	document.getElementById("output").style.left=posicX + 30;

	document.getElementById("output").style.top=posicY + -100;

	campo = '<table width="250" border="0" align="center" cellpadding="2" cellspacing="1" class="a2lineas">';

	campo = campo + '<tr><td width="100%" class="marcoUPyDWN2"><strong>'+title+'</strong></td><td class="marcoUPyDWN2">'

	campo = campo + '<img src="../img/cerrar.jpg" alt="Cerrar" onClick="hide_layer();" style="cursor:hand">'

	campo = campo + '</td></tr><tr><td class="adminjobs" colspan="2">'+texto+'</td></tr>';

	campo = campo + '<tr><td colspan="2">'+ex+ejemplo+'</td></tr>'

	campo = campo + '</table>';

	document.getElementById("output").innerHTML = campo;

	return false;

}

 

//funcion que oculta todas las capas

function hide_layer(TD1,TD2,TD3,TD4){

	document.getElementById("output").style.visibility = "hidden";

}


