$(document).ready(function(){	$('.ext_selector a').click(function(event){		$('.ext_actual').html($(this).html());		$('#fd_ext').val($(this).attr('title'));		$('.ext_selector').slideUp('fast');		event.preventDefault();	});		$('.ext_actual').click(function(event){		$('.ext_selector').slideToggle("fast");		event.preventDefault();	});		$('.ext_selector_container').mouseleave(function() {		$('.ext_selector').slideUp('fast');	});});


function c(id){
	if (id=="id1" || id=="id2" || id=="id3"|| id=="id6"|| id=="id7" || id=="id10" || id=="id11"){
	document.getElementById(id).style.backgroundPosition="0 -30px";
	}else if(id=="id4"){
	document.getElementById(id).style.backgroundPosition="0 -210px";
	}else if(id=="id5" || id=="id8" || id=="id9"){
	document.getElementById(id).style.backgroundPosition="-187px -360px";
	}
}
function r(id){
	if (id=="id1" || id=="id2" || id=="id3" || id=="id6"|| id=="id7" || id=="id10" || id=="id11"){
	document.getElementById(id).style.backgroundPosition="0 0";
	}else if(id=="id4"){
	document.getElementById(id).style.backgroundPosition="0 -60px";
	}else if(id=="id5" || id=="id8" || id=="id9"){
	document.getElementById(id).style.backgroundPosition="0 -360px";
	}
}


$(function() {
    var button = $('#loginButton');
    var box = $('#loginBox');
    var form = $('#loginForm');
    button.removeAttr('href');
    button.mouseup(function(login) {
        box.toggle();
        button.toggleClass('active');
    });
    form.mouseup(function() { 
        return false;
    });
    $(this).mouseup(function(login) {
        if(!($(login.target).parent('#loginButton').length > 0)) {
            button.removeClass('active');
            box.hide();
        }
    });
});

function objetoAjax(){
	var xmlhttp=false;
	try {
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
		   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			xmlhttp = false;
  		}
	}
 
	if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
		xmlhttp = new XMLHttpRequest();
	}
	return xmlhttp;
}

function $$(el) {  return document.getElementById(el);	}

function Loginn() {


    $$('ReportLoginn').innerHTML= '<center><br /><img src="http://www.inkawebdesign.com/images/loading.gif" alt="Procesando"> Procesando ...</center>';

    MiAjax=objetoAjax();
    var url = "http://www.inkawebdesign.com/Login-ajax.php";
    MiAjax.open("POST", url, true);
    MiAjax.onreadystatechange = function() {

      if (MiAjax.readyState == 4) {
    	  if (MiAjax.status == 200) {
    		var Respuesta = MiAjax.responseText;
			$$('ReportLoginn').style.display = "block";
    		$$('ReportLoginn').innerHTML = Respuesta;

    	  }
      }
    }

    MiAjax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    MiAjax.send("email="+$$('email').value+"&password="+$$('password').value);
}


function CerrarReportLoginn() {
    $$('ReportLoginn').style.display = "none";
};

