I am trying to write into a css layer...
It's working in all browsers except netscape 4

It has something to do with the bottom else if statement..that's the one for Netscape browsers.

my code
Code:
function writeTotal(layerID,txt) {
	if(document.getElementById){
		document.getElementById(layerID).innerHTML=txt;
	}else if(document.all){
		document.all[layerID].innerHTML=txt;
	}else if(document.layers){
		with(document.layers[layerID].document){
			open();
			write(txt);
			close();
		}
	}
}