function initCategories(){var id;cookies=document.cookie.split('; ');for(i in cookies){if(cookies[i].charAt(0)=='_'){cookie=cookies[i].split('=');if(cookie[1]=='1'){id=cookie[0].substring(1);if(document.getElementById(id)){toggleCategory(id)}}}}}function toggleCategory(id){var obj=document.getElementById(id);var button=document.getElementById('b'+id);var toggle=obj.style.display=='none';obj.style.display=toggle?'':'none';button.className=toggle?'contract':'expand';my_setcookie('_'+id,toggle?'':'1',true);return false}function togglePopUpMenu(id){var popUpMenu=document.getElementById(id);if(popUpMenu.style.display=='none'){popUpMenu.style.display='';if(openedPopUp){document.getElementById(openedPopUp).style.display='none'}openedPopUp=id}else{popUpMenu.style.display='none';openedPopUp=false}return false}function toggleDiv(id){var obj=document.getElementById(id);obj.style.display=obj.style.display=='none'?'':'none'}function togglePoll(){if(document.getElementById('poll_on')&&document.getElementById('poll_off')){toggleDiv('poll_on');toggleDiv('poll_off')}return false}function getElementsByClassName(className,tag){var elements=document.getElementsByTagName(tag);var returnElements=[];for(i in elements){if(elements[i].className==className){returnElements.push(elements[i])}}return returnElements}function initProfilePopUps(){divs=getElementsByClassName('postprofile-head post-header','div');for(i in divs){if(divs[i].style){divs[i].style.position='relative'}}}var openedPopUp=false;initSetFunction(initCategories);initSetFunction(togglePoll);initSetFunction(initProfilePopUps);