

/*Validando el formulario COMPLETO: CARACTERIZACION DE PROCESOS*/

/*JQuery para los LightBox*/
$(document).ready(function () {
    /******************************************COMUNIDADES**************************************/
    //alert('XXXZZZZZ');
    /*----------Ver detalles INFO lider de la comunidad*/
    $('#linkMasLider').click(function () {
        bloqueaPantalla("imgDivBloquea");
        document.getElementById("DIV_infoLider").style.visibility = "visible";
    });
    /*******************************************/
    /********CONECT FACEBOOK--****************/
    /*******************************************/
    //            FB.Connect.ifUserConnected(function () {                
    //                /*COLOCAR ACÁ todo lo necesario para cuando esté conectado*/
    //                alert("El man esta conectado en faceBook");
    //            });
    /*******************************************/
    /********STYLOS CHEK****************/
    /*******************************************/
//    $(".checkBox,.checkBoxClear").click(function (srcc) {
//        if ($(this).hasClass("checkBox")) {
//            $(this).removeClass("checkBox");
//            $(this).addClass("checkBoxClear");
//            //alert('1');
//        }
//        else {
//            $(this).removeClass("checkBoxClear");
//            $(this).removeClass("checkBoxClear");
//            $(this).addClass("checkBox");
//           // alert('2');
//        }
//    });
    //alert('XXX');
    //jAlert('error', 'This is the error dialog box with some extra text.', 'Error Dialog');
    //jAlert('warning', 'This is the warning dialog along with some <u>html</u>.', 'Warning Dialog');
    //jAlert('success', 'This is the success dialog.', 'Success Dialog');
    //jAlert('info', 'This is the info dialog.', 'Info Dialog');
    //jConfirm('Can you confirm this?', 'Confirmation Dialog', function (r) {
    //      jAlert('success', 'Confirmed: ' + r, 'Confirmation Results');
    //});
    //jPrompt('Type something:', 'Prefilled value', 'Prompt Dialog', function (r) {
      //  if (r) alert('You entered ' + r);
    //});

});


/*******************************************/
/********BLOQUEA LA PANTALLA****************/
/*******************************************/
function bloqueaPantalla(imagenBloqueadora) {
    if (window.innerHeight) {
        //navegadores basados en mozilla
        var heightVentana = window.innerHeight;
    } else {
        //navegadores basados en IExplorer
        var heightVentana = document.documentElement.clientHeight;
    }
   /* var elHtml = document.getElementById(imagenBloqueadora);
    elHtml.width = screen.width;
    elHtml.height = screen.height;*/
    var dsh = document.documentElement.scrollHeight;
    var dch = document.documentElement.clientHeight;
    var bdh = (dsh > dch) ? dsh : dch;
    document.getElementById('divBloquea').style.height = bdh + 'px';
    document.getElementById("divBloquea").style.width = '100%';  //screen.width;
    //document.getElementById("divBloquea").style.height = '2000px';  //screen.height;
    document.getElementById("divBloquea").style.visibility = "visible";
}
/*******************************************/
/********DESBLOQUEA LA PANTALLA****************/
/*******************************************/
function desBloqueaPantalla() {
    //document.getElementById("divBloquea").style.width = '1px';
    //document.getElementById("divBloquea").style.height = '1px';
    document.getElementById("divBloquea").style.visibility = "hidden";
}
/*******************************************/
/********DESBLOQUEA LA PANTALLA****************/
/*******************************************/
function ocultarDIV(idDivOcultar, idDivMostrar) {
    document.getElementById(idDivMostrar).style.display = "block";
    document.getElementById(idDivOcultar).style.display = "none";
}
/*******************************************/
/********ALERT ENCUESTA*********************/
/*******************************************/
function alertEncuesta_OK() {
    bloqueaPantalla();
    document.getElementById('alert_Encuesta_OK').style.display = "block";
}
function Cerrar_alertEncuesta() {
    document.getElementById('alert_Encuesta_OK').style.display = "none";
    document.getElementById('alert_Encuesta_FALLO').style.display = "none";
    desBloqueaPantalla();
}
function alertEncuesta_FALLO() {
    bloqueaPantalla();
    document.getElementById('alert_Encuesta_FALLO').style.display = "block";
}
/*******************************************/
/********ALERT COMPARTIR*********************/
/*******************************************/
function alertInvitarReceta() {
    bloqueaPantalla();
    document.getElementById('ventanaAlertaInvitarReceta').style.display = "block";
}
function ventanaAlertaInvitarReceta_cerrar() {
    document.getElementById('ventanaAlertaInvitarReceta').style.display = "none";
    document.getElementById('ventanaAlertaInvitarReceta_fallo').style.display = "none";
    desBloqueaPantalla();
}
function ventanaAlertaInvitarReceta_fallo_CERRAR() {
    document.getElementById('ventanaAlertaInvitarReceta').style.display = "none";
    document.getElementById('ventanaAlertaInvitarReceta_fallo').style.display = "none";
    document.getElementById('ctl00_Contenido_txtNombreInvitado').value = "";
    document.getElementById('ctl00_Contenido_txtEmailInvitado').value = "";
    desBloqueaPantalla();
}
function alertInvitarReceta_MostrarMensaje() {
    bloqueaPantalla();
    document.getElementById('ventanaAlertaInvitarReceta_fallo').style.display = "block";
}
/*******************************************/
/********OVER DE PRODUCTOS*********************/
/*******************************************/
function mostrarOver(idIMG) {    
   document.getElementById(idIMG).style.display = "block";
    
}
function ocultarOver(idIMG) {    
    document.getElementById(idIMG).style.display = "none";
}



function ventanaAlertaVotacion_cerrar() {
    document.getElementById('alertaVotacion').style.display = "none";
    document.getElementById("divBloquea").style.visibility = "hidden";
    document.getElementById("fade").style.visibility = "hidden";    
}

