// Copyright 2005.  Reindeer Graphics, Inc.  All rights reserved.
// make all channels visible and selected

if (documents.length > 0)
{
	var docRef = activeDocument;					//current document
	var channelCount = docRef.channels.length;		//number of channels in it
	var aChannelArray = new Array();				//will build a list of channels

	for (var i = 0; i < channelCount; i++) 
	{
		docRef.channels[i].visible = true; 		//make it visible
		aChannelArray[i] = docRef.channels[i];	//add it to the list
	}
	
	//activate the whole list of channels
	docRef.activeChannels = aChannelArray;

}
else
{
	alert("There must be at least one open document to run this script!");
}
