TypeError: Cannot read property 'style' of null

i have a top navigation bar with a clickable down arrow. once clicked a drop-down will appear. there are about 5 to 6 click downs. the content in the click downs are store in an external html file and i use an iframe to display it. so if 1 arrow is clicked content will show and if another is clicked while the 1st stays open, it should replace the 1st one. <snip/>

I am getting an error that says TypeError: Cannot read property ‘style’ of null. the code line it’s referring to is the one below with the stars:

Nav.prototype.closeAllSupernavLists = function(){
for(var i=0; i<this.sections.length; i++){
//*****the line below is causing the error. this.snavIframeDoc.getElementById(this.sections[i].snavListId).style.display = ‘none’;

this.sections[i].snavTriggerRegion.className = this.sections[i].snavTriggerRegion.className.replace(‘active’, ‘’);
}
}

I am so close to solving this, but my brain is fried.

Nevermind everyone. fixed it.