
//NO MOVER ESTE CODIGO INFERIOR
function getHTTPObject() {
    var xmlhttp;
    /*@cc_on
    @if (@_jscript_version >= 5)
       try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
          try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) { xmlhttp = false; }
       }
    @else
    xmlhttp = false;
    @end @*/
    if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
       try {xmlhttp = new XMLHttpRequest();
       } catch (e) { xmlhttp = false; }
    }return xmlhttp;}

var enProceso = false; // lo usamos para ver si hay un proceso activo
var http = getHTTPObject(); // Creamos el objeto XMLHttpRequest
//NO MOVER EL CODIGO SUPERIOR

//PROCESO QUE INVOCARA EL METODO DE AJAX
function Consultas(destino,valor) {
    if (!enProceso && http) {
       var url = "cat.php?cat=" + cat;
       http.open("GET", url, true);
       http.onreadystatechange = GetData;
       enProceso = true;
       http.send(null);
    }
}
function ro(cual){
	$(cual).style.backgroundImage='url(img/bot/bo_up.jpg)';
	$(cual).style.color='#000';
	}
function ro1(cual){
	$(cual).style.backgroundImage='url(img/bot/bo_ov.jpg)';
	$(cual).style.color='#fff';
	}
function GetData(){
    //proceso completado
    if (http.readyState == 4) {
        //sin error, se mandan datos al select
       if (http.status == 200) {
            //todo perfecto, escribiendolos
          if (http.responseText.indexOf('invalid') == -1) {
              //separamos el control de los datos
              results = unescape(http.responseText.split("|"));
            //en Results[0], estara el nombre del control que tendra los datos
            //en Results[1], se encontraran todos los valores
              document.getElementById(results[0]).innerHTML = results[1];
            //Cerramos el proceso
              enProceso = false;}}
        //en caso de error
        else{ alert("Error en la recepcion de datos")
              enProceso = false;}}}
function show5(){
if (!document.layers&&!document.all&&!document.getElementById)
	return
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12){
	dn="PM"
	hours=hours-12
}
if (hours==0)
	hours=12
if (minutes<=9)
	minutes="0"+minutes
if (seconds<=9)
	seconds="0"+seconds
myclock="<font size='1' face='verdana' ><b><font size='1'></font></br>"+hours+":"+minutes+":"
+seconds+" "+dn+"</b></font>"
if (document.layers){
	document.layers.liveclock.document.write(myclock)
	document.layers.liveclock.document.close()
}
else if (document.all)
	liveclock.innerHTML=myclock
else if (document.getElementById)
	document.getElementById("liveclock").innerHTML=myclock
setTimeout("show5()",1000)
}

function cambia(id,n){
		
		document.getElementById('grande').style.backgroundImage="url(images/images_n/"+n+")";
		
	}

Fx.Font = new Class({
	initialize: function(elements, sid, gid, growsize){
		this.growsize = (growsize) ? growsize : 2;
		this.elements = [];
 		elements.each(function(el){
			this.elements.push([el,el.getStyle('font-size').toInt()]);
		},this);
		$(gid).onclick = function(){this.grow()}.bind(this);
		$(sid).onclick = function(){this.shrink()}.bind(this);
	},
	grow: function(){
		this.elements.each(function(el){
			if(el[0].getStyle('font-size').toInt() == el[1])
				el[0].effect('font-size',{duration:300,unit:'px'}).custom(el[1],el[1]+this.growsize);
		},this);
	},
	shrink: function(){
		this.elements.each(function(el){
			if(el[0].getStyle('font-size').toInt() == el[1]+this.growsize)
				el[0].effect('font-size',{duration:300,unit:'px'}).custom(el[1]+this.growsize, el[1]);
		},this);
	}
});

var url="http://www.revistareto.com.ar" 
	var titulo="Revista reto - La primer revista del deporte adaptado"
	function agregar(){
	if (document.all)
	window.external.AddFavorite(url,titulo)
	}
	
	
function pepe(nota,pos){
	
	
	new Windoo({
		width: 550,
		height: 492,
		top:pos,
		title: 'Enviar nota por mail',
		type: 'iframe',
		position: 'left',
		shadow: false,
		container: false,
		destroyOnClose: true,
		theme:'aero',
		buttons: {menu: false},
		ghost: {resize: false, move: false},
		url: 'envia_amigo.php?cual='+nota,

		onBeforeClose: function(){
			url: 'envia_amigo.php?cual=<?=$cual?>'
		}
	}).show();
}
function pepe1(pos){
	new Windoo({
		width: 550,
		height: 350,
		position: 'left',
		left:50,
		top:pos,
		title: 'Recomendar este sitio',
		type: 'iframe',
		shadow: false,
		container: false,
		destroyOnClose: true,
		theme:'aero',
		buttons: {menu: false},
		ghost: {resize: false, move: false},
		url: 'recomienda_amigo.php',

		onBeforeClose: function(){
			url: 'envia_amigo.php?cual=<?=$cual?>'
		}
	}).show();
}
function pepe2(pos){
	new Windoo({
		width: 550,
		height: 430,
		position: 'left',
		top: pos,
		left:50,
		title: 'Registro de usuarios',
		type: 'iframe',
		shadow: false,
		container: false,
		destroyOnClose: true,
		theme:'aero',
		buttons: {menu: false},
		ghost: {resize: false, move: false},
		url: 'registro.php',

		onBeforeClose: function(){
			url: 'regUsuario.php'
		}
	}).show();
}
function pepe3(usuario,nota,pos){
	
	new Windoo({
		width: 550,
		height: 400,
		position: 'left',
		top: pos,
		left:50,
	//	top: 350,
	//	left:50,
		title: 'Registro de usuarios',
		type: 'iframe',
		shadow: false,
		container: false,
		destroyOnClose: true,
		theme:'aero',
		buttons: {menu: false},
		ghost: {resize: false, move: false},
		url: 'comentario.php?u='+usuario+'&n='+nota,

		onBeforeClose: function(){
			url: 'comentario.php'
		}
	}).show();
}
function pepe4(pos){
	new Windoo({
		width: 550,
		height: 280,
		position: 'left',
		top: pos,
		left:50,
		title: 'Recuperación de password',
		type: 'iframe',
		shadow: false,
		container: false,
		destroyOnClose: true,
		theme:'aero',
		buttons: {menu: false},
		ghost: {resize: false, move: false},
		url: 'olvide.php',

		onBeforeClose: function(){
			url: 'olvide.php'
		}
	}).show();
}
function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=550,height=500,left = 390,top = 262');");
}
function raton(e){
// capture the mouse position
    var posx = 0;
    var posy = 0;
    if (!e) var e = window.event;
    if (e.pageX || e.pageY)
    {
        posx = e.pageX;
        posy = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
        posx = e.clientX;
        posy = e.clientY;
    }
	return posy;
}
function registroAbajo(){
	posy=$('ra').style.top;
	return posy;
	}
function recomendar(){
	posy=$('botRecomendar').style.top;
	return posy;
	}
