function ajuste() {

	var altBody = window.frames.frmContenido.document.body.offsetHeight;
	var altFRM = window.frames.frmContenido.document.body.scrollWidth;
	var altFinal = altFRM - altBody + 100;
	
	window.document.getElementById('frmContenido').height = altFinal;
    
}





function mostrar_elemento( id )
    {

    if( window.document.getElementById( id ) )
        {

        var mostrar = window.document.getElementById( id ) ;

        mostrar.style.visibility = 'visible' ;

        }
    }





function ocultar_elemento( id )
    {

    if( window.document.getElementById( id ) )
        {


        var ocultar = window.document.getElementById( id ) ;


        ocultar.style.visibility = 'hidden' ;

        }

    }



    function MM_openBrWindow( theURL , winName , features )
        { //v2.0
              window.open(theURL,winName,features);
            
        
        

    // Maximizar Ventana por Nick Lowe (nicklowe@ukonline.co.uk)
    window.moveTo( 0 , 0 ) ;

    if ( document.all )
        {
        
        top.window.resizeTo( screen.availWidth , screen.availHeight ) ;

        }
    else if( document.layers || document.getElementById )
        {

        if( top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth )
        {
        
        top.window.outerHeight = screen.availHeight ;
        
        top.window.outerWidth = screen.availWidth ;

        }
    }

        }



function lTrim( sTexto )
    {

    var p1 = sTexto;

    var sCadenaSinBlancos = "";

    x = 0 ;

    while( x < p1.length && p1.charAt( x ) == " " )

   	x++ ;



	while( x < p1.length )
        {

        sCadenaSinBlancos += p1.charAt( x ) ;

        x++ ;

        }

	return  sCadenaSinBlancos ;

    }



function rTrim( sTexto )
    {

    var p1 = sTexto ;

    var sCadenaSinBlancos = "" ;

    x = p1.length - 1 ;

    while( x >= 0 && p1.charAt( x ) == " " )

   	x-- ;



	x1 = 0 ; x++ ;

	while( x1 < x )
        {

        sCadenaSinBlancos += p1.charAt ( x1 ) ;

        x1++ ;

        }

	return  sCadenaSinBlancos ;

    }


function Trim( sTexto ) { return( lTrim( rTrim( sTexto ) ) ) ; }



function foto( id , fotoURL , volverURL , alt )
{


var xhr;
xhr = createInstance();
xhr.open("POST","../../inc/mostrar.foto.php",false);
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xhr.send("foto="+fotoURL+"&volver="+volverURL+"&alt="+alt);

contenedor = window.document.getElementById( id ) ;

contenedor.innerHTML = xhr.responseText;

contenedor.style.visibility = 'visible';


}


function createInstance() {
		if (window.XMLHttpRequest) {
			return new XMLHttpRequest();
		}
		else if (window.ActiveXObject) {
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
	}



    function vermenu(xidActividad)
   {
           if(xidActividad=="filosofia"){
                document.frmSumenu.txtfilosofia.value = xidActividad;

           }
           if(xidActividad=="shi"){
                document.frmSumenu.txtShi.value = xidActividad;

           }
           if(xidActividad=="horario"){
                document.frmSumenu.txtHorarios.value = xidActividad;

           }
           if(xidActividad=="galeria"){
                document.frmSumenu.txtGaleria.value = xidActividad;

           }

           document.frmSumenu.action = "yoga.php";
           document.frmSumenu.submit();
   }

   function cerrar() {
   window.open('','_self');
   window.close();
   }



