function Fondo(ids, eventos){

var evento = eventos;
var id = ids;	 
	if (evento == 'over' ){
	Spry.Utils.addClassName(''+id+'','fondo');
	}
	if(evento == 'out'){
	Spry.Utils.removeClassName(''+id+'','fondo');
	}
}

function Fondos(campoId, evento, classNew, classOld){
	 
	if (evento == 'A' ){
	Spry.Utils.removeClassName(''+campoId+'',classOld);
	Spry.Utils.addClassName(''+campoId+'',classNew);
	}
	if (evento == 'D'){
	Spry.Utils.removeClassName(''+campoId+'',classNew);
	Spry.Utils.addClassName(''+campoId+'',classOld);
	} 
}

function Vinculo(vinculos){ 
var vinculo = vinculos;
window.location.href=""+vinculo+"";

 }

function Mensaje(text){ 
alert(text);


 }
function Popup(url, width, height){	

window.open(""+url+"","target=blank","toolbar=null,scrollbars=YES,location=null,statusbar=null,menubar=yes,      resizable=null,width="+width+",height="+height+",left=80,top=");void(null);
}

function Popup2(direccion){	
var url = direccion;
window.open(""+url+"","toolbar=null,scrollbars=YES,location=null,statusbar=null,menubar=yes,      resizable=null,width=450,height=600,left=,top=");void(null);
}

function borrarElement(contenedor, elementoId){
	RemoveElement = document.getElementById(contenedor); 
   	RemoveElement.removeChild(document.getElementById(elementoId)); 

}

function recargar(){
	window.location.reload();
}

function ActivarElemento(CampoID,tipo){
	var Activando  = document.getElementById(CampoID);
	if (tipo == 'Desactivar'){
		Activando.style.display="none";
	}
	if (tipo == 'Activar'){
		Activando.style.display="";
	}
}

function Centrar() {
	iz=(screen.width-document.body.clientWidth) / 2;
	de=(screen.height-document.body.clientHeight) / 3;
	moveTo(iz,de);
}

function eliminarReg(Campo_id, Metodos, Archivos){

var id      = Campo_id;
var metodo  = Metodos;
var archivo = Archivos

	ajax=nuevoAjax();
	ajax.open("POST", archivo, true); 
	ajax.onreadystatechange=function() {
				if (ajax.readyState==4)			
				{
				window.location.reload();
				} 
	}
	ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	ajax.send("id="+id+"&metodo="+metodo+"&archivo="+metodo+"")
}

function VolverA(){
		history.back();	
	}


