function hierarchical(){this.cookie_name='';this.location_url='';this.toggle_image_id_name='hier-toggle';this.init=function(){var divs=document.getElementsByTagName('IMG');for(var i=0;i<divs.length;i++){try{if(!divs[i].id){continue;}}catch(error){continue;}var divid=divs[i].id;var divname=ipsclass.get_name_from_text(divid);var divnum=ipsclass.get_id_from_text(divid);if(divname==this.toggle_image_id_name){divs[i].style.cursor='pointer';divs[i].toggle_image_id_name=this.toggle_image_id_name;divs[i].location_url=this.location_url;divs[i].cookie_name=this.cookie_name;divs[i].toggle_id=divnum;divs[i].onclick=hierarchical_events.prototype.toggle_folder;}}};}function hierarchical_events(){}hierarchical_events.prototype.toggle_folder=function(e){if(!this.cookie_name){return false;}e=ipsclass.cancel_bubble(e,true);var saved=new Array();var clean=new Array();var found_id=0;if(tmp=ipsclass.my_getcookie(this.cookie_name)){saved=tmp.split(",");}for(i=0;i<saved.length;i++){if(saved[i]!=this.toggle_id&&saved[i]!=""){clean[clean.length]=saved[i];}else if(saved[i]==this.toggle_id){found_id=1;}}if(!found_id){clean[clean.length]=this.toggle_id;}ipsclass.my_setcookie(this.cookie_name,clean.join(','),1);ipsclass.location_jump(this.location_url,true);};
