// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
function switch_picture(activity) {
    
    new Ajax.Request('/contactfirststeps/switch_picture', {
        method: 'post',
        parameters: {
            id: activity
        },
        onSuccess: function(transport) {
            
            data =  transport.responseText.split(";");
            
            if(data[0] != "")
            {
                $('form_image').show();
                $('img_step').show();
                $('img_step').src = data[0];
                $('img_step').title = data[1];
                $('img_step').show();
             }
             else
             {
                 
                $('img_step').hide();
             }
            
        }
        
    });
}
