for(var i = 0 ; i < app.project.activeItem.selectedLayers.length ; i++)
{
layObj = app.project.activeItem.selectedLayers[i];
.....
}