/*(c) Areyoulocal Ltd 2006*/

   function DisplayThread_ta_focused(is_focused){var vis='hidden';if(is_focused) vis='inherit';document.getElementById('style_buttons').style.visibility=vis;} function DisplayThread_init_flists(items_string){ var items=items_string.split(":");var id_indexes=new Array(false);var i;for(i=0;i<items.length;i++) id_indexes[items[i]]=true;DisplayThread_init_flist('nhood_list',id_indexes);DisplayThread_init_flist('street_list',id_indexes);DisplayThread_init_flist('building_list',id_indexes);DisplayThread_update_selection_list();}function DisplayThread_init_flist(list_id,selected_items){  var next_list_item=document.getElementById(list_id).firstChild;while(next_list_item!=null){if(next_list_item.nodeType==1  ){if(selected_items[DisplayThread_forum_id_from_el(next_list_item)]){next_list_item.ABselected=true;update_flist_el(next_list_item);}}next_list_item=next_list_item.nextSibling;}}function DisplayThread_forum_id_from_el(element){  return(element.id.split('_'))[1];}function DisplayThread_update_flist_el(element){if(element.ABselected){element.className+=" clicklist_option_selected";}else{ABremoveClass(element,"clicklist_option_selected");}}function DisplayThread_update_selection_list(){var selected=Array();var chosen_html="<ul>";var lists=new Array('nhood_list','street_list','building_list'); for(var i=0;i<lists.length;i++){var next_list_item=document.getElementById(lists[i]).firstChild;while(next_list_item!=null){if(next_list_item.ABselected){selected.push(DisplayThread_forum_id_from_el(next_list_item));chosen_html+="<li>"+next_list_item.innerHTML+"</li>";}next_list_item=next_list_item.nextSibling;}}if(selected.length){chosen_html+="</ul>";document.getElementById('xpost_forum_ids').value=selected.join(":");document.getElementById('chosen_forum_list').innerHTML=chosen_html;}else{document.getElementById('chosen_forum_list').innerHTML=document.getElementById('none_chosen_label').innerHTML;}}function DisplayThread_flist_clicked(element){element.ABselected=!(element.ABselected);DisplayThread_update_flist_el(element);DisplayThread_update_selection_list();}
