Here is one way to turn all layers visibility off ...
//select top layer
activeDocument.activeLayer = activeDocument.layers[0];
//toggle all other layers visibility off
toggleVisability();
//toggle this layers visibility off
activeDocument.activeLayer.visible=false;
//This function is the same as Alt/Click on a layers eye
function toggleVisability() {
var desc = new ActionDescriptor();
var list1 = new ActionList();
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID('Lyr '),charIDToTypeID('Ordn'),charIDToTypeID('Trgt') );
list1.putReference( ref );
desc.putList( charIDToTypeID('null'), list1 );
desc.putBoolean( charIDToTypeID('TglO'), true );
executeAction( charIDToTypeID('Shw '), desc, DialogModes.NO );
};