All's fair when books -- in print or electronic formats -- support a good cause.

In this case, the beneficiary is Coleytown Middle School in Westport, whose annual book fair opened Friday at the Barnes & Noble Bookstore, 1076 Post Road, and runs through Saturday. In addition to raising funds for the school's PTA, which will use proceeds to fund trips, activities and other school the fair features book signings by local authors and music performances.

"We have done this for years with Barnes & Noble," said Robyn Levy, co-chairwoman of the event, along with Corri Neckritz, both parents at Coleytown. "The way the process works is that people go to the cashier with a book selection and mention they are shopping for Coleytown Middle School. The cashier notes it and attributes a percentage of that sale to the school. The target is to sell over $10,000 worth of books over the two days to reach our fundraising goal."

Levy added that, if people are not able to get to the Westport Barnes & Noble, they can go online or to another store using a special code to help the fundraiser. "People can go online to and use the CMS code 10420206," she said. "They can also use the code at any other Barnes and Noble physical location across the country." Levy said that each year they try to organize entertainment to boost attendance at the book fair.

On Friday "at 4 p.m., we have local author Michaela MacColl signing her book `Prisoners in the Palace,' " she said. "Tonight at 7, the Fairfield School of Rock's House Band will perform live in the store's cafe. Tomorrow at 11 a.m., local author Cameron Stracher will sign his book `The Water Wars' and Coleytown students will showcase their musical talents."

Tricia Tierney, community relations manager at Barnes & Noble, said the store and Coleytown have been partners on the book-sale fundraiser for nearly 10 years. "It's a great fundraiser, a no-brainer," she said. "It's around books, a chance for the school to shine and we're hosting local authors. It's a real celebration."

Another way for shoppers to perform a good deed is to purchase a new book and donate it to the Westport Department of Human Services for families in need. A bin had been set up for collection by the book fair table. "It can be an inexpensive bargain book, but it is much appreciated," she said.

Kate Andrews, of Westport, was among those who came to the book store Friday to show support. "I needed to buy a book anyhow and waited until today to purchase it," she said. "The fair is a great effort, providing some much-needed funding to the school."

Tierney pointed out that e-book purchases would not count as a book fair credit. "However, if you buy a Nook e-reader, which is a new device introduced by Barnes & Noble, that would be credited," she said.

"The original black-and-white Nook and its accessories were introduced well over a year ago," Tierney said, "but now there's a new color version, which has lots of features, applications and functions. It's an award-winning reader's tablet."

Tierney added that people appear to be reading more -- not necessarily print books, but e-books. "Reading is not going away and books are not going away," she said. "Devices like the Nook just enhance the experience, providing another vehicle for reading that allows instantaneous access. For Barnes & Noble, it's still about reading, in any format. The book fair reinforces that."