/*
function carga_url (URL,capa) {
	$(document.getElementById(capa)).html('');
	  $(document.getElementById(capa)).load(URL,function(){
		//$(document.getElementById(capa)).slideDown("slow");
		$(document.getElementById(capa)).fadeIn(2000);
		//datos=preloaderOff();
	  });
}
*/
function carga_urlF (URL,capa) {
	//altura=document.getElementById(capa).offsetHeight;
	$(document.getElementById(capa)).slideDown("fast", function () {
	  $(document.getElementById(capa)).load(URL,function(){
		$(document.getElementById(capa)).slideDown("fast");
	  });
	});
}
function carga_url (URL,capa) {
	altura=document.getElementById(capa).offsetHeight;
	$(document.getElementById(capa)).fadeOut(1000, function () {
	  $(document.getElementById(capa)).load(URL,function(){
		$(document.getElementById(capa)).fadeIn(1000);
	  });
	});
}
function msg_change (capa,htmltext) {
	$(document.getElementById(capa)).html(htmltext);
}

function display_capas (capa,status) {
	if (status!=undefined && status!='') {
		document.getElementById(capa).style.display=status;
	} else {
		if (document.getElementById(capa).style.display=="block") {
			document.getElementById(capa).style.display="none";
		} else {
			document.getElementById(capa).style.display="block";
		}
	}
}
function visible_capas (capa,status) {	
	if (status!=undefined && status!='') {
		document.getElementById(capa).style.visibility=status;
	} else {
		if (document.getElementById(capa).style.visibility=="visible") {
			document.getElementById(capa).style.visibility="hidden";
		} else {
			document.getElementById(capa).style.visibility="visible";
		}
	}
}



function giveCSS (capa,clase) {
	$(document.getElementById(capa)).addClass(clase);
}
function removeCSS (capa,clase) {
	$(document.getElementById(capa)).removeClass(clase);
}

function popUp (URL,WIDTH,HEIGHT,NOMBRE){ 
	window.open(URL,NOMBRE,"width="+WIDTH+",height="+HEIGHT+",scrollbars=1") 
} 