
//***** Funcion externa fija el div dependiendo del css tefijo('id_div')******
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('8 16(z){q=z;b 2={f:g(h.K)==\'L\',j:3.d!=M&&3.d.A,6:3.N?3.N(q):3.O?3.O[q]:3.s[q]};2.P=8(){2.k=2.f?17:2.j?3.d.Q:3.l.Q;7(2.B>0)2.k+=2.B;t{2.k+=(2.j?3.d.A:2.f?h.K-C:3.l.A)-2.R-2.6.18}2.m=2.f?19:2.j?3.d.S:3.l.S;7(2.D>0)2.m+=2.D;t{2.m+=(2.j?3.d.T:2.f?h.1a-C:3.l.T)-2.U-2.6.1b}};2.E=8(){2.P();7(2.u!=2.k||2.v!=2.m){2.u=2.k;2.v=2.m;7(3.s){2.6.w=2.u;2.6.n=2.v}t{2.6.a.w=2.u+\'V\';2.6.a.n=2.v+\'V\'}}2.6.a.F=\'\';2.6.a.W=\'\'};2.G=8(){2.E();1c(\'2.G()\',C)};2.X=8(4,5,H){7(g 4[5]!=\'8\'||g 4[5+\'c\']==\'Y\'){4[5+\'c\']=0;7(g 4[5]==\'8\'){4[5+0]=4[5];4[5+\'c\']++}4[5]=8(e){b r=Z;e=(e)?e:h.1d;10(b i=0;i<4[5+\'c\'];i++)7(4[5+i](e)===I)r=I;x r}}10(b i=0;i<4[5+\'c\'];i++)7(4[5+i]==H)x;4[5+4[5+\'c\']]=H;4[5+\'c\']++};2.11=8(){b 9=3.1e("1f");9.z="1g";9.a.12="13";9.a.n="14";9.a.F="14";3.l.1h(9);b J=1;7(g 9.y=="L"&&9.y!=M&&9.y!="Y"){J=o(9.y)}7(J==0){x Z}x I};2.15=8(){7(2.11())2.6.a.12="13";t{b p=3.s?2.6:2.6.a;2.B=o(p.w);2.D=o(p.n);2.R=o(p.F);2.U=o(p.W);7(3.s){6.w=0;6.n=0}2.X(h,\'1i\',2.E);2.G()}};2.15()}',62,81,'||fixedMenu|document|element|listener|menu|if|function|testDiv|style|var|_num|documentElement||hasInner|typeof|window||hasElement|shiftX|body|shiftY|top|parseInt|ob|fixedMenuId||layers|else|currentX|currentY|left|return|offsetTop|id|clientWidth|targetLeft|20|targetTop|moveMenu|right|floatMenu|handler|false|offset|innerWidth|number|null|getElementById|all|computeShifts|scrollLeft|targetRight|scrollTop|clientHeight|targetBottom|px|bottom|addEvent|undefined|true|for|supportsFixed|position|fixed|0px|init|tefijo|pageXOffset|offsetWidth|pageYOffset|innerHeight|offsetHeight|setTimeout|event|createElement|div|testingPositionFixed|appendChild|onscroll'.split('|'),0,{}))

$(document).ready(function(){

                /*$(document).bind("contextmenu",function(e){
                    return false;
                });*/
                //$("#aviso").fadeIn();

                $(".cap_act").submit(function() {
                   
                    //alert('agarra');
                    $('#cargando').show();
                    
                    var res = document.getElementById('cont_respuesta').value;  
                    
                    $.ajax({
                        type: 'POST',
                        url:  $(this).attr('action'),
                        data: $(this).serialize(),
                        success: function(data) {
                            
                            $('#' + res ).html(data);
                            $('#' + res).show();
                            $('#cargando').hide();
                        }
                        
                    });
                    return false;
                });
                //**** esconde cine *******
                $("#cine").click(function() {
                   
                    $('#cine').fadeOut();
                    $('#flot_login').fadeOut();
                    
                    
                });
                
    
    
    //********* funcion cualquiera toggle ********
    $('#alto, #ancho').keyup(function() {
        
        var ancho = document.getElementById('ancho').value;
        var alto  = document.getElementById('alto').value;
        
        if(ancho.length >= 3 && alto.length >= 3 ){
          
          var codigo = document.getElementById('embed').value; 

          var code = codigo.replace( /width="([^"]+)"/i  ,'width="'+ancho+'"' );
          var code = code.replace( /height="([^"]+)"/i   ,'height="'+alto+'"' );

          document.getElementById('embed').value = code;
            
        }
        
        
        
        
    });
    

});
 
function sh_slide(id)
{ 
$('#' + id).slideToggle();  
}



/*********** FUNCIONES PROPIAS ****************/
function cine(){
    
        var maskHeight = $(document).height();  
        var maskWidth  = $(window).width();  
        //le da alto y ancho al div bloker para ocupar todo
        $('#cine').css({'width':maskWidth,'height':maskHeight});  
        $('#cine').fadeTo("slow",0.7);
    
        //$('#cine').fadeTo("slow",0.7);
}
function mask(color,trans){
    
        var maskHeight = $(document).height();  
        var maskWidth  = $(window).width();  
        //le da alto y ancho al div bloker para ocupar todo
        $('#cine').css('background-color', color);
        $('#cine').css({'width':maskWidth,'height':maskHeight});  
        $('#cine').fadeTo("slow",trans);

}


function limpia(id){
    var elemento = document.getElementById(id); 
    elemento.value = '';
}

function show(){
  tefijo('desplegable');  
  $('#desplegable').show();
}
function muestra(id){
  
  mask('#ffffff','0.3');  
  tefijo(id);  
  $('#' + id).fadeIn();

}
function hide(id){
 // $('#' + id).fadeOut();
  
  $.post("acciones.php?act=3", function(data){
    //$('#' + id).show();
    $('#' + id).html(data);
	});	
  
}
/** Login Registro **/
function log_reg(id){
    
    muestra(id);
    $.post("adm/config/acciones.php?act=1", function(data){
    $('#' + id).show();
    $('#' + id).html(data);
	});	
    
}

function votar_negativo(cual,id){
    
	$.post("acciones.php?act=2&cual=" + cual + "&id=" + id + "&pnt=n", function(data){
    
    
    $('#res_vot').show();
    $('#res_vot').html(data);


	});			
    	
}
function votar_positivo(cual,id){
 
    $.post("acciones.php?act=2&cual=" + cual + "&id=" + id + "&pnt=p", function(data){
        
    $('#res_vot').show();
    $('#res_vot').html(data);

	});	   


}
