
var id = null;
var section_id = null;
var selected = null;
var url = null;

function smh(id){
    //var name = $(this).attr("id");
    $('#'+id+' > .menu_h').css('display','block');
}

function hmh(id){
    $('#'+id+' > .menu_h').css('display','none');
}

$(document).ready(function(){
  $('#id_sender').focus(function(){
        $(this).attr('value','');
    });
  $('#search_field').focus(function(){
        $(this).attr('value','');    
    });
  $('#id_message').focus(function(){
        $(this).attr('value','');    
    });
});


function update_download(id , selected){
    $.post('/downloads/icc/update/?stage='+id ,{'key':selected},function(data){
        $('#base_select'+id).html(data);
        });
}

function clear_box(){
    $('#base_select2').html('');
    $('#base_select3').html('');
}

function clear_box1(){
    $('#base_select3').html('');
}

function show_download(selected){
    var key1 = $('#base_select').val();
    var key2 = $('#base_select1').val();
    var key3 = $('#base_select2').val();
    $.post('/downloads/icc/show/',{'key1':key1,'key2':key2 ,'key3':key3,'key4':selected},function(data){
        $('#download-result').html(data);
        });
}

function hide_all(id){
    $('.'+id).slideUp();
}

function show_app_date(id){
    $.post('/zgloszenie-na-dzien-otwarty/get_date/',{'app_id':id},function(data){
        $('#app_day').html(data);
        })
}

function set_height(){
    var h1 = $('#middle').height();
    var h2 = $('#middleCenter').height();
    if (h1 > h2){
        //$('#middleCenter').css({height:h1});
        //$('#icc_content').css({height:h1});
    }   
}
function show_main(url){
    url = url+'?xhr=True';
    $.get(url,{},function(data){
        $('#middleCenter').html(data);
        $('.middleTitle').html('Jet Media');
        })
}

