/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function alternaAba(numAba){
    var validateRH = $('#rh').validate();
    if (validateRH.form()){
        $('div[id*="aba_"]').slideUp().delay(300);
        $('#aba_'+numAba).slideDown();
    }
}

jQuery(function(){
    jQuery('ul.sf-menu').superfish();
});

function NewWindow(mypage,myname,w,h,bars) {
    var winl = (screen.width-w)/2;
    var wint = (screen.height-h)/2;

    var settings ='height='+h+',';
    settings +='width='+w+',';
    settings +='top='+wint+',';
    settings +='status=yes,';
    settings +='left='+winl+',';
    settings +='resizable=yes,';
    settings +='scrollbars='+bars;

    win=window.open(mypage,'_blank',settings);
    if(parseInt(navigator.appVersion) >= 4) {
            win.window.focus();
    }
}

function AddRegistro(urlDestino, DivTarget, strParametro){
    
    $.ajax({
        url: urlDestino,
        global: false,
        type: 'POST',
        dataType: "html",
        async:false,
        data: strParametro,
        error: function(msg){
            alert(msg);
        },
        success: function(msg){
            $('#'+DivTarget).html(msg);
        }
    }
    ).responseText;
        
}

function exibeDetalhesVaga(CodVaga){
    if ($("#VAGA"+CodVaga).style.display == "none"){
        $("#VAGA"+CodVaga).show();
    } else {
        $("#VAGA"+CodVaga).hide();
    }
}
