Code:
function toggleT(_w,_h) {
if (document.all) { // is IE
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
} else { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
}
you dont need eval:
Code:
function toggleT(_w,_h) {
if (document.all) { // is IE
if (_h=='s') document.all._w.style.visibility='visible';
if (_h=='h') document.all._w.style.visibility='hidden';
} else { // is NS?
if (_h=='s') document.layers[_w].visibility='show';
if (_h=='h') document.layers[_w].visibility='hide';
}
}
Bookmarks