Можно так
function getElementComputedStyle(elem, prop){
if(typeof elem!="object")elem=document.getElementById(elem);if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/[A-Z]/))prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();return document.defaultView.getComputedStyle(elem,"").getPropertyValue(prop)}if(elem.currentStyle){var i;while((i=prop.indexOf("-"))!=-1)prop=prop.substr(0,i)+prop.substr(i+1,1).toUpperCase()+prop.substr(i+2);return elem.currentStyle[prop]}return"";
}
function toogle(id) {
var item,
disp = getElementComputedStyle(id, 'display');
if (item = document.getElementById(id)) {
item.style.display = (disp == 'none') ? 'block' : 'none';
}
return false;
}