/*
*   This function just loads the Works Tagged under the particular category.
*/
function load_works(category_id)
{
  if (document.getElementById('suggestions_result_2'))
    document.getElementById('suggestions_result_2').style.display = "inline";
  if (document.getElementById('suggestions_result_1'))
    document.getElementById('suggestions_result_1').style.display = "none";
  if (document.getElementById('works_result_2'))
    document.getElementById('works_result_2').style.display = "none";
  if (document.getElementById('works_result_1'))
    document.getElementById('works_result_1').style.display = "inline";
    
    new Ajax.Updater('result_of_tagged_items', '/suggestion/show_tagged_works?category='+category_id, {asynchronous:true, evalScripts:true,onLoading:function(request){Element.show('loading_image')},onComplete:function(request){Element.hide('loading_image')}}); return false;
}

function load_tagged_suggestions(category_id)
{
    
    document.getElementById('suggestions_result_2').style.display = "none";
    document.getElementById('suggestions_result_1').style.display = "inline";
    document.getElementById('works_result_1').style.display = "none";
    document.getElementById('works_result_2').style.display = "inline";
    
    new Ajax.Updater('result_of_tagged_items', '/suggestion/show_tagged_suggestions?category='+category_id, {asynchronous:true, evalScripts:true,onLoading:function(request){Element.show('loading_image')},onComplete:function(request){Element.hide('loading_image')}}); return false;
}