/*
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 displayAdv (capa,status) {	
	/*
	if (status!=undefined && status!='') {
		if (status=='block') {
			$(document.getElementById(capa)).show(1000);
		} else {
			$(document.getElementById(capa)).hide(1000);
		}
	} else {
		if (document.getElementById(capa).style.display=="block") {
			$(document.getElementById(capa)).slideDown(1000);
		} else {
			$(document.getElementById(capa)).slideToggle(1000);
		}
	}
	*/
	//alert (document.getElementById(capa).style.display);
	$(document.getElementById(capa)).slideToggle("slow");
}
/*
$("#block").animate({ 
	width: "70%",
	opacity: 0.4,
	marginLeft: "0.6in",
	fontSize: "3em", 
	borderWidth: "10px"
  }, 1500 );
*/
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") 
} 