// JavaScript Document

window.addEvent('domready', function(){
									 	
	if($('botonRecupera')){		
			$('botonRecupera').addEvent('click',function (){
					recupera();			
			});	
	}
	 
	if($('box2')){
		new viewer($$('#box2 img)'),{ mode: 'alpha',interval: 5000}).play(true);
	}
	if($('caja')){
			var scrollBox1 = new MooScroll({selector:'#caja'});									
		}

	
	
});


function recupera(){
	c = $('loading');
	a=$("usuario");
	if(a.value==""){ a.focus(); return false;}
}
function hijosF(){
	a=$('hijos');
	c=$('numerohijos');
	var req_ = new Request({
                        url: '../../llamada.php?im=padres_hijos',
                        method: 'post',
						data: { 'pr': '1', 'v1': a.value  },
						onRequest: function(){ c.set('html','<p style="text-align:center;">Espere por favor<span><img src="http://www.jk2web.com/imagenes/esperando.gif" width="12"/></span></p>'); },
                        onFailure: function(xhr) {
                            alert(xhr.status + '\n' + xhr.statusText);
                        },
                        onSuccess: function(responseText) {						
                          $('numerohijos').set('html',responseText);
							  
                        }
                    });
	req_.send();	
	
}
function hijosFEX(){
	a=$('hijos');
	c=$('numerohijos');
	var req_ = new Request({
                        url: '/llamada.php?im=exalumnos_hijos',
                        method: 'post',
						data: { 'pr': '1', 'v1': a.value  },
						onRequest: function(){ c.set('html','<p style="text-align:center;">Espere por favor<span><img src="http://www.jk2web.com/imagenes/esperando.gif" width="12"/></span></p>'); },
                        onFailure: function(xhr) {
                            alert(xhr.status + '\n' + xhr.statusText);
                        },
                        onSuccess: function(responseText) {						
                         c.set('html',responseText);
							  
                        }
                    });
	req_.send();	
	
}

function drh(i){
	a=$('hijo'+i);
	if(a.getStyle('display')=="none"){
		a.setStyle('display','block');
	}else{
		a.setStyle('display','none');
	}
	
}

function abrirVentana(pagina,alto,ancho){
	
	TB_show("", pagina+"?keepThis=true&TB_iframe=true&height="+alto+"&width="+ancho, "W");
	//www.tes.edu.ec/galeria/34/llamada.php?horario=1&keepThis=true&TB_iframe=true&height=420&width=650
}