[Koha-cvs] koha C4/BookShelves.pm C4/Output.pm C4/Barcodes... [rel_TG]

Tumer Garip tgarip at neu.edu.tr
Mon Mar 26 04:19:32 CEST 2007


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_TG
Changes by:	Tumer Garip <tgarip1957>	07/03/26 02:19:27

Modified files:
	C4             : BookShelves.pm Output.pm 
Added files:
	C4/Barcodes    : BarcodeConfig.pm MemberCardConfig.pm 
	                 PrinterConfig.pm 
	C4/Calendar    : Calendar.pm 
	C4/Circulation : Circ2.pm Circ3.pm Fines.pm PrinterConfig.pm 
	C4/Interface/CGI: Output.pm Template.pm 
	.              : about.pl changelanguage.pl help.pl logout.pl 
	                 mainpage.pl plugin_launcher.pl 
	authorities    : auth_finder.pl auth_linker.pl 
	                 authorities-home.pl authorities.pl 
	                 blinddetail-biblio-search.pl 
	                 blinddetail-linker.pl detail-biblio-search.pl 
	                 detail.pl merge_authority.pl 
	barcodes       : barcodes.pl cardConfig.pl cbarcodes.pl 
	                 pdfViewer.pl printerConfig.pl 
	bookshelves    : add-biblios-to-shelves.pl shelves.pl 
	catalogue      : ISBDdetail.pl MARCdetail.pl 
	                 MARCdetail_wrapper.pl bookcount.pl 
	                 catalogue-search.pl cyprus-search.pl detail.pl 
	                 detailprint.pl moredetail.pl newsdetail.pl 
	                 search.pl 
	cataloguing    : addbiblio.pl addbooks.pl additem.pl 
	                 isbnsearch.pl 
	circ           : branchreserves.pl branchtransfers.pl 
	                 circulation.pl currenttransfers.pl 
	                 renewscript.pl rescirculation.pl resreturns.pl 
	                 returns.pl selectbranchprinter.pl 
	                 waitingreservestransfers.pl 
	export         : marc-item.pl marc.pl 
	koha-tmpl/intranet-tmpl/default/en: about.tmpl auth.tmpl 
	koha-tmpl/intranet-tmpl/default/en/acqui: acqui-home.tmpl 
	                                          basket.tmpl 
	                                          booksellers.tmpl 
	                                          finishreceive.tmpl 
	                                          histsearch.tmpl 
	                                          lateorders.tmpl 
	                                          neworderempty.tmpl 
	                                          newordersuggestion.tmpl 
	                                          parcel.tmpl 
	                                          parcels.tmpl 
	                                          supplier.tmpl 
	koha-tmpl/intranet-tmpl/default/en/admin: admin-home.tmpl 
	                                          aqbookfund.tmpl 
	                                          aqbudget.tmpl 
	                                          auth_group_structure.tmpl 
	                                          auth_subfields_structure.tmpl 
	                                          auth_tag_structure.tmpl 
	                                          authorised_values.tmpl 
	                                          authtgroups.tmpl 
	                                          authtypes.tmpl 
	                                          biblios_framework.tmpl 
	                                          biblios_subfields_structure.tmpl 
	                                          bibliostagstructure.tmpl 
	                                          branches.tmpl 
	                                          categorie.tmpl 
	                                          categoryitem-orig.tmpl 
	                                          categoryitem.tmpl 
	                                          charges.tmpl 
	                                          checkmarc.tmpl 
	                                          currency.tmpl 
	                                          holdings_subfields_structure.tmpl 
	                                          holdingstagstructure.tmpl 
	                                          issuingrules.tmpl 
	                                          itemtypes.tmpl 
	                                          koha-electronic.tmpl 
	                                          koha2marclinks.tmpl 
	                                          koha_attr.tmpl 
	                                          onlinedatabases.tmpl 
	                                          printers.tmpl 
	                                          stopwords.tmpl 
	                                          systempreferences.tmpl 
	                                          thesaurus.tmpl 
	                                          viewlog.tmpl 
	                                          z3950servers.tmpl 
	koha-tmpl/intranet-tmpl/default/en/authorities: auth_finder.tmpl 
	                                                auth_linker.tmpl 
	                                                authorities-home.tmpl 
	                                                authorities.tmpl 
	                                                blinddetail-biblio-search.tmpl 
	                                                blinddetail-linker.tmpl 
	                                                detail.tmpl 
	                                                linkresultlist-auth.tmpl 
	                                                searchresultlist-auth.tmpl 
	                                                searchresultlist.tmpl 
	koha-tmpl/intranet-tmpl/default/en/barcodes: barcodes.tmpl 
	                                             cbarcodes.tmpl 
	                                             printerConfig.tmpl 
	koha-tmpl/intranet-tmpl/default/en/bookshelves: shelves.tmpl 
	koha-tmpl/intranet-tmpl/default/en/catalogue: ISBDdetail.tmpl 
	                                              MARCdetail.tmpl 
	                                              MARCdetail_wrapper.tmpl 
	                                              bookcount.tmpl 
	                                              catalogue_search.tmpl 
	                                              catalogue_searchresults.tmpl 
	                                              detail.tmpl 
	                                              detailprint.tmpl 
	                                              livesearch.tmpl 
	                                              moredetail.tmpl 
	                                              news_searchresults.tmpl 
	                                              newsdetail.tmpl 
	                                              search.tmpl 
	                                              searchresults.tmpl 
	                                              translation.tmpl 
	                                              translation_en.tmpl 
	                                              union-searchresult.tmpl 
	koha-tmpl/intranet-tmpl/default/en/cataloguing: addbiblio.tmpl 
	                                                addbooks.tmpl 
	                                                additem.tmpl 
	                                                isbnsearch.tmpl 
	koha-tmpl/intranet-tmpl/default/en/circ: branchreserves.tmpl 
	                                         branchtransfers.tmpl 
	                                         circulation.tmpl 
	                                         currenttransfers.tmpl 
	                                         rescirculation.tmpl 
	                                         resreturns.tmpl 
	                                         returns.tmpl 
	                                         selectbranchprinter.tmpl 
	                                         waitingreservestransfers.tmpl 
	koha-tmpl/intranet-tmpl/default/en/export: marc-time.tmpl 
	                                           marc.tmpl 
	                                           marc_item.tmpl 
	koha-tmpl/intranet-tmpl/default/en/help/admin: aqbookfund.tmpl 
	                                               auth_subfields_structure.tmpl 
	                                               authorised_values.tmpl 
	                                               authtypes.tmpl 
	                                               biblio_framework.tmpl 
	                                               biblios_framework.tmpl 
	                                               branches.tmpl 
	                                               categorie.tmpl 
	                                               checkmarc.tmpl 
	                                               currency.tmpl 
	                                               holdings_subfields_structure.tmpl 
	                                               holdingstagstructure.tmpl 
	                                               issuingrules.tmpl 
	                                               items_subfields_structure.tmpl 
	                                               itemstagstructure.tmpl 
	                                               itemtypes.tmpl 
	                                               koha2marclinks.tmpl 
	                                               marc_subfields_structure.tmpl 
	                                               marctagstructure.tmpl 
	                                               printers.tmpl 
	                                               stopwords.tmpl 
	                                               systempreferences.tmpl 
	                                               z3950servers.tmpl 
	koha-tmpl/intranet-tmpl/default/en/help: nohelp.tmpl 
	koha-tmpl/intranet-tmpl/default/en/includes: 
	                                             acqui-full-topmenu.inc 
	                                             acqui-topmenu.inc 
	                                             acquisitions-bottom.inc 
	                                             admin-topmenu.inc 
	                                             alt_menu-serials.inc 
	                                             authorities-topmenu.inc 
	                                             blank.css 
	                                             borrcirculation-bottom.inc 
	                                             borrcirculation-top.inc 
	                                             circ-topmenu.inc 
	                                             colors.css 
	                                             common.js.inc 
	                                             dictionary-bottom.inc 
	                                             dictionary-top.inc 
	                                             doc-head-barcodes-close.inc 
	                                             doc-head-circ-close.inc 
	                                             doc-head-circ-open.inc 
	                                             doc-head-close-addbiblio.inc 
	                                             doc-head-close-calendar.inc 
	                                             doc-head-close-cat-zoom.inc 
	                                             doc-head-close-cat.inc 
	                                             doc-head-close-dic.inc 
	                                             doc-head-close-print.inc 
	                                             doc-head-close-receipt.inc 
	                                             doc-head-close-z3950.inc 
	                                             doc-head-close.inc 
	                                             doc-head-open.inc 
	                                             favicon.ico 
	                                             help-bottom.inc 
	                                             help-top.inc 
	                                             holidays-bottom.inc 
	                                             holidays-top.inc 
	                                             intranet-bottom.inc 
	                                             intranet-cvs.css 
	                                             intranet-facets.inc 
	                                             intranet-nav-brief.inc 
	                                             intranet-nav.inc 
	                                             intranet-topmenu.inc 
	                                             intranet.css 
	                                             livesearch-en.js 
	                                             livesearch.css 
	                                             livesearch.js 
	                                             main-top-addbiblio.inc 
	                                             main-top-blank.inc 
	                                             main-top-circ.inc 
	                                             main-top-print.inc 
	                                             main-top.inc 
	                                             main.js 
	                                             marc-editor-old.css 
	                                             marc-editor.css 
	                                             masthead.inc 
	                                             masthead_adv.inc 
	                                             members-topmenu.inc 
	                                             menu-acqui.inc 
	                                             menu-admin.inc 
	                                             menu-authorities.inc 
	                                             menu-catalogue.inc 
	                                             menu-circ.inc 
	                                             menu-main.inc 
	                                             menu-members.inc 
	                                             menu-serials.inc 
	                                             menu-tools.inc 
	                                             menus.inc 
	                                             popup-bottom.inc 
	                                             popup-top.inc 
	                                             print-mine.css 
	                                             print.css 
	                                             rollovers.js 
	                                             search-topmenu.inc 
	                                             serials-menu.inc 
	                                             serials-topmenu.inc 
	                                             tabs.css 
	koha-tmpl/intranet-tmpl/default/en/includes/calendar: cal.gif 
	                                                      calendar-en.js 
	                                                      calendar-setup.js 
	                                                      calendar-system.css 
	                                                      calendar.js 
	                                                      menuarrow.gif 
	koha-tmpl/intranet-tmpl/default/en/includes/countryCodes: 
	                                                          countryCodes.dat 
	                                                          labelCodes.dat 
	koha-tmpl/intranet-tmpl/default/en/includes/javascript: 
	                                                        members.js 
	koha-tmpl/intranet-tmpl/default/en/includes/labelConfig: 
	                                                         cardConfig.conf 
	                                                         cardsConfig.conf 
	                                                         itemsLabelConfig.conf 
	                                                         itemsLabelConfig3.conf 
	                                                         itemslabelConfig2.conf 
	                                                         labelConfig.conf 
	                                                         membersConfig.conf 
	koha-tmpl/intranet-tmpl/default/en/members: boraccount.tmpl 
	                                            borrowers_details.tmpl 
	                                            deletemem.tmpl 
	                                            guarantor_search.tmpl 
	                                            mancredit.tmpl 
	                                            maninvoice.tmpl 
	                                            member-flags.tmpl 
	                                            member-password.tmpl 
	                                            member-picupload.tmpl 
	                                            member-quicksearch-results.tmpl 
	                                            member-quicksearch.tmpl 
	                                            member.tmpl 
	                                            memberentry.tmpl 
	                                            members-home.tmpl 
	                                            moremember-print.tmpl 
	                                            moremember-receipt.tmpl 
	                                            moremember.tmpl 
	                                            pay.tmpl 
	                                            payprint.tmpl 
	                                            readingrec.tmpl 
	koha-tmpl/intranet-tmpl/default/en/members/receipts: 
	                                                     print-receipts-conf-bottom.inc 
	                                                     print-receipts-conf-top.inc 
	                                                     print-receipts-conf.tmpl 
	                                                     receipt-plain.tmpl 
	                                                     receipt-rich.tmpl 
	koha-tmpl/intranet-tmpl/default/en/reserve: request.tmpl 
	koha-tmpl/intranet-tmpl/default/en/serials: 
	                                            acqui-search-result.tmpl 
	                                            acqui-search.tmpl 
	                                            claims.tmpl 
	                                            distributedto.tmpl 
	                                            lateissues.tmpl 
	                                            member-search.tmpl 
	                                            printlist.tmpl 
	                                            receipt-search-result.tmpl 
	                                            result.tmpl 
	                                            routing-preview-slip.tmpl 
	                                            routing-preview.tmpl 
	                                            routing.tmpl 
	                                            serial-issues-full.tmpl 
	                                            serial-issues.tmpl 
	                                            serials-home.tmpl 
	                                            serials-receive.tmpl 
	                                            subscription-add.tmpl 
	                                            subscription-bib-search.tmpl 
	                                            subscription-detail.tmpl 
	                                            subscription-renew.tmpl 
	                                            viewalerts.tmpl 
	koha-tmpl/intranet-tmpl/default/en/tools: barcodes.tmpl 
	                                          export.tmpl 
	                                          holidays.tmpl 
	                                          import.tmpl 
	                                          koha-news.tmpl 
	                                          letter.tmpl 
	                                          overduerules.tmpl 
	                                          printerConfig.tmpl 
	                                          tools-home.tmpl 
	reviews        : reviewswaiting.pl 
	serials        : acqui-search-result.pl acqui-search.pl 
	                 claims.pl distributedto.pl lateissues-excel.pl 
	                 lateissues.pl member-search.pl printlist.pl 
	                 reorder_members.pl routing-preview.pl 
	                 routing.pl serial-issues.pl serials-home.pl 
	                 serials-receive.pl subscription-add.pl 
	                 subscription-bib-search.pl 
	                 subscription-detail.pl subscription-renew.pl 
	                 viewalerts.pl 
	sms            : sms.pl sms_listen.pl 
	                 sms_listen_windows_start.pl 
	suggestion     : acceptorreject.pl 
	tools          : exceptionHolidays.pl export.pl fines2.pl 
	                 fines_windows_start.pl holidays.pl import.pl 
	                 koha-news.pl letter.pl newHolidays.pl 
	                 overduerules.pl pdfViewer.pl printerConfig.pl 
	                 tools-home.pl 
	value_builder  : marc21_008_holdings.pl marc21_field_003.pl 
	                 marc21_field_005.pl marc21_field_006.pl 
	                 marc21_field_007.pl marc21_field_008.pl 
	                 marc21_leader.pl marc21_leader_authorities.pl 
	                 marc21_leader_holdings.pl usmarc_field_952d.pl 
	z3950          : search.pl zebraqueue_start.pl 
	                 zebraqueue_windows_start.pl 
Removed files:
	intranet/modules/C4/Barcodes: BarcodeConfig.pm 
	                              MemberCardConfig.pm 
	                              PrinterConfig.pm 
	intranet/modules/C4/Calendar: Calendar.pm 
	intranet/modules/C4/Circulation: Circ2.pm Circ3.pm Fines.pm 

Log message:
	Recommiting everything

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/BookShelves.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.19.2.2&r2=1.19.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Output.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.59.2.2&r2=1.59.2.3
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Barcodes/BarcodeConfig.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Barcodes/MemberCardConfig.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Barcodes/PrinterConfig.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Calendar/Calendar.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.123.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Circ3.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/Fines.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.20.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Circulation/PrinterConfig.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Interface/CGI/Output.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Interface/CGI/Template.pm?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.14.2
http://cvs.savannah.gnu.org/viewcvs/koha/about.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/changelanguage.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/help.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/logout.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.6.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/mainpage.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.12.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/plugin_launcher.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/auth_finder.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.12.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/auth_linker.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities-home.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.15.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/authorities.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.18.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/blinddetail-biblio-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/blinddetail-linker.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/detail-biblio-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/detail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/authorities/merge_authority.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/barcodes.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/cardConfig.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/cbarcodes.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/pdfViewer.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/barcodes/printerConfig.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/bookshelves/add-biblios-to-shelves.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/bookshelves/shelves.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/ISBDdetail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/MARCdetail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/MARCdetail_wrapper.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/bookcount.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/catalogue-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/cyprus-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/detail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/detailprint.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/moredetail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.9.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/newsdetail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/catalogue/search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbiblio.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.19.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/addbooks.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/additem.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.12.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/cataloguing/isbnsearch.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/branchreserves.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/branchtransfers.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.26.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/circulation.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.99.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/currenttransfers.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/renewscript.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/rescirculation.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/resreturns.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/returns.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.45.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/selectbranchprinter.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.16.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/circ/waitingreservestransfers.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/export/marc-item.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/export/marc.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.9.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/about.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.14.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.6.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.15.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.25.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/booksellers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/finishreceive.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/neworderempty.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/newordersuggestion.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/parcel.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/parcels.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.13.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/admin-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/aqbookfund.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/aqbudget.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/auth_group_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/auth_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/auth_tag_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/authorised_values.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/authtgroups.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/authtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/biblios_framework.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/biblios_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/bibliostagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/branches.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/categorie.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/categoryitem-orig.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/categoryitem.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/charges.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/checkmarc.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/currency.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/holdings_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/holdingstagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/issuingrules.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/itemtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/koha-electronic.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/koha2marclinks.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/koha_attr.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/onlinedatabases.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/printers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/stopwords.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/systempreferences.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/thesaurus.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/viewlog.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/admin/z3950servers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.12.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.11.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/barcodes/barcodes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/barcodes/cbarcodes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/barcodes/printerConfig.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/bookshelves/shelves.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.9.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/ISBDdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.38.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail_wrapper.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/bookcount.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_searchresults.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.25.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/detailprint.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/livesearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.17.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/news_searchresults.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/newsdetail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/searchresults.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.18.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/translation.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/translation_en.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/catalogue/union-searchresult.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/cataloguing/addbiblio.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/cataloguing/addbooks.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/cataloguing/additem.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/cataloguing/isbnsearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/branchreserves.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/branchtransfers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.16.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.42.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/currenttransfers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/rescirculation.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/resreturns.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/returns.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.24.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/selectbranchprinter.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.9.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/circ/waitingreservestransfers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/export/marc-time.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/export/marc.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.9.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/export/marc_item.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/aqbookfund.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/auth_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/authorised_values.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/authtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/biblio_framework.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/biblios_framework.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/branches.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/categorie.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/checkmarc.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/currency.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/holdings_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/holdingstagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/issuingrules.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/items_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/itemstagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/itemtypes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/koha2marclinks.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/marc_subfields_structure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/marctagstructure.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/printers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/stopwords.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/systempreferences.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/admin/z3950servers.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/help/nohelp.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/acqui-full-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/acqui-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.15.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/admin-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/alt_menu-serials.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/authorities-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/blank.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/circ-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/colors.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/common.js.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/dictionary-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/dictionary-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-barcodes-close.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-close.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-open.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-addbiblio.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-calendar.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat-zoom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-dic.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-print.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-receipt.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-z3950.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/doc-head-open.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/favicon.ico?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/help-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.6.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/holidays-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/holidays-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet-cvs.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet-facets.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav-brief.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/intranet.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/livesearch-en.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/livesearch.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/livesearch.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/main-top-addbiblio.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/main-top-blank.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/main-top-circ.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/main-top-print.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/main-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/main.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-editor-old.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/marc-editor.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/masthead.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/masthead_adv.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/members-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-acqui.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-admin.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-authorities.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-catalogue.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-circ.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-main.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-members.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-serials.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menu-tools.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/menus.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/print-mine.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/print.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/rollovers.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/search-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/serials-menu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/serials-topmenu.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/tabs.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/calendar/cal.gif?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-en.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-setup.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-system.css?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/calendar/menuarrow.gif?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/countryCodes.dat?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/labelCodes.dat?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/javascript/members.js?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardConfig.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardsConfig.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig3.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemslabelConfig2.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/labelConfig.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/membersConfig.conf?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/boraccount.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/borrowers_details.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/deletemem.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/guarantor_search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/mancredit.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/maninvoice.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/member-flags.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/member-password.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/member-picupload.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch-results.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/member.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.20.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.39.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/members-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.13.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/moremember-print.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/moremember-receipt.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.42.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/pay.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/payprint.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/readingrec.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.18.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-bottom.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-top.inc?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-plain.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-rich.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/reserve/request.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/acqui-search-result.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/acqui-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/claims.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/distributedto.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/lateissues.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/member-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/printlist.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/receipt-search-result.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/result.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/routing-preview-slip.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/routing-preview.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/routing.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/serial-issues-full.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/serial-issues.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/serials-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/serials-receive.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/subscription-add.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/subscription-bib-search.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/subscription-detail.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/subscription-renew.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/serials/viewalerts.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/barcodes.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/export.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/holidays.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/import.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/koha-news.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/letter.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/overduerules.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/printerConfig.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/default/en/tools/tools-home.tmpl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/reviews/reviewswaiting.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/acqui-search-result.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/acqui-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.7.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/claims.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/distributedto.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/lateissues-excel.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/lateissues.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.11.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/member-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/printlist.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/reorder_members.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/routing-preview.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/routing.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serial-issues.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.6.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serials-home.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.9.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serials-receive.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-add.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.10.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-bib-search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-detail.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.5.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-renew.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.6.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/serials/viewalerts.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/sms/sms.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/sms/sms_listen.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/sms/sms_listen_windows_start.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/suggestion/acceptorreject.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/exceptionHolidays.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/export.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/fines2.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/tools/fines_windows_start.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/tools/holidays.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/import.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/koha-news.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/letter.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/newHolidays.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/overduerules.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.4.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/pdfViewer.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.4.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/printerConfig.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/tools/tools-home.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_008_holdings.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_field_003.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_field_005.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_field_006.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_field_007.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_field_008.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_leader.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.6.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_leader_authorities.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.3.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/marc21_leader_holdings.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.2.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/value_builder/usmarc_field_952d.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/search.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.8.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/zebraqueue_start.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/z3950/zebraqueue_windows_start.pl?cvsroot=koha&only_with_tag=rel_TG&rev=1.1.2.2
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Barcodes/BarcodeConfig.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Barcodes/MemberCardConfig.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Barcodes/PrinterConfig.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Calendar/Calendar.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Circulation/Circ2.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Circulation/Circ3.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.3&r2=0
http://cvs.savannah.gnu.org/viewcvs/koha/intranet/modules/C4/Circulation/Fines.pm?cvsroot=koha&only_with_tag=rel_TG&r1=1.1.2.3&r2=0

Patches:
Index: C4/BookShelves.pm
===================================================================
RCS file: /sources/koha/koha/C4/BookShelves.pm,v
retrieving revision 1.19.2.2
retrieving revision 1.19.2.3
diff -u -b -r1.19.2.2 -r1.19.2.3
--- C4/BookShelves.pm	25 Mar 2007 23:46:14 -0000	1.19.2.2
+++ C4/BookShelves.pm	26 Mar 2007 02:19:20 -0000	1.19.2.3
@@ -3,7 +3,7 @@
 
 package C4::BookShelves;
 
-# $Id: BookShelves.pm,v 1.19.2.2 2007/03/25 23:46:14 tgarip1957 Exp $
+# $Id: BookShelves.pm,v 1.19.2.3 2007/03/26 02:19:20 tgarip1957 Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -30,7 +30,7 @@
 use vars qw($VERSION @ISA @EXPORT);
 
 # set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.19.2.2 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.19.2.3 $' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
 
 =head1 NAME
 
@@ -340,6 +340,7 @@
 
 sub ShelfPossibleAction {
     my ( $user, $shelfnumber, $action ) = @_;
+return 1 if C4::Context->userenv->{flags}==1;##Superlibrarian can access everything
     my $query = qq(
         SELECT owner,category
         FROM   bookshelf
@@ -413,6 +414,9 @@
 
 #
 # $Log: BookShelves.pm,v $
+# Revision 1.19.2.3  2007/03/26 02:19:20  tgarip1957
+# Recommiting everything
+#
 # Revision 1.19.2.2  2007/03/25 23:46:14  tgarip1957
 # Recommitting everything
 #

Index: C4/Output.pm
===================================================================
RCS file: /sources/koha/koha/C4/Output.pm,v
retrieving revision 1.59.2.2
retrieving revision 1.59.2.3
diff -u -b -r1.59.2.2 -r1.59.2.3
--- C4/Output.pm	25 Mar 2007 23:46:14 -0000	1.59.2.2
+++ C4/Output.pm	26 Mar 2007 02:19:20 -0000	1.59.2.3
@@ -1,5 +1,5 @@
 package C4::Output;
-# $Id: Output.pm,v 1.59.2.2 2007/03/25 23:46:14 tgarip1957 Exp $
+# $Id: Output.pm,v 1.59.2.3 2007/03/26 02:19:20 tgarip1957 Exp $
 
 #package to deal with marking up output
 #You will need to edit parts of this pm
@@ -29,7 +29,7 @@
 use C4::Context;
 
 if ($ENV{MOD_PERL}) {
-require HTML::Template::Expr;
+require HTML::Template;
 }else{
 require HTML::Template::Pro;
 }
@@ -78,7 +78,7 @@
 	my ($theme, $lang) = themelanguage($htdocs, $tmplbase, $opac, $query);
 	my $opacstylesheet = C4::Context->preference('opacstylesheet');
 	
-my $template = HTML::Template::Expr->new(filename      => "$htdocs/$theme/$lang/$tmplbase", case_sensitive=>1, utf8=>1,
+my $template = HTML::Template->new(filename      => "$htdocs/$theme/$lang/$tmplbase", case_sensitive=>1, utf8=>1,
 				   die_on_bad_params => 0,
 				   global_vars       => 1, cache=>1,
 				   path              => ["$htdocs/$theme/$lang/$path"],

Index: C4/Barcodes/BarcodeConfig.pm
===================================================================
RCS file: C4/Barcodes/BarcodeConfig.pm
diff -N C4/Barcodes/BarcodeConfig.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Barcodes/BarcodeConfig.pm	26 Mar 2007 02:19:20 -0000	1.1.2.1
@@ -0,0 +1,238 @@
+package C4::Barcodes::BarcodeConfig;
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+use vars qw($VERSION @EXPORT);
+use C4::Context;
+use C4::Date;
+use PDF::API2;
+use PDF::API2::Page;
+use PDF::API2::Util;
+use Time::localtime; 
+use CGI;
+use C4::Barcodes::PrinterConfig;
+
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
+
+=head1 SYNOPSIS
+
+	use C4::Barcodes::BarcodeConfig;
+
+=head1 DESCRIPTION
+
+This package is used to deal with labels in a pdf file. Giving some parameters,
+this package contains several functions to handle every label considering the 
+environment of the pdf file.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at EXPORT = qw(&barcodesGenerator);
+
+
+
+
+sub barcodesGenerator {
+	my ($from, $to, $rangeType, $individualCodes,$text_under_label,$label,%labelConfig) = @_;
+	my $error;
+	my $dbh = C4::Context->dbh;
+$dbh->do('SET NAMES latin5');
+	# Create the query to database
+	# Assigns a temporary filename for the pdf file
+	my $tmpFileName = &assingFilename($from, $to);
+#	my $tmpFileName2 ="/uploaded-files/tmp-pdf/".$tmpFileName;
+# Set the temp directory for pdf´s files
+	my $htdocs = C4::Context->config('intranetdir');
+ my $upload_dir = $htdocs."/htdocs/uploaded-files/tmp-pdf/";
+		$ENV{'TEMP'} = $upload_dir;
+my $tmpFileName2 = $ENV{'TEMP'}.$tmpFileName;
+		# Creates a PDF object
+		my $pdf = PDF::API2->new(-file => $tmpFileName2);
+	if ($rangeType eq 'continuous2') {
+		
+		
+		# Set the positions where barcodes are going to be placed
+		# Creates a font object
+		my $tr = $pdf->corefont('Helvetica-Bold',-encode=>"iso-8859-9");
+		# Barcode position
+		my ($page, $gfx, $text);
+		for (my $code=$from; $code<=$to; $code++) {
+		my $random2 = int(rand(10000000));
+		my $newcode=substr($code,0,3).substr($random2,0,4).substr($code,3,3);
+			# Generetase checksum
+			my $codeC = $newcode;
+			# Generate the corresponde barcode to $code
+			my $barcode = $pdf->xo_2of5int(-font => $tr,	# The font object to use
+										-type => 'ean128',	# Standard of codification
+										-code => $codeC, # Text to codify
+										-extn	=> '012345',	# Barcode extension (if it is aplicable)
+										-umzn => 10,		# Top limit of the finished bar
+										-lmzn => 10,		# Bottom limit of the finished bar
+										-zone => 15,		# Bars size
+										-quzn => 0,		# Space destinated for legend
+										-ofwt => 0.01,	# Bars width
+										-fnsz => 8,		# Font size
+										-text => ''
+										);
+			
+			(my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'},$label,$pdf, $page,$gfx,$text,$tr,$labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'});		
+			# Assigns a barcodes to $gfx
+			$gfx->formimage($barcode, $x-$barcode->width/2, $y-$barcode->height /2, (72/$labelConfig{'systemDpi'}));
+			# Assigns the additional information to the barcode (Legend)
+			$text->translate($x - 50, $y - 24);
+			if ($text_under_label) {
+				$text->text($text_under_label);
+			}
+		}
+		# Writes the objects added in $gfx to $page
+		$pdf->finishobjects($page,$gfx, $text);
+		# Save changes to the PDF
+		$pdf->saveas;
+		# Close the conection with the PDF file
+		$pdf->end;
+		
+			
+	} else {
+		my $rangeCondition;
+		if ($individualCodes ne "") {
+			$rangeCondition = "AND (I.barcode IN " . $individualCodes . ")";
+		} else {
+			$rangeCondition =  "AND (I.barcode >= " . $from . " AND I.barcode <="  . $to . " )";
+		}
+			
+		my $query = "SELECT  I.barcode AS Codigo,B.* FROM biblio B, items I WHERE (I.biblionumber = B.biblionumber ) " .$rangeCondition. " AND (I.barcode <> 'FALTA') ORDER BY Codigo";
+		
+		# Prepare the query
+		my $sth = $dbh->prepare($query);
+		# Executes the query
+		$sth->execute;
+		if ($sth->rows) { # There are inventary codes
+			# Set the temp directory for pdf´s files
+				
+			
+			# Set the positions where barcodes are going to be placed
+			# Creates a font object
+			my $tr = $pdf->corefont('Helvetica-Bold',-encode=>"iso-8859-9");
+			# Barcode position
+			my ($page, $gfx, $text);
+			while (my ($code,$title,$author) = $sth->fetchrow_array) {
+				# Generetase checksum
+#				$code = $code);
+				# Generate the corresponde barcode to $code
+				my $barcode = $pdf->xo_2of5int(-font => $tr,	# The font object to use
+											-type => 'ean128',	# Standard of codification
+											-code => $code, # Text to codify
+											-extn	=> '012345',	# Barcode extension (if it is aplicable)
+											-umzn => 10,		# Top limit of the finished bar
+											-lmzn => 10,		# Bottom limit of the finished bar
+											-zone => 15,		# Bars size
+											-quzn => 0,		# Space destinated for legend
+											-ofwt => 0.01,	# Bars width
+											-fnsz => 8,		# Font size
+											-text => ''
+											);
+				
+			(my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'},$label,$pdf, $page,$gfx,$text,$tr,$labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'});		
+		
+				# Assigns a barcodes to $gfx
+			$gfx->formimage($barcode, $x-$barcode->width/2, $y-$barcode->height /2, (72/$labelConfig{'systemDpi'}));
+			
+				# Assigns the additional information to the barcode (Legend)
+				$text->translate($x - 50, $y - 24);
+				if ($text_under_label) {
+					$text->text($text_under_label);
+				} 
+			}
+			# Writes the objects added in $gfx to $page
+			$pdf->finishobjects($page,$gfx, $text);
+			# Save changes to the PDF
+			$pdf->saveas;
+			# Close the conection with the PDF file
+			$pdf->end;
+
+		} else {
+			# Rollback and shows the error legend
+		$error=1
+
+		}
+	$sth->finish;
+	}
+return ($tmpFileName,$error);
+}
+
+# Assigns a temporary name to the PDF file
+sub assingFilename {
+my $cgi=CGI->new;
+	my ($from, $to) = @_;
+	my $ip = $cgi->remote_addr();
+	my $random = int(rand(1000000));
+    my $timeObj = localtime();
+	my ($day, $month, $year, $hour, $min, $sec) = ($timeObj->mday,
+												   $timeObj->mon + 1,
+												   $timeObj->year + 1900,
+  												   $timeObj->hour,
+												   $timeObj->min,
+												   $timeObj->sec);
+	my $tmpFileName = $random.'-'.$min.'-'.$sec.'.pdf';
+	return $tmpFileName;
+}
+
+  sub calculateDigit {
+    my $code = shift @_;
+    my $sum = 0;
+	  my $odd_parity = 1;
+    my $i;
+    for ($i = length($code) - 1; $i >= 0; $i--){
+	   if ( $odd_parity ) {
+		  $sum = $sum + ( 3 * substr($code, $i, 1) );
+     } else {
+			$sum = $sum + substr($code, $i, 1); }
+		  $odd_parity = !$odd_parity;
+	   }
+    my $check_digit = 10 - ($sum%10);
+	if ($check_digit==10) {
+		$check_digit=0;
+	}
+	  return $code.$check_digit;
+  }
+# Generate the checksum from an inventary code
+sub checksum {
+  my $currentCode = shift @_;
+  $currentCode = &calculateDigit($currentCode);
+  return $currentCode;
+}
+
+1;
+
+__END__
+
+=back
+
+=head1 AUTHOR
+
+TG tgarip at neu.edu.tr
+
+=cut
\ No newline at end of file

Index: C4/Barcodes/MemberCardConfig.pm
===================================================================
RCS file: C4/Barcodes/MemberCardConfig.pm
diff -N C4/Barcodes/MemberCardConfig.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Barcodes/MemberCardConfig.pm	26 Mar 2007 02:19:20 -0000	1.1.2.1
@@ -0,0 +1,269 @@
+package C4::Barcodes::MemberCardConfig;
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+use vars qw($VERSION @EXPORT);
+use C4::Context;
+use C4::Accounts2;
+use C4::Date;
+use PDF::API2;
+use PDF::API2::Page;
+use PDF::API2::Util;
+use C4::Members;
+use Time::localtime; 
+use CGI;
+use C4::Barcodes::PrinterConfig;
+
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
+
+=head1 SYNOPSIS
+
+	use C4::Barcodes::MemberCardConfig;
+
+=head1 DESCRIPTION
+
+This package is used to deal with labels in a pdf file. Giving some parameters,
+this package contains several functions to handle every label considering the 
+environment of the pdf file.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at EXPORT = qw(&barcodesGenerator);
+
+
+
+sub barcodesGenerator {
+	my ($from, $to, $rangeType, $individualCodes,$text_under_label,$label,%labelConfig) = @_;
+	my $error;
+	my $dbh = C4::Context->dbh;
+	$dbh->do('SET NAMES latin5');##PDF fonts only have iso8859 set
+	# Create the query to database
+	# Assigns a temporary filename for the pdf file
+	my $tmpFileName = &assingFilename($from, $to);
+#	my $tmpFileName2 ="/uploaded-files/tmp-pdf/".$tmpFileName;
+# Set the temp directory for pdf´s files
+	my $htdocs = C4::Context->config('intranetdir');
+ my $upload_dir = $htdocs."/htdocs/uploaded-files/tmp-pdf/";
+		$ENV{'TEMP'} = $upload_dir;
+my $tmpFileName2 = $ENV{'TEMP'}.$tmpFileName;
+		# Creates a PDF object
+
+		my $pdf = PDF::API2->new(-file => $tmpFileName2);
+	
+	
+		my $rangeCondition;
+		if ($individualCodes ne "") {
+			$rangeCondition = " (I.cardnumber IN " . $individualCodes . ")";
+		} else {
+			$rangeCondition =  " (I.cardnumber >= " . $from . " AND I.cardnumber <="  . $to . " )";
+		}
+			
+		my $query = "SELECT  I.cardnumber , I.surname,I.firstname,I.streetaddress,I.city,I.expiry,C.description,I.borrowernumber,I.categorycode FROM borrowers I ,categories C WHERE I.categorycode=C.categorycode AND " .$rangeCondition. "  ORDER BY I.cardnumber";
+		# Prepare the query
+		my $sth = $dbh->prepare($query);
+		# Executes the query
+		$sth->execute;
+		if ($sth->rows) { # There are inventary codes
+			# Set the temp directory for pdf´s files
+				
+			
+			# Set the positions where barcodes are going to be placed
+			# Creates a font object
+			my  $tr = $pdf->corefont('Verdana-Bold' , -encode=>"iso-8859-9");
+			# Barcode position
+			my ($page, $gfx, $text);
+			while (my ($code,$sname,$fname,$address,$city,$expiry,$desc,$borrnum,$cat) = $sth->fetchrow_array) {
+#$sname=~s/\xfe/þ/g;
+#$fname=~s/\xfe/þ/g;
+#get picture
+my $picture;
+ my $htdocs = C4::Context->config('opacdir');
+$picture =$htdocs. "/htdocs/uploaded-files/users-photo/".$code.".jpg";
+ if (-e $picture)
+{ 
+
+#   $picture= "http://library.neu.edu.tr/uploaded-files/users-photo/".$code.".jpg";
+ }else{
+$picture = $htdocs. "/htdocs/uploaded-files/users-photo/nophoto.jpg";
+ 
+}
+
+my $fee=C4::Context->preference('cardfee');
+if (($fee > 0)&& $cat eq "A") {
+
+    my $nextacctno = C4::Accounts2::getnextacctno("",$borrnum,$dbh);
+    my $usth = $dbh->prepare("insert into accountlines
+    (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
+						          values
+    (?,?,now(),?,?,'N',?)");
+    $usth->execute($borrnum,$nextacctno,$fee,'Card Charge -'. $code,$fee);
+    $usth->finish;
+  }
+my $img2=$pdf->image_jpeg($htdocs. "/htdocs/uploaded-files/users-photo/emptycard2.JPG");
+my $img=$pdf->image_jpeg($picture);
+
+
+				# Generetase checksum
+#				$code = $code;
+				# Generate the corresponde barcode to $code
+				my $barcode = $pdf->xo_3of9(-font => $tr,	# The font object to use
+											-type => 'ean128',	# Standard of codification
+											-code => $code, # Text to codify
+											-extn	=> '012345',	# Barcode extension (if it is aplicable)
+											-umzn => 8,		# Top limit of the finished bar
+											-lmzn => 8,		# Bottom limit of the finished bar
+											-zone => 7,		# Bars size
+											-quzn => 1,		# Space destinated for legend
+											-ofwt => 0.01,	# Bars width
+											-fnsz => 7,		# Font size
+											-text => ''
+											);
+
+			
+( my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'},$label,$pdf, $page,$gfx,$text,$tr,$labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'});		
+	
+my $top    = $y  + ((($labelConfig{'labelHeigth'} * 72)/25.4) / 2);
+my $bottom = $y  - ((($labelConfig{'labelHeigth'} * 72)/25.4) / 2);
+
+my $left   = $x  - ((($labelConfig{'labelWidth'} * 72)/25.4) / 2);
+my $right  = $x  + ((($labelConfig{'labelWidth'} * 72)/25.4) / 2);
+#Draws the barcode and the logo.
+my $barcode_height = $barcode->height();
+my $barcode_width = $barcode->width();
+my $back_width=$img2->width();
+my $back_height=$img2->height();
+$gfx->image($img2, $left, $bottom,244,153);
+$gfx->formimage($barcode, $left+5, $bottom +13, 1);
+my $img_width = 50;
+my $img_height=65;
+$gfx->image($img, 
+            $right-($img_width)-20, 
+			$bottom+($barcode_height)+20,
+			 $img_width,$img_height
+			);
+   
+#Draws the legend.
+
+$text->font($tr, 8);
+$text->translate($left+($barcode_width)+8, $bottom + ($barcode_height)+2);
+my $date=format_date($expiry);
+$text->text("Expires: ".$date);
+$text->font($tr, 10);
+$text->translate($x-54 , $bottom+($barcode_height)+18);
+$text->text($code);
+
+#Parses the three lines and put them into the PDF.
+my $yoffset = ($barcode_height/2);
+
+
+#$text->font($tr, 10);
+	
+  $text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
+$text->text($fname.' '.$sname);
+
+  $yoffset = $yoffset + 10;
+
+$text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
+  $yoffset = $yoffset + 10;
+	 $text->text($desc);
+  $text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
+  $text->text($address);
+  $yoffset = $yoffset + 10;
+
+	
+  $text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
+   $text->text($city);	
+ 			}
+			# Writes the objects added in $gfx to $page
+			$pdf->finishobjects($page,$gfx, $text);
+			# Save changes to the PDF
+			$pdf->saveas;
+			# Close the conection with the PDF file
+			$pdf->end;
+		} else {
+			# Rollback and shows the error legend
+
+		$error=1;
+
+		}
+	$sth->finish;
+return ($tmpFileName,$error);
+}
+
+# Assigns a temporary name to the PDF file
+sub assingFilename {
+my $cgi=CGI->new;
+	my ($from, $to) = @_;
+	my $ip = $cgi->remote_addr();
+	my $random = int(rand(1000000));
+    my $timeObj = localtime();
+	my ($day, $month, $year, $hour, $min, $sec) = ($timeObj->mday,
+												   $timeObj->mon + 1,
+												   $timeObj->year + 1900,
+  												   $timeObj->hour,
+												   $timeObj->min,
+												   $timeObj->sec);
+	my $tmpFileName = $random.'-'.$min.'-'.$sec.'.pdf';
+	return $tmpFileName;
+}
+
+  sub calculateDigit {
+    my $code = shift @_;
+    my $sum = 0;
+	  my $odd_parity = 1;
+    my $i;
+    for ($i = length($code) - 1; $i >= 0; $i--){
+	   if ( $odd_parity ) {
+		  $sum = $sum + ( 3 * substr($code, $i, 1) );
+     } else {
+			$sum = $sum + substr($code, $i, 1); }
+		  $odd_parity = !$odd_parity;
+	   }
+    my $check_digit = 10 - ($sum%10);
+	if ($check_digit==10) {
+		$check_digit=0;
+	}
+	  return $code.$check_digit;
+  }
+# Generate the checksum from an inventary code
+sub checksum {
+  my $currentCode = shift @_;
+  $currentCode = &calculateDigit($currentCode);
+  return $currentCode;
+}
+
+1;
+
+__END__
+
+=back
+
+=head1 AUTHOR
+
+TG tgarip at neu.edu.tr
+
+=cut
\ No newline at end of file

Index: C4/Barcodes/PrinterConfig.pm
===================================================================
RCS file: C4/Barcodes/PrinterConfig.pm
diff -N C4/Barcodes/PrinterConfig.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Barcodes/PrinterConfig.pm	26 Mar 2007 02:19:20 -0000	1.4.2.1
@@ -0,0 +1,245 @@
+package C4::Barcodes::PrinterConfig;
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+use vars qw($VERSION @EXPORT);
+use C4::Context;
+use PDF::API2;
+use PDF::API2::Page;
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
+
+=head1 SYNOPSIS
+
+	use C4::Barcodes::PrinterConfig;
+
+=head1 DESCRIPTION
+
+This package is used to deal with labels in a pdf file. Giving some parameters,
+this package contains several functions to handle every label considering the 
+environment of the pdf file.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at EXPORT = qw(&labelsPage &getLabelPosition &setPositionsForX &setPositionsForY &saveConfToFile &loadConfFromFile);
+
+
+#my @positionsForY; # Takes all the Y positions of the pdf file.
+ # Test if the label passed as a parameter is the first label to be printed into the pdf file.
+
+=item setPositionsForX
+
+	C4::Barcodes::PrinterConfig::setPositionsForX($marginLeft, $labelWidth, $columns, $pageType);
+
+Calculate and stores all the X positions across the pdf page.
+
+C<$marginLeft> Indicates how much left margin do you want in your page type.
+
+C<$labelWidth> Indicates the width of the label that you are going to use.
+
+C<$columns> Indicates how many columns do you want in your page type.
+
+C<$pageType> Page type to print (eg: a4, legal, etc).
+
+=cut
+#'
+sub setPositionsForX {
+	my ($marginLeft, $labelWidth, $columns, $pageType) = @_;
+#my @positionsForX; # Takes all the X positions of the pdf file.
+	my $defaultDpi = 72/25.4; # By default we know 25.4 mm -> 1 inch -> 72 dots per inch
+	my $whereToStart = ($marginLeft + ($labelWidth/2));
+	my $firstLabel = $whereToStart*$defaultDpi;
+	my $spaceBetweenLabels = $labelWidth*$defaultDpi;
+	my @positions;
+	for (my $i = 0; $i < $columns ; $i++) {
+		push @positions, ($firstLabel+($spaceBetweenLabels*$i));
+	}
+	my @positionsForX = @positions;
+	return @positions;
+}
+
+=item setPositionsForY
+
+	C4::Barcodes::PrinterConfig::setPositionsForY($marginBottom, $labelHeigth, $rows, $pageType);
+
+Calculate and stores all tha Y positions across the pdf page.
+
+C<$marginBottom> Indicates how much bottom margin do you want in your page type.
+
+C<$labelHeigth> Indicates the height of the label that you are going to use.
+
+C<$rows> Indicates how many rows do you want in your page type.
+
+C<$pageType> Page type to print (eg: a4, legal, etc).
+
+=cut
+#'
+sub setPositionsForY {
+	my ($marginBottom, $labelHeigth, $rows, $pageType) = @_;
+	my $defaultDpi = 72/25.4; # By default we know 25.4 mm -> 1 inch -> 72 dots per inch
+	my $whereToStart = ($marginBottom + ($labelHeigth/2));
+	my $firstLabel = $whereToStart*$defaultDpi;
+	my $spaceBetweenLabels = $labelHeigth*$defaultDpi;
+	my @positions;
+	for (my $i = 0; $i < $rows; $i++) {
+		unshift @positions, ($firstLabel+($spaceBetweenLabels*$i));
+	}
+	my @positionsForY = @positions;
+	return @positions;
+}
+
+=item getLabelPosition
+
+	(my $x, my $y, $pdfObject, $pageObject, $gfxObject, $textObject, $coreObject, $labelPosition) = 
+					C4::Barcodes::PrinterConfig::getLabelPosition($labelPosition, 
+																  $pdfObject, 
+																  $page,
+																  $gfx,
+																  $text,
+																  $fontObject,
+																  $pageType);	
+
+Return the (x,y) position of the label that you are going to print considering the environment.
+
+C<$labelPosition> Indicates which label positions do you want to place by x and y coordinates.
+
+C<$pdfObject> The PDF object in use.
+
+C<$page> The page in use.
+
+C<$gfx> The gfx resource to handle with barcodes objects.
+
+C<$text> The text resource to handle with text.
+
+C<$fontObject> The font object
+
+C<$pageType> Page type to print (eg: a4, legal, etc).
+
+=cut
+#'
+sub getLabelPosition {
+	my ($marginLeft, $labelWidth, $columns, $pageType,$labelNum, $pdf, $page, $gfxObject, $textObject, $fontObject, $marginBottom, $labelHeigth, $rows) = @_;
+	my @positionsForX =setPositionsForX($marginLeft, $labelWidth, $columns, $pageType) ;
+	my  @positionsForY =setPositionsForY($marginBottom, $labelHeigth, $rows, $pageType);
+	my $indexX = $labelNum % @positionsForX;
+	my $indexY = int($labelNum / @positionsForX);
+	# Calculates the next label position and return that label number
+	my $nextIndexX = $labelNum % @positionsForX;
+	my $nextIndexY = $labelNum % @positionsForY;
+	if ($labelNum== 0) {
+          $page = $pdf->page;
+          $page->mediabox($pageType);
+          $gfxObject = $page->gfx;
+          $textObject = $page->text;
+          $textObject->font($fontObject, 7);
+	}
+	$labelNum = $labelNum + 1;	
+	if ($labelNum == (@positionsForX*@positionsForY)) {
+		$labelNum = 0;
+	}
+	return ($positionsForX[$indexX], $positionsForY[$indexY], $pdf, $page, $gfxObject, $textObject, $fontObject, $labelNum);
+}
+
+=item labelsPage
+
+	my @labelTable = C4::Barcodes::PrinterConfig::labelsPage($rows, $columns);
+
+This function will help you to build the labels panel, where you can choose
+wich label position do you want to start the printer process.
+
+C<$rows> Indicates how many rows do you want in your page type.
+
+C<$columns> Indicates how many rows do you want in your page type.
+
+=cut
+#'
+sub labelsPage{
+	my ($rows, $columns) = @_;
+	my @pageType;
+	my $tagname = 0;
+	my $labelname = 1;
+	my $check;
+	for (my $i = 1; $i <= $rows; $i++) {
+		my @column;
+		for (my $j = 1; $j <= $columns; $j++) {
+			my %cell;
+			if ($tagname == 0) {
+				$check = 'checked';
+			} else {
+				$check = '';
+			}		
+			%cell = (check => $check,
+					 tagname => $tagname,
+			         labelname => $labelname);
+			$tagname = $tagname + 1;	
+			$labelname = $labelname + 1;	
+			push @column, \%cell;
+		}
+		my %columns = (columns => \@column);
+		push @pageType, \%columns;
+	}
+	return @pageType;
+}
+
+# Load a configuration file. Before use this function, check if that file exists.
+sub loadConfFromFile {
+  my $fileName = shift @_;
+	my %keyValues;
+	open FILE, "<$fileName";
+	while (<FILE>) {
+		chomp;
+		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
+			$keyValues{$1} = $2;
+		}
+	}
+	close FILE;
+	return %keyValues;
+}
+
+# Save settings to a configuration file. It delete previous configuration settings.
+sub saveConfToFile {
+	my $fileName = shift @_;
+	my %keyValues = %{shift @_};
+	my $i;
+	open FILE, ">$fileName";			
+	my $i;
+	foreach $i (keys(%keyValues)) {
+    print FILE $i." = ".$keyValues{$i}."\n";
+	}
+	close FILE;
+}
+
+1;
+
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Physics Library UNLP <matias_veleda at hotmail.com>
+
+=cut
\ No newline at end of file

Index: C4/Calendar/Calendar.pm
===================================================================
RCS file: C4/Calendar/Calendar.pm
diff -N C4/Calendar/Calendar.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Calendar/Calendar.pm	26 Mar 2007 02:19:20 -0000	1.4.4.2
@@ -0,0 +1,563 @@
+package C4::Calendar::Calendar;
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+use vars qw($VERSION @EXPORT);
+
+use C4::Context;
+use Date::Calc qw(Add_Delta_Days Day_of_Week);
+
+# set the version for version checking
+$VERSION = 1.01;
+
+=head1 NAME
+
+C4::Calendar::Calendar - Koha module dealing with holidays.
+
+=head1 SYNOPSIS
+
+	use C4::Calendar::Calendar;
+
+=head1 DESCRIPTION
+
+This package is used to deal with holidays. Through this package, you can set all kind of holidays for the library.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at EXPORT = qw(&new 
+             &change_branchcode 
+			 &get_week_days_holidays 
+			 &get_day_month_holidays 
+             &get_exception_holidays 
+			 &get_single_holidays 
+			 &insert_week_day_holiday 
+			 &insert_day_month_holiday 
+			 &insert_single_holiday 
+			 &insert_exception_holiday
+			 &delete_holiday 
+			 &isHoliday 
+			 &addDate
+			 &daysBetween);
+
+=item new
+
+	$calendar = C4::Calendar::Calendar->new(branchcode => $branchcode);
+
+C<$branchcode> Is the branch code wich you want to use calendar.
+
+=cut
+
+sub new {
+	my $classname = shift @_;
+	my %options = @_;
+
+	my %hash;
+	my $self = bless(\%hash, $classname);
+
+	foreach my $optionName (keys %options) {
+		$self->{lc($optionName)} = $options{$optionName};
+	}
+
+	$self->_init;
+
+	return $self;
+}
+
+sub _init {
+	my $self = shift @_;
+
+	my $dbh = C4::Context->dbh();
+	my $week_days_sql = $dbh->prepare("select weekday, title, description from repeatable_holidays where ('$self->{branchcode}' = branchcode) and (NOT(ISNULL(weekday)))");
+	$week_days_sql->execute;
+	my %week_days_holidays;
+	while (my ($weekday, $title, $description) = $week_days_sql->fetchrow) {
+		$week_days_holidays{$weekday}{title} = $title;
+		$week_days_holidays{$weekday}{description} = $description;
+	}
+	$week_days_sql->finish;
+	$self->{'week_days_holidays'} = \%week_days_holidays;
+
+	my $day_month_sql = $dbh->prepare("select day, month, title, description from repeatable_holidays where ('$self->{branchcode}' = branchcode) and ISNULL(weekday)");
+	$day_month_sql->execute;
+	my %day_month_holidays;
+	while (my ($day, $month, $title, $description) = $day_month_sql->fetchrow) {
+		$day_month_holidays{"$month/$day"}{title} = $title;
+		$day_month_holidays{"$month/$day"}{description} = $description;
+	}
+	$day_month_sql->finish;
+	$self->{'day_month_holidays'} = \%day_month_holidays;
+
+	my $exception_holidays_sql = $dbh->prepare("select day, month, year, title, description from special_holidays where ('$self->{branchcode}' = branchcode) and (isexception = 1)");
+	$exception_holidays_sql->execute;
+	my %exception_holidays;
+	while (my ($day, $month, $year, $title, $description) = $exception_holidays_sql->fetchrow) {
+		$exception_holidays{"$year/$month/$day"}{title} = $title;
+		$exception_holidays{"$year/$month/$day"}{description} = $description;
+	}
+	$exception_holidays_sql->finish;
+	$self->{'exception_holidays'} = \%exception_holidays;
+
+	my $holidays_sql = $dbh->prepare("select day, month, year, title, description from special_holidays where ('$self->{branchcode}' = branchcode) and (isexception = 0)");
+	$holidays_sql->execute;
+	my %single_holidays;
+	while (my ($day, $month, $year, $title, $description) = $holidays_sql->fetchrow) {
+		$single_holidays{"$year/$month/$day"}{title} = $title;
+		$single_holidays{"$year/$month/$day"}{description} = $description;
+	}
+	$holidays_sql->finish;
+	$self->{'single_holidays'} = \%single_holidays;
+}
+
+=item change_branchcode
+
+	$calendar->change_branchcode(branchcode => $branchcode)
+
+Change the calendar branch code. This means to change the holidays structure.
+
+C<$branchcode> Is the branch code wich you want to use calendar.
+
+=cut
+
+sub change_branchcode {
+	my ($self, $branchcode) = @_;
+	my %options = @_;
+
+	foreach my $optionName (keys %options) {
+		$self->{lc($optionName)} = $options{$optionName};
+	}
+	$self->_init;
+
+	return $self;
+}
+
+=item get_week_days_holidays
+
+	$week_days_holidays = $calendar->get_week_days_holidays();
+
+Returns a hash reference to week days holidays.
+
+=cut
+
+sub get_week_days_holidays {
+	my $self = shift @_;
+	my $week_days_holidays = $self->{'week_days_holidays'};
+	return $week_days_holidays;
+}
+
+=item get_day_month_holidays
+	
+	$day_month_holidays = $calendar->get_day_month_holidays();
+
+Returns a hash reference to day month holidays.
+
+=cut
+
+sub get_day_month_holidays {
+	my $self = shift @_;
+	my $day_month_holidays = $self->{'day_month_holidays'};
+	return $day_month_holidays;
+}
+
+=item get_exception_holidays
+	
+	$exception_holidays = $calendar->exception_holidays();
+
+Returns a hash reference to exception holidays. This kind of days are those
+which stands for a holiday, but you wanted to make an exception for this particular
+date.
+
+=cut
+
+sub get_exception_holidays {
+	my $self = shift @_;
+	my $exception_holidays = $self->{'exception_holidays'};
+	return $exception_holidays;
+}
+
+=item get_single_holidays
+	
+	$single_holidays = $calendar->get_single_holidays();
+
+Returns a hash reference to single holidays. This kind of holidays are those which
+happend just one time.
+
+=cut
+
+sub get_single_holidays {
+	my $self = shift @_;
+	my $single_holidays = $self->{'single_holidays'};
+	return $single_holidays;
+}
+
+=item insert_week_day_holiday
+
+	insert_week_day_holiday(weekday => $weekday,
+							title => $title,
+							description => $description);
+
+Inserts a new week day for $self->{branchcode}.
+
+C<$day> Is the week day to make holiday.
+
+C<$title> Is the title to store for the holiday formed by $year/$month/$day.
+
+C<$description> Is the description to store for the holiday formed by $year/$month/$day.
+
+=cut
+
+sub insert_week_day_holiday {
+	my $self = shift @_;
+	my %options = @_;
+
+	my $dbh = C4::Context->dbh();
+	my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', '$self->{branchcode}', $options{weekday}, NULL, NULL, '$options{title}', '$options{description}')");
+	$insertHoliday->execute;
+	$insertHoliday->finish;
+
+	$self->{'week_days_holidays'}->{$options{weekday}}{title} = $options{title};
+	$self->{'week_days_holidays'}->{$options{weekday}}{description} = $options{description};
+	return $self;
+}
+
+=item insert_day_month_holiday
+
+	insert_day_month_holiday(day => $day,
+	                         month => $month,
+							 title => $title,
+							 description => $description);
+
+Inserts a new day month holiday for $self->{branchcode}.
+
+C<$day> Is the day month to make the date to insert.
+
+C<$month> Is month to make the date to insert.
+
+C<$title> Is the title to store for the holiday formed by $year/$month/$day.
+
+C<$description> Is the description to store for the holiday formed by $year/$month/$day.
+
+=cut
+
+sub insert_day_month_holiday {
+	my $self = shift @_;
+	my %options = @_;
+
+	my $dbh = C4::Context->dbh();
+	my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', '$self->{branchcode}', NULL, $options{day}, $options{month}, '$options{title}', '$options{description}')");
+	$insertHoliday->execute;
+	$insertHoliday->finish;
+
+	$self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{title} = $options{title};
+	$self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{description} = $options{description};
+	return $self;
+}
+
+=item insert_single_holiday
+
+	insert_single_holiday(day => $day,
+	                      month => $month,
+						  year => $year,
+						  title => $title,
+						  description => $description);
+
+Inserts a new single holiday for $self->{branchcode}.
+
+C<$day> Is the day month to make the date to insert.
+
+C<$month> Is month to make the date to insert.
+
+C<$year> Is year to make the date to insert.
+
+C<$title> Is the title to store for the holiday formed by $year/$month/$day.
+
+C<$description> Is the description to store for the holiday formed by $year/$month/$day.
+
+=cut
+
+sub insert_single_holiday {
+	my $self = shift @_;
+	my %options = @_;
+
+	my $dbh = C4::Context->dbh();
+	my $isexception = 0;
+	my $insertHoliday = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', '$self->{branchcode}', $options{day}, $options{month}, $options{year}, $isexception, '$options{title}', '$options{description}')");
+	$insertHoliday->execute;
+	$insertHoliday->finish;
+
+	$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title};
+	$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
+	return $self;
+}
+
+=item insert_exception_holiday
+
+	insert_exception_holiday(day => $day,
+	                         month => $month,
+						     year => $year,
+						     title => $title,
+						     description => $description);
+
+Inserts a new exception holiday for $self->{branchcode}.
+
+C<$day> Is the day month to make the date to insert.
+
+C<$month> Is month to make the date to insert.
+
+C<$year> Is year to make the date to insert.
+
+C<$title> Is the title to store for the holiday formed by $year/$month/$day.
+
+C<$description> Is the description to store for the holiday formed by $year/$month/$day.
+
+=cut
+
+sub insert_exception_holiday {
+	my $self = shift @_;
+	my %options = @_;
+
+	my $dbh = C4::Context->dbh();
+	my $isexception = 1;
+	my $insertException = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', '$self->{branchcode}', $options{day}, $options{month}, $options{year}, $isexception, '$options{title}', '$options{description}')");
+	$insertException->execute;
+	$insertException->finish;
+
+	$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title};
+	$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
+	return $self;
+}
+
+=item delete_holiday
+
+	delete_holiday(weekday => $weekday
+	               day => $day,
+	               month => $month,
+				   year => $year);
+
+Delete a holiday for $self->{branchcode}.
+
+C<$weekday> Is the week day to delete.
+
+C<$day> Is the day month to make the date to delete.
+
+C<$month> Is month to make the date to delete.
+
+C<$year> Is year to make the date to delete.
+
+=cut
+
+sub delete_holiday {
+	my $self = shift @_;
+	my %options = @_;
+
+	# Verify what kind of holiday that day is. For example, if it is
+	# a repeatable holiday, this should check if there are some exception
+	# for that holiday rule. Otherwise, if it is a regular holiday, it´s 
+	# ok just deleting it.
+
+	my $dbh = C4::Context->dbh();
+	my $isSingleHoliday = $dbh->prepare("select id from special_holidays where (branchcode = '$self->{branchcode}') and (day = $options{day}) and (month = $options{month}) and (year = $options{year})");
+	$isSingleHoliday->execute;
+	if ($isSingleHoliday->rows) {
+		my $id = $isSingleHoliday->fetchrow;
+		$isSingleHoliday->finish; # Close the last query
+
+		my $deleteHoliday = $dbh->prepare("delete from special_holidays where (id = $id)");
+		$deleteHoliday->execute;
+		$deleteHoliday->finish; # Close the last query
+		delete($self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"});
+	} else {	
+		$isSingleHoliday->finish; # Close the last query
+
+		my $isWeekdayHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') and (weekday = $options{weekday})");
+		$isWeekdayHoliday->execute;
+		if ($isWeekdayHoliday->rows) {
+			my $id = $isWeekdayHoliday->fetchrow;
+			$isWeekdayHoliday->finish; # Close the last query
+
+			my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (WEEKDAY(CONCAT(special_holidays.year,'-',special_holidays.month,'-',special_holidays.day)) = $options{weekday}) and (branchcode = '$self->{branchcode}')");
+			$updateExceptions->execute;
+			$updateExceptions->finish; # Close the last query
+
+			my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
+			$deleteHoliday->execute;
+			$deleteHoliday->finish;
+			delete($self->{'week_days_holidays'}->{$options{weekday}});
+		} else {
+			$isWeekdayHoliday->finish; # Close the last query
+
+			my $isDayMonthHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') (day = $options{day}) and (month = $options{month})");
+			$isDayMonthHoliday->execute;
+			if ($isDayMonthHoliday->rows) {
+				my $id = $isDayMonthHoliday->fetchrow;
+				$isDayMonthHoliday->finish;
+				my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (special_holidays.branchcode = '$self->{branchcode}') and (special_holidays.day = $options{day}) and (special_holidays.month = $options{month})");
+				$updateExceptions->execute;
+				$updateExceptions->finish; # Close the last query
+
+				my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
+				$deleteHoliday->execute;
+				$deleteHoliday->finish; # Close the last query
+				$isDayMonthHoliday->finish; # Close the last query
+				delete($self->{'day_month_holidays'}->{"$options{month}/$options{day}"});
+			}
+		}
+	}	
+	return $self;
+}
+
+=item isHoliday
+	
+	$isHoliday = isHoliday($day, $month $year);
+
+
+C<$day> Is the day to check wether if is a holiday or not.
+
+C<$month> Is the month to check wether its a holiday or not.
+
+C<$year> Is the year to check wether if its a holiday or not.
+
+=cut
+
+sub isHoliday {
+	my ($self, $day, $month, $year) = @_;
+
+	my $weekday = Day_of_Week( $year,$month, $day);	
+	my $weekDays = $self->get_week_days_holidays();
+	my $dayMonths = $self->get_day_month_holidays();
+	my $exceptions = $self->get_exception_holidays();
+	my $singles = $self->get_single_holidays();
+
+	if (defined($exceptions->{"$year/$month/$day"})) {
+		return 0;
+	} else {		
+		if ((exists($weekDays->{$weekday})) || 
+			(exists($dayMonths->{"$month/$day"})) || 
+			(exists($singles->{"$year/$month/$day"}))) {			
+			return 1;
+		} else {
+			return 0;
+		}
+	}
+
+}
+
+=item addDate
+
+	my ($day, $month, $year) = $calendar->addDate($day, $month, $year, $offset)
+
+C<$day> Is the starting day of the interval.
+
+C<$month> Is the starting month of the interval.
+
+C<$year> Is the starting year of the interval.
+
+C<$offset> Is the number of days that this function has to count from $date.
+
+=cut
+
+sub addDate {
+	my ($self, $day, $month, $year, $offset) = @_;
+	if ($offset < 0) { # In case $offset is negative
+		$offset = $offset*(-1);
+	}
+
+	my $daysMode = C4::Context->preference('useDaysMode');
+	if ($daysMode eq 'normal') {
+		($year, $month, $day) = Add_Delta_Days($year, $month, $day, ($offset - 1));
+	} else {
+		while ($offset > 0) {								
+			if (!($self->isHoliday($day, $month, $year))) {
+				$offset = $offset - 1;					
+			}				
+			if ($offset > 0) {
+				($year, $month, $day) = Add_Delta_Days($year, $month, $day, 1);
+			}				
+		}
+	}
+	return($day, $month, $year);	
+}
+
+=item daysBetween
+
+	my $daysBetween = $calendar->daysBetween($dayFrom, $monthFrom, $yearFrom,
+	                                         $dayTo, $monthTo, $yearTo)
+
+C<$dayFrom> Is the starting day of the interval.
+
+C<$monthFrom> Is the starting month of the interval.
+
+C<$yearFrom> Is the starting year of the interval.
+
+C<$dayTo> Is the ending day of the interval.
+
+C<$monthTo> Is the ending month of the interval.
+
+C<$yearTo> Is the ending year of the interval.
+
+=cut
+
+sub daysBetween {
+	my ($self, $dayFrom, $monthFrom, $yearFrom, $dayTo, $monthTo, $yearTo) = @_;
+	 
+	my $daysMode = C4::Context->preference('useDaysMode');
+	my $count = 1;
+	my $continue = 1;
+	if ($daysMode eq 'normal') {
+		while ($continue) {
+			if (($yearFrom != $yearTo) || ($monthFrom != $monthTo) || ($dayFrom != $dayTo)) {
+				($yearFrom, $monthFrom, $dayFrom) = Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, 1);
+				$count++;
+			} else {
+				$continue = 0;	
+			}
+		}		
+	} else {
+		while ($continue) {
+			if (($yearFrom != $yearTo) || ($monthFrom != $monthTo) || ($dayFrom != $dayTo)) {
+				if (!($self->isHoliday($dayFrom, $monthFrom, $yearFrom))) {
+					$count++;
+				}	
+				($yearFrom, $monthFrom, $dayFrom) = Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, 1);				
+			} else {
+				$continue = 0;	
+			}
+		}		
+	}
+	return($count);	
+}
+
+
+
+
+
+
+1;
+
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Physics Library UNLP <matias_veleda at hotmail.com>
+Modified by Tumer Garip NEU Grand Library --No more Date::Manip
+=cut
\ No newline at end of file

Index: C4/Circulation/Circ2.pm
===================================================================
RCS file: C4/Circulation/Circ2.pm
diff -N C4/Circulation/Circ2.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Circulation/Circ2.pm	26 Mar 2007 02:19:20 -0000	1.123.2.2
@@ -0,0 +1,1997 @@
+package C4::Circulation::Circ2;
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+
+use C4::Context;
+use C4::Stats;
+use C4::Reserves2;
+use C4::Koha;
+use C4::Accounts2;
+use C4::Biblio;
+use C4::Calendar::Calendar;
+use C4::Search;
+use C4::Members;
+use C4::Date;
+
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+
+# set the version for version checking
+$VERSION = do { my @v = '$Revision: 1.123.2.2 $' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
+
+=head1 NAME
+
+C4::Circulation::Circ2 - Koha circulation module
+
+=head1 SYNOPSIS
+
+  use C4::Circulation::Circ2;
+
+=head1 DESCRIPTION
+
+The functions in this module deal with circulation, issues, and
+returns, as well as general information about the library.
+Also deals with stocktaking.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at ISA = qw(Exporter);
+ at EXPORT = qw(
+	&currentissues 
+	&getissues 
+	&getiteminformation 
+	&renewstatus 
+	&renewbook
+	&canbookbeissued 
+	&issuebook 
+	&returnbook 
+	&find_reserves 
+	&transferbook 
+	&decode
+
+	&listitemsforinventory 
+	&itemseen 
+	&itemseenbarcode
+	&fixdate 
+	&itemissues 
+
+	 &get_current_return_date_of
+                &get_transfert_infos
+		&checktransferts
+		&GetReservesForBranch
+		&GetReservesToBranch
+		&GetTransfersFromBib
+		&getBranchIp);
+
+# &getbranches &getprinters &getbranch &getprinter => moved to C4::Koha.pm
+=item itemissues
+
+  @issues = &itemissues($biblionumber, $biblio);
+
+Looks up information about who has borrowed the bookZ<>(s) with the
+given biblionumber.
+
+C<$biblio> is ignored.
+
+C<&itemissues> returns an array of references-to-hash. The keys
+include the fields from the C<items> table in the Koha database.
+Additional keys include:
+
+=over 4
+
+=item C<date_due>
+
+If the item is currently on loan, this gives the due date.
+
+If the item is not on loan, then this is either "Available" or
+"Cancelled", if the item has been withdrawn.
+
+=item C<card>
+
+If the item is currently on loan, this gives the card number of the
+patron who currently has the item.
+
+=item C<timestamp0>, C<timestamp1>, C<timestamp2>
+
+These give the timestamp for the last three times the item was
+borrowed.
+
+=item C<card0>, C<card1>, C<card2>
+
+The card number of the last three patrons who borrowed this item.
+
+=item C<borrower0>, C<borrower1>, C<borrower2>
+
+The borrower number of the last three patrons who borrowed this item.
+
+=back
+
+=cut
+#'
+sub itemissues {
+    my ($dbh,$data, $itemnumber)=@_;
+    
+      
+    my $i     = 0;
+    my @results;
+
+
+        # Find out who currently has this item.
+        # FIXME - Wouldn't it be better to do this as a left join of
+        # some sort? Currently, this code assumes that if
+        # fetchrow_hashref() fails, then the book is on the shelf.
+        # fetchrow_hashref() can fail for any number of reasons (e.g.,
+        # database server crash), not just because no items match the
+        # search criteria.
+        my $sth2   = $dbh->prepare("select * from issues,borrowers
+where itemnumber = ?
+and returndate is NULL
+and issues.borrowernumber = borrowers.borrowernumber");
+
+        $sth2->execute($itemnumber);
+        if (my $data2 = $sth2->fetchrow_hashref) {
+
+  	$data->{'date_due'}=$data2->{'date_due'};
+	$data->{'datelastborrowed'} = $data2->{'issue_date'};
+            $data->{'card'}     = $data2->{'cardnumber'};
+	    $data->{'borrower'}     = $data2->{'borrowernumber'};
+	$data->{issues}++;
+        } 
+
+        $sth2->finish;
+	 my $sth2   = $dbh->prepare("select * from reserveissue,borrowers
+where itemnumber = ?
+and rettime is NULL
+and reserveissue.borrowernumber = borrowers.borrowernumber");
+
+        $sth2->execute($itemnumber);
+        if (my $data2 = $sth2->fetchrow_hashref) {
+
+  	$data->{'date_due'}=$data2->{'duetime'};
+	$data->{'datelastborrowed'} = $data2->{'restime'};
+            $data->{'card'}     = $data2->{'cardnumber'};
+	    $data->{'borrower'}     = $data2->{'borrowernumber'};
+	$data->{issues}++;
+        } 
+
+        $sth2->finish;
+        # Find the last 2 people who borrowed this item.
+        $sth2 = $dbh->prepare("select * from issues, borrowers
+						where itemnumber = ?
+									and issues.borrowernumber = borrowers.borrowernumber
+									and returndate is not NULL
+									order by returndate desc,timestamp desc limit 2") ;
+        $sth2->execute($itemnumber) ;
+my $i2=0;
+          while (my $data2  = $sth2->fetchrow_hashref) {
+                $data->{"timestamp$i2"} = $data2->{'timestamp'};
+                $data->{"card$i2"}      = $data2->{'cardnumber'};
+                $data->{"borrower$i2"}  = $data2->{'borrowernumber'};
+$data->{'datelastborrowed'} = $data2->{'issue_date'} unless $data->{'datelastborrowed'};
+	$i2++;
+            } # while
+
+        $sth2->finish;
+    return($data);
+}
+
+
+
+=head2 itemseen
+
+&itemseen($dbh,$itemnum)
+Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking
+C<$itemnum> is the item number
+
+=cut
+
+sub itemseen {
+	my ($dbh,$itemnumber) = @_;
+my $sth=$dbh->prepare("select biblionumber from items where itemnumber=?");
+	$sth->execute($itemnumber);
+my ($biblionumber)=$sth->fetchrow; 
+XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',"0",1);
+# find today's date
+my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
+	$year += 1900;
+	$mon += 1;
+	my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
+		$year,$mon,$mday,$hour,$min,$sec);
+XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'datelastseen', $timestamp);	
+}
+sub itemseenbarcode {
+	my ($dbh,$barcode) = @_;
+my $sth=$dbh->prepare("select biblionumber,itemnumber from items where barcode=$barcode");
+	$sth->execute();
+my ($biblionumber,$itemnumber)=$sth->fetchrow; 
+XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',"0",1);
+my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
+	$year += 1900;
+	$mon += 1;
+my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",$year,$mon,$mday,$hour,$min,$sec);
+XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'datelastseen', $timestamp);	
+}
+
+
+
+
+
+=head2 decode
+
+=over 4
+
+=head3 $str = &decode($chunk);
+
+=over 4
+
+Decodes a segment of a string emitted by a CueCat barcode scanner and
+returns it.
+
+=back
+
+=back
+
+=cut
+
+# FIXME - At least, I'm pretty sure this is for decoding CueCat stuff.
+sub decode {
+	my ($encoded) = @_;
+	my $seq = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-';
+	my @s = map { index($seq,$_); } split(//,$encoded);
+	my $l = ($#s+1) % 4;
+	if ($l)
+	{
+		if ($l == 1)
+		{
+			print "Error!";
+			return;
+		}
+		$l = 4-$l;
+		$#s += $l;
+	}
+	my $r = '';
+	while ($#s >= 0)
+	{
+		my $n = (($s[0] << 6 | $s[1]) << 6 | $s[2]) << 6 | $s[3];
+		$r .=chr(($n >> 16) ^ 67) .
+		chr(($n >> 8 & 255) ^ 67) .
+		chr(($n & 255) ^ 67);
+		@s = @s[4..$#s];
+	}
+	$r = substr($r,0,length($r)-$l);
+	return $r;
+}
+
+=head2 getiteminformation
+
+=over 4
+
+$item = &getiteminformation($env, $itemnumber, $barcode);
+
+Looks up information about an item, given either its item number or
+its barcode. If C<$itemnumber> is a nonzero value, it is used;
+otherwise, C<$barcode> is used.
+
+C<$env> is effectively ignored, but should be a reference-to-hash.
+
+C<$item> is a reference-to-hash whose keys are fields from the biblio,
+items, and biblioitems tables of the Koha database. It may also
+contain the following keys:
+
+=head3 date_due
+
+=over 4
+
+The due date on this item, if it has been borrowed and not returned
+yet. The date is in YYYY-MM-DD format.
+
+=back
+
+=head3 notforloan
+
+=over 4
+
+True if the item may not be borrowed.
+
+=back
+
+=back
+
+=cut
+
+
+sub getiteminformation {
+# returns a hash of item information together with biblio given either the itemnumber or the barcode
+	my ($env, $itemnumber, $barcode) = @_;
+	my $dbh=C4::Context->dbh;
+	my ($itemrecord)=XMLgetitem($dbh,$itemnumber,$barcode);
+	return undef unless $itemrecord; ## This is to prevent a system crash if barcode does not exist	
+	 my $itemhash=XML_xml2hash_onerecord($itemrecord);	
+	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemhash,"holdings");
+##Now get full biblio details from MARC
+	if ($iteminformation) {
+my ($record)=XMLgetbiblio($dbh,$iteminformation->{'biblionumber'});
+	my $recordhash=XML_xml2hash_onerecord($record);
+my $biblio=XMLmarc2koha_onerecord($dbh,$recordhash,"biblios");
+		foreach my $field (keys %$biblio){
+		$iteminformation->{$field}=$biblio->{$field};
+		} 
+	$iteminformation->{'date_due'}="" if $iteminformation->{'date_due'} eq "0000-00-00";
+	($iteminformation->{'dewey'} == 0) && ($iteminformation->{'dewey'}='');	
+	}
+	return($iteminformation);
+}
+
+=head2 transferbook
+
+=over 4
+
+($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, $barcode, $ignore_reserves);
+
+Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
+
+C<$newbranch> is the code for the branch to which the item should be transferred.
+
+C<$barcode> is the barcode of the item to be transferred.
+
+If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
+Otherwise, if an item is reserved, the transfer fails.
+
+Returns three values:
+
+=head3 $dotransfer 
+
+is true if the transfer was successful.
+
+=head3 $messages
+ 
+is a reference-to-hash which may have any of the following keys:
+
+=over 4
+
+C<BadBarcode>
+
+There is no item in the catalog with the given barcode. The value is C<$barcode>.
+
+C<IsPermanent>
+
+The item's home branch is permanent. This doesn't prevent the item from being transferred, though. The value is the code of the item's home branch.
+
+C<DestinationEqualsHolding>
+
+The item is already at the branch to which it is being transferred. The transfer is nonetheless considered to have failed. The value should be ignored.
+
+C<WasReturned>
+
+The item was on loan, and C<&transferbook> automatically returned it before transferring it. The value is the borrower number of the patron who had the item.
+
+C<ResFound>
+
+The item was reserved. The value is a reference-to-hash whose keys are fields from the reserves table of the Koha database, and C<biblioitemnumber>. It also has the key C<ResFound>, whose value is either C<Waiting> or C<Reserved>.
+
+C<WasTransferred>
+
+The item was eligible to be transferred. Barring problems communicating with the database, the transfer should indeed have succeeded. The value should be ignored.
+
+=back
+
+=back
+
+=back
+
+=cut
+
+##This routine is reverted to origional state
+##This routine is used when a book physically arrives at a branch due to user returning it there
+## so record the fact that holdingbranch is changed.
+sub transferbook {
+# transfer book code....
+	my ($tbr, $barcode, $ignoreRs,$user) = @_;
+	my $messages;
+	my %env;
+	my $dbh=C4::Context->dbh;
+	my $dotransfer = 1;
+	my $branches = GetBranches();
+
+	my $iteminformation = getiteminformation(\%env, 0, $barcode);
+	# bad barcode..
+	if (not $iteminformation) {
+		$messages->{'BadBarcode'} = $barcode;
+		$dotransfer = 0;
+	}
+	# get branches of book...
+	my $hbr = $iteminformation->{'homebranch'};
+	my $fbr = $iteminformation->{'holdingbranch'};
+	# if is permanent...
+	if ($hbr && $branches->{$hbr}->{'PE'}) {
+		$messages->{'IsPermanent'} = $hbr;
+	}
+	
+	# check if it is still issued to someone, return it...
+	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
+	if ($currentborrower) {
+		returnbook($barcode, $fbr);
+		$messages->{'WasReturned'} = $currentborrower;
+	}
+	# find reserves.....
+	# FIXME - Don't call &CheckReserves unless $ignoreRs is true.
+	# That'll save a database query.
+	my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'});
+	if ($resfound and not $ignoreRs) {
+		$resrec->{'ResFound'} = $resfound;
+		$messages->{'ResFound'} = $resrec;
+		$dotransfer = 0;
+	}
+	#actually do the transfer....
+	if ($dotransfer) {
+		dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr,$user);
+		$messages->{'WasTransfered'} = 1;
+	}
+	return ($dotransfer, $messages, $iteminformation);
+}
+
+# Not exported
+
+sub dotransfer {
+## The book has arrived at this branch because it has been returned there
+## So we update the fact the book is in that branch not that we want to send the book to that branch
+
+	my ($itm, $fbr, $tbr,$user) = @_;
+	my $dbh = C4::Context->dbh;
+	unless ($fbr eq $tbr){
+	#new entry in branchtransfers....
+	my $sth=$dbh->prepare("INSERT INTO branchtransfers (itemnumber, frombranch, datearrived, tobranch,comments) VALUES (?, ?, now(), ?,?)");
+	$sth->execute($itm, $fbr,  $tbr,$user);
+	#update holdingbranch in items .....
+	&domarctransfer($dbh,$itm,$tbr);
+	}	
+	return;
+}
+
+sub domarctransfer{
+my ($dbh,$itemnumber,$holdingbranch) = @_; 
+$itemnumber=~s /\'//g;
+XMLmoditemonefield($dbh,undef,$itemnumber,'holdingbranch',$holdingbranch,1);
+	
+}
+
+=head2 canbookbeissued
+
+Check if a book can be issued.
+
+my ($issuingimpossible,$needsconfirmation) = canbookbeissued($env,$borrower,$barcode,$year,$month,$day);
+
+=over 4
+
+C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
+
+C<$borrower> hash with borrower informations (from getpatroninformation)
+
+C<$barcode> is the bar code of the book being issued.
+
+C<$year> C<$month> C<$day> contains the date of the return (in case it's forced by "stickyduedate".
+
+=back
+
+Returns :
+
+=over 4
+
+C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
+Possible values are :
+
+=head3 INVALID_DATE 
+
+sticky due date is invalid
+
+=head3 GNA
+
+borrower gone with no address
+
+=head3 CARD_LOST
+ 
+borrower declared it's card lost
+
+=head3 DEBARRED
+
+borrower debarred
+
+=head3 UNKNOWN_BARCODE
+
+barcode unknown
+
+=head3 NOT_FOR_LOAN
+
+item is not for loan
+
+=head3 WTHDRAWN
+
+item withdrawn.
+
+=head3 RESTRICTED
+
+item is restricted (set by ??)
+
+=back
+
+C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
+Possible values are :
+
+=head3 DEBT
+
+borrower has debts.
+
+=head3 RENEW_ISSUE
+
+renewing, not issuing
+
+=head3 ISSUED_TO_ANOTHER
+
+issued to someone else.
+
+=head3 RESERVED
+
+reserved for someone else.
+
+=head3 INVALID_DATE
+
+sticky due date is invalid
+
+=head3 TOO_MANY
+
+if the borrower borrows to much things
+
+=cut
+
+# check if a book can be issued.
+# returns an array with errors if any
+
+
+
+
+
+
+
+
+
+
+
+sub TooMany ($$){
+	my $borrower = shift;
+	my $iteminformation = shift;
+	my $cat_borrower = $borrower->{'categorycode'};
+	my $branch_borrower = $borrower->{'branchcode'};
+	my $dbh = C4::Context->dbh;
+	my $type = $iteminformation->{'ctype'};
+my	$sth = $dbh->prepare('select * from issuingrules where categorycode = ? and itemtype = ? and branchcode = ?');
+	my $sth2 = $dbh->prepare("select COUNT(*) from issues i,  items it where i.borrowernumber = ? and i.returndate is null and i.itemnumber = it.itemnumber and it.ctype=? ");
+	my $sth3 = $dbh->prepare('select COUNT(*) from issues where borrowernumber = ? and returndate is null');
+	my $alreadyissued;
+
+	# check the 3 parameters
+	#print "content-type: text/plain \n\n";
+	#print "$cat_borrower, $type, $branch_borrower";
+	$sth->execute($cat_borrower, $type, $branch_borrower);
+	my $result = $sth->fetchrow_hashref;
+	if (defined($result->{maxissueqty})) {
+	#	print "content-type: text/plain \n\n";
+	#print "$cat_borrower, $type, $branch_borrower";
+		$sth2->execute($borrower->{'borrowernumber'}, $type);
+		my $alreadyissued = $sth2->fetchrow;	
+	#	print "***" . $alreadyissued;
+	#print "----". $result->{'maxissueqty'};
+	  if ($result->{'maxissueqty'} <= $alreadyissued) {
+			return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	  }
+	}
+# check for itemtype=*
+	$sth->execute($cat_borrower, "*", $branch_borrower);
+	$result = $sth->fetchrow_hashref;
+        if (defined($result->{maxissueqty})) {
+		$sth3->execute($borrower->{'borrowernumber'});
+		my ($alreadyissued) = $sth3->fetchrow;
+	     if ($result->{'maxissueqty'} <= $alreadyissued){
+#		warn "HERE : $alreadyissued / ($result->{maxissueqty} for $borrower->{'borrowernumber'}";
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	     } else {
+		return;
+	     }
+	}
+	# check for branch=*
+	$sth->execute($cat_borrower, $type, "");
+	 $result = $sth->fetchrow_hashref;
+	if (defined($result->{maxissueqty})) {
+		$sth2->execute($borrower->{'borrowernumber'}, $type);
+		my $alreadyissued = $sth2->fetchrow;
+	  if ($result->{'maxissueqty'} <= $alreadyissued){
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	     } else {
+	        return;
+	     }
+	}
+
+	
+
+	#check for borrowertype=*
+	$sth->execute("*", $type, $branch_borrower);
+	$result = $sth->fetchrow_hashref;
+        if (defined($result->{maxissueqty})) {    
+		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
+		my $alreadyissued = $sth2->fetchrow;
+	    if ($result->{'maxissueqty'} <= $alreadyissued){	    
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	    } else {
+		return;
+	    }
+	}
+
+	#check for borrowertype=*;itemtype=*
+	$sth->execute("*", "*", $branch_borrower);
+	$result = $sth->fetchrow_hashref;
+        if (defined($result->{maxissueqty})) {    
+		$sth3->execute($borrower->{'borrowernumber'});
+		my $alreadyissued = $sth3->fetchrow;
+	    if ($result->{'maxissueqty'} <= $alreadyissued){
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	    } else {
+		return;
+	    }
+	}
+
+	$sth->execute("*", $type, "");
+	$result = $sth->fetchrow_hashref;
+	if (defined($result->{maxissueqty}) && $result->{maxissueqty}>=0) {
+		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
+		my $alreadyissued = $sth2->fetchrow;
+	     if ($result->{'maxissueqty'} <= $alreadyissued){
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	     } else {
+		return;
+	     }
+	}
+
+	$sth->execute($cat_borrower, "*", "");
+	$result = $sth->fetchrow_hashref;
+        if (defined($result->{maxissueqty})) {    
+		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
+		my $alreadyissued = $sth2->fetchrow;
+	     if ($result->{'maxissueqty'} <= $alreadyissued){
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	     } else {
+		return;
+	     }
+	}
+
+	$sth->execute("*", "*", "");
+	$result = $sth->fetchrow_hashref;
+        if (defined($result->{maxissueqty})) {    
+		$sth3->execute($borrower->{'borrowernumber'});
+		my $alreadyissued = $sth3->fetchrow;
+	     if ($result->{'maxissueqty'} <= $alreadyissued){
+		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
+	     } else {
+		return;
+	     }
+	}
+	return;
+}
+
+
+
+
+sub canbookbeissued {
+	my ($env,$borrower,$barcode,$year,$month,$day,$inprocess) = @_;
+	my %needsconfirmation; # filled with problems that needs confirmations
+	my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE
+	my $iteminformation = getiteminformation($env, 0, $barcode);
+	my $dbh = C4::Context->dbh;
+#
+# DUE DATE is OK ?
+#
+	my ($duedate, $invalidduedate) = fixdate($year, $month, $day);
+	$issuingimpossible{INVALID_DATE} = 1 if ($invalidduedate);
+
+#
+# BORROWER STATUS
+#
+	if ($borrower->{flags}->{GNA}) {
+		$issuingimpossible{GNA} = 1;
+	}
+	if ($borrower->{flags}->{'LOST'}) {
+		$issuingimpossible{CARD_LOST} = 1;
+	}
+	if ($borrower->{flags}->{'DBARRED'}) {
+		$issuingimpossible{DEBARRED} = 1;
+	}
+	my $today=get_today();
+	if (DATE_diff($borrower->{expiry},$today)<0) {
+		$issuingimpossible{EXPIRED} = 1;
+	}
+#
+# BORROWER STATUS
+#
+
+# DEBTS
+	my $amount = C4::Accounts2::checkaccount($env,$borrower->{'borrowernumber'}, $dbh,$duedate);
+        if(C4::Context->preference("IssuingInProcess")){
+	    my $amountlimit = C4::Context->preference("noissuescharge");
+	    	if ($amount > $amountlimit && !$inprocess) {
+			$issuingimpossible{DEBT} = sprintf("%.2f",$amount);
+	    	} elsif ($amount <= $amountlimit && !$inprocess) {
+			$needsconfirmation{DEBT} = sprintf("%.2f",$amount);
+	    	}
+        } else {
+	   		 if ($amount >0) {
+			$needsconfirmation{DEBT} = $amount;
+	    	}
+		}
+
+
+#
+# JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS
+#
+	my $toomany = TooMany($borrower, $iteminformation);
+	$needsconfirmation{TOO_MANY} =  $toomany if $toomany;
+	$issuingimpossible{TOO_MANY} = $toomany if $toomany;
+#
+# ITEM CHECKING
+#
+	unless ($iteminformation->{barcode}) {
+		$issuingimpossible{UNKNOWN_BARCODE} = 1;
+	}
+	if ($iteminformation->{'notforloan'} > 0) {
+		$issuingimpossible{NOT_FOR_LOAN} = 1;
+	}
+	if ($iteminformation->{'ctype'} eq 'REF') {
+		$issuingimpossible{NOT_FOR_LOAN} = 1;
+	}
+	if ($iteminformation->{'wthdrawn'} == 1) {
+		$issuingimpossible{WTHDRAWN} = 1;
+	}
+	if ($iteminformation->{'restricted'} == 1) {
+		$issuingimpossible{RESTRICTED} = 1;
+	}
+	if ($iteminformation->{'shelf'} eq 'Res') {
+		$issuingimpossible{IN_RESERVE} = 1;
+	}
+if (C4::Context->preference("IndependentBranches")){
+		my $userenv = C4::Context->userenv;
+		if ($userenv->{flags} != 1){
+			$issuingimpossible{NOTSAMEBRANCH} = 1 if ($iteminformation->{'holdingbranch'} ne $userenv->{branch} ) ;
+		}
+	}
+
+#
+# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
+#
+	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
+	if ($currentborrower eq $borrower->{'borrowernumber'}) {
+# Already issued to current borrower. Ask whether the loan should
+# be renewed.
+		my ($renewstatus) = renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
+		if ($renewstatus == 0) { # no more renewals allowed
+			$issuingimpossible{NO_MORE_RENEWALS} = 1;
+		} else {
+			if (C4::Context->preference("strictrenewals")){
+			###if this is set do not allow automatic renewals
+			##the new renew script will do same strict checks as issues and return error codes
+			$needsconfirmation{RENEW_ISSUE} = 1;
+			}	
+			
+		}
+	} elsif ($currentborrower) {
+# issued to someone else
+		my $currborinfo = C4::Members::getpatroninformation(0,$currentborrower);
+#		warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
+		$needsconfirmation{ISSUED_TO_ANOTHER} = "$currborinfo->{'reservedate'} : $currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
+	}
+	my $returningborrower=currentreturningborrower($iteminformation->{'itemnumber'});
+##Book cannot be reissued if returned within last 24 hrs
+	if ($returningborrower->{borrowernumber}==$borrower->{borrowernumber}){
+			$needsconfirmation{hr_LIMIT} = "$returningborrower->{'firstname'} $returningborrower->{'surname'} ($returningborrower->{'cardnumber'}) returned the book on: $returningborrower->{timestamp}";
+	}
+# See if the item is on RESERVE
+	my ($restype, $res) = CheckReserves($iteminformation->{'itemnumber'});
+	if ($restype) {
+		my $resbor = $res->{'borrowernumber'};
+		my ($resborrower, $flags)=C4::Members::getpatroninformation($env, $resbor,0);
+		my $branches = GetBranches();
+			my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
+		if ($resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting") {
+			# The item is on reserve and waiting, but has been
+			# reserved by some other patron.
+			
+			
+			$needsconfirmation{RESERVE_WAITING} = "$resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}, $branchname)";
+		#	CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
+		} elsif ($restype eq "Reserved") {
+			# The item is on reserve for someone else.
+			
+			$needsconfirmation{RESERVED} = "$res->{'reservedate'} : $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'})";
+		}
+	}
+        	if(C4::Context->preference("LibraryName") eq "Horowhenua Library Trust"){
+	   			 if ($borrower->{'categorycode'} eq 'W'){
+		        my %issuingimpossible;
+		        	return(\%issuingimpossible,\%needsconfirmation);
+	    		}
+	    	}
+	      
+	return(\%issuingimpossible,\%needsconfirmation);
+}
+
+=head2 issuebook
+
+Issue a book. Does no check, they are done in canbookbeissued. If we reach this sub, it means the user confirmed if needed.
+
+&issuebook($env,$borrower,$barcode,$date)
+
+=over 4
+
+C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
+
+C<$borrower> hash with borrower informations (from getpatroninformation)
+
+C<$barcode> is the bar code of the book being issued.
+
+C<$date> contains the max date of return. calculated if empty.
+
+=cut
+
+#
+# issuing book. We already have checked it can be issued, so, just issue it !
+#
+sub issuebook {
+### fix me STOP using koha hashes, change so that XML hash is used
+	my ($env,$borrower,$barcode,$date,$cancelreserve) = @_;
+	my $dbh = C4::Context->dbh;
+	my $itemrecord=XMLgetitemhash($dbh,"",$barcode);
+	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
+              $iteminformation->{'itemtype'}=MARCfind_itemtype($dbh,$iteminformation->{biblionumber});
+	my $bibliorecord=XMLgetbibliohash($dbh,$iteminformation->{biblionumber});
+	
+	my $error;
+#
+# check if we just renew the issue.
+#
+	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
+	if ($currentborrower eq $borrower->{'borrowernumber'}) {
+		my ($charge,$itemtype) = calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
+		if ($charge > 0) {
+			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
+			$iteminformation->{'charge'} = $charge;
+		}
+		&UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
+			if (C4::Context->preference("strictrenewals")){
+		 	$error=renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
+		 	renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}) if ($error>1);
+		 	}else{
+		 renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
+			}
+	} else {
+#
+# NOT a renewal
+#
+		if ($currentborrower ne '') {
+			# This book is currently on loan, but not to the person
+			# who wants to borrow it now. mark it returned before issuing to the new borrower
+			returnbook($iteminformation->{'barcode'}, $env->{'branchcode'});
+#warn "return : ".$borrower->{borrowernumber}." / I : ".$iteminformation->{'itemnumber'};
+
+		}
+		# See if the item is on reserve.
+		my ($restype, $res) = CheckReserves($iteminformation->{'itemnumber'});
+#warn "$restype,$res";
+		if ($restype) {
+			my $resbor = $res->{'borrowernumber'};
+			my ($resborrower, $flags)=C4::Members::getpatroninformation($env, $resbor,0);
+				my $branches = GetBranches();
+				my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
+			if ($resbor eq $borrower->{'borrowernumber'}) {
+				# The item is on reserve to the current patron
+				FillReserve($res);
+#				warn "FillReserve";
+			} elsif ($restype eq "Waiting") {
+#				warn "Waiting";
+				# The item is on reserve and waiting, but has been
+				# reserved by some other patron.
+				
+                 			if ($cancelreserve){
+    				    CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
+                 			 } else {
+				    # set waiting reserve to first in reserve queue as book isn't waiting now
+				    UpdateReserve(1, $res->{'biblionumber'}, $res->{'borrowernumber'}, $res->{'branchcode'});
+				}
+			} elsif ($restype eq "Reserved") {
+#warn "Reserved";
+				# The item is on reserve for someone else.
+				
+				if ($cancelreserve) {
+					# cancel reserves on this item
+					CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
+					# also cancel reserve on biblio related to this item
+				#	my $st_Fbiblio = $dbh->prepare("select biblionumber from items where itemnumber=?");
+				#	$st_Fbiblio->execute($res->{'itemnumber'});
+				#	my $biblionumber = $st_Fbiblio->fetchrow;
+#					CancelReserve($iteminformation->{'biblionumber'},0,$res->{'borrowernumber'});
+#					warn "CancelReserve $res->{'itemnumber'}, $res->{'borrowernumber'}";
+				} else {
+					my $tobrcd = ReserveWaiting($res->{'itemnumber'}, $res->{'borrowernumber'});
+					transferbook($tobrcd,$barcode, 1);
+#					warn "transferbook";
+				}
+			}
+		}
+		
+		my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, date_due, branchcode,issue_date) values (?,?,?,?,NOW())");
+		my $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'ctype'},$borrower->{'branchcode'});
+		my $dateduef=get_today();
+		my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
+		my ($yeardue, $monthdue, $daydue) = split /-/, $dateduef;
+		($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
+		$dateduef = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
+#warn $dateduef;
+		if ($date) {
+			$dateduef=$date;
+		}
+		# if ReturnBeforeExpiry ON the datedue can't be after borrower expirydate
+		if (C4::Context->preference('ReturnBeforeExpiry') && $dateduef gt $borrower->{expiry}) {
+			$dateduef=$borrower->{expiry};
+		}
+		$sth->execute($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}, $dateduef, $env->{'branchcode'});
+		$sth->finish;
+		$iteminformation->{'issues'}++;
+##Record in MARC the new data ,date_due as due date,issue count and the borrowernumber
+		$itemrecord=XML_writeline($itemrecord, "issues", $iteminformation->{'issues'},"holdings");
+		$itemrecord=XML_writeline($itemrecord, "date_due", $dateduef,"holdings");
+		$itemrecord=XML_writeline($itemrecord, "borrowernumber", $borrower->{'borrowernumber'},"holdings");
+		$itemrecord=XML_writeline($itemrecord, "itemlost", "0","holdings");
+		$itemrecord=XML_writeline($itemrecord, "onloan", "1","holdings");
+##Transfer book to this issuing branch
+		$itemrecord=XML_writeline($itemrecord, "holdingbranch", $env->{'branchcode'},"holdings");
+##Update totalissues of bibliorecord if exist
+   my $totalissue=XML_readline_onerecord($bibliorecord,"totalissue","biblios");
+$totalissue=scalar($totalissue);
+	$totalissue++;
+my $extras=length($totalissue);
+	for (1..(6-$extras)){
+	$totalissue="0".$totalissue;
+	}
+
+	$bibliorecord=XML_writeline($bibliorecord,"totalissue",$totalissue,"biblios");
+	my $frameworkcode=MARCfind_frameworkcode($dbh,$iteminformation->{'biblionumber'});
+		 C4::Biblio::OLDmodbiblio($dbh,$bibliorecord,$iteminformation->{'biblionumber'},$frameworkcode);
+###
+		# find today's date as timestamp
+		my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
+		$year += 1900;
+		$mon += 1;
+		my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
+		$year,$mon,$mday,$hour,$min,$sec);
+		$itemrecord=XML_writeline($itemrecord, "datelastseen", $timestamp,"holdings");
+		##Now update the zebradb
+		NEWmoditem($dbh,$itemrecord,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'});
+		# If it costs to borrow this book, charge it to the patron's account.
+		my ($charge,$itemtype)=calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
+		if ($charge > 0) {
+			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
+			$iteminformation->{'charge'}=$charge;
+		}
+		# Record the fact that this book was issued in SQL
+		&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
+	}
+return($error);
+}
+
+=head2 getLoanLength
+
+Get loan length for an itemtype, a borrower type and a branch
+
+my $loanlength = &getLoanLength($borrowertype,$itemtype,branchcode)
+
+=cut
+
+sub getLoanLength {
+	my ($borrowertype,$itemtype,$branchcode) = @_;
+	my $dbh = C4::Context->dbh;
+	my $sth = $dbh->prepare("select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=?");
+	# try to find issuelength & return the 1st available.
+	# check with borrowertype, itemtype and branchcode, then without one of those parameters
+	$sth->execute($borrowertype,$itemtype,$branchcode);
+	my $loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength);
+	
+	$sth->execute($borrowertype,$itemtype,"");
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	$sth->execute($borrowertype,"*",$branchcode);
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	$sth->execute("*",$itemtype,$branchcode);
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	$sth->execute($borrowertype,"*","");
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	$sth->execute("*","*",$branchcode);
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	$sth->execute("*",$itemtype,"");
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	$sth->execute("*","*","");
+	$loanlength = $sth->fetchrow_hashref;
+	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
+
+	# if no rule is set => 21 days (hardcoded)
+	return 21;
+}
+=head2 returnbook
+
+  ($doreturn, $messages, $iteminformation, $borrower) =
+	  &returnbook($barcode, $branch);
+
+Returns a book.
+
+C<$barcode> is the bar code of the book being returned. C<$branch> is
+the code of the branch where the book is being returned.
+
+C<&returnbook> returns a list of four items:
+
+C<$doreturn> is true iff the return succeeded.
+
+C<$messages> is a reference-to-hash giving the reason for failure:
+
+=over 4
+
+=item C<BadBarcode>
+
+No item with this barcode exists. The value is C<$barcode>.
+
+=item C<NotIssued>
+
+The book is not currently on loan. The value is C<$barcode>.
+
+=item C<IsPermanent>
+
+The book's home branch is a permanent collection. If you have borrowed
+this book, you are not allowed to return it. The value is the code for
+the book's home branch.
+
+=item C<wthdrawn>
+
+This book has been withdrawn/cancelled. The value should be ignored.
+
+=item C<ResFound>
+
+The item was reserved. The value is a reference-to-hash whose keys are
+fields from the reserves table of the Koha database, and
+C<biblioitemnumber>. It also has the key C<ResFound>, whose value is
+either C<Waiting>, C<Reserved>, or 0.
+
+=back
+
+C<$borrower> is a reference-to-hash, giving information about the
+patron who last borrowed the book.
+
+=cut
+
+# FIXME - This API is bogus. There's no need to return $borrower and
+# $iteminformation; the caller can ask about those separately, if it
+# cares (it'd be inefficient to make two database calls instead of
+# one, but &getpatroninformation and &getiteminformation can be
+# memoized if this is an issue).
+#
+# The ($doreturn, $messages) tuple is redundant: if the return
+# succeeded, that's all the caller needs to know. So &returnbook can
+# return 1 and 0 on success and failure, and set
+# $C4::Circulation::Circ2::errmsg to indicate the error. Or it can
+# return undef for success, and an error message on error (though this
+# is more C-ish than Perl-ish).
+
+sub returnbook {
+	my ($barcode, $branch) = @_;
+	my %env;
+	my $messages;
+	my $dbh = C4::Context->dbh;
+	my $doreturn = 1;
+	die '$branch not defined' unless defined $branch; # just in case (bug 170)
+	# get information on item
+	my $itemrecord=XMLgetitemhash($dbh,"",$barcode);
+	if (not $itemrecord) {
+		$messages->{'BadBarcode'} = $barcode;
+		$doreturn = 0;
+	return ($doreturn, $messages, undef, undef);
+	}
+	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
+              $iteminformation->{'itemtype'}=MARCfind_itemtype($dbh,$iteminformation->{biblionumber});
+	
+	# find the borrower
+	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
+	if ((not $currentborrower) && $doreturn) {
+		$messages->{'NotIssued'} = $barcode;
+		$doreturn = 0;
+	}
+	# check if the book is in a permanent collection....
+	my $hbr = $iteminformation->{'homebranch'};
+	my $branches = GetBranches();
+	if ($branches->{$hbr}->{'PE'}) {
+		$messages->{'IsPermanent'} = $hbr;
+	}
+	# check that the book has been cancelled
+	if ($iteminformation->{'wthdrawn'}) {
+		$messages->{'wthdrawn'} = 1;
+	#	$doreturn = 0;
+	}
+	# update issues, thereby returning book (should push this out into another subroutine
+	my ($borrower) = C4::Members::getpatroninformation(\%env, $currentborrower, 0);
+	if ($doreturn) {
+		my $sth = $dbh->prepare("update issues set returndate = now() where (itemnumber = ?) and (returndate is null)");
+		$sth->execute( $iteminformation->{'itemnumber'});
+		$messages->{'WasReturned'} = 1; # FIXME is the "= 1" right?
+	
+		$sth->finish;
+	}
+	$itemrecord=XML_writeline($itemrecord, "date_due", "","holdings");
+	$itemrecord=XML_writeline($itemrecord, "onloan", "0","holdings");
+	$itemrecord=XML_writeline($itemrecord, "borrowernumber", "","holdings");
+	
+	my ($transfered, $mess, $item) = transferbook($branch, $barcode, 1);
+	my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
+		$year += 1900;
+		$mon += 1;
+		my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
+		$year,$mon,$mday,$hour,$min,$sec);
+		$itemrecord=XML_writeline($itemrecord, "datelastseen", $timestamp,"holdings");
+		
+		
+	# transfer book to the current branch
+	
+	if ($transfered) {
+		$messages->{'WasTransfered'} = 1; # FIXME is the "= 1" right?
+	}
+	# fix up the accounts.....
+	if ($iteminformation->{'itemlost'}) {
+		fixaccountforlostandreturned($iteminformation, $borrower);
+		$messages->{'WasLost'} = 1; # FIXME is the "= 1" right?
+		$itemrecord=XML_writeline($itemrecord, "itemlost", "","holdings");
+	}
+####WARNING-- FIXME#########	
+### The following new script is commented out
+## 	I did not understand what it is supposed to do.
+## If a book is returned at one branch it is automatically recorded being in that branch by
+## transferbook script. This scrip tries to find out whether it was sent thre
+## Well whether sent or not it is physically there and transferbook records this fact in MARCrecord as well
+## If this script is trying to do something else it should be uncommented and also add support for updating MARC record --TG
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# 	check if we have a transfer for this document
+#	my $checktransfer = checktransferts($iteminformation->{'itemnumber'});
+# 	if we have a return, we update the line of transfers with the datearrived
+#	if ($checktransfer){
+#		my $sth = $dbh->prepare("update branchtransfers set datearrived = now() where itemnumber= ? AND datearrived IS NULL");
+#		$sth->execute($iteminformation->{'itemnumber'});
+#		$sth->finish;
+# 		now we check if there is a reservation with the validate of transfer if we have one, we can 		set it with the status 'W'
+#		my $updateWaiting = SetWaitingStatus($iteminformation->{'itemnumber'});
+#	}
+#	if we don't have a transfer on run, we check if the document is not in his homebranch and there is not a reservation, we transfer this one to his home branch directly if system preference Automaticreturn is turn on .
+#	else {
+#		my $checkreserves = CheckReserves($iteminformation->{'itemnumber'});
+#		if (($iteminformation->{'homebranch'} ne $iteminformation->{'holdingbranch'}) and (not $checkreserves) and (C4::Context->preference("AutomaticItemReturn") == 1)){
+#				my $automatictransfer = dotransfer($iteminformation->{'itemnumber'},$iteminformation->{'holdingbranch'},$iteminformation->{'homebranch'});
+#				$messages->{'WasTransfered'} = 1;
+#		}
+#	}
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
+	# fix up the overdues in accounts...
+	fixoverduesonreturn($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
+	$itemrecord=XML_writeline($itemrecord, "itemoverdue", "","holdings");
+	# find reserves.....
+	my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'});
+	if ($resfound) {
+	#	my $tobrcd = ReserveWaiting($resrec->{'itemnumber'}, $resrec->{'borrowernumber'});
+		$resrec->{'ResFound'} = $resfound;
+		$messages->{'ResFound'} = $resrec;
+	}
+	##Now update the zebradb
+		NEWmoditem($dbh,$itemrecord,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'});
+	# update stats?
+	# Record the fact that this book was returned.
+	UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
+	return ($doreturn, $messages, $iteminformation, $borrower);
+}
+
+=head2 fixaccountforlostandreturned
+
+	&fixaccountforlostandreturned($iteminfo,$borrower);
+
+Calculates the charge for a book lost and returned (Not exported & used only once)
+
+C<$iteminfo> is a hashref to iteminfo. Only {itemnumber} is used.
+
+C<$borrower> is a hashref to borrower. Only {borrowernumber is used.
+
+=cut
+
+sub fixaccountforlostandreturned {
+	my ($iteminfo, $borrower) = @_;
+	my %env;
+	my $dbh = C4::Context->dbh;
+	my $itm = $iteminfo->{'itemnumber'};
+	# check for charge made for lost book
+	my $sth = $dbh->prepare("select * from accountlines where (itemnumber = ?) and (accounttype='L' or accounttype='Rep') order by date desc");
+	$sth->execute($itm);
+	if (my $data = $sth->fetchrow_hashref) {
+	# writeoff this amount
+		my $offset;
+		my $amount = $data->{'amount'};
+		my $acctno = $data->{'accountno'};
+		my $amountleft;
+		if ($data->{'amountoutstanding'} == $amount) {
+		$offset = $data->{'amount'};
+		$amountleft = 0;
+		} else {
+		$offset = $amount - $data->{'amountoutstanding'};
+		$amountleft = $data->{'amountoutstanding'} - $amount;
+		}
+		my $usth = $dbh->prepare("update accountlines set accounttype = 'LR',amountoutstanding='0'
+			where (borrowernumber = ?)
+			and (itemnumber = ?) and (accountno = ?) ");
+		$usth->execute($data->{'borrowernumber'},$itm,$acctno);
+		$usth->finish;
+	#check if any credit is left if so writeoff other accounts
+		my $nextaccntno = getnextacctno(\%env,$data->{'borrowernumber'},$dbh);
+		if ($amountleft < 0){
+		$amountleft*=-1;
+		}
+		if ($amountleft > 0){
+		my $msth = $dbh->prepare("select * from accountlines where (borrowernumber = ?)
+							and (amountoutstanding >0) order by date");
+		$msth->execute($data->{'borrowernumber'});
+	# offset transactions
+		my $newamtos;
+		my $accdata;
+		while (($accdata=$msth->fetchrow_hashref) and ($amountleft>0)){
+			if ($accdata->{'amountoutstanding'} < $amountleft) {
+			$newamtos = 0;
+			$amountleft -= $accdata->{'amountoutstanding'};
+			}  else {
+			$newamtos = $accdata->{'amountoutstanding'} - $amountleft;
+			$amountleft = 0;
+			}
+			my $thisacct = $accdata->{'accountno'};
+			my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
+					where (borrowernumber = ?)
+					and (accountno=?)");
+			$usth->execute($newamtos,$data->{'borrowernumber'},'$thisacct');
+			$usth->finish;
+			$usth = $dbh->prepare("insert into accountoffsets
+				(borrowernumber, accountno, offsetaccount,  offsetamount)
+				values
+				(?,?,?,?)");
+			$usth->execute($data->{'borrowernumber'},$accdata->{'accountno'},$nextaccntno,$newamtos);
+			$usth->finish;
+		}
+		$msth->finish;
+		}
+		if ($amountleft > 0){
+			$amountleft*=-1;
+		}
+		my $desc="Book Returned ".$iteminfo->{'barcode'};
+		$usth = $dbh->prepare("insert into accountlines
+			(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
+			values (?,?,now(),?,?,'CR',?)");
+		$usth->execute($data->{'borrowernumber'},$nextaccntno,0-$amount,$desc,$amountleft);
+		$usth->finish;
+		$usth = $dbh->prepare("insert into accountoffsets
+			(borrowernumber, accountno, offsetaccount,  offsetamount)
+			values (?,?,?,?)");
+		$usth->execute($borrower->{'borrowernumber'},$data->{'accountno'},$nextaccntno,$offset);
+		$usth->finish;
+#		$usth = $dbh->prepare("update items set paidfor='' where itemnumber=?");
+#		$usth->execute($itm);
+#		$usth->finish;
+	}
+	$sth->finish;
+	return;
+}
+
+=head2 fixoverdueonreturn
+
+	&fixoverdueonreturn($brn,$itm);
+
+??
+
+C<$brn> borrowernumber
+
+C<$itm> itemnumber
+
+=cut
+
+sub fixoverduesonreturn {
+	my ($brn, $itm) = @_;
+	my $dbh = C4::Context->dbh;
+	# check for overdue fine
+	my $sth = $dbh->prepare("select * from accountlines where (borrowernumber = ?) and (itemnumber = ?) and (accounttype='FU' or accounttype='O')");
+	$sth->execute($brn,$itm);
+	# alter fine to show that the book has been returned
+	if (my $data = $sth->fetchrow_hashref) {
+		my $usth=$dbh->prepare("update accountlines set accounttype='F' where (borrowernumber = ?) and (itemnumber = ?) and (accountno = ?)");
+		$usth->execute($brn,$itm,$data->{'accountno'});
+		$usth->finish();
+	}
+	$sth->finish();
+	return;
+}
+
+
+
+
+
+# Not exported
+sub checkoverdues {
+# From Main.pm, modified to return a list of overdueitems, in addition to a count
+  #checks whether a borrower has overdue items
+	my ($env, $bornum, $dbh)=@_;
+	my $today=get_today();
+	my @overdueitems;
+	my $count = 0;
+	my $sth = $dbh->prepare("SELECT issues.* , i.biblionumber as biblionumber,b.* FROM issues, items i,biblio b
+			WHERE  i.itemnumber=issues.itemnumber
+				AND i.biblionumber=b.biblionumber
+				AND issues.borrowernumber  = ?
+				AND issues.returndate is NULL
+				AND issues.date_due < ?");
+	$sth->execute($bornum,$today);
+	while (my $data = $sth->fetchrow_hashref) {
+	
+	push (@overdueitems, $data);
+	$count++;
+	}
+	$sth->finish;
+	return ($count, \@overdueitems);
+}
+
+# Not exported
+sub currentborrower {
+# Original subroutine for Circ2.pm
+	my ($itemnumber) = @_;
+	my $dbh = C4::Context->dbh;
+	
+	my $sth=$dbh->prepare("select borrowers.borrowernumber from
+	issues,borrowers where issues.itemnumber=? and
+	issues.borrowernumber=borrowers.borrowernumber and issues.returndate is
+	NULL");
+	$sth->execute($itemnumber);
+	my ($borrower) = $sth->fetchrow;
+	return($borrower);
+}
+# Not exported
+sub currentreturningborrower {
+# Original subroutine for Circ2.pm
+	my ($itemnumber) = @_;
+	my $dbh = C4::Context->dbh;
+	
+	my $sth=$dbh->prepare("select * from
+	issues,borrowers where issues.itemnumber=? and
+	issues.borrowernumber=borrowers.borrowernumber and issues.returndate=CURRENT_DATE and ( HOUR(TIMEDIFF(CURRENT_TIMESTAMP,timestamp))<24)");
+	$sth->execute($itemnumber);
+	my ($borrower) = $sth->fetchrow_hashref;
+	return($borrower);
+}
+# FIXME - Not exported, but used in 'updateitem.pl' anyway.
+sub checkreserve_to_delete {
+# Check for reserves for biblio
+	my ($env,$dbh,$itemnum)=@_;
+	my $resbor = "";
+	my $sth = $dbh->prepare("select * from reserves,items
+	where (items.itemnumber = ?)
+	and (reserves.cancellationdate is NULL)
+	and (items.biblionumber = reserves.biblionumber)
+	and ((reserves.found = 'W')
+	or (reserves.found is null))
+	order by priority");
+	$sth->execute($itemnum);
+	my $resrec;
+	my $data=$sth->fetchrow_hashref;
+	while ($data && $resbor eq '') {
+	$resrec=$data;
+	my $const = $data->{'constrainttype'};
+	if ($const eq "a") {
+	$resbor = $data->{'borrowernumber'};
+	} else {
+	my $found = 0;
+	my $csth = $dbh->prepare("select * from reserveconstraints,items
+		where (borrowernumber=?)
+		and reservedate=?
+		and reserveconstraints.biblionumber=?
+		and (items.itemnumber=? )");
+	$csth->execute($data->{'borrowernumber'},$data->{'biblionumber'},$data->{'reservedate'},$itemnum);
+	if (my $cdata=$csth->fetchrow_hashref) {$found = 1;}
+	if ($const eq 'o') {
+		if ($found eq 1) {$resbor = $data->{'borrowernumber'};}
+	} else {
+		if ($found eq 0) {$resbor = $data->{'borrowernumber'};}
+	}
+	$csth->finish();
+	}
+	$data=$sth->fetchrow_hashref;
+	}
+	$sth->finish;
+	return ($resbor,$resrec);
+}
+
+=head2 currentissues
+
+  $issues = &currentissues($env, $borrower);
+
+Returns a list of books currently on loan to a patron.
+
+If C<$env-E<gt>{todaysissues}> is set and true, C<&currentissues> only
+returns information about books issued today. If
+C<$env-E<gt>{nottodaysissues}> is set and true, C<&currentissues> only
+returns information about books issued before today. If both are
+specified, C<$env-E<gt>{todaysissues}> is ignored. If neither is
+specified, C<&currentissues> returns all of the patron's issues.
+
+C<$borrower->{borrowernumber}> is the borrower number of the patron
+whose issues we want to list.
+
+C<&currentissues> returns a PHP-style array: C<$issues> is a
+reference-to-hash whose keys are integers in the range 1...I<n>, where
+I<n> is the number of items on issue (either today or before today).
+C<$issues-E<gt>{I<n>}> is a reference-to-hash whose keys are all of
+the fields of the biblio, biblioitems, items, and issues fields of the
+Koha database for that particular item.
+
+=cut
+
+#'
+sub currentissues {
+# New subroutine for Circ2.pm
+	my ($env, $borrower) = @_;
+	my $dbh = C4::Context->dbh;
+	my %currentissues;
+	my $counter=1;
+	my $borrowernumber = $borrower->{'borrowernumber'};
+	my $crit='';
+
+	# Figure out whether to get the books issued today, or earlier.
+	# FIXME - $env->{todaysissues} and $env->{nottodaysissues} can
+	# both be specified, but are mutually-exclusive. This is bogus.
+	# Make this a flag. Or better yet, return everything in (reverse)
+	# chronological order and let the caller figure out which books
+	# were issued today.
+	my $today=get_today();
+	if ($env->{'todaysissues'}) {
+		
+		$crit=" and issues.timestamp like '$today%' ";
+	}
+	if ($env->{'nottodaysissues'}) {
+		
+		$crit=" and !(issues.timestamp like '$today%') ";
+	}
+
+	# FIXME - Does the caller really need every single field from all
+	# four tables?
+	my $sth=$dbh->prepare("select * from issues,items where
+	borrowernumber=? and issues.itemnumber=items.itemnumber and
+	 returndate is null
+	$crit order by issues.date_due");
+	$sth->execute($borrowernumber);
+	while (my $data = $sth->fetchrow_hashref) {
+
+		
+		if ($data->{'date_due'} lt $today) {
+			$data->{'overdue'}=1;
+		}
+		my $itemnumber=$data->{'itemnumber'};
+		# FIXME - Consecutive integers as hash keys? You have GOT to
+		# be kidding me! Use an array, fercrissakes!
+		$currentissues{$counter}=$data;
+		$counter++;
+	}
+	$sth->finish;
+	return(\%currentissues);
+}
+
+=head2 getissues
+
+  $issues = &getissues($borrowernumber);
+
+Returns the set of books currently on loan to a patron.
+
+C<$borrowernumber> is the patron's borrower number.
+
+C<&getissues> returns a PHP-style array: C<$issues> is a
+reference-to-hash whose keys are integers in the range 0..I<n>-1,
+where I<n> is the number of books the patron currently has on loan.
+
+The values of C<$issues> are references-to-hash whose keys are
+selected fields from the issues, items, biblio, and biblioitems tables
+of the Koha database.
+
+=cut
+#'
+sub getissues {
+	my ($borrower) = @_;
+	my $dbh = C4::Context->dbh;
+	my $borrowernumber = $borrower->{'borrowernumber'};
+	my %currentissues;
+	my $bibliodata;
+	my @results;
+	my $todaysdate=get_today();
+	my $counter = 0;
+	my $select = "SELECT *
+			FROM issues,items,biblio
+			WHERE issues.borrowernumber  = ?
+			AND issues.itemnumber      = items.itemnumber
+			AND items.biblionumber      = biblio.biblionumber
+			AND issues.returndate      IS NULL
+			ORDER BY issues.date_due";
+	#    print $select;
+	my $sth=$dbh->prepare($select);
+	$sth->execute($borrowernumber);
+	while (my $data = $sth->fetchrow_hashref) { 	
+		if ($data->{'date_due'}  lt $todaysdate) {
+			$data->{'overdue'} = 1;
+		}
+		$currentissues{$counter} = $data;
+		$counter++;
+	}
+	$sth->finish;
+	
+	return(\%currentissues);
+}
+
+# Not exported
+sub checkwaiting {
+# check for reserves waiting
+	my ($env,$dbh,$bornum)=@_;
+	my @itemswaiting;
+	my $sth = $dbh->prepare("select * from reserves where (borrowernumber = ?) and (reserves.found='W') and cancellationdate is NULL");
+	$sth->execute($bornum);
+	my $cnt=0;
+	if (my $data=$sth->fetchrow_hashref) {
+		$itemswaiting[$cnt] =$data;
+		$cnt ++
+	}
+	$sth->finish;
+	return ($cnt,\@itemswaiting);
+}
+
+=head2 renewstatus
+
+  $ok = &renewstatus($env, $dbh, $borrowernumber, $itemnumber);
+
+Find out whether a borrowed item may be renewed.
+
+C<$env> is ignored.
+
+C<$dbh> is a DBI handle to the Koha database.
+
+C<$borrowernumber> is the borrower number of the patron who currently
+has the item on loan.
+
+C<$itemnumber> is the number of the item to renew.
+
+C<$renewstatus> returns a true value iff the item may be renewed. The
+item must currently be on loan to the specified borrower; renewals
+must be allowed for the item's type; and the borrower must not have
+already renewed the loan.
+
+=cut
+
+sub renewstatus {
+	# check renewal status
+	##If system preference "strictrenewals" is used This script will try to return $renewok=2 or $renewok=3 as error messages
+	## 
+	my ($env,$bornum,$itemnumber)=@_;
+	my $dbh=C4::Context->dbh;
+	my $renews = 1;
+	my $resfound;
+	my $resrec;
+	my $renewokay=0; ##
+	# Look in the issues table for this item, lent to this borrower,
+	# and not yet returned.
+my $borrower=C4::Members::getpatroninformation($dbh,$bornum,undef);
+	
+	# FIXME - I think this function could be redone to use only one SQL call.
+  my $data1=getiteminformation($dbh,$itemnumber);
+	if ($data1 ) {
+		# Found a matching item
+		##privileged get renewal whatever the case may be
+			if ($borrower->{'categorycode'} eq 'P'){
+			$renewokay = 1;
+			return $renewokay;
+			}
+		
+	##Find renewals of this item
+	my $rsth=$dbh->prepare("Select renewals from issues where itemnumber=? and borrowernumber=? and returndate is null");
+	$rsth->execute($data1->{itemnumber},$borrower->{borrowernumber});
+	$data1->{'renewals'}=$rsth->fetchrow;
+	$rsth->finish;
+		# See if this item may be renewed. 
+		my $sth2 = $dbh->prepare("select renewalsallowed from itemtypes	where itemtypes.itemtype=?");
+		$sth2->execute($data1->{ctype});
+		if (my $data2=$sth2->fetchrow_hashref) {
+		$renews = $data2->{'renewalsallowed'};
+		}
+		if ($renews > $data1->{'renewals'}) {
+			$renewokay= 1;
+		}else{
+			if (C4::Context->preference("strictrenewals")){
+			$renewokay=3 ;
+			}
+		}
+		$sth2->finish;
+		 ($resfound, $resrec) = CheckReserves($itemnumber);
+		if ($resfound) {
+			if (C4::Context->preference("strictrenewals")){
+			$renewokay=4;
+			}else{
+			       $renewokay = 0;
+         			 }
+		}
+		 ($resfound, $resrec) = CheckReserves($itemnumber);
+               		 if ($resfound) {
+              		 	 if (C4::Context->preference("strictrenewals")){
+						$renewokay=4;
+				}else{
+			   	   		 $renewokay = 0;
+          				  }
+			}
+     if (C4::Context->preference("strictrenewals")){
+	### A new system pref "allowRenewalsBefore" prevents the renewal before a set amount of days left before expiry
+	## Try to find whether book can be renewed at this date
+	my $loanlength;
+
+	my $allowRenewalsBefore = C4::Context->preference("allowRenewalsBefore");
+	my $today=get_today();
+
+	# Find the issues record for this book### 
+	my $sth=$dbh->prepare("select SUBDATE(date_due, $allowRenewalsBefore)  from issues where itemnumber=? and returndate is null");
+	$sth->execute($itemnumber);
+	my $startdate=$sth->fetchrow;
+	$sth->finish;
+	
+	my $difference = DATE_diff($today,$startdate);
+	if  ($difference < 0) {
+	$renewokay=2 ;
+	}
+     }##strictrenewals	
+	}##item found
+#	$sth1->finish;
+
+	return($renewokay);
+}
+
+=head2 renewbook
+
+  &renewbook($env, $borrowernumber, $itemnumber, $datedue);
+
+Renews a loan.
+
+C<$env-E<gt>{branchcode}> is the code of the branch where the
+renewal is taking place.
+
+C<$env-E<gt>{usercode}> is the value to log in C<statistics.usercode>
+in the Koha database.
+
+C<$borrowernumber> is the borrower number of the patron who currently
+has the item.
+
+C<$itemnumber> is the number of the item to renew.
+
+C<$datedue> can be used to set the due date. If C<$datedue> is the
+empty string, C<&renewbook> will calculate the due date automatically
+from the book's item type. If you wish to set the due date manually,
+C<$datedue> should be in the form YYYY-MM-DD.
+
+=cut
+
+sub renewbook {
+	my ($env,$bornum,$itemnumber,$datedue)=@_;
+	# mark book as renewed
+
+	my $loanlength;
+my $dbh=C4::Context->dbh;
+my $sth;
+my  $iteminformation = getiteminformation($env, $itemnumber,0);
+		
+
+
+if ($datedue eq "" ) {
+
+		my  $borrower = C4::Members::getpatroninformation($env,$bornum,0);
+		 $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'ctype'},$borrower->{'branchcode'});
+	
+		my $datedue=get_today();
+		my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
+		my ($yeardue, $monthdue, $daydue) = split /-/, $datedue;
+		($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
+		$datedue = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
+		
+	# Update the issues record to have the new due date, and a new count
+	# of how many times it has been renewed.
+	
+	$sth=$dbh->prepare("update issues set date_due = ?, renewals = renewals+1
+		where borrowernumber=? and itemnumber=? and returndate is null");
+	$sth->execute($datedue,$bornum,$itemnumber);
+	$sth->finish;
+
+	## Update items and marc record with new date -T.G
+	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due',$datedue);
+		
+	# Log the renewal
+	UpdateStats($env,$env->{'branchcode'},'renew','','',$itemnumber,$iteminformation->{'ctype'},$bornum);
+
+	# Charge a new rental fee, if applicable?
+	my ($charge,$type)=calc_charges($env, $itemnumber, $bornum);
+	if ($charge > 0){
+		my $accountno=getnextacctno($env,$bornum,$dbh);
+		$sth=$dbh->prepare("Insert into accountlines (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
+							values (?,?,now(),?,?,?,?,?)");
+		$sth->execute($bornum,$accountno,$charge,"Renewal of Rental Item $iteminformation->{'title'} $iteminformation->{'barcode'}",'Rent',$charge,$itemnumber);
+		$sth->finish;
+	#     print $account;
+	}# end of rental charge
+		
+	return format_date($datedue);
+	}
+
+ 
+	
+}
+
+
+
+
+
+
+
+
+=item find_reserves
+
+  ($status, $record) = &find_reserves($itemnumber);
+
+Looks up an item in the reserves.
+
+C<$itemnumber> is the itemnumber to look up.
+
+C<$status> is true iff the search was successful.
+
+C<$record> is a reference-to-hash describing the reserve. Its keys are
+the fields from the reserves table of the Koha database.
+
+=cut
+#'
+# FIXME - This API is bogus: just return the record, or undef if none
+# was found.
+
+sub find_reserves {
+    my ($itemnumber) = @_;
+    my $dbh = C4::Context->dbh;
+    my ($itemdata) = getiteminformation("", $itemnumber,0);
+    my $sth = $dbh->prepare("select * from reserves where ((found = 'W') or (found is null)) and biblionumber = ? and cancellationdate is NULL order by priority, reservedate");
+    $sth->execute($itemdata->{'biblionumber'});
+    my $resfound = 0;
+    my $resrec;
+    my $lastrec;
+
+    # FIXME - I'm not really sure what's going on here, but since we
+    # only want one result, wouldn't it be possible (and far more
+    # efficient) to do something clever in SQL that only returns one
+    # set of values?
+while ($resrec = $sth->fetchrow_hashref) {
+	$lastrec = $resrec;
+      if ($resrec->{'found'} eq "W") {
+	    if ($resrec->{'itemnumber'} eq $itemnumber) {
+		$resfound = 1;
+	    }
+        } else {
+	    # FIXME - Use 'elsif' to avoid unnecessary indentation.
+	    if ($resrec->{'constrainttype'} eq "a") {
+		$resfound = 1;	
+	    } else {
+			my $consth = $dbh->prepare("select * from reserveconstraints where borrowernumber = ? and reservedate = ? and biblionumber = ? ");
+			$consth->execute($resrec->{'borrowernumber'},$resrec->{'reservedate'},$resrec->{'biblionumber'});
+			if (my $conrec = $consth->fetchrow_hashref) {
+				if ($resrec->{'constrainttype'} eq "o") {
+				$resfound = 1;
+				
+				}
+			}
+		$consth->finish;
+		}
+	}
+	if ($resfound) {
+	    my $updsth = $dbh->prepare("update reserves set found = 'W', itemnumber = ? where borrowernumber = ? and reservedate = ? and biblionumber = ?");
+	    $updsth->execute($itemnumber,$resrec->{'borrowernumber'},$resrec->{'reservedate'},$resrec->{'biblionumber'});
+	    $updsth->finish;
+	    last;
+	}
+    }
+    $sth->finish;
+    return ($resfound,$lastrec);
+}
+
+sub fixdate {
+    my ($year, $month, $day) = @_;
+    my $invalidduedate;
+    my $date;
+    if (($year eq 0) && ($month eq 0) && ($year eq 0)) {
+#	$env{'datedue'}='';
+    } else {
+	if (($year eq 0) || ($month eq 0) || ($year eq 0)) {
+	    $invalidduedate=1;
+	} else {
+	    if (($day>30) && (($month==4) || ($month==6) || ($month==9) || ($month==11))) {
+		$invalidduedate = 1;
+	    } elsif (($day > 29) && ($month == 2)) {
+		$invalidduedate=1;
+	    } elsif (($month == 2) && ($day > 28) && (($year%4) && ((!($year%100) || ($year%400))))) {
+		$invalidduedate=1;
+	    } else {
+		$date="$year-$month-$day";
+	    }
+	}
+    }
+    return ($date, $invalidduedate);
+}
+
+sub get_current_return_date_of {
+    my (@itemnumbers) = @_;
+
+    my $query = '
+SELECT date_due,
+       itemnumber
+  FROM issues
+  WHERE itemnumber IN ('.join(',', @itemnumbers).') AND returndate IS NULL
+';
+    return get_infos_of($query, 'itemnumber', 'date_due');
+}
+
+sub get_transfert_infos {
+    my ($itemnumber) = @_;
+
+    my $dbh = C4::Context->dbh;
+
+    my $query = '
+SELECT datesent,
+       frombranch,
+       tobranch
+  FROM branchtransfers
+  WHERE itemnumber = ?
+    AND datearrived IS NULL
+';
+    my $sth = $dbh->prepare($query);
+    $sth->execute($itemnumber);
+
+    my @row = $sth->fetchrow_array();
+
+    $sth->finish;
+
+    return @row;
+}
+
+
+sub DeleteTransfer {
+	my($itemnumber) = @_;
+	my $dbh = C4::Context->dbh;
+    	my $sth=$dbh->prepare("DELETE FROM branchtransfers
+	where itemnumber=?
+	AND datearrived is null ");
+	$sth->execute($itemnumber);
+	$sth->finish;
+}
+
+sub GetTransfersFromBib {
+	my($frombranch,$tobranch) = @_;
+	my $dbh = C4::Context->dbh;
+    	my $sth=$dbh->prepare("SELECT itemnumber,datesent,frombranch FROM
+	 branchtransfers 
+	where frombranch=?
+	AND tobranch=? 
+	AND datearrived is null ");
+	$sth->execute($frombranch,$tobranch);
+	my @gettransfers;
+	my $i=0;
+	while (my $data=$sth->fetchrow_hashref){
+		$gettransfers[$i]=$data;
+		$i++;
+    	}
+    	$sth->finish;
+    	return(@gettransfers);	
+}
+
+sub GetReservesToBranch {
+	my($frombranch,$default) = @_;
+	my $dbh = C4::Context->dbh;
+    	my $sth=$dbh->prepare("SELECT borrowernumber,reservedate,itemnumber,timestamp FROM
+	 reserves 
+	where priority='0' AND cancellationdate is null  
+	AND branchcode=?
+	AND branchcode!=?
+	AND found is null ");
+	$sth->execute($frombranch,$default);
+	my @transreserv;
+	my $i=0;
+	while (my $data=$sth->fetchrow_hashref){
+		$transreserv[$i]=$data;
+		$i++;
+    	}
+    	$sth->finish;
+    	return(@transreserv);	
+}
+
+sub GetReservesForBranch {
+	my($frombranch) = @_;
+	my $dbh = C4::Context->dbh;
+    	my $sth=$dbh->prepare("SELECT borrowernumber,reservedate,itemnumber,waitingdate FROM
+	 reserves 
+	where priority='0' AND cancellationdate is null 
+	AND found='W' 
+	AND branchcode=? order by reservedate");
+	$sth->execute($frombranch);
+	my @transreserv;
+	my $i=0;
+	while (my $data=$sth->fetchrow_hashref){
+		$transreserv[$i]=$data;
+		$i++;
+    	}
+    	$sth->finish;
+    	return(@transreserv);	
+}
+
+sub checktransferts{
+	my($itemnumber) = @_;
+	my $dbh = C4::Context->dbh;
+    	my $sth=$dbh->prepare("SELECT datesent,frombranch,tobranch FROM branchtransfers
+        WHERE itemnumber = ? AND datearrived IS NULL");
+	$sth->execute($itemnumber);
+	my @tranferts = $sth->fetchrow_array;
+	$sth->finish;
+
+	return (@tranferts);
+}
+
+
+1;
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Developement team <info at koha.org>
+
+=cut

Index: C4/Circulation/Circ3.pm
===================================================================
RCS file: C4/Circulation/Circ3.pm
diff -N C4/Circulation/Circ3.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Circulation/Circ3.pm	26 Mar 2007 02:19:20 -0000	1.1.2.1
@@ -0,0 +1,583 @@
+# -*- tab-width: 8 -*-
+# Please use 8-character tabs for this file (indents are every 4 characters)
+
+package C4::Circulation::Circ3;
+
+# $Id: Circ3.pm,v 1.1.2.1 2007/03/26 02:19:20 tgarip1957 Exp $
+
+#package to deal with reserve section Returns
+#
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+# use warnings;
+require Exporter;
+
+use C4::Context;
+use C4::Stats;
+use C4::Reserves2;
+use C4::Koha;
+use C4::Accounts2;
+use C4::Date;
+use C4::Biblio;
+use C4::Search;
+use C4::Circulation::Circ2;
+use C4::Members;
+use C4::Circulation::Fines;
+use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::Circulation::Circ3 - Koha circulation module for NEU RESERVE section
+
+=head1 SYNOPSIS
+
+  use C4::Circulation::Circ3;
+
+=head1 DESCRIPTION
+
+The functions in this module deal with circulation, issues, and
+returns, as well as general information about the library.
+Also deals with stocktaking.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at ISA = qw(Exporter);
+ at EXPORT = qw(
+	 &getissuesr  
+	&canbookbeissuedr &issuebookr &returnbookr 
+	);
+
+
+=head2 canbookbeissued
+
+Check if a book can be issued.
+
+my ($issuingimpossible,$needsconfirmation) = canbookbeissuedr($env,$borrower,$barcode,$year,$month,$day);
+
+=over 4
+
+C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
+
+C<$borrower> hash with borrower informations (from getpatroninformation)
+
+C<$barcode> is the bar code of the book being issued.
+
+C<$year> C<$month> C<$day> contains the date of the return (in case it's forced by "stickyduedate".
+
+=back
+
+Returns :
+
+=over 4
+
+C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
+Possible values are :
+
+=head3 INVALID_DATE 
+
+sticky due date is invalid
+
+=head3 GNA
+
+borrower gone with no address
+
+=head3 CARD_LOST
+ 
+borrower declared it's card lost
+
+=head3 DEBARRED
+
+borrower debarred
+
+=head3 UNKNOWN_BARCODE
+
+barcode unknown
+
+=head3 NOT_FOR_LOAN
+
+item is not for loan
+
+=head3 WTHDRAWN
+
+item withdrawn.
+
+=head3 RESTRICTED
+
+item is restricted (set by ??)
+
+=back
+
+C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
+Possible values are :
+
+=head3 DEBT
+
+borrower has debts.
+
+=head3 RENEW_ISSUE
+
+renewing, not issuing
+
+=head3 ISSUED_TO_ANOTHER
+
+issued to someone else.
+
+=head3 RESERVED
+
+reserved for someone else.
+
+=head3 INVALID_DATE
+
+sticky due date is invalid
+
+=head3 TOO_MANY
+
+if the borrower borrows to much things
+
+=cut
+
+# check if a book can be issued.
+# returns an array with errors if any
+
+
+
+sub canbookbeissuedr {
+	my ($env,$borrower,$barcode,$year,$month,$day,$renew) = @_;
+	my %needsconfirmation; # filled with problems that needs confirmations
+	my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE
+	my $iteminformation = C4::Circulation::Circ2::getiteminformation($env, 0, $barcode);
+	my $dbh = C4::Context->dbh;
+#
+# DUE DATE is OK ?
+#
+#	my ($duedate, $invalidduedate) = fixdate($year, $month, $day);
+#	$issuingimpossible{INVALID_DATE} = 1 if ($invalidduedate);
+my $duedate;
+#
+# BORROWER STATUS
+#
+	if ($borrower->{flags}->{GNA}) {
+		$issuingimpossible{GNA} = 1;
+	}
+	if ($borrower->{flags}->{'LOST'}) {
+		$issuingimpossible{CARD_LOST} = 1;
+	}
+	if ($borrower->{flags}->{'DBARRED'}) {
+		$issuingimpossible{DEBARRED} = 1;
+	}
+	my $today=get_today();
+	if (DATE_diff($borrower->{expiry},$today)<0) {
+		$issuingimpossible{EXPIRED} = 1;
+	}
+#
+# BORROWER STATUS
+#
+
+# DEBTS
+	my $amount = C4::Accounts2::checkaccount($env,$borrower->{'borrowernumber'}, $dbh,$duedate);
+	if ($amount >0) {
+		$needsconfirmation{DEBT} = $amount;
+	}
+
+
+#
+# JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS
+#
+	my $sth2 = $dbh->prepare("select COUNT(*) from reserveissue i where i.borrowernumber = ? and i.rettime is null ");
+	$sth2->execute($borrower->{'borrowernumber'});
+	my $toomany=$sth2->fetchrow;
+	$needsconfirmation{TOO_MANY} =  $toomany if $toomany;
+
+#
+# ITEM CHECKING
+#
+	unless ($iteminformation->{barcode}) {
+		$issuingimpossible{UNKNOWN_BARCODE} = 1;
+	}
+	if (uc($iteminformation->{'shelf'}) ne 'RES') {
+		$issuingimpossible{NOT_INRESERVE} = 1;
+	}
+	if ($iteminformation->{'ctype'} eq 'REF') {
+		$issuingimpossible{NOT_FOR_LOAN} = 1;
+	}
+	if ($iteminformation->{'wthdrawn'} == 1) {
+		$issuingimpossible{WTHDRAWN} = 1;
+	}
+	if ($iteminformation->{'restricted'} == 1) {
+		$issuingimpossible{RESTRICTED} = 1;
+	}
+	if (C4::Context->preference("IndependentBranches")){
+		my $userenv = C4::Context->userenv;
+		if (($userenv)&&($userenv->{flags} != 1)){
+			$issuingimpossible{NOTSAMEBRANCH} = 1 if ($iteminformation->{'holdingbranch'} ne $userenv->{branch} ) ;
+		}
+	}
+
+
+
+#
+# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
+#
+	my ($currentborrower) = currentresborrower($iteminformation->{'itemnumber'});
+	if ($currentborrower eq $borrower->{'borrowernumber'}) {
+# Already issued to current borrower. Ask whether the loan should
+# be renewed.
+#		my ($renewstatus) = renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
+#		if ($renewstatus == 0) { # no more renewals allowed
+			$issuingimpossible{NO_MORE_RENEWALS} = 1;
+#		} else {
+#warn "renew:$renew";
+#		if (!$renew){	$needsconfirmation{RENEW_ISSUE} = 1;
+#				}
+			
+#		}
+	} elsif ($currentborrower) {
+# issued to someone else
+		my $currborinfo = C4::Members::getpatroninformation(0,$currentborrower);
+#		warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
+		$needsconfirmation{ISSUED_TO_ANOTHER} = "$currborinfo->{'reservedate'} : $currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
+	}
+
+	return(\%issuingimpossible,\%needsconfirmation);
+}
+
+=head2 issuebook
+
+Issue a book. Does no check, they are done in canbookbeissued. If we reach this sub, it means the user confirmed if needed.
+
+&issuebookr($env,$borrower,$barcode,$date)
+
+=over 4
+
+C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
+
+C<$borrower> hash with borrower informations (from getpatroninformation)
+
+C<$barcode> is the bar code of the book being issued.
+
+C<$date> contains the max date of return. calculated if empty.
+
+=cut
+
+#
+# issuing book. We already have checked it can be issued, so, just issue it !
+#
+sub issuebookr {
+	my ($env,$borrower,$barcode,$cancelreserve) = @_;
+	my $dbh = C4::Context->dbh;
+
+
+	my $iteminformation = getiteminformation($env, 0, $barcode);
+	my $bibliorecord=XMLgetbibliohash($dbh,$iteminformation->{biblionumber});
+	
+#
+# check if we just renew the issue.
+#
+	my ($currentborrower) = currentresborrower($iteminformation->{'itemnumber'});
+	if ($currentborrower eq $borrower->{'borrowernumber'}) {
+		my ($charge,$itemtype) = calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
+		if ($charge > 0) {
+			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
+			$iteminformation->{'charge'} = $charge;
+		}
+		&UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
+		renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
+	} else {
+#
+# NOT a renewal
+#
+		if ($currentborrower ne '') {
+			# This book is currently on loan, but not to the person
+			# who wants to borrow it now. mark it returned before issuing to the new borrower
+			returnbookr($iteminformation->{'barcode'}, $env->{'branchcode'});
+		}
+
+		# Record in the database the fact that the book was issued.
+		my $sth=$dbh->prepare("insert into reserveissue (borrowernumber, itemnumber, duetime,restime) values (?,?,?,now())");
+		my $loanlength = C4::Context->preference('Reserveperiod');
+		my $datedue=time+($loanlength)*3600+900;
+		my @datearr = localtime($datedue);
+		my $dateduef = (1900+$datearr[5])."-".sprintf ("%0.2d",$datearr[4]+1)."-".sprintf ("%0.2d",$datearr[3])." ".sprintf ("%0.2d",$datearr[2]).":".sprintf ("%0.2d",$datearr[1]).":".sprintf ("%0.2d",$datearr[0]);
+#		if ($date) {
+#			$dateduef=$date;
+#		}
+		$sth->execute($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}, $dateduef);
+		$sth->finish;
+##Update totalissues of bibliorecord if exist
+   my $totalissue=XML_readline_onerecord($bibliorecord,"totalissue","biblios");
+$totalissue=scalar($totalissue);
+	$totalissue++;
+my $extras=length($totalissue);
+	for (1..(6-$extras)){
+	$totalissue="0".$totalissue;
+	}
+	$bibliorecord=XML_writeline($bibliorecord,"totalissue",$totalissue,"biblios");
+	my $frameworkcode=MARCfind_frameworkcode($dbh,$iteminformation->{'biblionumber'});
+		 C4::Biblio::OLDmodbiblio($dbh,$bibliorecord,$iteminformation->{'biblionumber'},$frameworkcode);
+###
+
+		$iteminformation->{'issues'}++;
+		&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due',$dateduef,1);
+		&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'issues',$iteminformation->{'issues'},1);
+		&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'onloan','1',1);
+
+		&itemseen($dbh,$iteminformation->{'itemnumber'});
+		# If it costs to borrow this book, charge it to the patron's account.
+		my ($charge,$itemtype)=calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
+		if ($charge > 0) {
+			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
+			$iteminformation->{'charge'}=$charge;
+		}
+		# Record the fact that this book was issued.
+		&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
+	}
+}
+
+=head2 getLoanLength
+
+Get loan length for an itemtype, a borrower type and a branch
+
+my $loanlength = &getLoanLength($borrowertype,$itemtype,branchcode)
+
+=cut
+
+=head2 returnbook
+
+  ($doreturn, $messages, $iteminformation, $borrower) =
+	  &returnbookr($barcode, $branch);
+
+Returns a book.
+
+C<$barcode> is the bar code of the book being returned. C<$branch> is
+the code of the branch where the book is being returned.
+
+C<&returnbook> returns a list of four items:
+
+C<$doreturn> is true iff the return succeeded.
+
+C<$messages> is a reference-to-hash giving the reason for failure:
+
+=over 4
+
+=item C<BadBarcode>
+
+No item with this barcode exists. The value is C<$barcode>.
+
+=item C<NotIssued>
+
+The book is not currently on loan. The value is C<$barcode>.
+
+=item C<IsPermanent>
+
+The book's home branch is a permanent collection. If you have borrowed
+this book, you are not allowed to return it. The value is the code for
+the book's home branch.
+
+=item C<wthdrawn>
+
+This book has been withdrawn/cancelled. The value should be ignored.
+
+=item C<ResFound>
+
+The item was reserved. The value is a reference-to-hash whose keys are
+fields from the reserves table of the Koha database, and
+C<biblioitemnumber>. It also has the key C<ResFound>, whose value is
+either C<Waiting>, C<Reserved>, or 0.
+
+=back
+
+C<$borrower> is a reference-to-hash, giving information about the
+patron who last borrowed the book.
+
+=cut
+
+# FIXME - This API is bogus. There's no need to return $borrower and
+# $iteminformation; the caller can ask about those separately, if it
+# cares (it'd be inefficient to make two database calls instead of
+# one, but &getpatroninformation and &getiteminformation can be
+# memoized if this is an issue).
+#
+# The ($doreturn, $messages) tuple is redundant: if the return
+# succeeded, that's all the caller needs to know. So &returnbook can
+# return 1 and 0 on success and failure, and set
+# $C4::Circulation::Circ2::errmsg to indicate the error. Or it can
+# return undef for success, and an error message on error (though this
+# is more C-ish than Perl-ish).
+
+sub returnbookr {
+	my ($barcode, $branch) = @_;
+	my %env;
+	my $messages;
+	my $dbh = C4::Context->dbh;
+	my $doreturn = 1;
+	die '$branch not defined' unless defined $branch; # just in case (bug 170)
+	# get information on item
+	my ($iteminformation) = getiteminformation(\%env, 0, $barcode);
+	if (not $iteminformation) {
+		$messages->{'BadBarcode'} = $barcode;
+		$doreturn = 0;
+	}
+	# find the borrower
+	my ($currentborrower) = currentresborrower($iteminformation->{'itemnumber'});
+
+	if ((not $currentborrower) && $doreturn) {
+		$messages->{'NotIssued'} = $barcode;
+		$doreturn = 0;
+	}
+my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$currentborrower);
+if ($resfine>0){
+ UpdateFine($iteminformation->{'itemnumber'},$currentborrower,$resfine,'RES',$iteminformation->{'duetime'});
+}
+	# check if the book is in a permanent collection....
+	my $hbr = $iteminformation->{'homebranch'};
+	my $branches = GetBranches();
+	if ($branches->{$hbr}->{'PE'}) {
+		$messages->{'IsPermanent'} = $hbr;
+	}
+	# check that the book has been cancelled
+	if ($iteminformation->{'wthdrawn'}) {
+		$messages->{'wthdrawn'} = 1;
+		$doreturn = 0;
+	}
+	# update issues, thereby returning book (should push this out into another subroutine
+	my ($borrower) = C4::Members::getpatroninformation(\%env, $currentborrower, 0);
+	if ($doreturn) {
+		my $sth = $dbh->prepare("update reserveissue set rettime = now() where (borrowernumber = ?) and (itemnumber = ?) and (rettime is null)");
+		$sth->execute( $currentborrower, $iteminformation->{'itemnumber'});
+		$messages->{'WasReturned'} = 1; # FIXME is the "= 1" right?
+	
+	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due','',1);
+	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'onloan','0',1);
+	}
+	my ($transfered, $mess, $item) = transferbook($branch, $barcode, 1);
+	itemseen($dbh,$iteminformation->{'itemnumber'});
+#	($borrower) = getpatroninformation(\%env, $currentborrower, 0);
+	# transfer book to the current branch
+	
+	if ($transfered) {
+		$messages->{'WasTransfered'} = 1; # FIXME is the "= 1" right?
+	}
+	# fix up the accounts.....
+	if ($iteminformation->{'itemlost'}) {
+#		fixaccountforlostandreturned($iteminformation, $currentborrower);
+		$messages->{'WasLost'} = 1; # FIXME is the "= 1" right?
+	}
+	# fix up the overdues in accounts...
+	fixoverduesonreturnres($currentborrower, $iteminformation->{'itemnumber'});
+	# find reserves.....
+	# update stats?
+	# Record the fact that this book was returned.
+	UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
+	return ($doreturn, $messages, $iteminformation, $borrower);
+}
+sub fixoverduesonreturnres {
+	my ($brn, $itm) = @_;
+	my $dbh = C4::Context->dbh;
+	# check for overdue fine
+	my $sth = $dbh->prepare("select * from accountlines where (borrowernumber = ?) and (itemnumber = ?) and (accounttype='FU' or accounttype='O')");
+	$sth->execute($brn,$itm);
+	# alter fine to show that the book has been returned
+	if (my $data = $sth->fetchrow_hashref) {
+		my $usth=$dbh->prepare("update accountlines set accounttype='F' where (borrowernumber = ?) and (itemnumber = ?) and (accountno = ?)");
+		$usth->execute($brn,$itm,$data->{'accountno'});
+		$usth->finish();
+	}
+	$sth->finish();
+	return;
+}
+# Not exported
+sub currentresborrower {
+
+	my ($itemnumber) = @_;
+
+	my $dbh = C4::Context->dbh;
+	my $sth=$dbh->prepare("select borrowernumber from reserveissue where itemnumber=? and rettime is NULL");
+	$sth->execute($itemnumber);
+	my ($borrower) = $sth->fetchrow;
+	return($borrower);
+}
+=head2 getissues
+
+  $issues = &getissuesr($borrowernumber);
+
+Returns the set of books currently on loan to a patron.
+
+C<$borrowernumber> is the patron's borrower number.
+
+C<&getissues> returns a PHP-style array: C<$issues> is a
+reference-to-hash whose keys are integers in the range 0..I<n>-1,
+where I<n> is the number of books the patron currently has on loan.
+
+The values of C<$issues> are references-to-hash whose keys are
+selected fields from the issues, items, biblio, and biblioitems tables
+of the Koha database.
+
+=cut
+#'
+sub getissuesr {
+# New subroutine for Circ3.pm
+	my ($borrower) = @_;
+	my $dbh = C4::Context->dbh;
+	my $borrowernumber = $borrower->{'borrowernumber'};
+	my %currentissues;
+	my $select = "SELECT *,
+				timediff(now(),  reserveissue.duetime  ) as elapsed
+			
+			FROM reserveissue,items,biblio
+			WHERE reserveissue.borrowernumber  = ?
+			AND items.biblionumber=biblio.biblionumber
+			AND reserveissue.itemnumber      = items.itemnumber
+			AND reserveissue.rettime      IS NULL
+			";
+	#    print $select;
+	my $sth=$dbh->prepare($select);
+	$sth->execute($borrowernumber);
+	my $counter = 0;
+	while (my $data = $sth->fetchrow_hashref) {
+		if ($data->{'elapsed'}>0) {
+			$data->{'overdue'} = 1;
+		}
+		$currentissues{$counter} = $data;
+		$counter++;
+	}
+	$sth->finish;
+	return(\%currentissues);
+}
+
+
+
+
+1;
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Developement team <info at koha.org>
+
+=cut

Index: C4/Circulation/Fines.pm
===================================================================
RCS file: C4/Circulation/Fines.pm
diff -N C4/Circulation/Fines.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Circulation/Fines.pm	26 Mar 2007 02:19:20 -0000	1.20.2.2
@@ -0,0 +1,294 @@
+package C4::Circulation::Fines;
+
+# $Id: Fines.pm,v 1.20.2.2 2007/03/26 02:19:20 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+
+use C4::Context;
+use C4::Biblio;
+use vars qw($VERSION @ISA @EXPORT);
+
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::Circulation::Fines - Koha module dealing with fines
+
+=head1 SYNOPSIS
+
+  use C4::Circulation::Fines;
+
+=head1 DESCRIPTION
+
+This module contains several functions for dealing with fines for
+overdue items. It is primarily used by the 'misc/fines2.pl' script.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at ISA = qw(Exporter);
+ at EXPORT = qw(&Getoverdues &CalcFine &BorType &UpdateFine &ReplacementCost);
+
+=item Getoverdues
+
+  ($count, $overdues) = &Getoverdues();
+
+Returns the list of all overdue books.
+
+C<$count> is the number of elements in C<@{$overdues}>.
+
+C<$overdues> is a reference-to-array. Each element is a
+reference-to-hash whose keys are the fields of the issues table in the
+Koha database.
+
+=cut
+#'
+sub Getoverdues{
+  my $dbh = C4::Context->dbh;
+  my $sth=$dbh->prepare("Select * from issues where date_due < now() and returndate is  NULL order by borrowernumber");
+  $sth->execute;
+  # FIXME - Use push @results
+  my $i=0;
+  my @results;
+  while (my $data=$sth->fetchrow_hashref){
+  push  @results,$data;
+    $i++;
+  }
+  $sth->finish;
+  return($i,\@results);
+}
+
+=item CalcFine
+
+  ($amount, $chargename, $message) =
+	&CalcFine($itemnumber, $borrowercode, $days_overdue);
+
+Calculates the fine for a book.
+
+The issuingrules table in the Koha database is a fine matrix, listing
+the penalties for each type of patron for each type of item and each branch (e.g., the
+standard fine for books might be $0.50, but $1.50 for DVDs, or staff
+members might get a longer grace period between the first and second
+reminders that a book is overdue).
+
+
+
+C<$itemnumber> is the book's item number.
+
+C<$borrowercode> is the borrower code of the patron who currently has
+the book.
+
+C<$days_overdue> is the number of days elapsed since the book's due
+date.
+
+C<&CalcFine> returns a list of three values:
+
+C<$amount> is the fine owed by the patron (see above).
+
+C<$chargename> is the chargename field from the applicable record in
+the issuingrules table, whatever that is.
+
+C<$message> is a text message, either "First Notice", "Second Notice",
+or "Final Notice".
+
+=cut
+#'
+sub CalcFine {
+  my ($itemnumber,$bortype,$difference)=@_;
+  my $dbh = C4::Context->dbh;
+  # Look up the issuingrules record for this book's item type and the
+  # given borrwer type.
+ 
+
+  my $sth=$dbh->prepare("Select * from items,itemtypes,issuingrules where items.itemnumber=?
+ and  items.ctype=itemtypes.itemtype and
+  issuingrules.itemtype=itemtypes.itemtype and
+  issuingrules.categorycode=? ");
+#  print $query;
+  $sth->execute($itemnumber,$bortype);
+  my $data=$sth->fetchrow_hashref;
+	# FIXME - Error-checking: the item might be lost, or there
+	# might not be an entry in 'issuingrules' for this item type
+	# or borrower type.
+  $sth->finish;
+  my $amount=0;
+  my $printout;
+
+  if ($difference <= $data->{chargeperiod} && $difference>$data->{firstremind}){
+    # Yes. Set the fine as listed.
+$amount=$data->{'fine'}* $difference;
+  }elsif($difference > $data->{chargeperiod}){
+$difference=$data->{chargeperiod};
+$amount=$data->{'fine'}* $difference;
+  $printout="Final";
+}
+
+  # Is it time to send the account to a collection agency?
+  # FIXME -This $data->{'accountsent'} is not seemed to be set in the DB
+  
+  return($amount,$data->{'chargename'},$printout);
+}
+
+=item UpdateFine
+
+  &UpdateFine($itemnumber, $borrowernumber, $amount, $type, $description);
+
+(Note: the following is mostly conjecture and guesswork.)
+
+Updates the fine owed on an overdue book.
+
+C<$itemnumber> is the book's item number.
+
+C<$borrowernumber> is the borrower number of the patron who currently
+has the book on loan.
+
+C<$amount> is the current amount owed by the patron.
+
+C<$type> will be used in the description of the fine.
+
+C<$description> is a string that must be present in the description of
+the fine. I think this is expected to be a date in DD/MM/YYYY format.
+
+C<&UpdateFine> looks up the amount currently owed on the given item
+and sets it to C<$amount>, creating, if necessary, a new entry in the
+accountlines table of the Koha database.
+
+=cut
+#'
+# FIXME - This API doesn't look right: why should the caller have to
+# specify both the item number and the borrower number? A book can't
+# be on loan to two different people, so the item number should be
+# sufficient.
+sub UpdateFine {
+  my ($itemnum,$bornum,$amount,$type,$due)=@_;
+  my $dbh = C4::Context->dbh;
+  # FIXME - What exactly is this query supposed to do? It looks up an
+  # entry in accountlines that matches the given item and borrower
+  # numbers, where the description contains $due, and where the
+  # account type has one of several values, but what does this _mean_?
+  # Does it look up existing fines for this item?
+  # FIXME - What are these various account types? ("FU", "O", "F", "M")
+
+  my $sth=$dbh->prepare("Select * from accountlines where itemnumber=? and
+  borrowernumber=? and (accounttype='FU' or accounttype='O' or
+  accounttype='F' or accounttype='M') ");
+  $sth->execute($itemnum,$bornum);
+
+  if (my $data=$sth->fetchrow_hashref){
+    # I think this if-clause deals with the case where we're updating
+    # an existing fine.
+#    print "in accounts ...";
+    if ($data->{'amount'} != $amount){
+
+#     print "updating";
+      my $diff=$amount - $data->{'amount'};
+      my $out=$data->{'amountoutstanding'}+$diff;
+      my $sth2=$dbh->prepare("update accountlines set date=now(), amount=?,
+      amountoutstanding=?,accounttype='FU' where
+      accountid=?");
+      $sth2->execute($amount,$out,$data->{'accountid'});
+      $sth2->finish;
+   } else {
+ #     print "no update needed $data->{'amount'} \n";
+    }
+  } else {
+    # I think this else-clause deals with the case where we're adding
+    # a new fine.
+    my $sth4=$dbh->prepare("select title from biblio ,items where items.itemnumber=?
+    and biblio.biblionumber=items.biblionumber");
+    $sth4->execute($itemnum);
+    my $title=$sth4->fetchrow;
+    $sth4->finish;
+ #   print "not in account";
+    my $sth3=$dbh->prepare("Select max(accountno) from accountlines");
+    $sth3->execute;
+    # FIXME - Make $accountno a scalar.
+    my $accountno=$sth3->fetchrow;
+    $sth3->finish;
+    $accountno++;
+    my $sth2=$dbh->prepare("Insert into accountlines
+    (borrowernumber,itemnumber,date,amount,
+    description,accounttype,amountoutstanding,accountno) values
+    (?,?,now(),?,?,'FU',?,?)");
+    $sth2->execute($bornum,$itemnum,$amount,"$type $title $due",$amount,$accountno);
+    $sth2->finish;
+  }
+  $sth->finish;
+}
+
+
+
+=item BorType
+
+  $borrower = &BorType($borrowernumber);
+
+Looks up a patron by borrower number.
+
+C<$borrower> is a reference-to-hash whose keys are all of the fields
+from the borrowers and categories tables of the Koha database. Thus,
+C<$borrower> contains all information about both the borrower and
+category he or she belongs to.
+
+=cut
+#'
+sub BorType {
+  my ($borrowernumber)=@_;
+  my $dbh = C4::Context->dbh;
+  my $sth=$dbh->prepare("Select * from borrowers,categories where
+  borrowernumber=? and
+borrowers.categorycode=categories.categorycode");
+  $sth->execute($borrowernumber);
+  my $data=$sth->fetchrow_hashref;
+  $sth->finish;
+  return($data);
+}
+
+=item ReplacementCost
+
+  $cost = &ReplacementCost($itemnumber);
+
+Returns the replacement cost of the item with the given item number.
+
+=cut
+#'
+sub ReplacementCost{
+  my ($itemnumber)=@_;
+  my $dbh = C4::Context->dbh;
+  my ($itemrecord)=XMLgetitem($dbh,$itemnumber);
+$itemrecord=XML_xml2hash_onerecord($itemrecord);
+ my $replacementprice=XML_readline_onerecord($itemrecord,"replacementprice","holdings"); 
+  return($replacementprice);
+}
+
+1;
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Developement team <info at koha.org>
+
+=cut

Index: C4/Circulation/PrinterConfig.pm
===================================================================
RCS file: C4/Circulation/PrinterConfig.pm
diff -N C4/Circulation/PrinterConfig.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Circulation/PrinterConfig.pm	26 Mar 2007 02:19:20 -0000	1.1.2.1
@@ -0,0 +1,111 @@
+package C4::Barcodes::PrinterConfig;
+
+# This package is used to deal with labels in a pdf file. Giving some parameters,
+# this package takes care of every label considering the environment of the pdf
+# file.
+
+use strict;
+require Exporter;
+use vars qw(@EXPORT);
+ at EXPORT = qw(&labelsPage &getLabelPosition setPositionsForX setPositionsForY);
+
+use PDF::API2;
+use PDF::API2::Page;
+
+
+my @positionsForX; # Take all the X positions of the pdf file.
+my @positionsForY; # Take all the Y positions of the pdf file.
+my $firstLabel = 1; # Test if the label passed as a parameter is the first label to be printed into the pdf file.
+
+# ***************************** ROUTINES DEFINITIONS ********************************** #
+
+# Calculate and stores all tha X positions across the pdf page.
+sub setPositionsForX {
+	my ($marginLeft, $labelWidth, $columns, $pageType) = @_;
+	my $defaultDpi = 72/25.4; # By default we know 25.4 mm -> 1 inch -> 72 dots per inch
+	my $whereToStart = ($marginLeft + ($labelWidth/2));
+	my $firstLabel = $whereToStart*$defaultDpi;
+	my $spaceBetweenLabels = $labelWidth*$defaultDpi;
+	my @positions;
+	for (my $i = 0; $i < $columns ; $i++) {
+		push @positions, ($firstLabel+($spaceBetweenLabels*$i));
+	}
+	@positionsForX = @positions;
+}
+
+# Calculate and stores all tha Y positions across the pdf page.
+sub setPositionsForY {
+	my ($marginBottom, $labelHeigth, $rows, $pageType) = @_;
+	my $defaultDpi = 72/25.4; # By default we know 25.4 mm -> 1 inch -> 72 dots per inch
+	my $whereToStart = ($marginBottom + ($labelHeigth/2));
+	my $firstLabel = $whereToStart*$defaultDpi;
+	my $spaceBetweenLabels = $labelHeigth*$defaultDpi;
+	my @positions;
+	for (my $i = 0; $i < $rows; $i++) {
+		unshift @positions, ($firstLabel+($spaceBetweenLabels*$i));
+	}
+	@positionsForY = @positions;
+}
+
+# Return the (x,y) position of the label that you are going to print considering the environment.
+sub getLabelPosition {
+	my ($labelNum, $pdf, $page, $gfxObject, $textObject, $fontObject, $pageType) = @_;
+	my $indexX = $labelNum % @positionsForX;
+	my $indexY = int($labelNum / @positionsForX);
+	# Calculates the next label position and return that label number
+	my $nextIndexX = $labelNum % @positionsForX;
+	my $nextIndexY = $labelNum % @positionsForY;
+	if ($firstLabel) {
+          $page = $pdf->page;
+          $page->mediabox($pageType);
+          $gfxObject = $page->gfx;
+          $textObject = $page->text;
+          $textObject->font($fontObject, 7);
+		  $firstLabel = 0;
+	} elsif (($nextIndexX == 0) && ($nextIndexY == 0)) {
+          $page = $pdf->page;
+          $page->mediabox($pageType);
+          $gfxObject = $page->gfx;
+          $textObject = $page->text;
+          $textObject->font($fontObject, 7);
+	}
+	$labelNum = $labelNum + 1;	
+	if ($labelNum == (@positionsForX*@positionsForY)) {
+		$labelNum = 0;
+	}
+	return ($positionsForX[$indexX], $positionsForY[$indexY], $pdf, $page, $gfxObject, $textObject, $fontObject, $labelNum);
+}
+
+# This function will help you to build the labels panel, where you can choose
+# wich label position do you want to start the printer process.
+sub labelsPage{
+	my ($rows, $columns) = @_;
+	my @pageType;
+	my $tagname = 0;
+	my $labelname = 1;
+	my $check;
+	for (my $i = 1; $i <= $rows; $i++) {
+		my @column;
+		for (my $j = 1; $j <= $columns; $j++) {
+			my %cell;
+			if ($tagname == 0) {
+				$check = 'checked';
+			} else {
+				$check = '';
+			}		
+			%cell = (check => $check,
+					 tagname => $tagname,
+			         labelname => $labelname);
+			$tagname = $tagname + 1;	
+			$labelname = $labelname + 1;	
+			push @column, \%cell;
+		}
+		my %columns = (columns => \@column);
+		push @pageType, \%columns;
+	}
+	return @pageType;
+}
+
+
+1;
+__END__
\ No newline at end of file

Index: C4/Interface/CGI/Output.pm
===================================================================
RCS file: C4/Interface/CGI/Output.pm
diff -N C4/Interface/CGI/Output.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Interface/CGI/Output.pm	26 Mar 2007 02:19:20 -0000	1.7.2.2
@@ -0,0 +1,97 @@
+package C4::Interface::CGI::Output;
+
+# $Id: Output.pm,v 1.7.2.2 2007/03/26 02:19:20 tgarip1957 Exp $
+
+#package to work around problems in HTTP headers
+# Note: This is just a utility module; it should not be instantiated.
+
+
+# Copyright 2003 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+use strict;
+require Exporter;
+use open ':utf8';
+use Encode;
+use vars qw($VERSION @ISA @EXPORT);
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::CGI::Output - Convenience functions for handling outputting HTML pages
+
+=head1 SYNOPSIS
+
+  use C4::Interface::CGI::Output;
+
+  print $query->header(-type => "text/html"), $output;
+
+=head1 DESCRIPTION
+
+The functions in this module peek into a piece of HTML and return strings
+related to the (guessed) charset.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at ISA = qw(Exporter);
+ at EXPORT = qw(	&output_html_with_http_headers
+		);
+
+
+
+
+
+=item output_html_with_http_headers
+
+   &output_html_with_http_headers($query, $cookie, $html)
+
+Outputs the HTML page $html with the appropriate HTTP headers,
+with the authentication cookie $cookie and a Content-Type that
+corresponds to the HTML page $html.
+
+=cut
+
+sub output_html_with_http_headers  {
+
+    my($query, $cookie, $html) = @_;
+$html=~s/()//g;##Remove Windows BOM
+$html=Encode::encode_utf8($html) if $ENV{MOD_PERL}; ### Stop "Wide character in print" warnings from HTML::Template
+    print $query->header(
+	-type   => "text/html",
+	-charset=>"UTF-8",
+	-cookie => $cookie,
+  ), $html;
+
+}
+
+#---------------------------------
+
+
+1;
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Developement team <info at koha.org>
+
+=cut

Index: C4/Interface/CGI/Template.pm
===================================================================
RCS file: C4/Interface/CGI/Template.pm
diff -N C4/Interface/CGI/Template.pm
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ C4/Interface/CGI/Template.pm	26 Mar 2007 02:19:20 -0000	1.1.14.2
@@ -0,0 +1,89 @@
+package C4::Interface::CGI::Template;
+
+# $Id: Template.pm,v 1.1.14.2 2007/03/26 02:19:20 tgarip1957 Exp $
+
+# convenience package for HTML templating
+# Note: This is just a utility module; it should not be instantiated.
+
+
+# Copyright 2003 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+require Exporter;
+
+use vars qw($VERSION @ISA @EXPORT);
+
+# set the version for version checking
+$VERSION = 0.01;
+
+=head1 NAME
+
+C4::Members - Convenience functions for using HTML::Template
+
+=head1 SYNOPSIS
+
+  use C4::Interface::HTML::Template;
+
+=head1 DESCRIPTION
+
+The functions in this module peek into a piece of HTML and return strings
+related to the (guessed) charset.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+ at ISA = qw(Exporter);
+ at EXPORT = qw(
+		&expand_sex_into_predicate
+	     );
+
+=item expand_sex_into_predicate
+
+  $data{&expand_sex_into_predicate($data{sex})} = 1;
+
+Converts a single 'M' or 'F' into 'sex_M_p' or 'sex_F_p'
+respectively.
+
+In some languages, 'M' and 'F' are not appropriate. However,
+with HTML::Template, there is no way to localize 'M' or 'F'
+unless these are converted into variables that TMPL_IF can
+understand. This function provides this conversion.
+
+=cut
+
+sub expand_sex_into_predicate ($) {
+   my($sex) = @_;
+   return "sex_${sex}_p";
+} # expand_sex_into_predicate
+
+#---------------------------------
+
+
+1;
+__END__
+
+=back
+
+=head1 AUTHOR
+
+Koha Developement team <info at koha.org>
+
+=cut

Index: about.pl
===================================================================
RCS file: about.pl
diff -N about.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ about.pl	26 Mar 2007 02:19:20 -0000	1.8.4.2
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+use HTML::Template;
+use strict;
+require Exporter;
+use C4::Database;
+use C4::Output;  # contains gettemplate
+use C4::Interface::CGI::Output;
+use C4::Auth;
+use C4::Context;
+use CGI;
+
+my $query = new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "about.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {parameters => 1},
+			     debug => 1,
+			     });
+
+my $kohaVersion = C4::Context->config("kohaversion");
+my $osVersion = `uname -a`;
+my $perlVersion = $];
+my $mysqlVersion = `mysql -V`;
+my $apacheVersion =  `httpd -v`;
+$apacheVersion =  `httpd2 -v` unless $apacheVersion;
+
+$template->param(
+					kohaVersion => $kohaVersion,
+					osVersion          => $osVersion,
+					perlVersion        => $perlVersion,
+					mysqlVersion       => $mysqlVersion,
+					apacheVersion      => $apacheVersion,
+		);
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: changelanguage.pl
===================================================================
RCS file: changelanguage.pl
diff -N changelanguage.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ changelanguage.pl	26 Mar 2007 02:19:20 -0000	1.2.2.1
@@ -0,0 +1,10 @@
+#!/usr/bin/perl
+
+use C4::Output;
+use CGI;
+
+my $query=new CGI;
+my $language=$query->param('language');
+my $url=$query->referer();
+
+setlanguagecookie($query,$language,$url);

Index: help.pl
===================================================================
RCS file: help.pl
diff -N help.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ help.pl	26 Mar 2007 02:19:20 -0000	1.3.4.2
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use strict;
+
+use C4::Interface::CGI::Output;
+ use C4::Auth;
+use C4::Context;
+use C4::Koha;
+use CGI;
+my $query = new CGI;
+
+# find the script that called the online help using the CGI referer()
+
+my $refer  = $query->referer();
+$refer =~ /.*koha\/(.*)\.pl.*/;
+my $from = "help/$1.tmpl";
+my ($template, $loggedinuser, $cookie)    = get_template_and_user({template_name => $from,
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 1,
+			     flagsrequired => {borrow=> 1},
+			     debug => 1,
+			     });
+
+#my $template = gethelptemplate($from,"intranet");
+# my $template
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+

Index: logout.pl
===================================================================
RCS file: logout.pl
diff -N logout.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ logout.pl	26 Mar 2007 02:19:20 -0000	1.6.2.2
@@ -0,0 +1,75 @@
+#!/usr/bin/perl
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use CGI;
+use C4::Context;
+
+my $query=new CGI;
+
+my $sessionID=$query->cookie('sessionID');
+
+my $sessions;
+open (S, "/tmp/sessions");
+while (my ($sid, $u, $lasttime) = split(/:/, <S>)) {
+    chomp $lasttime;
+    (next) unless ($sid);
+    (next) if ($sid eq $sessionID);
+    $sessions->{$sid}->{'userid'}=$u;
+    $sessions->{$sid}->{'lasttime'}=$lasttime;
+}
+open (S, ">/tmp/sessions");
+foreach (keys %$sessions) {
+    my $userid=$sessions->{$_}->{'userid'};
+    my $lasttime=$sessions->{$_}->{'lasttime'};
+    print S "$_:$userid:$lasttime\n";
+}
+
+my $dbh = C4::Context->dbh;
+
+# Check that this is the ip that created the session before deleting it
+
+my $sth=$dbh->prepare("select userid,ip from sessions where sessionID=?");
+$sth->execute($sessionID);
+my ($userid, $ip);
+if ($sth->rows) {
+    ($userid,$ip) = $sth->fetchrow;
+    if ($ip ne $ENV{'REMOTE_ADDR'}) {
+       # attempt to logout from a different ip than cookie was created at
+       exit;
+    }
+}
+
+$sth=$dbh->prepare("delete from sessions where sessionID=?");
+$sth->execute($sessionID);
+open L, ">>/tmp/sessionlog";
+my $time=localtime(time());
+printf L "%20s from %16s logged out at %30s (manual log out).\n", $userid, $ip, $time;
+close L;
+
+my $cookie=$query->cookie(-name => 'sessionID',
+			  -value => '',
+			  -expires => '+1y');
+
+# Should redirect to intranet home page after logging out
+
+print $query->redirect("mainpage.pl");
+exit;
+
+

Index: mainpage.pl
===================================================================
RCS file: mainpage.pl
diff -N mainpage.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mainpage.pl	26 Mar 2007 02:19:20 -0000	1.12.2.2
@@ -0,0 +1,39 @@
+#!/usr/bin/perl 
+use strict;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Auth;
+use C4::Suggestions;
+use C4::Koha;
+use C4::BookShelves;
+use C4::NewsChannels;
+use C4::Context;
+my $query =  CGI->new();
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "intranet-main.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1, circulate => 1,
+			     				parameters => 1, borrowers => 1,
+							permissions =>1, reserveforothers=>1,
+							editcatalogue => 1, updatecharges => 1, },
+			     debug => 1,
+			     });
+
+my $lang = "koha";
+my $error=$query->param('error');
+$template->param(error        =>$error);
+my ($opac_news_count, $all_opac_news) = &get_opac_news(undef, $lang);
+# if ($opac_news_count > 4) {$template->param(more_opac_news => 1);}
+$template->param(opac_news        => $all_opac_news);
+$template->param(opac_news_count  => $opac_news_count);
+
+my $marc_p = C4::Context->boolean_preference("marc");
+$template->param(NOTMARC => !$marc_p);
+my $new_suggestions = &CountSuggestion("ASKED");
+$template->param(new_suggestions => $new_suggestions);
+
+
+output_html_with_http_headers($query, $cookie, $template->output());
+

Index: plugin_launcher.pl
===================================================================
RCS file: plugin_launcher.pl
diff -N plugin_launcher.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ plugin_launcher.pl	26 Mar 2007 02:19:20 -0000	1.4.4.2
@@ -0,0 +1,38 @@
+#!/usr/bin/perl
+
+# $Id: plugin_launcher.pl,v 1.4.4.2 2007/03/26 02:19:20 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Context;
+use C4::Search;
+use C4::Output;
+
+my $input = new CGI;
+#my $plugin_name=$input->param("plugin_name");
+my $cgidir = C4::Context->intranetdir ."/cgi-bin/value_builder";
+		unless (opendir(DIR, "$cgidir")) {
+			$cgidir = C4::Context->intranetdir."/value_builder";
+		} 
+		my $plugin_name=$cgidir."/".$input->param("plugin_name");
+
+
+do $plugin_name;
+&plugin($input);

Index: authorities/auth_finder.pl
===================================================================
RCS file: authorities/auth_finder.pl
diff -N authorities/auth_finder.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/auth_finder.pl	26 Mar 2007 02:19:21 -0000	1.12.2.2
@@ -0,0 +1,157 @@
+#!/usr/bin/perl
+# WARNING: 4-character tab stops here
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+
+use CGI;
+use C4::Auth;
+use C4::Context;
+use C4::Search;
+use C4::Interface::CGI::Output;
+use C4::AuthoritiesMarc;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+
+my $query=new CGI;
+my $op = $query->param('op');
+my $authtypecode = $query->param('authtypecode');
+my $index = $query->param('index');
+my $resultstring = $query->param('result');
+my $dbh = C4::Context->dbh;
+
+my $startfrom=$query->param('startfrom');
+$startfrom=0 if(!defined $startfrom);
+my ($template, $loggedinuser, $cookie);
+my $resultsperpage;
+
+my $authtypes = getauthtypes;
+my @authtypesloop;
+foreach my $thisauthtype (keys %$authtypes) {
+	my $selected = 1 if $thisauthtype eq $authtypecode;
+	my %row =(value => $thisauthtype,
+				selected => $selected,
+				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+			  index => $index,
+			);
+	push @authtypesloop, \%row;
+}
+
+if ($op eq "do_search") {
+	my @marclist = $query->param('marclist');
+	
+	my @operator = $query->param('operator');
+	my @value = $query->param('value');
+
+	$resultsperpage= $query->param('resultsperpage');
+	$resultsperpage = 10 ;
+
+	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode);# $orderby);
+
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/searchresultlist-auth.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {borrowers => 1},
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+	# multi page display gestion
+	my $displaynext=0;
+	my $displayprev=$startfrom;
+	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
+		$displaynext = 1;
+	}
+
+	my @field_data = ();
+
+
+	my @marclist_ini = $query->param('marclist'); # get marclist again, as the previous one has been modified by catalogsearch (mainentry replaced by field name
+	for(my $i = 0 ; $i <= $#marclist ; $i++) {
+		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
+		push @field_data, { term => "operator", val=>$operator[$i] };
+		push @field_data, { term => "value", val=>$value[$i] };
+	}
+
+	my @numbers = ();
+
+	if ($total>$resultsperpage) {
+		for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
+			if ($i<16) {
+	    		my $highlight=0;
+	    		($startfrom==($i-1)) && ($highlight=1);
+	    		push @numbers, { number => $i,
+					highlight => $highlight ,
+					searchdata=> \@field_data,
+					startfrom => ($i-1)};
+			}
+    	}
+	}
+
+	my $from = $startfrom*$resultsperpage+1;
+	my $to;
+
+ 	if($total < (($startfrom+1)*$resultsperpage)) {
+		$to = $total;
+	} else {
+		$to = (($startfrom+1)*$resultsperpage);
+	}
+	$template->param(result => $results) if $results;
+	$template->param(index => $query->param('index')."");
+	$template->param(startfrom=> $startfrom,
+							displaynext=> $displaynext,
+							displayprev=> $displayprev,
+							resultsperpage => $resultsperpage,
+							startfromnext => $startfrom+1,
+							startfromprev => $startfrom-1,
+					      		  index => $index,
+							searchdata=>\@field_data,
+							total=>$total,
+							from=>$from,
+							to=>$to,
+							numbers=>\@numbers,
+							authtypecode =>$authtypecode,
+							resultstring =>$value[0],
+							);
+} else {
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/auth_finder.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+	$template->param(index=>$query->param('index')."",
+					resultstring => $resultstring,
+					);
+}
+
+$template->param(authtypesloop => \@authtypesloop,
+				authtypecode => $authtypecode,
+				nonav=>"1",);
+
+# Print the page
+output_html_with_http_headers $query, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: authorities/auth_linker.pl
===================================================================
RCS file: authorities/auth_linker.pl
diff -N authorities/auth_linker.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/auth_linker.pl	26 Mar 2007 02:19:21 -0000	1.2.2.2
@@ -0,0 +1,161 @@
+#!/usr/bin/perl
+# WARNING: 4-character tab stops here
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+
+use CGI;
+use C4::Auth;
+use C4::Context;
+use C4::Search;
+
+use C4::Interface::CGI::Output;
+use C4::AuthoritiesMarc;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+
+my $query=new CGI;
+my $op = $query->param('op');
+my $authtypecode = $query->param('authtypecode');
+my $index = $query->param('index');
+# my $category = $query->param('category');
+my $resultstring = $query->param('result');
+my $dbh = C4::Context->dbh;
+
+my $startfrom=$query->param('startfrom');
+$startfrom=0 if(!defined $startfrom);
+my ($template, $loggedinuser, $cookie);
+my $resultsperpage;
+
+my $authtypes = getauthtypes;
+my @authtypesloop;
+foreach my $thisauthtype (keys %$authtypes) {
+	my $selected = 1 if $thisauthtype eq $authtypecode;
+	my %row =(value => $thisauthtype,
+				selected => $selected,
+				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+			  index => $index,
+			);
+	push @authtypesloop, \%row;
+}
+
+if ($op eq "do_search") {
+	my @marclist = $query->param('marclist');
+	
+	my @operator = $query->param('operator');
+	my @value = $query->param('value');
+
+	$resultsperpage= $query->param('resultsperpage');
+	$resultsperpage = 10 if(!defined $resultsperpage);
+
+	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode) ;
+
+
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/linkresultlist-auth.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {borrowers => 1},
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+	# multi page display gestion
+	my $displaynext=0;
+	my $displayprev=$startfrom;
+	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ) {
+		$displaynext = 1;
+	}
+
+	my @field_data = ();
+
+
+	my @marclist_ini = $query->param('marclist'); # get marclist again, as the previous one has been modified by authoritysearch (mainentry replaced by field name
+	for(my $i = 0 ; $i <= $#marclist ; $i++) {
+		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
+		push @field_data, { term => "operator", val=>$operator[$i] };
+		push @field_data, { term => "value", val=>$value[$i] };
+	}
+
+	my @numbers = ();
+
+	if ($total>$resultsperpage) {
+		for (my $i=1; $i<$total/$resultsperpage+1; $i++) {
+			if ($i<16) {
+	    		my $highlight=0;
+	    		($startfrom==($i-1)) && ($highlight=1);
+	    		push @numbers, { number => $i,
+					highlight => $highlight ,
+					searchdata=> \@field_data,
+					startfrom => ($i-1)};
+			}
+    	}
+	}
+
+	my $from = $startfrom*$resultsperpage+1;
+	my $to;
+
+ 	if($total < (($startfrom+1)*$resultsperpage)) {
+		$to = $total;
+	} else {
+		$to = (($startfrom+1)*$resultsperpage);
+	}
+	$template->param(result => $results) if $results;
+	$template->param(index => $query->param('index')."");
+	$template->param(startfrom=> $startfrom,
+							displaynext=> $displaynext,
+							displayprev=> $displayprev,
+							resultsperpage => $resultsperpage,
+							startfromnext => $startfrom+1,
+							startfromprev => $startfrom-1,
+					        		index => $index,
+							searchdata=>\@field_data,
+							total=>$total,
+							from=>$from,
+							to=>$to,
+							numbers=>\@numbers,
+							authtypecode =>$authtypecode,
+							resultstring =>$value[0],
+							);
+} else {
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/auth_linker.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+	$template->param(index=>$query->param('index')."",
+					resultstring => $resultstring,
+				
+					);
+}
+
+$template->param(authtypesloop => \@authtypesloop,
+				authtypecode => $authtypecode,
+				nonav=>"1",);
+
+# Print the page
+output_html_with_http_headers $query, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: authorities/authorities-home.pl
===================================================================
RCS file: authorities/authorities-home.pl
diff -N authorities/authorities-home.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/authorities-home.pl	26 Mar 2007 02:19:21 -0000	1.15.2.2
@@ -0,0 +1,186 @@
+#!/usr/bin/perl
+# WARNING: 4-character tab stops here
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use C4::AuthoritiesMarc;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+use C4::Biblio;
+
+
+my $query=new CGI;
+my $op = $query->param('op');
+my $authtypecode = $query->param('authtypecode');
+my $dbh = C4::Context->dbh;
+my $mergefrom=$query->param('mergefrom');
+my $mergeto=$query->param('mergeto');
+my $startfrom=$query->param('startfrom');
+my $authid=$query->param('authid');
+$startfrom=0 if(!defined $startfrom);
+my ($template, $loggedinuser, $cookie);
+my $resultsperpage;
+
+my $authtypes = getauthtypes;
+my @authtypesloop;
+foreach my $thisauthtype (sort { $authtypes->{$a} <=> $authtypes->{$b} } keys %$authtypes) {
+	my $selected = 1 if $thisauthtype eq $authtypecode;
+	my %row =(value => $thisauthtype,
+				selected => $selected, 
+				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+			);
+	push @authtypesloop, \%row;
+}
+
+
+if ($op eq "do_search") {
+	my @marclist = $query->param('marclist');
+	
+	my @operator = $query->param('operator');
+	my @value = $query->param('value');
+
+	$resultsperpage= $query->param('resultsperpage');
+	$resultsperpage = 10 unless $resultsperpage;
+	my @tags;
+	my ($results,$total) = authoritysearch($dbh, \@marclist, \@operator, \@value,$startfrom*$resultsperpage, $resultsperpage,$authtypecode) ;
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/searchresultlist.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				authtypecode=> $authtypecode,
+				flagsrequired => {borrowers => 1},
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+	# multi page display gestion
+	my $displaynext=0;
+	my $displayprev=$startfrom;
+	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
+		$displaynext = 1;
+	}
+
+	my @field_data = ();
+
+	# we must get parameters once again. Because if there is a mainentry, it has been replaced by something else during the search, thus the links next/previous would not work anymore 
+	my @marclist_ini = $query->param('marclist');
+	for(my $i = 0 ; $i <= $#marclist ; $i++)
+	{
+		push @field_data, { term => "marclist", val=>$marclist_ini[$i] };
+		push @field_data, { term => "operator", val=>$operator[$i] };
+		push @field_data, { term => "value", val=>$value[$i] };
+	}
+
+	my @numbers = ();
+
+	if ($total>$resultsperpage)
+	{
+		for (my $i=1; $i<$total/$resultsperpage+1; $i++)
+		{
+			if ($i<31)
+			{
+	    		my $highlight=0;
+	    		($startfrom==($i-1)) && ($highlight=1);
+	    		push @numbers, { number => $i,
+					highlight => $highlight ,
+					searchdata=> \@field_data,
+					startfrom => ($i-1)};
+			}
+    	}
+	}
+
+	my $from = $startfrom*$resultsperpage+1;
+	my $to;
+
+ 	if($total < (($startfrom+1)*$resultsperpage))
+	{
+		$to = $total;
+	} else {
+		$to = (($startfrom+1)*$resultsperpage);
+	}
+	$template->param(result => $results) if $results;
+	$template->param(
+							startfrom=> $startfrom,
+							displaynext=> $displaynext,
+							displayprev=> $displayprev,
+							resultsperpage => $resultsperpage,
+							startfromnext => $startfrom+1,
+							startfromprev => $startfrom-1,
+							searchdata=>\@field_data,
+							total=>$total,
+							from=>$from,
+							to=>$to,
+							numbers=>\@numbers,
+							authtypecode=>$authtypecode,
+							);
+
+} elsif ($op eq "delete") {
+
+	&AUTHdelauthority($dbh,$authid);
+
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/authorities-home.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+
+}elsif ($op eq "merge") {
+
+
+	my $MARCfrom = XMLgetauthorityhash($dbh,$mergefrom);
+	my $MARCto = XMLgetauthorityhash($dbh,$mergeto);
+	merge($dbh,$mergefrom,$MARCfrom,$mergeto,$MARCto);
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/authorities-home.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+}else {
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/authorities-home.tmpl",
+				query => $query,
+				type => 'intranet',
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+}
+
+
+
+$template->param(authtypesloop => \@authtypesloop);
+
+# Print the page
+output_html_with_http_headers $query, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: authorities/authorities.pl
===================================================================
RCS file: authorities/authorities.pl
diff -N authorities/authorities.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/authorities.pl	26 Mar 2007 02:19:21 -0000	1.18.2.2
@@ -0,0 +1,594 @@
+#!/usr/bin/perl
+
+# $Id: authorities.pl,v 1.18.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::AuthoritiesMarc;
+use C4::Biblio;
+use C4::Context;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+use Encode;
+
+use vars qw( $tagslib);
+use vars qw( $authorised_values_sth);
+use vars qw( $is_a_modif );
+my $input = new CGI;
+my $z3950 = $input->param('z3950');
+my $logstatus=C4::Context->preference('Activate_log');
+my $xml;
+my $itemtype; # created here because it can be used in build_authorized_values_list sub
+
+
+
+
+
+=item build_authorized_values_list
+
+=cut
+
+sub build_authorized_values_list ($$$$$) {
+	my($tag, $subfield, $value, $dbh,$authorised_values_sth) = @_;
+
+	my @authorised_values;
+	my %authorised_lib;
+
+	# builds list, depending on authorised value...
+
+	#---- branch
+	if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+	my $sth=$dbh->prepare("select branchcode,branchname from branches order by branchname");
+	$sth->execute;
+	push @authorised_values, ""
+		unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+
+	while (my ($branchcode,$branchname) = $sth->fetchrow_array) {
+		push @authorised_values, $branchcode;
+		$authorised_lib{$branchcode}=$branchname;
+	}
+
+	#----- itemtypes
+	} elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
+		my $sth=$dbh->prepare("select itemtype,description from itemtypes order by description");
+		$sth->execute;
+		push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+	
+		while (my ($itemtype,$description) = $sth->fetchrow_array) {
+			push @authorised_values, $itemtype;
+			$authorised_lib{$itemtype}=$description;
+		}
+		$value=$itemtype unless ($value);
+
+	#---- "true" authorised value
+	} else {
+		$authorised_values_sth->execute($tagslib->{$tag}->{$subfield}->{authorised_value});
+
+		push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+	
+		while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
+			push @authorised_values, $value;
+			$authorised_lib{$value}=$lib;
+		}
+    }
+    return CGI::scrolling_list( -name     => 'field_value',
+				-values   => \@authorised_values,
+				-default  => $value,
+				-labels   => \%authorised_lib,
+				-override => 1,
+				-size     => 1,
+				-multiple => 0 );
+}
+
+
+=item create_input
+ builds the <input ...> entry for a subfield.
+=cut
+sub create_input () {
+	my ($tag,$subfield,$value,$i,$tabloop,$rec,$authorised_values_sth,$id) = @_;	
+	my $dbh=C4::Context->dbh;
+	$value =~ s/"/&quot;/g;
+	my %subfield_data;
+	$subfield_data{id}=$id;
+	$subfield_data{tag}=$tag;
+	$subfield_data{subfield}=$subfield;
+	$subfield_data{marc_lib}="<span id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
+	$subfield_data{marc_lib_plain}=$tagslib->{$tag}->{$subfield}->{lib};
+	$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
+	$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
+	$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
+	$subfield_data{index} = $i;
+	$subfield_data{visibility} = "display:none" if (substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) gt "0") ; #check parity
+	# it's an authorised field
+	if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
+		$subfield_data{marc_value}= build_authorized_values_list($tag, $subfield, $value, $dbh,$authorised_values_sth);
+	# it's linking authority field to another authority
+	} elsif ($tagslib->{$tag}->{$subfield}->{link}) {
+		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff;'\" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\" value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY> <a  style=\"cursor: help;\" href=\"javascript:Dopop('../authorities/auth_linker.pl?index=$id',$id);\">...</a>";
+	
+		# it's a plugin field
+	} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
+		# opening plugin. Just check wether we are on a developper computer on a production one
+		# (the cgidir differs)
+		my $cgidir = C4::Context->intranetdir ."/cgi-bin/value_builder";
+		unless (opendir(DIR, "$cgidir")) {
+			$cgidir = C4::Context->intranetdir."/value_builder";
+		} 
+		my $plugin=$cgidir."/".$tagslib->{$tag}->{$subfield}->{'value_builder'}; 
+		require $plugin;
+		my $extended_param = plugin_parameters($dbh,$rec,$tagslib,$i,$tabloop);
+		my ($function_name,$javascript) = plugin_javascript($dbh,$rec,$tagslib,$i,$tabloop);
+		$subfield_data{marc_value}="<input tabindex=\"1\" type=\"text\"  name=\"field_value\" id=\"field_value$id\"  value=\"$value\" size=\"40\" maxlength=\"255\" DISABLE READONLY OnFocus=\"javascript:Focus$function_name($i)\" OnBlur=\"javascript:Blur$function_name($i); \"> <a  style=\"cursor: help;\" href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
+	# it's an hidden field
+	} elsif  ($tag eq '') {
+		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"hidden\" name=\"field_value\" id=\"field_value$id\"  value=\"$value\">";
+	} elsif  (substr($tagslib->{$tag}->{$subfield}->{'hidden'},2,1) gt "1") {
+
+		$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\"   value=\"$value\" size=\"40\" maxlength=\"255\" >";
+	# it's a standard field
+	} else {
+		if (length($value) >100) {
+			$subfield_data{marc_value}="<textarea tabindex=\"1\" name=\"field_value\" id=\"field_value$id\"  cols=\"40\" rows=\"5\" >$value</textarea>";
+		} else {
+			$subfield_data{marc_value}="<input onblur=\"this.style.backgroundColor='#ffffff';\" onfocus=\"this.style.backgroundColor='#ffffff'; \" tabindex=\"1\" type=\"text\" name=\"field_value\" id=\"field_value$id\"  value=\"$value\" size=\"50\">"; #"
+		}
+	}
+	return \%subfield_data;
+}
+
+sub build_tabs  ($$$;$){
+    my($template, $xmlhash, $dbh,$addedfield) = @_;
+    # fill arrays
+    my @loop_data =();
+    my $tag;
+    my $i=0;
+my $id=100;
+my ($authidtagfield,$authidtagsubfield)=MARCfind_marc_from_kohafield("authid","authorities");
+	my $authorised_values_sth = $dbh->prepare("select authorised_value,lib
+		from authorised_values
+		where category=? order by lib");
+my $author;
+my $controlfields;
+my $leader;
+if ($xmlhash){
+ $author=$xmlhash->{'datafield'};
+ $controlfields=$xmlhash->{'controlfield'};
+ $leader=$xmlhash->{'leader'};
+}
+    my @BIG_LOOP;
+my %built;
+# loop through each tab 0 through 9
+	for (my $tabloop = 0; $tabloop <= 9; $tabloop++) {
+		my @loop_data = ();
+		foreach my $tag (sort(keys (%{$tagslib}))) {
+			my $indicator;
+				# if MARC::Record is not empty => use it as master loop, then add missing subfields that should be in the tab.
+				# if MARC::Record is empty => use tab as master loop.
+	if ($xmlhash) {
+			####
+		
+			my %tagdefined;
+			my %definedsubfields;
+			my $hiddenrequired;
+			my ($ind1,$ind2);
+			
+		 if ($tag>9){
+			next if ($tag eq $authidtagfield); #we do not want authid to duplicate
+
+			foreach my $data (@$author){							
+					$hiddenrequired=0;
+					my @subfields_data;
+					undef %definedsubfields;
+   	 			 if ($data->{'tag'} eq $tag){
+					$tagdefined{$tag}=1 ;
+					   if ($built{$tag}==1){
+						$hiddenrequired=1;
+					    }
+					    $ind1="  ";
+					      $ind2="  ";		
+					      foreach my $subfieldcode ( $data->{'subfield'}){
+		   				 foreach my $code ( @$subfieldcode){	
+							next if ($tagslib->{$tag}->{$code->{'code'}}->{tab} ne $tabloop);						
+							my $subfield=$code->{'code'}  ;
+							my $value=$code->{'content'};
+							$definedsubfields{$tag.$subfield}=1 ;
+							 $built{$tag}=1;
+							push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id)) ;
+							$i++ ;
+		   				}
+					      } ##each subfield
+					    $ind1=$data->{'ind1'};
+					    $ind2=	$data->{'ind2'};
+					  
+					if ($hiddenrequired && $#loop_data >=0 && $loop_data[$#loop_data]->{'tag'} eq $tag) {
+						my @hiddensubfields_data;
+						my %tag_data;
+						push(@hiddensubfields_data, &create_input('','','',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
+						$tag_data{tag} = '';
+						$tag_data{tag_lib} = '';
+						$tag_data{indicator} = '';
+						$tag_data{subfield_loop} = \@hiddensubfields_data;
+						push (@loop_data, \%tag_data);
+						$i++;
+					}
+					# now, loop again to add parameter subfield that are not in the MARC::Record
+					
+					foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
+						next if (length $subfield !=1);
+						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
+						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) >1)  ); #check for visibility flag
+						next if ($definedsubfields{$tag.$subfield} );
+						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
+						$definedsubfields{$tag.$subfield}=1;
+						$i++;
+					}
+					if ($#subfields_data >= 0) {
+						my %tag_data;
+						$tag_data{tag} = $tag;
+						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
+						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
+						$tag_data{indicator} = $ind1.$ind2 if ($tag>=10);
+						$tag_data{subfield_loop} = \@subfields_data;
+						push (@loop_data, \%tag_data);
+						
+					}
+					$id++;
+  	  			     }## if tag matches
+			
+			}#eachdata
+ 		}else{ ## tag <10
+			next if ($tag eq $authidtagfield); #we do not want authid to duplicate
+
+			        if ($tag eq "000" || $tag eq "LDR"){
+					my $subfield="@";
+					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
+					my @subfields_data;
+					my $value=$leader->[0] if $leader->[0];
+					$tagdefined{$tag}=1 ;
+					push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id));					
+					$i++;
+					if ($#subfields_data >= 0) {
+						my %tag_data;
+						$tag_data{tag} = $tag;
+						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
+						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
+						$tag_data{subfield_loop} = \@subfields_data;
+                                                			$tag_data{fixedfield} = 1;
+						push (@loop_data, \%tag_data);
+					}
+			         }else{
+	   			 foreach my $control (@$controlfields){
+					my $subfield="@";
+					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
+					next if ($tagslib->{$tag} eq $authidtagfield);
+					my @subfields_data;
+					if ($control->{'tag'} eq $tag){
+						$hiddenrequired=0;
+						$tagdefined{$tag}=1;
+						 if ($built{$tag}==1){$hiddenrequired=1;}
+						my $value=$control->{'content'} ;
+						$definedsubfields{$tag.'@'}=1;
+						push(@subfields_data, &create_input($tag,$subfield,$value,$i,$tabloop,$xmlhash,$authorised_values_sth,$id));					
+						$i++;
+					
+					   	$built{$tag}=1;
+					###hiddenrequired
+					if ($#subfields_data >= 0) {
+						my %tag_data;
+						$tag_data{tag} = $tag;
+						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
+						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
+						$tag_data{subfield_loop} = \@subfields_data;
+						$tag_data{fixedfield} = 1;
+						push (@loop_data, \%tag_data);
+					}
+					$id++;
+					}## tag matches
+	  			 }# each control
+			       }
+   			}##tag >9
+
+
+			##### Any remaining tag
+				my @subfields_data;
+				# now, loop again to add parameter subfield that are not in the MARC::Record
+					foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
+						next if ($tagdefined{$tag} );
+						next if (length $subfield !=1);
+						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
+						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) > 1) ); #check for visibility flag
+						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
+						$tagdefined{$tag.$subfield}=1;
+						$i++;
+					}
+					if ($#subfields_data >= 0) {
+						my %tag_data;
+						$tag_data{tag} = $tag;
+						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
+						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
+						$tag_data{indicator} = $ind1.$ind2 if ($tag>=10);
+						$tag_data{subfield_loop} = \@subfields_data;
+						if ($tag<10) {
+                                                			$tag_data{fixedfield} = 1;
+                                        				}
+
+						push (@loop_data, \%tag_data);
+					}
+
+					
+					if ($addedfield eq $tag) {
+						my %tag_data;
+						my @subfields_data;
+						$id++;
+						$tagdefined{$tag}=1 ;
+						foreach my $subfield (sort( keys %{$tagslib->{$tag}})) {
+						next if (length $subfield !=1);
+						next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
+						next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) >1)  ); #check for visibility flag
+						$addedfield="";	
+						push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
+						$i++;
+							}
+						if ($#subfields_data >= 0) {
+						$tag_data{tag} = $tag;
+						$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
+						$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
+						$tag_data{indicator} = ' ' if ($tag>=10);
+						$tag_data{subfield_loop} = \@subfields_data;
+							if ($tag<10) {
+                                                				$tag_data{fixedfield} = 1;
+                                        					}
+						push (@loop_data, \%tag_data);
+											
+						}
+				
+					}
+				
+	# if breeding is empty
+			} else {
+				my @subfields_data;
+				foreach my $subfield (sort(keys %{$tagslib->{$tag}})) {
+					next if (length $subfield !=1);
+					next if ((substr($tagslib->{$tag}->{$subfield}->{hidden},2,1) >1)  ); #check for visibility flag
+					next if ($tagslib->{$tag}->{$subfield}->{tab} ne $tabloop);
+					push(@subfields_data, &create_input($tag,$subfield,'',$i,$tabloop,$xmlhash,$authorised_values_sth,$id));
+					$i++;
+				}
+				if ($#subfields_data >= 0) {
+					my %tag_data;
+					$tag_data{tag} = $tag;
+					$tag_data{tag_lib} = $tagslib->{$tag}->{lib};
+					$tag_data{repeatable} = $tagslib->{$tag}->{repeatable};
+					$tag_data{indicator} = $indicator;
+					$tag_data{subfield_loop} = \@subfields_data;
+					$tag_data{tagfirstsubfield} = $tag_data{subfield_loop}[0];
+					if ($tag<10) {
+						$tag_data{fixedfield} = 1;
+					}
+					push (@loop_data, \%tag_data);
+				}
+			}
+		$id++;
+	}
+	if ($#loop_data >=0) {
+            my %big_loop_line;
+            $big_loop_line{number}=$tabloop;
+            $big_loop_line{innerloop}=\@loop_data;
+            push @BIG_LOOP,\%big_loop_line;
+            }	
+#		$template->param($tabloop."XX" =>\@loop_data);
+		$template->param(BIG_LOOP => \@BIG_LOOP);
+}## tab loop
+}
+
+
+sub build_hidden_data () {
+    # build hidden data =>
+    # we store everything, even if we show only requested subfields.
+
+    my @loop_data =();
+    my $i=0;
+    foreach my $tag (keys %{$tagslib}) {
+	my $previous_tag = '';
+
+	# loop through each subfield
+	foreach my $subfield (keys %{$tagslib->{$tag}}) {
+	    next if ($subfield eq 'lib');
+	    next if ($subfield eq 'tab');
+	    next if ($subfield eq 'mandatory');
+		next if ($subfield eq 'repeatable');
+	    next if ($tagslib->{$tag}->{$subfield}->{'tab'}  ne "-1");
+	    my %subfield_data;
+	    $subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib};
+	    $subfield_data{marc_mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
+	    $subfield_data{marc_repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
+	    $subfield_data{marc_value}="<input type=\"hidden\"  name=\"field_value[]\">";
+	    push(@loop_data, \%subfield_data);
+	    $i++
+	}
+    }
+}
+
+# ======================== 
+#          MAIN 
+#=========================
+my $input = new CGI;
+my $error = $input->param('error');
+my $authid=$input->param('authid'); # if authid exists, it's a modif, not a new authority.
+my $z3950 = $input->param('z3950');
+my $op = $input->param('op');
+my $nonav = $input->param('nonav');
+my $myindex = $input->param('index');
+my $linkid=$input->param('linkid');
+my $authtypecode = $input->param('authtypecode');
+
+my $dbh = C4::Context->dbh;
+$authtypecode = &AUTHfind_authtypecode($dbh,$authid) if !$authtypecode;
+
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "authorities/authorities.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+$template->param(nonav   => $nonav,index=>$myindex,authtypecode=>$authtypecode,);
+$tagslib = AUTHgettagslib($dbh,1,$authtypecode);
+
+my $xmlhash;
+my $xml;
+$xmlhash = XMLgetauthorityhash($dbh,$authid) if ($authid);
+
+
+my ($oldauthnumtagfield,$oldauthnumtagsubfield);
+my ($oldauthtypetagfield,$oldauthtypetagsubfield);
+$is_a_modif=0;
+if ($authid) {
+	$is_a_modif=1;
+	($oldauthnumtagfield,$oldauthnumtagsubfield) = MARCfind_marc_from_kohafield("authid","authorities");
+	($oldauthtypetagfield,$oldauthtypetagsubfield) = MARCfind_marc_from_kohafield("authtypecode","authorities");
+}
+
+#------------------------------------------------------------------------------------------------------------------------------
+if ($op eq "add") {
+#------------------------------------------------------------------------------------------------------------------------------
+
+	# rebuild
+	my @tags = $input->param('tag');
+	my @subfields = $input->param('subfield');
+	my @values = $input->param('field_value');
+	# build indicator hash.
+	my @ind_tag = $input->param('ind_tag');
+	my @indicator = $input->param('indicator');
+## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
+### This usually happens with data coming from other Z3950 servers
+## Slows the saving process so comment out at your own risk
+eval{
+ $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
+};
+
+ if ($@){
+warn $@;
+ $template->param(error             =>1,xmlerror=>1,);
+goto FINAL;
+  };	# check for a duplicate
+###Authorities need the XML header unlike biblios
+$xml='<?xml version="1.0" encoding="UTF-8"?>'.$xml;
+  my $xmlhash=XML_xml2hash_onerecord($xml);
+	my ($duplicateauthid,$duplicateauthvalue) = C4::AuthoritiesMarc::FindDuplicateauth($xmlhash,$authtypecode) if ($op eq "add") && (!$is_a_modif);
+#warn "duplicate:$duplicateauthid,$duplicateauthvalue";	
+	my $confirm_not_duplicate = $input->param('confirm_not_duplicate');
+	# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
+	if (!$duplicateauthid or $confirm_not_duplicate) {
+# warn "noduplicate";
+		if ($is_a_modif ) {	
+			$authid=AUTHmodauthority($dbh,$authid,$xmlhash,$authtypecode);
+		} else {
+		$authid = AUTHaddauthority($dbh,$xmlhash,'',$authtypecode);
+
+		}
+	# now, redirect to detail page
+		if ($nonav){
+#warn ($myindex,$nonav);
+		print $input->redirect("auth_finder.pl?index=$myindex&nonav=$nonav&authtypecode=$authtypecode");
+		}else{
+		print $input->redirect("detail.pl?nonav=$nonav&authid=$authid");
+		}
+		exit;
+	} else {
+FINAL:
+#warn "duplicate";
+	# it may be a duplicate, warn the user and do nothing
+		build_tabs ($template, $xmlhash, $dbh);
+		build_hidden_data;
+		$template->param(authid =>$authid,
+			duplicateauthid				=> $duplicateauthid,
+			duplicateauthvalue				=> $duplicateauthvalue,
+			 );
+	}
+#------------------------------------------------------------------------------------------------------------------------------
+} elsif ($op eq "addfield") {
+#------------------------------------------------------------------------------------------------------------------------------
+	my $addedfield = $input->param('addfield_field');
+	my @tags = $input->param('tag');
+	my @subfields = $input->param('subfield');
+	my @values = $input->param('field_value');
+	# build indicator hash.
+	my @ind_tag = $input->param('ind_tag');
+	my @indicator = $input->param('indicator');
+	my $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);
+	$xml='<?xml version="1.0" encoding="UTF-8"?>'.$xml;
+	my $xmlhash=XML_xml2hash_onerecord($xml);
+	# adding an empty field
+	build_tabs ($template, $xmlhash, $dbh,$addedfield);
+	build_hidden_data;
+	$template->param(
+		authid                       => $authid,);
+
+} elsif ($op eq "delete") {
+#------------------------------------------------------------------------------------------------------------------------------
+	&AUTHdelauthority($dbh,$authid);
+	if ($nonav){
+	print $input->redirect("auth_finder.pl");
+	}else{
+	print $input->redirect("authorities-home.pl?authid=0");
+	}
+		exit;
+} else {
+if ($op eq "duplicate")
+	{
+		$authid = "";
+	}
+	build_tabs ($template, $xmlhash, $dbh);
+	build_hidden_data;
+	$template->param(oldauthtypetagfield=>$oldauthtypetagfield, oldauthtypetagsubfield=>$oldauthtypetagsubfield,
+		oldauthnumtagfield=>$oldauthnumtagfield, oldauthnumtagsubfield=>$oldauthnumtagsubfield,
+		authid                      => $authid , authtypecode=>$authtypecode,	);
+}
+
+$template->param(
+	authid                       => $authid,
+	authtypecode => $authtypecode,
+	linkid=>$linkid,
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+		advancedMARCEditor => C4::Context->preference("advancedMARCEditor"),
+		);
+
+my $authtypes = getauthtypes;
+my @authtypesloop;
+foreach my $thisauthtype (keys %$authtypes) {
+	my $selected = 1 if $thisauthtype eq $authtypecode;
+	my %row =(value => $thisauthtype,
+				selected => $selected,
+				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+			);
+	push @authtypesloop, \%row;
+}
+
+$template->param(authtypesloop => \@authtypesloop,
+				authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
+				nonav=>$nonav,);
+output_html_with_http_headers $input, $cookie, $template->output;

Index: authorities/blinddetail-biblio-search.pl
===================================================================
RCS file: authorities/blinddetail-biblio-search.pl
diff -N authorities/blinddetail-biblio-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/blinddetail-biblio-search.pl	26 Mar 2007 02:19:21 -0000	1.8.2.2
@@ -0,0 +1,125 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs an authid
+
+
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+use C4::AuthoritiesMarc;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Koha;
+use C4::Biblio;
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+
+my $authid = $query->param('authid');
+my $index=$query->param('index');
+my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
+my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
+my ($dummyfield,$linkidsubfield)=MARCfind_marc_from_kohafield("auth_biblio_link_subf","biblios");
+my $auth_type = AUTHgetauth_type($authtypecode);
+#warn "$authid =$authtypecode ".$auth_type->{auth_tag_to_report};
+
+my $record =XMLgetauthorityhash($dbh,$authid) if $authid;
+# open template
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/blinddetail-biblio-search.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+# fill arrays
+my @loop_data =();
+my $tag;
+my @loop_data =();
+if ($authid) {
+	my @record_subs=XML_readline_withtags($record,"","",$auth_type->{auth_tag_to_report});
+	##Put the result in a hash
+	my %filled_subfield;
+	foreach my $subfield (@record_subs) {
+	$filled_subfield{$subfield->[0]}=$subfield->[1];
+	}
+			my @subfields_data;
+			
+		# loop through each subfield
+		foreach my $subfield ('a'..'z') {			
+			my %subfield_data;
+			$subfield_data{marc_value}=$filled_subfield{$subfield} ;
+			$subfield_data{marc_subfield}=$subfield;
+			$subfield_data{marc_tag}=$auth_type->{auth_tag_to_report};
+			push(@subfields_data, \%subfield_data);
+		}
+		if ($#subfields_data>=0) {
+			my %tag_data;
+			$tag_data{tag}=$auth_type->{auth_tag_to_report}.' -'. $tagslib->{$auth_type->{auth_tag_to_report}}->{lib};
+			$tag_data{subfield} = \@subfields_data;
+			push (@loop_data, \%tag_data);
+		}
+	
+} else {
+# authid is empty => the user want to empty the entry.
+	my @subfields_data;
+	foreach my $subfield ('a'..'z') {
+			my %subfield_data;
+			$subfield_data{marc_value}='';
+			$subfield_data{marc_subfield}=$subfield;
+			push(@subfields_data, \%subfield_data);
+		}
+	foreach my $subfield ('0'..'9') {
+			my %subfield_data;
+			$subfield_data{marc_value}='';
+			$subfield_data{marc_subfield}=$subfield;
+			push(@subfields_data, \%subfield_data);
+		}
+		my %tag_data;
+		$tag_data{subfield} = \@subfields_data;
+		push (@loop_data, \%tag_data);
+}
+
+$template->param("0XX" =>\@loop_data);
+
+
+
+$template->param(authid => $authid?$authid:"", linkidsubfield=>$linkidsubfield,index=>$index,);
+output_html_with_http_headers $query, $cookie, $template->output;
+

Index: authorities/blinddetail-linker.pl
===================================================================
RCS file: authorities/blinddetail-linker.pl
diff -N authorities/blinddetail-linker.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/blinddetail-linker.pl	26 Mar 2007 02:19:21 -0000	1.3.2.2
@@ -0,0 +1,125 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+etail.pl : script to show an authority in MARC format
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs an authid
+
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+use C4::AuthoritiesMarc;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Koha;
+use C4::Biblio;
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+
+my $authid = $query->param('authid');
+my $index = $query->param('index');
+my $authtypecode=$query->param('authtypecode');
+ $authtypecode = &AUTHfind_authtypecode($dbh,$authid) if !$authtypecode;
+my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
+my ($linkidfield,$linkidsubfield)=MARCfind_marc_from_kohafield("linkid","authorities");
+my $auth_type = AUTHgetauth_type($authtypecode);
+
+my $record =XMLgetauthorityhash($dbh,$authid);
+# open template
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/blinddetail-linker.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+# fill arrays
+my @loop_data =();
+my $tag;
+my @loop_data =();
+if ($authid) {
+
+#	foreach my $field ($record->field($auth_type->{auth_tag_to_report})) {
+#			my @subfields_data;
+#			my @subf=$field->subfields;
+#		# loop through each subfield
+#		for my $i (0..$#subf) {
+#			$subf[$i][0] = "@" unless $subf[$i][0];
+#			my %subfield_data;
+#			$subfield_data{marc_value}=$subf[$i][1];
+#			$subfield_data{marc_subfield}=$subf[$i][0];
+#			$subfield_data{marc_tag}=$field->tag();
+#			push(@subfields_data, \%subfield_data);
+#		}
+#		if ($#subfields_data>=0) {
+#			my %tag_data;
+#			$tag_data{tag}=$field->tag().' -'. $tagslib->{$field->tag()}->{lib};
+#			$tag_data{subfield} = \@subfields_data;
+#			push (@loop_data, \%tag_data);
+#		}
+#	}
+} else {
+# authid is empty => the user want to empty the entry.
+	my @subfields_data;
+	foreach my $subfield ('0'..'9') {
+			my %subfield_data;
+			$subfield_data{marc_value}='';
+			$subfield_data{marc_subfield}=$subfield;
+			push(@subfields_data, \%subfield_data);
+		}
+	foreach my $subfield ('a'..'z') {
+			my %subfield_data;
+			$subfield_data{marc_value}='';
+			$subfield_data{marc_subfield}=$subfield;
+			push(@subfields_data, \%subfield_data);
+		}
+	
+	if ($#subfields_data>=0) {
+		my %tag_data;
+		$tag_data{subfield} = \@subfields_data;
+		push (@loop_data, \%tag_data);
+	}
+}
+
+$template->param("0XX" =>\@loop_data);
+
+
+
+$template->param(authid => $authid?$authid:"",linkidsubfield=>$linkidsubfield, linkidfield=>$linkidfield,index => $index);
+output_html_with_http_headers $query, $cookie, $template->output;
+

Index: authorities/detail-biblio-search.pl
===================================================================
RCS file: authorities/detail-biblio-search.pl
diff -N authorities/detail-biblio-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/detail-biblio-search.pl	26 Mar 2007 02:19:21 -0000	1.3.2.2
@@ -0,0 +1,201 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+etail.pl : script to show an authority in MARC format
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs an authid
+
+It shows the authority in a (nice) MARC format depending on authority MARC
+parameters tables.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+use C4::AuthoritiesMarc;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Koha;
+
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+
+my $authid = $query->param('authid');
+my $index = $query->param('index');
+my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
+my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
+
+my $record =XMLgetauthorityhash($dbh,$authid);
+# open template
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/detail-biblio-search.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+# fill arrays
+my @loop_data =();
+my $tag;
+if ($xmlhash){
+# loop through each tab 0 through 9
+my $author=$xmlhash->{'datafield'};
+my $controlfields=$xmlhash->{'controlfield'};
+my $leader=$xmlhash->{'leader'};
+for (my $tabloop = 0; $tabloop<10;$tabloop++) {
+# loop through each tag
+	my @loop_data =();
+	my @subfields_data;
+
+	# deal with leader 
+	unless (($tagslib->{'000'}->{'@'}->{tab}  ne $tabloop)  || (substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0)) {
+		
+		my %subfield_data;
+		$subfield_data{marc_value}=$leader->[0] ;
+		push(@subfields_data, \%subfield_data);
+		my %tag_data;
+		$tag_data{tag}='000 -'. $tagslib->{'000'}->{lib};
+		my @tmp = @subfields_data;
+		$tag_data{subfield} = \@tmp;
+		push (@loop_data, \%tag_data);
+		undef @subfields_data;
+	}
+	##Controlfields
+		
+		 foreach my $control (@$controlfields){
+			my %subfield_data;
+			my %tag_data;
+			next if ($tagslib->{$control->{'tag'}}->{'@'}->{tab}  ne $tabloop);
+			next if (substr($tagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);			
+			$subfield_data{marc_value}=$control->{'content'} ;
+			push(@subfields_data, \%subfield_data);
+				if (C4::Context->preference('hide_marc')) {
+					$tag_data{tag}=$tagslib->{$control->{'tag'}}->{lib};
+				} else {
+					$tag_data{tag}=$control->{'tag'}.' -'. $tagslib->{$control->{'tag'}}->{lib};
+				}			
+			my @tmp = @subfields_data;
+			$tag_data{subfield} = \@tmp;
+			push (@loop_data, \%tag_data);
+			undef @subfields_data;
+		}
+	my $previoustag;
+	my %datatags;
+	my $i=0;
+	foreach my $data (@$author){
+		$datatags{$i++}=$data->{'tag'};
+		 foreach my $subfield ( $data->{'subfield'}){
+		     foreach my $code ( @$subfield){
+			next if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne $tabloop);
+			next if (substr($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
+			my %subfield_data;
+			my $value=$code->{'content'};
+			$subfield_data{marc_lib}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
+			$subfield_data{link}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{link};
+			if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{isurl}) {
+				$subfield_data{marc_value}="<a href=\"$value]\">$value</a>";
+			} else {
+			$subfield_data{marc_value}=get_authorised_value_desc($data->{'tag'}, $code->{'code'}, $value, '', $dbh);
+			}
+			$subfield_data{marc_subfield}=$code->{'code'};
+			$subfield_data{marc_tag}=$data->{'tag'};
+			push(@subfields_data, \%subfield_data);
+		     }### $code
+		
+		
+		if ($#subfields_data>=0) {
+			my %tag_data;
+			if (($datatags{$i} eq $datatags{$i-1}) && (C4::Context->preference('LabelMARCView') eq 'economical')) {
+				$tag_data{tag}="";
+			} else {
+				if (C4::Context->preference('hide_marc')) {
+					$tag_data{tag}=$tagslib->{$data->{'tag'}}->{lib};
+				} else {
+					$tag_data{tag}=$data->{'tag'}.' -'. $tagslib->{$data->{'tag'}}->{lib};
+				}
+			}
+			my @tmp = @subfields_data;
+			$tag_data{subfield} = \@tmp;
+			push (@loop_data, \%tag_data);
+			undef @subfields_data;
+		}
+	      }### each $subfield
+	}
+
+	$template->param($tabloop."XX" =>\@loop_data);
+}
+
+my $authtypes = getauthtypes;
+my @authtypesloop;
+foreach my $thisauthtype (keys %$authtypes) {
+	my $selected = 1 if $thisauthtype eq $authtypecode;
+	my %row =(value => $thisauthtype,
+				selected => $selected,
+				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+			);
+	push @authtypesloop, \%row;
+}
+
+$template->param(authid => $authid,
+				authtypesloop => \@authtypesloop, index => $index);
+}
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub get_authorised_value_desc ($$$$$) {
+   my($tag, $subfield, $value, $framework, $dbh) = @_;
+
+   #---- branch
+    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+       return getbranchname($value);
+    }
+
+   #---- itemtypes
+   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
+       return ItemType($value);
+    }
+
+   #---- "true" authorized value
+   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
+
+   if ($category ne "") {
+       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
+       $sth->execute($category, $value);
+       my $data = $sth->fetchrow_hashref;
+       return $data->{'lib'};
+   } else {
+       return $value; # if nothing is found return the original value
+   }
+}

Index: authorities/detail.pl
===================================================================
RCS file: authorities/detail.pl
diff -N authorities/detail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/detail.pl	26 Mar 2007 02:19:21 -0000	1.5.2.2
@@ -0,0 +1,210 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+etail.pl : script to show an authority in MARC format
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs an authid
+
+It shows the authority in a (nice) MARC format depending on authority MARC
+parameters tables.
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+use C4::AuthoritiesMarc;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Koha;
+
+
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+my $nonav = $query->param('nonav');
+my $authid = $query->param('authid');
+my $authtypecode = &AUTHfind_authtypecode($dbh,$authid);
+my $tagslib = &AUTHgettagslib($dbh,1,$authtypecode);
+
+my $xmlhash =XMLgetauthorityhash($dbh,$authid);
+
+my ($count) = AUTHcount_usage($authid);
+
+#chop;
+
+# open template
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "authorities/detail.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+
+# fill arrays
+my @loop_data =();
+my $tag;
+if ($xmlhash){
+# loop through each tab 0 through 9
+my $author=$xmlhash->{'datafield'};
+my $controlfields=$xmlhash->{'controlfield'};
+my $leader=$xmlhash->{'leader'};
+for (my $tabloop = 0; $tabloop<10;$tabloop++) {
+# loop through each tag
+	my @loop_data =();
+	my @subfields_data;
+
+	# deal with leader 
+	unless (($tagslib->{'000'}->{'@'}->{tab}  ne $tabloop)  || (substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0)) {
+		
+		my %subfield_data;
+		$subfield_data{marc_value}=$leader->[0] ;
+		push(@subfields_data, \%subfield_data);
+		my %tag_data;
+		$tag_data{tag}='000 -'. $tagslib->{'000'}->{lib};
+		my @tmp = @subfields_data;
+		$tag_data{subfield} = \@tmp;
+		push (@loop_data, \%tag_data);
+		undef @subfields_data;
+	}
+	##Controlfields
+		
+		 foreach my $control (@$controlfields){
+			my %subfield_data;
+			my %tag_data;
+			next if ($tagslib->{$control->{'tag'}}->{'@'}->{tab}  ne $tabloop);
+			next if (substr($tagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);			
+			$subfield_data{marc_value}=$control->{'content'} ;
+			push(@subfields_data, \%subfield_data);
+				if (C4::Context->preference('hide_marc')) {
+					$tag_data{tag}=$tagslib->{$control->{'tag'}}->{lib};
+				} else {
+					$tag_data{tag}=$control->{'tag'}.' -'. $tagslib->{$control->{'tag'}}->{lib};
+				}			
+			my @tmp = @subfields_data;
+			$tag_data{subfield} = \@tmp;
+			push (@loop_data, \%tag_data);
+			undef @subfields_data;
+		}
+	my $previoustag;
+	my %datatags;
+	my $i=0;
+	foreach my $data (@$author){
+		$datatags{$i++}=$data->{'tag'};
+		 foreach my $subfield ( $data->{'subfield'}){
+		     foreach my $code ( @$subfield){
+			next if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne $tabloop);
+			next if (substr($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
+			my %subfield_data;
+			my $value=$code->{'content'};
+			$subfield_data{marc_lib}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
+			$subfield_data{link}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{link};
+			if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{isurl}) {
+				$subfield_data{marc_value}="<a href=\"$value]\">$value</a>";
+			} else {
+			$subfield_data{marc_value}=get_authorised_value_desc($data->{'tag'}, $code->{'code'}, $value, '', $dbh);
+			}
+			$subfield_data{marc_subfield}=$code->{'code'};
+			$subfield_data{marc_tag}=$data->{'tag'};
+			push(@subfields_data, \%subfield_data);
+		     }### $code
+		
+		
+		if ($#subfields_data>=0) {
+			my %tag_data;
+			if (($datatags{$i} eq $datatags{$i-1}) && (C4::Context->preference('LabelMARCView') eq 'economical')) {
+				$tag_data{tag}="";
+			} else {
+				if (C4::Context->preference('hide_marc')) {
+					$tag_data{tag}=$tagslib->{$data->{'tag'}}->{lib};
+				} else {
+					$tag_data{tag}=$data->{'tag'}.' -'. $tagslib->{$data->{'tag'}}->{lib};
+				}
+			}
+			my @tmp = @subfields_data;
+			$tag_data{subfield} = \@tmp;
+			push (@loop_data, \%tag_data);
+			undef @subfields_data;
+		}
+	      }### each $subfield
+	}
+
+	$template->param($tabloop."XX" =>\@loop_data);
+}
+my $authtypes = getauthtypes;
+my @authtypesloop;
+foreach my $thisauthtype (keys %$authtypes) {
+	my $selected = 1 if $thisauthtype eq $authtypecode;
+	my %row =(value => $thisauthtype,
+				selected => $selected,
+				authtypetext => $authtypes->{$thisauthtype}{'authtypetext'},
+			);
+	push @authtypesloop, \%row;
+}
+
+$template->param(authid => $authid,
+				count => $count,
+				authtypetext => $authtypes->{$authtypecode}{'authtypetext'},
+				authtypecode => $authtypes->{$authtypecode}{'authtypecode'},
+				authtypesloop => \@authtypesloop);
+$template->param(nonav =>$nonav);
+}### if $xmlash exist
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub get_authorised_value_desc ($$$$$) {
+   my($tag, $subfield, $value, $framework, $dbh) = @_;
+
+   #---- branch
+    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+       return getbranchname($value);
+    }
+
+   #---- itemtypes
+   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
+       return ItemType($value);
+    }
+
+   #---- "true" authorized value
+   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
+
+   if ($category ne "") {
+       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
+       $sth->execute($category, $value);
+       my $data = $sth->fetchrow_hashref;
+       return $data->{'lib'};
+   } else {
+       return $value; # if nothing is found return the original value
+   }
+}
\ No newline at end of file

Index: authorities/merge_authority.pl
===================================================================
RCS file: authorities/merge_authority.pl
diff -N authorities/merge_authority.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ authorities/merge_authority.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+
+
+use strict;
+
+# Koha modules used
+use C4::Context;
+use C4::Biblio;
+use C4::AuthoritiesMarc; ###merge routine moved to there
+use Time::HiRes qw(gettimeofday);
+
+use Getopt::Long;
+my ($version, $verbose, $mergefrom,$mergeto,$noconfirm,$batch);
+GetOptions(
+    'h' => \$version,
+    'f:s' => \$mergefrom,
+    't:s' => \$mergeto,
+    'v' => \$verbose,
+	'n' => \$noconfirm,
+	'b' => \$batch,
+);
+
+if ($version || ($mergefrom eq '' && !$batch)) {
+	print <<EOF
+Script to merge an authority into another
+parameters :
+\th : this version/help screen
+\tv : verbose mode (show many things on screen)
+\tf : the authority number to merge (the one that can be deleted after the merge).
+\tt : the authority number where to merge
+\tb : batch merging.
+\tn : don't ask for confirmation (useful for batch mergings, should not be used on command line)
+
+All biblios with the authority in -t will be modified to be "connected" to authority -f
+SAMPLE :
+./merge_authority.pl -f 2457 -t 531
+
+Before doing anything, the script will show both authorities and ask for confirmation. Of course, you can merge only 2 authorities of the same kind.
+
+BATCH MODE :
+The batch mode is done to report modifs. On every authority modif, a file is generated in KOHAROOT/localfile/modified_authorities/ If this script is called with -b, it parses the directory, finding & updating biblios using the modified authority.
+
+./merge_authority.pl -b
+
+(don't forget to export PERL5LIB and KOHA_CONF. Here is my cron job :
+SHELL=/bin/bash
+*/5 * * * *       export PERL5LIB=/home/httpd/koha;export KOHA_CONF=/etc/mykoha.conf;/home/httpd/koha/scripts/misc/merge_authority.pl -b -n
+
+EOF
+;#
+exit;
+}#
+
+my $dbh = C4::Context->dbh;
+# my @subf = $subfields =~ /(##\d\d\d##.)/g;
+
+$|=1; # flushes output
+my $starttime = gettimeofday;
+if ($batch) {
+	my @authlist;
+	my $cgidir = C4::Context->intranetdir ."/cgi-bin";
+	unless (opendir(DIR, "$cgidir/localfile/modified_authorities")) {
+		$cgidir = C4::Context->intranetdir;
+		opendir(DIR, "$cgidir/localfile/modified_authorities") || die "can't opendir $cgidir/localfile/modified_authorities: $!";
+	} 
+	while (my $authid = readdir(DIR)) {
+		if ($authid =~ /\.authid$/) {
+			$authid =~ s/\.authid$//;
+			print "managing $authid\n" if $verbose;
+			my $MARCauth = XMLgetauthorityhash($dbh,$authid);
+			&merge($dbh,$authid,$MARCauth,$authid,$MARCauth) if ($MARCauth);
+			unlink $cgidir.'/localfile/modified_authorities/'.$authid.'.authid';
+		}
+	}
+	closedir DIR;
+} else {
+	my $MARCfrom = XMLgetauthorityhash($dbh,$mergefrom);
+	my $MARCto = XMLgetauthorityhash($dbh,$mergeto);
+	&merge($dbh,$mergefrom,$MARCfrom,$mergeto,$MARCto);
+}
+my $timeneeded = gettimeofday - $starttime;
+print "Done in $timeneeded seconds" unless $noconfirm;
+

Index: barcodes/barcodes.pl
===================================================================
RCS file: barcodes/barcodes.pl
diff -N barcodes/barcodes.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ barcodes/barcodes.pl	26 Mar 2007 02:19:21 -0000	1.5.4.2
@@ -0,0 +1,119 @@
+#!/usr/bin/perl
+
+# script to generate items barcodes-complete rewrite
+# rewritten 24/08/05 by T.Garip
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+
+use C4::Context;
+use C4::Barcodes::PrinterConfig;
+use C4::Barcodes::BarcodeConfig;
+
+
+
+
+
+
+my $input = new CGI;
+my $labelsconfig=$input->param('labelsconfig');
+
+# It creates a list of posible intervals to choose codes to generate
+my %list = ('continuous' => 'Existing Series', 'individuals' => 'Singles','continuous2' => 'New series' );
+my @listValues = keys(%list);
+my $rangeType = CGI::scrolling_list(-name => 'rangeType',
+                              		-values => \@listValues,
+			                        -labels => \%list,
+			                        -size => 1,
+					-default => ['continuous2'],
+			                        -multiple => 0,
+					-id => "rangeType",
+					-onChange =>"changeRange(this)");
+
+my $op=$input->param('op');
+
+
+my $filenameConf;
+if ($labelsconfig){
+ $filenameConf = C4::Context->config('includes')."labelConfig/".$labelsconfig.".conf";
+}else{
+ $filenameConf = C4::Context->config('includes')."labelConfig/itemsLabelConfig.conf";
+$labelsconfig="itemsLabelConfig";
+}
+
+my %labelConfig = C4::Barcodes::PrinterConfig::loadConfFromFile($filenameConf);
+# Defines type of page to use in the printer process
+my @labelTable = C4::Barcodes::PrinterConfig::labelsPage($labelConfig{'rows'}, $labelConfig{'columns'});
+
+# Get the template to use
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "barcodes/barcodes.tmpl",
+			                 type => "intranet",
+			                 query => $input,
+			                 authnotrequired => 0,
+			                 flagsrequired => {parameters => 1},
+					         debug => 1,
+			               });
+
+# Replace the template values with the real ones
+$template->param(SCRIPT_NAME => "/cgi-bin/koha/barcodes/barcode.pl");
+$template->param(PAGES => $labelConfig{'pageType'});
+$template->param(RANGE_TYPE => $rangeType);
+$template->param(LABEL_TABLE => \@labelTable);
+$template->param(COL_SPAN => $labelConfig{'columns'});
+$template->param($labelsconfig => $labelsconfig);
+$template->param(labelsconfig => $labelsconfig);
+#warn "$labelsconfig";
+if ($input->param('error')) {
+	$template->param(ERROR => 1);
+} else {
+	$template->param(ERROR => 0);
+}
+
+my $cgi = new CGI;
+my $from = $cgi->param('from');
+my $to = $cgi->param('to');
+my $individualCodes = $cgi->param('individualCodes');
+my $rangeType = $cgi->param('rangeType');
+my $pageType = $cgi->param('pages');
+my $label = $cgi->param('label');
+my $text_under_label = $cgi->param('text_under_label');
+if (($op =="Generate Barcodes")&&($op)){
+
+# Load the config file.
+my $filenameConf =C4::Context->config('includes')."labelConfig/".$labelsconfig.".conf";
+my %labelConfig =C4::Barcodes::PrinterConfig::loadConfFromFile($filenameConf);
+
+# Takes inventary codes from database and if they are between
+# the interval specify by parameters, it generates the correspond barcodes
+my ($tmpFileName,$error)=C4::Barcodes::BarcodeConfig::barcodesGenerator($from, $to, $rangeType, $individualCodes,$text_under_label,$label,%labelConfig);
+$template->param(tmpFileName=>$tmpFileName,ERROR=>$error);
+}
+# Shows the template with the real values replaced
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
+
+
+

Index: barcodes/cardConfig.pl
===================================================================
RCS file: barcodes/cardConfig.pl
diff -N barcodes/cardConfig.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ barcodes/cardConfig.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,115 @@
+#!/usr/bin/perl
+
+# script to set the labels configuration for the printer process.
+# written 07/04
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+
+use strict;
+
+use CGI;
+
+use C4::Context;
+use C4::Output;
+use C4::Auth;
+use PDF::API2;
+use PDF::API2::Page;
+use PDF::API2::PDF::Utils;
+use C4::Interface::CGI::Output;
+
+# This function returns the path to deal with the correct files, considering
+# templates set and language.
+sub getPath {
+	my $type = shift @_;
+	my $templatesSet = C4::Context->preference('template');
+	my $lang = C4::Context->preference('opaclanguages');
+	if ($type eq "intranet") {
+		return "$ENV{'DOCUMENT_ROOT'}/intranet-tmpl/$templatesSet/$lang";
+	} else {
+		return "$ENV{'DOCUMENT_ROOT'}/opac-tmpl/$templatesSet/$lang";
+	}
+}
+
+# Load a configuration file.
+sub loadConfFromFile {
+  my $fileName = shift @_;
+	my %keyValues;
+	open FILE, "<$fileName";
+	while (<FILE>) {
+		chomp;
+		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
+			$keyValues{$1} = $2;
+		}
+	}
+	close FILE;
+	return %keyValues;
+}
+
+# Save settings to a configuration file.
+sub saveConfToFile {
+	my $fileName = shift @_;
+	my %keyValues = %{shift @_};
+	my $i;
+	open FILE, ">$fileName";			
+	my $i;
+	foreach $i (keys(%keyValues)) {
+    print FILE $i." = ".$keyValues{$i}."\n";
+	}
+	close FILE;
+}
+
+# Creates a CGI object and take his parameters
+my $input = new CGI;
+
+if ($input->param('saveSettings')) {
+	my $labelConf = &getPath("intranet")."/includes/labelConfig/cardsConfig.conf";
+	my %newConfiguration = (pageType => $input->param('pageType'), 	
+							columns => $input->param('columns'), 		
+							rows => $input->param('rows'), 	
+							systemDpi => $input->param('systemDpi'), 	
+							labelWidth => $input->param('labelWidth'), 	
+							labelHeigth => $input->param('labelHeigth'),	
+							marginBottom => $input->param('marginBottom'), 	
+							marginLeft => $input->param('marginLeft')); 	
+	saveConfToFile($labelConf, \%newConfiguration);
+	print $input->redirect('/cgi-bin/koha/barcodes/cbarcodes.pl')
+}
+
+# Get the template to use
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "barcodes/printerConfig.tmpl",
+			                 type => "intranet",
+			                 query => $input,
+			                 authnotrequired => 0,
+			                 flagsrequired => {editcatalogue => 1},
+					         debug => 1,
+			               });
+
+my $filenameConf = &getPath("intranet")."/includes/labelConfig/cardsConfig.conf";
+my %labelConfig = &loadConfFromFile($filenameConf);
+
+$template->param(COLUMNS => $labelConfig{'columns'});
+$template->param(ROWS => $labelConfig{'rows'});
+$template->param(SYSTEM_DPI => $labelConfig{'systemDpi'});
+$template->param(LABEL_WIDTH => $labelConfig{'labelWidth'});
+$template->param(LABEL_HEIGTH => $labelConfig{'labelHeigth'});
+$template->param(MARGIN_TOP => $labelConfig{'marginBottom'});
+$template->param(MARGIN_LEFT => $labelConfig{'marginLeft'});
+$template->param(SCRIPT_NAME => '/cgi-bin/koha/barcodes/cardConfig.pl');
+$template->param("$labelConfig{'pageType'}" => $labelConfig{'pageType'});
+output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: barcodes/cbarcodes.pl
===================================================================
RCS file: barcodes/cbarcodes.pl
diff -N barcodes/cbarcodes.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ barcodes/cbarcodes.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,112 @@
+#!/usr/bin/perl
+
+# script to generate members barcodes-complete rewrite
+# rewritten 24/08/05 by T.Garip
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Barcodes::PrinterConfig;
+use C4::Barcodes::MemberCardConfig;
+
+
+
+
+
+
+my $input = new CGI;
+# Defines type of page to use in the printer process
+my $labelsconfig=$input->param('labelsconfig');
+$labelsconfig="cardsConfig" unless $labelsconfig;
+
+my $filenameConf =  C4::Context->config('includes')."labelConfig/$labelsconfig.conf";
+my %labelConfig = C4::Barcodes::PrinterConfig::loadConfFromFile($filenameConf);
+my @labelTable = C4::Barcodes::PrinterConfig::labelsPage($labelConfig{'rows'}, $labelConfig{'columns'});
+
+# It creates a list of posible intervals to choose codes to generate
+my %list = ('continuous' => 'Continuos', 'individuals' => 'Single');
+my @listValues = keys(%list);
+my $rangeType = CGI::scrolling_list(-name => 'rangeType',
+                              		-values => \@listValues,
+			                        -labels => \%list,
+			                        -size => 1,
+									-default => ['individuals'],
+			                        -multiple => 0,
+									-id => "rangeType",
+									-onChange => "changeRange(this)");
+# It creates a list of posible standard codifications. First checks if the user has just added a new code.
+
+my $op=$input->param('op');
+
+
+
+
+# Get the template to use
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "barcodes/cbarcodes.tmpl",
+			                 type => "intranet",
+			                 query => $input,
+			                 authnotrequired => 0,
+			                 flagsrequired => {circulate => 1},
+					         debug => 1,
+			               });
+
+# Replace the template values with the real ones
+$template->param(SCRIPT_NAME =>"/cgi-bin/koha/barcodes/cbarcode.pl");
+$template->param(PAGES => $labelConfig{'pageType'});
+$template->param(RANGE_TYPE => $rangeType);
+$template->param(LABEL_TABLE => \@labelTable);
+$template->param(COL_SPAN => $labelConfig{'columns'});
+$template->param(labelsconfig => $labelsconfig);
+if ($input->param('error')) {
+	$template->param(ERROR => 1);
+} else {
+	$template->param(ERROR => 0);
+}
+
+my $cgi = new CGI;
+my $from = $cgi->param('from');
+my $to = $cgi->param('to');
+my $individualCodes = $cgi->param('individualCodes');
+my $rangeType = $cgi->param('rangeType');
+my $pageType = $cgi->param('pages');
+my $label = $cgi->param('label');
+my $text_under_label = $cgi->param('text_under_label');
+if (($op =="Generate Barcodes")&&($op)){
+
+
+
+# Load the config file.
+my $filenameConf = C4::Context->config('includes')."labelConfig/cardsConfig.conf";
+my %labelConfig = C4::Barcodes::PrinterConfig::loadConfFromFile($filenameConf);
+
+
+
+my ($tmpFileName,$error)=C4::Barcodes::MemberCardConfig::barcodesGenerator($from, $to, $rangeType, $individualCodes,$text_under_label,$label,%labelConfig);
+$template->param(tmpFileName=>$tmpFileName,ERROR=>$error);
+}
+# Shows the template with the real values replaced
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
+

Index: barcodes/pdfViewer.pl
===================================================================
RCS file: barcodes/pdfViewer.pl
diff -N barcodes/pdfViewer.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ barcodes/pdfViewer.pl	26 Mar 2007 02:19:21 -0000	1.3.4.2
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+# script to show a PDF file.
+# written 07/04
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+require Exporter;
+
+use strict;
+use C4::Context;
+use CGI;
+
+
+# This script take a pdf filename as a parameter and output it to the browser.
+my $cgi = new CGI;
+my $opachtdocs=C4::Context->config('intrahtdocs');
+my $tmpFileName = $cgi->param('tmpFileName');
+print $cgi->header(-type => 'application/pdf'),
+      $cgi->start_html(-title=>"Codify to PDF");
+open fh, "<$opachtdocs.$tmpFileName" || die "no file";
+while (<fh>) {
+ print;
+}
+print $cgi->end_html();
\ No newline at end of file

Index: barcodes/printerConfig.pl
===================================================================
RCS file: barcodes/printerConfig.pl
diff -N barcodes/printerConfig.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ barcodes/printerConfig.pl	26 Mar 2007 02:19:21 -0000	1.3.4.2
@@ -0,0 +1,81 @@
+#!/usr/bin/perl
+
+# script to set the labels configuration for the printer process.
+# written 07/04
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+require Exporter;
+
+use strict;
+
+use CGI;
+
+use C4::Context;
+use C4::Output;
+use C4::Auth;
+use PDF::API2;
+use PDF::API2::Page;
+use PDF::API2::Util;
+use C4::Interface::CGI::Output;
+use C4::Barcodes::PrinterConfig;
+
+# Creates a CGI object and take its parameters
+my $input = new CGI;
+my $labelsconfig=$input->param('labelsconfig');
+if ($input->param('saveSettings')) {
+	my $labelConf = C4::Context->config("includes")."labelConfig/".$labelsconfig.".conf";
+my $script= $input->param('SCRIPT_NAME');
+	my %newConfiguration = (pageType => $input->param('pageType'), 	
+							columns => $input->param('columns'), 		
+							rows => $input->param('rows'), 	
+							systemDpi => $input->param('systemDpi'), 	
+							labelWidth => $input->param('labelWidth'), 	
+							labelHeigth => $input->param('labelHeigth'),	
+							marginBottom => $input->param('marginBottom'), 	
+							marginLeft => $input->param('marginLeft')); 	
+	C4::Barcodes::PrinterConfig::saveConfToFile($labelConf, \%newConfiguration);
+	print $input->redirect('/cgi-bin/koha/barcodes/'.$script.'?labelsconfig='.$labelsconfig)
+}
+
+# Get the template to use
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "barcodes/printerConfig.tmpl",
+			                 type => "intranet",
+			                 query => $input,
+			                 authnotrequired => 0,
+			                 flagsrequired => {parameters => 1},
+					         debug => 1,
+			               });
+
+my $filenameConf = C4::Context->config("includes")."labelConfig/".$labelsconfig.".conf";
+my %labelConfig = C4::Barcodes::PrinterConfig::loadConfFromFile($filenameConf);
+$template->param(labelsconfig =>$labelsconfig);
+$template->param(COLUMNS => $labelConfig{'columns'});
+$template->param(ROWS => $labelConfig{'rows'});
+$template->param(SYSTEM_DPI => $labelConfig{'systemDpi'});
+$template->param(LABEL_WIDTH => $labelConfig{'labelWidth'});
+$template->param(LABEL_HEIGTH => $labelConfig{'labelHeigth'});
+$template->param(MARGIN_TOP => $labelConfig{'marginBottom'});
+$template->param(MARGIN_LEFT => $labelConfig{'marginLeft'});
+$template->param(SCRIPT_NAME => $input->param('SCRIPT_NAME'));
+$template->param("$labelConfig{'pageType'}" => 1);
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+		);
+output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: bookshelves/add-biblios-to-shelves.pl
===================================================================
RCS file: bookshelves/add-biblios-to-shelves.pl
diff -N bookshelves/add-biblios-to-shelves.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bookshelves/add-biblios-to-shelves.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,50 @@
+#!/usr/bin/perl
+
+#virtual shelves management, add a set of biblionumber to a set of shelves
+# written 06/05
+# Castañeda, Carlos Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+
+use C4::Output;
+use C4::BookShelves;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+
+my $cgi = new CGI;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "bookshelves/shelves.tmpl",
+							query => $cgi,
+							type => "intranet",
+							authnotrequired => 0,
+							flagsrequired => {cataloging => 1},
+						});
+
+my @shelfnumber = $cgi->param('shelfnumber');
+my @biblios		= split /,/, $cgi->param('biblios');
+
+foreach my $shelfnumber (@shelfnumber) {
+	foreach my $biblionumber (@biblios) {
+	 &AddToShelfFromBiblio($biblionumber, $shelfnumber);
+	}
+}
+	
+print $cgi->redirect($cgi->param('return_url'));
+

Index: bookshelves/shelves.pl
===================================================================
RCS file: bookshelves/shelves.pl
diff -N bookshelves/shelves.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bookshelves/shelves.pl	26 Mar 2007 02:19:21 -0000	1.10.2.2
@@ -0,0 +1,320 @@
+#!/usr/bin/perl
+
+#
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+    shelves.pl
+
+=head1 DESCRIPTION
+
+    this script is used to script to provide bookshelf management
+
+=head1 CGI PARAMETERS
+
+=over 4
+
+=item C<modifyshelfcontents>
+
+    if this script has to modify the shelve content.
+
+=item C<shelfnumber>
+
+    to know on which shelve this script has to work.
+
+=item C<addbarcode>
+
+=item C<op>
+
+    op can be equals to:
+        * modifsave to save change on the shelves
+        * modif to change the template to allow to modify the shelves.
+
+=item C<viewshelf>
+
+    to load the template with 'viewshelves param' which allow to read the shelves information.
+
+=item C<shelves>
+
+    if equals to 1. then call the function shelves which add
+    or delete a shelf.
+
+=item C<addshelf>
+
+    if the param shelves = 1 then addshelf must be equals to the name of the shelf to add.
+
+=back
+
+=cut
+
+use strict;
+use CGI;
+use C4::Output;
+use C4::BookShelves;
+use C4::Circulation::Circ2;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+
+my $query = new CGI;
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "bookshelves/shelves.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { catalogue => 1 },
+    }
+);
+   my $class=2;
+$class=1 if C4::Context->userenv->{flags}==1;
+if ( $query->param('modifyshelfcontents') ) {
+    my $shelfnumber = $query->param('viewshelf');
+    my $barcode     = $query->param('addbarcode');
+    my $item = getiteminformation( undef,undef ,$barcode );
+    if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ) ) {
+        AddToShelf( $item->{'biblionumber'}, $shelfnumber );
+        foreach ( $query->param ) {
+            if (/REM-(\d*)/) {
+                my $biblionumber = $1;
+                DelFromShelf( $biblionumber, $shelfnumber );
+            }
+        }
+    }
+}
+
+# getting the Shelves list
+
+my $shelflist = GetShelves( $loggedinuser, $class );
+$template->param( { loggedinuser => $loggedinuser } );
+my $op = $query->param('op');
+
+SWITCH: {
+    if ( $op && ( $op eq 'modifsave' ) ) {
+        ModShelf(
+            $query->param('shelfnumber'), $query->param('shelfname'),
+            $loggedinuser,                $query->param('category')
+        );
+        last SWITCH;
+    }
+    if ( $op && ( $op eq 'modif' ) ) {
+        my ( $shelfnumber, $shelfname, $owner, $category ) =
+          GetShelf( $query->param('shelf') );
+        $template->param(
+            edit                => 1,
+            shelfnumber         => $shelfnumber,
+            shelfname           => $shelfname,
+            "category$category" => 1,
+        );
+
+        #         editshelf($query->param('shelf'));
+        last SWITCH;
+    }
+    if ( $query->param('viewshelf') ) {
+        #check that the user can view the shelf
+        my $shelfnumber = $query->param('viewshelf');
+        if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) {
+            my $items = GetShelfContents($shelfnumber);
+            $template->param(
+                shelfname   => $shelflist->{$shelfnumber}->{'shelfname'},
+                shelfnumber => $shelfnumber,
+                viewshelf   => $query->param('viewshelf'),
+                manageshelf => &ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ),
+                itemsloop   => $items,
+            );
+        }
+        last SWITCH;
+    }
+    if ( $query->param('shelves') ) {
+        if ( my $newshelf = $query->param('addshelf') ) {
+            my $shelfnumber = AddShelf(
+                $newshelf,
+                $query->param('owner'),
+                $query->param('category')
+            );
+
+            if ( $shelfnumber == -1 ) {    #shelf already exists.
+                $template->param(
+                    {
+                        shelfnumber => $shelfnumber,
+                        already     => 1
+                    }
+                );
+            }
+    }
+    my @paramsloop;
+    foreach ( $query->param() ) {
+        my %line;
+        if (/DEL-(\d+)/) {
+            my $delshelf = $1;
+            my ( $status, $count ) = DelShelf($delshelf);
+            if ($status) {
+                $line{'status'} = $status;
+                $line{'count'}  = $count;
+            }
+        }
+
+        #if the shelf is not deleted, %line points on null
+        push( @paramsloop, \%line );
+    }
+    $template->param( paramsloop => \@paramsloop );
+ 
+my $shelflist = GetShelves( $loggedinuser, $class );
+    my $color = '';
+    my @shelvesloop;
+    foreach my $element ( sort keys %$shelflist ) {
+        my %line;
+        ( $color eq 1 ) ? ( $color = 0 ) : ( $color = 1 );
+        $line{'toggle'}         = $color;
+        $line{'shelf'}          = $element;
+        $line{'shelfname'}      = $shelflist->{$element}->{'shelfname'};
+        $line{'shelfbookcount'} = $shelflist->{$element}->{'count'};
+        push( @shelvesloop, \%line );
+    }
+    $template->param(
+        shelvesloop => \@shelvesloop,
+        shelves     => 1,
+    );
+        last SWITCH;
+    }
+}
+
+($shelflist) =
+  GetShelves( $loggedinuser, $class )
+  ;    # rebuild shelflist in case a shelf has been added
+
+my $color = '';
+my @shelvesloop;
+my $numberCanManage = 0;
+
+foreach my $element ( sort keys %$shelflist ) {
+    my %line;
+    ( $color eq 1 ) ? ( $color = 0 ) : ( $color = 1 );
+    $line{'toggle'}    = $color;
+    $line{'shelf'}     = $element;
+    $line{'shelfname'} = $shelflist->{$element}->{'shelfname'};
+    $line{'private'}=1 if $shelflist->{$element}->{'category'}== 1;
+     $line{'public'}=1 if $shelflist->{$element}->{'category'}== 2;
+     $line{'free'}=1 if $shelflist->{$element}->{'category'}== 3;
+    $line{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq $loggedinuser;
+    $line{'shelfbookcount'} = $shelflist->{$element}->{'count'};
+    $line{'canmanage'} =  ShelfPossibleAction( $loggedinuser, $element, 'manage' );
+    $line{'firstname'} = $shelflist->{$element}->{'firstname'}
+        unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+    $line{'surname'} = $shelflist->{$element}->{'surname'}
+        unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+    
+    $numberCanManage++ if $line{'canmanage'};
+    
+        push( @shelvesloop, \%line );
+}
+
+$template->param(
+    shelvesloop     => \@shelvesloop,
+    numberCanManage => $numberCanManage,
+);
+$template->param(manageshelf => 1) if C4::Context->userenv->{flags}==1;
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub shelves {
+    my $innertemplate = shift;
+    if ( my $newshelf = $query->param('addshelf') ) {
+        my $shelfnumber = AddShelf(
+            $newshelf,
+            $query->param('owner'),
+            $query->param('category')
+        );
+
+        if ( $shelfnumber == -1 ) {    #shelf already exists.
+            $template->param(
+                {
+                    shelfnumber => $shelfnumber,
+                    already     => 1
+                }
+            );
+        }
+    }
+    my @paramsloop;
+    foreach ( $query->param() ) {
+        my %line;
+        if (/DEL-(\d+)/) {
+            my $delshelf = $1;
+            my ( $status, $count ) = DelShelf($delshelf);
+            if ($status) {
+                $line{'status'} = $status;
+                $line{'count'}  = $count;
+            }
+        }
+
+        #if the shelf is not deleted, %line points on null
+        push( @paramsloop, \%line );
+    }
+    $innertemplate->param( paramsloop => \@paramsloop );
+    my ($shelflist) = GetShelves( $loggedinuser, 2 );
+    my $color = '';
+    my @shelvesloop;
+    foreach my $element ( sort keys %$shelflist ) {
+        my %line;
+        ( $color eq 1 ) ? ( $color = 0 ) : ( $color = 1 );
+        $line{'toggle'}         = $color;
+        $line{'shelf'}          = $element;
+        $line{'shelfname'}      = $shelflist->{$element}->{'shelfname'};
+        $line{'shelfbookcount'} = $shelflist->{$element}->{'count'};
+        push( @shelvesloop, \%line );
+    }
+    $innertemplate->param(
+        shelvesloop => \@shelvesloop,
+        shelves     => 1,
+    );
+}
+
+#
+# $Log: shelves.pl,v $
+# Revision 1.10.2.2  2007/03/26 02:19:21  tgarip1957
+# Recommiting everything
+#
+# Revision 1.11  2007/03/09 14:32:26  tipaul
+# rel_3_0 moved to HEAD
+#
+# Revision 1.9.2.9  2007/02/05 15:54:30  toins
+# don't display "remove selected shelves" if the user logged has no shelf.
+#
+# Revision 1.9.2.8  2006/12/15 17:36:57  toins
+# - some change on the html param.
+# - Writing directly the code of a sub called only once.
+# - adding syspref: BiblioDefaultView.
+#
+# Revision 1.9.2.7  2006/12/14 17:22:55  toins
+# bookshelves work perfectly with mod_perl and are cleaned.
+#
+# Revision 1.9.2.6  2006/12/13 10:06:05  toins
+# fix a mod_perl specific bug.
+#
+# Revision 1.9.2.5  2006/12/11 17:10:06  toins
+# fixing some bugs on bookshelves.
+#
+# Revision 1.9.2.4  2006/11/30 18:23:51  toins
+# theses scripts don't need to use C4::Search.
+#
+# Revision 1.9.2.3  2006/10/30 09:50:45  tipaul
+# better perl writting
+#
+# Revision 1.9.2.2  2006/10/17 07:59:35  toins
+# ccode added.
+#

Index: catalogue/ISBDdetail.pl
===================================================================
RCS file: catalogue/ISBDdetail.pl
diff -N catalogue/ISBDdetail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/ISBDdetail.pl	26 Mar 2007 02:19:21 -0000	1.5.2.2
@@ -0,0 +1,152 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+ISBDdetail.pl : script to show a biblio in ISBD format
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs a biblionumber in bib parameter (bibnumber
+from koha style DB.  Automaticaly maps to marc biblionumber).
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+
+use C4::Auth;
+use C4::Context;
+use C4::AuthoritiesMarc;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Biblio;
+use C4::Acquisition;
+use C4::Koha;
+
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+
+my $biblionumber=$query->param('biblionumber');
+
+my $itemtype = &MARCfind_frameworkcode($dbh,$biblionumber);
+my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
+
+my $record =XMLgetbibliohash($dbh,$biblionumber);
+# open template
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "catalogue/ISBDdetail.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 1,
+			     debug => 1,
+			     });
+
+my $ISBD = C4::Context->preference('ISBD');
+my $res;
+	my $bloc = $ISBD;
+	my $blocres;
+	foreach my $isbdfield (split /#/,$bloc) {
+		$isbdfield =~ /(\d\d\d)\|(.*)\|(.*)\|(.*)/;
+		my $fieldvalue=$1;
+		my $textbefore=$2;
+		my $analysestring=$3;
+		my $textafter=$4;
+		if ($fieldvalue>0) {
+			my $hasputtextbefore=0;
+			
+				my $calculated = $analysestring;
+				my $tag = $fieldvalue;
+				if ($tag<10) {
+				my $value=XML_readline_onerecord($record,"","",$tag);
+				my $subfieldcode = "@";
+						my $subfieldvalue = get_authorised_value_desc($tag, "", $value, '', $dbh);;
+						my $tagsubf = $tag.$subfieldcode;
+						$calculated =~ s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
+					
+				} else {
+					my @subf = XML_readline_withtags($record,"","",$tag);
+				
+					for my $i (0..$#subf) {
+						my $subfieldcode = $subf[$i][0];
+						my $subfieldvalue = get_authorised_value_desc($tag, $subf[$i][0], $subf[$i][1], '', $dbh);;
+						my $tagsubf = $tag.$subfieldcode;
+						$calculated =~ s/\{(.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue\{$1$tagsubf$2\}$2/g;
+					}
+					# field builded, store the result
+					if ($calculated && !$hasputtextbefore) { # put textbefore if not done
+						$blocres .=$textbefore;
+						$hasputtextbefore=1
+					}
+					# remove punctuation at start
+					$calculated =~ s/^( |;|:|\.|-)*//g;
+					$blocres.=$calculated;
+				}
+			
+			$blocres .=$textafter if $hasputtextbefore;
+		} else {
+			$blocres.=$isbdfield;
+		}
+	}
+	$res.=$blocres;
+# }
+$res =~ s/\{(.*?)\}//g;
+$res =~ s/\\n/\n/g;
+$res =~ s/\n/<br\/>/g;
+# remove empty ()
+$res =~ s/\(\)//g;
+$template->param(ISBD => $res,
+				biblionumber => $biblionumber);
+
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub get_authorised_value_desc ($$$$$) {
+   my($tag, $subfield, $value, $framework, $dbh) = @_;
+
+   #---- branch
+    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+       return getbranchname($value);
+    }
+
+   #---- itemtypes
+   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
+       return ItemType($value);
+    }
+
+   #---- "true" authorized value
+   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
+
+   if ($category ne "") {
+       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
+       $sth->execute($category, $value);
+       my $data = $sth->fetchrow_hashref;
+       return $data->{'lib'};
+   } else {
+       return $value; # if nothing is found return the original value
+   }
+}

Index: catalogue/MARCdetail.pl
===================================================================
RCS file: catalogue/MARCdetail.pl
diff -N catalogue/MARCdetail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/MARCdetail.pl	26 Mar 2007 02:19:21 -0000	1.8.2.2
@@ -0,0 +1,331 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+MARCdetail.pl : script to show a biblio in MARC format
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs a biblionumber in bib parameter (bibnumber
+from koha style DB.  Automaticaly maps to marc biblionumber).
+
+It shows the biblio in a (nice) MARC format depending on MARC
+parameters tables.
+
+The template is in <templates_dir>/catalogue/MARCdetail.tmpl.
+this template must be divided into 11 "tabs".
+
+The first 10 tabs present the biblio, the 11th one presents
+the items attached to the biblio
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Biblio;
+use C4::Acquisition;
+use C4::Serials; #uses getsubscriptionsfrombiblionumber
+use C4::Koha;
+
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+my $retrieve_from=C4::Context->preference('retrieve_from');
+my $biblionumber=$query->param('biblionumber');
+my $frameworkcode = $query->param('frameworkcode');
+my $popup = $query->param('popup'); # if set to 1, then don't insert links, it's just to show the biblio
+my $record;
+my @itemrecords;
+my $xmlhash;
+$frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber);
+my $tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
+my $itemstagslib = &MARCitemsgettagslib($dbh,1,$frameworkcode);
+
+if ($retrieve_from eq "zebra"){
+($xmlhash, at itemrecords)=ZEBRAgetrecord($biblionumber);
+
+}else{
+ $record =XMLgetbiblio($dbh,$biblionumber);
+$xmlhash=XML_xml2hash_onerecord($record);
+my @itemxmls=XMLgetallitems($dbh,$biblionumber);
+	foreach my $itemrecord(@itemxmls){
+	my $itemhash=XML_xml2hash($itemrecord);
+	push @itemrecords, $itemhash;
+	}
+}
+
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "catalogue/MARCdetail.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+#Getting the list of all frameworks
+my $queryfwk =$dbh->prepare("select frameworktext, frameworkcode from biblios_framework");
+$queryfwk->execute;
+my %select_fwk;
+my @select_fwk;
+my $curfwk;
+push @select_fwk,"Default";
+$select_fwk{"Default"} = "Default";
+while (my ($description, $fwk) =$queryfwk->fetchrow) {
+	push @select_fwk, $fwk;
+	$select_fwk{$fwk} = $description;
+}
+$curfwk=$frameworkcode;
+my $framework=CGI::scrolling_list( -name     => 'Frameworks',
+			-id => 'Frameworks',
+			-default => $curfwk,
+			-OnChange => 'Changefwk(this);',
+			-values   => \@select_fwk,
+			-labels   => \%select_fwk,
+			-size     => 1,
+			-multiple => 0 );
+
+$template->param( framework => $framework);
+# fill arrays
+my @loop_data =();
+my $tag;
+# loop through each tab 0 through 9
+##Only attempt to fill the template if we actually received a MARC record
+if ($xmlhash){
+my ($isbntag,$isbnsub)=MARCfind_marc_from_kohafield("isbn","biblios");
+my $biblio=$xmlhash->{'datafield'};
+my $controlfields=$xmlhash->{'controlfield'};
+my $leader=$xmlhash->{'leader'};
+for (my $tabloop = 0; $tabloop<10;$tabloop++) {
+# loop through each tag
+	my @loop_data =();
+	my @subfields_data;
+
+	# deal with leader 
+	unless (($tagslib->{'000'}->{'@'}->{tab}  ne $tabloop)  || (substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0)) {
+		
+		my %subfield_data;
+		$subfield_data{marc_value}=$leader->[0] ;
+		push(@subfields_data, \%subfield_data);
+		my %tag_data;
+		$tag_data{tag}='000 -'. $tagslib->{'000'}->{lib};
+		my @tmp = @subfields_data;
+		$tag_data{subfield} = \@tmp;
+		push (@loop_data, \%tag_data);
+		undef @subfields_data;
+	}
+	##Controlfields
+		
+		 foreach my $control (@$controlfields){
+			my %subfield_data;
+			my %tag_data;
+			next if ($tagslib->{$control->{'tag'}}->{'@'}->{tab}  ne $tabloop);
+			next if (substr($tagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);			
+			$subfield_data{marc_value}=$control->{'content'} ;
+			push(@subfields_data, \%subfield_data);
+				if (C4::Context->preference('hide_marc')) {
+					$tag_data{tag}=$tagslib->{$control->{'tag'}}->{lib};
+				} else {
+					$tag_data{tag}=$control->{'tag'}.' -'. $tagslib->{$control->{'tag'}}->{lib};
+				}			
+			my @tmp = @subfields_data;
+			$tag_data{subfield} = \@tmp;
+			push (@loop_data, \%tag_data);
+			undef @subfields_data;
+		}
+	my $previoustag;
+	my %datatags;
+	my $i=0;
+	foreach my $data (@$biblio){
+		$datatags{$i++}=$data->{'tag'};
+		 foreach my $subfield ( $data->{'subfield'}){
+		     foreach my $code ( @$subfield){
+			next if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne $tabloop);
+			next if (substr($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
+			my %subfield_data;
+			my $value=$code->{'content'};
+			$subfield_data{marc_lib}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
+			$subfield_data{link}=$tagslib->{$data->{'tag'}}->{$code->{'code'}}->{link};
+			if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{isurl}) {
+				$subfield_data{marc_value}="<a href=\"$value\">$value</a>";
+			} elsif ($data->{'tag'} eq $isbntag && $code->{'code'} eq $isbnsub) {
+				$subfield_data{marc_value}=DisplayISBN($value);
+			} else {
+				if ($tagslib->{$data->{'tag'}}->{$code->{'code'}}->{authtypecode}) {
+				my ($authtag,$authtagsub)=MARCfind_marc_from_kohafield("auth_biblio_link_subf","biblios");
+				$subfield_data{authority}=XML_readline_onerecord($xmlhash,"","",$data->{'tag'},$authtagsub);
+				}
+			if (length($value) >100) {
+			$subfield_data{marc_value}="<textarea tabindex=\"1\"   cols=\"40\" rows=\"5\" >$value</textarea>";
+			}else{
+			$subfield_data{marc_value}=get_authorised_value_desc($data->{'tag'}, $code->{'code'}, $value, '', $dbh);
+			}
+			}
+			$subfield_data{marc_subfield}=$code->{'code'};
+			$subfield_data{marc_tag}=$data->{'tag'};
+			push(@subfields_data, \%subfield_data);
+		     }### $code
+		
+		
+		if ($#subfields_data==0) {
+		#	$subfields_data[0]->{marc_lib}='';
+		#	$subfields_data[0]->{marc_subfield}='';
+		}
+		if ($#subfields_data>=0) {
+			my %tag_data;
+			if (($datatags{$i} eq $datatags{$i-1}) && (C4::Context->preference('LabelMARCView') eq 'economical')) {
+				$tag_data{tag}="";
+			} else {
+				if (C4::Context->preference('hide_marc')) {
+					$tag_data{tag}=$tagslib->{$data->{'tag'}}->{lib};
+				} else {
+					$tag_data{tag}=$data->{'tag'}.' -'. $tagslib->{$data->{'tag'}}->{lib};
+				}
+			}
+			my @tmp = @subfields_data;
+			$tag_data{subfield} = \@tmp;
+			push (@loop_data, \%tag_data);
+			undef @subfields_data;
+		}
+	      }### each $subfield
+	}
+
+	$template->param($tabloop."XX" =>\@loop_data);
+}
+# now, build item tab !
+# the main difference is that datas are in lines and not in columns : thus, we build the <th> first, then the values...
+# loop through each tag
+# warning : we may have differents number of columns in each row. Thus, we first build a hash, complete it if necessary
+# then construct template.
+my @fields;
+my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
+my @big_array;
+foreach my $itemrecord (@itemrecords){
+my $item=$itemrecord->{'datafield'};
+my $controlfields=$itemrecord->{'controlfield'};
+my $leader=$itemrecord->{'leader'};
+my %this_row;
+		### The leader
+		unless (substr($itemstagslib->{'000'}->{'@'}->{hidden},1,1)>0){
+			my @datasub='000@';
+			$witness{$datasub[0]} = $itemstagslib->{'000'}->{'@'}->{lib};
+			$this_row{$datasub[0]} =$leader->[0];
+		}
+		 foreach my $control (@$controlfields){
+		next if ($itemstagslib->{$control->{'tag'}}->{'@'}->{tab}  ne 10);
+			next if (substr($itemstagslib->{$control->{'tag'}}->{'@'}->{hidden},1,1)>0);
+			my @datasub=$control->{'tag'}.'@';
+			$witness{$datasub[0]} = $itemstagslib->{$control->{'tag'}}->{'@'}->{lib};
+			$this_row{$datasub[0]} =$control->{'content'};
+		}
+
+		foreach my $data (@$item){		
+		   foreach my $subfield ( $data->{'subfield'}){
+			foreach my $code ( @$subfield){
+			next if ($itemstagslib->{$data->{'tag'}}->{$code->{'code'}}->{tab}  ne 10);
+			next if (substr($itemstagslib->{$data->{'tag'}}->{$code->{'code'}}->{hidden},1,1)>0);
+			$witness{$data->{'tag'}.$code->{'code'}} = $itemstagslib->{$data->{'tag'}}->{$code->{'code'}}->{lib};
+			$this_row{$data->{'tag'}.$code->{'code'}} =$code->{'content'};
+			}			
+		    }# subfield
+		}## each field
+	if (%this_row) {
+	push(@big_array, \%this_row);
+	}
+}## each record
+my ($holdingbrtagf,$holdingbrtagsubf) = &MARCfind_marc_from_kohafield("holdingbranch","holdings");
+ at big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}} @big_array;
+
+#fill big_row with missing datas
+foreach my $subfield_code  (keys(%witness)) {
+	for (my $i=0;$i<=$#big_array;$i++) {
+		$big_array[$i]{$subfield_code}="&nbsp;" unless ($big_array[$i]{$subfield_code});
+	}
+}
+# now, construct template !
+my @item_value_loop;
+my @header_value_loop;
+for (my $i=0;$i<=$#big_array; $i++) {
+	my $items_data;
+	foreach my $subfield_code (keys(%witness)) {
+		$items_data .="<td>".$big_array[$i]{$subfield_code}."</td>";
+	}
+	my %row_data;
+	$row_data{item_value} = $items_data;
+	push(@item_value_loop,\%row_data);
+}
+foreach my $subfield_code (keys(%witness)) {
+	my %header_value;
+	$header_value{header_value} = $witness{$subfield_code};
+	push(@header_value_loop, \%header_value);
+}
+
+my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
+$template->param(item_loop => \@item_value_loop,
+						item_header_loop => \@header_value_loop,
+						biblionumber => $biblionumber,
+						subscriptionsnumber => $subscriptionsnumber,
+						popup => $popup,
+						hide_marc => C4::Context->preference('hide_marc'),
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+						);
+}##if $xmlhash
+$template->param(biblionumber => $biblionumber,);
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub get_authorised_value_desc ($$$$$) {
+   my($tag, $subfield, $value, $framework, $dbh) = @_;
+
+   #---- branch
+    if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+       return getbranchname($value);
+    }
+
+   #---- itemtypes
+   if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) {
+       return ItemType($value);
+    }
+
+   #---- "true" authorized value
+   my $category = $tagslib->{$tag}->{$subfield}->{'authorised_value'};
+
+   if ($category ne "") {
+       my $sth = $dbh->prepare("select lib from authorised_values where category = ? and authorised_value = ?");
+       $sth->execute($category, $value);
+       my $data = $sth->fetchrow_hashref;
+       return $data->{'lib'};
+   } else {
+       return $value; # if nothing is found return the original value
+   }
+}

Index: catalogue/MARCdetail_wrapper.pl
===================================================================
RCS file: catalogue/MARCdetail_wrapper.pl
diff -N catalogue/MARCdetail_wrapper.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/MARCdetail_wrapper.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,122 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+=head1 NAME
+
+MARCdetail.pl : script to show a biblio in MARC format
+
+=head1 SYNOPSIS
+
+
+=head1 DESCRIPTION
+
+This script needs a biblionumber in bib parameter (bibnumber
+from koha style DB.  Automaticaly maps to marc biblionumber).
+
+It shows the biblio in a (nice) MARC format depending on MARC
+parameters tables.
+
+The template is in <templates_dir>/catalogue/MARCdetail.tmpl.
+this template must be divided into 11 "tabs".
+
+The first 10 tabs present the biblio, the 11th one presents
+the items attached to the biblio
+
+=head1 FUNCTIONS
+
+=over 2
+
+=cut
+
+
+use strict;
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Search;
+use C4::Biblio;
+use C4::Acquisition;
+use C4::Serials; #uses getsubscriptionsfrombiblionumber
+use C4::Koha;
+use XML::XSLT::Wrapper;
+    my $xslt = XML::XSLT::Wrapper->new(
+            ProcessorList => ['sablotron','libxslt'],
+            );
+
+my $query=new CGI;
+
+my $dbh=C4::Context->dbh;
+my $retrieve_from=C4::Context->preference('retrieve_from');
+my $biblionumber=$query->param('biblionumber');
+my $popup = $query->param('popup'); # if set to 1, then don't insert links, it's just to show the biblio
+my $record;
+my @itemrecords;
+my $xmlhash;
+
+
+ $record =XMLgetbiblio($dbh,$biblionumber);
+my @itemxmls=XMLgetallitems($dbh,$biblionumber);
+my $koharecord="<koharecord>".$record."<holdings>";
+foreach my $item(@itemxmls){
+$koharecord.=$item;
+}
+$koharecord.="</holdings></koharecord>";
+ 
+  my $htdocs=C4::Context->config('intrahtdocs');
+my $filename;
+if (C4::Context->preference('hide_marc')){
+$filename=$htdocs."/default/en/stylesheets/marcdetail_hide.xsl";
+}else{
+$filename=$htdocs."/default/en/stylesheets/marcdetail.xsl";
+}
+
+ 
+
+ my   $result = $xslt->transform( XSLFile => $filename, XMLString => $koharecord,);
+
+
+
+
+my ($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "catalogue/MARCdetail_wrapper.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {catalogue => 1},
+			     debug => 1,
+			     });
+
+
+
+my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
+$template->param(result=>$result ,
+						biblionumber => $biblionumber,
+						subscriptionsnumber => $subscriptionsnumber,
+						popup => $popup,
+						hide_marc => C4::Context->preference('hide_marc'),
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+						);
+
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+

Index: catalogue/bookcount.pl
===================================================================
RCS file: catalogue/bookcount.pl
diff -N catalogue/bookcount.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/bookcount.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,173 @@
+#!/usr/bin/perl
+
+# $Id: bookcount.pl,v 1.1.2.1 2007/03/26 02:19:21 tgarip1957 Exp $
+
+#written 7/3/2002 by Finlay
+#script to display reports
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Context;
+use C4::Search;
+use C4::Circulation::Circ2;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+# get all the data ....
+my %env;
+my $main='#cccc99';
+my $secondary='#ffffcc';
+
+my $input = new CGI;
+my $itemnumber = $input->param('itemnumber');
+my $biblionumber = $input->param('biblionumber');
+my $branches = GetBranches();
+
+my $idata = getiteminformation(undef,$itemnumber);
+
+# my $homebranch = $branches->{$idata->{'homebranch'}}->{'branchname'};
+ my $homebranch = $idata->{'homebranch'};
+my $holdingbranch = $branches->{$idata->{'holdingbranch'}}->{'branchname'};
+
+my ($lastmove, $message) = lastmove($itemnumber);
+
+my $lastdate;
+my $count;
+if (!$lastmove) {
+    $lastdate = $message;
+    $count = issuessince($itemnumber , 0);
+} else {
+    $lastdate = format_date($lastmove->{'datearrived'});
+    $count = issuessince($itemnumber ,$lastdate);
+}
+
+# make the page ...
+
+my ($template, $loggedinuser, $cookie)
+      = get_template_and_user({template_name => "catalogue/bookcount.tmpl",
+	                                 query => $input,
+	                                 type => "intranet",
+	                                 authnotrequired => 0,
+	                                 flagsrequired => {borrowers => 1},
+	                                 debug => 1,
+	                                 });
+
+
+
+my @branchloop;
+
+foreach my $branchcode (keys %$branches) {
+	my %linebranch;
+    $linebranch{issues} = issuesat($itemnumber, $branchcode);
+    my $date = lastseenat($itemnumber, $branchcode);
+    $linebranch{seen} = slashdate($date);
+	$linebranch{branchname}=$branches->{$branchcode}->{'branchname'};
+	push(@branchloop,\%linebranch);
+}
+
+$template->param(	biblionumber => $biblionumber,
+								title => $idata->{'title'},
+								author => $idata->{'author'},
+								barcode => $idata->{'barcode'},
+								homebranch =>$homebranch,
+								holdingbranch => $holdingbranch,
+								lastdate =>  $lastdate,
+								count =>  $count,
+								branchloop => \@branchloop);
+
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
+##############################################
+# This stuff should probably go into C4::Search
+
+
+sub lastmove {
+      my ($itemnumber)=@_;
+      my $dbh = C4::Context->dbh;
+      my $sth =$dbh->prepare("select max(branchtransfers.datearrived) from branchtransfers where branchtransfers.itemnumber=?");
+      $sth->execute($itemnumber);
+      my ($date) = $sth->fetchrow;
+      return(0, "Item has no branch transfers record") unless $date;
+      $sth=$dbh->prepare("Select * from branchtransfers where branchtransfers.itemnumber=? and branchtransfers.datearrived=?");
+      $sth->execute($itemnumber,$date);
+      my ($data) = $sth->fetchrow_hashref;
+      return(0, "Item has no branch transfers record") unless $data;
+      $sth->finish;
+      return($data,"");
+ }
+
+sub issuessince {
+      my ($itemnumber, $date)=@_;
+      my $dbh = C4::Context->dbh;
+      my $sth=$dbh->prepare("Select count(*) from issues where issues.itemnumber=? and issues.timestamp > ?");
+      $sth->execute($itemnumber,$date);
+      my $count=$sth->fetchrow_hashref;
+      $sth->finish;
+      return($count->{'count(*)'});
+}
+
+sub issuesat {
+      my ($itemnumber, $brcd)=@_;
+      my $dbh = C4::Context->dbh;
+      my $sth=$dbh->prepare("Select count(*) from issues where itemnumber=? and branchcode = ?");
+      $sth->execute($itemnumber,$brcd);
+      my ($count)=$sth->fetchrow_array;
+      $sth->finish;
+      return($count);
+}
+
+sub lastseenat {
+      my ($itemnumber, $brc)=@_;
+      my $dbh = C4::Context->dbh;
+      my $sth=$dbh->prepare("Select max(timestamp) from issues where itemnumber=? and branchcode = ?");
+      $sth->execute($itemnumber,$brc);
+      my ($date1)=$sth->fetchrow_array;
+      $sth->finish;
+      $sth=$dbh->prepare("Select max(datearrived) from branchtransfers where itemnumber=? and tobranch = ?");
+      $sth->execute($itemnumber,$brc);
+      my ($date2)=$sth->fetchrow_array;
+      $sth->finish;
+      #FIXME: MJR thinks unsafe
+      $date2 =~ s/-//g;
+      $date2 =~ s/://g;
+      $date2 =~ s/ //g;
+      my $date;
+      if ($date1 < $date2) {
+	  $date = $date2;
+      } else {
+	  $date = $date1;
+      }
+      return($date);
+}
+
+
+#####################################################
+# write date....
+sub slashdate {
+    my ($date) = @_;
+    if (not $date) {
+	return "never";
+    }
+    my ($yr, $hr) = (substr($date, 0, 10),  substr($date, 11, 5));
+    return "$hr  " . format_date($yr);
+}

Index: catalogue/catalogue-search.pl
===================================================================
RCS file: catalogue/catalogue-search.pl
diff -N catalogue/catalogue-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/catalogue-search.pl	26 Mar 2007 02:19:21 -0000	1.4.2.2
@@ -0,0 +1,406 @@
+#!/usr/bin/perl
+use strict;
+
+use CGI ;
+
+use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Koha;
+use C4::BookShelves;
+use POSIX qw(ceil floor);
+my $query = CGI->new();
+my $dbh = C4::Context->dbh;
+my $op = $query->param('op'); #show the search form or execute the search
+
+my $format=$query->param('MARC');
+my ($template, $borrowernumber, $cookie);
+
+# get all the common search variables, 
+my @value=$query->param('value');
+my @kohafield=$query->param('kohafield');
+my @and_or=$query->param('and_or');
+my @relation=$query->param('relation');
+my $order=$query->param('order');
+my $reorder=$query->param('reorder');
+my $number_of_results=$query->param('number_of_results');
+my $zoom=$query->param('zoom');
+my $ascend=$query->param('asc');
+my $searchtype=$query->param('searchtype'); ## this is actual query type
+my $serverid=$query->param('serverid');
+$serverid=-1 unless($serverid eq "0"  || $serverid>0);
+my @marclist = $query->param('marclist');
+# collect all the fields ...
+my %search;
+my @forminputs;		#this is for the links to navigate among the results
+my (@searchdesc, %hashdesc,$facetsdesc); 	#this is to show the description of the current search
+my @fields = ('value', 'kohafield', 'and_or', 'relation','order','barcode','biblionumber','itemnumber','asc','from','searchtype');
+
+###Collect all the marclist values coming from old Koha MARCdetails
+## Although we can not search on all marc fields- if any is matched in Zebra we can use it 
+my $sth=$dbh->prepare("Select kohafield from koha_attr where tagfield=? and tagsubfield=? and intrashow=1");
+foreach my $marc (@marclist) {
+		if ($marc) {
+		$sth->execute(substr($marc,0,3),substr($marc,3,1));
+			if ((my $kohafield)=$sth->fetchrow){
+			push @kohafield,$kohafield;
+			push @and_or,"\@or";
+			push @value, at value[0] if @kohafield>1;
+			push @relation ,"\@attr 5=1";
+			}
+		}
+}
+#### Now   normal search routine
+foreach my $field (@fields) {
+	$search{$field} = $query->param($field);
+	my @fieldvalue = $query->param($field);
+	foreach my $fvalue (@fieldvalue) {
+		push @forminputs, { field=>$field ,value=> $fvalue} unless ($field eq 'reorder');
+		
+	  }
+}
+## Build the query for facets as well
+ for (my $i=0;$i<@value;$i++){
+$facetsdesc.="&value=".$value[$i];
+$facetsdesc.="&kohafield=".$kohafield[$i];
+$facetsdesc.="&relation=".$relation[$i];
+$facetsdesc.="&and_or=".$and_or[$i];
+}
+$facetsdesc.="&order=".$order;
+$hashdesc{'query'} = join " , ", @value;
+push @searchdesc,\%hashdesc;
+
+
+############################################################################
+if ($op eq "do_search"){
+ 
+#this fields is just to allow the user come back to the search form with all the values  previously entered
+$search{'search_type'} = $query->param('search_type');# this is the panel type
+push @forminputs, {field => 'search_type', value => $search{'search_type'}};
+
+
+	($template, $borrowernumber, $cookie)
+		= get_template_and_user({template_name => "catalogue/catalogue_searchresults.tmpl",
+					 query => $query,
+					 type => "intranet",
+					 authnotrequired => 1,
+	});
+
+	$search{'from'} = 'intranet';
+	$search{'borrowernumber'} = $borrowernumber;
+	$search{'remote_IP'} = $query->remote_addr();
+	$search{'remote_URL'} = $query->url(-query=>1);
+	$search{'searchdesc'} = \@searchdesc;
+	$template->param(FORMINPUTS => \@forminputs);
+	$template->param(reorder => $query->param('reorder'));
+	$template->param(facetsdesc=>$facetsdesc);
+	# do the searchs ....
+	 $number_of_results = 10 unless $number_of_results;
+	my $startfrom=$query->param('startfrom');
+	($startfrom) || ($startfrom=0);
+my ($count, at results,$facets);
+if ($serverid>0){
+ my $sth=$dbh->prepare("select * from online_databases where serverid=?");
+  $sth->execute($serverid);
+
+  my  $server=$sth->fetchrow_hashref ;
+
+my	$serverquery=$server->{search_string};
+	if ($server->{$kohafield[0]} ne ""){
+	$serverquery.=$server->{$kohafield[0]."_query"}.$value[0];
+	}else{
+	$serverquery.=$server->{"any_query"}.$value[0]."&relation=$relation[0]";
+	}
+print $query->redirect($serverquery);
+  
+}##serverid>0
+if ($serverid eq "0"){
+use ZOOM;
+my @oConnection;
+my @oResult;
+my $s=0;
+my $server;							
+my @serverhost;
+my @serverquery;
+my @query;							
+my @onlineloop;
+my $numberpending;
+my $even=1;			
+  my $sth=$dbh->prepare("select * from online_databases ");
+  $sth->execute();
+
+    while ($server=$sth->fetchrow_hashref) {
+	my $noconnection=0;
+	
+							
+	my $option1=new ZOOM::Options();
+	$option1->option(async=>1);
+	$option1->option('elementSetName', 'F');
+	$option1->option('databaseName',$server->{db})  ;
+	$option1->option('user',$server->{userid})  ;
+	$option1->option('password',$server->{password})  ;
+	 $oConnection[$s]=create ZOOM::Connection($option1);
+	$oConnection[$s]->connect($server->{host}, $server->{port});
+	$serverhost[$s]=$server->{server};
+	$serverquery[$s]=$server->{search_string};
+	if ($server->{$kohafield[0]} ne ""){
+	$serverquery[$s].=$server->{$kohafield[0]."_query"}.$value[0];
+	}else{
+	$serverquery[$s].=$server->{"any_query"}.$value[0];
+	}
+ $query[$s]=$server->{$kohafield[0]}." \"".$value[0]."\"";	
+
+	$s++;
+    }## while fetch
+
+ 
+my $nremaining = $s;
+my $firstresult=1;
+ for (my $z=0 ;$z<$s;$z++){
+$oResult[$z] = $oConnection[$z]->search_pqf($query[$z]);
+
+}
+AGAIN:
+ my $k;
+my $event;
+  while (($k = ZOOM::event(\@oConnection)) != 0) {
+	$event = $oConnection[$k-1]->last_event();
+# warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
+	last if $event == ZOOM::Event::ZEND;
+   }
+if ($k != 0) {
+	$k--;
+#warn $serverhost[$k];
+	 my($error, $errmsg, $addinfo, $diagset) = $oConnection[$k]->error_x();
+   	if ($error) {
+	warn "$k $serverhost[$k] error $query[$k]: $errmsg ($error) $addinfo\n";
+	goto MAYBE_AGAIN;
+  	}
+	
+	my $numresults=$oResult[$k]->size() ;								
+ 									
+
+	if ($numresults>0){
+	
+		
+
+			my %row_data;
+ 	
+	$row_data{even} = $even;
+	$row_data{server} = $serverhost[$k];
+	$row_data{numresults} = $numresults;
+
+	$row_data{search_string} =$serverquery[$k];
+	
+	$even=!$even;
+	push (@onlineloop, \%row_data);
+
+						
+}# $numresults
+
+}# if $k !=0
+
+
+$numberpending=$nremaining-1;
+
+MAYBE_AGAIN:
+if (--$nremaining > 0) {
+    goto AGAIN;
+}
+$template->param(onlineloop=>\@onlineloop,);
+}##serverid==0
+if (!$zoom){
+## using sql search for barcode,biblionumber or itemnumber only useful for libraian interface
+	($count, @results) =sqlsearch($dbh,\%search);
+}else{
+my $sortorder=$order.$ascend if $order;
+ ($count,$facets, at results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,$sortorder, \@and_or, 1,$reorder,$startfrom, $number_of_results,"intranet",$searchtype);
+}
+my $timetaken=$results[0]->{timetaken} if $count>0;
+	if ( $count eq "error"){
+	$template->param(error =>1);
+	goto "show";
+	}
+	my $num = scalar(@results) - 1;
+if ( $count == 1){
+    # if its a barcode search by definition we will only have one result.
+    # And if we have a result
+    # lets jump straight to the detail.pl page
+	if ($format eq '1') {
+    print $query->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?type=intra&biblionumber=$results[0]->{'biblionumber'}");
+	}else{
+    print $query->redirect("/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=$results[0]->{'biblionumber'}");
+	}
+}
+	# sorting out which results to display.
+		# the total results searched
+	$template->param(numrecords => $count);
+	$template->param(FORMINPUTS => \@forminputs );
+	$template->param(searchdesc => \@searchdesc );
+if ($serverid==-1){
+	# the result number to star to show
+	$template->param(startfrom => $startfrom);
+	$template->param(beginning => $startfrom+1);
+	# the result number to end to show
+	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
+
+	
+ 	$template->param(SEARCH_RESULTS => \@results,timetaken=>$timetaken,);
+
+$template->param(facets_loop => $facets,) if $facets;
+	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
+	my $numbers;
+	@$numbers = ();
+	my $pg = 1;
+	if (defined($query->param('pg'))) {
+		$pg = $query->param('pg');
+	}
+	my $start = 0;
+	
+	$start = ($pg - 1) * $number_of_results;
+	my $pages = ceil($count / $number_of_results);
+	my $total_pages = ceil($count / $number_of_results);
+
+	if ($pg > 1) {
+		my $url = $pg - 1;
+		push @$numbers, { number => "&lt;&lt;",  forminputs=>\@forminputs,
+					      highlight => 0 , 
+					      startfrom => 1, 
+					      pg => '1' };
+		push @$numbers, { number => "&lt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results+1, 
+						  pg => $url };
+	}
+	my $current_ten = $pg / 10;
+	if ($current_ten == 0) {
+		 $current_ten = 0.1;           # In case it´s in ten = 0
+	} 
+	my $from = $current_ten * 10; # Calculate the initial page
+	my $end_ten = $from + 9;
+	my $to;
+	if ($pages > $end_ten) {
+		$to = $end_ten;
+	} else {
+		$to = $pages;
+	}
+	for (my $i = $from; $i <= $to ; $i++) {
+		if ($i == $pg) {   
+			if ($count > $number_of_results) {
+				push @$numbers, { number => $i, 
+								  highlight => 1 , forminputs=>\@forminputs,
+								  startfrom => ($i-1)*$number_of_results , 
+								  pg => $i };
+			}
+		} else {
+			push @$numbers, { number => $i, 
+							  highlight => 0 , forminputs=>\@forminputs,
+							  startfrom => ($i-1)*$number_of_results , 
+							  pg => $i };
+		}
+	}	        					
+	if ($pg < $pages) {
+		my $url = $pg + 1;
+		push @$numbers, { number => "&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results, 
+						  pg => $url };
+		push @$numbers, { number => "&gt;&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($total_pages-1)*$number_of_results, 
+						  pg => $total_pages};
+	}
+#	push @$numbers,{forminputs=>@forminputs};
+	$template->param(numbers =>$numbers,
+			);
+		#show the virtual shelves
+	my $shelflist = &GetShelves($borrowernumber);
+	  my $color = '';
+    my @shelvesloop;
+    foreach my $element ( sort keys %$shelflist ) {
+        my %line;
+        ( $color eq 1 ) ? ( $color = 0 ) : ( $color = 1 );
+        $line{'toggle'}         = $color;
+        $line{'shelfnumber'}          = $element;
+        $line{'shelfname'}      = $shelflist->{$element}->{'shelfname'};
+        $line{'shelfbookcount'} = $shelflist->{$element}->{'count'};
+        push( @shelvesloop, \%line );
+    }
+	$template->param(shelvescount =>scalar(@shelvesloop));
+	$template->param(shelves => \@shelvesloop);
+ 
+ 
+########
+if ($format eq '1') {
+	$template->param(script => "catalogue/MARCdetail.pl");
+}else{
+	$template->param(script => "catalogue/detail.pl");
+}
+}#serverid==-1
+}else{ ## No search yet
+($template, $borrowernumber, $cookie)
+		= get_template_and_user({template_name => "catalogue/catalogue_search.tmpl",
+					query => $query,
+					type => "intranet",
+					authnotrequired => 1,
+				});
+#show kohafields
+	my $kohafield = $query->param('kohafield');
+	my ($fieldcount, at kohafields)=getkohafields();
+	foreach my $row (@kohafields) {
+		if ($kohafield eq $row->{'kohafield'}) {
+			$row->{'sel'} = 1;
+		}
+	}
+	$template->param(kohafields => \@kohafields);
+##show sorting fields
+my @sorts;
+ $order=$query->param('order');
+	foreach my $sort (@kohafields) {
+	    if ($sort->{sorts}){
+		push @sorts,$sort;
+		if ($order eq $sort->{'kohafield'}) {
+			$sort->{'sel'} = 1;
+		}
+	   }
+	}
+	$template->param(sorts => \@sorts);
+# load the branches
+my @branches = GetallBranches();
+$template->param(branchloop => \@branches,);
+
+# load the itemtypes 
+my $itemtypes=GetItemTypes();
+my (@item_type_loop);
+foreach my $thisitemtype (sort keys %$itemtypes) {
+    my %row =(itemtype => $thisitemtype,
+                 description => $itemtypes->{$thisitemtype}->{'description'},
+            );
+    push @item_type_loop, \%row;
+}
+##Show catalogues
+my $sth=$dbh->prepare("select serverid,server from online_databases");
+$sth->execute();
+my @serverloop;
+while (my $server=$sth->fetchrow_hashref) {
+my %temploop;
+$temploop{server}=$server->{server};
+$temploop{serverid}=$server->{serverid};
+
+push (@serverloop, \%temploop);
+}
+$sth->finish;
+$template->param(	servers => \@serverloop,);
+$template->param(itemtypeloop=>\@item_type_loop,);
+my $search_type = $query->param('search_type');
+	if ((!$search_type) || ($search_type eq 'zoom'))  {
+		$template->param(zoom_search => 1);
+	} else{
+		$template->param(sql_search => 1);
+	} 
+}
+
+show:
+output_html_with_http_headers($query, $cookie, $template->output());
+

Index: catalogue/cyprus-search.pl
===================================================================
RCS file: catalogue/cyprus-search.pl
diff -N catalogue/cyprus-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/cyprus-search.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,302 @@
+#!/usr/bin/perl
+use strict;
+
+use CGI;
+#use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Koha;
+use POSIX qw(ceil floor);
+use C4::Date;
+use utf8;
+my $query = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $op = $query->param('op'); #show the search form or execute the search
+
+my $format=$query->param('MARC');
+my ($template, $borrowernumber, $cookie);
+
+# get all the common search variables, 
+my @value=$query->param('value');
+my @kohafield=$query->param('kohafield');
+my @and_or=$query->param('and_or');
+my @relation=$query->param('relation');
+my $order=$query->param('order');
+my $reorder=$query->param('reorder');
+my $number_of_results=$query->param('number_of_results');
+my $zoom=$query->param('zoom');
+my $ascend=$query->param('asc');
+my $searchtype=$query->param('searchtype'); ## this is actual query type
+my $serverid=$query->param('serverid');
+$serverid=-1 unless($serverid eq "0"  || $serverid>0);
+my @marclist = $query->param('marclist');
+# collect all the fields ...
+my %search;
+my @forminputs;		#this is for the links to navigate among the results
+my (@searchdesc, %hashdesc,$facetsdesc); 	#this is to show the description of the current search
+my @fields = ('value', 'kohafield', 'and_or', 'relation','order','barcode','biblionumber','itemnumber','asc','from','searchtype');
+
+###Collect all the marclist values coming from old Koha MARCdetails
+## Although we can not search on all marc fields- if any is matched in Zebra we can use it 
+my $sth=$dbh->prepare("Select kohafield from koha_attr where tagfield=? and tagsubfield=? and intrashow=1");
+foreach my $marc (@marclist) {
+		if ($marc) {
+		$sth->execute(substr($marc,0,3),substr($marc,3,1));
+			if ((my $kohafield)=$sth->fetchrow){
+			push @kohafield,$kohafield;
+			push @and_or,"\@or";
+			push @value, at value[0] if @kohafield>1;
+			push @relation ,"\@attr 5=1";
+			}
+		}
+}
+#### Now   normal search routine
+foreach my $field (@fields) {
+	$search{$field} = $query->param($field);
+	my @fieldvalue = $query->param($field);
+	foreach my $fvalue (@fieldvalue) {
+		push @forminputs, { field=>$field ,value=> $fvalue} unless ($field eq 'reorder');
+		
+	  }
+}
+## Build the query for facets as well
+ for (my $i=0;$i<@value;$i++){
+$facetsdesc.="&value=".$value[$i];
+$facetsdesc.="&kohafield=".$kohafield[$i];
+$facetsdesc.="&relation=".$relation[$i];
+$facetsdesc.="&and_or=".$and_or[$i];
+}
+$facetsdesc.="&order=".$order;
+ for (my $i=0;$i<@value;$i++){
+$hashdesc{$kohafield[$i]}.=$value[$i].", " if $value[$i];
+}
+push @searchdesc,\%hashdesc;
+
+
+############################################################################
+if ($op eq "do_search"){
+ 
+#this fields is just to allow the user come back to the search form with all the values  previously entered
+$search{'search_type'} = $query->param('search_type');# this is the panel type
+push @forminputs, {field => 'search_type', value => $search{'search_type'}};
+
+
+	($template, $borrowernumber, $cookie)
+		= get_template_and_user({template_name => "catalogue/news_searchresults.tmpl",
+					 query => $query,
+					 type => "intranet",
+					 authnotrequired => 1,
+	});
+
+	$search{'from'} = 'intranet';
+	$search{'borrowernumber'} = $borrowernumber;
+	$search{'remote_IP'} = $query->remote_addr();
+	$search{'remote_URL'} = $query->url(-query=>1);
+	$search{'searchdesc'} = \@searchdesc;
+	$template->param(FORMINPUTS => \@forminputs);
+	$template->param(reorder => $query->param('reorder'));
+	$template->param(facetsdesc=>$facetsdesc);
+	# do the searchs ....
+	 $number_of_results = 10 unless $number_of_results;
+	my $startfrom=$query->param('startfrom');
+	($startfrom) || ($startfrom=0);
+my ($count, at results,$facets);
+
+
+
+my @oConnection;
+my $oResult;
+my $s=0;
+my $server;							
+my @serverhost;
+my @serverquery;
+my $serverquery;							
+my @onlineloop;
+my $numberpending;
+my $even=1;			
+ 	my $noconnection=0;
+	
+							
+	
+	 $oConnection[0]=C4::Context->Zconn("cyprus");
+	
+my $keyattr=MARCfind_attr_from_kohafield($kohafield[0]) if ($kohafield[0]);
+	if (!$keyattr){$keyattr=" \@attr 1=any";}
+ $serverquery=$keyattr." ".$relation[0]." \"".$value[0]."\"";		
+
+$serverquery=new ZOOM::Query::PQF($serverquery);
+
+my $firstresult=1;
+ 
+
+if ($reorder){
+$serverquery->sortby($reorder);
+}else{
+$serverquery->sortby("date i>");
+}
+$oResult = $oConnection[0]->search($serverquery);
+AGAIN:
+ my $k;
+my $event;
+  while (($k = ZOOM::event(\@oConnection)) != 0) {
+	$event = $oConnection[$k-1]->last_event();
+# warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
+	last if $event == ZOOM::Event::ZEND;
+   }
+if ($k != 0) {
+	$k--;
+#warn $serverhost[$k];
+	 my($error, $errmsg, $addinfo, $diagset) = $oConnection[$k]->error_x();
+   	if ($error) {
+	warn "newsquery error $serverquery: $errmsg ($error) $addinfo\n";
+  	}
+	
+	my $numresults=$oResult->size() ;								
+ 									
+
+	if ($numresults>0){
+	$count=$numresults;
+		
+my $ri=0;
+	my $z=0;
+
+	$ri=$startfrom if $startfrom;
+		for ( $ri; $ri<$numresults ; $ri++){
+
+		my $xmlrecord=$oResult->record($ri)->raw();
+		$xmlrecord=Encode::decode("utf8",$xmlrecord);
+			 $xmlrecord=XML_xml2hash_news($xmlrecord);
+			$z++;
+#warn unpack('U',$xmlrecord->{title});
+
+			$xmlrecord->{title}="No title" if ( unpack('U',$xmlrecord->{title})==65279) ;
+			$xmlrecord->{date}=format_date($xmlrecord->{date});
+			push @results,$xmlrecord;
+			last if ($number_of_results &&  $z>=$number_of_results);
+			
+	
+		}## for #numresults	
+
+						
+	}# $numresults
+
+}# if $k !=0
+
+
+
+
+
+
+	if ( $count eq "error"){
+	$template->param(error =>1);
+	goto "show";
+	}
+	my $num = scalar(@results) - 1;
+if ( $count == 1){
+    # if its a barcode search by definition we will only have one result.
+    # And if we have a result
+    # lets jump straight to the detail.pl page
+
+    print $query->redirect("/cgi-bin/koha/catalogue/newsdetail.pl?type=intra&id=$results[0]->{'id'}");
+	
+}
+	# sorting out which results to display.
+		# the total results searched
+	$template->param(numrecords => $count);
+	$template->param(FORMINPUTS => \@forminputs );
+	$template->param(searchdesc => \@searchdesc );
+
+	# the result number to star to show
+	$template->param(startfrom => $startfrom);
+	$template->param(beginning => $startfrom+1);
+	# the result number to end to show
+	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
+
+	
+ 	$template->param(SEARCH_RESULTS => \@results,
+			);
+
+	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
+	my $numbers;
+	@$numbers = ();
+	my $pg = 1;
+	if (defined($query->param('pg'))) {
+		$pg = $query->param('pg');
+	}
+	my $start = 0;
+	
+	$start = ($pg - 1) * $number_of_results;
+	my $pages = ceil($count / $number_of_results);
+	my $total_pages = ceil($count / $number_of_results);
+
+	if ($pg > 1) {
+		my $url = $pg - 1;
+		push @$numbers, { number => "&lt;&lt;",  forminputs=>\@forminputs,
+					      highlight => 0 , 
+					      startfrom => 1, 
+					      pg => '1' };
+		push @$numbers, { number => "&lt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results+1, 
+						  pg => $url };
+	}
+	my $current_ten = $pg / 10;
+	if ($current_ten == 0) {
+		 $current_ten = 0.1;           # In case it´s in ten = 0
+	} 
+	my $from = $current_ten * 10; # Calculate the initial page
+	my $end_ten = $from + 9;
+	my $to;
+	if ($pages > $end_ten) {
+		$to = $end_ten;
+	} else {
+		$to = $pages;
+	}
+	for (my $i = $from; $i <= $to ; $i++) {
+		if ($i == $pg) {   
+			if ($count > $number_of_results) {
+				push @$numbers, { number => $i, 
+								  highlight => 1 , forminputs=>\@forminputs,
+								  startfrom => ($i-1)*$number_of_results , 
+								  pg => $i };
+			}
+		} else {
+			push @$numbers, { number => $i, 
+							  highlight => 0 , forminputs=>\@forminputs,
+							  startfrom => ($i-1)*$number_of_results , 
+							  pg => $i };
+		}
+	}	        					
+	if ($pg < $pages) {
+		my $url = $pg + 1;
+		push @$numbers, { number => "&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results, 
+						  pg => $url };
+		push @$numbers, { number => "&gt;&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($total_pages-1)*$number_of_results, 
+						  pg => $total_pages};
+	}
+#	push @$numbers,{forminputs=>@forminputs};
+	$template->param(numbers =>$numbers,
+			);
+	#show the virtual shelves
+	#my $results = &GetShelfList($borrowernumber);
+	#$template->param(shelvescount => scalar(@{$results}));
+	#$template->param(shelves => $results);
+ 
+########
+
+	$template->param(script => "catalogue/newsdetail.pl");
+
+
+}else{ ## No search yet
+print $query->redirect("/cgi-bin/koha/catalogue/catalogue-search.pl");
+}
+
+show:
+output_html_with_http_headers $query, $cookie, $template->output();
+

Index: catalogue/detail.pl
===================================================================
RCS file: catalogue/detail.pl
diff -N catalogue/detail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/detail.pl	26 Mar 2007 02:19:21 -0000	1.10.2.2
@@ -0,0 +1,81 @@
+#!/usr/bin/perl
+use strict;
+use C4::Search;
+use C4::Auth;
+use C4::Serials; #uses getsubscriptionfrom biblionumber
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Biblio;
+use C4::Context;
+
+my $dbh=C4::Context->dbh;
+my $query=new CGI;
+my ($template, $borrowernumber, $cookie) 
+    = get_template_and_user({template_name => "catalogue/detail.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 1,
+			     flagsrequired => {borrow => 1},
+			     });
+
+my $biblionumber=$query->param('biblionumber');
+
+$template->param(biblionumber => $biblionumber,);
+my $retrieve_from=C4::Context->preference('retrieve_from');
+my ($record,$frameworkcode);
+my @itemrecords;
+my @items;
+if ($retrieve_from eq "zebra"){
+($record, at itemrecords)=ZEBRAgetrecord($biblionumber);
+}else{
+ $record =XMLgetbiblio($dbh,$biblionumber);
+$record=XML_xml2hash_onerecord($record);
+my @itemxmls=XMLgetallitems($dbh,$biblionumber);
+	foreach my $itemrecord(@itemxmls){
+	my $itemhash=XML_xml2hash_onerecord($itemrecord);
+	push @itemrecords, $itemhash;
+	}
+}	
+
+my $dat = XMLmarc2koha_onerecord($dbh,$record,"biblios");
+$dat->{biblionumber}=$biblionumber unless $dat->{biblionumber};
+my $norequests = 1;
+foreach my $itemrecord (@itemrecords){
+
+my $item= XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
+$item=ItemInfo($dbh,$item);
+$item->{itemtype}=$dat->{itemtype};
+  $norequests = 0 unless $item->{'notforloan'};
+   $item->{$item->{'publictype'}} = 1; ## NOT sure what this is kept from old db probably useless now
+push @items,$item;
+}
+
+my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
+
+$dat->{'count'}=@items;
+$template->param(count =>$dat->{'count'});
+$template->param(norequests => $norequests);
+
+  ## get notes subjects and URLS from MARC record
+	
+	my $marcflavour = C4::Context->preference("marcflavour");
+	my $marcnotesarray = &getMARCnotes($dbh,$record,$marcflavour);
+	my $marcsubjctsarray = &getMARCsubjects($dbh,$record,$marcflavour);
+	my $marcurlssarray = &getMARCurls($dbh,$record,$marcflavour);
+	$template->param(MARCURLS => $marcurlssarray);
+	$template->param(MARCNOTES => $marcnotesarray);
+	$template->param(MARCSUBJCTS => $marcsubjctsarray);
+
+
+my @results = ($dat,);
+
+my $resultsarray=\@results;
+my $itemsarray=\@items;
+
+
+$template->param(BIBLIO_RESULTS => $resultsarray,
+				ITEM_RESULTS => $itemsarray,
+				subscriptionsnumber => $subscriptionsnumber,
+);
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: catalogue/detailprint.pl
===================================================================
RCS file: catalogue/detailprint.pl
diff -N catalogue/detailprint.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/detailprint.pl	26 Mar 2007 02:19:21 -0000	1.3.2.2
@@ -0,0 +1,97 @@
+#!/usr/bin/perl
+# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+use strict;
+use C4::Search;
+use C4::Auth;
+use C4::Serials; #uses getsubscriptionfrom biblionumber
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Biblio;
+use C4::Context;
+
+my $dbh=C4::Context->dbh;
+my $query=new CGI;
+my ($template, $borrowernumber, $cookie) 
+    = get_template_and_user({template_name => "catalogue/detailprint.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 1,
+			     flagsrequired => {borrow => 1},
+			     });
+
+my $biblionumber=$query->param('biblionumber');
+$template->param(biblionumber => $biblionumber);
+my $retrieve_from=C4::Context->preference('retrieve_from');
+my ($record,$frameworkcode);
+my @itemrecords;
+my @items;
+if ($retrieve_from eq "zebra"){
+($record, at itemrecords)=ZEBRAgetrecord($biblionumber);
+}else{
+ $record =XMLgetbiblio($dbh,$biblionumber);
+$record=XML_xml2hash_onerecord($record);
+my @itemxmls=XMLgetallitems($dbh,$biblionumber);
+	foreach my $itemrecord(@itemxmls){
+	my $itemhash=XML_xml2hash_onerecord($itemrecord);
+	push @itemrecords, $itemhash;
+	}
+}	
+
+my $dat = XMLmarc2koha_onerecord($dbh,$record,"biblios");
+my $norequests = 1;
+foreach my $itemrecord (@itemrecords){
+
+my $item= XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
+$item=ItemInfo($dbh,$item);
+$item->{itemtype}=$dat->{itemtype};
+  $norequests = 0 unless $item->{'notforloan'};
+   $item->{$item->{'publictype'}} = 1; ## NOT sure what this is kept from old db probably useless now
+push @items,$item;
+}
+
+my $subscriptionsnumber = GetSubscriptionsFromBiblionumber($biblionumber);
+
+$dat->{'count'}=@items;
+$template->param(count =>$dat->{'count'});
+$template->param(norequests => $norequests);
+
+  ## get notes subjects and URLS from MARC record
+	
+	my $marcflavour = C4::Context->preference("marcflavour");
+	my $marcnotesarray = &getMARCnotes($dbh,$record,$marcflavour);
+	my $marcsubjctsarray = &getMARCsubjects($dbh,$record,$marcflavour);
+	my $marcurlssarray = &getMARCurls($dbh,$record,$marcflavour);
+	$template->param(MARCURLS => $marcurlssarray);
+	$template->param(MARCNOTES => $marcnotesarray);
+	$template->param(MARCSUBJCTS => $marcsubjctsarray);
+
+
+my @results = ($dat,);
+
+my $resultsarray=\@results;
+my $itemsarray=\@items;
+
+
+$template->param(BIBLIO_RESULTS => $resultsarray,
+				ITEM_RESULTS => $itemsarray,
+				subscriptionsnumber => $subscriptionsnumber,
+);
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: catalogue/moredetail.pl
===================================================================
RCS file: catalogue/moredetail.pl
diff -N catalogue/moredetail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/moredetail.pl	26 Mar 2007 02:19:21 -0000	1.9.2.2
@@ -0,0 +1,201 @@
+#!/usr/bin/perl
+# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
+
+# $Id: moredetail.pl,v 1.9.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2003 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Koha;
+use CGI;
+use C4::Search;
+use C4::Acquisition;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Date;
+use C4::Context;
+use C4::Biblio;
+use C4::Accounts2;
+use C4::Circulation::Circ2;
+
+my $dbh=C4::Context->dbh;
+my $query=new CGI;
+
+
+my ($template, $loggedinuser, $cookie) = get_template_and_user({
+	template_name   => ( 'catalogue/moredetail.tmpl'),
+	query           => $query,
+	type            => "intranet",
+	authnotrequired => 0,
+	flagsrequired   => {catalogue => 1},
+    });
+
+# get variables
+my $op=$query->param('op');
+my $lost=$query->param('lost');
+my $withdrawn=$query->param('withdrawn');
+my $override=$query->param('override');
+my $itemnumber=$query->param('itemnumber');
+my $barcode=$query->param('barcode');
+
+my $title=$query->param('title');
+my $biblionumber=$query->param('biblionumber');
+my ($record)=XMLgetbibliohash($dbh,$biblionumber);
+my $data=XMLmarc2koha_onerecord($dbh,$record,"biblios");
+my $dewey = $data->{'dewey'};
+# FIXME Dewey is a string, not a number, & we should use a function
+$dewey =~ s/0+$//;
+if ($dewey eq "000.") { $dewey = "";};
+if ($dewey < 10){$dewey='00'.$dewey;}
+if ($dewey < 100 && $dewey > 10){$dewey='0'.$dewey;}
+if ($dewey <= 0){
+      $dewey='';
+}
+$dewey=~ s/\.$//;
+$data->{'dewey'}=$dewey;
+
+my @results;
+
+my @items;
+if ($op eq "update"){
+my $env;
+##Do Lost or Withdraw here
+my $flag=0;
+  my ($resbor,$resrec)=C4::Reserves2::CheckReserves($env,$dbh,$itemnumber);
+if ($override ne "yes"){
+  if ($resbor){
+#    print $query->header;
+    $template->param(error => "This item   has a reserve on it");
+ $template->param(biblionumber =>$biblionumber);
+ $template->param(itemnumber =>$itemnumber);
+ $template->param(lost =>$lost);
+ $template->param(withdrawn =>$withdrawn);
+    $flag=1;
+  }
+  my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and (returndate is null)");
+  $sth->execute($itemnumber);
+ 
+  if (my $data=$sth->fetchrow_hashref) {
+   $template->param(biblionumber =>$biblionumber);
+ $template->param(itemnumber =>$itemnumber);
+ $template->param(error => "This item   is On Loan to a member");
+ $template->param(lost =>$lost);
+ $template->param(withdrawn =>$withdrawn);
+    $flag=2;
+  }
+  my $sth=$dbh->prepare("Select * from reserveissue where (itemnumber=?) and (rettime is null)");
+  $sth->execute($itemnumber);
+ 
+  if (my $data=$sth->fetchrow_hashref) {
+   $template->param(biblionumber =>$biblionumber);
+ $template->param(itemnumber =>$itemnumber);
+ $template->param(error => "This item   is On Loan to a member");
+ $template->param(lost =>$lost);
+ $template->param(withdrawn =>$withdrawn);
+    $flag=2;
+  }
+}
+if ($flag != 0 && $override ne "yes"){
+
+  }else {
+   ##UPDATE here
+
+XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'wthdrawn',$withdrawn,1);
+XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',$lost);
+
+     if ($lost ==1 && $flag ==2){
+    my $sth=$dbh->prepare("Select * from issues where (itemnumber=?) and (returndate is null)");
+    $sth->execute($itemnumber);
+    my $data=$sth->fetchrow_hashref;
+my $sth3=$dbh->prepare("Select * from reserveissue where (itemnumber=?) and (rettime is null)");
+    $sth3->execute($itemnumber);
+    my $data2=$sth3->fetchrow_hashref;
+    if ($data->{'borrowernumber'} ne '' || $data2->{'borrowernumber'} ne '') {
+my $borrowernumber=$data->{'borrowernumber'} if $data->{'borrowernumber'};
+$borrowernumber=$data2->{'borrowernumber'} if $data2->{'borrowernumber'};
+      #item on issue add replacement cost to borrowers record
+      my $accountno=getnextacctno($env,$data->{'borrowernumber'},$dbh);
+      my $item=getiteminformation($env, $itemnumber);
+	my $replacementprice=60 unless $item->{'replacementprice'};
+      my $sth2=$dbh->prepare("Insert into accountlines
+      (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
+      values
+      (?,?,now(),?,?,'L',?,?)");
+      $sth2->execute($borrowernumber,$accountno,$replacementprice,
+      "Lost Item $item->{'title'} $item->{'barcode'}",
+      $replacementprice,$itemnumber);
+      $sth2->finish;
+       $sth3->finish;
+     $sth->finish;
+    }
+    }
+	if ($flag==1){
+	foreach my $res ($resrec){
+	C4::Reserves2::CancelReseve(undef,$res->{itemnumber},$res->{borrowernumber});
+	}
+	}
+    
+  }
+}
+my @itemrecords=XMLgetallitems($dbh,$biblionumber);
+foreach my $itemrecord (@itemrecords){
+$itemrecord=XML_xml2hash_onerecord($itemrecord);
+my $items = XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
+$items->{itemtype}=$data->{itemtype};
+$items->{biblionumber}=$biblionumber;
+$items=itemissues($dbh,$items,$items->{'itemnumber'});
+push @items,$items;
+}
+my $count=@items;
+$data->{'count'}=$count;
+my ($order,$ordernum)=GetOrder($biblionumber,$barcode);
+
+my $env;
+$env->{itemcount}=1;
+
+$results[0]=$data;
+
+foreach my $item (@items){
+    $item->{'replacementprice'}=sprintf("%.2f", $item->{'replacementprice'});
+    $item->{'datelastborrowed'}= format_date($item->{'datelastborrowed'});
+    $item->{'dateaccessioned'} = format_date($item->{'dateaccessioned'});
+    $item->{'datelastseen'} = format_date($item->{'datelastseen'});
+    $item->{'ordernumber'} = $ordernum;
+    $item->{'booksellerinvoicenumber'} = $order->{'booksellerinvoicenumber'};
+
+    if ($item->{'date_due'} gt '0000-00-00'){
+	$item->{'date_due'} = format_date($item->{'date_due'});		
+$item->{'issue'}= 1;
+		$item->{'borrowernumber'} = $item->{'borrower'};
+		$item->{'cardnumber'} = $item->{'card'};
+			
+    } else {
+	$item->{'issue'}= 0;
+    }
+}
+
+$template->param(BIBITEM_DATA => \@results);
+$template->param(ITEM_DATA => \@items);
+$template->param(loggedinuser => $loggedinuser);
+
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+# Local Variables:
+# tab-width: 8
+# End:

Index: catalogue/newsdetail.pl
===================================================================
RCS file: catalogue/newsdetail.pl
diff -N catalogue/newsdetail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/newsdetail.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,92 @@
+#!/usr/bin/perl
+use strict;
+
+use CGI;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Koha;
+use C4::Date;
+my $query = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $id = $query->param('id'); #show the search form or execute the search
+my ($template, $borrowernumber, $cookie);
+
+
+
+
+	($template, $borrowernumber, $cookie)
+		= get_template_and_user({template_name => "catalogue/newsdetail.tmpl",
+					 query => $query,
+					 type => "intranet",
+					 authnotrequired => 1,
+	});
+
+	
+my ($count, at results,$facets);
+
+
+
+my @oConnection;
+my $oResult;
+
+my $serverquery;							
+
+	
+							
+	
+	 $oConnection[0]=C4::Context->Zconn("cyprus");
+	
+ $serverquery="\@attr 1=local-number"." \"".$id."\"";	
+
+
+$oResult = $oConnection[0]->search_pqf($serverquery);
+
+ my $k;
+my $event;
+  while (($k = ZOOM::event(\@oConnection)) != 0) {
+	$event = $oConnection[$k-1]->last_event();
+# warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
+	last if $event == ZOOM::Event::ZEND;
+   }
+if ($k != 0) {
+	$k--;
+	 my($error, $errmsg, $addinfo, $diagset) = $oConnection[$k]->error_x();
+   	if ($error) {
+	warn "newsquery error $serverquery: $errmsg ($error) $addinfo\n";
+  	}
+	
+	my $numresults=$oResult->size() ;								
+ 									
+
+	if ($numresults>0){
+	
+		
+
+
+		my $xmlrecord=$oResult->record(0)->raw();
+		$xmlrecord=Encode::decode("utf8",$xmlrecord);
+			 $xmlrecord=XML_xml2hash_news($xmlrecord);
+			
+			$xmlrecord->{date}=format_date($xmlrecord->{date});
+			$xmlrecord->{news}=~s/\n/<br>/g;
+			$xmlrecord->{news}=~s/(<br><br>)/<br>/g;
+$template->param(title=>$xmlrecord->{title},
+		date=>$xmlrecord->{date},
+		source=>$xmlrecord->{source},
+		news=>$xmlrecord->{news});
+	
+	}# $numresults
+
+}# if $k !=0
+
+
+
+
+
+
+
+show:
+output_html_with_http_headers $query, $cookie, $template->output();
+

Index: catalogue/search.pl
===================================================================
RCS file: catalogue/search.pl
diff -N catalogue/search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ catalogue/search.pl	26 Mar 2007 02:19:21 -0000	1.3.2.1
@@ -0,0 +1,419 @@
+#!/usr/bin/perl
+use strict;
+
+use CGI;
+use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Koha;
+use POSIX qw(ceil floor);
+#binmode ">:utf8";
+my $query = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $op = $query->param('op'); #show the search form or execute the search
+
+my $format=$query->param('MARC');
+my ($template, $borrowernumber, $cookie);
+
+# get all the common search variables, 
+my @value=$query->param('value');
+my @kohafield=$query->param('kohafield');
+my @and_or=$query->param('and_or');
+my @relation=$query->param('relation');
+my $order=$query->param('order');
+my $reorder=$query->param('reorder');
+my $number_of_results=$query->param('number_of_results');
+my $zoom=$query->param('zoom');
+my $ascend=$query->param('asc');
+my $searchtype=$query->param('searchtype'); ## this is actual query type
+my $serverid=$query->param('serverid');
+$serverid=-1 unless($serverid eq "0"  || $serverid>0);
+my @marclist = $query->param('marclist');
+my $basename=$query->param('basename');
+# collect all the fields ...
+my %search;
+my @forminputs;		#this is for the links to navigate among the results
+my (@searchdesc, %hashdesc,$facetsdesc); 	#this is to show the description of the current search
+my @fields = ('value', 'kohafield', 'and_or', 'relation','order','barcode','biblionumber','itemnumber','asc','from','searchtype');
+
+###Collect all the marclist values coming from old Koha MARCdetails
+## Although we can not search on all marc fields- if any is matched in Zebra we can use it 
+my $sth=$dbh->prepare("Select kohafield from koha_attr where tagfield=? and tagsubfield=? and intrashow=1");
+foreach my $marc (@marclist) {
+		if ($marc) {
+		$sth->execute(substr($marc,0,3),substr($marc,3,1));
+			if ((my $kohafield)=$sth->fetchrow){
+			push @kohafield,$kohafield;
+			push @and_or,"\@or";
+			push @value, at value[0] if @kohafield>1;
+			push @relation ,"\@attr 5=1";
+			}
+		}
+}
+#### Now   normal search routine
+foreach my $field (@fields) {
+	$search{$field} = $query->param($field);
+	my @fieldvalue = $query->param($field);
+	foreach my $fvalue (@fieldvalue) {
+		push @forminputs, { field=>$field ,value=> $fvalue} unless ($field eq 'reorder');
+		
+	  }
+}
+## Build the query for facets as well
+ for (my $i=0;$i<@value;$i++){
+$facetsdesc.="&value=".$value[$i];
+$facetsdesc.="&kohafield=".$kohafield[$i];
+$facetsdesc.="&relation=".$relation[$i];
+$facetsdesc.="&and_or=".$and_or[$i];
+}
+$facetsdesc.="&order=".$order;
+$hashdesc{'query'} = join " , ", @value;
+push @searchdesc,\%hashdesc;
+
+
+############################################################################
+if ($op eq "do_search"){
+ 
+#this fields is just to allow the user come back to the search form with all the values  previously entered
+$search{'search_type'} = $query->param('search_type');# this is the panel type
+push @forminputs, {field => 'search_type', value => $search{'search_type'}};
+
+
+	($template, $borrowernumber, $cookie)
+		= get_template_and_user({template_name => "catalogue/searchresults.tmpl",
+					 query => $query,
+					 type => "intranet",
+					 authnotrequired => 1,
+	});
+
+	$search{'from'} = 'intranet';
+	$search{'borrowernumber'} = $borrowernumber;
+	$search{'remote_IP'} = $query->remote_addr();
+	$search{'remote_URL'} = $query->url(-query=>1);
+	$search{'searchdesc'} = \@searchdesc;
+	$template->param(FORMINPUTS => \@forminputs);
+	$template->param(reorder => $query->param('reorder'));
+	$template->param(facetsdesc=>$facetsdesc);
+	# do the searchs ....
+	 $number_of_results = 50 unless $number_of_results;
+	my $startfrom=$query->param('startfrom');
+	($startfrom) || ($startfrom=0);
+my ($count, at results,$facets);
+if ($serverid>0){
+ my $sth=$dbh->prepare("select * from online_databases where serverid=?");
+  $sth->execute($serverid);
+
+  my  $server=$sth->fetchrow_hashref ;
+
+my	$serverquery=$server->{search_string};
+	if ($server->{$kohafield[0]} ne ""){
+	$serverquery.=$server->{$kohafield[0]."_query"}.$value[0];
+	}else{
+	$serverquery.=$server->{"any_query"}.$value[0];
+	}
+print $query->redirect($serverquery);
+  
+}##serverid>0
+if ($serverid eq "0"){
+use ZOOM;
+my @oConnection;
+my @oResult;
+my $s=0;
+my $server;							
+my @serverhost;
+my @serverquery;
+my @query;							
+my @onlineloop;
+my $numberpending;
+my $even=1;			
+  my $sth=$dbh->prepare("select * from online_databases ");
+  $sth->execute();
+
+    while ($server=$sth->fetchrow_hashref) {
+	my $noconnection=0;
+	
+							
+	my $option1=new ZOOM::Options();
+	$option1->option(async=>1);
+	$option1->option('elementSetName', 'F');
+	$option1->option('databaseName',$server->{db})  ;
+	$option1->option('user',$server->{userid})  ;
+	$option1->option('password',$server->{password})  ;
+	 $oConnection[$s]=create ZOOM::Connection($option1);
+	$oConnection[$s]->connect($server->{host}, $server->{port});
+	$serverhost[$s]=$server->{server};
+	$serverquery[$s]=$server->{search_string};
+	if ($server->{$kohafield[0]} ne ""){
+	$serverquery[$s].=$server->{$kohafield[0]."_query"}.$value[0];
+	}else{
+	$serverquery[$s].=$server->{"any_query"}.$value[0];
+	}
+ $query[$s]=$server->{$kohafield[0]}." \"".$value[0]."\"";	
+
+	$s++;
+    }## while fetch
+
+ 
+my $nremaining = $s;
+my $firstresult=1;
+ for (my $z=0 ;$z<$s;$z++){
+$oResult[$z] = $oConnection[$z]->search_pqf($query[$z]);
+
+}
+AGAIN:
+ my $k;
+my $event;
+  while (($k = ZOOM::event(\@oConnection)) != 0) {
+	$event = $oConnection[$k-1]->last_event();
+# warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
+	last if $event == ZOOM::Event::ZEND;
+   }
+if ($k != 0) {
+	$k--;
+#warn $serverhost[$k];
+	 my($error, $errmsg, $addinfo, $diagset) = $oConnection[$k]->error_x();
+   	if ($error) {
+	warn "$k $serverhost[$k] error $query[$k]: $errmsg ($error) $addinfo\n";
+	goto MAYBE_AGAIN;
+  	}
+	
+	my $numresults=$oResult[$k]->size() ;								
+ 									
+
+	if ($numresults>0){
+	
+		
+
+			my %row_data;
+ 	
+	$row_data{even} = $even;
+	$row_data{server} = $serverhost[$k];
+	$row_data{numresults} = $numresults;
+
+	$row_data{search_string} =$serverquery[$k];
+	
+	$even=!$even;
+	push (@onlineloop, \%row_data);
+
+						
+}# $numresults
+
+}# if $k !=0
+
+
+$numberpending=$nremaining-1;
+
+MAYBE_AGAIN:
+if (--$nremaining > 0) {
+    goto AGAIN;
+}
+$template->param(onlineloop=>\@onlineloop,);
+}##serverid==0
+if (!$zoom){
+## using sql search for barcode,biblionumber or itemnumber only useful for libraian interface
+	($count, @results) =sqlsearch($dbh,\%search);
+}else{
+my $sortorder=$order.$ascend if $order;
+ ($count,$facets, at results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,$sortorder, \@and_or, 1,$reorder,$startfrom, $number_of_results,"intranet",$searchtype);
+}
+	if ( $count eq "error"){
+	$template->param(error =>1);
+	goto "show";
+	}
+	my $num = scalar(@results) - 1;
+if ( $count == 1){
+    # if its a barcode search by definition we will only have one result.
+    # And if we have a result
+    # lets jump straight to the detail.pl page
+	if ($format eq '1') {
+    print $query->redirect("/cgi-bin/koha/catalogue/MARCdetail.pl?type=intra&biblionumber=$results[0]->{'biblionumber'}");
+	}else{
+    print $query->redirect("/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=$results[0]->{'biblionumber'}");
+	}
+}
+	# sorting out which results to display.
+		# the total results searched
+	$template->param(numrecords => $count);
+	$template->param(FORMINPUTS => \@forminputs );
+	$template->param(searchdesc => \@searchdesc );
+if ($basename){
+# Printing to a csv file
+open(OUT,">:utf8" ,"$basename.csv") or die $!;
+#		print $query->header(-type => 'application/EXCEL',-charset=>"utf-8",
+#			-attachment=>"$basename.csv",
+#			-filename=>"$basename.csv" );
+#		
+		my $sep;
+		$sep =C4::Context->preference("delimiter");
+
+			print OUT "Title".$sep."Author".$sep."Issuecount";
+		print OUT "\n";
+# Table
+		foreach my $line ( @results) {
+		
+			print OUT $line->{title}.$sep.$line->{author}.$sep.$line->{totalissue};
+
+ 			print OUT "\n";
+	 	}
+close(OUT);
+    print $query->redirect("/cgi-bin/koha/catalogue/search.pl");
+
+}
+
+if ($serverid==-1){
+	# the result number to star to show
+	$template->param(startfrom => $startfrom);
+	$template->param(beginning => $startfrom+1);
+	# the result number to end to show
+	($startfrom+$num<=$count) ? ($template->param(endat => $startfrom+$num+1)) : ($template->param(endat => $count));
+
+	
+ 	$template->param(SEARCH_RESULTS => \@results,
+			facets_loop => $facets,
+			);
+
+	#this is to show the images numbers to navigate among the results, if it has to show the number highlighted or not
+	my $numbers;
+	@$numbers = ();
+	my $pg = 1;
+	if (defined($query->param('pg'))) {
+		$pg = $query->param('pg');
+	}
+	my $start = 0;
+	
+	$start = ($pg - 1) * $number_of_results;
+	my $pages = ceil($count / $number_of_results);
+	my $total_pages = ceil($count / $number_of_results);
+
+	if ($pg > 1) {
+		my $url = $pg - 1;
+		push @$numbers, { number => "&lt;&lt;", , forminputs=>\@forminputs,
+					      highlight => 0 , 
+					      startfrom =>0, 
+					      pg => '1' };
+		push @$numbers, { number => "&lt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results+1, 
+						  pg => $url };
+	}
+	my $current_ten = $pg / 10;
+	if ($current_ten == 0) {
+		 $current_ten = 0.1;           # In case it´s in ten = 0
+	} 
+	my $from = $current_ten * 10; # Calculate the initial page
+	my $end_ten = $from + 9;
+	my $to;
+	if ($pages > $end_ten) {
+		$to = $end_ten;
+	} else {
+		$to = $pages;
+	}
+	for (my $i = $from; $i <= $to ; $i++) {
+		if ($i == $pg) {   
+			if ($count > $number_of_results) {
+				push @$numbers, { number => $i, 
+								  highlight => 1 , forminputs=>\@forminputs,
+								  startfrom => ($i-1)*$number_of_results , 
+								  pg => $i };
+			}
+		} else {
+			push @$numbers, { number => $i, 
+							  highlight => 0 , forminputs=>\@forminputs,
+							  startfrom => ($i-1)*$number_of_results , 
+							  pg => $i };
+		}
+	}	        					
+	if ($pg < $pages) {
+		my $url = $pg + 1;
+		push @$numbers, { number => "&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($url-1)*$number_of_results, 
+						  pg => $url };
+		push @$numbers, { number => "&gt;&gt;", 
+						  highlight => 0 , forminputs=>\@forminputs,
+						  startfrom => ($total_pages-1)*$number_of_results, 
+						  pg => $total_pages};
+	}
+#	push @$numbers,{forminputs=>@forminputs};
+	$template->param(numbers =>$numbers,
+			);
+	#show the virtual shelves
+	#my $results = &GetShelfList($borrowernumber);
+	#$template->param(shelvescount => scalar(@{$results}));
+	#$template->param(shelves => $results);
+ 
+########
+if ($format eq '1') {
+	$template->param(script => "catalogue/MARCdetail.pl");
+}else{
+	$template->param(script => "catalogue/detail.pl");
+}
+}#serverid==-1
+}else{ ## No search yet
+($template, $borrowernumber, $cookie)
+		= get_template_and_user({template_name => "catalogue/search.tmpl",
+					query => $query,
+					type => "intranet",
+					authnotrequired => 1,
+				});
+#show kohafields
+	my $kohafield = $query->param('kohafield');
+	my ($fieldcount, at kohafields)=getkohafields();
+	foreach my $row (@kohafields) {
+		if ($kohafield eq $row->{'kohafield'}) {
+			$row->{'sel'} = 1;
+		}
+	}
+	$template->param(kohafields => \@kohafields);
+##show sorting fields
+my @sorts;
+ $order=$query->param('order');
+	foreach my $sort (@kohafields) {
+	    if ($sort->{sorts}){
+		push @sorts,$sort;
+		if ($order eq $sort->{'kohafield'}) {
+			$sort->{'sel'} = 1;
+		}
+	   }
+	}
+	$template->param(sorts => \@sorts);
+# load the branches
+my @branches = GetallBranches();
+$template->param(branchloop => \@branches,);
+
+# load the itemtypes 
+my $itemtypes=GetItemTypes();
+my (@item_type_loop);
+foreach my $thisitemtype (sort keys %$itemtypes) {
+    my %row =(itemtype => $thisitemtype,
+                 description => $itemtypes->{$thisitemtype}->{'description'},
+            );
+    push @item_type_loop, \%row;
+}
+##Show catalogues
+my $sth=$dbh->prepare("select serverid,server from online_databases");
+$sth->execute();
+my @serverloop;
+while (my $server=$sth->fetchrow_hashref) {
+my %temploop;
+$temploop{server}=$server->{server};
+$temploop{serverid}=$server->{serverid};
+
+push (@serverloop, \%temploop);
+}
+$sth->finish;
+$template->param(	servers => \@serverloop,);
+$template->param(itemtypeloop=>\@item_type_loop,);
+my $search_type = $query->param('search_type');
+	if ((!$search_type) || ($search_type eq 'zoom'))  {
+		$template->param(zoom_search => 1);
+	} else{
+		$template->param(sql_search => 1);
+	} 
+}
+
+show:
+output_html_with_http_headers $query, $cookie, $template->output();
+1;

Index: cataloguing/addbiblio.pl
===================================================================
RCS file: cataloguing/addbiblio.pl
diff -N cataloguing/addbiblio.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cataloguing/addbiblio.pl	26 Mar 2007 02:19:21 -0000	1.19.2.2
@@ -0,0 +1,291 @@
+#!/usr/bin/perl
+
+# $Id: addbiblio.pl,v 1.19.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Search; # also includes Biblio.pm, Search is used to FindDuplicate
+use C4::Context;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+use MARC::Record;
+use MARC::File::USMARC;
+my $format="USMARC";
+$format="UNIMARC" if (C4::Context->preference('marcflavour') eq 'UNIMARC');
+use MARC::File::XML(RecordFormat =>$format);
+use Encode;
+use C4::Biblioadd;
+####
+my $dbh = C4::Context->dbh;
+my $authorised_values_sth = $dbh->prepare("select authorised_value,lib
+		from authorised_values
+		where category=? order by lib");
+my $BIG_LOOP;
+my $addedfield;
+###Declare all globals
+my $input = new CGI;
+my $logstatus=C4::Context->preference('Activate_log');
+my $xml;
+my $itemtype; # created here because it can be used in build_authorized_values_list sub
+my $fromserials=$input->param('fromserials');## if a serial is being added do not display navigation menus
+
+my $error = $input->param('error');
+my $oldbiblionumber=$input->param('oldbiblionumber'); # if bib exists, it's a modif, not a new biblio.
+my $breedingid = $input->param('breedingid');
+my $z3950 = $input->param('z3950');
+my $DVDid=$input->param('DVDid');
+my $op = $input->param('op');
+my $duplicateok = $input->param('duplicateok');
+my $suggestionid=$input->param('suggestionid');
+my $frameworkcode = $input->param('frameworkcode');
+
+my $biblionumber;
+
+
+###Find related tags for Z3950 searches- required  by template
+my($isbntag,$isbnsub)=MARCfind_marc_from_kohafield("isbn","biblios");
+my($issntag,$issnsub)=MARCfind_marc_from_kohafield("issn","biblios");
+my($titletag,$titlesub)=MARCfind_marc_from_kohafield("title","biblios");
+my($authortag,$authorsub)=MARCfind_marc_from_kohafield("author","biblios");
+my($urltag,$urlsub)=MARCfind_marc_from_kohafield("url","biblios"); ##DVD search uses this field
+
+# ======================== 
+#          MAIN 
+#=========================
+
+
+$biblionumber=$oldbiblionumber if $oldbiblionumber;
+$frameworkcode='' if ($frameworkcode eq 'Default');
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "cataloguing/addbiblio.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+
+#Getting the list of all frameworks
+my $queryfwk =$dbh->prepare("select frameworktext, frameworkcode from biblios_framework");
+$queryfwk->execute;
+my %select_fwk;
+my @select_fwk;
+my $curfwk;
+push @select_fwk,"Default";
+$select_fwk{"Default"} = "Default";
+while (my ($description, $fwk) =$queryfwk->fetchrow) {
+	push @select_fwk, $fwk;
+	$select_fwk{$fwk} = $description;
+}
+$curfwk=$frameworkcode;
+my $framework=CGI::scrolling_list( -name     => 'Frameworks',
+			-id => 'Frameworks',
+			-default => $curfwk,
+			-OnChange => 'Changefwk(this);',
+			-values   => \@select_fwk,
+			-labels   => \%select_fwk,
+			-size     => 1,
+			-multiple => 0 );
+$template->param( framework => $framework);
+my $xmlhash;
+my $xml;
+#####DO NOT RETRIVE FROM ZEBRA######
+my $record =XMLgetbiblio($dbh,$biblionumber) if ($biblionumber);
+$xmlhash=XML_xml2hash_onerecord($record) if ($biblionumber);
+$frameworkcode=MARCfind_frameworkcode( $dbh, $biblionumber );
+###########
+my $tagslib = &MARCgettagslib($dbh,1,$frameworkcode);
+if ($suggestionid && !$biblionumber){
+my $data=GetSuggestion($suggestionid) ;
+$xml=$data->{xml};
+$xmlhash=XML_xml2hash_onerecord($xml);
+}
+my $encoding="";
+($xmlhash,$encoding) = MARCfindbreeding($dbh,$breedingid,$oldbiblionumber) if ($breedingid);
+($xmlhash) = ImportDVD($DVDid,$oldbiblionumber) if ($DVDid);
+
+my $is_a_modif=0;
+$is_a_modif=1 if $oldbiblionumber; 
+my ($oldbiblionumtagfield,$oldbiblionumtagsubfield);
+if ($biblionumber  && !$z3950) {
+	$is_a_modif=1;
+	# if it's a modif, retrieve old biblionumber for the future modification of old-DB.
+	($oldbiblionumtagfield,$oldbiblionumtagsubfield) = &MARCfind_marc_from_kohafield($dbh,"biblionumber","biblios");
+
+	
+}
+#------------------------------------------------------------------------------------------------------------------------------
+if ($op eq "addbiblio") {
+#------------------------------------------------------------------------------------------------------------------------------
+	# rebuild
+	my @tags = $input->param('tag');
+	my @subfields =$input->param('subfield');
+	my @values=$input->param('field_value');
+	# build indicator hash.
+	my @ind_tag = $input->param('ind_tag');
+	my @indicator = $input->param('indicator');
+	my @tagindex=$input->param('tagindex');
+	
+	
+## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
+### This usually happens with data coming from other Z3950 servers
+## Slows the saving process so comment out at your own risk
+eval{
+ $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,\@tagindex);	
+};
+ if ($@){
+warn $@;
+ $template->param(error             =>1,xmlerror=>1,);
+goto FINAL;
+  };
+my $xmlhash=XML_xml2hash_onerecord($xml);
+	my ($duplicatebiblionumber,$duplicatetitle) = FindDuplicate($xmlhash) if (($op eq "addbiblio") && (!$is_a_modif) && (!$duplicateok));
+	my $confirm_not_duplicate = $input->param('confirm_not_duplicate');
+	# it is not a duplicate (determined either by Koha itself or by user checking it's not a duplicate)
+	if (!$duplicatebiblionumber or $confirm_not_duplicate) {
+		# MARC::Record built => now, record in DB
+		my $oldbibnum;
+		my $oldbibitemnum;
+		if ($is_a_modif) {
+			NEWmodbiblio($dbh,$biblionumber,$xmlhash,$frameworkcode);
+
+		} else {
+
+			($biblionumber) = NEWnewbiblio($dbh,$xmlhash,$frameworkcode);
+
+		}
+	# now, redirect to additem page
+		unless ($fromserials){
+		print $input->redirect("additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode") unless $fromserials;
+		exit;
+		}else{
+		my $title=XML_readline_onerecord($xmlhash,"title","biblios");
+		$template->param(exit=>1,biblionumber=>$biblionumber,title=>$title);
+		goto FINAL;
+		}
+
+	} else {
+FINAL:
+	# it may be a duplicate, warn the user and do nothing
+		build_tabs ($template, $xmlhash, $dbh,$addedfield,$tagslib,$authorised_values_sth);
+
+		$tagslib=build_hidden_data($tagslib);
+		$template->param(fromserials=>$fromserials,
+			oldbiblionumber             => $oldbiblionumber,
+			biblionumber                      => $biblionumber,
+			oldbiblionumtagfield        => $oldbiblionumtagfield,
+			oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
+			duplicatebiblionumber		=> $duplicatebiblionumber,
+			duplicatetitle				=> $duplicatetitle,
+			 );
+	}
+#------------------------------------------------------------------------------------------------------------------------------
+} elsif ($op eq "addfield") {
+#------------------------------------------------------------------------------------------------------------------------------
+	 $addedfield = $input->param('addfield_field');
+	my @tags = $input->param('tag');
+	my @subfields = $input->param('subfield');
+	my @values = $input->param('field_value');
+	# build indicator hash.
+	my @ind_tag = $input->param('ind_tag');
+	my @indicator = $input->param('indicator');
+	my @tagindex=$input->param('tagindex');
+	my $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag,\@tagindex);
+	my $xmlhash=XML_xml2hash_onerecord($xml);
+	# adding an empty field
+	&build_tabs ($template, $xmlhash, $dbh,$addedfield,$tagslib,$authorised_values_sth);
+		$tagslib=build_hidden_data($tagslib);
+#	$template->param(BIG_LOOP=>$BIG_LOOP,);
+	$template->param(
+		oldbiblionumber             => $oldbiblionumber,
+		biblionumber                     => $biblionumber,
+		oldbiblionumtagfield        => $oldbiblionumtagfield,
+		oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
+		fromserials=>$fromserials
+		 );
+} elsif ($op eq "delete") {
+#------------------------------------------------------------------------------------------------------------------------------
+my $sth=$dbh->prepare("select iss.itemnumber from items i ,issues iss where iss.itemnumber=i.itemnumber and iss.returndate is null and  i.biblionumber=?");
+ $sth->execute($biblionumber);
+my $onloan=$sth->fetchrow;
+
+ 	if (!$onloan){	
+	NEWdelbiblio($dbh,$biblionumber);
+print	$input->redirect("/cgi-bin/koha/catalogue/catalogue-search.pl");
+	exit;
+	}else{
+
+$template->param(error            => 1, onloan=>1,);
+	}
+#------------------------------------------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------------------------------------------
+} else {
+#------------------------------------------------------------------------------------------------------------------------------
+
+	# If we're in a duplication case, we have to set to "" the  biblionumber
+	# as we'll save the biblio as a new one.
+	if ($op eq "duplicate")
+	{
+		$biblionumber = "";
+		$oldbiblionumber= "";
+	$template->param(duplicateok            => 1);
+	}
+	build_tabs($template, $xmlhash, $dbh,$addedfield,$tagslib,$authorised_values_sth);
+#		$tagslib=build_hidden_data($tagslib);
+#	$template->param(BIG_LOOP=>$BIG_LOOP,);
+#warn Dumper($xmlhash);
+	$template->param(
+		oldbiblionumber             => $oldbiblionumber,
+		biblionumber                       => $biblionumber,
+		oldbiblionumtagfield        => $oldbiblionumtagfield,
+		oldbiblionumtagsubfield     => $oldbiblionumtagsubfield,
+		fromserials=>$fromserials			
+		);
+}
+$template->param(
+		isbntag             => $isbntag,
+		isbnsub                       => $isbnsub,
+		issntag             => $isbntag,
+		issnsub                       => $issnsub,
+		titletag             => $titletag,
+		titlesub                       => $titlesub,
+		authortag             => $authortag,
+		authorsub                       => $authorsub,
+		urltag             => $urltag,
+		urlsub                       => $urlsub,
+		);
+
+$template->param(
+		frameworkcode => $frameworkcode,
+		itemtype => $frameworkcode, # HINT: if the library has itemtype = framework, itemtype is auto filled !
+		hide_marc => C4::Context->preference('hide_marc'),
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+		advancedMARCEditor => C4::Context->preference("advancedMARCEditor"),
+		);
+
+output_html_with_http_headers $input, $cookie, $template->output;
+
+
+

Index: cataloguing/addbooks.pl
===================================================================
RCS file: cataloguing/addbooks.pl
diff -N cataloguing/addbooks.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cataloguing/addbooks.pl	26 Mar 2007 02:19:21 -0000	1.7.2.2
@@ -0,0 +1,59 @@
+#!/usr/bin/perl
+
+# $Id: addbooks.pl,v 1.7.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Biblio;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+
+my $query = new CGI;
+
+my $error   = $query->param('error');
+my $success = $query->param('biblioitem');
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "cataloguing/addbooks.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { editcatalogue => 1 },
+        debug           => 1,
+    }
+);
+
+# get framework list
+my $frameworks = getframeworks;
+my @frameworkcodeloop;
+foreach my $thisframeworkcode (keys %$frameworks) {
+	my %row =(value => $thisframeworkcode,
+				frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
+			);
+	push @frameworkcodeloop, \%row;
+}
+
+my $marc_p = C4::Context->boolean_preference("marc");
+$template->param( NOTMARC => !$marc_p,
+				frameworkcodeloop => \@frameworkcodeloop );
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: cataloguing/additem.pl
===================================================================
RCS file: cataloguing/additem.pl
diff -N cataloguing/additem.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cataloguing/additem.pl	26 Mar 2007 02:19:21 -0000	1.12.2.2
@@ -0,0 +1,463 @@
+#!/usr/bin/perl
+
+# $Id: additem.pl,v 1.12.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Context;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+
+use C4::Koha; # XXX subfield_is_koha_internal_p
+use C4::Search;
+use C4::Circulation::Circ2;
+use C4::Log;
+my $logstatus=C4::Context->preference('Activate_log');
+
+sub find_value {
+	my ($tagfield,$insubfield,$record) = @_;
+	my $result;
+	my $indicator;
+my $item=$record->{datafield};
+my $controlfield=$record->{controlfield};
+my $leader=$record->{leader};
+ if ($tagfield eq '000'){
+## We are getting the leader
+$result=$leader->[0];
+return($indicator,$result);
+}
+     if ($tagfield <10){
+	foreach my $control (@$controlfield) {
+		if ($control->{tag} eq $tagfield){
+		$result.=$control->{content};
+		}
+	}
+      }else{
+	foreach my $field (@$item) {		
+	      if ($field->{tag} eq $tagfield){	
+		    foreach my $subfield ( $field->{'subfield'}){
+		       foreach my $code ( @$subfield){
+			if ($code->{code} eq $insubfield) {
+				$result .= $code->{content};
+				$indicator = $field->{ind1}.$field->{ind2};
+			}
+		      }## each code
+		  }##each subfield
+	      }## if tag
+	}### $field
+     }## tag<10
+	return($indicator,$result);
+}
+my $input = new CGI;
+my $dbh = C4::Context->dbh;
+my $error = $input->param('error');
+my $biblionumber = $input->param('biblionumber');
+my $oldbiblionumber =$biblionumber;
+my $frameworkcode=$input->param('frameworkcode');
+my $op = $input->param('op');
+my $itemnumber = $input->param('itemnumber');
+my $fromserials=$input->param('fromserials');## if a serial is being added do not display navigation menus
+my $serialid=$input->param('serialid');
+my @itemrecords; ##Builds existing items
+my $bibliorecord; #Bibliorecord relared to this item
+my $newrecord; ## the new record buing built
+my $itemrecexist; #item record we are editing
+my $xml; ## data on html
+ $frameworkcode=MARCfind_frameworkcode($dbh,$biblionumber) unless $frameworkcode;
+my $tagslib = &MARCitemsgettagslib($dbh,1,$frameworkcode);
+my $itemrecord;
+my $nextop="additem";
+my @errors; # store errors found while checking data BEFORE saving item.
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "cataloguing/additem.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+
+my $userenv=C4::Context->userenv;
+#------------------------------------------------------------------------------------------------------------------------------
+if ($op eq "additem") {
+#------------------------------------------------------------------------------------------------------------------------------
+	# rebuild
+
+	my @tags = $input->param('tag');
+	my @subfields = $input->param('subfield');
+	my @values = $input->param('field_value');
+	# build indicator hash.
+	my @ind_tag = $input->param('ind_tag');
+	my @indicator = $input->param('indicator');
+	my %indicators;
+	for (my $i=0;$i<=$#ind_tag;$i++) {
+		$indicators{$ind_tag[$i]} = $indicator[$i];
+	}
+## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
+### This usually happens with data coming from other Z3950 servers
+## Slows the saving process so comment out at your own risk
+eval{
+ $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
+};
+ if ($@){
+push @errors,"non_utf8" ;
+$nextop = "additem";
+goto FINAL;
+  };
+ my $newrecord=XML_xml2hash_onerecord($xml);
+my $newbarcode=XML_readline_onerecord($newrecord,"barcode","holdings");	
+
+	# if autoBarcode is ON, calculate barcode...
+	if (C4::Context->preference('autoBarcode')) {	
+		unless ($newbarcode) {
+			my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items");
+			$sth_barcode->execute;
+			($newbarcode) = $sth_barcode->fetchrow;
+			$newbarcode++;
+			# OK, we have the new barcode, now create the entry in MARC record
+			$newrecord=XML_writeline( $newrecord, "barcode", $newbarcode,"holdings" );
+		}
+	}
+# check for item barcode # being unique
+	my ($oldrecord)=XMLgetitem($dbh,"",$newbarcode);
+	
+	push @errors,"barcode_not_unique" if($oldrecord);
+# MARC::Record builded => now, record in DB
+## User may be keeping serialids in marc records -- check and add it 
+if ($fromserials){
+$newrecord=XML_writeline( $newrecord, "serialid", $serialid,"holdings" );
+}
+	# if barcode exists, don't create, but report the problem.
+	unless ($oldrecord){
+	  $itemnumber=NEWnewitem($dbh,$newrecord,$biblionumber) ;
+		if ($fromserials){
+		my $holdingbranch=XML_readline_onerecord($newrecord,"holdingbranch","holdings");	
+		$template->param(exit=>1,holdingbranch=>$holdingbranch);
+		}
+	$nextop = "additem";
+	}
+	else{
+		$nextop = "additem";
+		$itemrecexist = $newrecord;
+	} 
+#------------------------------------------------------------------------------------------------------------------------------
+} elsif ($op eq "edititem") {
+#------------------------------------------------------------------------------------------------------------------------------
+# retrieve item if exist => then, it's a modif
+	my $itemrec = XMLgetitemhash($dbh,$itemnumber);## item is already in our array-getit
+	my $holdingbranch=XML_readline_onerecord($itemrec,"holdingbranch","holdings");	
+if (C4::Context->preference('IndependentBranches') &&($userenv->{'branch'} ne $holdingbranch) && $userenv->{flags} != 1){
+$nextop="additem";
+push @errors,"book_branch";
+
+}else{
+	$itemrecexist=$itemrec;
+	$nextop="saveitem";
+}	
+#logaction($loggedinuser,"acqui.simple","modify",$oldbiblionumber,"item : ".$itemnumber) if ($logstatus);
+	
+#------------------------------------------------------------------------------------------------------------------------------
+} elsif ($op eq "delitem") {
+#------------------------------------------------------------------------------------------------------------------------------
+#Do not delete if onloan
+my $sth=$dbh->prepare("select * from issues i where i.returndate is null and i.itemnumber=?");
+ $sth->execute($itemnumber);
+my $onloan=$sth->fetchrow;
+$sth->finish;
+my ($itemrec) = XMLgetitemhash($dbh,$itemnumber);
+my $holdingbranch=XML_readline_onerecord($itemrec,"holdingbranch","holdings");		
+
+	if ($onloan){
+	$nextop = "additem";
+	push @errors,"book_on_loan" ;
+	} elsif (C4::Context->preference('IndependentBranches') &&($userenv->{'branch'} ne $holdingbranch) && $userenv->{flags} != 1){
+	push @errors,"book_branch";
+	$nextop = "additem";
+	}else{
+	&NEWdelitem($dbh,$itemnumber);
+	$nextop="additem";
+	}
+#------------------------------------------------------------------------------------------------------------------------------
+} elsif ($op eq "saveitem") {
+#------------------------------------------------------------------------------------------------------------------------------
+	# rebuild
+#warn "save item";
+	my @tags = $input->param('tag');
+	my @subfields = $input->param('subfield');
+	my @values = $input->param('field_value');
+	# build indicator hash.
+	my @ind_tag = $input->param('ind_tag');
+	my @indicator = $input->param('indicator');
+	my $itemnumber = $input->param('itemnumber');
+	my %indicators;
+	for (my $i=0;$i<=$#ind_tag;$i++) {
+		$indicators{$ind_tag[$i]} = $indicator[$i];
+	}
+## check for malformed xml -- non UTF-8 like (MARC8) will break xml without warning
+### This usually happens with data coming from other Z3950 servers
+## Slows the saving process so comment out at your own risk
+eval{
+ $xml = MARChtml2xml(\@tags,\@subfields,\@values,\@indicator,\@ind_tag);	
+};
+	 if ($@){
+push @errors,"non_utf8" ;
+$nextop = "edititem";
+goto FINAL;
+  };
+ my $newrecord=XML_xml2hash_onerecord($xml);
+	my $newbarcode=XML_readline_onerecord($newrecord,"barcode","holdings");
+	my ($oldrecord)=XMLgetitem($dbh,"",$newbarcode);
+	$oldrecord=XML_xml2hash_onerecord($oldrecord);
+	my $exist=XML_readline_onerecord($oldrecord,"itemnumber","holdings") if $oldrecord;
+	if ($exist && ($exist ne $itemnumber)){
+	push @errors,"barcode_not_unique" ; ## Although editing user may have changed the barcode
+	$nextop="edititem";
+	}else{
+	 NEWmoditem($dbh,$newrecord,$biblionumber,$itemnumber);
+	$itemnumber="";
+	$nextop="additem";
+
+	}
+}
+
+#
+#------------------------------------------------------------------------------------------------------------------------------
+# build screen with existing items. and "new" one
+#------------------------------------------------------------------------------------------------------------------------------
+FINAL:
+my %indicators;
+$indicators{995}='  ';
+# now, build existing item list
+###DO NOT CHANGE TO RETRIVE FROM ZEBRA#####
+my $record =XMLgetbiblio($dbh,$biblionumber);
+$bibliorecord=XML_xml2hash_onerecord($record);
+my @itemxmls=XMLgetallitems($dbh,$biblionumber);
+	foreach my $itemrecord(@itemxmls){
+	my $itemhash=XML_xml2hash($itemrecord);
+	push @itemrecords, $itemhash;
+	}
+####
+
+
+
+my ($itemtagfield,$itemtagsubfield) = &MARCfind_marc_from_kohafield("itemnumber","holdings");
+my @itemnums;
+my @fields;
+my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
+my @big_array;
+my @item_value_loop;
+my @header_value_loop;
+unless($fromserials){ ## do not display existing items if adding a serial. It could be a looong list
+foreach my $itemrecord (@itemrecords){
+
+my $item=$itemrecord->{datafield};
+my $controlfield=$itemrecord->{controlfield};
+my $leader=$itemrecord->{leader};
+my %this_row;
+	### The leader
+	unless ($tagslib->{'000'}->{'@'}->{tab}  ne 10 || substr($tagslib->{'000'}->{'@'}->{hidden},1,1)>0){
+	my @datasub='000@';
+	$witness{$datasub[0]} = $tagslib->{'000'}->{'@'}->{lib};
+	$this_row{$datasub[0]} =$leader->[0];
+	}## leader
+	foreach my $control (@$controlfield){
+		push @itemnums,$control->{content} if ($control->{tag} eq $itemtagfield);
+		next if ($tagslib->{$control->{tag}}->{'@'}->{tab}  ne 10);
+		next if (substr($tagslib->{$control->{tag}}->{'@'}->{hidden},1,1)>0);	
+					
+			my @datasub=$control->{tag}.'@';
+			$witness{$datasub[0]} = $tagslib->{$control->{tag}}->{'@'}->{lib};
+			$this_row{$datasub[0]} =$control->{content};		     	
+	}## Controlfields 
+	foreach my $data (@$item){
+		foreach my $subfield ( $data->{'subfield'}){
+		   	foreach my $code ( @$subfield){	
+			# loop through each subfield			
+			push @itemnums,$code->{content} if ($data->{tag} eq $itemtagfield && $code->{code} eq $itemtagsubfield);
+			next if ($tagslib->{$data->{tag}}->{$code->{code}}->{tab}  ne 10);
+			next if (substr($tagslib->{$data->{tag}}->{$code->{code}}->{hidden},1,1)>0);
+			$witness{$data->{tag}.$code->{code}} = $tagslib->{$data->{tag}}->{$code->{code}}->{lib};
+			$this_row{$data->{tag}.$code->{code}} =$code->{content};
+			}
+			
+		}# subfield
+	
+	}## each data
+	if (%this_row) {
+	push(@big_array, \%this_row);
+	}
+}## each record
+#fill big_row with missing datas
+foreach my $subfield_code  (keys(%witness)) {
+	for (my $i=0;$i<=$#big_array;$i++) {
+		$big_array[$i]{$subfield_code}="&nbsp;" unless ($big_array[$i]{$subfield_code});
+	}
+}
+# now, construct template !
+
+for (my $i=0;$i<=$#big_array; $i++) {
+	my $items_data;
+	foreach my $subfield_code (sort keys(%witness)) {
+		$items_data .="<td>".$big_array[$i]{$subfield_code}."</td>";
+	}
+	my %row_data;
+	$row_data{item_value} = $items_data;
+	$row_data{itemnumber} = $itemnums[$i];
+	push(@item_value_loop,\%row_data);
+}
+foreach my $subfield_code (sort keys(%witness)) {
+	my %header_value;
+	$header_value{header_value} = $witness{$subfield_code};
+	push(@header_value_loop, \%header_value);
+}
+}## unless from serials
+# next item form
+my @loop_data =();
+my $i=0;
+my $authorised_values_sth = $dbh->prepare("select authorised_value,lib from authorised_values where category=? order by lib");
+
+foreach my $tag (sort keys %{$tagslib}) {
+ if ($itemtagfield <10){
+next if($tag==$itemtagfield);
+}
+	my $previous_tag = '';
+# loop through each subfield
+	foreach my $subfield (sort keys %{$tagslib->{$tag}}) {
+		next if subfield_is_koha_internal_p($subfield);
+		next if ($tagslib->{$tag}->{$subfield}->{'tab'}  ne "10");
+		next if  ($tagslib->{$tag} eq $itemtagfield && $tagslib->{$tag}->{$subfield} eq $itemtagsubfield);
+		my %subfield_data;
+		$subfield_data{tag}=$tag;
+		$subfield_data{subfield}=$subfield;
+		$subfield_data{marc_lib}="<span id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
+		$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
+		$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
+	$subfield_data{hidden}= "display:none" if (substr($tagslib->{$tag}->{$subfield}->{hidden},2,1)>0);
+	
+		my ($x,$value);
+		($x,$value) = find_value($tag,$subfield,$itemrecexist) if ($itemrecexist);
+		# search for itemcallnumber if applicable
+		my ($itemcntag,$itemcntagsub)=MARCfind_marc_from_kohafield("itemcallnumber","holdings");
+		if ($tag eq $itemcntag && $subfield eq $itemcntagsub && C4::Context->preference('itemcallnumber')) {
+			my $CNtag = substr(C4::Context->preference('itemcallnumber'),0,3);
+			my $CNsubfield = substr(C4::Context->preference('itemcallnumber'),3,1);
+			my $CNsubfield2 = substr(C4::Context->preference('itemcallnumber'),4,1);
+			my $temp1 = XML_readline_onerecord($bibliorecord,"","",$CNtag,$CNsubfield);
+			my $temp2 = XML_readline_onerecord($bibliorecord,"","",$CNtag,$CNsubfield2);
+			$value = $temp1.' '.$temp2;
+			$value=~s/^\s+|\s+$//g;
+			
+		}
+		if ($tagslib->{$tag}->{$subfield}->{authorised_value}) {
+			my @authorised_values;
+			my %authorised_lib;
+			# builds list, depending on authorised value...
+			#---- branch
+			if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+				
+				push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+				
+			my $branches=GetBranches();
+			foreach my $branch (keys %$branches) {
+				if ((not C4::Context->preference("IndependentBranches")) || $userenv->{flags} == 1) {
+				push @authorised_values, $branch;
+				$authorised_lib{$branch} = $branches->{$branch}->{'branchname'};
+ 			
+				} else {
+				push @authorised_values, $branch if ($branch eq $userenv->{'branch'});
+				$authorised_lib{$branch} = $branches->{$branch}->{'branchname'} if ($branch eq $userenv->{'branch'});
+			
+				}
+			}
+			#----- itemtypes
+			} elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
+				my $sth=$dbh->prepare("select itemtype,description from itemtypes order by description");
+				$sth->execute;
+				push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+				while (my ($itemtype,$description) = $sth->fetchrow_array) {
+					push @authorised_values, $itemtype;
+					$authorised_lib{$itemtype}=$description;
+				}
+			#---- "true" authorised value
+			} else {
+				$authorised_values_sth->execute($tagslib->{$tag}->{$subfield}->{authorised_value});
+				push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+				while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
+					push @authorised_values, $value;
+					$authorised_lib{$value}=$lib;
+				}
+			}
+			$subfield_data{marc_value}= CGI::scrolling_list(-name=>'field_value',
+																		-values=> \@authorised_values,
+																		-default=>"$value",																		-labels => \%authorised_lib,																		-size=>1,
+																		-multiple=>0,												);
+		} elsif ($tagslib->{$tag}->{$subfield}->{thesaurus_category}) {
+			$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\"  size=47 maxlength=255 DISABLE READONLY> <a href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$i',$i)\">...</a>";
+			#"
+		} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
+		my $cgidir = C4::Context->intranetdir ."/cgi-bin/value_builder";
+		unless (opendir(DIR, "$cgidir")) {
+			$cgidir = C4::Context->intranetdir."/value_builder";
+		} 
+		my $plugin=$cgidir."/".$tagslib->{$tag}->{$subfield}->{'value_builder'}; 
+		 do $plugin;
+		my $extended_param = plugin_parameters($dbh,$newrecord,$tagslib,$i,0);
+		my ($function_name,$javascript) = plugin_javascript($dbh,$newrecord,$tagslib,$i,0);
+		$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\"  value=\"$value\" size=\"47\" maxlength=\"255\" DISABLE READONLY OnFocus=\"javascript:Focus$function_name($i)\" OnBlur=\"javascript:Blur$function_name($i)\"> <a href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
+		} else {
+			$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\" value=\"$value\" size=50 maxlength=255>";
+		}
+#		$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\">";
+		push(@loop_data, \%subfield_data);
+		$i++
+	}
+}
+
+
+# what's the next op ? it's what we are not in : an add if we're editing, otherwise, and edit.
+$template->param(item_loop => \@item_value_loop,
+						item_header_loop => \@header_value_loop,
+						biblionumber =>$biblionumber,
+						title => &XML_readline_onerecord($bibliorecord,"title","biblios"),
+						author => &XML_readline_onerecord($bibliorecord,"author","biblios"),
+						item => \@loop_data,
+						itemnumber => $itemnumber,
+						itemtagfield => $itemtagfield,
+						itemtagsubfield =>$itemtagsubfield,
+						op => $nextop,
+						opisadd => ($nextop eq "saveitem")?0:1,
+						fromserials=>$fromserials, serialid=>$serialid,);
+foreach my $error (@errors) {
+	$template->param($error => 1);
+
+}
+output_html_with_http_headers $input, $cookie, $template->output;
+
+sub XMLfinditem {
+my ($itemnumber, at itemrecords)=@_;
+foreach my $record (@itemrecords){
+my $inumber=XML_readline_onerecord($record,"itemnumber","holdings");
+	if ($inumber ==$itemnumber){
+	return $record;
+	}
+}
+}

Index: cataloguing/isbnsearch.pl
===================================================================
RCS file: cataloguing/isbnsearch.pl
diff -N cataloguing/isbnsearch.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cataloguing/isbnsearch.pl	26 Mar 2007 02:19:21 -0000	1.5.2.2
@@ -0,0 +1,190 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+
+use C4::Auth;
+use C4::Biblio;
+use C4::Search;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Breeding;
+use C4::Koha;
+
+my $input      = new CGI;
+my $isbn       = $input->param('isbn');
+my $title      = $input->param('title');
+my $offset     = $input->param('offset');
+my $num        = $input->param('num');
+my $showoffset = $offset + 1;
+my $total;
+my $count;
+my @results;
+my $facets;
+my %search;
+my $toggle;
+my $marc_p = C4::Context->boolean_preference("marc");
+my $SQLorZEBRA=C4::Context->preference("SQLorZEBRA");
+if ( !$isbn && !$title ) {
+    print $input->redirect('addbooks.pl');
+}
+else {
+    my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+        {
+            template_name   => "cataloguing/isbnsearch.tmpl",
+            query           => $input,
+            type            => "intranet",
+            authnotrequired => 0,
+            flagsrequired   => { editcatalogue => 1 },
+            debug           => 1,
+        }
+    );
+
+    # fill with books in ACTIVE DB (biblio)
+    if ( !$offset ) {
+        $offset     = 0;
+        $showoffset = 1;
+    }
+    if ( !$num ) { $num = 10 }
+my @kohafield;
+my @value;
+my @relation;
+my @and_or;
+my $order="title,1";
+if ($isbn){
+$search{'isbn'}=$isbn;
+push @kohafield, "isbn";
+push @value,$isbn;
+}else{
+$search{'title'}=$title;
+push @kohafield, "title";
+push @value,$title;
+push @relation, "\@attr 5=1 \@attr 6=3 \@attr 4=1 \@attr 3=1 ";
+  }
+$search{avoidquerylog}=1;
+if ($SQLorZEBRA eq "sql"){
+($count, @results) =cataloguing_search(\%search,$num,$offset);
+}else{
+($count,$facets, at results) =ZEBRAsearch_kohafields(\@kohafield,\@value, \@relation,$order, \@and_or, 1,"",$offset, $num,"intranet");
+
+}
+my $grandtotal=$count;
+    if ( $count < ( $offset + $num ) ) {
+        $total = $count;
+    }
+    else {
+        $total = $offset + $num;
+    }    # else
+
+    my @loop_data;
+ 
+ @loop_data=@results if $count >0;;
+    $template->param( startfrom => $offset + 1 );
+    ( $offset + $num <= $count )
+      ? ( $template->param( endat => $offset + $num ) )
+      : ( $template->param( endat => $count ) );
+    $template->param( numrecords => $count );
+    my $nextstartfrom = ( $offset + $num < $count ) ? ( $offset + $num ) : (-1);
+    my $prevstartfrom = ( $offset - $num >= 0 ) ? ( $offset - $num ) : (-1);
+    $template->param( nextstartfrom => $nextstartfrom );
+    my $displaynext = 1;
+    my $displayprev = 0;
+    ( $nextstartfrom == -1 ) ? ( $displaynext = 0 ) : ( $displaynext = 1 );
+    ( $prevstartfrom == -1 ) ? ( $displayprev = 0 ) : ( $displayprev = 1 );
+    $template->param( displaynext => $displaynext );
+    $template->param( displayprev => $displayprev );
+    my @numbers = ();
+    my $term;
+    my $value;
+
+    if ($isbn) {
+        $term  = "isbn";
+        $value = $isbn;
+    }
+    else {
+        $term  = "title";
+        $value = $title;
+    }
+    if ( $count > 10 ) {
+        for ( my $i = 1 ; $i < $count / 10 + 1 ; $i++ ) {
+            if ( $i < 16 ) {
+                my $highlight = 0;
+                ( $offset == ( $i - 1 ) * 10 ) && ( $highlight = 1 );
+                push @numbers,
+                  {
+                    number    => $i,
+                    highlight => $highlight,
+                    term      => $term,
+                    value     => $value,
+                    startfrom => ( $i - 1 ) * 10
+                };
+            }
+        }
+    }
+
+    # fill with books in breeding farm
+    ( $count, @results ) = BreedingSearch( $title, $isbn );
+    my @breeding_loop = ();
+    for ( my $i = 0 ; $i <= $#results ; $i++ ) {
+        my %row_data;
+        if ( $i % 2 ) {
+            $toggle = "#ffffcc";
+        }
+        else {
+            $toggle = "white";
+        }
+        $row_data{toggle} = $toggle;
+        $row_data{id}     = $results[$i]->{'id'};
+        $row_data{isbn}   = $results[$i]->{'isbn'};
+        $row_data{file}   = $results[$i]->{'file'};
+        $row_data{title}  = $results[$i]->{'title'};
+        $row_data{author} = $results[$i]->{'author'};
+	$row_data{classification} = $results[$i]->{'classification'};
+	$row_data{subclass} = $results[$i]->{'subclass'};
+          push ( @breeding_loop, \%row_data );
+    }
+# get framework list
+	my $frameworks = getframeworks;
+	my @frameworkcodeloop;
+	foreach my $thisframeworkcode (keys %$frameworks) {
+		my %row =(value => $thisframeworkcode,
+					frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'},
+				);
+		push @frameworkcodeloop, \%row;
+	}
+
+
+    $template->param(
+        isbn          => $isbn,
+        title         => $title,
+        showoffset    => $showoffset,
+        total         => $total,
+	grandtotal         => $grandtotal,
+        offset        => $offset,
+        results_loop          => \@loop_data,
+        breeding_loop => \@breeding_loop,
+        numbers       => \@numbers,
+        term          => $term,
+        value         => $value,
+  	frameworkcodeloop => \@frameworkcodeloop
+    );
+
+  output_html_with_http_headers $input, $cookie, $template->output;
+}    # else

Index: circ/branchreserves.pl
===================================================================
RCS file: circ/branchreserves.pl
diff -N circ/branchreserves.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/branchreserves.pl	26 Mar 2007 02:19:21 -0000	1.3.2.2
@@ -0,0 +1,136 @@
+#!/usr/bin/perl
+
+# $Id: branchreserves.pl,v 1.3.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Context;
+use CGI;
+use C4::Auth;
+use C4::Date;
+use C4::Circulation::Circ2;
+use C4::Reserves2;
+use C4::Search;
+use C4::Koha;
+
+my $input = new CGI;
+
+my $item=$input->param('itemnumber');
+my $borrowernumber=$input->param('borrowernumber');
+my $fbr=$input->param('fbr');
+my $tbr=$input->param('tbr');
+
+my $cancel;
+
+
+my $theme = $input->param('theme'); # only used if allowthemeoverride is set
+
+my ($template, $loggedinuser, $cookie)
+      = get_template_and_user({template_name => "circ/branchreserves.tmpl",
+	                                 query => $input,
+	                                 type => "intranet",
+	                                 authnotrequired => 0,
+	                                 flagsrequired => {borrowers => 1},
+	                                 debug => 1,
+	                                 });
+
+my $default = C4::Context->userenv->{'branch'};
+my $dbh=C4::Context->dbh;
+my $todaysdate = get_today();
+
+
+# if we have a return from the form we launch the subroutine CancelReserve
+	if ($item){
+		my $messages;
+		my $nextreservinfo;
+		my %env;
+		my $waiting;
+		($messages,$nextreservinfo) = GlobalCancel($item,$borrowernumber);
+# 		if we have a result 
+		if ($nextreservinfo){
+			my $borrowerinfo = getpatroninformation(\%env,$nextreservinfo);
+			my $iteminfo = C4::Circulation::Circ2::getiteminformation(\%env,$item);
+			if ($messages->{'transfert'}){
+			my $branchname = getbranchname($messages->{'transfert'});
+				$template->param(
+					messagetransfert => $messages->{'transfert'},
+					branchname 	=> $branchname,
+				);
+			}
+			if ($messages->{'waiting'}){
+			$waiting = 1;
+			}
+
+				$template->param(
+					message			=> 1,
+					nextreservnumber  =>  $nextreservinfo,
+					nextreservsurname => $borrowerinfo->{'surname'},
+					nextreservfirstname => $borrowerinfo->{'firstname'},
+					nextreservitem		=> $item,
+					nextreservtitle		=> $iteminfo->{'title'},
+					waiting 		=> $waiting
+				);
+			}
+# 		if the document is not in his homebranch location and there is not reservation after, we transfer it
+		if (($fbr ne $tbr) and (not $nextreservinfo)){
+			C4::Circulation::Circ2::dotransfer($item,$fbr,$tbr);
+			C4::Circulation::Circ2::itemseen($dbh,$itm);
+		}
+	}
+	
+my @reservloop;
+my @getreserves = GetReservesForBranch($default);
+foreach my $num (@getreserves) {
+	my %getreserv;
+	my %env;
+	my $gettitle = getiteminformation(\%env,$num->{'itemnumber'});
+	my $getborrower = getpatroninformation (\%env,$num->{'borrowernumber'});
+	my $itemtypeinfo = getitemtypeinfo($gettitle->{'ctype'});
+	$getreserv{'waitingdate'} = format_date($num->{'waitingdate'});
+	my $calcDate=DateCalc($num->{'waitingdate'},"+".C4::Context->preference('ReservesMaxPickUpDelay')."  days");
+	my $warning=Date_Cmp(ParseDate("today"),$calcDate);
+	if ($warning>0){
+		$getreserv{'messcompa'} = 1;
+	}
+	$getreserv{'title'} = $gettitle->{'title'};
+	$getreserv{'itemnumber'} = $gettitle->{'itemnumber'};
+	$getreserv{'biblionumber'} = $gettitle->{'biblionumber'};
+	$getreserv{'barcode'} = $gettitle->{'barcode'};
+	$getreserv{'itemtype'} = $itemtypeinfo->{'description'};
+	$getreserv{'homebranch'} = $gettitle->{'homebranch'};
+	$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'};
+	if ($gettitle->{'homebranch'} ne $gettitle->{'holdingbranch'}){
+		$getreserv{'dotransfer'} = 1;
+		}
+	$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
+	$getreserv{'borrowernum'} = $getborrower->{'borrowernumber'};
+	$getreserv{'borrowername'} = $getborrower->{'surname'};
+	$getreserv{'borrowerfirstname'} =  $getborrower->{'firstname'} ;
+	if ($getborrower->{'emailaddress'}){
+		$getreserv{'borrowermail'} =  $getborrower->{'emailaddress'} ;
+	}
+	$getreserv{'borrowerphone'} = $getborrower->{'phone'};
+	push(@reservloop, \%getreserv);
+}
+
+	$template->param( reserveloop       => \@reservloop,
+			show_date	=> format_date($todaysdate),	
+			 );
+	
+output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: circ/branchtransfers.pl
===================================================================
RCS file: circ/branchtransfers.pl
diff -N circ/branchtransfers.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/branchtransfers.pl	26 Mar 2007 02:19:21 -0000	1.26.2.2
@@ -0,0 +1,283 @@
+#!/usr/bin/perl
+# WARNING: This file uses 4-character tabs!
+
+#written 11/3/2002 by Finlay
+#script to execute branch transfers of books
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Circulation::Circ2;
+use C4::Reserves2;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+use C4::Members;
+###############################################
+# constants
+
+my %env;
+my $linecolor1='#ffffcc';
+my $linecolor2='white';
+
+my $branches = GetBranches();
+my $printers = getprinters(\%env);
+
+
+###############################################
+#  Getting state
+
+my $query=new CGI;
+
+
+my $branch = getbranch($query, $branches);
+my $printer = getprinter($query, $printers);
+
+my $genbrname = $branches->{$branch}->{'branchname'} ;
+my $genprname = $printers->{$printer}->{'printername'};
+
+my $messages;
+my $found;
+my $reserved;
+my $waiting;
+my $reqmessage;
+my $cancelled;
+my $setwaiting;
+my $reqbrchname;
+my $user=$query->param('loggedinuser');
+my $request=$query->param('request');
+my $borrnum = $query->param('borrowernumber');
+
+my $tobranchcd=$query->param('tobranchcd');
+my $frbranchcd='';
+my $dbh=C4::Context->dbh;
+############
+# Deal with the requests....
+if ($request eq "KillWaiting") {
+    my $item = $query->param('itemnumber');
+    CancelReserve(0, $item, $borrnum);
+	$cancelled = 1;
+	$reqmessage =1;
+}
+
+my $ignoreRs = 0;
+if ($request eq "SetWaiting") {
+    my $item = $query->param('itemnumber');
+    $tobranchcd = ReserveWaiting($item, $borrnum);
+	$reqbrchname = $branches->{$tobranchcd}->{'branchname'};
+    $ignoreRs = 1;
+	$setwaiting = 1;
+	$reqmessage =1;
+}
+if ($request eq 'KillReserved'){
+    my $biblio = $query->param('biblionumber');
+    CancelReserve($biblio, 0, $borrnum);
+	$cancelled = 1;
+	$reqmessage =1;
+}
+
+
+
+# set up the branchselect options....
+my @branchoptionloop;
+foreach my $br (keys %$branches) {
+    #(next) unless $branches->{$br}->{'CU'}; #FIXME disabled to fix bug 202
+    my %branch;
+    $branch{selected}=($br eq $tobranchcd);
+	$branch{code}=$br;
+	$branch{name}=$branches->{$br}->{'branchname'};
+	push (@branchoptionloop, \%branch);
+}
+
+
+# collect the stack of books already transfered so they can printed...
+my @trsfitemloop;
+my %transfereditems;
+my %frbranchcds;
+my %tobranchcds;
+my $color=$linecolor2;
+
+my $barcode = $query->param('barcode');
+if ($barcode) {
+	my $transfered;
+	my $iteminformation;
+	($transfered, $messages, $iteminformation)
+			= transferbook($tobranchcd, $barcode, $ignoreRs,$user);
+	$found = $messages->{'ResFound'};
+	if ($transfered) {
+		my %item;
+		my $frbranchcd = $iteminformation->{'holdingbranch'};
+		if (not ($found)) {
+			($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
+			$item{'color'}=$color;
+			$item{'biblionumber'}=$iteminformation->{'biblionumber'};
+			$item{'title'}=$iteminformation->{'title'};
+			$item{'author'}=$iteminformation->{'author'};
+			$item{'itemtype'}=$iteminformation->{'ctype'};
+			$item{'frbrname'}=$branches->{$frbranchcd}->{'branchname'};
+			$item{'tobrname'}=$branches->{$tobranchcd}->{'branchname'};
+		}
+		$item{counter}=0;
+		$item{barcode}=$barcode;
+		$item{frombrcd}=$frbranchcd;
+		$item{tobrcd}=$tobranchcd;
+##########
+#Are these lines still useful ???
+		$transfereditems{0}=$barcode;
+		$frbranchcds{0}=$frbranchcd;
+		$tobranchcds{0}=$tobranchcd;
+##########
+		push (@trsfitemloop, \%item);
+	}
+}
+
+foreach ($query->param){
+	(next) unless (/bc-(\d*)/);
+	my $counter=$1;
+	my %item;
+	my $bc=$query->param("bc-$counter");
+	my $frbcd=$query->param("fb-$counter");
+	my $tobcd=$query->param("tb-$counter");
+	$counter++;
+	$item{counter}=$counter;
+	$item{barcode}=$bc;
+	$item{frombrcd}=$frbcd;
+	$item{tobrcd}=$tobcd;
+	my ($iteminformation) = getiteminformation(\%env, 0, $bc);
+	($color eq $linecolor1) ? ($color=$linecolor2) : ($color=$linecolor1);
+	$item{'color'}=$color;
+	$item{'biblionumber'}=$iteminformation->{'biblionumber'};
+	$item{'title'}=$iteminformation->{'title'};
+	$item{'author'}=$iteminformation->{'author'};
+	$item{'itemtype'}=$iteminformation->{'ctype'};
+	$item{'frbrname'}=$branches->{$frbcd}->{'branchname'};
+	$item{'tobrname'}=$branches->{$tobcd}->{'branchname'};
+##########
+#Are these lines still useful ???
+	$transfereditems{$counter}=$bc;
+	$frbranchcds{$counter}=$frbcd;
+	$tobranchcds{$counter}=$tobcd;
+#########
+	push (@trsfitemloop, \%item);
+}
+
+
+my $name;
+my $bornum;
+my $borcnum;
+my $itemnumber;
+my $biblionum;
+my $branchname;
+
+
+#####################
+
+if ($found) {
+    my $res = $messages->{'ResFound'};
+	$branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
+	my ($borr) = getpatroninformation(\%env, $res->{'borrowernumber'}, 0);
+	$name = name($borr);
+	$bornum = $borr->{'borrowernumber'}; #Hopefully, borr->{borrowernumber}=res->{borrowernumber}
+	$borcnum = $borr->{'cardnumber'};
+	$itemnumber = $res->{'itemnumber'};
+
+	if ($res->{'ResFound'} eq "Waiting") {
+		$waiting = 1;
+	}
+	if ($res->{'ResFound'} eq "Reserved") {
+		$reserved = 1;
+		$biblionum = $res->{'biblionumber'};
+	}
+}
+
+#####################
+
+my @errmsgloop;
+foreach my $code (keys %$messages) {
+	my %err;
+    $err{errbadcode} = ($code eq 'BadBarcode');
+	if ($code eq 'BadBarcode') {
+		$err{msg}=$messages->{'BadBarcode'};
+	}
+
+    $err{errispermanent} = ($code eq 'IsPermanent');
+    if ($code eq 'IsPermanent'){
+		$err{msg} = $branches->{$messages->{'IsPermanent'}}->{'branchname'};
+		# Here, msg contains the branchname
+		# Not so satisfied with this... But should work
+    }
+    $err{errdesteqholding} = ($code eq 'DestinationEqualsHolding');
+
+	$err{errwasreturned} = ($code eq 'WasReturned');
+	if ($code eq 'WasReturned') {
+		my ($borrowerinfo) = getpatroninformation(\%env, $messages->{'WasReturned'}, 0);
+		$name =name($borrowerinfo);
+		$bornum =$borrowerinfo->{'borrowernumber'};
+		$borcnum =$borrowerinfo->{'cardnumber'};
+    }
+    if ($code eq 'WasTransfered'){
+# Put code here if you want to notify the user that item was transfered...
+    }
+	push (@errmsgloop, \%err);
+}
+
+
+#######################################################################################
+# Make the page .....
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "circ/branchtransfers.tmpl",
+							query => $query,
+                            type => "intranet",
+                            authnotrequired => 0,
+                            flagsrequired => {editcatalogue => 1},
+                         });
+$template->param(	genbrname => $genbrname,
+								genprname => $genprname,
+								branch => $branch,
+								printer => $printer,
+								found => $found,
+								reserved => $reserved,
+								waiting => $waiting,
+								name => $name,
+								bornum => $bornum,
+								borcnum => $borcnum,
+								branchname => $branchname,
+								itemnumber => $itemnumber,
+								barcode => $barcode,
+								biblionumber => $biblionum,
+								tobranchcd => $tobranchcd,
+								reqmessage => $reqmessage,
+								cancelled => $cancelled,
+								setwaiting => $setwaiting,
+								trsfitemloop => \@trsfitemloop,
+								branchoptionloop => \@branchoptionloop,
+								errmsgloop => \@errmsgloop
+							);
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+sub name {
+	my ($borinfo) = @_;
+	return $borinfo->{'surname'}." ".$borinfo->{'title'}." ".$borinfo->{'firstname'};
+}
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: circ/circulation.pl
===================================================================
RCS file: circ/circulation.pl
diff -N circ/circulation.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/circulation.pl	26 Mar 2007 02:19:21 -0000	1.99.2.2
@@ -0,0 +1,485 @@
+#!/usr/bin/perl
+
+# Please use 8-character tabs for this file (indents are every 4 characters)
+
+#written 8/5/2002 by Finlay
+#script to execute issuing of books
+# New functions (renew etc.) added 07-08-2005 Tumer Garip tgarip at neu.edu.tr
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Circulation::Circ2;
+use C4::Search;
+use C4::Output;
+use C4::Print;
+
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+use C4::Date;
+use C4::Context;
+use C4::Members;
+# PARAMETERS READING
+#
+my $query=new CGI;
+
+my ($template, $loggedinuser, $cookie) = get_template_and_user
+    ({
+	template_name	=> 'circ/circulation.tmpl',
+	query		=> $query,
+	type		=> "intranet",
+	authnotrequired	=> 0,
+	flagsrequired	=> { circulate => 1 },
+    });
+my $branches = GetBranches();
+my $printers = getprinters();
+my $userenv = C4::Context->userenv;
+my $branch=$userenv->{'branch'};
+my $printer = getprinter($query, $printers);
+
+my $findborrower = $query->param('findborrower');
+
+$findborrower =~ s|,| |g;
+$findborrower =~ s|'| |g;
+my $borrowernumber = $query->param('borrnumber');
+
+my $print=$query->param('print');
+my $barcode = $query->param('barcode');
+my $year=$query->param('year');
+my $month=$query->param('month');
+my $day=$query->param('day');
+my $stickyduedate=$query->param('stickyduedate');
+my $issueconfirmed = $query->param('issueconfirmed');
+my $cancelreserve = $query->param('cancelreserve');
+my %error;
+my  $errorflag=$query->param('error');
+## The following er
+if ( $errorflag gt "1"){
+%error=(TOO_EARLY=>{1},) if ($errorflag eq "2");
+%error=(NO_MORE_RENEWALS=>{1},) if ($errorflag eq "3");
+%error=(RESERVE_FOUND=>{1},) if ($errorflag eq "4");
+}elsif ( $errorflag eq "1"){
+%error=(SUCCESFULL_RENEW=>{1},)
+}
+#set up cookie.....
+my $branchcookie;
+my $printercookie;
+#if ($query->param('setcookies')) {
+#	$branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
+#	$printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
+#}
+
+my %env; # FIXME env is used as an "environment" variable. 
+
+$env{'branchcode'}=$branch;
+$env{'printer'}=$printer;
+$env{'queue'}=$printer;
+
+
+my $todaysdate =get_today();
+
+
+# check and see if we should print
+ if ($barcode eq ''  && $print eq 'maybe'){
+ 	$print = 'yes';
+ }
+ if ($print eq 'yes' && $borrowernumber ne ''){
+ 	printslip(\%env,$borrowernumber);
+ 	$query->param('borrnumber','');
+ 	$borrowernumber='';
+ }
+
+#
+# STEP 2 : FIND BORROWER
+# if there is a list of find borrowers....
+#
+my $borrowerslist;
+my $message;
+if ($findborrower) {
+	my ($count,$borrowers)=BornameSearch(\%env,$findborrower,'cardnumber','web');
+	my @borrowers=@$borrowers;
+	if ($#borrowers == -1) {
+		$query->param('findborrower', '');
+		$message =  "'$findborrower'";
+	} elsif ($#borrowers == 0) {
+		$query->param('borrnumber', $borrowers[0]->{'borrowernumber'});
+		$query->param('barcode','');
+		$borrowernumber=$borrowers[0]->{'borrowernumber'};
+	} else {
+		$borrowerslist = \@borrowers;
+	}
+}
+
+# get the borrower information.....
+my $borrower;
+my $bornum=$query->param('bornum');
+if ($bornum){
+$borrowernumber=$bornum;
+}
+my $issues;
+if ($borrowernumber) {
+	$borrower = getpatroninformation(\%env,$borrowernumber,0);
+	my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
+	my ($resod,$resissue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
+
+	$template->param(overduecount => $od,resoverdue=>$resod,resissuecount=>$resissue,resfine=>$resfine,
+							issuecount => $issue,
+							finetotal => $fines);
+$issues=$issue;
+my $picture;
+ my $htdocs = C4::Context->config('opacdir');
+
+$picture =$htdocs. "/htdocs/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg";
+ if (-e $picture)
+{ 
+   $template->param(borrowerphoto => "http://library.neu.edu.tr/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg");
+ }else{
+$picture = "http://cc.neu.edu.tr/stdpictures/".$borrower->{'cardnumber'}.".jpg";
+  $template->param(borrowerphoto => $picture);
+}
+}
+
+#
+# STEP 3 : ISSUING
+#
+#Try to  issue
+
+
+if ($barcode) {
+
+	$barcode = cuecatbarcodedecode($barcode);
+	my ($datedue, $invalidduedate) = fixdate($year, $month, $day);
+	if ($issueconfirmed) {
+		issuebook(\%env, $borrower, $barcode, $datedue,$cancelreserve);
+		my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
+
+
+	$template->param(overduecount => $od,
+							issuecount => $issue,
+							finetotal => $fines);	
+
+	} else {
+		my ($error, $question) = canbookbeissued(\%env, $borrower, $barcode, $year, $month, $day) unless %error;
+		$error=\%error if %error;
+
+		my $noerror=1;
+		my $noquestion = 1;
+		foreach my $impossible (keys %$error) {
+			$template->param($impossible => $$error{$impossible},
+							IMPOSSIBLE => 1) unless ($impossible eq 'SUCCESFULL_RENEW');
+			$noerror = 0;
+		}
+		foreach my $needsconfirmation (keys %$question) {
+			$template->param($needsconfirmation => $$question{$needsconfirmation},
+							NEEDSCONFIRMATION => 1);
+			$noquestion = 0;
+		}
+		$template->param(day => $day,
+						month => $month,
+						year => $year);
+		if ($noerror && ($noquestion || $issueconfirmed)) {
+
+			issuebook(\%env, $borrower, $barcode, $datedue);
+		my ($od,$issue,$fines)=borrdata2(\%env,$borrowernumber);
+	
+
+	$template->param(overduecount => $od,
+							issuecount => $issue,
+							finetotal => $fines);
+		}
+	}
+
+}
+
+
+
+
+##################################################################################
+# BUILD HTML
+
+# make the issued books table.....
+my $todaysissues='';
+my $previssues='';
+my @realtodayissues;
+my @realprevissues;
+#my @renewissues;
+my $allowborrow;
+if ($borrower) {
+
+# get each issue of the borrower & separate them in todayissues & previous issues
+	my @todaysissues;
+	my @previousissues;
+	my $issueslist = getissues($borrower);
+	# split in 2 arrays for today & previous
+	foreach my $it (keys %$issueslist) {
+		my $issuedate = $issueslist->{$it}->{'issue_date'};
+#		$issuedate = substr($issuedate, 0, 10);
+	
+		if ($todaysdate eq $issuedate) {
+			push @todaysissues, $issueslist->{$it};
+		} else { 
+			push @previousissues, $issueslist->{$it};
+		}
+    }
+
+
+	my $od; # overdues
+	my $i = 0;
+	my $togglecolor;
+	# parses today & build Template array
+	foreach my $book (sort {$b->{'timestamp'} <=> $a->{'timestamp'}} @todaysissues){
+		my $dd = $book->{'date_due'};
+		my $datedue = $book->{'date_due'};
+
+		$dd=format_date($dd);
+#		$datedue=~s/-//g;
+		if ($datedue lt $todaysdate) {
+			$od = 1;
+		} else {
+			$od=0;
+		}
+		$book->{'od'}=$od;
+		$book->{'dd'}=$dd;
+		
+		if ($togglecolor) {
+			$togglecolor=0;
+		} else {
+			$togglecolor=1;
+		}
+		$book->{'tcolor'}=$togglecolor;
+		if ($book->{'author'} eq ''){
+			$book->{'author'}=' ';
+		}    
+		push @realtodayissues,$book;
+	$i++;
+	}
+
+
+
+	# parses previous & build Template array
+	$i=0;
+    foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} @previousissues){
+		my $dd = $book->{'date_due'};
+		my $datedue = $book->{'date_due'};
+		$dd=format_date($dd);
+		my $pcolor = '';
+		my $od = '';
+#		$datedue=~s/-//g;
+		if ($datedue lt $todaysdate) {
+		
+			$od = 1;
+		} else {
+			$od = 0;
+		}
+	
+		if ($togglecolor) {
+			$togglecolor=0;
+		} else {
+			$togglecolor=1;
+		}
+	$book->{'tcolor'}=$togglecolor;
+		$book->{'dd'}=$dd; 
+		$book->{'od'}=$od;
+		#$book->{'tcolor'}=$pcolor;
+		if ($book->{'author'} eq ''){
+			$book->{'author'}=' ';
+		}    
+
+		push @realprevissues,$book;
+	$i++;
+	}
+
+}#borrower
+
+
+my @values;
+my %labels;
+my $CGIselectborrower;
+if ($borrowerslist) {
+	foreach (sort {$a->{'surname'}.$a->{'firstname'} cmp $b->{'surname'}.$b->{'firstname'}} @$borrowerslist){
+		push @values,$_->{'borrowernumber'};
+		$labels{$_->{'borrowernumber'}} ="$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ...  $_->{'streetaddress'} ";
+	}
+	$CGIselectborrower=CGI::scrolling_list( -name     => 'borrnumber',
+				-values   => \@values,
+				-labels   => \%labels,
+				-size     => 7,
+				-multiple => 0 );
+}
+#title
+
+my ($patrontable, $flaginfotable) = patrontable($borrower);
+my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'};
+my @temp=split(/\$/,$amountold);
+$amountold=$temp[1];
+$template->param( today=>format_date($todaysdate),
+		findborrower => $findborrower,
+		borrower => $borrower,
+		borrowernumber => $borrowernumber,
+		branch => $branch,
+		printer => $printer,
+		branchname => $branches->{$branch}->{'branchname'},
+		printername => $printers->{$printer}->{'printername'},
+		firstname => $borrower->{'firstname'},
+		surname => $borrower->{'surname'},
+		categorycode => getborrowercategory($borrower->{'categorycode'}),
+		streetaddress => $borrower->{'streetaddress'},
+		emailaddress => $borrower->{'emailaddress'},
+		borrowernotes => $borrower->{'borrowernotes'},
+		city => $borrower->{'city'},
+		phone => $borrower->{'phone'},
+		cardnumber => $borrower->{'cardnumber'},
+		amountold => $amountold,
+		barcode => $barcode,
+		stickyduedate => $stickyduedate,
+		message => $message,
+		CGIselectborrower => $CGIselectborrower,
+		todayissues => \@realtodayissues,
+		previssues => \@realprevissues,
+		
+	);
+# set return date if stickyduedate
+if ($stickyduedate) {
+	my $t_year = "year".$year;
+	my $t_month = "month".$month;
+	my $t_day = "day".$day;
+	$template->param(
+		$t_year => 1,
+		$t_month => 1,
+		$t_day => 1,
+	);
+}
+
+
+if ($branchcookie) {
+    $cookie=[$cookie, $branchcookie, $printercookie];
+}
+
+output_html_with_http_headers $query, $cookie, $template->output;
+
+####################################################################
+# Extra subroutines,,,
+
+sub patrontable {
+    my ($borrower) = @_;
+    my $flags = $borrower->{'flags'};
+    my $flaginfotable='';
+    my $flaginfotext;
+    #my $flaginfotext='';
+    my $flag;
+    my $color='';
+    foreach $flag (sort keys %$flags) {
+#    	my @itemswaiting='';
+	$flags->{$flag}->{'message'}=~s/\n/<br>/g;
+	if ($flags->{$flag}->{'noissues'}) {
+		$template->param(
+			flagged => 1,
+			noissues => 'true',
+			 );
+		if ($flag eq 'GNA'){
+			$template->param(
+				gna => 'true'
+				);
+			}
+		if ($flag eq 'LOST'){
+			$template->param(
+				lost => 'true'
+			);
+			}
+		if ($flag eq 'DBARRED'){
+			$template->param(
+				dbarred => 'true'
+			);
+			}
+		if ($flag eq 'CHARGES') {
+			$template->param(
+				charges => 'true',
+				chargesmsg => $flags->{'CHARGES'}->{'message'}
+				 );
+		}
+	} else {
+		 if ($flag eq 'CHARGES') {
+			$template->param(
+				charges => 'true',
+				flagged => 1,
+				chargesmsg => $flags->{'CHARGES'}->{'message'}
+			 );
+		}
+	    	if ($flag eq 'WAITING') {
+			my $items=$flags->{$flag}->{'itemlist'};
+		        my @itemswaiting;
+			foreach my $item (@$items) {
+			my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
+			$iteminformation->{'branchname'} = $branches->{$iteminformation->{'holdingbranch'}}->{'branchname'};
+			push @itemswaiting, $iteminformation;
+			}
+			$template->param(
+				flagged => 1,
+				waiting => 'true',
+				waitingmsg => $flags->{'WAITING'}->{'message'},
+				itemswaiting => \@itemswaiting,
+				 );
+		}
+		if ($flag eq 'ODUES') {
+			$template->param(
+				odues => 'true',
+				flagged => 1,
+				oduesmsg => $flags->{'ODUES'}->{'message'}
+				 );
+
+			my $items=$flags->{$flag}->{'itemlist'};
+			{
+			    my @itemswaiting;
+			foreach my $item (@$items) {
+				my ($iteminformation) = getiteminformation(\%env, $item->{'itemnumber'}, 0);
+				push @itemswaiting, $iteminformation;
+			}
+			}
+			if ($query->param('module') ne 'returns'){
+				$template->param( nonreturns => 'true' );
+			}
+		}
+		if ($flag eq 'NOTES') {
+			$template->param(
+				notes => 'true',
+				flagged => 1,
+				notesmsg => $flags->{'NOTES'}->{'message'}
+				 );
+		}
+	}
+    }
+    return($patrontable, $flaginfotext);
+}
+
+sub cuecatbarcodedecode {
+    my ($barcode) = @_;
+    chomp($barcode);
+    my @fields = split(/\./,$barcode);
+    my @results = map(decode($_), @fields[1..$#fields]);
+    if ($#results == 2){
+  	return $results[2];
+    } else {
+	return $barcode;
+    }
+}
+
+# Local Variables:
+# tab-width: 8
+# End:

Index: circ/currenttransfers.pl
===================================================================
RCS file: circ/currenttransfers.pl
diff -N circ/currenttransfers.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/currenttransfers.pl	26 Mar 2007 02:19:21 -0000	1.3.4.2
@@ -0,0 +1,123 @@
+#!/usr/bin/perl
+
+# $Id: currenttransfers.pl,v 1.3.4.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Auth;
+use C4::Date;
+use C4::Circulation::Circ2;
+use C4::Date;
+use C4::Koha;
+use C4::Search;
+use C4::Reserves2;
+
+my $input = new CGI;
+
+my $theme = $input->param('theme'); # only used if allowthemeoverride is set
+my $itemnumber = $input->param('itemnumber');
+# if we have a resturn of the form to delete the transfer, we launch the subrroutine
+if ($itemnumber){
+	C4::Circulation::Circ2::DeleteTransfer($itemnumber);
+}
+
+my ($template, $loggedinuser, $cookie)
+      = get_template_and_user({template_name => "circ/currenttransfers.tmpl",
+	                                 query => $input,
+	                                 type => "intranet",
+	                                 authnotrequired => 0,
+	                                 flagsrequired => {borrowers => 1},
+	                                 debug => 1,
+	                                 });
+
+
+# set the userenv branch
+my $default = C4::Context->userenv->{'branch'};
+
+
+
+my $todaysdate = get_today();
+
+# get the all the branches for reference
+my $branches = GetBranches();
+my @branchesloop;
+foreach my $br (keys %$branches) {
+	my @transferloop;
+	my %branchloop;
+	$branchloop{'branchname'} = $branches->{$br}->{'branchname'};
+	$branchloop{'branchcode'} = $branches->{$br}->{'branchcode'};
+	# # # # # # # # # # # # # # # # # # # # # # 
+	my @gettransfers = GetTransfersFromBib($branches->{$br}->{'branchcode'},$default);
+		if (@gettransfers){
+		foreach my $num (@gettransfers) {
+			my %getransf;
+			my %env;
+			my $calcDate=DATE_Add($num->{'datesent'},C4::Context->preference('TransfersMaxDaysWarning'));
+			my $warning=DATE_Diff($todaysdate,$calcDate);
+			if ($warning>0){
+				$getransf{'messcompa'} = 1;
+			}
+			my $gettitle = getiteminformation(\%env,$num->{'itemnumber'});
+			my $itemtypeinfo = getitemtypeinfo($gettitle->{'ctype'});
+			
+				$getransf{'title'} = $gettitle->{'title'};
+				$getransf{'datetransfer'} = format_date($num->{'datesent'});
+				$getransf{'biblionumber'} = $gettitle->{'biblionumber'};
+				$getransf{'itemnumber'} = $gettitle->{'itemnumber'};
+				$getransf{'barcode'} = $gettitle->{'barcode'};
+				$getransf{'itemtype'} = $itemtypeinfo->{'description'};
+				$getransf{'homebranch'} = $gettitle->{'homebranch'};
+				$getransf{'holdingbranch'} = $gettitle->{'holdingbranch'};
+				$getransf{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
+
+# 				we check if we have a reserv for this transfer
+				my @checkreserv = FastFindReserves($num->{'itemnumber'});
+				if (@checkreserv[0]){
+					my $getborrower = getpatroninformation (\%env,$checkreserv[1]);
+					$getransf{'borrowernum'} = $getborrower->{'borrowernumber'};
+					$getransf{'borrowername'} = $getborrower->{'surname'};
+					$getransf{'borrowerfirstname'} =  $getborrower->{'firstname'};
+						if ($getborrower->{'emailaddress'}){
+							$getransf{'borrowermail'} =  $getborrower->{'emailaddress'} ;
+						}
+					$getransf{'borrowerphone'} = $getborrower->{'phone'};	
+
+				}
+				push(@transferloop, \%getransf);
+			}
+# 		If we have a return of reservloop we put it in the branchloop sequence
+		$branchloop{'reserv'} = \@transferloop ;
+		}		
+	else {
+# 	if we don't have a retrun from reservestobranch we unset branchname and branchcode
+	$branchloop{'branchname'} = 0;
+	$branchloop{'branchcode'} = 0;
+	}
+push(@branchesloop, \%branchloop);
+}
+	$template->param( branchesloop  => \@branchesloop,
+			show_date	=> format_date($todaysdate)	
+			 );
+	
+output_html_with_http_headers $input, $cookie, $template->output;
+
+

Index: circ/renewscript.pl
===================================================================
RCS file: circ/renewscript.pl
diff -N circ/renewscript.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/renewscript.pl	26 Mar 2007 02:19:21 -0000	1.2.2.2
@@ -0,0 +1,78 @@
+#!/usr/bin/perl
+
+# $Id: renewscript.pl,v 1.2.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+#written 18/1/2000 by chris at katipo.co.nz
+#script to renew items from the web
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use CGI;
+use C4::Circulation::Circ2;
+use C4::Date;
+use C4::Members;
+use C4::Log;
+use C4::Context;
+use C4::Auth;
+#get input
+my $input= new CGI;
+my $flagsrequired;
+# $flagsrequired->{circulation}=1;
+#my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired);
+
+my @names=$input->param();
+my $count=@names;
+my %data;
+my $dbh = C4::Context->dbh;
+for (my $i=0;$i<$count;$i++){
+  if ($names[$i] =~ /renew/){
+    my $temp=$names[$i];
+    $temp=~ s/renew_item_//;
+    $data{$temp}=$input->param($names[$i]);
+  }
+}
+my %env;
+my $barcode;
+my $destination = $input->param("destination");
+my $cardnumber = $input->param("cardnumber");
+my $bornum=$input->param("bornum");
+my $error;
+my $status=0;
+
+while ( my ($itemno, $value) = each %data) {
+
+   if ($value eq 'y'){
+my $iteminformation = getiteminformation($env, $itemno,0);
+$barcode=$iteminformation->{'barcode'};
+	 $status=renewstatus(\%env,$bornum,$itemno);
+	if ($status==1){
+     renewbook($env,$bornum,$itemno);	
+
+# logaction($loggedinuser,"circulation","renew",$barcode,$bornum) if (&logstatus);
+	}else{
+	last;
+	}   
+}
+}
+
+if($destination eq "circ" || $status>1){
+	print $input->redirect("/cgi-bin/koha/circ/circulation.pl?bornum=$bornum&error=$status&barcode=$barcode");
+} else {
+	print $input->redirect("/cgi-bin/koha/members/moremember.pl?bornum=$bornum");
+}
\ No newline at end of file

Index: circ/rescirculation.pl
===================================================================
RCS file: circ/rescirculation.pl
diff -N circ/rescirculation.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/rescirculation.pl	26 Mar 2007 02:19:21 -0000	1.3.2.2
@@ -0,0 +1,465 @@
+#!/usr/bin/perl
+
+# Please use 8-character tabs for this file (indents are every 4 characters)
+
+#written 8/5/2002 by Finlay
+#script to execute issuing of books
+# New functions added 07-08-2005 Tumer Garip tgarip at neu.edu.tr
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Circulation::Circ3;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+use C4::Date;
+use C4::Context;
+use C4::Members;
+use C4::Print;
+use C4::Log;
+#
+# PARAMETERS READING
+#
+my $query=new CGI;
+
+my ($template, $loggedinuser, $cookie) = get_template_and_user
+    ({
+	template_name	=> 'circ/rescirculation.tmpl',
+	query		=> $query,
+	type		=> "intranet",
+	authnotrequired	=> 0,
+	flagsrequired	=> { circulate => 1 },
+    });
+my $branches = GetBranches();
+my $printers = getprinters();
+my $branch=C4::Context->preference("defaultBranch");
+my $printer = getprinter($query, $printers);
+
+my $findborrower = $query->param('findborrower');
+$findborrower =~ s|,| |g;
+$findborrower =~ s|'| |g;
+my $borrowernumber = $query->param('borrnumber');
+
+my $print=$query->param('print');
+my $barcode = $query->param('barcode');
+my $year=$query->param('year');
+my $month=$query->param('month');
+my $day=$query->param('day');
+my $stickyduedate=$query->param('stickyduedate');
+my $issueconfirmed = $query->param('issueconfirmed');
+my $cancelreserve = $query->param('cancelreserve');
+
+my $renew=0;
+ 
+#set up cookie.....
+my $branchcookie;
+my $printercookie;
+#if ($query->param('setcookies')) {
+#	$branchcookie = $query->cookie(-name=>'branch', -value=>"$branch", -expires=>'+1y');
+#	$printercookie = $query->cookie(-name=>'printer', -value=>"$printer", -expires=>'+1y');
+#}
+
+my %env; # FIXME env is used as an "environment" variable. Could be dropped probably...
+
+$env{'branchcode'}=$branch;
+$env{'printer'}=$printer;
+$env{'queue'}=$printer;
+
+my $todaysdate =get_today();
+
+
+# check and see if we should print
+ if ($barcode eq ''  && $print eq 'maybe'){
+ 	$print = 'yes';
+ }
+ if ($print eq 'yes' && $borrowernumber ne ''){
+ 	printslip(\%env,$borrowernumber);
+ 	$query->param('borrnumber','');
+ 	$borrowernumber='';
+ }
+
+#
+# STEP 2 : FIND BORROWER
+# if there is a list of find borrowers....
+#
+my $borrowerslist;
+my $message;
+if ($findborrower) {
+	my ($count,$borrowers)=BornameSearch(\%env,$findborrower,'cardnumber','web');
+	my @borrowers=@$borrowers;
+	if ($#borrowers == -1) {
+		$query->param('findborrower', '');
+		$message =  "'$findborrower'";
+	} elsif ($#borrowers == 0) {
+		$query->param('borrnumber', $borrowers[0]->{'borrowernumber'});
+		$query->param('barcode','');
+		$borrowernumber=$borrowers[0]->{'borrowernumber'};
+	} else {
+		$borrowerslist = \@borrowers;
+	}
+}
+
+# get the borrower information.....
+my $borrower;
+my $bornum=$query->param('bornum');
+if ($bornum){
+$borrowernumber=$bornum;
+}
+
+if ($borrowernumber) {
+	$borrower = C4::Members::getpatroninformation(\%env,$borrowernumber,0);
+	my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
+if ($resfine >0 || $fines) {
+$template->param(
+			flagged => 1,
+			noissues => 'true',
+			 );
+}
+	$template->param(overduecount => $od,
+							issuecount => $issue,
+							finetotal => $fines,
+							resfine => $resfine);
+my $picture;
+ my $htdocs = C4::Context->config('opacdir');
+
+$picture =$htdocs. "/htdocs/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg";
+ if (-e $picture)
+{ 
+
+   $template->param(borrowerphoto => "http://library.neu.edu.tr/uploaded-files/users-photo/".$borrower->{'cardnumber'}.".jpg");
+ }else{
+$picture = "http://cc.neu.edu.tr/stdpictures/".$borrower->{'cardnumber'}.".jpg";
+  $template->param(borrowerphoto => $picture);
+}
+}
+$renew=$query->param('renew');
+
+#
+# STEP 3 : ISSUING
+#
+#Try to issue
+
+if ($barcode) {
+
+	$barcode = cuecatbarcodedecode($barcode);
+#	my ($datedue, $invalidduedate) = fixdate($year, $month, $day);
+	if ($issueconfirmed) {
+			issuebookr(\%env, $borrower, $barcode, $cancelreserve);
+my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
+	$template->param(overduecount => $od,
+							issuecount => $issue,
+							finetotal => $fines,
+							resfine => $resfine);
+logaction($loggedinuser,"circulation","issue",$barcode,$borrowernumber) if (&logstatus);
+
+	} else {
+		my ($error, $question) = canbookbeissuedr(\%env, $borrower, $barcode, $year, $month, $day);
+		my $noerror=1;
+		my $noquestion = 1;
+		foreach my $impossible (keys %$error) {
+			$template->param($impossible => $$error{$impossible},
+							IMPOSSIBLE => 1);
+			$noerror = 0;
+		}
+		foreach my $needsconfirmation (keys %$question) {
+			$template->param($needsconfirmation => $$question{$needsconfirmation},
+							NEEDSCONFIRMATION => 1);
+			$noquestion = 0;
+		}
+		$template->param(day => $day,
+						month => $month,
+						year => $year);
+		if ($noerror && ($noquestion || $issueconfirmed)) {
+			issuebookr(\%env, $borrower, $barcode);
+		logaction($loggedinuser,"circulation","issue",$barcode,$borrowernumber) if (&logstatus);
+
+			my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$borrowernumber);
+				$template->param(overduecount => $od,
+							issuecount => $issue,
+							finetotal => $fines,
+							resfine => $resfine);
+		}
+	}
+	}#barcode
+
+
+
+
+
+##################################################################################
+# BUILD HTML
+
+# make the issued books table.....
+my $todaysissues='';
+my $previssues='';
+my @realtodayissues;
+my @realprevissues;
+my $allowborrow;
+if ($borrower) {
+# get each issue of the borrower & separate them in todayissues & previous issues
+	my @todaysissues;
+	my @previousissues;
+	my $issueslist = getissuesr($borrower);
+	
+	# split in 2 arrays for today & previous
+	foreach my $it (keys %$issueslist) {
+		my $issuedate = $issueslist->{$it}->{'timestamp'};
+		$issuedate = substr($issuedate, 0, 10);
+#warn "$todaysdate,$issuedate";
+		if ($todaysdate == $issuedate) {
+			push @todaysissues, $issueslist->{$it};
+		} else {
+			push @previousissues, $issueslist->{$it};
+		}
+    }
+
+
+	my $od; # overdues
+	my $togglecolor;
+	# parses today & build Template array
+	foreach my $book (sort {$b->{'timestamp'} <=> $a->{'timestamp'}} @todaysissues){
+		my $dd = $book->{'duetime'};
+		my $overdue = $book->{'overdue'};
+#		$dd=format_date($dd);
+#		$datedue=~s/-//g;
+		if ($overdue) {
+			$od = 1;
+		} else {
+			$od=0;
+		}
+		$book->{'od'}=$od;
+		$book->{'dd'}=$dd;
+		
+		if ($togglecolor) {
+			$togglecolor=0;
+		} else {
+			$togglecolor=1;
+		}
+		$book->{'tcolor'}=$togglecolor;
+		if ($book->{'author'} eq ''){
+			$book->{'author'}=' ';
+		}    
+		push @realtodayissues,$book;
+	}
+
+	# parses previous & build Template array
+    foreach my $book (sort {$a->{'date_due'} cmp $b->{'date_due'}} @previousissues){
+		my $dd = $book->{'duedate'};
+		my $overdue = $book->{'overdue'};
+#		$dd=format_date($dd);
+		my $pcolor = '';
+		my $od = '';
+#		$datedue=~s/-//g;
+		if ($overdue) {
+			$od = 1;
+		} else {
+			$od = 0;
+		}
+		
+		if ($togglecolor) {
+			$togglecolor=0;
+		} else {
+			$togglecolor=1;
+		}
+		$book->{'dd'}=$dd; 
+		$book->{'od'}=$od;
+		$book->{'tcolor'}=$togglecolor;
+		if ($book->{'author'} eq ''){
+			$book->{'author'}=' ';
+		}    
+		push @realprevissues,$book
+	}
+}
+
+
+my @values;
+my %labels;
+my $CGIselectborrower;
+if ($borrowerslist) {
+	foreach (sort {$a->{'surname'}.$a->{'firstname'} cmp $b->{'surname'}.$b->{'firstname'}} @$borrowerslist){
+		push @values,$_->{'borrowernumber'};
+		$labels{$_->{'borrowernumber'}} ="$_->{'surname'}, $_->{'firstname'} ... ($_->{'cardnumber'} - $_->{'categorycode'}) ...  $_->{'streetaddress'} ";
+	}
+	$CGIselectborrower=CGI::scrolling_list( -name     => 'borrnumber',
+				-values   => \@values,
+				-labels   => \%labels,
+				-size     => 7,
+				-multiple => 0 );
+}
+#title
+
+my ($patrontable, $flaginfotable) = patrontable($borrower);
+my $amountold=$borrower->{flags}->{'CHARGES'}->{'message'};
+my @temp=split(/\$/,$amountold);
+$amountold=$temp[1];
+$template->param( today=>format_date($todaysdate),
+		findborrower => $findborrower,
+		borrower => $borrower,
+		borrowernumber => $borrowernumber,
+		branch => $branch,
+		printer => $printer,
+		branchname => $branches->{$branch}->{'branchname'},
+		printername => $printers->{$printer}->{'printername'},
+		firstname => $borrower->{'firstname'},
+		surname => $borrower->{'surname'},
+		categorycode => getborrowercategory($borrower->{'categorycode'}),
+		streetaddress => $borrower->{'streetaddress'},
+		emailaddress => $borrower->{'emailaddress'},
+		borrowernotes => $borrower->{'borrowernotes'},
+		city => $borrower->{'city'},
+		phone => $borrower->{'phone'},
+		cardnumber => $borrower->{'cardnumber'},
+		amountold => $amountold,
+		barcode => $barcode,
+		renew=>$renew,
+		stickyduedate => $stickyduedate,
+		message => $message,
+		CGIselectborrower => $CGIselectborrower,
+		todayissues => \@realtodayissues,
+		previssues => \@realprevissues,
+	);
+# set return date if stickyduedate
+if ($stickyduedate) {
+	my $t_year = "year".$year;
+	my $t_month = "month".$month;
+	my $t_day = "day".$day;
+	$template->param(
+		$t_year => 1,
+		$t_month => 1,
+		$t_day => 1,
+	);
+}
+
+
+if ($branchcookie) {
+    $cookie=[$cookie, $branchcookie, $printercookie];
+}
+
+output_html_with_http_headers $query, $cookie, $template->output;
+
+####################################################################
+# Extra subroutines,,,
+
+sub patrontable {
+    my ($borrower) = @_;
+    my $flags = $borrower->{'flags'};
+    my $flaginfotable='';
+    my $flaginfotext;
+    #my $flaginfotext='';
+    my $flag;
+    my $color='';
+    foreach $flag (sort keys %$flags) {
+#    	my @itemswaiting='';
+	$flags->{$flag}->{'message'}=~s/\n/<br>/g;
+	if ($flags->{$flag}->{'noissues'}) {
+		$template->param(
+			flagged => 1,
+			noissues => 'true',
+			 );
+		if ($flag eq 'GNA'){
+			$template->param(
+				gna => 'true'
+				);
+			}
+		if ($flag eq 'LOST'){
+			$template->param(
+				lost => 'true'
+			);
+			}
+		if ($flag eq 'DBARRED'){
+			$template->param(
+				dbarred => 'true'
+			);
+			}
+		if ($flag eq 'CHARGES') {
+			$template->param(
+				charges => 'true',
+				chargesmsg => $flags->{'CHARGES'}->{'message'}
+				 );
+		}
+	} else {
+		 if ($flag eq 'CHARGES') {
+			$template->param(
+				charges => 'true',
+				flagged => 1,
+				chargesmsg => $flags->{'CHARGES'}->{'message'}
+			 );
+		}
+	    	if ($flag eq 'WAITING') {
+			my $items=$flags->{$flag}->{'itemlist'};
+		        my @itemswaiting;
+			foreach my $item (@$items) {
+			my ($iteminformation) = C4::Circulation::Circ2::getiteminformation(\%env, $item->{'itemnumber'}, 0);
+			$iteminformation->{'branchname'} = $branches->{$iteminformation->{'holdingbranch'}}->{'branchname'};
+			push @itemswaiting, $iteminformation;
+			}
+			$template->param(
+				flagged => 1,
+				waiting => 'true',
+				waitingmsg => $flags->{'WAITING'}->{'message'},
+				itemswaiting => \@itemswaiting,
+				 );
+		}
+		if ($flag eq 'ODUES') {
+			$template->param(
+				odues => 'true',
+				flagged => 1,
+				oduesmsg => $flags->{'ODUES'}->{'message'}
+				 );
+
+			my $items=$flags->{$flag}->{'itemlist'};
+			{
+			    my @itemswaiting;
+			foreach my $item (@$items) {
+				my ($iteminformation) = C4::Circulation::Circ2::getiteminformation(\%env, $item->{'itemnumber'}, 0);
+				push @itemswaiting, $iteminformation;
+			}
+			}
+			if ($query->param('module') ne 'returns'){
+				$template->param( nonreturns => 'true' );
+			}
+		}
+		if ($flag eq 'NOTES') {
+			$template->param(
+				notes => 'true',
+				flagged => 1,
+				notesmsg => $flags->{'NOTES'}->{'message'}
+				 );
+		}
+	}
+    }
+    return($patrontable, $flaginfotext);
+}
+
+sub cuecatbarcodedecode {
+    my ($barcode) = @_;
+    chomp($barcode);
+    my @fields = split(/\./,$barcode);
+    my @results = map(decode($_), @fields[1..$#fields]);
+    if ($#results == 2){
+  	return $results[2];
+    } else {
+	return $barcode;
+    }
+}
+
+# Local Variables:
+# tab-width: 8
+# End:

Index: circ/resreturns.pl
===================================================================
RCS file: circ/resreturns.pl
diff -N circ/resreturns.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/resreturns.pl	26 Mar 2007 02:19:21 -0000	1.2.2.2
@@ -0,0 +1,480 @@
+#!/usr/bin/perl
+# WARNING: This file contains mixed-sized tabs! (some 4-character, some 8)
+# WARNING: Currently, 4-character tabs seem to be dominant
+# WARNING: But there are still lots of 8-character tabs
+
+#written 11/3/2002 by Finlay
+#script to execute returns of books
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Circulation::Circ3;
+use C4::Search;
+use C4::Output;
+use C4::Print;
+use C4::Reserves2;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Log;
+use C4::Koha;
+use C4::Members;
+my $query = new CGI;
+
+#getting the template
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "circ/resreturns.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { circulate => 1 },
+    }
+);
+
+#####################
+#Global vars
+my %env;
+my $headerbackgroundcolor = '#99cc33';
+my $linecolor1            = '#ffffcc';
+my $linecolor2            = 'white';
+
+my $branches = GetBranches();
+my $printers = getprinters( \%env );
+
+# my $branch  = getbranch( $query,  $branches );
+my $printer = getprinter( $query, $printers );
+
+#
+# Some code to handle the error if there is no branch or printer setting.....
+#
+my $branch=C4::Context->preference("defaultBranch");
+$env{'branchcode'} = $branch;
+$env{'printer'}    = $printer;
+$env{'queue'}      = $printer;
+
+# Set up the item stack ....
+my %returneditems;
+my %riduedate;
+my %riborrowernumber;
+my @inputloop;
+foreach ( $query->param ) {
+    (next) unless (/ri-(\d*)/);
+    my %input;
+    my $counter = $1;
+    (next) if ( $counter > 20 );
+    my $barcode        = $query->param("ri-$counter");
+    my $duedate        = $query->param("dd-$counter");
+    my $borrowernumber = $query->param("bn-$counter");
+    $counter++;
+
+    # decode cuecat
+    $barcode = cuecatbarcodedecode($barcode);
+
+    ######################
+    #Are these lines still useful ?
+    $returneditems{$counter}    = $barcode;
+    $riduedate{$counter}        = $duedate;
+    $riborrowernumber{$counter} = $borrowernumber;
+
+    #######################
+    $input{counter} = $counter;
+    $input{barcode} = $barcode;
+    $input{duedate} = $duedate;
+    $input{bornum}  = $borrowernumber;
+    push ( @inputloop, \%input );
+}
+
+############
+# Deal with the requests....
+if ( $query->param('resbarcode') ) {
+    my $item       = $query->param('itemnumber');
+    my $borrnum    = $query->param('borrowernumber');
+    my $resbarcode = $query->param('resbarcode');
+
+    # set to waiting....
+    my $iteminfo = C4::Circulation::Circ2::getiteminformation( \%env, $item );
+    my $tobranchcd = ReserveWaiting( $item, $borrnum );
+    my $branchname = $branches->{$tobranchcd}->{'branchname'};
+    my ($borr) = getpatroninformation( \%env, $borrnum, 0 );
+    my $borcnum = $borr->{'cardnumber'};
+    my $name    =
+      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
+    my $slip = $query->param('resslip');
+    printslip( \%env, $slip ); #removed by paul
+
+    if ( $tobranchcd ne $branch ) {
+        $template->param(
+            itemtitle  => $iteminfo->{'title'},
+            iteminfo   => $iteminfo->{'author'},
+            branchname => $branchname,
+            name       => $name,
+            bornum     => $borrnum,
+            borcnum    => $borcnum,
+            diffbranch => 1
+        );
+    }
+}
+
+my $iteminformation;
+my $borrower;
+my $returned = 0;
+my $messages;
+
+my $barcode = $query->param('barcode');
+
+# actually return book and prepare item table.....
+if ($barcode) {
+
+    # decode cuecat
+    $barcode = cuecatbarcodedecode($barcode);
+    ( $returned, $messages, $iteminformation, $borrower ) =
+      returnbookr( $barcode, $branch );
+    if ($returned) {
+        $returneditems{0}    = $barcode;
+        $riborrowernumber{0} = $borrower->{'borrowernumber'};
+        $riduedate{0}        = $iteminformation->{'date_due'};
+        my %input;
+        $input{counter} = 0;
+        $input{first}   = 1;
+        $input{barcode} = $barcode;
+        $input{duedate} = $riduedate{0};
+        $input{bornum}  = $riborrowernumber{0};
+        push ( @inputloop, \%input );
+logaction($loggedinuser,"circulation","return",$barcode,$borrower->{'borrowernumber'}) if (&logstatus);
+
+    }
+    elsif ( !$messages->{'BadBarcode'} ) {
+		if ( $messages->{'NotIssued'} ) {
+		my $dbh = C4::Context->dbh;
+		my $sth=$dbh->prepare("select date_due from issues where itemnumber=? and isnull(returndate)");
+		$sth->execute($iteminformation->{'itemnumber'});
+		my ($date_due) = $sth->fetchrow;
+		
+		$sth->finish;
+			if ($date_due){	
+			print $query->redirect("/cgi-bin/koha/circ/returns.pl?barcode=$barcode");
+			}
+		}
+        my %input;
+        $input{counter} = 0;
+        $input{first}   = 1;
+        $input{barcode} = $barcode;
+        $input{duedate} = 0;
+
+        $returneditems{0} = $barcode;
+        $riduedate{0}     = 0;
+        if ( $messages->{'wthdrawn'} ) {
+            $input{withdrawn} = 1;
+            $input{bornum}    = "Item Cancelled";
+            $riborrowernumber{0} = 'Item Cancelled';
+        }
+        else {
+            $input{bornum} = "&nbsp;";
+            $riborrowernumber{0} = '&nbsp;';
+        }
+        push ( @inputloop, \%input );
+    }
+    $template->param(
+        returned  => $returned,
+        itemtitle => $iteminformation->{'title'},
+
+        #									itembc => $iteminformation->{'barcode'},
+        #									itemdatedue => $iteminformation->{'date_due'},
+        itemauthor => $iteminformation->{'author'}
+    );
+}
+$template->param( inputloop => \@inputloop );
+
+my $found    = 0;
+my $waiting  = 0;
+my $reserved = 0;
+
+if ( $messages->{'ResFound'} ) {
+    my $res        = $messages->{'ResFound'};
+    my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
+    my ($borr) = getpatroninformation( \%env, $res->{'borrowernumber'}, 0 );
+    my $name =
+      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
+    my ($iteminfo) = getiteminformation( \%env, 0, $barcode );
+
+    if ( $res->{'ResFound'} eq "Waiting" ) {
+        $template->param(
+            found         => 1,
+            name          => $name,
+            borfirstname  => $borr->{'firstname'},
+            borsurname    => $borr->{'surname'},
+            bortitle      => $borr->{'title'},
+            borphone      => $borr->{'phone'},
+            borstraddress => $borr->{'streetaddress'},
+            borcity       => $borr->{'city'},
+            borzip        => $borr->{'zipcode'},
+            bornum        => $res->{'borrowernumber'},
+            borcnum       => $borr->{'cardnumber'},
+            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
+            waiting     => 1,
+            itemnumber  => $res->{'itemnumber'},
+            itemtitle   => $iteminfo->{'title'},
+            itemauthor  => $iteminfo->{'author'},
+            itembarcode => $iteminfo->{'barcode'},
+            itemtype    => $iteminfo->{'ctype'},
+            itembiblionumber => $iteminfo->{'biblionumber'}
+        );
+
+    }
+    if ( $res->{'ResFound'} eq "Reserved" ) {
+        my @da         = localtime( time() );
+        my $todaysdate =
+          sprintf( "%0.2d", ( $da[3] + 1 ) ) . "/"
+          . sprintf( "%0.2d", ( $da[4] + 1 ) ) . "/"
+          . ( $da[5] + 1900 );
+        $template->param(
+            found       => 1,
+            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
+            reserved    => 1,
+            today       => $todaysdate,
+            itemnumber  => $res->{'itemnumber'},
+            itemtitle   => $iteminfo->{'title'},
+            itemauthor  => $iteminfo->{'author'},
+            itembarcode => $iteminfo->{'barcode'},
+            itemtype    => $iteminfo->{'ctype'},
+            itembiblionumber => $iteminfo->{'biblionumber'},
+            borsurname       => $borr->{'surname'},
+            bortitle         => $borr->{'title'},
+            borfirstname     => $borr->{'firstname'},
+            bornum           => $res->{'borrowernumber'},
+            borcnum          => $borr->{'cardnumber'},
+            borphone         => $borr->{'phone'},
+            borstraddress    => $borr->{'streetaddress'},
+            borsub           => $borr->{'suburb'},
+            borcity          => $borr->{'city'},
+            borzip           => $borr->{'zipcode'},
+            boremail         => $borr->{'emailadress'},
+            barcode          => $barcode
+        );
+    }
+}
+
+# Error Messages
+my @errmsgloop;
+foreach my $code ( keys %$messages ) {
+
+   #     warn $code;
+    my %err;
+    my $exit_required_p = 0;
+    if ( $code eq 'BadBarcode' ) {
+        $err{badbarcode} = 1;
+        $err{msg}        = $messages->{'BadBarcode'};
+    }
+    elsif ( $code eq 'NotIssued' ) {
+        $err{notissued} = 1;
+        $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+    }
+    elsif ( $code eq 'WasLost' ) {
+        $err{waslost} = 1;
+    }
+    elsif ( $code eq 'ResFound' ) {
+        ;    # FIXME... anything to do here?
+    }
+    elsif ( $code eq 'WasReturned' ) {
+        ;    # FIXME... anything to do here?
+    }
+    elsif ( $code eq 'WasTransfered' ) {
+        ;    # FIXME... anything to do here?
+    }
+    elsif ( $code eq 'wthdrawn' ) {
+        $err{withdrawn} = 1;
+        $exit_required_p = 1;
+    }
+    elsif ( ( $code eq 'IsPermanent' ) && ( not $messages->{'ResFound'} ) ) {
+        if ( $messages->{'IsPermanent'} ne $branch ) {
+            $err{ispermanent} = 1;
+            $err{msg}         =
+              $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+        }
+    }
+    else {
+        die "Unknown error code $code";    # XXX
+    }
+    if (%err) {
+        push ( @errmsgloop, \%err );
+    }
+    last if $exit_required_p;
+}
+$template->param( errmsgloop => \@errmsgloop );
+
+# patrontable ....
+if ($borrower) {
+    my $flags = $borrower->{'flags'};
+    my $color = '';
+    my @flagloop;
+    my $flagset;
+    foreach my $flag ( sort keys %$flags ) {
+        my %flaginfo;
+        ( $color eq $linecolor1 ) 
+          ? ( $color = $linecolor2 )
+          : ( $color = $linecolor1 );
+        unless ($flagset) { $flagset = 1; }
+        $flaginfo{color}   = $color;
+        $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
+        $flaginfo{flag}    = $flag;
+        if ( $flag eq 'CHARGES' ) {
+            $flaginfo{msg}     = $flag;
+            $flaginfo{charges} = 1;
+	    $flaginfo{bornum} = $borrower->{borrowernumber};
+        }
+        elsif ( $flag eq 'WAITING' ) {
+            $flaginfo{msg}     = $flag;
+            $flaginfo{waiting} = 1;
+            my @waitingitemloop;
+            my $items = $flags->{$flag}->{'itemlist'};
+            foreach my $item (@$items) {
+                my ($iteminformation) =
+                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+                my %waitingitem;
+                $waitingitem{biblionum} = $iteminformation->{'biblionumber'};
+                $waitingitem{barcode}   = $iteminformation->{'barcode'};
+                $waitingitem{title}     = $iteminformation->{'title'};
+                $waitingitem{brname}    =
+                  $branches->{ $iteminformation->{'holdingbranch'} }->{
+                  'branchname'};
+                push ( @waitingitemloop, \%waitingitem );
+            }
+            $flaginfo{itemloop} = \@waitingitemloop;
+        }
+        elsif ( $flag eq 'ODUES' ) {
+            my $items = $flags->{$flag}->{'itemlist'};
+            my @itemloop;
+            foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
+                @$items )
+            {
+                my ($iteminformation) =
+                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+                my %overdueitem;
+                $overdueitem{duedate}   = $item->{'date_due'};
+                $overdueitem{biblionum} = $iteminformation->{'biblionumber'};
+                $overdueitem{barcode}   = $iteminformation->{'barcode'};
+                $overdueitem{title}     = $iteminformation->{'title'};
+                $overdueitem{brname}    =
+                  $branches->{ $iteminformation->{'holdingbranch'} }->{
+                  'branchname'};
+                push ( @itemloop, \%overdueitem );
+            }
+            $flaginfo{itemloop} = \@itemloop;
+            $flaginfo{overdue}  = 1;
+        }
+        else {
+            $flaginfo{other} = 1;
+            $flaginfo{msg}   = $flags->{$flag}->{'message'};
+        }
+        push ( @flagloop, \%flaginfo );
+    }
+    $template->param(
+        flagset        => $flagset,
+        flagloop       => \@flagloop,
+        ribornum       => $borrower->{'borrowernumber'},
+        riborcnum      => $borrower->{'cardnumber'},
+        riborsurname   => $borrower->{'surname'},
+        ribortitle     => $borrower->{'title'},
+        riborfirstname => $borrower->{'firstname'}
+    );
+}
+
+my $color = '';
+
+#set up so only the last 8 returned items display (make for faster loading pages)
+my $count = 0;
+my @riloop;
+foreach ( sort { $a <=> $b } keys %returneditems ) {
+    my %ri;
+    if ( $count < 8 ) {
+        ( $color eq $linecolor1 ) 
+          ? ( $color = $linecolor2 )
+          : ( $color = $linecolor1 );
+        $ri{color} = $color;
+        my $barcode = $returneditems{$_};
+        my $duedate = $riduedate{$_};
+        my $overduetext;
+        my $borrowerinfo;
+        if ($duedate) {
+            my @tempdate = split ( /-/, $duedate );
+	    $ri{year}=$tempdate[0];
+	    $ri{month}=$tempdate[1];
+	    $ri{day}=$tempdate[2];
+            my $duedatenz  = "$tempdate[2]/$tempdate[1]/$tempdate[0]";
+            my @datearr    = localtime( time() );
+            my $todaysdate =
+              $datearr[5] . '-'
+              . sprintf( "%0.2d", ( $datearr[4] + 1 ) ) . '-'
+              . sprintf( "%0.2d", $datearr[3] );
+	    $ri{duedate}=$duedate;
+            my ($borrower) =              getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
+            $ri{bornum}       = $borrower->{'borrowernumber'};
+            $ri{borcnum}      = $borrower->{'cardnumber'};
+            $ri{borfirstname} = $borrower->{'firstname'};
+            $ri{borsurname}   = $borrower->{'surname'};
+            $ri{bortitle}     = $borrower->{'title'};
+        }
+        else {
+            $ri{bornum} = $riborrowernumber{$_};
+        }
+#        my %ri;
+        my ($iteminformation) =C4::Circulation::Circ2::getiteminformation( \%env, 0, $barcode );
+        $ri{color}            = $color;
+        $ri{itembiblionumber} = $iteminformation->{'biblionumber'};
+        $ri{itemtitle}        = $iteminformation->{'title'};
+        $ri{itemauthor}       = $iteminformation->{'author'};
+        $ri{itemtype}         = $iteminformation->{'ctype'};
+        $ri{barcode}          = $barcode;
+    }
+    else {
+        last;
+    }
+    $count++;
+    push ( @riloop, \%ri );
+}
+$template->param( riloop => \@riloop );
+
+$template->param(
+    genbrname  => $branches->{$branch}->{'branchname'},
+    genprname  => $printers->{$printer}->{'printername'},
+    branch     => $branch,
+    printer    => $printer,
+    errmsgloop => \@errmsgloop
+);
+
+# actually print the page!
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub cuecatbarcodedecode {
+    my ($barcode) = @_;
+    chomp($barcode);
+    my @fields = split ( /\./, $barcode );
+    my @results = map( decode($_), @fields[ 1 .. $#fields ] );
+    if ( $#results == 2 ) {
+        return $results[2];
+    }
+    else {
+        return $barcode;
+    }
+}
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: circ/returns.pl
===================================================================
RCS file: circ/returns.pl
diff -N circ/returns.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/returns.pl	26 Mar 2007 02:19:21 -0000	1.45.2.2
@@ -0,0 +1,474 @@
+#!/usr/bin/perl
+# WARNING: This file contains mixed-sized tabs! (some 4-character, some 8)
+# WARNING: Currently, 4-character tabs seem to be dominant
+# WARNING: But there are still lots of 8-character tabs
+
+#written 11/3/2002 by Finlay
+#script to execute returns of books
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Circulation::Circ2;
+use C4::Search;
+use C4::Output;
+use C4::Print;
+use C4::Reserves2;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+use C4::Members;
+use C4::Date;
+use C4::Log;
+my $query = new CGI;
+
+#getting the template
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "circ/returns.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { circulate => 1 },
+    }
+);
+
+#####################
+#Global vars
+my %env;
+my $headerbackgroundcolor = '#99cc33';
+my $linecolor1            = '#ffffcc';
+my $linecolor2            = 'white';
+my $todaysdate =get_today();
+my $branches = GetBranches();
+my $printers = getprinters( \%env );
+
+# my $branch  = getbranch( $query,  $branches );
+my $printer = getprinter( $query, $printers );
+
+#
+# Some code to handle the error if there is no branch or printer setting.....
+#
+my $branch=C4::Context->userenv->{'branch'};
+$env{'branchcode'} = $branch;
+$env{'printer'}    = $printer;
+$env{'queue'}      = $printer;
+
+# Set up the item stack ....
+my %returneditems;
+my %riduedate;
+my %riborrowernumber;
+my @inputloop;
+foreach ( $query->param ) {
+    (next) unless (/ri-(\d*)/);
+    my %input;
+    my $counter = $1;
+    (next) if ( $counter > 20 );
+    my $barcode        = $query->param("ri-$counter");
+    my $duedate        = $query->param("dd-$counter");
+    my $borrowernumber = $query->param("bn-$counter");
+    $counter++;
+
+    # decode cuecat
+    $barcode = cuecatbarcodedecode($barcode);
+
+    ######################
+    #Are these lines still useful ?
+    $returneditems{$counter}    = $barcode;
+    $riduedate{$counter}        = $duedate;
+    $riborrowernumber{$counter} = $borrowernumber;
+
+    #######################
+    $input{counter} = $counter;
+    $input{barcode} = $barcode;
+    $input{duedate} = $duedate;
+    $input{bornum}  = $borrowernumber;
+    push ( @inputloop, \%input );
+}
+
+############
+my $item;
+# Deal with the requests....
+if ( $query->param('resbarcode') ) {
+    $item       = $query->param('itemnumber');
+    my $borrnum    = $query->param('borrowernumber');
+    my $resbarcode = $query->param('resbarcode');
+
+    # set to waiting....
+    my $iteminfo = getiteminformation( \%env, $item );
+    my $tobranchcd = ReserveWaiting( $item, $borrnum );
+    my $branchname = $branches->{$tobranchcd}->{'branchname'};
+    my ($borr) = getpatroninformation( \%env, $borrnum, 0 );
+    my $borcnum = $borr->{'cardnumber'};
+    my $name    =
+      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
+    my $slip = $query->param('resslip');
+    printslip( \%env, $slip ); #removed by paul
+
+    if ( $tobranchcd ne $branch ) {
+        $template->param(
+            itemtitle  => $iteminfo->{'title'},
+            iteminfo   => $iteminfo->{'author'},
+            branchname => $branchname,
+            name       => $name,
+            bornum     => $borrnum,
+            borcnum    => $borcnum,
+            diffbranch => 1
+        );
+    }
+}
+
+my $iteminformation;
+my $borrower;
+my $returned = 0;
+my $messages;
+my $barcode = $query->param('barcode');
+
+# actually return book and prepare item table.....
+if ($barcode) {
+
+    # decode cuecat
+    $barcode = cuecatbarcodedecode($barcode);
+    ( $returned, $messages, $iteminformation, $borrower ) =      returnbook( $barcode, $branch );
+    if ($returned) {
+        $returneditems{0}    = $barcode;
+        $riborrowernumber{0} = $borrower->{'borrowernumber'};
+        $riduedate{0}        = $iteminformation->{'date_due'};
+        my %input;
+        $input{counter} = 0;
+        $input{first}   = 1;
+        $input{barcode} = $barcode;
+        $input{duedate} = $riduedate{0};
+        $input{bornum}  = $riborrowernumber{0};
+        push ( @inputloop, \%input );
+logaction($loggedinuser,"circulation","return",$barcode,$borrower->{'borrowernumber'}) if (&logstatus);
+
+    }
+    elsif ( !$messages->{'BadBarcode'} ) {
+		if ( $messages->{'NotIssued'} ) {
+		my $dbh = C4::Context->dbh;
+		my $sth=$dbh->prepare("select duetime from reserveissue where itemnumber=? and isnull(rettime)");
+		$sth->execute($iteminformation->{'itemnumber'});
+		my ($date_due) = $sth->fetchrow;
+		
+		$sth->finish;
+			if ($date_due){
+#				$messages->{'ReserveIssued'} =$barcode;			
+			print $query->redirect("/cgi-bin/koha/circ/resreturns.pl?barcode=$barcode");
+			}
+		}
+        my %input;
+        $input{counter} = 0;
+        $input{first}   = 1;
+        $input{barcode} = $barcode;
+        $input{duedate} = 0;
+
+        $returneditems{0} = $barcode;
+        $riduedate{0}     = 0;
+        if ( $messages->{'wthdrawn'} ) {
+            $input{withdrawn} = 1;
+            $input{bornum}    = "Item Cancelled";
+            $riborrowernumber{0} = 'Item Cancelled';
+        }
+        else {
+            $input{bornum} = "&nbsp;";
+            $riborrowernumber{0} = '&nbsp;';
+        }
+        push ( @inputloop, \%input );
+    }
+    $template->param(
+        returned  => $returned,
+        itemtitle => $iteminformation->{'title'},
+
+        #									itembc => $iteminformation->{'barcode'},
+        #									itemdatedue => $iteminformation->{'datedue'},
+        itemauthor => $iteminformation->{'author'}
+    );
+}
+$template->param( inputloop => \@inputloop );
+
+my $found    = 0;
+my $waiting  = 0;
+my $reserved = 0;
+
+if ( $messages->{'ResFound'} ) {
+    my $res        = $messages->{'ResFound'};
+    my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'};
+    my ($borr) = getpatroninformation( \%env, $res->{'borrowernumber'}, 0 );
+    my $name =
+      $borr->{'surname'} . " " . $borr->{'title'} . " " . $borr->{'firstname'};
+    my ($iteminfo) = getiteminformation( \%env, 0, $barcode );
+
+    if ( $res->{'ResFound'} eq "Waiting" ) {
+        $template->param(
+            found         => 1,
+            name          => $name,
+            borfirstname  => $borr->{'firstname'},
+            borsurname    => $borr->{'surname'},
+            bortitle      => $borr->{'title'},
+            borphone      => $borr->{'phone'},
+            borstraddress => $borr->{'streetaddress'},
+            borcity       => $borr->{'city'},
+            borzip        => $borr->{'zipcode'},
+            bornum        => $res->{'borrowernumber'},
+            borcnum       => $borr->{'cardnumber'},
+            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
+            waiting     => 1,
+            itemnumber  => $res->{'itemnumber'},
+            itemtitle   => $iteminfo->{'title'},
+            itemauthor  => $iteminfo->{'author'},
+            itembarcode => $iteminfo->{'barcode'},
+            itemtype    => $iteminfo->{'ctype'},
+            itembiblionumber => $iteminfo->{'biblionumber'}
+        );
+
+    }
+    if ( $res->{'ResFound'} eq "Reserved" ) {
+      
+        $template->param(
+            found       => 1,
+            branchname  => $branches->{ $res->{'branchcode'} }->{'branchname'},
+            reserved    => 1,
+            today       =>format_date( $todaysdate),
+            itemnumber  => $res->{'itemnumber'},
+            itemtitle   => $iteminfo->{'title'},
+            itemauthor  => $iteminfo->{'author'},
+            itembarcode => $iteminfo->{'barcode'},
+            itemtype    => $iteminfo->{'ctype'},
+            itembiblionumber => $iteminfo->{'biblionumber'},
+            borsurname       => $borr->{'surname'},
+            bortitle         => $borr->{'title'},
+            borfirstname     => $borr->{'firstname'},
+            bornum           => $res->{'borrowernumber'},
+            borcnum          => $borr->{'cardnumber'},
+            borphone         => $borr->{'phone'},
+            borstraddress    => $borr->{'streetaddress'},
+            borsub           => $borr->{'suburb'},
+            borcity          => $borr->{'city'},
+            borzip           => $borr->{'zipcode'},
+            boremail         => $borr->{'emailadress'},
+            barcode          => $barcode
+        );
+    }
+}
+
+# Error Messages
+my @errmsgloop;
+foreach my $code ( keys %$messages ) {
+
+    #    warn $code;
+    my %err;
+    my $exit_required_p = 0;
+    if ( $code eq 'BadBarcode' ) {
+        $err{badbarcode} = 1;
+        $err{msg}        = $messages->{'BadBarcode'};
+    }
+    elsif ( $code eq 'NotIssued' ) {
+        $err{notissued} = 1;
+        $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+    }
+    elsif ( $code eq 'WasLost' ) {
+        $err{waslost} = 1;
+    }
+    elsif ( $code eq 'ResFound' ) {
+        ;    # FIXME... anything to do here?
+    }
+    elsif ( $code eq 'WasReturned' ) {
+        ;    # FIXME... anything to do here?
+    }
+    elsif ( $code eq 'WasTransfered' ) {
+        ;    # FIXME... anything to do here?
+    }
+	elsif ( $code eq 'ReserveIssued' ) {
+        $err{reserveissued} = 1;
+    }
+    elsif ( $code eq 'wthdrawn' ) {
+        $err{withdrawn} = 1;
+        $exit_required_p = 1;
+    }
+    elsif ( ( $code eq 'IsPermanent' ) && ( not $messages->{'ResFound'} ) ) {
+        if ( $messages->{'IsPermanent'} ne $branch ) {
+            $err{ispermanent} = 1;
+            $err{msg}         =
+              $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+        }
+    }
+    else {
+        die "Unknown error code $code";    # XXX
+    }
+    if (%err) {
+        push ( @errmsgloop, \%err );
+    }
+    last if $exit_required_p;
+}
+$template->param( errmsgloop => \@errmsgloop );
+
+# patrontable ....
+if ($borrower) {
+    my $flags = $borrower->{'flags'};
+    my $color = '';
+    my @flagloop;
+    my $flagset;
+    foreach my $flag ( sort keys %$flags ) {
+        my %flaginfo;
+        ( $color eq $linecolor1 ) 
+          ? ( $color = $linecolor2 )
+          : ( $color = $linecolor1 );
+        unless ($flagset) { $flagset = 1; }
+        $flaginfo{color}   = $color;
+        $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
+        $flaginfo{flag}    = $flag;
+        if ( $flag eq 'CHARGES' ) {
+            $flaginfo{msg}     = $flag;
+            $flaginfo{charges} = 1;
+	    $flaginfo{bornum} = $borrower->{borrowernumber};
+        }
+        elsif ( $flag eq 'WAITING' ) {
+            $flaginfo{msg}     = $flag;
+            $flaginfo{waiting} = 1;
+            my @waitingitemloop;
+            my $items = $flags->{$flag}->{'itemlist'};
+            foreach my $item (@$items) {
+                my ($iteminformation) =
+                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+                my %waitingitem;
+                $waitingitem{biblionum} = $iteminformation->{'biblionumber'};
+                $waitingitem{barcode}   = $iteminformation->{'barcode'};
+                $waitingitem{title}     = $iteminformation->{'title'};
+                $waitingitem{brname}    =
+                  $branches->{ $iteminformation->{'holdingbranch'} }->{
+                  'branchname'};
+                push ( @waitingitemloop, \%waitingitem );
+            }
+            $flaginfo{itemloop} = \@waitingitemloop;
+        }
+        elsif ( $flag eq 'ODUES' ) {
+            my $items = $flags->{$flag}->{'itemlist'};
+            my @itemloop;
+            foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
+                @$items )
+            {
+                my ($iteminformation) =
+                  getiteminformation( \%env, $item->{'itemnumber'}, 0 );
+                my %overdueitem;
+                $overdueitem{duedate}   = $item->{'date_due'};
+                $overdueitem{biblionum} = $iteminformation->{'biblionumber'};
+                $overdueitem{barcode}   = $iteminformation->{'barcode'};
+                $overdueitem{title}     = $iteminformation->{'title'};
+                $overdueitem{brname}    =
+                  $branches->{ $iteminformation->{'holdingbranch'} }->{
+                  'branchname'};
+                push ( @itemloop, \%overdueitem );
+            }
+            $flaginfo{itemloop} = \@itemloop;
+            $flaginfo{overdue}  = 1;
+        }
+        else {
+            $flaginfo{other} = 1;
+            $flaginfo{msg}   = $flags->{$flag}->{'message'};
+        }
+        push ( @flagloop, \%flaginfo );
+    }
+    $template->param(
+        flagset        => $flagset,
+        flagloop       => \@flagloop,
+        ribornum       => $borrower->{'borrowernumber'},
+        riborcnum      => $borrower->{'cardnumber'},
+        riborsurname   => $borrower->{'surname'},
+        ribortitle     => $borrower->{'title'},
+        riborfirstname => $borrower->{'firstname'}
+    );
+}
+
+my $color = '';
+
+#set up so only the last 8 returned items display (make for faster loading pages)
+my $count = 0;
+my @riloop;
+foreach ( sort { $a <=> $b } keys %returneditems ) {
+    my %ri;
+    if ( $count < 8 ) {
+        ( $color eq $linecolor1 ) 
+          ? ( $color = $linecolor2 )
+          : ( $color = $linecolor1 );
+        $ri{color} = $color;
+        my $barcode = $returneditems{$_};
+        my $duedate = $riduedate{$_};
+        my $overduetext;
+        my $borrowerinfo;
+        if ($duedate) {
+           
+           
+	    $ri{duedate}=format_date($duedate);
+            my ($borrower) =
+              getpatroninformation( \%env, $riborrowernumber{$_}, 0 );
+            $ri{bornum}       = $borrower->{'borrowernumber'};
+            $ri{borcnum}      = $borrower->{'cardnumber'};
+            $ri{borfirstname} = $borrower->{'firstname'};
+            $ri{borsurname}   = $borrower->{'surname'};
+            $ri{bortitle}     = $borrower->{'title'};
+        }
+        else {
+            $ri{bornum} = $riborrowernumber{$_};
+        }
+#        my %ri;
+        my ($iteminformation) = getiteminformation( \%env, 0, $barcode );
+        $ri{color}            = $color;
+        $ri{itembiblionumber} = $iteminformation->{'biblionumber'};
+        $ri{itemtitle}        = $iteminformation->{'title'};
+        $ri{itemauthor}       = $iteminformation->{'author'};
+        $ri{itemtype}         = $iteminformation->{'ctype'};
+        $ri{barcode}          = $barcode;
+    }
+    else {
+        last;
+    }
+    $count++;
+    push ( @riloop, \%ri );
+}
+$template->param( riloop => \@riloop );
+
+$template->param(
+    genbrname  => $branches->{$branch}->{'branchname'},
+    genprname  => $printers->{$printer}->{'printername'},
+    branch     => $branch,
+    printer    => $printer,
+    errmsgloop => \@errmsgloop
+);
+
+# actually print the page!
+output_html_with_http_headers $query, $cookie, $template->output;
+
+sub cuecatbarcodedecode {
+    my ($barcode) = @_;
+$barcode=~s/ //g;
+    chomp($barcode);
+    my @fields = split ( /\./, $barcode );
+    my @results = map( decode($_), @fields[ 1 .. $#fields ] );
+    if ( $#results == 2 ) {
+        return $results[2];
+    }
+    else {
+        return $barcode;
+    }
+}
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: circ/selectbranchprinter.pl
===================================================================
RCS file: circ/selectbranchprinter.pl
diff -N circ/selectbranchprinter.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/selectbranchprinter.pl	26 Mar 2007 02:19:21 -0000	1.16.4.2
@@ -0,0 +1,145 @@
+#!/usr/bin/perl
+# WARNING: This file uses 4-character tabs!
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Circulation::Circ2;
+use C4::Output;
+use C4::Auth;
+use C4::Print;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+
+
+# this is a reorganisation of circulationold.pl
+# dividing it up into three scripts......
+# this will be the first one that chooses branch and printer settings....
+
+#general design stuff...
+my $headerbackgroundcolor='#99cc33';
+my $circbackgroundcolor='#ffffcc';
+my $circbackgroundcolor='white';
+my $linecolor1='#ffffcc';
+my $linecolor2='white';
+my $backgroundimage="/images/background-mem.gif";
+
+# try to get the branch and printer settings from the http....
+my %env;
+my $query=new CGI;
+my $branches=GetBranches('IS');
+my $printers=getprinters(\%env);
+my $branch=$query->param('branch');
+my $printer=$query->param('printer');
+
+($branch) || ($branch=$query->cookie('branch'));
+($printer) || ($printer=$query->cookie('printer'));
+
+($branches->{$branch}) || ($branch=(keys %$branches)[0]);
+($printers->{$printer}) || ($printer=(keys %$printers)[0]);
+
+
+# is you force a selection....
+my $oldbranch = $branch;
+my $oldprinter = $printer;
+
+#$branch='';
+#$printer='';
+
+
+$env{'branchcode'}=$branch;
+$env{'printer'}=$printer;
+$env{'queue'}=$printer;
+
+# set up select options....
+my $branchcount=0;
+my $printercount=0;
+my @branchloop;
+foreach my $br (keys %$branches) {
+    next unless $br =~ /\S/;
+    #(next) unless ($branches->{$_}->{'IS'}); # FIXME disabled to fix bug 202
+    $branchcount++;
+	my %branch;
+	$branch{selected}=($br eq $oldbranch);
+	$branch{name}=$branches->{$br}->{'branchname'};
+	$branch{value}=$br;
+    push(@branchloop,\%branch);
+}
+my @printerloop;
+foreach (keys %$printers) {
+    (next) unless ($_);
+    $printercount++;
+	my %printer;
+	$printer{selected}=($_ eq $oldprinter);
+	$printer{name}=$printers->{$_}->{'printername'};
+	$printer{value}=$_;
+    push(@printerloop,\%printer);
+}
+
+# if there is only one....
+my $printername;
+my $branchname;
+
+my $oneprinter=($printercount==1) ;
+my $onebranch=($branchcount==1) ;
+if ($printercount==1) {
+    my ($tmpprinter)=keys %$printers;
+	$printername=$printers->{$tmpprinter}->{printername};
+}
+if ($branchcount==1) {
+    my ($tmpbranch)=keys %$branches;
+	$branchname=$branches->{$tmpbranch}->{branchname};
+}
+
+
+#############################################################################################
+# Start writing page....
+# set header with cookie....
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "circ/selectbranchprinter.tmpl",
+							query => $query,
+                            type => "intranet",
+                            authnotrequired => 0,
+                            flagsrequired => {circulate => 1},
+                         });
+$template->param(headerbackgroundcolor => $headerbackgroundcolor,
+							backgroundimage => $backgroundimage,
+							oneprinter => $oneprinter,
+							onebranch => $onebranch,
+							printername => $printername,
+							branchname => $branchname,
+							printerloop => \@printerloop,
+							branchloop => \@branchloop,
+							intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+							);
+
+my $branchcookie=$query->cookie(-name => 'branch', -value => "$branch", -expires => '+1y');
+my $printercookie=$query->cookie(-name => 'printer', -value => "$printer", -expires => '+1y');
+
+my $cookies=[$cookie,$branchcookie, $printercookie]; 
+output_html_with_http_headers $query, $cookies, $template->output;
+
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: circ/waitingreservestransfers.pl
===================================================================
RCS file: circ/waitingreservestransfers.pl
diff -N circ/waitingreservestransfers.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ circ/waitingreservestransfers.pl	26 Mar 2007 02:19:21 -0000	1.5.2.2
@@ -0,0 +1,124 @@
+#!/usr/bin/perl
+
+# $Id: waitingreservestransfers.pl,v 1.5.2.2 2007/03/26 02:19:21 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+use C4::Auth;
+use C4::Date;
+use C4::Circulation::Circ2;
+use C4::Koha;
+use C4::Biblio;
+
+my $input = new CGI;
+
+my $theme = $input->param('theme'); # only used if allowthemeoverride is set
+
+my ($template, $loggedinuser, $cookie)
+      = get_template_and_user({template_name => "circ/waitingreservestransfers.tmpl",
+	                                 query => $input,
+	                                 type => "intranet",
+	                                 authnotrequired => 0,
+	                                 flagsrequired => {borrowers => 1},
+	                                 debug => 1,
+	                                 });
+
+
+# set the userenv branch
+my $default = C4::Context->userenv->{'branch'};
+
+
+my $todaysdate =get_today();
+
+my $item=$input->param('itemnumber');
+my $fbr=$input->param('fbr');
+my $tbr=$input->param('tbr');
+# If we have a return of the form dotransfer, we launch the subroutine dotransfer
+if ($item){
+	C4::Circulation::Circ2::dotransfer($item,$fbr,$tbr);
+}
+
+# get the all the branches for reference
+my $branches = GetBranches();
+my @branchesloop;
+foreach my $br (keys %$branches) {
+	my @reservloop;
+	my %branchloop;
+	$branchloop{'branchname'} = $branches->{$br}->{'branchname'};
+	$branchloop{'branchcode'} = $branches->{$br}->{'branchcode'};
+	my @getreserves = GetReservesToBranch($branches->{$br}->{'branchcode'},$default);
+		if (@getreserves){
+		foreach my $num (@getreserves) {
+			my %getreserv;
+			my %env;
+			my $gettitle = getiteminformation(\%env,$num->{'itemnumber'});
+			my $itemtypeinfo = getitemtypeinfo($gettitle->{'itemtype'});
+			if ($gettitle->{'holdingbranch'} eq $default){
+				my $getborrower = getpatroninformation (\%env,$num->{'borrowernumber'});
+				$getreserv{'reservedate'} = format_date($num->{'reservedate'});
+				my $calcDate=DATE_Add($num->{'reservedate'},C4::Context->preference('TransfersMaxDaysWarning'));
+				my $warning=DATE_Diff($todaysdate,$calcDate);
+				if ($warning>0){
+					$getreserv{'messcompa'} = 1;
+				}
+				$getreserv{'title'} = $gettitle->{'title'};
+				$getreserv{'biblionumber'} = $gettitle->{'biblionumber'};
+				$getreserv{'itemnumber'} = $gettitle->{'itemnumber'};
+				$getreserv{'barcode'} = $gettitle->{'barcode'};
+				$getreserv{'itemtype'} = $itemtypeinfo->{'description'};
+				$getreserv{'holdingbranch'} = $gettitle->{'holdingbranch'};
+				$getreserv{'itemcallnumber'} = $gettitle->{'itemcallnumber'};
+				$getreserv{'borrowernum'} = $getborrower->{'borrowernumber'};
+				$getreserv{'borrowername'} = $getborrower->{'surname'};
+				$getreserv{'borrowerfirstname'} =  $getborrower->{'firstname'} ;
+				if ($getborrower->{'emailaddress'}){
+					$getreserv{'borrowermail'} =  $getborrower->{'emailaddress'} ;
+				}
+				$getreserv{'borrowerphone'} = $getborrower->{'phone'};
+				push(@reservloop, \%getreserv);
+			}
+		}
+# 		If we have a return of reservloop we put it in the branchloop sequence
+		if (@reservloop){
+		$branchloop{'reserv'} = \@reservloop ;
+		}
+# 		else, we unset the value of the branchcode .
+		else{
+		$branchloop{'branchcode'} = 0;
+		}
+	}
+	else {
+# 	if we don't have a retrun from reservestobranch we unset branchname and branchcode
+	$branchloop{'branchname'} = 0;
+	$branchloop{'branchcode'} = 0;
+	}
+	push(@branchesloop, \%branchloop);
+}
+
+	$template->param( branchesloop  => \@branchesloop,
+			show_date	=> format_date($todaysdate)	
+			 );
+	
+	print "Content-Type: text/html\n\n", $template->output;
+
+
+

Index: export/marc-item.pl
===================================================================
RCS file: export/marc-item.pl
diff -N export/marc-item.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ export/marc-item.pl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+use strict;
+
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use CGI;
+use C4::Auth;
+use MARC::Record;
+use MARC::File::XML;
+my $query = new CGI;
+my $op=$query->param("op");
+if ($op eq "export") {
+	print $query->header('Content-Type: text/marc');
+	my $start_bib = $query->param("start_bib");
+	my $end_bib = $query->param("end_bib");
+	my $dbh=C4::Context->dbh;
+	my $sth;
+	if ($start_bib && $end_bib) {
+		$sth=$dbh->prepare("select marcxml from items where itemnumber >=? and itemnumber <=? order by itemnumber");
+		$sth->execute($start_bib,$end_bib);
+	} elsif ($start_bib ) {
+		$sth=$dbh->prepare("select marcxml from items where itemnumber >=?  order by itemnumber");
+		$sth->execute($start_bib);
+	}else {
+		$sth=$dbh->prepare("select marcxml from items order by itemnumber");
+		$sth->execute();
+	}
+	while (my ($marc) = $sth->fetchrow) {
+my $record=MARC::Record->new_from_xml($marc,"UTF-8");
+	
+		print $record->as_usmarc;;
+	
+	}
+} else {
+	my ($template, $loggedinuser, $cookie)
+	= get_template_and_user({template_name => "export/marc_item.tmpl",
+					query => $query,
+					type => "intranet",
+					authnotrequired => 0,
+					flagsrequired => {parameters => 1, management => 1, tools => 1},
+					debug => 1,
+					});
+	output_html_with_http_headers $query, $cookie, $template->output;
+}
+

Index: export/marc.pl
===================================================================
RCS file: export/marc.pl
diff -N export/marc.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ export/marc.pl	26 Mar 2007 02:19:21 -0000	1.9.2.1
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+use strict;
+
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use CGI;
+use C4::Auth;
+use MARC::Record;
+use MARC::File::XML;
+my $query = new CGI;
+my $op=$query->param("op");
+if ($op eq "export") {
+	print $query->header('Content-Type: text/marc');
+	my $start_bib = $query->param("start_bib");
+	my $end_bib = $query->param("end_bib");
+	my $dbh=C4::Context->dbh;
+	my $sth;
+	if ($start_bib && $end_bib) {
+		$sth=$dbh->prepare("select marcxml from biblio where biblionumber >=? and biblionumber <=? order by biblionumber");
+		$sth->execute($start_bib,$end_bib);
+	} elsif ($start_bib ) {
+		$sth=$dbh->prepare("select marcxml from biblio where biblionumber >=?  order by biblionumber");
+		$sth->execute($start_bib);
+	}else {
+		$sth=$dbh->prepare("select marcxml from biblio order by biblionumber");
+		$sth->execute();
+	}
+	while (my ($marc) = $sth->fetchrow) {
+my $record=MARC::Record->new_from_xml($marc,"UTF-8");
+	
+		print $record->as_usmarc;;
+	
+	}
+} else {
+	my ($template, $loggedinuser, $cookie)
+	= get_template_and_user({template_name => "export/marc.tmpl",
+					query => $query,
+					type => "intranet",
+					authnotrequired => 0,
+					flagsrequired => {parameters => 1, management => 1, tools => 1},
+					debug => 1,
+					});
+	output_html_with_http_headers $query, $cookie, $template->output;
+}
+

Index: koha-tmpl/intranet-tmpl/default/en/about.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/about.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/about.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/about.tmpl	26 Mar 2007 02:19:21 -0000	1.14.4.2
@@ -0,0 +1,103 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- About Koha
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_VAR NAME="about" -->
+<h1>About Koha</h1>
+<p>Data about the current version of Koha for bug reports (or general 
+interest).</p>
+<div class="table items"><table>
+  <tr>
+      <th>Koha version:</th>
+      <td><!-- TMPL_VAR ESCAPE="html" NAME="kohaVersion" --></td>
+  </tr>
+  <tr>
+      <th>OS version (from 'uname -a'):</th>
+      <td><!-- TMPL_VAR ESCAPE="html" NAME="osVersion" --></td>
+  </tr>
+  <tr>
+      <th>Perl version:</th>
+      <td><!-- TMPL_VAR ESCAPE="html" NAME="perlVersion" --></td>
+  </tr>
+  <tr>
+      <th>MySQL version:</th>
+      <td><!-- TMPL_VAR ESCAPE="html" NAME="mysqlVersion" --></td>
+  </tr>
+  <tr>
+      <th>Apache version:</th>
+      <td><!-- TMPL_VAR ESCAPE="html" NAME="apacheVersion" --></td>
+  </tr>
+ </table></div>
+
+ <table>
+ <caption>Credits</caption>
+	<tr><th>Special thanks to the following funders</th></tr>
+			<tr><td><ul><li><b>Horowhenua Library Trust</b> and Rosalie Blake, Head of Libraries, (Koha 1.0)</li>
+		<li>The <b>Nelsonville Public Library</b>, USA, Ohio (MARC support funding)</li>
+		<li><b>EMN (Ecole des Mines de Nantes)</b>, France (Suggestion, stats modules and improved ldap support funding)</li>
+		<li><b>ENSMP (Ecole Nationale Supérieure des Mines de Paris)</b>, France (biblio frameworks, MARC authorities, OPAC basket, Serials support funding)</li></ul></td></tr>
+		<li><b>NEU Grand Library</b>, Cyprus (complete new MARC XML interface and ZOOM support)</li></ul></td></tr>
+  	
+<tr>
+	<th>Core Team for 3.2</th></tr>
+	<tr><td>
+<ul>
+	<li><b>Rachel Hamilton-Williams</b>, Kaitiaki</li>
+		<li><b>Joshua Ferraro</b>, 3.2 release manager (Liblime) </li>
+		<li><b>Tumer Garip</b>, Asst. release manager (NEU Grand Library) </li>
+
+		<li>Stephen Hedges, Owen Leonard,  (<b>Nelsonville Public Library</b>)</li>
+		<li><b>Katipo Communications</b> (Koha 1.0 developers)</li>
+		<ul>
+			<li>Rachel Hamilton-Williams, General Manager (Webmistress)</li>
+			<li>Chris Cormack, 1.2 release manager</li>
+			<li>and Simon Blake, Amanda Atkins, Operations Manager, Olwen Williams, Finlay Thompson, Gynn Lomax, Richard Anderson, Jeremy Blake, Rebecca Holden, Olive T. Canine</li></ul>
+		<li>Emiliano Marmonti, Matías Veleda &amp; Sebastian Catañeda <b>La Plata University, Argentina</b> (barcode printing)</li>
+		<li>MJ Ray and <b>Turo Technology LLP</b>, (quality control, installer &amp; updater, 2.0 release maintainer)</li>
+		<li>Nicholas Rosasco, (Documentation Compiler)</li>
+		<li>Mike Hansen</li>
+		<li><b>Pate Eyler</b> (Kaitiaki from 2002 to 2004)</li>
+					</td>
+				</tr>
+<tr><th>Thanks to</th></tr>
+				<tr>
+					<td>
+<ul>
+					<li>Adam Thick</li>
+					<li>Andrew Hooper</li>
+					<li>Al Banks</li>
+					<li>Ambrose Li (translation tool)</li>
+					<li>Andrew Arensburger (the small and great C4::Context module)</li>
+					<li>Benedykt P. Barszcz (Polish for 2.0)</li>
+					<li>Brig C. McCoy</li>
+					<li>Daniel Holth</li>
+					<li>David Strainchamps</li>
+					<li>Dorian Meid (German translation)</li>
+					<li>doXulting (Matthieu Branlat) OPAC basket</li>
+					<li>Ed Summers (Some code and Perl packages like MARC::Record)</li>
+					<li>Esiee School (Jérome Vizcaino, Michel Lerenard, Pierre Cauchois)</li>
+					<li>Florian Bischof</li>
+					<li>Francisco M. Marzoa Alonso</li>
+					<li>Glen Stewart</li>
+					<li>Henri-Damien Laurent</li>
+					<li>Jo Ransom</li>
+					<li>Kip DeGraaf</li>
+					<li>Marco Gaiarin</li>
+					<li>Md. Aftabuddin</li>
+					<li>Michaes Herman</li>
+					<li>Mike Johnson</li>
+					<li>Mike Mylonas</li>
+					<li>Nicolas Morin (French Translation in 2.0)</li>
+					<li>Pawel Skuza (Polish for 1.2)</li>
+					<li>Regula Sebastiao</li>
+					<li>Roger Buck</li>
+					<li>Ron Wickersham</li>
+					<li>Sebastiaan Durand</li>
+					<li>Steve Tonnesen (early MARC work, Virtual Bookshelves concept, KohaCD)</li>
+					<li>Universidad ORT Uruguay (Ernesto Silva, Andres Tarallo)</li></ul>					</td>
+				</tr>
+			</table>
+</div>
+</div>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/auth.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/auth.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/auth.tmpl	26 Mar 2007 02:19:21 -0000	1.8.6.2
@@ -0,0 +1,47 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- <!-- TMPL_IF NAME="nopermission" -->Access Denied<!-- /TMPL_IF --><!-- TMPL_IF NAME="timed_out" -->Session Timed Out --<!-- /TMPL_IF --><!-- TMPL_IF NAME="different_ip" -->IP Change -- <!-- /TMPL_IF --><!-- TMPL_IF NAME="invalid_username_or_password" -->Invalid Username or Password -- <!-- /TMPL_IF --><!-- TMPL_IF NAME="loginprompt" -->Log in to NEULIS<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<div id="auth">
+
+<!-- TMPL_IF NAME="nopermission" -->
+<div class="error"><!-- This is what is displayed if user doesn"t have permission --><h3>Login Error</h3>
+Sorry, NEULIS doesn't think you have permission for this page.</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="timed_out" -->
+<div class="error"><!-- This is what is displayed if login has timed out -->
+<h3>Login Error</h3>Sorry, your session has timed out.  Please login again.</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="different_ip" -->
+<div class="error"><!-- This is what is displayed if user"s IP has changed -->
+<h3>Login Error</h3>You are accessing NEULIS from a different ip address! Please login again.</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="invalid_username_or_password" -->
+<div class="error"><!-- This is what is displayed if the username or password doesn"t work -->
+<h3>Login Error</h3>You entered an incorrect username or password.  Please try again.</div>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="loginprompt" -->
+<!-- login prompt time-->
+
+<form action="<!-- TMPL_VAR NAME="url" -->" method="post" name="mainform" id="mainform">
+<!-- TMPL_LOOP NAME="INPUTS" -->
+  <input type="hidden" name="<!-- TMPL_VAR NAME="name" -->" value="<!-- TMPL_VAR NAME="value" -->" />
+<!-- /TMPL_LOOP -->
+
+<table>
+<div class="details"><table>
+	<h1>Log In to NEULIS</h1><br>
+    <tr><th><label for="userid">Cardnumber:</label></th><td><input name="userid" id="userid" /></td></tr>
+    <tr><th><label for="password">Password:</label></th><td><input type="password" name="password" id="password" /></td></tr>
+    </table>
+<p><input type="submit" value="Submit" class="submit" /></p></div>
+</table>
+
+</form>
+<!-- /TMPL_IF -->
+</div>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/acqui-home.tmpl	26 Mar 2007 02:19:21 -0000	1.15.4.2
@@ -0,0 +1,104 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Acquisitions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE name="masthead.inc" -->
+<!-- TMPL_INCLUDE name="menu-acqui.inc" -->
+
+<div id="main">
+
+<h1>Acquisitions</h1>
+<div id="acqui_acqui_home_order">
+	<!-- TMPL_IF name="nobudget" -->
+		You must define a budget in parameters
+	<!-- TMPL_ELSE -->
+		<form action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
+			<h2>Start, recieve, or modify any order</h2>
+			<p><label for="supplier">Supplier ID or name</label><input type="text" size="25" name="supplier" id="supplier" />
+			<input type="submit" value="Search" />
+			</p>
+		</form>
+	<!-- /TMPL_IF -->
+</div>
+
+
+<div id="acqui_acqui_home_currency">
+<!-- TMPL_IF NAME="loop_currency" -->
+	<h2>Exchange rates</h2>
+	<form action="/cgi-bin/koha/acqui/currency.pl">
+	<table>
+		<tr>
+			<th>Currency</th>
+			<th>Rate</th>
+		</tr>
+		<!-- TMPL_LOOP name="loop_currency" -->
+			<tr>
+				<td>
+					<label for="<!-- TMPL_VAR name="currency" -->"><!-- TMPL_VAR name="currency" --></label>
+				</td>
+				<td>
+						<input type="hidden" name="type" value="change" />
+						<input type="text" size="10" id="<!-- TMPL_VAR name="currency" -->" name="<!-- TMPL_VAR name="currency" -->" value="<!-- TMPL_VAR name="rate" -->" />
+				</td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+	</table>
+	<input type="submit" value="Save Exchange Rate" />
+	</form>
+<!-- TMPL_ELSE -->
+	<form action="/cgi-bin/koha/admin/currency.pl" method="post">
+	<input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Currency" />
+	</form>
+<!-- /TMPL_IF -->
+</div>
+
+<div id="acqui_acqui_home_suggestions">
+	<h2>Pending Suggestions</h2>
+		<!-- TMPL_IF name="suggestion" -->
+			<!--TMPL_VAR NAME="suggestion" --> suggestions waiting <a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Manage suggestions</a>
+		<!-- TMPL_ELSE -->
+			<p>No suggestions waiting</p>
+		<!-- /TMPL_IF -->
+</div>
+
+<div id="acqui_acqui_home_budgets">
+	<!-- TMPL_IF name="nobudget" -->
+		<p>You must define a budget in parameters</p>
+	<!-- TMPL_ELSE -->
+	<h2>Budgets and bookfunds</h2>
+	<table>
+		<tr>
+			<th>Budgets</th>
+			<th>Total</th>
+			<th>Spent</th>
+			<th>Comtd</th>
+			<th>Avail</th>
+		</tr>
+		<!-- TMPL_LOOP name="loop_budget" -->
+			<tr>
+				<td><!-- TMPL_VAR name="bookfundname" --></td>
+				<td><!-- TMPL_VAR name="budgetamount" --></td>
+				<td><!-- TMPL_VAR name="spent" --></td>
+				<td><!-- TMPL_VAR name="comtd" --></td>
+				<td><!-- TMPL_VAR name="avail" --></td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+		<tr>
+			<td>Total</td>
+			<td><!-- TMPL_VAR name="total" --></td>
+			<td><!-- TMPL_VAR name="totspent" --></td>
+			<td><!-- TMPL_VAR name="totcomtd" --></td>
+			<td><!-- TMPL_VAR name="totavail" --></td>
+		</tr>
+	</table><!-- /TMPL_IF -->
+</div>
+<div id="acqui_acqui_home_hints">
+	<p>Use your reload button [ctrl + r] to get the most recent figures.
+	Committed figures are approximate only, as exchange rates will affect the amount actually paid.</p>
+	
+	<h2>Help</h2>
+	<p>To start an acquisition, whether an order, local purchase or donation first search on the supplier, (set donations as a supplier if you wish), and click add order which  will set up a "shopping basket" for you.</p>
+	<p>To place an order you need to establish whether a biblio already exists for it, or set up a new biblio from scratch or from a suggestion.  </p>
+	<p>To close  a shopping basket  click on "confirm Close Basket". After closing a basket it can not be modified or deleted</p>
+	<p>To receive an order (a parcel)  search for the supplier and click receive. After confirming invoice details you will be asked to create items for the order</p>
+	
+</div>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/basket.tmpl	26 Mar 2007 02:19:21 -0000	1.25.2.2
@@ -0,0 +1,149 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Shopping Basket (<!-- TMPL_VAR NAME="basketno" -->) for <!-- TMPL_VAR NAME="name" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE name="masthead.inc" -->
+<!-- TMPL_INCLUDE name="intranet-nav-brief.inc" -->
+
+<div id="main">
+<script>
+function Searchrecord()
+{
+	 window.open('/cgi-bin/koha/serials/subscription-bib-search.pl','FindABibIndex','width=500,height=400,toolbar=no,scrollbars=yes');
+}
+</script>
+	<h1><!-- TMPL_UNLESS name="basketno" -->New <!-- /TMPL_UNLESS -->Shopping Basket <!-- TMPL_VAR NAME="basketno" --> for <a href="supplier.pl?supplierid=<!-- TMPL_VAR NAME="booksellerid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
+	<div id="acqui_basket_summary">
+		<h2>Basket Details</h2>
+		<table>
+		<tr><th>Basket Number:</th><td><!-- TMPL_VAR NAME="basketno" --></td></tr>
+		<tr><th>Managed By:</th><td><!-- TMPL_VAR NAME="authorisedbyname" --></td></tr>
+		<tr><th>Open On:</th><td><!-- TMPL_VAR NAME="creationdate" --></td></tr>
+		<tr><th>For:</th><td>Supplier Id <!-- TMPL_VAR NAME="booksellerid" --></td></tr>
+		<tr><th>Invoice Number:</th><td><!-- TMPL_VAR NAME="booksellerinvoicenumber" --></td></tr>
+		<tr><th>Purchase Order Number:</th><td><!-- TMPL_VAR NAME="purchaseordernumber" --></td></tr>
+		<!-- TMPL_IF name="closedate" --><tr><th>Closed On:</th><td> <!-- TMPL_VAR name="closedate" --></td></tr><!-- /TMPL_IF -->
+		</table>
+		<!-- TMPL_UNLESS name="closedate" -->
+		<!-- TMPL_IF NAME="basketno" -->
+		<form action="/cgi-bin/koha/acqui/booksellers.pl" method="get">
+			<input type="hidden" name="op" value="close" />
+			<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
+			<input type="hidden" name="supplier" value="<!-- TMPL_VAR name="booksellerid" -->" />
+			<input type="submit" value="Confirm Close this Basket" />
+		</form>
+		<!-- /TMPL_IF-->
+		<!-- /TMPL_UNLESS -->
+	</div>
+	
+	<div id="acqui_basket_content">
+	<h2>Order Details</h2>
+	<!-- TMPL_IF name="books_loop" -->
+		<table>
+			<tr>
+				<th scope="col">Order</th>
+				<th scope="col">Publisher</th>
+				<th scope="col"><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->&amp;order=biblio.title">Title</a></th>
+				<th scope="col">RRP</th>
+				<th scope="col">Qty.</th>
+				<th scope="col">Total</th>
+				<th scope="col"><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->&amp;order=aqorderbreakdown.bookfundid">Fund</a></th>
+<!-- TMPL_IF name="active" -->
+<!-- TMPL_UNLESS name="closedate" -->
+					<th scope="col">Remove</th>
+				<!-- /TMPL_UNLESS -->
+					<!-- /TMPL_IF -->
+			</tr>
+			<!-- TMPL_LOOP NAME="books_loop" -->
+				<!-- TMPL_IF NAME="highlight" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+							<td><!-- TMPL_VAR NAME="ordernumber" --></td>
+					<td><!-- TMPL_VAR NAME="publishercode" --></td>
+					<!-- TMPL_IF name="closedate" -->
+						<td><p>
+							<!-- TMPL_VAR NAME="title" --><br/>
+								<!-- TMPL_VAR NAME="author" -->
+								<!-- TMPL_IF name="isbn"-->- <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
+								<!-- TMPL_IF name="notes" --></p><p><!--TMPL_VAR name="notes" --><!-- /TMPL_IF -->
+							</p>
+						</td>
+					<!-- TMPL_ELSE -->
+						<td>
+							<p>
+							<a href="neworderempty.pl?ordnum=<!-- TMPL_VAR NAME="ordernumber" -->&booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->"><!-- TMPL_VAR NAME="title" --></a><br/>
+								<!-- TMPL_VAR NAME="author" -->
+								<!-- TMPL_IF name="isbn"-->- <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF -->
+								<!-- TMPL_IF name="notes" --></p><p><!--TMPL_VAR name="notes" --><!-- /TMPL_IF -->
+							</p>
+						</td>
+					<!-- /TMPL_IF -->
+					<td><!-- TMPL_VAR NAME="rrp" --></td>					
+					<td><!-- TMPL_VAR NAME="quantity" --></td>
+					<td><!-- TMPL_VAR NAME="line_total" --></td>
+					<td><!-- TMPL_VAR NAME="bookfundid" --></td>
+					<!-- TMPL_IF name="active" -->
+					<!-- TMPL_UNLESS name="closedate" -->
+					<!-- TMPL_UNLESS name="donotdelete" -->
+					<td>
+							<form action="addorder.pl" method="get">
+								<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordernumber" -->" />
+								<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
+								<input type="hidden" name="quantity" value="0" />
+								<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+								<input type="submit" class="delete" value="Delete" />
+							</form>
+						</td>
+					<!-- /TMPL_UNLESS -->
+					<!-- /TMPL_UNLESS -->
+					<!-- /TMPL_IF -->
+				</tr>
+			<!-- /TMPL_LOOP -->
+			
+			<tr>
+				<td colspan="2" rowspan="3">
+					<input type="hidden" name="number" value="<!-- TMPL_VAR NAME="count" -->" />
+					<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
+				</td>
+				<th align="right">SubTotal</th>
+				<th><!-- TMPL_VAR NAME="sub_total_est" --></th>
+				<th><!-- TMPL_VAR name="qty_total" --></th>				
+			</tr>
+			<!--TMPL_IF NAME="disc_est"-->
+			<tr>
+				<th align="right">Discount</th>
+				<th>-<!-- TMPL_VAR NAME="disc_est" --></th>
+			</tr>
+			<!--/TMPL_IF-->
+			<!--TMPL_IF NAME="gist"-->
+			<tr>
+				<th align="right">Tax</th>
+				<th><!-- TMPL_VAR NAME="gist_est" --></th>
+			</tr>
+			<!--/TMPL_IF-->
+			<tr><td></td><td></td>
+				<th align="right">TOTAL</th>
+				<th><!-- TMPL_VAR NAME="grand_total_est" --></th>
+			</tr>
+		</table>
+	<!-- TMPL_ELSE -->
+		<table>
+			<tr><td>Basket empty</td></tr>
+		</table>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_UNLESS name="closedate" -->
+	</div>
+	<div id="acqui_basket_add">
+		<h2>Add To Order</h2>
+		<form action="/cgi-bin/koha/acqui/neworderempty.pl" method="get" name="f" id="f">
+			<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
+			<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
+			To add from an existing record:
+			<li>Enter an existing  biblionumber: <input type="text"  size="25"   name="biblionumber" />
+			<input type="submit" value="Add order" /></li>
+			<li>or <a href="#" onClick="Searchrecord()">Search for an existing Biblio</a></li>
+			<ul><li><a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->">From a Suggestion</a></li>
+			<li><a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->">New Record</a></li>
+			</ul>
+		</form>
+	</div>
+	<!-- /TMPL_UNLESS -->
+</div>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/booksellers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/booksellers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/booksellers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/booksellers.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,84 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Search supplier <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+<div id="main">
+<h1>You searched on <b>supplier: <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> baskets found</h1>
+<div id="acqui_order_supplierlist">
+	<table>
+	<tr>
+		<th>Order</th>
+		<th>Company</th>
+		<th>&nbsp;</th>
+		
+	</tr>
+	
+	<!-- TMPL_LOOP name="loop_suppliers" -->
+		<tr>
+			<td>
+				<!-- TMPL_IF name="active" -->
+					<a href="basket.pl?supplierid=<!-- TMPL_VAR name=supplierid -->">Add order</a>
+				<!-- TMPL_ELSE -->
+					Inactive
+				<!-- /TMPL_IF -->
+			</td>
+			
+			<td><a href="supplier.pl?supplierid=<!-- TMPL_VAR name=supplierid -->"><!-- TMPL_VAR name="name" --></a></td>
+			
+			<!--TMPL_IF NAME="ordcount"-->
+				<td>
+				<a href="parcel.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->">Recieve All orders</a>
+				</td>
+			<!--/TMPL_IF-->
+			
+				<td>
+				<table><!--TMPL_IF NAME="ordcount"-->
+					<th>Basket</th>
+					<th>Purchase order</th>
+					<th>Created by</th>
+					<th>Date</th>
+					<th>&nbsp;</th>
+					<!--/TMPL_IF-->	
+						<!-- TMPL_LOOP NAME="loop_basket" -->
+							<tr>
+								<td><!-- TMPL_VAR NAME="basketno" --></td>
+								<td><TMPL_VAR NAME="purchaseordernumber"></td>
+								<td>
+									<!-- TMPL_VAR name="firstname" -->
+										<!-- TMPL_VAR name="surname" -->
+								</td>
+								<td><!-- TMPL_VAR NAME="creationdate" --></td>
+								<td>
+									<!-- TMPL_IF name="closedate" -->
+										closed on <!-- TMPL_VAR NAME="closedate" -->
+										<a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
+									<!-- TMPL_ELSE -->
+										<!-- TMPL_IF name="active" -->
+											<a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">modify</a>
+										<!-- TMPL_ELSE -->
+											<a href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->" class="button acquisition">View</a>
+										<!-- /TMPL_IF -->
+									<!-- /TMPL_IF -->
+								</td>
+								<td>
+								<!--TMPL_IF NAME="ordcount"-->
+								
+								<a href="parcel.pl?supplierid=<!-- TMPL_VAR name="supplierid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">Recieve this order</a>
+								
+								<!--/TMPL_IF-->
+								</td>
+							</tr>
+						<!-- /TMPL_LOOP -->
+					</table>
+			</td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+		</table>
+</div>
+<div id="acqui_order_add_supplier">
+	<form action="supplier.pl">
+		<input type="hidden" name="supplierid" value="0" />
+		<input type="submit" value="Add supplier" />
+	</form>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/finishreceive.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/finishreceive.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/finishreceive.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/finishreceive.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,41 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Receipt Summary for : <!-- TMPL_VAR NAME="name" --> <!-- TMPL_IF NAME="invoice" -->Invoice, <!-- TMPL_VAR NAME="invoice" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
+
+
+<h1>Finish Receiveing Order </h1>
+
+
+
+
+   
+<div id="acqui_acquire_orderlist">
+    <table><tr><th colspan="5">Use these values to create the items for this order</th><tr>
+    <tr>
+        <th>Title</th>
+        <th>Supplier</th>
+        <th>Replacement</th>
+        <th>Qty</th>
+        
+    </tr>
+    <!-- TMPL_LOOP name="loopbiblios" -->
+        <tr><input type="hidden" name="bibliocount" value="<!--TMPL_VAR NAME="biblionumber"-->"/>
+            <td><!-- TMPL_VAR NAME="title" --></td>
+            <td><!-- TMPL_VAR NAME="supplier" --></td>
+             <td><!-- TMPL_VAR NAME="rrp" --></td>
+            <td><input type="text" name="itemcount" size="1" value="<!-- TMPL_VAR NAME="itemcount" -->" READONLY/></td>
+            <td><div id="<!--TMPL_VAR NAME="biblionumber"-->"><a href="#" onClick="AddItem(<!--TMPL_VAR NAME="biblionumber"-->)">Add item</a></div></td>
+        </tr>
+    <!-- /TMPL_LOOP -->
+    </table>
+</div>
+
+<script type="text/javascript">
+function AddItem(biblionumber) {
+     window.open("/cgi-bin/koha/cataloguing/additem.pl?fromserials=1&serialid=000&biblionumber="+biblionumber,"AddItem",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
+
+}
+</script>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/histsearch.tmpl	26 Mar 2007 02:19:21 -0000	1.7.4.2
@@ -0,0 +1,105 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Acquisitions: Order Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE name="masthead.inc" -->
+<!-- TMPL_INCLUDE name="intranet-nav.inc" -->
+
+<div id="main">
+	<h1>Order search</h1>
+	<div id="acqui_histsearch">
+		<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
+		<table>
+			<tr>
+				<th>&nbsp;</th>
+				<th>Title</th>
+				<th>Author</th>
+				<th>Supplier</th>
+				<th>Placed on</th>
+				<th>Recieved on</th>
+				<th>Quantity ordered</th>
+				<th>Unit cost</th>
+				<th>&nbsp;</th>
+			</tr>
+			<tr>
+					<th>Filter By:</th>
+					<th><input type="text" name="title" value="<!-- TMPL_VAR name="title"-->" /></th>
+					<th><input type="text" name="author" value="<!-- TMPL_VAR name="author" -->" /></th>
+					<th><input type="text" name="name" value="<!-- TMPL_VAR name="name" -->" /></th>
+					<th>From <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" alt="calendar" />
+						<input type="text" readonly="readonly" size="10" id="from" name="fromplacedon" value="<!-- TMPL_VAR name="from_placed_on" -->" />
+						<script language="JavaScript" type="text/javascript">
+							function validate1(date) {
+								var day = date.getDate();
+								var month = date.getMonth() + 1;
+								var year = date.getFullYear();
+								var weekDay = date.getDay();
+								var dayMonth = month + '-' + day;
+								var dateString = year + '-' + month + '-' + day;
+								var dateTo = document.getElementById('to').value.split("-");
+								var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
+								if (date > limitDate) {
+									return true;
+								} else {
+									return false;
+								}
+							}
+							Calendar.setup(
+								{
+									inputField : "from",
+									ifFormat : "%Y-%m-%d",
+									button : "openCalendarFrom",
+									disableFunc : validate1,
+									dateStatusFunc : validate1
+								}
+							);
+						</script>
+						To <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="calendar" />
+						<input readonly="readonly" size="10" id="to" name="toplacedon" value="<!-- TMPL_VAR name="to_placed_on" -->" type="text" />
+						<script type="text/javascript">
+							function validate2(date) {
+								var day = date.getDate();
+								var month = date.getMonth() + 1;
+								var year = date.getFullYear();
+								var weekDay = date.getDay();
+								var dayMonth = month + '-' + day;
+								var dateString = year + '-' + month + '-' + day;
+								var dateFrom = document.getElementById('from').value.split("-");
+								var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
+								if (limitDate > date) {
+									return true;
+								} else {
+									return false;
+								}
+							}
+	
+							Calendar.setup(
+								{
+									inputField : "to",
+									ifFormat : "%Y-%m-%d",
+									button : "openCalendarTo",
+									disableFunc : validate2,
+									dateStatusFunc : validate2
+								}
+							);
+						</script></th>
+					<th>&nbsp;</th>
+					<th>&nbsp;</th>
+					<th>&nbsp;</th>
+					<th><input type="submit" value="Set Filter" /></th>
+			</tr>
+			<!-- TMPL_LOOP NAME="suggestions_loop" -->
+				<tr>
+					<td>&nbsp;</td>
+					<td><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+					<td><!-- TMPL_VAR NAME="author" --></td>
+					<td><!-- TMPL_VAR NAME="name" --></td>
+					<td><!-- TMPL_VAR name="creationdate" --></td>
+					<td><!-- TMPL_VAR name="datereceived" --></td>
+					<td><!-- TMPL_VAR name="quantity" --></td>
+					<td><!-- TMPL_VAR name="ecost" --></td>
+					<td>&nbsp;</td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+		</form>
+	</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/lateorders.tmpl	26 Mar 2007 02:19:21 -0000	1.4.4.2
@@ -0,0 +1,110 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Acquisitions<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
+<div id="main">
+<h1 ><!-- TMPL_IF name="Supplier" --><!-- TMPL_VAR name="Supplier" --> : <!--/TMPL_IF -->Late issues</h1>
+	<div id="acqui_lateorders">
+		<form action="lateorders.pl" method="post">
+		<table>
+			<tr>
+				<th>Supplier</th>
+				<th>Order Date</th>
+				<th>Ordered for</th>
+				<th>Including Basket</th>
+				<th>Book information</th>
+				<th>Branch</th>
+				<th>Estimated Unit Price</th>
+				<th>Retailer Catalogue Unit Price</th>
+				<th>Quantity</th>
+				<th>Total cost</th>
+				<th>Budget</th>
+				<th>&nbsp;</th>
+			</tr>
+			<tr>
+					<td class="doNotPrint">
+						<!-- TMPL_VAR name="CGIsupplier" -->
+					</td>
+					<td> &nbsp;</td>
+					<td align="center" class="doNotPrint">
+						<input align="right" size="4" maxlength="3" type="text" name="delay" value="<!--TMPL_VAR Name="delay" -->" /> days
+					</td>
+					<td colspan="2">
+						&nbsp;
+					</td>
+					<td class="doNotPrint">
+						<select name="branch">
+						<!-- TMPL_LOOP name="branchloop" -->
+							<option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="branchname" --></option>
+						<!-- /TMPL_LOOP -->
+						</select>
+					</td>
+					<td colspan="5">
+						&nbsp;
+					</td>
+					
+					<td class="doNotPrint">
+						<input type="submit" value="filter" />
+					</td>
+			</tr>
+			<!-- TMPL_LOOP name="lateorders" -->
+				<!--TMPL_IF Name="hilighted" --> <tr class="hilighted"> <!--TMPL_ELSE--> <tr> <!-- /TMPL_IF -->
+					<td class="doNotPrint">
+						<!-- TMPL_VAR name="supplier" -->
+					</td>
+					<td>
+						<!-- TMPL_VAR name="orderdate" -->
+					</td>
+					<td class="number" align="right">
+						<!-- TMPL_VAR name="latesince" -->
+					</td>
+					<td align="center" class="doNotPrint">
+						<!-- TMPL_VAR name="basketno" -->
+					</td>
+					<td >
+						<b><!-- TMPL_VAR name="title" --></b>
+					<!-- TMPL_IF name="author" --><br/><i>Author:</i> <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
+					<!-- TMPL_IF name="publisher" --><br/><i>Published by:</i> <!-- TMPL_VAR NAME="publisher" --><!-- TMPL_IF name="publicationyear" --><i> in </i><!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF --><!-- /TMPL_IF -->
+					</td>
+					<td class="doNotPrint">
+						<!-- TMPL_VAR name="branch" -->
+					</td>
+					<td align="right" class="doNotPrint">
+						<!-- TMPL_VAR name="unitpricelib" -->
+					</td>
+					<td align="right">
+						<!-- TMPL_VAR name="unitpricesupplier" -->
+					</td>
+					<td align="right">
+						<!-- TMPL_VAR name="quantity" -->
+					</td>
+					<td align="right">
+						<!-- TMPL_VAR name="subtotal" -->
+					</td>
+					<td class="doNotPrint">
+						<!-- TMPL_VAR name="budget" -->
+					</td>
+					<td class="doNotPrint">
+						&nbsp;
+					</td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+			<tr> 
+					<th>
+						Total
+					</th>
+					<th colspan="2">
+						&nbsp;
+					</th>
+					<th class="doNotPrint"> &nbsp;</th>
+					<th colspan="5">
+						&nbsp;
+					</th>
+					
+					<th>
+						<!-- TMPL_VAR name="total" -->
+					</th>
+			</tr>
+		</table>
+		</form>
+	</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/acqui/neworderempty.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/neworderempty.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/neworderempty.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/neworderempty.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,256 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Shopping Basket For: <!-- TMPL_VAR name="booksellername" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
+
+<script language="javascript" type="text/javascript">
+
+function update(f){
+  //collect values
+  quantity=f.quantity.value
+  if (quantity ==0) {
+  	alert("Quantity must be >0");
+  }
+  discount=f.discount.value
+  listinc=parseInt(f.listinc.value)
+  currency=f.currency.value
+  applygst=parseInt(f.applygst.value)
+  listprice=f.list_price.value
+  //  rrp=f.rrp.value
+  //  ecost=f.ecost.value  //budgetted cost
+  //  GST=f.GST.value
+  //  total=f.total.value
+  //make useful constants out of the above
+  exchangerate=f.elements[currency].value      //get exchange rate
+  gst_on=(applygst);
+  //do real stuff
+   if (listinc){
+listprice=listprice*100/(100+f.gstrate.value)
+}
+  rrp=listprice*exchangerate;
+  ecost=rrp*(100-discount)/100
+  GST=0;
+  if (gst_on){
+ //   rrp=rrp*(1+f.gstrate.value/100);
+    GST=ecost*(f.gstrate.value)/100;
+  }
+
+  total=(ecost+GST)*quantity
+
+  f.rrp.value=rrp;
+  f.ecost.value=ecost;
+  f.unitprice.value=ecost+GST
+  f.GST.value=GST;
+  f.total.value=total;
+  return true;
+}
+
+
+
+function messenger(X,Y,etc){
+	win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
+	win.focus();
+	win.document.close();
+	win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br>");
+	win.document.write(etc);
+	win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
+	win.document.write("</font></body></html>");
+}
+
+function check(f) {
+  quantity=f.quantity.value;
+  title=f.title.value;
+ biblio=f.biblionumber.value;
+ invoice=f.purchaseordernumber.value;
+suggestionid="<!--TMPL_VAR NAME="suggestionid"-->";
+  if (title == "") {
+  	alert("Title can't be empty- Have you created the biblio?");
+	return false;
+  }
+ if (biblio == "" && suggestionid=="") {
+  	alert("A biblio is not created- please create the biblio first?");
+	return false;
+  }
+  if (quantity ==0) {
+  	alert("Quantity must be >0");
+	return false;
+  }
+
+	document.frusin.submit();
+}
+function AddBiblio() {
+     window.open("/cgi-bin/koha/cataloguing/addbiblio.pl?fromserials=1&popup=1&suggestionid=<!--TMPL_VAR NAME="suggestionid"-->","AddBiblio",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
+
+}
+</script>
+<div id="main">
+<h1>
+	<!-- TMPL_IF name="ordnum" -->
+		Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
+	<!-- TMPL_ELSE -->
+		New order
+	<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
+</h1>
+	<div id="acqui_basket_summary">
+		<h2>Basket Details</h2>
+		<table>
+		<tr><th>Basket Number:</th><td><!-- TMPL_VAR NAME="basketno" --></td></tr>
+		<tr><th>Managed By:</th><td><!-- TMPL_VAR NAME="authorisedbyname" --></td></tr>
+		<tr><th>Open On:</th><td><!-- TMPL_VAR NAME="creationdate" --></td></tr>
+		<tr><th>For:</th><td>Supplier Id <!-- TMPL_VAR NAME="booksellerid" --></td></tr>
+		<tr><th>Invoice Number:</th><td><!-- TMPL_VAR NAME="booksellerinvoicenumber" --></td></tr>
+		<tr><th>Purchase Order Number:</th><td><!-- TMPL_VAR NAME="purchaseordernumber" --></td></tr>
+		<!-- TMPL_IF name="closedate" --><tr><th>Closed On:</th><td> <!-- TMPL_VAR name="closedate" --></td></tr><!-- /TMPL_IF -->
+		</table>
+	</div>
+
+<div id="acqui_newbiblio_edit_catalogue">
+	<h2>catalogue details</h2>
+	<form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="frusin">
+	<!-- TMPL_UNLESS name="existing" -->
+		<input type="hidden" name="existing" value="no" >
+	<!-- /TMPL_UNLESS -->
+	<input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->" />
+	<input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
+	<input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
+	<input type="hidden" name="biblionumber" id="biblionumber"  value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+	<input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->" />
+	<input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
+	<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
+	<input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
+	<input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
+	<!-- TMPL_LOOP NAME="loop_currencies" -->
+		<input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
+	<!-- /TMPL_LOOP -->
+	
+	<p> 
+		<label><b>Title *</b></label>
+		
+			<input type="text" size="20" name="title" id="title" value="<!-- TMPL_VAR NAME="title" -->" READONLY/>Auto filled
+	</p>
+	<!-- TMPL_IF name="biblionumber" -->
+	<p>
+		<label>Author</label>
+			<input type="hidden" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
+	</p>
+	<p>
+		<label> Publisher</label>
+			<input type="hidden" size="20" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
+	</p>
+	<p>
+		<label>Copyright Date</label>
+			<input type="hidden" size="20" name="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" /><!-- TMPL_VAR NAME="copyrightdate" -->
+		
+	</p>
+	<p>
+		<label>Format</label>
+		<!-- TMPL_VAR NAME="itemtype" -->
+	</p>
+	<p>
+		<label>ISBN</label>
+			<input type="hidden" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
+		
+	</p>
+	<p>
+		<label>Series</label>
+			<input type="hidden" size="20" name="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><!-- TMPL_VAR NAME="seriestitle" -->
+	</p>
+	<!--TMPL_ELSE-->
+	<!--TMPL_UNLESS NAME="suggestionid"--><p><a href="#" onClick="AddBiblio()">First Create a Biblio for this order</a></p><!--/TMPL_UNLESS-->
+	<!--/TMPL_IF-->
+		
+	<h2>Accounting details</h2>
+		<p>
+		<label>Branch</label>
+		<select name="branch">
+		<!-- TMPL_LOOP name="branchloop" -->
+			<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
+		<!-- /TMPL_LOOP -->
+		</select>
+	</p>
+		<p>
+			<label>Quantity</label>
+			
+				<input type="text" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);" <!-- TMPL_IF name="close" -->readonly<!--/TMPL_IF--/>
+		
+		</p>
+		<p>
+			<label>Bookfund</label>
+			<!-- TMPL_IF name="close" -->
+				<input type="hidden" size="20" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundname" -->
+			<!-- TMPL_ELSE -->
+				<!-- TMPL_VAR NAME="CGIbookfund" -->
+		  	<!--/TMPL_IF-->
+		</p>
+		Note: All figures are in local currency, except the suppliers list price which is indicated.Currency conversion is done automatically
+		<!-- TMPL_IF NAME="gstreg" -->
+		<p>
+		 <label> Applicable Tax rate</label>
+		<input type="text" size="20" name="gstrate" value="<!--TMPL_VAR NAME="gstrate"-->" onchange="update(this.form)" />%
+		</p>
+		<!--/TMPL_IF-->
+		<p>
+			<label>Suppliers List Price</label>
+	
+				<input type="text" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)" <!-- TMPL_IF name="close" -->readonly<!--/TMPL_IF-->/><!-- TMPL_VAR NAME="currency" -->
+		  	
+		</p>
+		<p>
+			<label>Replacement Cost </label>
+				<input type="text" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" <!-- TMPL_IF name="close" -->readonly<!--/TMPL_IF--> />
+		  	
+		</p>
+		<p>
+			<label>Discount Applied</label>
+			<input type="text" size="20" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" onchange="update(this.form)" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />%
+		</p>
+		<p>
+			<label>Budgeted Cost</label>
+			<input type="text" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />
+		</p>
+		<!--TMPL_IF NAME="gstreg"-->
+		<p>
+			<label>Budgeted GST</label>
+			<input type="text" size="20" name="GST" value="<!-- TMPL_VAR NAME="gst" -->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />
+		</p>
+		<!--/TMPL_IF-->
+		<p>
+			<label><b>BUDGETED TOTAL</b></label>
+			<input type="text" size="20" name="total" value="<!-- TMPL_VAR name="total"-->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> />
+		</p>
+		<p>
+			<label>Unit Cost</label>
+			<input type="text" size="20" name="unitprice" value="<!-- TMPL_VAR name="unitprice"-->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> /><!--TMPL_IF NAME="gstreg"-->includes any applicable tax less any discount<!--/TMPL_IF-->
+		</p>
+		<p>
+			<label>Purchase Order No </label>
+			<input type="text" size="20" name="purchaseordernumber"  value="<!-- TMPL_VAR name="purchaseordernumber" -->" <!-- TMPL_IF name="close" -->readonly <!--/TMPL_IF--> /> (using recommended!)
+		</p>
+		<p>
+			<label>Notes</label>
+			<input type="text" size="20" name="notes" value="<!-- TMPL_VAR NAME="notes" -->" />
+		</p>
+		<p>The 2 following fields are available for your own usage. They can be useful for stat purposes</p>
+		<p>
+			<label>Sort field 1</label>
+			<!-- TMPL_IF Name="CGIsort1" -->
+				<!-- TMPL_VAR Name="CGIsort1" -->
+			<!-- TMPL_ELSE -->
+				<input type="text" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
+			<!--/TMPL_IF -->
+		</p>
+		<p>
+			<label>Sort field 2</label>
+			<!-- TMPL_IF Name="CGIsort2" -->
+				<!-- TMPL_VAR Name="CGIsort2" -->
+			<!-- TMPL_ELSE -->
+				<input type="text" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
+			<!--/TMPL_IF -->
+		</p>
+		<p>
+			<input type="button" value="OK" onclick="check(this.form)" />
+		</p>
+	</form>
+</div>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/newordersuggestion.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/newordersuggestion.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/newordersuggestion.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/newordersuggestion.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,66 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Add order from suggestion: <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
+<div id="main">
+<h1>Suggestions</h1>
+<div id="acqui_suggestion_select">
+	<form action="/cgi-bin/koha/acqui/newordersuggestion.pl" method="get">
+	<table>
+		<tr>
+			<th>Suggestion</th>
+			<th>Suggested by</th>
+			<th>Accepted by</th>
+			<th>&nbsp;</th>
+		</tr>
+		<tr>
+			<th>
+				<p>Filter on :
+				title: <input type="text" name="title" value="<!-- TMPL_VAR NAME="title"-->" />
+				author: <input type="text" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
+				publisher: <input type="text" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode"-->" /></p>
+			</th>
+			<th>
+				&nbsp;
+			</th>
+			<th>
+				&nbsp;
+			</th>
+			<th>
+				<input type="submit" class="button acquisition" value="Set Filter" />
+			</th>
+		</tr>
+		<!-- TMPL_LOOP NAME="suggestions_loop" -->
+			<tr>
+				<td>
+					<p><!-- TMPL_VAR NAME="title" --> - <!-- TMPL_VAR NAME="author" --></p>
+					<p>
+						<!-- TMPL_IF name="copyrightdate" -->copy. year:<!-- TMPL_VAR NAME="copyrightdate" --> <!-- /TMPL_IF -->
+						<!-- TMPL_IF name="volumedesc" -->volume:<i><!-- TMPL_VAR NAME="volumedesc" --></i> <!-- /TMPL_IF -->
+						<!-- TMPL_IF name="isbn" -->ISBN :<i><!-- TMPL_VAR NAME="isbn" --></i> <!-- /TMPL_IF -->
+						<!-- TMPL_IF name="publishercode" --><br/>published by:<!-- TMPL_VAR NAME="publishercode" --> <!-- /TMPL_IF -->
+						<!-- TMPL_IF name="publicationyear" --> in <i><!-- TMPL_VAR NAME="publicationyear" --></i> <!-- /TMPL_IF -->
+						<!-- TMPL_IF name="place" --> at <i><!-- TMPL_VAR NAME="place" --></i> <!-- /TMPL_IF -->
+						<!-- TMPL_IF name="note" --><p><i>(<!-- TMPL_VAR NAME="note" -->)</i></p> <!-- /TMPL_IF -->
+					</p>
+				</td>
+				<td>
+					<!-- TMPL_VAR NAME="surnamesuggestedby" --><!-- TMPL_IF name="firstnamesuggestedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamesuggestedby" -->
+				</td>
+				<td>
+					<!-- TMPL_VAR NAME="surnamemanagedby" --><!-- TMPL_IF name="firstnamemanagedby" -->,<!-- /TMPL_IF --> <!-- TMPL_VAR NAME="firstnamemanagedby" -->
+				</td>
+				<td>
+					<!-- TMPL_IF name="biblionumber" -->
+						<a href="neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->&biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button acquisition">Order</a>
+					<!-- TMPL_ELSE -->
+						<a href="neworderempty.pl?booksellerid=<!-- TMPL_VAR NAME="supplierid" -->&amp;basketno=<!-- TMPL_VAR NAME="basketno" -->&amp;suggestionid=<!-- TMPL_VAR NAME="suggestionid" -->" class="button acquisition">Order</a>
+					<!-- /TMPL_IF -->
+				</td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+	</table>
+	</form>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/acqui/parcel.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/parcel.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/parcel.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/parcel.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,174 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Recieve <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE name="masthead.inc" -->
+<!-- TMPL_INCLUDE name="intranet-nav-brief.inc" -->
+
+<div id="main">
+<script type="text/javascript">
+function docalculate(){
+  //collect values
+received=document.getElementsByName('received');
+ actual=document.getElementsByName('actual');
+ freight=document.getElementsByName('freight');
+discounts=document.getElementsByName('discount');
+gstrate=document.getElementsByName('gstrate');
+totalreceived=0;
+totalactual=0;
+totalfreight=0;
+totaldiscount=0;
+totalgst=0;
+	for (var s=0; s<received.length; s++){
+		receivedvalue =received.item(s).value;	
+		totalreceived +=(receivedvalue*1);
+		thisactual =actual.item(s).value*receivedvalue;
+		totalactual +=thisactual;
+		totalfreight +=freight.item(s).value*receivedvalue;
+		thisdiscount =thisactual*discounts.item(s).value/100;
+		totaldiscount +=thisdiscount;
+		totalgst +=(thisactual - thisdiscount)*gstrate.item(s).value/100;
+	}
+ document.f.totalreceived.value=totalreceived*1;
+ document.f.totalactual.value=totalactual;
+ document.f.totalfreight.value=totalfreight*1;
+document.f.actualdiscount.value=totaldiscount;
+includesgst=parseInt(document.f.incgst.value);
+ if(includesgst>0){
+ document.f.actualgst.value="-inc.-";
+ }else{
+ document.f.actualgst.value=totalgst;
+}
+document.f.freightgst.value=totalfreight*document.f.freightgstrate.value/100;
+disct=0;
+ if ( document.f.actualgst.value>0){
+disct= document.f.actualgst.value;
+}
+document.f.actualtotal.value=totalactual + -totaldiscount +disct*1;
+document.f.actualfreight.value=totalfreight+ document.f.freightgst.value*1;
+document.f.invoicetotal.value=document.f.actualfreight.value*1 +document.f.actualtotal.value*1;
+<!--TMPL_IF NAME="invcurrency"-->
+document.f.localtotal.value=document.f.invoicetotal.value*<!--TMPL_VAR NAME="currencyrate"-->;
+<!--/TMPL_IF-->
+  return true;
+}
+function updatetotal(){
+document.f.actualtotal.value= document.f.totalactual.value - document.f.actualdiscount.value + document.f.actualgst.value*1;
+document.f.invoicetotal.value=document.f.actualfreight.value*1+document.f.actualtotal.value*1;
+<!--TMPL_IF NAME="invcurrency"-->
+document.f.localtotal.value=document.f.invoicetotal.value*<!--TMPL_VAR NAME="currencyrate"-->;
+<!--/TMPL_IF-->
+  return true;
+}
+function checkform(){
+if (document.f.invoice.value==""){
+alert ("You need a suppliers Invoice number!");
+return false;
+}
+if ( document.f.totalreceived.value==0 || document.f.totalreceived.value==""){
+alert ("no items entered as received !");
+return false;
+}
+document.f.submit();
+}
+</script>
+    <h1>
+                 Orders being recieved from <!-- TMPL_VAR NAME="name" -->
+      
+    </h1>
+ <form action="finishreceive.pl" method="post" name="orderform" id="f">
+<input type="hidden" name="supplierid" value="<!--TMPL_VAR NAME="supplierid"-->" />
+<div >
+<p>Received By: <!-- TMPL_VAR NAME="user" --></p>
+<p>   Suppliers Invoice No: <input type="text" name="invoice" value="<!-- TMPL_VAR NAME="invoice" -->" />
+    
+    Date received:  <input type="text" name="datereceived" value="<!-- TMPL_VAR NAME="date" -->" /></p>
+</div>
+<div >
+    <h2>Recieve list</h2>
+   <input type="hidden" name="incgst" value="<!--TMPL_VAR NAME="incgst"-->" />
+  <input type="hidden" name="currencyrate" value="<!--TMPL_VAR NAME="currencyrate"-->" />
+    <table >
+	<tr>Rate of tax used for P&P:<input type="text" size="2" name="freightgstrate" value="<!--TMPL_VAR NAME="gstrate"-->" />%</td>
+        <tr> <th align="left">Basket/Order</th>
+             <th class="acquisition">ISBN</th>
+            <th class="acquisition">Title</th>
+            <th class="acquisition">Price</th>
+	  <th class="acquisition">Actual <!--TMPL_VAR NAME="invcurrency"--></th>
+            <th class="acquisition">P&amp;P <!--TMPL_VAR NAME="invcurrency"--></th>
+            <th class="acquisition">Qty</th>
+	 <th class="acquisition">Received</th>
+            
+        </tr>
+        <!-- TMPL_LOOP NAME="loop_orders" -->
+            <tr><input type="hidden" name="ordernumber" value="<!-- TMPL_VAR NAME="ordernumber" -->" />
+	<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+	<input type="hidden" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
+                <td ><!-- TMPL_VAR NAME="basketno" -->/<!-- TMPL_VAR NAME="ordernumber" --></td>
+                <td><!-- TMPL_VAR NAME="isbn" --></td>
+                <td><!-- TMPL_VAR NAME="title" --></td>
+                <td align="right"><!-- TMPL_VAR NAME="rrp" --></td>
+                <td align="right"> <input type="text" size="2" name="actual" value="<!-- TMPL_VAR NAME="actualrrp" -->" onChange="docalculate();"/></td>
+	  <td align="right"> <input type="text" size="2" name="freight" value="0.00" onChange="docalculate();"/></td>
+                <td><!-- TMPL_VAR NAME="quantity" --></td>
+	<td> <input type="text" size="2" name="received" value="<!-- TMPL_VAR NAME="toreceive" -->" onChange="docalculate();"/></td>
+                <input type="hidden" name="discount" value="<!--TMPL_VAR NAME="discount"-->" />
+	<input type="hidden" name="gstrate" value="<!--TMPL_VAR NAME="gst"-->" />
+            </tr>
+        <!-- /TMPL_LOOP -->
+        <tr>
+            <td ></td>
+            <td></td>
+            <th class="acquisition" align="right">SubTotals</th>
+            <td align="right"><b><!-- TMPL_VAR NAME="totalprice" --></b></td>
+	<td align="right"><b><input type="text" name="totalactual" size="2" value="<!-- TMPL_VAR NAME="totalactual" -->" /></b></td>
+            <td align="right"><b><input type="text" size="2" name="totalfreight" /></b></th>
+            <td ><b><!-- TMPL_VAR NAME="totalquantity" --></b></td>
+	 <td ><b><input type="text" size="2" name="totalreceived" value="<!-- TMPL_VAR NAME="totaltoreceive" -->" READONLY /></b></td>
+          
+        </tr>
+	 <!--TMPL_IF NAME="totaldiscount"-->    <tr>
+           <td >&nbsp;</td>
+            <td>&nbsp;</td>
+  <th class="acquisition" align="right">- Discount</th>
+            <td align="right"><b><!-- TMPL_VAR NAME="totaldiscount" --></b></td>
+	<td align="right"><b><input type="text" name="actualdiscount" size="2" value="<!-- TMPL_VAR NAME="actualdiscount" -->" onChange="updatetotal();"/></b></td>
+        </tr><!--/TMPL_IF-->
+     <!--TMPL_IF NAME="gstreg"-->    <tr>
+           <td >&nbsp;</td>
+            <td>&nbsp;</td>
+  <th class="acquisition" align="right">Tax</th>
+            <td align="right"><b><!-- TMPL_VAR NAME="totalgst" --></b></td>
+	<td align="right"><b><input type="text" name="actualgst" size="2" value="<!-- TMPL_VAR NAME="actualgst" -->"/></b></td>
+	<td align="right"><b><input type="text" name="freightgst" size="2"  /></td></b>
+        </tr><!--/TMPL_IF-->
+        <tr>
+	 <td >&nbsp;</td>
+            <td>&nbsp;</td>
+            <th class="acquisition" align="right">Totals</th>
+            <td align="right"><b><!-- TMPL_VAR NAME="total" --></b></td>
+	<td align="right"><b><input type="text" name="actualtotal" size="2" value="<!-- TMPL_VAR NAME="actualtotal" -->"   onChange="updatetotal();"/></b></td>
+	<td align="right"><b><input type="text" name="actualfreight" size="2"  onChange="updatetotal();"/></b></td>
+        </tr>
+	<tr>
+	<td >&nbsp;</td>
+	<td >&nbsp;</td>
+            <th class="acquisition" align="right" colspan="5">Invoice Total <!--TMPL_VAR NAME="invcurrency"--></th>         
+	<td ><b><input type="text" name="invoicetotal" size="4"  /></b></td>
+        </tr>
+	<!--TMPL_IF NAME="invcurrency"-->
+	<tr>
+	<td >&nbsp;</td>
+	<td >&nbsp;</td>
+            <th class="acquisition" align="right" colspan="5">Invoice Total </th>         
+	<td ><b><input type="text" name="localtotal" size="4"  /></b></td>
+        </tr>
+	<!--/TMPL_IF-->
+    </table>
+Note: P&P is per item. If you have a total freight fill the Total P&P only.!
+	<p><input type="button" value="Receive" onClick="checkform();" /></p>
+    </form>
+</div>
+<script>
+updatetotal();
+</script>
+</div>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
+ 

Index: koha-tmpl/intranet-tmpl/default/en/acqui/parcels.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/parcels.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/parcels.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/parcels.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,105 @@
+ <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Recieve <!-- TMPL_VAR name="bookselname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="menu-acqui.inc" -->
+<div id="main">
+<h1 class="acquisition">Receive parcel from supplier <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->"><!-- TMPL_VAR NAME="name" --></a></h1>
+
+<!-- TMPL_IF NAME="count" --><p> <!-- TMPL_VAR NAME="count" --> parcels found</p><!--/TMPL_IF-->
+<div id="resultnumber">
+<!-- Row of numbers corresponding to search result pages -->
+<!-- TMPL_IF NAME="displayprev" -->
+	<a href="parcels.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="prevstartfrom" --><!--TMPL_IF Name="datefrom"-->&amp;datefrom=<!--TMPL_VAR Name="datefrom"--><!--/TMPL_IF--><!--TMPL_IF Name="dateto"-->&amp;dateto=<!--TMPL_VAR Name="dateto"--><!--/TMPL_IF--><!--TMPL_IF Name="code"-->&amp;filter=<!--TMPL_VAR Name="code"--><!--/TMPL_IF--><!--TMPL_IF Name="orderby"-->&amp;orderby=<!--TMPL_VAR Name="orderby"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->&amp;type=intra"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0"></a>
+<!-- TMPL_ELSE -->
+	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
+<!-- /TMPL_IF -->
+<!-- TMPL_LOOP NAME="numbers" -->
+	<!-- TMPL_IF NAME="highlight" -->
+	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+	<!-- TMPL_ELSE -->
+	<a href="parcels.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!--TMPL_IF Name="datefrom"-->&amp;datefrom=<!--TMPL_VAR Name="datefrom"--><!--/TMPL_IF--><!--TMPL_IF Name="dateto"-->&amp;dateto=<!--TMPL_VAR Name="dateto"--><!--/TMPL_IF--><!--TMPL_IF Name="code"-->&amp;filter=<!--TMPL_VAR Name="code"--><!--/TMPL_IF--><!--TMPL_IF Name="orderby"-->&amp;orderby=<!--TMPL_VAR Name="orderby"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->&amp;type=intra"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+	<!-- /TMPL_IF -->
+<!-- /TMPL_LOOP -->
+<!-- TMPL_IF NAME="displaynext" -->
+	<a href="parcels.pl?supplierid=<!-- TMPL_VAR NAME="supplierid" -->&amp;startfrom=<!-- TMPL_VAR NAME="nextstartfrom" --><!--TMPL_IF Name="datefrom"-->&amp;datefrom=<!--TMPL_VAR Name="datefrom"--><!--/TMPL_IF--><!--TMPL_IF Name="dateto"-->&amp;dateto=<!--TMPL_VAR Name="dateto"--><!--/TMPL_IF--><!--TMPL_IF Name="code"-->&amp;filter=<!--TMPL_VAR Name="code"--><!--/TMPL_IF--><!--TMPL_IF Name="orderby"-->&amp;orderby=<!--TMPL_VAR Name="orderby"--><!--/TMPL_IF--><!--TMPL_IF Name="resultsperpage"-->&amp;resultsperpage=<!--TMPL_VAR Name="resultsperpage"--><!--/TMPL_IF-->&amp;type=intra"><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
+<!-- TMPL_ELSE -->
+	<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
+<!-- /TMPL_IF -->
+</div>
+
+<div id="resultlist">
+<!-- Search Results Table -->
+
+<form method="post" action="parcels.pl">
+	<table class="small">
+		<tr>
+			<th class="acquisition">Line</th>
+			<th class="acquisition">Code</th>
+			<th class="acquisition">Date Received</th>
+			<th class="acquisition">Item Count</th>
+			<th class="acquisition">Biblio count</th>
+			<th class="acquisition">Items expected</th>
+		</tr>
+		<tr>
+			<th class="acquisition">
+				&nbsp;
+				<input type="hidden" name="supplierid" value=<!-- TMPL_VAR NAME="supplierid" -->>
+			</th>
+			<th class="acquisition">
+				<input type="text" size="20" name="filter" value="<!-- TMPL_VAR NAME="filter" -->">
+			</th>
+			<th class="acquisition">
+				From :<input type="text" size="9" name="datefrom" value="<!-- TMPL_VAR NAME="datefrom" -->"> 
+				<p>To :<input type="text" size="9" name="dateto" value="<!-- TMPL_VAR NAME="dateto" -->">
+			</th>
+			<th class="acquisition">
+				&nbsp;
+			</th>
+			<th class="acquisition">
+				Sort by :<select name="orderby" size="1">
+				<option value="aqorders.booksellerinvoicenumber"> Invoice- Ascending order</option>
+				<option value="datereceived"> Date Received</option>
+				<option value="datereceived desc"> Date Received reverse</option>
+				<option value="aqorders.booksellerinvoicenumber desc"> Invoice reverse</option>
+				</select><br />
+				Results per page :<select name="resultsperpage" value ="<!--TMPL_VAR Name="resultsperpage"-->" size="1">
+				<option value="20">20</option>
+				<option value="30">30</option>
+				<option value="50">50</option>
+				<option value="100">100</option>
+				</select>
+			</th>
+			<th class="acquisition">
+				<input type="submit" class="button acquisition" value="Filter">
+			</th>
+		</tr>
+<!-- Actual Search Results -->
+<!-- TMPL_LOOP NAME="searchresults" -->
+	<tr>
+		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted"><!-- TMPL_ELSE --><td><!-- /TMPL_IF -->
+			<!-- TMPL_VAR NAME="number" -->
+		</td>
+		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
+			<!--TMPL_IF Name="code"--><!--TMPL_VAR Name="code" --><!--/TMPL_IF-->
+		</td>
+		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number">
+		<!-- /TMPL_IF -->
+			<a href="/cgi-bin/koha/acqui/parcel.pl?type=intra&amp;supplierid=<!-- TMPL_VAR NAME="supplierid" ESCAPE=URL -->&amp;datereceived=<!-- TMPL_VAR NAME="raw_datereceived" ESCAPE=URL --><!--TMPL_IF Name="code"-->&amp;code=<!--TMPL_VAR Name="code" ESCAPE=URL --><!--/TMPL_IF-->">
+				<!-- TMPL_VAR NAME="datereceived" -->
+			</a>
+		</td>
+		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number">
+		<!-- /TMPL_IF -->
+			<!-- TMPL_VAR NAME="reccount" --> 
+		</td>
+		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
+			<!-- TMPL_VAR NAME="bibcount" -->
+		</td>
+		<!-- TMPL_IF NAME="hilighted" --><td class="hilighted number"><!-- TMPL_ELSE --><td class="number"><!-- /TMPL_IF -->
+			<!-- TMPL_VAR NAME="itemcount" -->
+		</td>
+	</tr>
+<!-- /TMPL_LOOP -->
+</table>
+</form>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/acqui/supplier.tmpl	26 Mar 2007 02:19:21 -0000	1.13.4.2
@@ -0,0 +1,143 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_IF NAME=id -->Update: <!-- TMPL_VAR name="name" --><!-- TMPL_ELSE -->Add supplier<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE name="masthead.inc" -->
+<!-- TMPL_INCLUDE name="intranet-nav.inc" -->
+
+<div id="main">	
+<!-- TMPL_IF name="id" -->
+		<h1>Update: <!-- TMPL_VAR NAME="name" --></h1>
+	<!-- TMPL_ELSE -->
+		<h1>Add supplier</h1>
+	<!-- /TMPL_IF -->
+	<form action="updatesupplier.pl" method="post">
+	<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
+	<div id="acqui_supplier_company">
+		<h2>COMPANY DETAILS</h2>
+		<p>
+			<label>Company Name</label>
+			<input type="text" size="40" name="company" value="<!-- TMPL_VAR NAME="name" -->" />
+		</p>
+		<p>
+			<label>Postal Address</label>
+				<textarea name="company_postal" cols="40" rows="3"><!-- TMPL_VAR NAME="postal" --></textarea>
+		</p>
+		<p>
+			<label>Physical Address</label>
+			<textarea name="physical" cols="40" rows="4"><!-- TMPL_VAR NAME="address1" --><!-- TMPL_VAR NAME="address2" --><!-- TMPL_VAR NAME="address3" --><!-- TMPL_VAR NAME="address4" --></textarea>
+		</p>
+		<p>
+			<label>Phone</label>
+			<input type="text" size="20" name="company_phone" value="<!-- TMPL_VAR NAME="phone" -->" />
+		</p>
+		<p>
+			<label>Fax</label>
+			<input type="text" size="20" name="company_fax" value="<!-- TMPL_VAR NAME="fax" -->" />
+		</p>
+		<p>
+			<label>Website</label>
+			<input type="text" size="40" name="website" value="<!-- TMPL_VAR NAME="url" -->" />
+		</p>
+		<h2 class="acquisition">CONTACT DETAILS</h2>
+		<p>
+			<label>Contact Name</label>
+			<input type="text" size="40" name="company_contact_name" value="<!-- TMPL_VAR NAME="contact" -->" />
+		</p>
+		<p>
+			<label>Position</label>
+			<input type="text" size="40" name="company_contact_position" value="<!-- TMPL_VAR NAME="contpos" -->" />
+		</p>
+		<p>
+			<label>Phone</label>
+			<input type="text" size="20" name="contact_phone" value="<!-- TMPL_VAR NAME="contphone" -->" />
+		</p>
+		<p>
+			<label>Alternative phone</label>
+			<input type="text" size="20" name="contact_phone_2" value="<!-- TMPL_VAR NAME="contaltphone" -->" />
+		</p>
+		<p>
+			<label>Fax</label>
+			<input type="text" size="20" name="contact_fax" value="<!-- TMPL_VAR NAME="contfax" -->" />
+		</p>
+		<p>
+			<label>E-mail</label>
+			<input type="text" size="40" name="company_email" value="<!-- TMPL_VAR NAME="contemail" -->" />
+		</p>
+		<p>
+			<label>Notes</label>
+			<textarea name="notes" cols="40" rows="4"><!-- TMPL_VAR NAME="contnotes" --></textarea>
+		</p>
+	</div>
+	<div id="acqui_supplier_status">
+		<h2>CURRENT STATUS</h2>
+		<p>
+			<label>Supplier is</label>
+				<!-- TMPL_IF name="active" -->
+					<input type="radio" name="status" value="1" checked="checked" />Active
+					<input type="radio" name="status" value="0" />Inactive
+				<!-- TMPL_ELSE -->
+					<input type="radio" name="status" value="1" />Active
+					<input type="radio" name="status" value="0" checked="checked" />Inactive
+				<!-- /TMPL_IF -->
+		</p>
+	</div>
+	<div id="acqui_supplier_ordering">
+		<h2>ORDERING INFORMATION</h2>
+		<p>
+			<label>Publishers and Imprints</label>
+			<textarea name="publishers_imprints" cols="20" rows="4"><!-- TMPL_VAR NAME="specialty" --></textarea>
+		</p>
+		<p>
+			<label>List Prices are</label>
+				<select name="list_currency" size="1">
+				<!-- TMPL_LOOP NAME="loop_pricescurrency" -->
+					<!-- TMPL_VAR NAME="currency" -->
+				<!-- /TMPL_LOOP -->
+				</select>
+		</p>
+		<p>
+			<label>Invoice Prices are</label>
+				<select name="invoice_currency" size="1">
+				<!-- TMPL_LOOP NAME="loop_invoicecurrency" -->
+					<!-- TMPL_VAR NAME="currency" -->
+				<!-- /TMPL_LOOP -->
+				</select>
+		</p>
+		<p>
+			<label>GST Registered</label>
+				<!-- TMPL_IF name="gstreg" -->
+					<input type="radio" name="gst" value="1" checked="checked" /> Yes
+					<input type="radio" name="gst" value="0" /> No
+				<!-- TMPL_ELSE -->
+					<input type="radio" name="gst" value="1" /> Yes
+					<input type="radio" name="gst" value="0" checked="checked" /> No
+				<!-- /TMPL_IF -->
+		</p>
+		<p>
+			<label>List Item Price Includes GST</label>
+				<!-- TMPL_IF name="listincgst" -->
+					<input type="radio" name="list_gst" value="1" checked="checked" /> Yes
+					<input type="radio" name="list_gst" value="0" /> No
+				<!-- TMPL_ELSE -->
+					<input type="radio" name="list_gst" value="1" /> Yes
+					<input type="radio" name="list_gst" value="0" checked="checked" /> No
+				<!-- /TMPL_IF -->
+		</p>
+		<p>
+			<label>Invoice Item Price Includes GST</label>
+				<!-- TMPL_IF name="invoiceincgst" -->
+					<input type="radio" name="invoiceincgst" value="1" checked="checked" /> Yes
+					<input type="radio" name="invoiceincgst" value="0" /> No
+				<!-- TMPL_ELSE -->
+					<input type="radio" name="invoiceincgst" value="1" /> Yes
+					<input type="radio" name="invoiceincgst" value="0" checked="checked" /> No
+				<!-- /TMPL_IF -->
+		</p>
+		<p>
+			<label>Discount</label>
+			<input type="text" size="3" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" /> %
+		</p>
+	</div>
+	<input type="submit"  name="submit" value="save" />
+	</form>
+</div>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/admin-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/admin-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/admin-home.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/admin-home.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,164 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>NEULIS Administration</h1>
+<div class="menu">
+<table>
+<caption>System Preferences</caption>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/systempreferences.pl">System preferences</a></th>
+	<td>Change essential system preferences like MARC flavor, date format, administrator e-mail, and templates.</td>
+</tr>
+</table>
+<table>
+<caption>System parameters </caption>
+<tr>
+<th class="header" colspan="2">For best results, configure these parameters in the order they appear</th>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/koha-news.pl">OPAC news</a></th>
+	<td>Manage the news in the OPAC main page.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/koha-electronic.pl">OPAC electronic</a></th>
+	<td>Manage the online OPAC databases.</td>
+</tr>
+	<tr>
+	<th><a href="/cgi-bin/koha/admin/institutions-careers.pl">Faculties-courses</a></th>
+	<td>Add courses to faculties.</td>
+</tr>
+
+<tr>
+	<th><a href="/cgi-bin/koha/tools/holidays.pl?branch=MAIN">Holiday Management</a></th>
+	<td>Set the days library is closed for circulation purposes.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/branches.pl">Library branches</a></th>
+	<td>The different branches you manage with this Koha server.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/aqbookfund.pl">Book funds</a></th>
+	<td>Book fund administration. Remember to edit your book funds before you start editing the budgets.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/currency.pl">Currencies</a></th>
+	<td>Define exchange rates.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></th>
+	<td>Define item types.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/categorie.pl">Borrower categories</a></th>
+	<td>Define the categories of borrowers.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/issuingrules.pl">Issuing rules</a></th>
+	<td>Define issuing rules for branches / borrowers / item types (nb of issues, duration, cost...)</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorised values</a></th>
+	<td>Define categories and authorised values for them. Authorised values are used in MARC form to limit and help editing MARC biblios.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/authtypes.pl">Authorities Structure</a></th>
+	<td>Define categories and thesaurus/authority MARC structure.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/biblios_framework.pl">Biblio framework (MARC structure)</a></th>
+	<td>the frameworks defined for the MARC editor. Create frameworks, then define the MARC structure (fields &amp; subfields)</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/holdingstagstructure.pl">Holdings framework (MARC structure)</a></th>
+	<td>the frameworks defined for theholdings MARC editor. (Complements the Biblios framework)</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/koha_attr.pl">Links MARC - ZEBRA</a></th>
+	<td>Define links between the ZEBRA DB and the MARC one. </td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Check</a></th>
+	<td>Checks the MARC structure. USE IT before working with real data. It will show mistakes that can BREAK Koha's database!</td></tr>
+
+<tr>
+<th colspan="2" class="header">Various parameters</th>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/printers.pl">Printers</a></th>
+	<td>Printers (UNIX paths).</td>
+</tr>
+
+<tr>
+	<th><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a></th>
+	<td>Servers to query for MARC data.</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/admin/onlinedatabases.pl">Online electronic databases</a></th>
+	<td>Servers to query as library catalogue.</td>
+</tr>
+</table>
+
+<table>
+	<caption>Tools</caption>
+<tr>
+	<th colspan="2" class="header">Update Accounts</th>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/tools/fines_windows_start.pl">Update Accounts</a></th>
+		<td> Run this if fines are not uptodate.</td>
+	</tr>
+	<tr>
+	<th colspan="2" class="header">Background Processes</th>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/z3950/zebraqueue_windows_start.pl">Zebra update start</a></th>
+		<td> Zebra background updater.</td>
+	</tr>
+	<tr>
+	<th colspan="2" class="header">Export</th>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/export/marc.pl">MARC bibliographic export</a></th>
+		<td> Exporting in MARC format.</td>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/export/marc-time.pl">MARC bibliographic export by date</a></th>
+		<td> Exporting in MARC format by date.</td>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/export/marc-item.pl">MARC holdings export</a></th>
+		<td> Exporting holdings in MARC format .</td>
+	</tr>
+	<tr>
+	<th colspan="2" class="header">Import</th>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/import/breeding.pl">Upload MARC records to the reservoir</a></th>
+		<td>The reservoir is a table where imported MARC records are stored. A MARC record is stored in the reservoir as long as you have no item. When you type the ISBN or title of a biblio, it's searched for in the reservoir. If it is found, the biblio is added to Koha active table.
+		</td>
+	</tr>
+	<th colspan="2" class="header">Barcode generator</th>
+	</tr>
+	<tr>
+		<th><a href="/cgi-bin/koha/barcodes/barcodes.pl">Generate barcodes</a></th>
+		<td>the barcode generator deals with generating barcodes for items you acquire
+		</td>
+	</tr>
+	<tr><th colspan="2" class="header">Membership Cards</th></tr>
+		<tr>
+		<th><a href="/cgi-bin/koha/barcodes/cbarcodes.pl">Membership cards</a></th>
+		<td>create membership cards from member cardnumbers
+		</td>
+	</tr>
+<tr><th colspan="2" class="header">Circulation Logs</th></tr>
+		<tr>
+		<th><a href="/cgi-bin/koha/admin/viewlog.pl">Circulation Logs</a></th>
+		<td>view details of circulation
+		</td>
+	</tr>
+</table>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/aqbookfund.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/aqbookfund.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/aqbookfund.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/aqbookfund.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,151 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="else" -->Book Funds<!-- /TMPL_IF -->
+<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="header" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="add_validate" -->Data Recorded<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Fund '<!-- TMPL_VAR name="bookfundname" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_IF name="else" -->
+<h1>Book Fund Administration</h1>
+<!-- TMPL_IF NAME="bookfund" --><form action="<!-- TMPL_VAR name=scriptname -->" method="post">
+<input type="text" name="searchfield" value="" /> <input type="submit" name="search" value="Search" class="submit" /></form>
+<!-- TMPL_IF name="search" -->
+	<div id="results">You Searched for <span class="ex"><!-- TMPL_VAR name="searchfield" --></span></div>
+<!-- /TMPL_IF -->
+
+<table>
+<tr>
+	<th>Book Fund</th>
+	<th>Name</th>
+	<th>Edit</th>
+	<th>Delete</th>
+	</tr>
+<!-- TMPL_LOOP name="bookfund" -->
+	<tr>
+		<td><a href="<!-- TMPL_VAR name="action" -->?op=add_form&amp;bookfundid=<!-- TMPL_VAR name="bookfundid" --> "><!-- TMPL_VAR name="bookfundid" --></a></td>
+		<td><!-- TMPL_VAR name="bookfundname" --></td>
+		<td><form action="<!-- TMPL_VAR name="action" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
+		<td><form action="<!-- TMPL_VAR name="action" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" class="delete" value="Delete" /></form></td>
+	</tr>
+		<tr>
+		<td>&nbsp;</td>
+		<td><b>Budget</b></td>
+		<td><form action="aqbudget.pl" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" class="submit" value="Add Budget" /></form></td>
+		<td></td>
+	</tr>
+	<!-- TMPL_LOOP name="budget" -->
+		<tr>
+			<td>&nbsp;</td>
+			<td>
+				<!-- TMPL_VAR name="startdate" --> - <!-- TMPL_VAR name="enddate" --> : <b><!-- TMPL_VAR name="budgetamount" --></b>
+			</td>
+			<td><form action="/cgi-bin/koha/admin/aqbudget.pl" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR name="aqbudgetid" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
+			<td><form action="/cgi-bin/koha/admin/aqbudget.pl" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR name="aqbudgetid" -->" /><input type="submit" class="delete" value="Delete" /></form></td>
+
+		</tr>
+	<!-- /TMPL_LOOP -->
+<!-- /TMPL_LOOP -->
+</table><!-- /TMPL_IF -->
+<form action="<!-- TMPL_VAR name=scriptname -->" method="post">
+	<p><input type="hidden" name="op" value="add_form" /></p>
+<input type="submit"value="Add bookfund" class="submit" /></form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="add_form" -->
+<script>
+	//
+	function isNotNull(f,noalert) {
+		if (f.value.length ==0) {
+   return false;
+		}
+		return true;
+	}
+	//
+	function toUC(f) {
+		var x=f.value.toUpperCase();
+		f.value=x;
+		return true;
+	}
+	//
+	function isNum(v,maybenull) {
+	var n = new Number(v.value);
+	if (isNaN(n)) {
+		return false;
+		}
+	if (maybenull==0 && v.value=="") {
+		return false;
+	}
+	return true;
+	}
+	//
+	function isDate(f) {
+		var t = Date.parse(f.value);
+		if (isNaN(t)) {
+			return false;
+		}
+	}
+	//
+	function Check(f) {
+		var ok=1;
+		var _alertString="";
+		var alertString2;
+		if (f.bookfundid.value.length==0) {
+			_alertString += "- bookfundid missing\n";
+		}
+		if (f.bookfundname.value.length==0) {
+			_alertString += "- bookfundname missing\n";
+		}
+		if (_alertString.length==0) {
+			document.Aform.submit();
+		} else {
+			alertString2 = "Form not submitted because of the following problem(s)\n";
+			alertString2 += "------------------------------------------------------------------------------------\n\n";
+			alertString2 += _alertString;
+			alert(alertString2);
+		}
+	}
+	</SCRIPT>
+<form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
+<input type="hidden" name="op" value="add_validate" />
+<input type="hidden" name="checked" value="0" />
+<div class="data">
+<table>
+<caption><!-- TMPL_VAR name="header" --></caption>
+<!-- TMPL_IF name="add_or_modify" -->
+<tr><th>Book fund</th><td><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><!-- TMPL_VAR name="bookfundid" --></td></tr>
+<!-- TMPL_ELSE -->
+<tr><th>Book fund</th><td><input type="text" name="bookfundid" size="5" maxlength="5" onblur="toUC(this)" /></td></tr>
+<!-- /TMPL_IF -->
+<tr><th>Name</th><td><input type="text" name="bookfundname" size="40" maxlength="80" value="<!-- TMPL_VAR name="bookfundname" escape="HTML" -->" /></td></tr>
+</table>
+</div>
+<p><input type="button" value="<!-- TMPL_VAR name="header" -->" onclick="Check(this.form); return false;" class="submit" /> <input type="submit" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR name="action" -->'; return false;" /></p>
+</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="add_validate" -->
+<h3>Data Recorded</h3>
+<form action="<!-- TMPL_VAR name="action" -->" method="post">
+<input type="submit" value="OK" class="submit" />
+</form></td></tr></table>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_confirm" -->
+<h3>Confirm Deletion of Fund <em><!-- TMPL_VAR name="bookfundid" --></em></h3>
+<div class="data"><table>
+<tr><th>Book fund</th><td><!-- TMPL_VAR name="bookfundid" --></td></tr>
+<tr><th>Name</th><td><!-- TMPL_VAR name="bookfundname" --></td></tr><tr><th>Group</th><td><!-- TMPL_VAR name="bookfundgroup" --></td></tr>
+</table></div><div class="tabitem"><form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR name="bookfundid" -->" /><input type="submit" value="Delete this Fund" class="cancel" /></form> <form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="submit" value="Do not Delete" class="submit" /></form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_confirmed" -->
+<h3>Data Deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR name="action" -->" method="post">
+<input type="submit" value="OK" class="submit" /></form></div>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/aqbudget.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/aqbudget.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/aqbudget.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/aqbudget.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,137 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="else" -->Budget admin<!-- /TMPL_IF -->
+<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR NAME="header" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="add_validate" -->Budget Data Recorded<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Delete Book Fund '<!-- TMPL_VAR NAME="bookfundid" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirmed" -->Book fund deleted<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF name="else" -->
+<h1>Budget admin</h1><form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
+	<input type="text" name="searchfield" value="" /> <input type="submit" name="search" value="Search" class="submit" /></form>
+	<!-- TMPL_IF name="search" -->
+	<div id="results">You Searched for <span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span></div>
+	<!-- /TMPL_IF -->
+<table>
+	<tr><th>Book fund</th><th>Start date</th><th>End date</th><th>Budget amount</th><th colspan="2">&nbsp;</th></tr>
+	<!-- TMPL_LOOP name="budget" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="bookfundid" --> (<!-- TMPL_VAR NAME="bookfundname" -->)</td>
+			<td><!-- TMPL_VAR NAME="startdate" --></td>
+			<td><!-- TMPL_VAR NAME="enddate" --></td>
+			<td><!-- TMPL_VAR NAME="budgetamount" --></td>
+			<td><a class="edit" href="/cgi-bin/koha/admin/aqbudget.pl?op=add_form&amp;bookfundid=<!-- TMPL_VAR NAME="bookfundid" -->&amp;aqbudgetid=<!-- TMPL_VAR NAME="aqbudgetid" -->">Edit</a></td>
+			<td><a class="delete" href="/cgi-bin/koha/admin/aqbudget.pl?op=delete_confirm&amp;bookfundid=<!-- TMPL_VAR NAME="bookfundid" -->">Delete</a></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+	</table>
+	<form action="/cgi-bin/koha/admin/aqbudget.pl" method="post">
+	<p><input type="hidden" name="op" value="add_form" /><input type="submit" class="submit" value="Add Budget" /></p></form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="add_form" -->
+<script language="JavaScript" type="text/javascript">
+	//
+	function isNotNull(f,noalert) {
+		if (f.value.length ==0) {
+   return false;
+		}
+		return true;
+	}
+	//
+	function toUC(f) {
+		var x=f.value.toUpperCase();
+		f.value=x;
+		return true;
+	}
+	//
+	function isNum(v,maybenull) {
+	var n = new Number(v.value);
+	if (isNaN(n)) {
+		return false;
+		}
+	if (maybenull==0 && v.value=='') {
+		return false;
+	}
+	return true;
+	}
+	//
+	function isDate(f) {
+		var t = Date.parse(f.value);
+		if (isNaN(t)) {
+			return false;
+		}
+	}
+	//
+	function Check(f) {
+		var ok=1;
+		var _alertString="";
+		var alertString2;
+//		if (f.bookfundid.value.length==0) {
+//			_alertString += "- bookfundid missing\n";
+//		}
+		if (!(isNotNull(window.document.Aform.budgetamount,1))) {
+			_alertString += "- Budget missing\n";
+		}
+		if (_alertString.length==0) {
+			document.Aform.submit();
+		} else {
+			alertString2 = "Form not submitted because of the following problem(s)\n";
+			alertString2 += "------------------------------------------------------------------------------------\n\n";
+			alertString2 += _alertString;
+			alert(alertString2);
+		}
+	}
+	</script>
+
+<form action="/cgi-bin/koha/admin/aqbudget.pl" name="Aform" method="post">
+<input type="hidden" name="op" value="add_validate" />
+<input type="hidden" name="checked" value="0" />
+<h1><!-- TMPL_VAR NAME="header" --></h1>
+<div class="data">
+<table>
+<!-- TMPL_IF name="modify" -->
+<tr><th>Book fund</th><td><input type="hidden" name="bookfundid" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundid" --></td></tr>
+<tr><th>Book fund name</th><td><!-- TMPL_VAR NAME="bookfundname" --></td></tr>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="adding" -->
+<tr><th><label for="bookfundid">Bookfund</label></th><td><input type="hidden" name="bookfundid" id="bookfundid" size="5" maxlength="5" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundid" --></td></tr>
+<!-- /TMPL_IF -->
+
+<tr><th><label for="startdate">Start date (<!-- TMPL_VAR NAME="dateformat" -->)</label></th><td><input type="text" id="startdate" name="startdate" value="<!-- TMPL_VAR NAME="startdate" -->" />&nbsp;</td></tr>
+<tr><th><label for="enddate">End date (<!-- TMPL_VAR NAME="dateformat" -->)</label></th><td><input type="text" id="enddate" name="enddate" value="<!-- TMPL_VAR NAME="enddate" -->" /></td></tr>
+<tr><th><label for="budgetamount">Budget amount</label></th><td><input type="text" name="budgetamount" id="budgetamount" value="<!-- TMPL_VAR NAME="budgetamount" -->" /></td></tr>
+</table></div>
+<input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" /><input type="button" value="OK"  class="submit" onclick="Check(this.form)" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='/cgi-bin/koha/admin/aqbudget.pl'; return false;" /></form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="add_validate" -->
+<h3>Budget Data Recorded</h3><table><tr><td>
+<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
+<input type="submit" value="Continue" class="submit" />
+</form></td></tr></table>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_confirm" -->
+<h3>Delete Book Budget?</h3>
+<div class="data"><table>
+<tr><th>Start date</th><td><!-- TMPL_VAR NAME="startdate" --></td></tr>
+<tr><th>End date</th><td><!-- TMPL_VAR NAME="enddate" --></td></tr>
+<tr><th>Budget Amount</th><td><!-- TMPL_VAR NAME="budgetamount" --></td></tr>
+</table></div>
+
+<div class="tabitem"><form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="aqbudgetid" value="<!-- TMPL_VAR NAME="aqbudgetid" -->" /><input type="submit" value="Delete this Book Fund" class="cancel" /></form> <form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="submit" value="Do Not Delete" class="submit" /></form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_confirmed" -->
+<h3>Budget deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="action" -->" method="post">
+<input type="submit" value="Continue" class="submit" />
+</form></div>
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/auth_group_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/auth_group_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/auth_group_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/auth_group_structure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,166 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<script language="javascript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNotNull(f,noalert) {
+	if (f.value.length ==0) {
+		return false;
+	}
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function toUC(f) {
+	var x=f.value.toUpperCase();
+	f.value=x;
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNum(v,maybenull) {
+var n = new Number(v.value);
+if (isNaN(n)) {
+	return false;
+	}
+if (maybenull==0 && v.value=='') {
+	return false;
+}
+return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isDate(f) {
+	var t = Date.parse(f.value);
+	if (isNaN(t)) {
+		return false;
+	}
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function Check(f) {
+	var ok=1;
+	var _alertString="";
+	var alertString2;
+	if (f.authtypecode.value.length==0) {
+		_alertString += "\n- " + _("Authority type : code missing");
+	}
+	if (!(isNotNull(window.document.Aform.authtypetext,1))) {
+		_alertString += "\n- " + _("Description missing");
+	}
+	if (_alertString.length==0) {
+		document.Aform.submit();
+	} else {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += _alertString;
+		alert(alertString2);
+	}
+}
+</script>
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+<div class="data"><table>
+	<!-- TMPL_IF NAME="authtypecode" -->
+		<caption>Modify authority type</caption>
+	<!-- TMPL_ELSE -->
+		<caption>Add authority type</caption>
+	<!-- /TMPL_IF -->
+	
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="checked" value="0" />
+			<!-- TMPL_IF NAME="authtypecode" -->
+				<tr><th><label for="authtypecode">Authority type<label><input type="hidden" id="authtypecode" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /></th><td><!-- TMPL_VAR NAME="authtypecode" --></td></tr>
+			<!-- TMPL_ELSE -->
+				<tr><th><label for="authtypecode">Authority type<label></th><td><input type="text" id="authtypecode" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" /></td></tr>
+			<!-- /TMPL_IF -->
+			<tr><th>
+				<label for="authtypetext">Description</label></th><td>
+				<input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authtypetext" escape=HTML -->" />
+			</td></tr>
+			<tr><th>
+				<label for="summary">Summary</label></th><td>
+				<textarea id="summary" name="summary" cols="40" rows="10"><!-- TMPL_VAR NAME="summary" --></textarea>
+			</td></tr>
+			<tr><th><label for="auth_tag_to_report">Report tag</label></th><td>
+				<input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="<!-- TMPL_VAR NAME="auth_tag_to_report">" />
+				<div class="help">Enter here the number of the tag that will be reported in the biblio (subfield by subfield). For example, in UNIMARC, enter 200 to report every 200 subfield in the 70x biblio</div></td></tr>
+			</td></tr></table>
+			<p>
+				<!-- TMPL_IF NAME="authtypecode" -->
+		<input type="submit" value="Update Authority Type" class="submit" onclick="Check(this.form); return false;" />
+	<!-- TMPL_ELSE -->
+		<input type="submit" value="Add Authority Type" class="submit" onclick="Check(this.form); return false;" />
+	<!-- /TMPL_IF -->
+				
+			</p>
+			</div>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<div class="details">
+	<h2>Authority structure definition for <!-- TMPL_VAR NAME="authtypetext" --> (<!-- TMPL_VAR NAME="authtypecode" -->)</h2>
+	<!-- TMPL_IF NAME="total" -->
+		<p>
+			<b>This record is used <!-- TMPL_VAR NAME="total" --> times</b>
+		</p>
+	<!-- /TMPL_IF -->
+	<h3>Are you sure you want to delete this Authority Type?</h3>
+	<p>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="hidden" name="op" value="delete_confirmed" />
+			<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
+			<input type="submit" value="Yes, Delete It" class="cancel" />
+		</form>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="submit" value="No, Don't Delete It" class="submit" />
+		</form>
+	</p>
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h1>Auth type Admin</h1>
+<p>Define authority types, then authority MARC structure in the same way you define itemtypes and biblio MARC tag structure. Authority values are managed through plugins</p>
+<table>
+	<tr>
+		<th>Code</th>
+		<th>Description</th>
+		<th>summary</th>
+		<th>Tag reported</th>
+		<th>&nbsp;</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	</tr>
+	<tr>
+		<td>&nbsp;</td>
+		<td>Default framework</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+		<td><a href="auth_tag_structure.pl">MARC structure</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+	</tr>
+	
+	<!-- TMPL_LOOP NAME="loop" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="authtypecode" --></td>
+			<td><!-- TMPL_VAR NAME="authtypetext" --></td>
+			<td><!-- TMPL_VAR NAME="summary" --></td>
+			<td><!-- TMPL_VAR NAME="auth_tag_to_report" --></td>
+			<td><a href="auth_tag_structure.pl?authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->" class="button parameters" >MARC structure</a></td>
+			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Edit</a></td>
+			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Delete</a></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	<input type="submit" class="submit" value="Add authority type" />
+</form>
+	<!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF -->
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/auth_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/auth_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/auth_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/auth_subfields_structure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,135 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+
+	<h1><!-- TMPL_IF NAME="use-heading-flags-p" -->
+	<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit MARC subfields constraints<!-- /TMPL_IF -->
+	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h1>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+	<input type="hidden" name="op" value="add_validate" />
+	<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
+	<!-- TMPL_LOOP NAME="loop" -->
+	<div class="data <!-- TMPL_VAR NAME="toggle" -->"><h2>Tag <!-- TMPL_VAR NAME="tagfield" -->, Subfield <!-- TMPL_VAR NAME="tagsubfield" --></h2>
+	<table>
+	<caption>MARC constraints</caption>
+	<tr><th><label for="repeatable<!-- TMPL_VAR NAME="row" -->">Repeatable:</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
+	<tr><th><label for="mandatory<!-- TMPL_VAR NAME="row" -->">Mandatory:</label></th><td><!-- TMPL_VAR NAME="mandatory" --> </td></tr>
+	<tr><th><label for="seealso<!-- TMPL_VAR NAME="row" -->">Search also:</label></th><td><input type="text" id="seealso<!-- TMPL_VAR NAME="row" -->" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size="20" /> (example for 200a: '200c','200d','200e'...)</td></tr>
+			</table>
+	<table>
+	<caption>Editor constaints</caption>
+	<tr><th><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text for librarian:</label></th><td><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for OPAC:</label></th><td><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in tab:</label></th><td><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT managed by Koha)</td></tr>
+
+	<tr><th><label for="hidden<!-- TMPL_VAR NAME="row" -->">Hidden:</label></th><td> Opac:<!-- TMPL_VAR name="ohidden" -->  Intranet:<!-- TMPL_VAR name="ihidden" --> Editor:<!-- TMPL_VAR name="ehidden" --> (see online help)</td></tr>
+
+	<tr><th><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL: </label></th><td><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is an URL and can be clicked</td></tr>
+	<tr><th><label for="link<!-- TMPL_VAR NAME="row" -->">Is a Linking field: </label></th><td><!-- TMPL_VAR NAME="link" --> (if checked, it means that the subfield is used for linking authorities</td></tr>
+
+<tr><th><label>Default Options: <p>(choose one)</p></label></th><td>
+<ul>
+	<li>Authorized Value: <!-- TMPL_VAR NAME="authorised_value" --></li>
+	<li>Thesaurus: <!-- TMPL_VAR NAME="authtypecode" --></li>
+	<li>Plugin: <!-- TMPL_VAR NAME="value_builder" --></li>
+</ul>
+</td></tr>	 
+		</table>
+		</div>
+	<!-- /TMPL_LOOP -->
+	<input type="submit" class="submit" value="Save Changes" />
+	<p>Note: in the last column, you can choose:
+	<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
+	<li>A "thesaurus category": it refers to a thesaurus category. See the corresponding admin table.</li>
+	<li>A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.</li>
+	</ul>
+	</p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+
+<div class="data"><table>
+<caption>Confirm Deletion of Subfield <span class="ex"><!-- TMPL_VAR NAME="tagsubfield" -->?</span></caption>
+	<tr>
+		<th>Subfield</th>
+		<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
+	</tr>
+	<tr><th>Description</th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
+</table></div>
+			<form class="inline" action="<!-- TMPL_VAR NAME="delete_link" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
+				<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+				<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><input type="submit" class="cancel" value="Yes, Delete this Subfield" />
+			</form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">	<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />	<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" />	<input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" />	<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />	<input type="submit" class="submit" value="No, Do Not Delete" />
+			</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+
+	Data deleted
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->">
+	<input type="submit" class="submit" value="OK" />
+	</form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="else" -->
+<h1>Authority MARC subfield structure admin for <!-- TMPL_VAR NAME="tagfield" --> (authority: <!--TMPL_VAR NAME="authtypecode" -->)</h1>
+<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
+
+<table>
+<tr>
+	<th>Subfield</th>
+	<th>Text</th>
+	<th>Constraints</th>
+	<th>Delete</th>
+<!-- TMPL_LOOP NAME="loop" -->
+<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+	<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
+	<td>
+		<!-- TMPL_IF NAME="subfield_ignored" -->
+			<i><!-- TMPL_VAR NAME="liblibrarian" --></i>
+		<!-- TMPL_ELSE -->
+			<!-- TMPL_VAR NAME="liblibrarian" -->
+		<!-- /TMPL_IF -->
+	</td>
+	<td>
+		<!-- TMPL_IF NAME="subfield_ignored" -->
+			<i>subfield ignored</i>
+		<!-- TMPL_ELSE -->
+			<strong>Tab:</strong><!-- TMPL_VAR NAME="tab" -->,
+			<!-- TMPL_IF NAME="repeatable" -->Repeatable, <!-- TMPL_ELSE -->Not repeatable,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="mandatory" -->Mandatory, <!-- TMPL_ELSE -->Not mandatory,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="seealso" --> | <strong>See Also:</strong> <!-- TMPL_VAR NAME="seealso" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="hidden" -->hidden,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="isurl" -->is an url,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="authorised_value" --> | <strong>Auth value:</strong><!-- TMPL_VAR NAME="authorised_value" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="authtypecode" --> | <strong>Authority:</strong><!-- TMPL_VAR NAME="authtypecode" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="value_builder" --> | <strong>Plugin:</strong><!-- TMPL_VAR NAME="value_builder" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="link" --> | <strong>Link:</strong><!-- TMPL_VAR NAME="link" -->,<!-- /TMPL_IF -->
+		<!-- /TMPL_IF -->
+	</td>
+	<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
+</tr>
+<!-- /TMPL_LOOP -->
+</table>
+<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="edit_tagfield" -->" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="edit_authtypecode" -->" /><input type="submit" class="submit" value="Edit Subfields" /></form> <form class="inline" action="auth_tag_structure.pl" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /><input type="submit" class="submit" value="Return to Auth Structure" /></form>
+<!-- TMPL_IF NAME="previous" -->
+	<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
+	</a><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="next" -->
+	<!-- TMPL_VAR NAME="next" -->
+		<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0" />
+	</a>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/auth_tag_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/auth_tag_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/auth_tag_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/auth_tag_structure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,178 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>Authority MARC framework for <!-- TMPL_IF NAME="authtypecode" --><!-- TMPL_VAR NAME="authtypecode" --><!-- TMPL_ELSE -->default framework<!-- /TMPL_IF --></h1>
+<script language="javascript" type="text/javascript">
+	function _(s) { return s } // dummy function for gettext
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNotNull(f,noalert) {
+		if (f.value.length ==0) {
+   return false;
+		}
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function toUC(f) {
+		var x=f.value.toUpperCase();
+		f.value=x;
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNum(v,maybenull) {
+	var n = new Number(v.value);
+	if (isNaN(n)) {
+		return false;
+		}
+	if (maybenull==0 && v.value=='') {
+		return false;
+	}
+	return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isDate(f) {
+		var t = Date.parse(f.value);
+		if (isNaN(t)) {
+			return false;
+		}
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function Check(f) {
+		var ok=1;
+		var _alertString="";
+		var alertString2;
+		if (f.tagfield.value.length==0) {
+			_alertString += "\n- " + _("tag number missing");
+		}
+		if (_alertString.length==0) {
+			document.Aform.submit();
+		} else {
+			alertString2  = _("Form not submitted because of the following problem(s)");
+			alertString2 += "\n------------------------------------------------------------------------------------\n";
+			alertString2 += _alertString;
+			alert(alertString2);
+		}
+	}
+	</script>
+
+<!-- TMPL_IF NAME="add_form" -->
+
+	<h1>
+	<!-- TMPL_IF NAME="use-heading-flags-p" -->
+	<!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF -->
+	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF -->
+	</h1>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
+		<p><label>Tag<label><!-- TMPL_VAR NAME="searchfield" --></p>
+		<p><label>Text for librarians</label><input type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" escape=HTML -->" size="80" maxlength="100" /></p>
+		<p><label>Text for opac</label><input type="text" name="libopac" value="<!-- TMPL_VAR NAME="libopac" escape=HTML -->" size="80" maxlength="100" /></p>
+		<p><label>Repeatable</label><!-- TMPL_VAR NAME="repeatable" --></p>
+		<p><label>Mandatory</label><!-- TMPL_VAR NAME="mandatory" --></p>
+		<p><label>Authorised value</label><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</p>
+		<p><label>&nbsp;</label><input type="button" value="OK" class="button" onclick="Check(this.form)" /></p>
+	</form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+
+<table>
+	<tr>
+		<td>tag</td>
+		<td><!-- TMPL_VAR NAME="searchfield" --></td>
+	</tr>
+	<tr>
+		<td>&nbsp;</td><td><!-- TMPL_VAR NAME="liblibrarian" --></td>
+	</tr>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="delete_confirmed" />
+		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR name="authtypecode" -->">
+		<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+	<tr><td colspan="2" align="center">CONFIRM DELETION</td></tr>
+	<tr><td><input type="submit" value="YES"></form></td><td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="NO" class="submit" /></form></td></tr>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+
+	Data deleted
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<input type="submit" value="OK" class="submit" />
+	</form>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="authtype_create" -->
+
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="authtype_create_confirm" />
+		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
+		Create authority framework for <!-- TMPL_VAR NAME="authtypecode" --> using
+		<select name="existingauthtypecode">
+			<option value="">Default</option>
+		<!-- TMPL_LOOP NAME="existingauthtypeloop" -->
+			<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="authtypetext" --></option>
+		<!-- /TMPL_LOOP -->
+		</select>
+		<input type="submit" value="OK" class="submit" />
+	</form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="else" -->
+<div id="bloc25">
+<h2>Select an authority framework</h2>
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<select name="authtypecode">
+		<option value="">Default</option>
+	<!-- TMPL_LOOP NAME="authtypeloop" -->
+		<option value="<!-- TMPL_VAR NAME="value" -->" <!-- TMPL_IF NAME="selected" -->selected<!-- /TMPL_IF -->>
+			<!-- TMPL_VAR NAME="authtypetext" -->
+		</option>
+	<!-- /TMPL_LOOP -->
+	</select>
+	<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+	<input type="submit" value="OK" class="submit" />
+</form>
+</div>
+<div id="bloc100">
+	<table>
+	<tr>
+		<th>Tag</th>
+		<th>Lib</th>
+		<th>Repeatable</th>
+		<th>Mandatory</th>
+		<th>Authorised<br />value</th>
+		<th>Subfields</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	<!-- TMPL_LOOP NAME="loop" -->
+	<tr valign="top" bgcolor="<!-- TMPL_VAR NAME="bgcolor" -->">
+		<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
+		<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
+		<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+		<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+		<td><!-- TMPL_VAR NAME="authorised_value" --></td>
+		<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->" class="button">subfields</a></td>
+		<td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
+		<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
+	</tr>
+	<!-- /TMPL_LOOP -->
+	</table>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="add_form" />
+		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
+		<input type="hidden" name="op" value="add_form" />
+		<input type="submit" class="submit" value="Add Tag" />
+		<!-- TMPL_IF NAME="isprevpage" -->
+			<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->&amp;searchfield=<!-- TMPL_VAR NAME="searchfield" -->&authtypecode=<!-- TMPL_VAR NAME="authtypecode" --> ">Previous Page</a>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="nextpage" -->
+			<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->&amp;searchfield=<!-- TMPL_VAR NAME="searchfield" -->&authtypecode=<!-- TMPL_VAR NAME="authtypecode" --> ">Next Page</a>
+		<!-- /TMPL_IF -->
+	</form>
+</div>
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/authorised_values.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/authorised_values.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/authorised_values.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/authorised_values.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,97 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion<!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" -->Authorised values admin<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF name="add_form" -->
+	<form class="inline" action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
+	<input type="hidden" name="op" value="add_validate" />
+	<div class="data"><table>
+	<caption><!-- TMPL_VAR name="action" --></caption>
+	<tr>
+		<th><label for="category">Category</label></th>
+		<td><!-- TMPL_VAR name="category" --></td>
+	</tr>
+	<tr>
+		<th><label for="authorised_value">Authorised value</label></th>
+		<td><input type="text" id="authorised_value" name="authorised_value" value="<!-- TMPL_VAR name="authorised_value" -->" /></td>
+	</tr>
+	<tr>
+		<th><label for="lib">Description</label></th>
+		<td><input type="text" name="lib" id="lib" value="<!-- TMPL_VAR name="lib" -->" /></td>
+	</tr>
+	</table></div><input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
+			<input type="submit" value="<!-- TMPL_VAR name="action" -->" class="submit" /></form> <form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="get"><input type="submit" class="cancel" value="Cancel and Return to Authorized Values" /></form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF name="delete_confirm" -->
+<!-- -->
+<h3>Confirm Deletion</h3>
+<table>
+	<tr>
+		<td><b>Variable</b></td>
+		<td><b>Description</b></td>
+		<td><b><!-- TMPL_VAR name="searchfield" --></b></td>
+	</tr>
+	<tr><td>Value</td><td><!-- TMPL_VAR name="Tvalue" --></td></tr>
+	</table>
+<div class="tabitem">	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+		<input type="hidden" name="op" value="delete_confirmed" />
+		<input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
+		<input type="hidden" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->" /><input type="submit" class="cancel" value="Confirm Deletion" /></form> <form class="inline" action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" class="submit" value="Do Not Delete" /></form>
+</div><!-- /TMPL_IF -->
+
+<!-- -->
+<!-- TMPL_IF name="else" -->
+
+<h1>Authorised values admin</h1>
+<p>This table is used in MARC definition. You can define as many categories as you want, and as many authorised values as you want in each category.</p>
+<p>When you define the MARC subfield structure, you can link a subfield to a authorised-value category. When the user ask for adding of modifying a biblio,
+the subfield is not entered through a free field, but though a list of authorised values</p>
+<form action="/cgi-bin/koha/admin/authorised_values.pl" method="post"><label for="searchfield">Show Category: </label><!-- TMPL_VAR name="tab_list" --> <input type="submit" value="Submit" class="submit" /></form>
+<table>
+<tr>
+	<th>Category</th>
+	<th>Authorised value</th>
+	<th>Description</th>
+	<th>Edit</th>
+	<th>Delete</th>
+	</tr>
+<!-- TMPL_LOOP name="loop" -->
+<tr>
+	<td><!-- TMPL_VAR name="category" --></td>
+	<td><!-- TMPL_VAR name="authorised_value" --></td>
+	<td><!-- TMPL_VAR name="lib" --></td>
+	<td><a href="<!-- TMPL_VAR name="edit" -->">Edit</a></td>
+	<td><a href="<!-- TMPL_VAR name="delete" -->">Delete</a></td>
+</tr>
+<!-- /TMPL_LOOP -->
+</table>
+
+<!-- TMPL_IF NAME="isprevpage" -->
+<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+	<input type="submit" class="submit" value="&lt;&lt; Previous Page" /></form>
+<!-- /TMPL_IF --> 
+
+<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+<input type="hidden" name="op" value="add_form">
+<input type="hidden" name="category" value="<!-- TMPL_VAR NAME="category" -->">
+<input type="submit" class="submit" value="Add Authorised value" /></form> 
+
+<form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="get"><input type="hidden" value="add_form" name="op" /><input type="submit" class="submit" value="Add New Category" /></form>
+
+<!-- TMPL_IF NAME="nextpage" -->
+<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+	<input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
+<!-- /TMPL_IF -->
+
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/authtgroups.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/authtgroups.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/authtgroups.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/authtgroups.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,152 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<script language="javascript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNotNull(f,noalert) {
+	if (f.value.length ==0) {
+		return false;
+	}
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function toUC(f) {
+	var x=f.value.toUpperCase();
+	f.value=x;
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNum(v,maybenull) {
+var n = new Number(v.value);
+if (isNaN(n)) {
+	return false;
+	}
+if (maybenull==0 && v.value=='') {
+	return false;
+}
+return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isDate(f) {
+	var t = Date.parse(f.value);
+	if (isNaN(t)) {
+		return false;
+	}
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function Check(f) {
+	var ok=1;
+	var _alertString="";
+	var alertString2;
+	if (f.authtypegroup.value.length==0) {
+		_alertString += "\n- " + _("Authority type : code missing");
+	}
+	if (!(isNotNull(window.document.Aform.authgrouptext,1))) {
+		_alertString += "\n- " + _("Description missing");
+	}
+	if (_alertString.length==0) {
+		document.Aform.submit();
+	} else {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += _alertString;
+		alert(alertString2);
+	}
+}
+</script>
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+<div class="data"><table>
+	<!-- TMPL_IF NAME="authtypegroup" -->
+		<caption>Modify authority group type</caption>
+	<!-- TMPL_ELSE -->
+		<caption>Add authority group type</caption>
+	<!-- /TMPL_IF -->
+	
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="checked" value="0" />
+			<!-- TMPL_IF NAME="authtypegroup" -->
+				<tr><th><label for="authtypegroup">Authority type<label><input type="hidden" id="authtypegroup" name="authtypegroup" value="<!-- TMPL_VAR NAME="authtypegroup" -->" /></th><td><!-- TMPL_VAR NAME="authtypegroup" --></td></tr>
+			<!-- TMPL_ELSE -->
+				<tr><th><label for="authtypegroup">Authority type<label></th><td><input type="text" id="authtypegroup" name="authtypegroup" size="10" maxlength="10" onblur="toUC(this)" /></td></tr>
+			<!-- /TMPL_IF -->
+			<tr><th>
+				<label for="authgrouptext">Description</label></th><td>
+				<input type="text" id="authgrouptext" name="authgrouptext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authgrouptext" escape=HTML -->" />
+			</td></tr>
+			<tr><th>
+				<label for="authtypes">Authtypes</label></th><td>
+				<!-- TMPL_VAR NAME="authtypeloop">
+			</td></tr>
+			</table>
+			<p>
+				<!-- TMPL_IF NAME="authtypegroup" -->
+		<input type="submit" value="Update Authority Group Type" class="submit" onclick="Check(this.form); return false;" />
+	<!-- TMPL_ELSE -->
+		<input type="submit" value="Add Authority Group Type" class="submit" onclick="Check(this.form); return false;" />
+	<!-- /TMPL_IF -->
+				
+			</p>
+			</div>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<div class="details">
+	<h2>Authority structure definition for <!-- TMPL_VAR NAME="authgrouptext" --> (<!-- TMPL_VAR NAME="authtypegroup" -->)</h2>
+	<!-- TMPL_IF NAME="total" -->
+		<p>
+			<b>This record is used <!-- TMPL_VAR NAME="total" --> times</b>
+		</p>
+	<!-- /TMPL_IF -->
+	<h3>Are you sure you want to delete this Authority Group Type?</h3>
+	<p>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="hidden" name="op" value="delete_confirmed" />
+			<input type="hidden" name="authtypegroup" value="<!-- TMPL_VAR NAME="authtypegroup" -->" />
+			<input type="submit" value="Yes, Delete It" class="cancel" />
+		</form>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="submit" value="No, Don't Delete It" class="submit" />
+		</form>
+	</p>
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h1>Auth type Admin</h1>
+<p>Define authority types, then authority MARC structure in the same way you define itemtypes and biblio MARC tag structure. Authority values are managed through plugins</p>
+<table>
+	<tr>
+		<th>Code</th>
+		<th>Description</th>
+		
+		<th>Authtypes</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	</tr>
+	
+	
+	<!-- TMPL_LOOP NAME="loop" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="authtypegroup" --></td>
+			<td><!-- TMPL_VAR NAME="authgrouptext" --></td>
+			<td><!-- TMPL_VAR NAME="aauthtypecode" --></td>
+			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;authtypegroup=<!-- TMPL_VAR NAME="authtypegroup" escape="HTML" -->">Edit</a></td>
+			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;authtypegroup=<!-- TMPL_VAR NAME="authtypegroup" escape="HTML" -->">Delete</a></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	<input type="submit" class="submit" value="Add authority group type" />
+</form>
+	<!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF -->
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/authtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/authtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/authtypes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/authtypes.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,166 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<script language="javascript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNotNull(f,noalert) {
+	if (f.value.length ==0) {
+		return false;
+	}
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function toUC(f) {
+	var x=f.value.toUpperCase();
+	f.value=x;
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNum(v,maybenull) {
+var n = new Number(v.value);
+if (isNaN(n)) {
+	return false;
+	}
+if (maybenull==0 && v.value=='') {
+	return false;
+}
+return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isDate(f) {
+	var t = Date.parse(f.value);
+	if (isNaN(t)) {
+		return false;
+	}
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function Check(f) {
+	var ok=1;
+	var _alertString="";
+	var alertString2;
+	if (f.authtypecode.value.length==0) {
+		_alertString += "\n- " + _("Authority type : code missing");
+	}
+	if (!(isNotNull(window.document.Aform.authtypetext,1))) {
+		_alertString += "\n- " + _("Description missing");
+	}
+	if (_alertString.length==0) {
+		document.Aform.submit();
+	} else {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += _alertString;
+		alert(alertString2);
+	}
+}
+</script>
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+<div class="data"><table>
+	<!-- TMPL_IF NAME="authtypecode" -->
+		<caption>Modify authority type</caption>
+	<!-- TMPL_ELSE -->
+		<caption>Add authority type</caption>
+	<!-- /TMPL_IF -->
+	
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="checked" value="0" />
+			<!-- TMPL_IF NAME="authtypecode" -->
+				<tr><th><label for="authtypecode">Authority type<label><input type="hidden" id="authtypecode" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" /></th><td><!-- TMPL_VAR NAME="authtypecode" --></td></tr>
+			<!-- TMPL_ELSE -->
+				<tr><th><label for="authtypecode">Authority type<label></th><td><input type="text" id="authtypecode" name="authtypecode" size="10" maxlength="10" onblur="toUC(this)" /></td></tr>
+			<!-- /TMPL_IF -->
+			<tr><th>
+				<label for="authtypetext">Description</label></th><td>
+				<input type="text" id="authtypetext" name="authtypetext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="authtypetext" escape=HTML -->" />
+			</td></tr>
+			<tr><th>
+				<label for="summary">Summary</label></th><td>
+				<textarea id="summary" name="summary" cols="40" rows="10"><!-- TMPL_VAR NAME="summary" --></textarea>
+			</td></tr>
+			<tr><th><label for="auth_tag_to_report">Report tag</label></th><td>
+				<input type="text" id="auth_tag_to_report" name="auth_tag_to_report" size="5" maxlength="3" value="<!-- TMPL_VAR NAME="auth_tag_to_report">" />
+				<div class="help">Enter here the number of the tag that will be reported in the biblio (subfield by subfield). For example, in UNIMARC, enter 200 to report every 200 subfield in the 70x biblio</div></td></tr>
+			</td></tr></table>
+			<p>
+				<!-- TMPL_IF NAME="authtypecode" -->
+		<input type="submit" value="Update Authority Type" class="submit" onclick="Check(this.form); return false;" />
+	<!-- TMPL_ELSE -->
+		<input type="submit" value="Add Authority Type" class="submit" onclick="Check(this.form); return false;" />
+	<!-- /TMPL_IF -->
+				
+			</p>
+			</div>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<div class="details">
+	<h2>Authority structure definition for <!-- TMPL_VAR NAME="authtypetext" --> (<!-- TMPL_VAR NAME="authtypecode" -->)</h2>
+	<!-- TMPL_IF NAME="total" -->
+		<p>
+			<b>This record is used <!-- TMPL_VAR NAME="total" --> times</b>
+		</p>
+	<!-- /TMPL_IF -->
+	<h3>Are you sure you want to delete this Authority Type?</h3>
+	<p>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="hidden" name="op" value="delete_confirmed" />
+			<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->" />
+			<input type="submit" value="Yes, Delete It" class="cancel" />
+		</form>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="submit" value="No, Don't Delete It" class="submit" />
+		</form>
+	</p>
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h1>Auth type Admin</h1>
+<p>Define authority types, then authority MARC structure in the same way you define itemtypes and biblio MARC tag structure. Authority values are managed through plugins</p>
+<table>
+	<tr>
+		<th>Code</th>
+		<th>Description</th>
+		<th>summary</th>
+		<th>Tag reported</th>
+		<th>&nbsp;</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	</tr>
+	<tr>
+		<td>&nbsp;</td>
+		<td>Default framework</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+		<td><a href="auth_tag_structure.pl">MARC structure</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+	</tr>
+	
+	<!-- TMPL_LOOP NAME="loop" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="authtypecode" --></td>
+			<td><!-- TMPL_VAR NAME="authtypetext" --></td>
+			<td><!-- TMPL_VAR NAME="summary" --></td>
+			<td><!-- TMPL_VAR NAME="auth_tag_to_report" --></td>
+			<td><a href="auth_tag_structure.pl?authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->" class="button parameters" >MARC structure</a></td>
+			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Edit</a></td>
+			<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" escape="HTML" -->">Delete</a></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	<input type="submit" class="submit" value="Add authority type" />
+</form>
+	<!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF -->
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/biblios_framework.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/biblios_framework.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/biblios_framework.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/biblios_framework.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,132 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF NAME="delete_confirm" -->Delete Framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?<!-- /TMPL_IF --><!-- TMPL_IF NAME="else" -->Biblio Framework<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<script language="javascript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNotNull(f,noalert) {
+	if (f.value.length ==0) {
+		return false;
+	}
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function toUC(f) {
+	var x=f.value.toUpperCase();
+	f.value=x;
+	return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isNum(v,maybenull) {
+var n = new Number(v.value);
+if (isNaN(n)) {
+	return false;
+	}
+if (maybenull==0 && v.value=='') {
+	return false;
+}
+return true;
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function isDate(f) {
+	var t = Date.parse(f.value);
+	if (isNaN(t)) {
+		return false;
+	}
+}
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+function Check(f) {
+	var ok=1;
+	var _alertString="";
+	var alertString2;
+	if (f.frameworkcode.value.length==0) {
+		_alertString += "\n- " + _("Framework code missing");
+	}
+	if (!(isNotNull(window.document.Aform.frameworktext,1))) {
+		_alertString += "\n- " + _("Description missing");
+	}
+	if (_alertString.length==0) {
+		document.Aform.submit();
+	} else {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += _alertString;
+		alert(alertString2);
+	}
+}
+</script>
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="checked" value="0" />
+	<table>
+	<caption><!-- TMPL_IF NAME="frameworkcode" -->Modify framework text<!-- TMPL_ELSE -->Add framework<!-- /TMPL_IF --></caption>
+	<tr>
+			<!-- TMPL_IF NAME="frameworkcode" -->
+				<td><label for="frameworkcode">Framework Code<label></td><td><input type="hidden" id="frameworkcode" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!-- TMPL_VAR NAME="frameworkcode" --></td>
+			<!-- TMPL_ELSE -->
+				<td><label for="frameworkcode">Framework Code<label></td><td><input type="text" id="frameworkcode" name="frameworkcode" size="4" maxlength="4" onblur="toUC(this)" /></td>
+			<!-- /TMPL_IF -->
+			</tr>
+			<tr>
+				<td><label for="description">Description</label></td><td>
+				<input type="text" name="frameworktext" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="frameworktext" escape=HTML -->" /></td>
+</tr></table>
+			<p>	<input type="button" value="Submit"class="submit" onclick="Check(this.form)" /></p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<h3>Delete framework for <!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)?</h3>
+	<!-- TMPL_IF NAME="total" -->
+		<div class="error">This framework is used <!-- TMPL_VAR NAME="total" --> times</div>
+	<!-- /TMPL_IF -->
+	<p>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" value="Yes, Delete this Framework!" class="cancel" />
+		</form>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No, Do not Delete!" class="submit" /></form>
+	</p>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h1>Biblio framework</h1>
+<p>Framework name, then go to MARC biblio to set MARC editor parameters</p>
+<table>
+	<tr>
+		<th>Code</th>
+		<th>Description</th>
+		<th>&nbsp;</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	</tr>
+	<tr>
+		<td>&nbsp;</td>
+		<td>Default framework</td>
+		<td><a href="bibliostagstructure.pl?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->">MARC structure</td>
+		<td>&nbsp;</td>
+		<td>&nbsp;</td>
+	</tr>
+	
+	<!-- TMPL_LOOP NAME="loop" -->
+		<tr>
+			<td><!-- TMPL_VAR name="frameworkcode" --></td>
+			<td><!-- TMPL_VAR name="frameworktext" --></td>
+			<td><a href="bibliostagstructure.pl?frameworkcode=<!-- TMPL_VAR name="frameworkcode" -->" >MARC structure</a></td>
+			<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Edit</a></td>
+			<td><a href="<!-- TMPL_VAR name="script_name" -->?op=delete_confirm&amp;frameworkcode=<!-- TMPL_VAR name="frameworkcode" escape="HTML" -->">Delete</a></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	<input type="submit" class="submit" value="Add framework" />
+	<td><!-- TMPL_IF NAME="previous" --><a href="<!-- TMPL_VAR NAME="previous" -->">&lt;&lt; Previous</a><!-- /TMPL_IF --></td>
+	<td><!-- TMPL_IF NAME="next" --><a href="<!-- TMPL_VAR NAME="next" -->">Next &gt;&gt;</a><!-- /TMPL_IF --></td>
+</form>
+</div>
+<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/biblios_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/biblios_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/biblios_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/biblios_subfields_structure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,135 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+
+	<h1><!-- TMPL_IF NAME="use-heading-flags-p" -->
+	<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit MARC subfields constraints<!-- /TMPL_IF -->
+	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h1>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+	<input type="hidden" name="op" value="add_validate" />
+	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+	<!-- TMPL_LOOP NAME="loop" -->
+	<div class="data <!-- TMPL_VAR NAME="toggle" -->"><h2>Tag <!-- TMPL_VAR NAME="tagfield" -->, Subfield <!-- TMPL_VAR NAME="tagsubfield" --></h2>
+	<table>
+	<caption>MARC constraints</caption>
+	<tr><th><label for="repeatable<!-- TMPL_VAR NAME="row" -->">Repeatable:</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
+	<tr><th><label for="mandatory<!-- TMPL_VAR NAME="row" -->">Mandatory:</label></th><td><!-- TMPL_VAR NAME="mandatory" --> </td></tr>
+	<tr><th><label for="seealso<!-- TMPL_VAR NAME="row" -->">Search also:</label></th><td><input type="text" id="seealso<!-- TMPL_VAR NAME="row" -->" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size="20" /> (example for 200a: '200c','200d','200e'...)</td></tr>
+			</table>
+	<table>
+	<caption>Editor constaints</caption>
+	<tr><th><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text for librarian:</label></th><td><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for OPAC:</label></th><td><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in tab:</label></th><td><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT managed by Koha)</td></tr>
+
+	<tr><th><label for="hidden<!-- TMPL_VAR NAME="row" -->">Hidden:</label></th><td> Opac:<!-- TMPL_VAR name="ohidden" -->  Intranet:<!-- TMPL_VAR name="ihidden" --> Editor:<!-- TMPL_VAR name="ehidden" --> (see online help)</td></tr>
+
+	<tr><th><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL: </label></th><td><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is an URL and can be clicked</td></tr>
+<tr><th><label>Default Options: <p>(choose one)</p></label></th><td>
+<ul>
+	<li>Authorized Value: <!-- TMPL_VAR NAME="authorised_value" --></li>
+	<li>Thesaurus: <!-- TMPL_VAR NAME="authtypes" --></li>
+	<li>Plugin: <!-- TMPL_VAR NAME="value_builder" --></li>
+	<li>Link: <input type="text" name="link" value="<!-- TMPL_VAR NAME="link" -->" size="10" maxlength="5" /> (exemple:200b)</li>
+</ul>
+</td></tr>	 
+		</table>
+		</div>
+	<!-- /TMPL_LOOP -->
+	<input type="submit" class="submit" value="Save Changes" />
+	<p>Note: in the last column, you can choose:
+	<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
+	<li>A "thesaurus category": it refers to a thesaurus category. See the corresponding admin table.</li>
+	<li>A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.</li>
+	</ul>
+	</p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+
+<div class="data"><table>
+<caption>Confirm Deletion of Subfield <span class="ex"><!-- TMPL_VAR NAME="tagsubfield" -->?</span></caption>
+	<tr>
+		<th>Subfield</th>
+		<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
+	</tr>
+	<tr><th>Description</th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
+</table></div>
+			<form class="inline" action="<!-- TMPL_VAR NAME="delete_link" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
+				<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+				<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="cancel" value="Yes, Delete this Subfield" />
+			</form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">	<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />	<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" />	<input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" />	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="submit" value="No, Do Not Delete" />
+			</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+
+	Data deleted
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->">
+	<input type="submit" class="submit" value="OK" />
+	</form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="else" -->
+<h1>MARC subfield structure admin for <!-- TMPL_VAR NAME="tagfield" --> (framework <!--TMPL_VAR NAME="frameworkcode" -->)</h1>
+<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
+
+
+<table>
+<tr>
+	<th>Subfield</th>
+	<th>Text</th>
+	<th>Constraints</th>
+	<th>Delete</th>
+<!-- TMPL_LOOP NAME="loop" -->
+<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+	<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
+	<td>
+		<!-- TMPL_IF NAME="subfield_ignored" -->
+			<i><!-- TMPL_VAR NAME="liblibrarian" --></i>
+		<!-- TMPL_ELSE -->
+			<!-- TMPL_VAR NAME="liblibrarian" -->
+		<!-- /TMPL_IF -->
+	</td>
+	<td>
+		<!-- TMPL_IF NAME="subfield_ignored" -->
+			<i>subfield ignored</i>
+		<!-- TMPL_ELSE -->
+			<strong>Tab:</strong><!-- TMPL_VAR NAME="tab" -->,
+			<!-- TMPL_IF NAME="repeatable" -->Repeatable, <!-- TMPL_ELSE -->Not repeatable,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="mandatory" -->Mandatory, <!-- TMPL_ELSE -->Not mandatory,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="seealso" --> | <strong>See Also:</strong> <!-- TMPL_VAR NAME="seealso" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="hidden" -->hidden,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="isurl" -->is an url,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="authorised_value" --> | <strong>Auth value:</strong><!-- TMPL_VAR NAME="authorised_value" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="authtypecode" --> | <strong>Authority:</strong><!-- TMPL_VAR NAME="authtypecode" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="value_builder" --> | <strong>Plugin:</strong><!-- TMPL_VAR NAME="value_builder" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="link" --> | <strong>Link:</strong><!-- TMPL_VAR NAME="link" -->,<!-- /TMPL_IF -->
+		<!-- /TMPL_IF -->
+	</td>
+	<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
+</tr>
+<!-- /TMPL_LOOP -->
+</table>
+<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="edit_tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="edit_frameworkcode" -->" /><input type="submit" class="submit" value="Edit Subfields" /></form> <form class="inline" action="bibliostagstructure.pl" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="submit" value="Return to Marc Structure" /></form>
+<!-- TMPL_IF NAME="previous" -->
+	<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
+	</a><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="next" -->
+	<!-- TMPL_VAR NAME="next" -->
+		<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0" />
+	</a>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/bibliostagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/bibliostagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/bibliostagstructure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/bibliostagstructure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,208 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>MARC tag structure admin for <!-- TMPL_IF NAME="frameworkcode" --><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)<!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
+<script language="javascript" type="text/javascript">
+	function _(s) { return s } // dummy function for gettext
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNotNull(f,noalert) {
+		if (f.value.length ==0) {
+   return false;
+		}
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function toUC(f) {
+		var x=f.value.toUpperCase();
+		f.value=x;
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNum(v,maybenull) {
+	var n = new Number(v.value);
+	if (isNaN(n)) {
+		return false;
+		}
+	if (maybenull==0 && v.value=='') {
+		return false;
+	}
+	return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isDate(f) {
+		var t = Date.parse(f.value);
+		if (isNaN(t)) {
+			return false;
+		}
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function Check(f) {
+		var ok=1;
+		var _alertString="";
+		var alertString2;
+		if (f.tagfield.value.length==0) {
+			_alertString += "\n- " + _("tag number missing");
+		}
+		if (_alertString.length==0) {
+			document.Aform.submit();
+		} else {
+			alertString2  = _("Form not submitted because of the following problem(s)");
+			alertString2 += "\n------------------------------------------------------------------------------------\n";
+			alertString2 += _alertString;
+			alert(alertString2);
+		}
+	}
+	</script>
+
+<!-- TMPL_IF NAME="add_form" -->
+<!-- ------------------------------------------------------------------------ -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+	<div class="data"><table>
+		<caption><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></caption>
+	<tr><th><label>Tag<label></th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
+	<tr><th><label for="liblibrarian">Tag Label in Intranet</label></th><td><input type="text" id="liblibrarian" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" escape="HTML" -->" size="80" maxlength="100" /></td></tr>
+	<tr><th><label for="libopac">Tag Label in OPAC</label></th><td><input type="text" id="libopac" name="libopac" value="<!-- TMPL_VAR NAME="libopac" escape=HTML -->" size="80" maxlength="100" /></td></tr>
+	<tr><th><label for="repeatable">Repeatable</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
+	<tr><th><label for="mandatory">Mandatory</label></th><td><!-- TMPL_VAR NAME="mandatory" --></td></tr>
+	<tr><th><label for="authorised_value">Authorized value</label></th><td><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</td></tr>
+	</table></div>
+		<p><input type="submit" value="Save Changes" class="submit" onclick="Check(this.form)" /></p>
+	<p><input type="submit" value="Cancel and Return to MARC Tag Structure" class="cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->'; return false;" /></p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<!-- ------------------------------------------------------------------------ -->
+<div class="data"><table>
+<caption>Confirm Deletion of Tag <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
+	<tr><th>Tag: </th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
+	<tr><th>Description: </th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
+	</table></div>
+	<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="cancel" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do Not Delete" /></form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<!-- ------------------------------------------------------------------------ -->
+	<div class="details"><h3>Tag Deleted</h3>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+	<input type="submit" class="submit" value="Return to MARC Tag Structure" />
+	</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="framework_create" -->
+<!-- ------------------------------------------------------------------------ -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="framework_create_confirm" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+		Create framework for <!-- TMPL_VAR NAME="frameworkcode" --> (<!-- TMPL_VAR NAME="frameworktext" -->) using
+		<select name="existingframeworkcode">
+			<option value="">Default</option>
+		<!-- TMPL_LOOP NAME="existingframeworkloop" -->
+			<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
+		<!-- /TMPL_LOOP -->
+		</select>
+		<input type="submit" value="OK" class="submit" />
+	</form>
+<!-- /TMPL_IF -->
+<!-- ------------------------------------------------------------------------ -->
+<!-- TMPL_IF NAME="else" -->
+	<form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><label for="frameworkcode">Select a framework: </label>
+		<select name="frameworkcode" id="frameworkcode">
+			<option value="">Default</option>
+		<!-- TMPL_LOOP NAME="frameworkloop" -->
+			<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="frameworktext" --></option>
+		<!-- /TMPL_LOOP -->
+		</select>
+		<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" size="5" />
+		<input type="submit" value="Tag Search" class="submit" />
+		<p><!-- TMPL_IF Name="select_display"-->
+				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display" id="onlyused" value="True" checked="checked" onchange="document.f.submit()" />
+			<!-- TMPL_ELSE -->
+				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display"  id="onlyused" value="True" onchange="document.f.submit()" />
+			<!--/TMPL_IF --> 
+		</p>
+	</form>
+	<div class="help">NOTE : Framework consists of 2 parts biblio & holdings. This is for BIBLIOGRAPHIC definitions, and main framework definer</div>
+
+	<div class="data">
+	<table>
+		<tr>
+			<th scope="col">Tag</th>
+			<th scope="col">Label</th>
+			<th scope="col">Repeatable</th>
+			<th scope="col">Mandatory</th>
+			<th scope="col">Authorized value</th>
+			<th scope="col">Subfields</th>
+			<th scope="col">&nbsp;</th>
+		</tr>
+	<!-- TMPL_IF NAME="select_display" -->
+		<!-- TMPL_LOOP NAME="loop" -->
+		<tr class="highlight">
+			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
+			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
+			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
+			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">Edit Subfields</a></td>
+			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
+		</tr>
+		<tr>
+			<td>
+				&nbsp;
+			</td>
+			<td colspan="6">
+				<ul>
+				<!-- TMPL_LOOP NAME="subfields" -->
+					<li>Tab:<!-- TMPL_VAR NAME="tab" --> | $<!-- TMPL_VAR NAME="tagsubfield" -->
+							<!-- TMPL_VAR NAME="liblibrarian" --> <!-- TMPL_IF NAME="kohafield" --><!-- TMPL_VAR NAME="kohafield" --><!--/TMPL_IF --><!-- TMPL_IF NAME="repeatable" -->, repeatable<!-- /TMPL_IF --><!-- TMPL_IF NAME="mandatory" -->, Mandatory<!-- /TMPL_IF --><!-- TMPL_IF NAME="seealso" -->, See <!-- TMPL_VAR name="seealso" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authorised_value" -->, <!-- TMPL_VAR NAME="authorised_value" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authtypecode" -->, <!-- TMPL_VAR NAME="authtypecode" --><!--/TMPL_IF --><!-- TMPL_IF NAME="value_builder" -->, <!-- TMPL_VAR NAME="value_builder" --><!--/TMPL_IF -->
+					</li>
+				<!-- /TMPL_LOOP -->
+				</ul>
+			</td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	<!-- TMPL_ELSE -->
+		<!-- TMPL_LOOP NAME="loop" -->
+		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
+			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
+			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
+			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">View Subfields</a></td>
+			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	<!--/TMPL_IF -->
+	</table>
+	<div class="tabitem">
+		<!-- TMPL_IF NAME="isprevpage" -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+		<input type="hidden" value="<!-- TMPL_VAR NAME="prevpage" -->" name="offset" /><input type="hidden" value="<!-- TMPL_VAR NAME="searchfield" -->" name="searchfield" /><input type="hidden" value="<!-- TMPL_VAR NAME="frameworkcode" -->" name="frameworkcode" /><!--TMPL_IF Name="select_display"--><input type="hidden" value="select_display" name="True" /><!--/TMPL_IF --><input type="submit" value="&lt;&lt; Previous Page" class="submit" /></form>
+		<!-- /TMPL_IF -->	
+		
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="add_form" />
+	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+		<input type="submit" value="Add New MARC Tag" class="submit" /></form>
+		
+		<!-- TMPL_IF NAME="nextpage" -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!--TMPL_IF Name="select_display"--><input type="hidden" name="select_display" value="True" /><!--/TMPL_IF --><input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
+		<!-- /TMPL_IF -->
+</div>
+</div>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/branches.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/branches.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/branches.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/branches.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,219 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF name="add" --><!-- TMPL_VAR name="head" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm deletion of branch '<!-- TMPL_VAR NAME="branchcode" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" --><!-- TMPL_VAR name="head" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_category" -->Confirm deletion of category<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_IF name="add" -->
+<h1><!-- TMPL_VAR name="head" --></h1>
+<form action="<!-- TMPL_VAR name="action" -->" name="Aform" method="post">
+<input type="hidden" name="op" value="add_validate" />
+<table>
+	<tr>
+		<td>Branch code</td>
+		<td>
+			<!-- TMPL_IF name="branchcode" -->
+				<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
+				<!-- TMPL_VAR name="branchcode" -->
+			<!-- TMPL_ELSE -->
+				<input type="text" name="branchcode" size="5" maxlength="5" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
+			<!-- /TMPL_IF -->
+		</td>
+	</tr>
+	<tr>
+		<td>Name</td>
+		<td><input type="text" name="branchname" size="40" maxlength="80" value="<!-- TMPL_VAR name="branchname" escape="HTML" -->" />&nbsp;</td>
+	</tr>
+<!-- TMPL_LOOP name="categoryloop" -->
+					<tr>
+						<td><!-- TMPL_VAR name="categoryname" --></td>
+						<td><input type="checkbox" name="<!-- TMPL_VAR name="categorycode" -->" <!-- TMPL_VAR name="checked" --> /><!-- TMPL_VAR name="codedescription" --></td>
+					</tr>
+				<!-- /TMPL_LOOP -->
+<tr>
+		<td>Address</td>
+		<td><input type="text" name="branchaddress1" value="<!-- TMPL_VAR name="branchaddress1" escape="HTML" -->" /></td>
+	</tr>
+	<tr>
+		<td>&nbsp;</td>
+		<td><input type="text" name="branchaddress2" value="<!-- TMPL_VAR name="branchaddress2" escape="HTML" -->" /></td>
+	</tr>
+	<tr>
+		<td>&nbsp;</td>
+		<td><input type="text" name="branchaddress3" value="<!-- TMPL_VAR name="branchaddress3" escape="HTML" -->" /></td>
+	</tr>
+	<tr>
+		<td>Phone</td>
+		<td><input type="text" name="branchphone" value="<!-- TMPL_VAR name="branchphone" escape="HTML" -->" /></td>
+	</tr>
+	<tr>
+		<td>Fax</td>
+		<td><input type="text" name="branchfax" value="<!-- TMPL_VAR name="branchfax" escape="HTML" -->" /></td>
+	</tr>
+	<tr>
+		<td>E-mail</td>
+		<td><input type="text" name="branchemail" value="<!-- TMPL_VAR name="branchemail" escape="HTML" -->" /></td>
+	</tr>
+</table><p><input type="submit" class="submit" value="Submit" /></p>
+</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_confirm" -->
+	<h3>Confirm deletion of <!-- TMPL_VAR NAME="branchname" --> (<!-- TMPL_VAR NAME="branchcode" -->)?</h3>
+	<div class="tabitem"><span class="form"><form action="<!-- TMPL_VAR name="action" -->" method="post">
+		<input type="hidden" name="op" value="delete_confirmed" />
+		<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name="branchcode" escape="HTML" -->" />
+			<input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branchname" escape="HTML" -->">
+		<input type="submit" value="Delete Branch" class="cancel" />
+	</form> 
+	<form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
+		<input type="submit" value="Do Not Delete" class="submit" />
+	</form></span></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="else" -->
+	
+	<!-- TMPL_IF NAME="message" --><div class="error"><!-- TMPL_VAR name="message" --></div><!-- /TMPL_IF -->
+	<table>
+	<caption><!-- TMPL_VAR name="head" --></caption>
+		<tr>
+			<th>Name</th>
+			<th>Code</th>
+			<th>Address</th>
+			<th>Category</th>
+			<th>&nbsp;</th>
+			<th>&nbsp;</th>
+		</tr>
+		<!-- TMPL_LOOP name="branches" -->
+			<tr>
+				<td><!-- TMPL_VAR name="branch_name" escape="HTML" --></td>
+				<td><!-- TMPL_VAR name="branch_code" escape="HTML" --></td>
+				<td>
+					<!-- TMPL_IF name="address-empty-p" -->
+						(nothing entered)
+					<!-- TMPL_ELSE -->
+						<!-- TMPL_IF name="branchaddress1" -->
+							<!-- TMPL_VAR name="branchaddress1" escape="HTML" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="branchaddress2" -->
+							<br /><!-- TMPL_VAR name="branchaddress2" escape="HTML" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="branchaddress3" -->
+							<br /><!-- TMPL_VAR name="branchaddress3" escape="HTML" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name=branchphone -->
+							<br />Ph: <!-- TMPL_VAR name="branchphone" escape="HTML" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="branchfax" -->
+							<br />Fax: <!-- TMPL_VAR name="branchfax" escape="HTML" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="branchemail" -->
+							<br />Email: <!-- TMPL_VAR name="branchemail" escape="HTML" --><!-- /TMPL_IF -->
+					<!-- /TMPL_IF -->
+				</td>
+				<td>
+					<!-- TMPL_IF name="no-categories-p" -->
+						(no categories set)
+					<!-- TMPL_ELSE -->
+						<!-- TMPL_LOOP name="category_list" -->
+							<!-- TMPL_VAR name="categoryname" --><br />
+						<!-- /TMPL_LOOP -->
+					<!-- /TMPL_IF -->
+				</td>
+				<td>
+					<form action="<!-- TMPL_VAR name=action -->" method="post">
+					<input type="hidden" name="op" value="edit" />
+					<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name=value escape="HTML" -->" />
+					<input type="submit" value="Edit" class="submit" />
+					</form>
+				</td>
+				<td>
+					<form action="<!-- TMPL_VAR name=action -->" method="post">
+					<input type="hidden" name="branchcode" value="<!-- TMPL_VAR name=value escape="HTML" -->" />
+<input type="hidden" name="branchname" value="<!-- TMPL_VAR NAME="branch_name" escape="HTML" -->">
+					<input type="hidden" name="op" value="delete" /><input type="submit" value="Delete" class="cancel" />
+					</form>
+				</td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+	</table>
+<form action="<!-- TMPL_VAR name=action -->" method="post">
+		<p><input type="hidden" name="op" value="add" />
+		<input type="submit" class="submit" value="Add New Branch" /></p>
+	</form>
+	
+	<table>
+	<caption>Branches Categories</caption>
+	<tr>
+		<th>Name</th>
+		<th>Code</th>
+		<th>Description</th>
+		<th>&nbsp;</th>
+		<th>&nbsp;</th>
+	</tr>
+	<!-- TMPL_LOOP name="branchcategories" -->
+		<tr>
+		<td><!-- TMPL_VAR name="categoryname" --></td>
+		<td><!-- TMPL_VAR name="categorycode" --></td>
+		<td><!-- TMPL_VAR name="codedescription" --></td>
+		<td>
+			<form action="<!-- TMPL_VAR name=action -->" method="post">
+			<input type="hidden" name="op" value="editcategory" />
+			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
+			<input type="submit" value="Edit" class="submit" />
+			</form>
+		</td>
+		<td>
+			<form action="<!-- TMPL_VAR name=action -->" method="post">
+			<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
+			<input type="hidden" name="op" value="delete_category" /><input type="submit" value="Delete" class="cancel" />
+			</form>
+		</td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+	</table><form action="<!-- TMPL_VAR name="action" -->" method="post"><p>
+		<input type="hidden" name="op" value="editcategory" />
+		<input type="submit" class="submit" value="Add New Category" /></p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="editcategory" -->
+	
+	<form action="<!-- TMPL_VAR name=action -->" name="Aform" method="post">
+	<input type="hidden" name=op value="addcategory_validate" />
+	<table>
+		<caption><!-- TMPL_VAR name="head" --></caption>
+		<tr>
+			<td>Category code</td>
+			<td>
+				<!-- TMPL_IF name="categorycode" -->
+					<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
+					<!-- TMPL_VAR name="categorycode" -->
+				<!-- TMPL_ELSE -->
+					<input type="text" name="categorycode" size="5" maxlength="5" value="<!-- TMPL_VAR name="categorycode" escape="HTML" -->" />
+				<!-- /TMPL_IF -->
+			</td>
+		</tr>
+		<tr>
+			<td>Name</td>
+			<td><input type="text" name="categoryname" size="40" maxlength="80" value="<!-- TMPL_VAR name=categoryname escape="HTML" -->" />&nbsp;</td>
+		</tr>
+		<tr>
+			<td>Description</td>
+			<td><input type="text" name="codedescription" size="40" maxlength="80" value="<!-- TMPL_VAR name="codedescription" escape="HTML" -->" />&nbsp;</td>
+		</tr>
+	</table><input type="submit" value="Update" class="submit" />
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_category" -->
+	Confirm delete:
+<div class="tabitem">	<form action="<!-- TMPL_VAR name=action -->" method="post">
+		<input type="hidden" name="op" value="categorydelete_confirmed" />
+		<input type="hidden" name="categorycode" value="<!-- TMPL_VAR name=categorycode escape="HTML" -->" />
+		<input type="submit" value="YES" class="submit" />
+	</form>
+	<form action="<!-- TMPL_VAR name="action" -->" method="post"><input type="hidden" name="op" value="">
+		<input type="submit" value="NO" class="cancel" />
+	</form></div>
+<!-- /TMPL_IF --></div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/categorie.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/categorie.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/categorie.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/categorie.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,372 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_IF NAME="categorycode" -->Modify category<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<!-- TMPL_IF NAME="add_form" -->
+		<script language="javascript" type="text/javascript">
+		function _(s) { return s } // dummy function for gettext
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function isNotNull(f,noalert) {
+			if (f.value.length ==0) {
+	return false;
+			}
+			return true;
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function toUC(f) {
+			var x=f.value.toUpperCase();
+			f.value=x;
+			return true;
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function isNum(v,maybenull) {
+		var n = new Number(v.value);
+		if (isNaN(n)) {
+			return false;
+			}
+		if (maybenull==0 && v.value=='') {
+			return false;
+		}
+		return true;
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function isDate(f) {
+			var t = Date.parse(f.value);
+			if (isNaN(t)) {
+				return false;
+			}
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function Check(f) {
+			var ok=1;
+			var _alertString="";
+			var alertString2;
+			if (f.categorycode.value.length==0) {
+				_alertString += "\n- " + _("Categorycode missing");
+			}
+	//		alert(window.document.Aform.description.value);
+			if (!(isNotNull(window.document.Aform.description,1))) {
+				_alertString += "\n- " + _("Description missing");
+			}
+			if (!isNum(f.upperagelimit,0)) {
+				_alertString += "\n- " + _("Upper age is not a number");
+			}
+			if (_alertString.length==0) {
+				document.Aform.submit();
+			} else {
+				alertString2  = _("Form not submitted because of the following problem(s)");
+				alertString2 += "\n------------------------------------------------------------------------------------\n";
+				alertString2 += _alertString;
+				alert(alertString2);
+			}
+		}
+		</script>
+
+		<!-- TMPL_IF NAME="categorycode" -->
+			<h1>Edit user category</h1>
+		<!-- TMPL_ELSE -->
+			<h1>Add user category</h1>
+		<!-- /TMPL_IF -->
+
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate">
+		<input type="hidden" name="checked" value="0">
+
+		<table style="border:0;border-collapse:separate;border-spacing:3px">
+		<!-- TMPL_IF NAME="categorycode" -->
+			<tr>
+				<td>Category code</td>
+				<td>
+					<b><!-- TMPL_VAR NAME="categorycode" --></b>
+					<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
+				</td>
+			</tr>
+		<!-- TMPL_ELSE -->
+			<tr>
+				<td>Category code</td>
+				<td>
+					<input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)">
+				</td>
+			</tr>
+		<!-- /TMPL_IF -->
+
+			<tr>
+				<td>Description</td>
+				<td>
+					<input type="text" name="description" size="60" maxlength="80" value="<!-- TMPL_VAR NAME="description" escape=HTML -->">
+					&nbsp;
+				</td>
+			</tr>
+			<tr>
+				<td>Validy period</td>
+				<td>
+					<input type="text" name="enrolmentperiod" size="3" maxlength="2" value="<!-- TMPL_VAR NAME="enrolmentperiod" -->">
+				</td>
+			</tr>
+			<tr>
+				<td>Upper age limit</td>
+				<td>
+					<input type="text" name="upperagelimit" size="3" maxlength="3" value="<!-- TMPL_VAR NAME="upperagelimit" -->">
+				</td>
+			</tr>
+			<tr>
+				<td>Age required</td>
+				<td>
+					<input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME="dateofbirthrequired" -->" size="3" maxlength="2">
+				</td>
+			</tr>
+			<tr>
+				<td>Enrolment fee</td>
+				<td>
+					<input type="text" name="enrolmentfee" value="<!-- TMPL_VAR NAME="enrolmentfee" -->">
+				</td>
+			</tr>
+			<tr>
+				<td>Overdue notice</td>
+				<td>
+					<select name="overduenoticerequired">
+						<option<!-- TMPL_UNLESS name="overduenoticerequired" --> selected<!-- /TMPL_UNLESS --> value="0">No</option>
+						<option<!-- TMPL_IF NAME="overduenoticerequired" --> selected<!-- /TMPL_IF --> value="1">Yes</option>
+					</select>
+				</td>
+			</tr>
+			<tr>
+				<td>Issue limit</td>
+				<td>
+					<input type="text" name="issuelimit" value="<!-- TMPL_VAR NAME="issuelimit" -->">
+				</td>
+			</tr>
+			<tr>
+				<td>Reserve fee</td>
+				<td>
+					<input type="text" name="reservefee" value="<!-- TMPL_VAR NAME="reservefee" -->">
+				</td>
+			</tr>
+			<tr>
+				<td>Add public shelves</td>
+				<td>
+					<select name="canmakepublicshelves">
+						<option<!-- TMPL_UNLESS name="canmakepublicshelves" --> selected<!-- /TMPL_UNLESS --> value="0">No</option>
+						<option<!-- TMPL_IF NAME="canmakepublicshelves" --> selected<!-- /TMPL_IF --> value="1">Yes</option>
+					</select>
+				</td>
+			</tr>
+			<tr>
+				<td>Make requirements for virtual shelves</td>
+				<td>
+					<select name="addRequestToShelves">
+						<option<!-- TMPL_UNLESS name="addRequestToShelves" --> selected<!-- /TMPL_UNLESS --> value="0">No</option>
+						<option<!-- TMPL_IF NAME="addRequestToShelves" --> selected<!-- /TMPL_IF --> value="1">Yes</option>
+					</select>
+				</td>
+			</tr>
+			<tr>
+				<td>Renews from OPAC</td>
+				<td>
+					<select name="allowrenewsfromopac">
+						<option<!-- TMPL_UNLESS name="allowrenewsfromopac" --> selected<!-- /TMPL_UNLESS --> value="0">No</option>
+						<option<!-- TMPL_IF NAME="allowrenewsfromopac" --> selected<!-- /TMPL_IF --> value="1">Yes</option>
+					</select>
+				</td>
+			</tr>
+		</table>
+		    <br>
+		    <input type="button" value="Accept" onclick="Check(this.form)" class="button">
+		    <input type="button" value="Cancel" onclick="document.location.href='/cgi-bin/koha/admin/categorie.pl'" class="button">
+		</form>
+
+	<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF NAME="add_validate" -->
+	    <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<h6 style="float:left;margin-rigth:10px;">Information saved</h6>
+			<input type="submit" value="Accept" class="button">
+		</form>
+	<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF NAME="delete_confirm" -->
+	    <h1>Delete user category</h1>
+		<h6>Total user with this category <!-- TMPL_VAR NAME="categorycode" --> = <!-- TMPL_VAR NAME="total" --></h6>
+
+		<table border="0" cellspacing="0" cellpadding="5" style="float:left;width:50%;margin-right:10px;">
+			<tr>
+				<th colspan="2">
+					<b>Category
+					<!-- TMPL_VAR NAME="categorycode" --></b>
+				</th>
+			</tr>
+   
+			<tr>
+				<td>Description</td>
+				<td><!-- TMPL_VAR NAME="description" --></td>
+			</tr>
+			<tr>
+				<td>Validty period</td>
+				<td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
+			</tr>
+			<tr>
+				<td>Upper age limit</td>
+				<td><!-- TMPL_VAR NAME="upperagelimit" --></td>
+			</tr>
+			<tr>
+				<td>Age required</td>
+				<td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
+			</tr>
+			<tr>
+				<td>Enrolment fee</td>
+				<td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
+			</tr>
+			<tr>
+				<td>Overdue notice</td>
+				<td><!-- TMPL_IF NAME="overduenoticerequired" -->Si<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			</tr>
+			<tr>
+				<td>Issue limit</td>
+				<td><!-- TMPL_VAR NAME="issuelimit" --></td>
+			</tr>
+			<tr>
+				<td>Reserve fee</td>
+				<td><!-- TMPL_VAR NAME="reservefee" --></td>
+			</tr>
+			<tr>
+				<td>Add public shelves</td>
+				<td><!-- TMPL_IF NAME="canmakepublicshelves" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			</tr>
+			
+			<tr>
+				<td>Make requirements for virtual shelves</td>
+				<td><!-- TMPL_IF NAME="addRequestToShelves" -->Si<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			</tr>
+			
+			
+   		    <tr>
+				<td>Renews from OPAC</td>
+				<td><!-- TMPL_IF NAME="allowrenewsfromopac" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			</tr>
+		</table>
+			
+		<table style="width:45%">
+			<!-- TMPL_IF NAME="totalgtzero" -->
+			<tr>
+				<td colspan="2" align="center"><h6 id="warning">This category is assigned to <!-- TMPL_VAR NAME="total" --> users. You can't delete it.</h6></td>
+			</tr>
+			<tr>
+				<td colspan="2" align="center">
+					<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+						<input type="submit" value="Accept" class="button">
+					</form>
+				</td>
+			</tr>
+			<!-- TMPL_ELSE -->
+			<tr>
+				<td colspan="2" align="center"><h6 id="warning">Confirm delete</h6></td>
+			</tr>
+			<tr>
+				<td align="right" width="50%">
+				    <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+						<input type="hidden" name="op" value="delete_confirmed">
+						<input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
+						<input type="submit" value="Yes" class="button">
+					</form>
+				</td>
+				<td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="No" class="button"></form></td>
+			</tr>
+			<!-- /TMPL_IF -->
+		</table>
+
+	<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF NAME="delete_confirmed" -->
+	    <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<h6 style="float:left;margin-rigth:10px;">Information deleted</h6>
+		<input type="submit" value="Accept" class="button">
+		</form>
+
+	<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF NAME="else" -->
+		<h1>User categories</h1>
+		<!-- TMPL_IF NAME="searchfield" -->
+			<h6>You searched: <!-- TMPL_VAR NAME="searchfield" --></h6>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_UNLESS name="categoryChild" -->
+		<!--	<h6 id="warning">Warning : Debe tener un codigo de categoría = C para niños</h6>-->
+		<!-- /TMPL_UNLESS -->
+		<!-- TMPL_UNLESS name="categoryInstitution" -->
+		<!--	<h6 id="warning">Atención : Debe tener un codigo de categoría = I para instituciones</h6> -->
+		<!-- /TMPL_UNLESS -->
+		<form action="<TMPL_VAR NAME="script_name">" method="post">
+			<input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->">
+			<input type="submit" name="submit" value="Accept" class="button">
+		</form>
+
+		<table border="0" cellspacing="0" cellpadding="5">
+			<tr bgcolor="#99cc33">
+				<th>Code</th>
+				<th>Description</th>
+				<th>Validity period</th>
+				<th>Enrolment fee</th>
+				<th>Upper age limit</th>
+				<th>Age required</th>
+				<!-- <th>Creditos</th> -->
+				<th>Overdue notice</th>
+				<th>Issue limit</th>
+				<th>Reserve fee</th>
+				<th>Add public shelves</th>
+				<th>Make requirements for virtual shelves</th>
+				<th>Renews from OPAC</th>
+				<th colspan="2"> </th>
+			</tr>
+			<!-- TMPL_LOOP NAME="loop" -->
+			<tr <!-- TMPL_IF NAME="toggle" -->bgcolor="#ffffcc"<!-- TMPL_ELSE -->bgcolor="#FFFFFF" <!-- /TMPL_IF --> >
+				<td align="center"><!-- TMPL_VAR NAME="categorycode" --></td>
+				<td><!-- TMPL_VAR NAME="description" --></td>
+				<td align="center"><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
+				<td align="center"><!-- TMPL_VAR NAME="enrolmentfee" --></td>
+				<td align="center"><!-- TMPL_VAR NAME="upperagelimit" --></td>
+				<td align="center"><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
+			<!--	<td align="center"><!- TMPL_VAR NAME="finetype" --> 	<!--</td> -->
+				<td align="center"><!-- TMPL_IF NAME="overduenoticerequired" -->
+						<i>Yes</i>
+					<!-- TMPL_ELSE -->
+						<i>No</i>
+					<!-- /TMPL_IF -->
+				</td>
+				<td align="center"><!-- TMPL_VAR NAME="issuelimit" --></td>
+				<td align="center"><!-- TMPL_VAR NAME="reservefee" --></td>
+				<td align="center"><!-- TMPL_IF NAME="canmakepublicshelves" -->
+						<i>Yes</i>
+					<!-- TMPL_ELSE -->
+						<i>No</i>
+					<!-- /TMPL_IF -->
+				</td>
+				
+				<td align="center"><!-- TMPL_IF NAME="addRequestToShelves" -->
+						<i>Yes</i>
+					<!-- TMPL_ELSE -->
+						<i>No</i>
+					<!-- /TMPL_IF -->
+				</td>
+				
+				<td align="center"><!-- TMPL_IF NAME="allowrenewsfromopac" -->
+						<i>Yes</i>
+					<!-- TMPL_ELSE -->
+						<i>No</i>
+					<!-- /TMPL_IF -->
+				</td>
+				
+				<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0"></a></td>
+				<td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" border="0"></a></td>
+			</tr>
+			<!-- /TMPL_LOOP -->
+
+		</table>
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_form">
+			<input type="submit" class="button" value="Add category" alt="Add category"><br>
+		</form>
+	<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/categoryitem-orig.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/categoryitem-orig.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/categoryitem-orig.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/categoryitem-orig.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,308 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_IF NAME="categorycode" -->Modify category<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<!-- TMPL_IF NAME="add_form" -->
+        <script language="JavaScript" type="text/javascript">
+        //
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+   return false;
+                }
+                return true;
+        }
+        //
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        //
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull==0 && v.value=='') {
+                return false;
+        }
+        return true;
+        }
+        //
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                        return false;
+                }
+        }
+        //
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.categorycode.value.length==0) {
+                        _alertString += "- categorycode missing\n";
+                }
+//              alert(window.document.Aform.description.value);
+                if (!(isNotNull(window.document.Aform.description,1))) {
+                        _alertString += "- description missing\n";
+                }
+                if (!isNum(f.upperagelimit,0)) {
+                        _alertString += "- upperagelimit is not a number\n";
+                }
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2 = "Form not submitted because of the following problem(s)\n";
+                        alertString2 += "------------------------------------------------------------------------------------\n\n";
+                        alertString2 += _alertString;
+                }
+        }
+        </script>
+
+        <!-- TMPL_IF NAME="categorycode" -->
+                <h1>Modify category</h1>
+        <!-- TMPL_ELSE -->
+                <h1>Add category</h1>
+        <!-- /TMPL_IF -->
+
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate">
+        <input type="hidden" name="checked" value=0>
+                        
+        <table>  
+        <!-- TMPL_IF NAME="categorycode" -->
+                <tr>
+                        <td>Category code</td>
+                        <td>
+                                <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
+                        </td>
+                </tr>
+        <!-- TMPL_ELSE -->
+                <tr>
+                        <td>Category code</td>
+                        <td>
+                                <input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)">
+                        </td>
+                </tr>
+        <!-- /TMPL_IF -->
+                <tr>
+                        <td>Description</td>
+                        <td>
+                                <input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" -->">
+                                &nbsp;
+                        </td>
+                </tr>
+                <tr>
+                        <td>Enrolment period</td>
+                        <td>
+                                <input type="text" name="enrolmentperiod" value="<!-- TMPL_VAR NAME="enrolmentperiod" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Upperage limit</td>
+                        <td>
+                                <input type="text" name="upperagelimit" value="<!-- TMPL_VAR NAME="upperagelimit" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Age Required</td>
+                        <td>
+                                <input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME="dateofbirthrequired" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Fine type</td>
+                        <td>
+                                <input type="text" name="finetype" size="30" maxlength="30" value="<!-- TMPL_VAR NAME="finetype" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Bulk</td>
+                        <td>
+                                <input type="text" name="bulk" value="<!-- TMPL_VAR NAME="bulk" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Enrolment fee</td>
+                        <td>
+                                <input type="text" name="enrolmentfee" value="<!-- TMPL_VAR NAME="enrolmentfee" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Overdue notice required</td>
+                        <td>
+                                <input type="text" name="overduenoticerequired" value="<!-- TMPL_VAR NAME="overduenoticerequired" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Issue limit</td>
+                        <td>
+                                <input type="text" name="issuelimit" value="<!-- TMPL_VAR NAME="issuelimit" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Reserve fee</td>
+                        <td>
+                                <input type="text" name="reservefee" value="<!-- TMPL_VAR NAME="reservefee" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>&nbsp;</td>
+                        <td>
+                                <input type="button" value="OK" onclick="Check(this.form)" class="submit">
+                        </td>
+                </tr>
+        </table>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+        Data recorded
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="submit" value="OK" class="submit">
+        </form>
+<!-- /TMPL_IF -->
+
+        TOTAL : <!-- TMPL_VAR NAME="categorycode" --> : <!-- TMPL_VAR NAME="total" --><br />
+                    
+        <table>
+                <tr>
+                        <td>
+                                <b>Category code</b>
+                        </td>
+                        <td>
+                                <!-- TMPL_VAR NAME="categorycode" -->
+                        </td>
+                </tr>
+                <form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
+                        <input type="hidden" name="op" value="delete_confirmed">
+                        <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
+                <tr>
+                        <td>Description</td>
+                        <td><!-- TMPL_VAR NAME="description" --></td>
+                </tr>
+                <tr>
+                        <td>Enrolment period</td>
+                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
+                </tr>
+                <tr>
+                        <td>Upperage limit</td>
+                        <td><!-- TMPL_VAR NAME="upperagelimit" --></td>
+                </tr>
+                <tr>
+                        <td>Age Required</td>
+                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
+                </tr>
+                <tr>
+                        <td>Fine type</td>
+                        <td><!-- TMPL_VAR NAME="finetype" --></td>
+                </tr>
+                <tr>
+                        <td>Bulk</td>
+                        <td><!-- TMPL_VAR NAME="bulk" --></td>
+                </tr>
+                <tr>
+                        <td>Enrolment fee</td>
+                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
+                </tr>
+                <tr>
+                        <td>Overdue notice required</td>
+                        <td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
+                </tr>
+                <tr>
+                        <td>Issue limit</td>
+                        <td><!-- TMPL_VAR NAME="issuelimit" --></td>
+                </tr>
+                <tr>
+                        <td>Reserve fee</td>
+                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
+                </tr>
+                <!-- TMPL_IF NAME="totalgtzero" -->
+                <tr>
+                        <td colspan="2"><b>This record is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</b></td>
+                </tr>
+               <tr>
+                        <td colspan=2>
+                                </form><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                                <input type="submit" value="OK" class="submit">
+                                </form>
+                        </td>
+                </tr>
+                <!-- TMPL_ELSE -->
+                <tr>
+                        <td colspan="2">CONFIRM DELETION</td>
+                </tr>
+                <tr>
+                        <td><input type="submit" value="YES"></form></td>
+                        <td><form action="<!-- TMPL_VAR NAME=script_name -->" method="post"><input type="submit" value="NO" class="submit"></form></td>
+                </tr>
+                <!-- /TMPL_IF -->
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME=delete_confirmed -->
+        data deleted
+        <form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
+        <input type="submit" value="OK" class="submit">
+        </form>
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+        <h2>Category admin</h2>
+        <!-- TMPL_IF NAME="searchfield" -->
+                You Searched for <!-- TMPL_VAR NAME="searchfield" -->
+        <!-- /TMPL_IF -->
+
+        <form action="<TMP_VAR NAME="script_name">" method="post">
+                <input type="text" name="description" value="<!-- TMPL_VAR NAME=searchfield -->">
+                <input type="reset" name="reset" value="clr" class="submit">
+        </form>
+
+        <table>
+                <tr>
+                        <th>Category</th>
+                        <th>Description</th>
+                        <th>Enrolment</th>
+                        <th>Upper Age Limit</th>
+                        <th>Age Required</th>
+                        <th>Fine</th>
+                        <th>Bulk</th>
+                        <th>Fee</th>
+                        <th>Overdue</th>
+                        <th>Issue Limit</th>
+                        <th>Reserve</th>
+                        <th>&nbsp;</th>
+                        <th>&nbsp;</th>
+                </tr>
+                <!-- TMPL_LOOP NAME="loop" -->
+                <tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
+                        <td><!-- TMPL_VAR NAME="categorycode" --></td>
+                        <td><!-- TMPL_VAR NAME="description" --></td>
+                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
+                        <td><!-- TMPL_VAR NAME="upperagelimit" --></td>
+                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
+                        <td><!-- TMPL_VAR NAME="finetype" --></td>
+                        <td><!-- TMPL_VAR NAME="bulk" --></td>
+                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
+                        <td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
+                        <td><!-- TMPL_VAR NAME="issuelimit" --></td>
+                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
+                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Edit</a></td>
+                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Delete</a></t$                </tr>
+                <!-- /TMPL_LOOP -->
+
+        </table>
+        <p><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="hidden" name="op" value="add_form">
+                <input type="submit" class="button" value="Add Category"></a><br />
+        </form></p>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+
+
+
+

Index: koha-tmpl/intranet-tmpl/default/en/admin/categoryitem.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/categoryitem.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/categoryitem.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/categoryitem.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,299 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- <!-- TMPL_IF NAME="categorycode" -->Modify category<!-- TMPL_ELSE -->Add category<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+
+<!-- TMPL_IF NAME="add_form" -->
+        <script language="javascript" type="text/javascript">
+	function _(s) { return s } // dummy function for gettext
+        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+   return false;
+                }
+                return true;
+        }
+        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull==0 && v.value=='') {
+                return false;
+        }
+        return true;
+        }
+        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                        return false;
+                }
+        }
+        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.categorycode.value.length==0) {
+                        _alertString += "\n- " + _("categorycode missing");
+                }
+//              alert(window.document.Aform.description.value);
+                if (!(isNotNull(window.document.Aform.description,1))) {
+                        _alertString += "\n- " + _("falta descripcion");
+                }
+                if (!isNum(f.upperagelimit,0)) {
+                        _alertString += "\n- " + _("edad maxima no es un numero");
+                }
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2  = _("Form not submitted because of the following problem(s)");
+                        alertString2 += "\n------------------------------------------------------------------------------------\n";
+                        alertString2 += _alertString;
+                }
+        }
+        </script>
+
+        <!-- TMPL_IF NAME="categorycode" -->
+                <h1>Modify category</h1>
+        <!-- TMPL_ELSE -->
+                <h1>Agregar Categr&iacute;a</h1>
+        <!-- /TMPL_IF -->
+
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate">
+        <input type="hidden" name="checked" value="0">
+                        
+        <table>  
+        <!-- TMPL_IF NAME="categorycode" -->
+                <tr>
+                        <td>Codigo Categoria</td>
+                        <td>
+                                <input type="hidden" name="categorycode" value="<!-- TMPL_VAR NAME="categorycode" -->">
+                        </td>
+                </tr>
+        <!-- TMPL_ELSE -->
+                <tr>
+                        <td>Codigo Categoria</td>
+                        <td>
+                                <input type="text" name="categorycode" size="3" maxlength="2" onblur="toUC(this)">
+                        </td>
+                </tr>
+        <!-- /TMPL_IF -->
+                <tr>
+                        <td>Descripci&oacute;n</td>
+                        <td>
+                                <input type="text" name="description" size="40" maxlength="80" value="<!-- TMPL_VAR NAME="description" escape=HTML -->">
+                                &nbsp;
+                        </td>
+                </tr>
+                <tr>
+                        <td>Periodo de Enrolamiento</td>
+                        <td>
+                                <input type="text" name="enrolmentperiod" value="<!-- TMPL_VAR NAME="enrolmentperiod" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Limite maximo de edad</td>
+                        <td>
+                                <input type="text" name="upperagelimit" value="<!-- TMPL_VAR NAME="upperagelimit" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Edad Requerida</td>
+                        <td>
+                                <input type="text" name="dateofbirthrequired" value="<!-- TMPL_VAR NAME="dateofbirthrequired" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>tipo Credito</td>
+                        <td>
+                                <input type="text" name="finetype" size="30" maxlength="30" value="<!-- TMPL_VAR NAME="finetype" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Bulk</td>
+                        <td>
+                                <input type="text" name="bulk" value="<!-- TMPL_VAR NAME="bulk" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Monto Enrolamiento</td>
+                        <td>
+                                <input type="text" name="enrolmentfee" value="<!-- TMPL_VAR NAME="enrolmentfee" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Overdue notice required</td>
+                        <td>
+                                <input type="text" name="overduenoticerequired" value="<!-- TMPL_VAR NAME="overduenoticerequired" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>Reserve fee</td>
+                        <td>
+                                <input type="text" name="reservefee" value="<!-- TMPL_VAR NAME="reservefee" -->">
+                        </td>
+                </tr>
+                <tr>
+                        <td>&nbsp;</td>
+                        <td>
+                                <input type="button" value="Aceptar" onclick="Check(this.form)">
+                        </td>
+                </tr>
+        </table>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+        Informacion Almacenada
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="submit" value="Aceptar">
+        </form>
+<!-- /TMPL_IF -->
+
+        TOTAL : <!-- TMPL_VAR NAME="categorycode" --> : <!-- TMPL_VAR NAME="total" --><br>
+                    
+        <table border="0" cellspacing="0" cellpadding="5">
+                <tr bgcolor="#99cc33">
+                        <td background="/images/background-mem.gif">
+                                <b>Codigo Categoria</b>
+                        </td>
+                        <td background="/images/background-mem.gif">
+                                <!-- TMPL_VAR NAME="categorycode" -->
+                        </td>
+                </tr>
+                <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                        <input type="hidden" name="op" value="delete_confirmed">
+                        <input type="hidden" name="categorycode" value=<!-- TMPL_VAR NAME="categorycode" -->>
+                <tr>
+                        <td>Descripci&oacute;n</td>
+                        <td><!-- TMPL_VAR NAME="description" --></td>
+                </tr>
+                <tr>
+                        <td>Periodo de Enrolamiento</td>
+                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
+                </tr>
+                <tr>
+                        <td>Limite maximo de edad</td>
+                        <td><!-- TMPL_VAR NAME="upperagelimit" --></td>
+                </tr>
+                <tr>
+                        <td>Edad Requerida</td>
+                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
+                </tr>
+                <tr>
+                        <td>tipo Credito</td>
+                        <td><!-- TMPL_VAR NAME="finetype" --></td>
+                </tr>
+                <tr>
+                        <td>Bulk</td>
+                        <td><!-- TMPL_VAR NAME="bulk" --></td>
+                </tr>
+                <tr>
+                        <td>Monto Enrolamiento</td>
+                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
+                </tr>
+                <tr>
+                        <td>Overdue notice required</td>
+                        <td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
+                </tr>
+                <tr>
+                        <td>Reserve fee</td>
+                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
+                </tr>
+                <!-- TMPL_IF NAME="totalgtzero" -->
+                <tr>
+                        <td colspan="2" align="center"><b>This record is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</b></td>
+                </tr>
+               <tr>
+                        <td colspan="2">
+                                </form><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                                <input type="submit" value="Aceptar">
+                                </form>
+                        </td>
+                </tr>
+                <!-- TMPL_ELSE -->
+                <tr>
+                        <td colspan="2" align="center">CONFIRM DELETION</td>
+                </tr>
+                <tr>
+                        <td><input type="submit" value="SI"></form></td>
+                        <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="NO"></form></td>
+                </tr>
+                <!-- /TMPL_IF -->
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+        Informacion Eliminada
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="submit" value="Aceptar">
+        </form>
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+        <h2>Admin Categoria</h2>
+        <!-- TMPL_IF NAME="searchfield" -->
+                Usted ha buscado para <!-- TMPL_VAR NAME="searchfield" -->
+        <!-- /TMPL_IF -->
+
+        <form action="<!-- TMPL_VAR NAME="script_name">" method="post">
+                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->">
+                <input type="reset" name="reset" value="Limpiar">
+        </form>
+
+        <table border="0" cellspacing="0" cellpadding="5">
+                <tr bgcolor="#99cc33">
+                        <td background="/images/background-mem.gif"><b>Categoria</b></td>
+                        <td background="/images/background-mem.gif"><b>Descripci&oacute;n</b></td>
+                        <td background="/images/background-mem.gif"><b>Enrolamiento</b></td>
+                        <td background="/images/background-mem.gif"><b>Limite maximo de edad</b></td>
+                        <td background="/images/background-mem.gif"><b>Edad Requerida</b></td>
+                        <td background="/images/background-mem.gif"><b>Creditos</b></td>
+                        <td background="/images/background-mem.gif"><b>Bulk</b></td>
+                        <td background="/images/background-mem.gif"><b>Pagos Economicos</b></td>
+                        <td background="/images/background-mem.gif"><b>Overdue</b></td>
+                        <td background="/images/background-mem.gif"><b>Reserve</b></td>
+                        <td background="/images/background-mem.gif"> </td>
+                        <td background="/images/background-mem.gif"> </td>
+                </tr>
+                <!-- TMPL_LOOP NAME="loop" -->
+                <tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
+                        <td><!-- TMPL_VAR NAME="categorycode" --></td>
+                        <td><!-- TMPL_VAR NAME="description" --></td>
+                        <td><!-- TMPL_VAR NAME="enrolmentperiod" --></td>
+                        <td><!-- TMPL_VAR NAME="upperagelimit" --></td>
+                        <td><!-- TMPL_VAR NAME="dateofbirthrequired" --></td>
+                        <td><!-- TMPL_VAR NAME="finetype" --></td>
+                        <td><!-- TMPL_VAR NAME="bulk" --></td>
+                        <td><!-- TMPL_VAR NAME="enrolmentfee" --></td>
+                        <td><!-- TMPL_VAR NAME="overduenoticerequired" --></td>
+                        <td><!-- TMPL_VAR NAME="reservefee" --></td>
+                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=add_form&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Editar</a></td>
+                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;categorycode=<!-- TMPL_VAR NAME="categorycode" -->">Eliminar</a></td>
+		</tr>
+                <!-- /TMPL_LOOP -->
+
+        </table>
+        <p><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="hidden" name="op" value="add_form">
+                <input type="submit" class="button" value="Agregar Categr&iacute;a" alt="Agregar Categr&iacute;a"><br>
+        </form></p>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+
+
+
+

Index: koha-tmpl/intranet-tmpl/default/en/admin/charges.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/charges.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/charges.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/charges.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,33 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Fines
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h2>Calculating Fines</h2>
+<p>Each box needs to be filled in with fine,time to start charging,charging cycle</p>
+<p>eg 1,7,7 = $1 fine, after 7 days, every 7 days</p>
+<p>Note : fines are calculated by the <span class="ex">fines2.pl</span> script, located in <span class="ex">misc</span> directory. Ask your administrator to put this script in crontab (after midnight) to have fines calculated every night</p>
+<form action="/cgi-bin/koha/admin/updatecharges.pl" method="post">
+<div class="table"><table>
+<tr>
+	<th>&nbsp;</th><!-- TMPL_LOOP NAME="title" --><th><!-- TMPL_VAR NAME="in_title" --></th><!-- /TMPL_LOOP -->
+</tr>
+<!-- TMPL_LOOP NAME="row" -->
+	<tr>
+		<th>
+			<!-- TMPL_VAR NAME="categorycode" -->
+		</th>
+		<!-- TMPL_LOOP NAME="cell" -->
+			<td bgcolor="<!-- TMPL_VAR name="toggle" -->">
+				<input name="<!-- TMPL_VAR name="inputname" -->" value="<!-- TMPL_VAR name="inputvalue" -->" size="6" maxlength="10">
+			</td>
+		<!-- /TMPL_LOOP -->
+	</TR>
+<!-- /TMPL_LOOP -->
+</table></div>
+<input type="submit" class="submit" value="Submit Changes">
+</form>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/checkmarc.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/checkmarc.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/checkmarc.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/checkmarc.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,125 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: MARC Check: 
+<!-- TMPL_IF name="total" --><!-- TMPL_VAR name="total" --> errors found<!-- TMPL_ELSE -->Configuration OK!<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>MARC Checks</h1>
+<table>
+	<tr>
+		<th>Test</th>
+		<th>Result</th>
+	</tr>
+<!-- TMPL_IF name="biblionumber" -->
+	<tr>
+		<td> biblionumber</td>
+		<td>The biblio.biblionumber  and items.biblionumber fields MUST :
+			<ul><li>each be mapped to a MARC field/subfield,</li>
+			</ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>biblionumber  mapped correctly</td>
+	</tr>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF name="itemnumber" -->
+	<tr>
+		<td>itemnum</td>
+		<td><ul><li>The field itemnumber MUST be mapped </li>
+			<li>The corresponding fileld or subfield MUST be in tab 10 and may be hidden</li></ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>The field itemnumber is mapped to a  MARC field </td>
+	</tr>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="barcode" -->
+	<tr>
+		<td>itemnum</td>
+		<td><ul><li>The field barcodde MUST be mapped </li>
+			<li>The corresponding field or subfield MUST be in tab 10 and may be hidden</li></ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>The field barcode is mapped to a  MARC field </td>
+	</tr>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF name="isbn" -->
+	<tr>
+		<td>ISBN NOT mapped</td>
+		<td>isbn  MUST :<br />
+			<ul><li>be mapped to a MARC subfield,</li>
+		 </ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>ISBN defined</td>
+	</tr>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF name="itemtype" -->
+	<tr>
+		<td>itemtype NOT mapped</td>
+		<td>itemtype field MUST :<br />
+			<ul><li>be mapped to a MARC subfield, </li>
+			<li>the correspounding subfield MUST have authorised_value=itemtype</li></ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>itemtype mapped</td>
+	</tr>
+<!-- /TMPL_IF -->
+<!-- -->
+<!-- TMPL_IF name="branch" -->
+	<tr>
+		<td>homebranch NOT mapped</td>
+		<td>homebranch  MUST :<br />
+			<ul><li>be mapped to a MARC subfield,</li>
+		 </ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>homebranch defined</td>
+	</tr>
+<!-- /TMPL_IF -->
+<!-- -->
+<!-- TMPL_IF name="holdingbranch" -->
+	<tr>
+		<td>holdingbranch NOT mapped</td>
+		<td>the holdingbranch  MUST :<br />
+			<ul><li>be mapped to a MARC subfield, </li>
+			<li>the correspounding subfield MUST have authorised value=branches</li></ul></td>
+	</tr>
+<!-- TMPL_ELSE -->
+	<tr>
+		<td>OK</td>
+		<td>holdingbranch defined</td>
+	</tr>
+<!-- /TMPL_IF -->
+<!-- -->
+
+<!-- -->
+<!-- TMPL_IF name="total" -->
+	<tr>
+		<td>TOTAL</td>
+		<td>You have <!-- TMPL_VAR name="total" --> error(s) in your MARC configuration. Please fix them before using Koha</td>
+	</tr>
+</table>
+<!-- TMPL_ELSE -->
+	</table>
+		<p>Configuration OK, you don't have errors in your MARC parameters </p>
+<!-- /TMPL_IF -->
+
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/currency.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/currency.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/currency.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/currency.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,194 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify currency '<!-- TMPL NAME="searchfield" -->'<!-- TMPL_ELSE -->Add currency<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_validate" -->Data Recorded<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Currency '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirmed" -->Currency Deleted<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="else" -->Currencies<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF NAME=add_form -->
+        <script>
+        //
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+   return false;
+                }
+                return true;
+        }
+        //
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        //
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull=="0" && v.value=="") {
+                return false;
+        }
+        return true;
+        }
+        //
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                        return false;
+                }
+        }
+        //
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.currency.value.length==0) {
+                        _alertString += "- Currency name missing\\n";
+                }
+                if (f.rate.value.length==0) {
+                        _alertString += "- Rate missing\\n";
+                }
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2 = "Form not submitted because of the following problem(s)\\n";
+                        alertString2 += "------------------------------------------------------------------------------------\\n\\n";
+                        alertString2 += _alertString;
+                        alert(alertString2);
+                }
+        }
+        </SCRIPT>
+
+        <form action="<!-- TMPL_VAR NAME=script_name -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate" />
+
+<div class="data">	<table>
+	<caption><!-- TMPL_IF NAME=searchfield -->
+		Modify currency
+	<!-- TMPL_ELSE -->
+		Add currency
+	<!-- /TMPL_IF --></caption>
+	<!-- TMPL_IF NAME="searchfield" -->
+		<tr>
+			<th>Currency</th>
+			<td>
+				<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
+			</td>
+		</tr>
+	<!-- TMPL_ELSE -->
+		<tr>
+			<th>Currency</th>
+			<td>
+				<input type="text" name="currency" size="50" maxlength="50" onblur="toUC(this);" />
+			</td>
+		</tr>
+	<!-- /TMPL_IF -->
+
+        	<tr>
+			<th>Rate</th	>
+			<td>
+				<input type="text" name="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
+			</td>
+		</tr>
+        </table></div>
+		
+		<input type="button" value="Update" onClick="Check(this.form)" class="submit" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" />
+        </form>
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+<h3>Data Recorded</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="OK" class="submit" />
+        </form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<div class="table details">	<table><caption>Confirm Deletion of Currency <em><!-- TMPL_VAR NAME="searchfield" --></em></caption>
+
+		<tr>
+			<th>Currency</th>
+			<td><!-- TMPL_VAR NAME="searchfield" --></td>
+		</tr>
+
+
+        
+        	<tr>
+			<th>Rate</th>
+			<td><!-- TMPL_VAR NAME="rate" --></td>
+		</tr>
+		</table></div>
+		<!-- TMPL_IF NAME="totalgtzero" -->
+
+				<span class="alert">This currency is used <!-- TMPL_VAR NAME="total" --> times. Deletion not possible</span>
+				<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+					<input type="submit" value="OK" class="submit" />
+				</form>
+		<!-- TMPL_ELSE -->
+<div class="tabitem">     	<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
+			<input type="hidden" name="op" value="delete_confirmed" />
+			<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+				<input type="submit" value="Delete this Currency" class="cancel" />
+				</form>
+				<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+					<input type="submit" value="Do Not Delete" class="submit" />
+				</form></div>
+		<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<h3>Currency Deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="submit" value="OK" class="submit" />
+	</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+
+<h2>Currencies Management</h2>
+	<!-- TMPL_IF NAME="searchfield" -->
+		You searched for <span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span>
+	<!-- /TMPL_IF -->	
+        <form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
+                <input type="text" name="description" value="<!-- TMPL_VAR NAME=searchfield -->" />
+                <input type="submit" name="Search" value="Search" class="submit" />
+        </form>	
+	<div class="table"><table>
+		<tr>
+			<th>Currency</th>
+			<th>Rate</th>
+			<th colspan="2">&nbsp;</th>
+		</tr>
+		<!-- TMPL_LOOP NAME="loop" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="currency" --></td>
+			<td><!-- TMPL_VAR NAME="rate" --></td>
+			<td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
+                        <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" value="Delete" class="delete" /></form></td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	</table></div>
+<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
+        <input type="hidden" name="op" value="add_form" /><input type="submit" class="submit" value="Add Currency" />
+        </form>
+
+	
+	<!-- TMPL_IF NAME="offsetgtzero" -->
+		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
+	<!-- /TMPL_IF -->
+
+
+	<!-- TMPL_IF NAME="ltcount" -->
+		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>	
+	<!-- /TMPL_iF -->
+
+<!-- /TMPL_IF --></div>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/holdings_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/holdings_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/holdings_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/holdings_subfields_structure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,134 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+
+	<h1><!-- TMPL_IF NAME="use-heading-flags-p" -->
+	<!-- TMPL_IF NAME="heading-edit-subfields-p" -->Edit MARC subfields constraints<!-- /TMPL_IF -->
+	<!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></h1>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+	<input type="hidden" name="op" value="add_validate" />
+	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+	<!-- TMPL_LOOP NAME="loop" -->
+	<div class="data <!-- TMPL_VAR NAME="toggle" -->"><h2>Tag <!-- TMPL_VAR NAME="tagfield" -->, Subfield <!-- TMPL_VAR NAME="tagsubfield" --></h2>
+	<table>
+	<caption>MARC constraints</caption>
+	<tr><th><label for="repeatable<!-- TMPL_VAR NAME="row" -->">Repeatable:</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
+	<tr><th><label for="mandatory<!-- TMPL_VAR NAME="row" -->">Mandatory:</label></th><td><!-- TMPL_VAR NAME="mandatory" --> </td></tr>
+	<tr><th><label for="seealso<!-- TMPL_VAR NAME="row" -->">Search also:</label></th><td><input type="text" id="seealso<!-- TMPL_VAR NAME="row" -->" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size="20" /> (example for 200a: '200c','200d','200e'...)</td></tr>
+			</table>
+	<table>
+	<caption>Editor constaints</caption>
+	<tr><th><label for="liblibrarian<!-- TMPL_VAR NAME="row" -->">Text for librarian:</label></th><td><input id="liblibrarian<!-- TMPL_VAR NAME="row" -->" type="text" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="libopac<!-- TMPL_VAR NAME="row" -->">Text for OPAC:</label></th><td><input type="text" id="libopac<!-- TMPL_VAR NAME="row" -->" name="libopac" value="<!-- TMPL_VAR NAME="libopac" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="tab<!-- TMPL_VAR NAME="row" -->">Managed in tab:</label></th><td><!-- TMPL_VAR NAME="tab" --> (ignore means that the subfield is NOT managed by Koha)</td></tr>
+
+	<tr><th><label for="hidden<!-- TMPL_VAR NAME="row" -->">Hidden:</label></th><td> Opac:<!-- TMPL_VAR name="ohidden" -->  Intranet:<!-- TMPL_VAR name="ihidden" --> Editor:<!-- TMPL_VAR name="ehidden" --> (see online help)</td></tr>
+
+	<tr><th><label for="isurl<!-- TMPL_VAR NAME="row" -->">Is a URL: </label></th><td><!-- TMPL_VAR NAME="isurl" --> (if checked, it means that the subfield is an URL and can be clicked</td></tr>
+<tr><th><label>Default Options: <p>(choose one)</p></label></th><td>
+<ul>
+	<li>Authorized Value: <!-- TMPL_VAR NAME="authorised_value" --></li>
+	<li>Thesaurus: <!-- TMPL_VAR NAME="authtypes" --></li>
+	<li>Plugin: <!-- TMPL_VAR NAME="value_builder" --></li>
+	<li>Link: <input type="text" name="link" value="<!-- TMPL_VAR NAME="link" -->" size="10" maxlength="5" /> (exemple:200b)</li>
+</ul>
+</td></tr>	 
+		</table>
+		</div>
+	<!-- /TMPL_LOOP -->
+	<input type="submit" class="submit" value="Save Changes" />
+	<p>Note: in the last column, you can choose:
+	<ul><li>An "authorised value": it refers to a list of authorised values for this subfield. See the corresponding admin table.</li>
+	<li>A "thesaurus category": it refers to a thesaurus category. See the corresponding admin table.</li>
+	<li>A "value builder": values builders are perl programs that help you select the value of the field. They are MARC-flavor dependant and sometimes fill another subfield automatically.</li>
+	</ul>
+	</p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+
+<div class="data"><table>
+<caption>Confirm Deletion of Subfield <span class="ex"><!-- TMPL_VAR NAME="tagsubfield" -->?</span></caption>
+	<tr>
+		<th>Subfield</th>
+		<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
+	</tr>
+	<tr><th>Description</th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
+</table></div>
+			<form class="inline" action="<!-- TMPL_VAR NAME="delete_link" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" />
+				<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+				<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="cancel" value="Yes, Delete this Subfield" />
+			</form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">	<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />	<input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->" />	<input type="hidden" name="tagsubfield" value="<!-- TMPL_VAR NAME="tagsubfield" -->" />	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="submit" value="No, Do Not Delete" />
+			</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+
+	Data deleted
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="tagfield" -->">
+	<input type="submit" class="submit" value="OK" />
+	</form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="else" -->
+<h1>Holdings MARC subfield structure admin for <!-- TMPL_VAR NAME="tagfield" --> (framework <!--TMPL_VAR NAME="frameworkcode" -->)</h1>
+<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
+
+<table>
+<tr>
+	<th>Subfield</th>
+	<th>Text</th>
+	<th>Constraints</th>
+	<th>Delete</th>
+<!-- TMPL_LOOP NAME="loop" -->
+<!-- TMPL_IF NAME="toggle" --><tr class="highlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+	<td><!-- TMPL_VAR NAME="tagsubfield" --></td>
+	<td>
+		<!-- TMPL_IF NAME="subfield_ignored" -->
+			<i><!-- TMPL_VAR NAME="liblibrarian" --></i>
+		<!-- TMPL_ELSE -->
+			<!-- TMPL_VAR NAME="liblibrarian" -->
+		<!-- /TMPL_IF -->
+	</td>
+	<td>
+		<!-- TMPL_IF NAME="subfield_ignored" -->
+			<i>subfield ignored</i>
+		<!-- TMPL_ELSE -->
+			<strong>Tab:</strong><!-- TMPL_VAR NAME="tab" -->,
+			<!-- TMPL_IF NAME="repeatable" -->Repeatable, <!-- TMPL_ELSE -->Not repeatable,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="mandatory" -->Mandatory, <!-- TMPL_ELSE -->Not mandatory,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="seealso" --> | <strong>See Also:</strong> <!-- TMPL_VAR NAME="seealso" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="hidden" -->hidden,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="isurl" -->is an url,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="authorised_value" --> | <strong>Auth value:</strong><!-- TMPL_VAR NAME="authorised_value" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="authtypecode" --> | <strong>Authority:</strong><!-- TMPL_VAR NAME="authtypecode" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="value_builder" --> | <strong>Plugin:</strong><!-- TMPL_VAR NAME="value_builder" -->,<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="link" --> | <strong>Link:</strong><!-- TMPL_VAR NAME="link" -->,<!-- /TMPL_IF -->
+		<!-- /TMPL_IF -->
+	</td>
+	<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
+</tr>
+<!-- /TMPL_LOOP -->
+</table>
+<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="tagfield" value="<!-- TMPL_VAR NAME="edit_tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="edit_frameworkcode" -->" /><input type="submit" class="submit" value="Edit Subfields" /></form> <form class="inline" action="holdingstagstructure.pl" method="get"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="tagfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><input type="submit" class="submit" value="Return to Marc Structure" /></form>
+<!-- TMPL_IF NAME="previous" -->
+	<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1leftarrow.png" title="previous" alt="previous" border="0" >
+	</a><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="next" -->
+	<!-- TMPL_VAR NAME="next" -->
+		<input type="image" src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/1rightarrow.png" title="next" alt="next" border="0" />
+	</a>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/holdingstagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/holdingstagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/holdingstagstructure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/holdingstagstructure.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,208 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Tag '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>Holdings MARC tag structure admin for <!-- TMPL_IF NAME="frameworkcode" --><!-- TMPL_VAR NAME="frameworktext" --> (<!-- TMPL_VAR NAME="frameworkcode" -->)<!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
+<script language="javascript" type="text/javascript">
+	function _(s) { return s } // dummy function for gettext
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNotNull(f,noalert) {
+		if (f.value.length ==0) {
+   return false;
+		}
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function toUC(f) {
+		var x=f.value.toUpperCase();
+		f.value=x;
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNum(v,maybenull) {
+	var n = new Number(v.value);
+	if (isNaN(n)) {
+		return false;
+		}
+	if (maybenull==0 && v.value=='') {
+		return false;
+	}
+	return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isDate(f) {
+		var t = Date.parse(f.value);
+		if (isNaN(t)) {
+			return false;
+		}
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function Check(f) {
+		var ok=1;
+		var _alertString="";
+		var alertString2;
+		if (f.tagfield.value.length==0) {
+			_alertString += "\n- " + _("tag number missing");
+		}
+		if (_alertString.length==0) {
+			document.Aform.submit();
+		} else {
+			alertString2  = _("Form not submitted because of the following problem(s)");
+			alertString2 += "\n------------------------------------------------------------------------------------\n";
+			alertString2 += _alertString;
+			alert(alertString2);
+		}
+	}
+	</script>
+
+<!-- TMPL_IF NAME="add_form" -->
+<!-- ------------------------------------------------------------------------ -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+	<div class="data"><table>
+		<caption><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></caption>
+	<tr><th><label>Tag<label></th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
+	<tr><th><label for="liblibrarian">Tag Label in Intranet</label></th><td><input type="text" id="liblibrarian" name="liblibrarian" value="<!-- TMPL_VAR NAME="liblibrarian" escape="HTML" -->" size="80" maxlength="100" /></td></tr>
+	<tr><th><label for="libopac">Tag Label in OPAC</label></th><td><input type="text" id="libopac" name="libopac" value="<!-- TMPL_VAR NAME="libopac" escape=HTML -->" size="80" maxlength="100" /></td></tr>
+	<tr><th><label for="repeatable">Repeatable</label></th><td><!-- TMPL_VAR NAME="repeatable" --></td></tr>
+	<tr><th><label for="mandatory">Mandatory</label></th><td><!-- TMPL_VAR NAME="mandatory" --></td></tr>
+	<tr><th><label for="authorised_value">Authorized value</label></th><td><!-- TMPL_VAR NAME="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</td></tr>
+	</table></div>
+		<p><input type="submit" value="Save Changes" class="submit" onclick="Check(this.form)" /></p>
+	<p><input type="submit" value="Cancel and Return to MARC Tag Structure" class="cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->?frameworkcode=<!-- TMPL_VAR NAME="frameworkcode" -->'; return false;" /></p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<!-- ------------------------------------------------------------------------ -->
+<div class="data"><table>
+<caption>Confirm Deletion of Tag <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
+	<tr><th>Tag: </th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
+	<tr><th>Description: </th><td><!-- TMPL_VAR NAME="liblibrarian" --></td></tr>
+	</table></div>
+	<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />	<input type="submit" class="cancel" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do Not Delete" /></form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<!-- ------------------------------------------------------------------------ -->
+	<div class="details"><h3>Tag Deleted</h3>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+	<input type="submit" class="submit" value="Return to MARC Tag Structure" />
+	</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="framework_create" -->
+<!-- ------------------------------------------------------------------------ -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="framework_create_confirm" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+		Create framework for <!-- TMPL_VAR NAME="frameworkcode" --> (<!-- TMPL_VAR NAME="frameworktext" -->) using
+		<select name="existingframeworkcode">
+			<option value="">Default</option>
+		<!-- TMPL_LOOP NAME="existingframeworkloop" -->
+			<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
+		<!-- /TMPL_LOOP -->
+		</select>
+		<input type="submit" value="OK" class="submit" />
+	</form>
+<!-- /TMPL_IF -->
+<!-- ------------------------------------------------------------------------ -->
+<!-- TMPL_IF NAME="else" -->
+	<form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><label for="frameworkcode">Select a framework: </label>
+		<select name="frameworkcode" id="frameworkcode">
+			<option value="">Default</option>
+		<!-- TMPL_LOOP NAME="frameworkloop" -->
+			<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="frameworktext" --></option>
+		<!-- /TMPL_LOOP -->
+		</select>
+		<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" size="5" />
+		<input type="submit" value="Tag Search" class="submit" />
+		<p><!-- TMPL_IF Name="select_display"-->
+				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display" id="onlyused" value="True" checked="checked" onchange="document.f.submit()" />
+			<!-- TMPL_ELSE -->
+				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display"  id="onlyused" value="True" onchange="document.f.submit()" />
+			<!--/TMPL_IF --> 
+		</p>
+	</form>
+	<div class="help">NOTE : Framework consists of 2 parts biblio & holdings. This is for HOLDINGS definition.</div>
+
+	<div class="data">
+	<table>
+		<tr>
+			<th scope="col">Tag</th>
+			<th scope="col">Label</th>
+			<th scope="col">Repeatable</th>
+			<th scope="col">Mandatory</th>
+			<th scope="col">Authorized value</th>
+			<th scope="col">Subfields</th>
+			<th scope="col">&nbsp;</th>
+		</tr>
+	<!-- TMPL_IF NAME="select_display" -->
+		<!-- TMPL_LOOP NAME="loop" -->
+		<tr class="highlight">
+			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
+			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
+			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
+			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">Edit Subfields</a></td>
+			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
+		</tr>
+		<tr>
+			<td>
+				&nbsp;
+			</td>
+			<td colspan="6">
+				<ul>
+				<!-- TMPL_LOOP NAME="subfields" -->
+					<li>Tab:<!-- TMPL_VAR NAME="tab" --> | $<!-- TMPL_VAR NAME="tagsubfield" -->
+							<!-- TMPL_VAR NAME="liblibrarian" --> <!-- TMPL_IF NAME="kohafield" --><!-- TMPL_VAR NAME="kohafield" --><!--/TMPL_IF --><!-- TMPL_IF NAME="repeatable" -->, repeatable<!-- /TMPL_IF --><!-- TMPL_IF NAME="mandatory" -->, Mandatory<!-- /TMPL_IF --><!-- TMPL_IF NAME="seealso" -->, See <!-- TMPL_VAR name="seealso" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authorised_value" -->, <!-- TMPL_VAR NAME="authorised_value" --><!--/TMPL_IF --><!-- TMPL_IF NAME="authtypecode" -->, <!-- TMPL_VAR NAME="authtypecode" --><!--/TMPL_IF --><!-- TMPL_IF NAME="value_builder" -->, <!-- TMPL_VAR NAME="value_builder" --><!--/TMPL_IF -->
+					</li>
+				<!-- /TMPL_LOOP -->
+				</ul>
+			</td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	<!-- TMPL_ELSE -->
+		<!-- TMPL_LOOP NAME="loop" -->
+		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+			<td><b><!-- TMPL_VAR NAME="tagfield" --></b></td>
+			<td><!-- TMPL_VAR NAME="liblibrarian" --></td>
+			<td><!-- TMPL_IF NAME="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="authorised_value" --></td>
+			<td><a href="<!-- TMPL_VAR NAME="subfield_link" -->">View Subfields</a></td>
+			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	<!--/TMPL_IF -->
+	</table>
+	<div class="tabitem">
+		<!-- TMPL_IF NAME="isprevpage" -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+		<input type="hidden" value="<!-- TMPL_VAR NAME="prevpage" -->" name="offset" /><input type="hidden" value="<!-- TMPL_VAR NAME="searchfield" -->" name="searchfield" /><input type="hidden" value="<!-- TMPL_VAR NAME="frameworkcode" -->" name="frameworkcode" /><!--TMPL_IF Name="select_display"--><input type="hidden" value="select_display" name="True" /><!--/TMPL_IF --><input type="submit" value="&lt;&lt; Previous Page" class="submit" /></form>
+		<!-- /TMPL_IF -->	
+		
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="add_form" />
+	<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+		<input type="submit" value="Add New MARC Tag" class="submit" /></form>
+		
+		<!-- TMPL_IF NAME="nextpage" -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" /><!--TMPL_IF Name="select_display"--><input type="hidden" name="select_display" value="True" /><!--/TMPL_IF --><input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
+		<!-- /TMPL_IF -->
+</div>
+</div>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/issuingrules.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/issuingrules.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/issuingrules.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/issuingrules.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,62 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Issuing Rules<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<h1>Defining <!-- TMPL_IF NAME="branch" -->issuing rules for <!-- TMPL_VAR NAME="branch" --><!-- TMPL_ELSE -->default issuing rules<!-- /TMPL_IF --></h1>
+	<div class="help">
+		<h3>HINT for issues</h3>
+		<p>Each box needs to be filled in with issuelength,maxissues</p>
+		<p>eq <span class="ex">21,5</span> enables 5 issues for 21 days</p>
+		</div>
+	<div class="help">
+		<h3>HINT for fines</h3>
+		<p>Each box needs to be filled in with fine,time to start charging,charging cycle</p>
+		<p>eg <span class="ex">1,7,7</span> = 1 [USD,EUR,etc] fine after 7 days, every 7 days</p>
+		<p>Fines are calculated by the fines2.pl script, located in misc directory.  Ask your administrator to put this script in crontab, after midnight, to have fines calculated every night</p>
+	</div>
+	<div class="help">
+		<h3>Default values</h3>
+		<p> If a cell is not filled, the 1st of the following value is searched :</p>
+		<ul>
+			<li>same branch and same borrower category, itemtype *</li>
+			<li>same branch and same itemtype, borrower category *</li>
+			<li>same itemtype and borrower category, branch *</li>
+			<li>everywhere</li>
+			<li>If nothing is set, default is 21,5 (hardcoded)</li>
+		</ul>
+	</div>
+		<form method="post" name="branch" action="/cgi-bin/koha/admin/issuingrules.pl">
+		<label for="branch">Select a branch :</label>
+			<select id="branch" name="branch" onchange="javascript:document.branch.submit();">
+				<option value="">Default</option>
+			<!-- TMPL_LOOP NAME="branchloop" -->
+				<option value="<!-- TMPL_VAR NAME="value" -->"<!-- TMPL_IF NAME="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select>
+			<input type="submit" value="Select" class="submit" />
+		</form>
+		<form method="post" action="/cgi-bin/koha/admin/issuingrules.pl">
+			<input type="hidden" name="op" value="save" />
+			<div class="data">
+			<table>
+			<caption>Defining issuing rules for <!-- TMPL_VAR NAME="branch" --></caption>
+			<tr>
+				<th>&nbsp;</th><!-- TMPL_LOOP NAME="title" --><th scope="col"><!-- TMPL_VAR NAME="in_title" --><br/>Issue / fine</th><!-- /TMPL_LOOP -->
+			</tr>
+			<!-- TMPL_LOOP NAME="row" -->
+				<tr>
+					<th><!-- TMPL_VAR NAME="categorycode" --></th>
+					<!-- TMPL_LOOP NAME="cell" -->
+						<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+							<input name="<!-- TMPL_VAR NAME="issuingname" -->" value="<!-- TMPL_VAR NAME="issuingvalue" -->" size="6" maxlength="10" /> /
+							<input name="<!-- TMPL_VAR NAME="finesname" -->" value="<!-- TMPL_VAR NAME="finesvalue" -->" size="6" maxlength="10" />
+						</td>
+					<!-- /TMPL_LOOP -->
+				</tr>
+			<!-- /TMPL_LOOP -->
+			</table>
+			</div>
+			<input type="submit" value="Save Changes" class="submit" />
+		</form>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/itemtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/itemtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/itemtypes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/itemtypes.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,172 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_IF name="itemtype" -->Modify item type '<!-- TMPL_VAR name="itemtype" -->'<!-- TMPL_ELSE -->Add item type<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" --><!-- TMPL_IF name="total" -->Cannot Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'<!-- TMPL_ELSE -->Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" -->Item Types Administration<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF name="add_form" -->
+
+	<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="checked" value="0" />
+		<div class="data">
+		<table>
+		<caption><!-- TMPL_IF name="itemtype" -->
+		Modify item type
+	<!-- TMPL_ELSE -->
+		Add item type
+	<!-- /TMPL_IF --></caption>
+			<!-- TMPL_IF name="itemtype" -->
+				<tr><th><label for="">Item type</label></th><td><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" /><!-- TMPL_VAR name="itemtype" --></td></tr>
+			<!-- TMPL_ELSE -->
+				<tr><th><label for="">Item type</label></th><td><input type="text" name="itemtype" size="6" maxlength="4" onblur="toUC(this)" /></td></tr>
+			<!-- /TMPL_IF -->
+			<tr>
+				<th><label for="description">Description</label></th>
+				<td><input type="text" id="description" name="description" size="48" maxlength="80" value="<!-- TMPL_VAR name="description" escape="HTML" -->" />&nbsp;</td>
+			</tr>
+			<tr>
+				<th><label for="notforloan">Not for loan</label></th>
+				<td><input type="checkbox" id="notforloan" name="notforloan"<!-- TMPL_IF name="notforloan" --> checked="checked"<!-- /TMPL_IF --> value="1"> (if checked, no item of this type can be issued. If not checked, every item of this type can be issued unless notforloan is set for a specific item)</td>
+			</tr>
+			<tr>
+			<tr>
+				<th><label for="renewalsallowed">Renewals</label></th>
+				<td><input type="text" id="renewalsallowed" name="renewalsallowed" size="3" maxlength="3" value="<!-- TMPL_IF name="renewalsallowed" --><!-- TMPL_VAR NAME="renewalsallowed" --><!-- /TMPL_IF -->" value="1" /><!-- Display for NPL //<input type="hidden" name="rentalcharge" value="0" /> //Display for NPL --></td>
+			</tr>
+<!-- Hide from NPL--> 			<tr>
+				<th><label for="rentalcharge">Rental charge</label></th>
+				<td><input type="text" id="rentalcharge" name="rentalcharge" size="10" value="<!-- TMPL_VAR name="rentalcharge" -->" /></td>
+			</tr><!--  /Hide from NPL -->
+		</table><input type="button" value="Save Changes" onclick="Check(this.form)" class="submit" /> <input type="button" class="cancel" value="Cancel" onclick="history.back();" />
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="delete_confirm" -->
+<!-- TMPL_IF name="total" --><div class="error">This record is used <!-- TMPL_VAR name="total" --> times. Deletion is not possible.</div><!-- /TMPL_IF -->
+<div class="table details">	<table>
+	<caption><!-- TMPL_IF name="total" -->Cannot Delete Item Type<!-- TMPL_ELSE -->Delete Item Type '<!-- TMPL_VAR name="itemtype" -->'?<!-- /TMPL_IF --></caption>
+		<tr>
+			<th>Item type</th>
+			<td><!-- TMPL_VAR name="itemtype" --></td>
+		</tr>
+
+	<tr><th>Description</th><td><!-- TMPL_VAR name="description" --></td></tr>
+	<tr><th>Loan length</th><td><!-- TMPL_VAR name="loanlength" --></td></tr>
+	<tr><th>Renewals</th><td><!-- TMPL_IF name="renewalsallowed" -->Allowed<!-- TMPL_ELSE -->Not allowed<!-- /TMPL_IF --></td></tr>
+<!-- Hide from NPL  --><tr><th>Rental charge</th><td><!-- TMPL_VAR name="rentalcharge" --></td></tr><!-- Hide from NPL --></table></div>
+		<div class="tabitem"><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+		<input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->" /><!-- TMPL_IF name="total" -->
+		</form><form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="OK" class="submit" /></form>
+	<!-- TMPL_ELSE -->
+		<input type="submit" value="Delete this Item Type" class="cancel" /></form> <form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="Do Not Delete" class="submit" /></form>
+	<!-- /TMPL_IF --></div>
+
+	
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="else" -->
+<table>
+<caption>Item Types Administration</caption>
+	<tr>
+		<th>Code</th>
+		<th>Description</th>
+		<th>Not for Loan</th>
+		<th>Renewable</th>
+		<th>Charge</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	</tr>
+	<!-- TMPL_LOOP name="loop" -->
+		<!-- TMPL_IF NAME="toggle" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
+			<td><a href="<!-- TMPL_VAR name="script_name" -->?op=add_form&amp;itemtype=<!-- TMPL_VAR name="itemtype" escape="HTML" -->"><!-- TMPL_VAR name="itemtype" --></a></td>
+			<td><!-- TMPL_VAR name="description" --></td>
+			<td><!-- TMPL_IF NAME="notforloan" -->Yes<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="renewalsallowed" -->
+						<!-- TMPL_VAR name="renewalsallowed" --> time(s)
+					<!-- TMPL_ELSE -->
+						No
+					<!-- /TMPL_IF -->
+			</td>
+		<td><!-- TMPL_UNLESS name="notforloan" --><!-- TMPL_VAR NAME="rentalcharge" --><!-- /TMPL_UNLESS --></td>
+			<td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" escape="HTML" -->" /><input type="submit" value="Edit" class="submit" /></form></td>
+			<td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" escape="HTML" -->" /><input type="submit" class="delete" value="Delete" /></form></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+
+<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+<p><input type="hidden" name="op" value="add_form" />
+
+<!-- TMPL_IF name="previous" --><input type="button" class="submit" onclick="location.href='<!-- TMPL_VAR name="previous" -->'; return false;" value="&lt;&lt; Previous Page" /><!-- /TMPL_IF -->
+
+<input type="submit" value="Add Item Type" class="submit" />
+
+<!-- TMPL_IF name="next" --><input type="button" class="submit" onclick="location.href='<!-- TMPL_VAR name="next" -->'; return false;" value="Next Page &gt;&gt;" /><!-- /TMPL_IF -->
+</p></form>
+<!-- /TMPL_IF -->
+
+</div>
+<script language="javascript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+
+function isNotNull(f,noalert) {
+	if (f.value.length ==0) {
+		return false;
+	}
+	return true;
+}
+
+function toUC(f) {
+	var x=f.value.toUpperCase();
+	f.value=x;
+	return true;
+}
+
+function isNum(v,maybenull) {
+var n = new Number(v.value);
+if (isNaN(n)) {
+	return false;
+	}
+if (maybenull==0 && v.value=='') {
+	return false;
+}
+return true;
+}
+
+function isDate(f) {
+	var t = Date.parse(f.value);
+	if (isNaN(t)) {
+		return false;
+	}
+}
+
+function Check(f) {
+	var ok=1;
+	var _alertString="";
+	var alertString2;
+	if (f.itemtype.value.length==0) {
+		_alertString += "\n- " + _("Itemtype missing");
+	}
+	if (!(isNotNull(window.document.Aform.description,1))) {
+		_alertString += "\n- " + _("Description missing");
+	}
+	if ((!isNum(f.rentalcharge,0)) && f.rentalcharge.value.length > 0) {
+		_alertString += "\n- " + _("Rental charge is not a number");
+	}
+	if (_alertString.length==0) {
+		document.Aform.submit();
+	} else {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += _alertString;
+		alert(alertString2);
+	}
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/koha-electronic.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/koha-electronic.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/koha-electronic.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/koha-electronic.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,113 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+<div id="main">
+	<h1> OPAC Online Databases</h1>
+	<!-- TMPL_IF name="add_form" -->
+
+		<form name="add_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl" >
+			<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
+			<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->">
+			<table style="border:0" cellspacing="0" cellpadding="2">
+			    <tr>
+			        <td>Language
+			       
+						<select name="lang">
+			    			<option value="tr" <!-- TMPL_IF name="tr" -->selected<!-- /TMPL_IF --> > Türkçe</option>
+			    			<option value="en" <!-- TMPL_IF name="en" -->selected<!-- /TMPL_IF -->>English</option>
+						</select>
+					</td><td></td>
+					<td>Section
+						<select name="section">
+						<option value="affiliated" <!-- TMPL_IF name="affiliated" -->selected<!-- /TMPL_IF --> >Affiliated</option>
+			    			<option value="trial" <!-- TMPL_IF name="trial" -->selected<!-- /TMPL_IF --> >Trial</option>
+			    			<option value="economy" <!-- TMPL_IF name="economy" -->selected<!-- /TMPL_IF --> >Economy & Politics</option>
+			    			<option value="social" <!-- TMPL_IF name="social" -->selected<!-- /TMPL_IF -->>Social Sciences</option>
+						<option value="computer" <!-- TMPL_IF name="computer" -->selected<!-- /TMPL_IF --> >Computer Sciences</option>
+			    			<option value="health" <!-- TMPL_IF name="health" -->selected<!-- /TMPL_IF -->>Health & Medicine</option>
+						<option value="general" <!-- TMPL_IF name="general" -->selected<!-- /TMPL_IF --> > Interdiciplinary</option>
+			    			<option value="maths" <!-- TMPL_IF name="maths" -->selected<!-- /TMPL_IF -->>Maths,Physics,Chemistry</option>
+						<option value="other" <!-- TMPL_IF name="other" -->selected<!-- /TMPL_IF --> > Other Subjects</option>
+			    			</select>
+					</td>
+			    </tr>
+				<tr>
+					<td>Title:
+					<input size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->"></td>
+					<td>URL:
+					<input size="30" type="text" name="href" value="<!-- TMPL_VAR NAME="href" -->"></td>
+					<td>Resim:
+					<input size="20" type="text" name="image" value="<!-- TMPL_VAR NAME="image" -->"></td>
+				</tr>
+				<tr>
+					<td>Text</td>
+					<td><textarea name="edata" cols="35" rows="4"><!-- TMPL_VAR NAME="edata" --></textarea></td>
+				</tr>
+				<tr>
+					<td  colspan="2">
+						<input class="button" type="submit" value="Save">
+						<input class="button" type="button" value="Cancel" onclick="window.location.href='/cgi-bin/koha/admin/koha-electronic.pl'">
+					</td>
+				</tr>
+			</table>
+		</form>
+
+
+	<!-- TMPL_ELSE -->
+
+		<!-- TMPL_IF NAME="opac_electronic_count" -->
+
+            <form name="add_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl" >
+			Language:
+			<select name="lang">
+			    <option value="">All</option>
+			    <option value="tr" <!-- TMPL_IF name="tr" -->selected<!-- /TMPL_IF --> >Türkçe</option>
+			    <option value="en" <!-- TMPL_IF name="en" -->selected<!-- /TMPL_IF -->>English</option>
+			</select>
+			<input type="submit" class="button" value="Filter">
+			</form>
+
+			<form name="del_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl" onsubmit="return confirm("Are you sure you want to delete the selected database?')">
+				<table border="0" cellspacing="0" cellpadding="3">
+					<tr bgcolor="#99cc33">
+						<th></td>
+						<th style="padding-left:3px;padding-right:3px">Language</th>
+						<th>image</th>
+						<th>URL</th>
+						<th  width="20%">Title</th>
+						<th>Text</th>
+						<th></th>
+					</tr>
+
+					<!-- TMPL_LOOP NAME="opac_electronic" -->
+						<tr>
+							<td width="5%"><input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idelectronic" -->"</td>
+							<td align="center"><!-- TMPL_VAR NAME="lang" --></td>
+							<td><!-- TMPL_VAR NAME="image" --></td>
+							<td><!-- TMPL_VAR NAME="href" --></td>
+							<td align="center"><!-- TMPL_VAR NAME="title" --></td>
+							<td><!-- TMPL_VAR NAME="edata" --></td>
+							<td width="5%">
+								<a href="/cgi-bin/koha/admin/koha-electronic.pl?op=add_form&id=<!-- TMPL_VAR NAME="idelectronic" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png" border="0"></a>
+							</td>
+						</tr>
+					<!-- /TMPL_LOOP -->
+
+				</table>
+					<input type="hidden" name="op" value="del">
+					<input type="submit" class="button" value="Delete selected">
+			</form>
+		<!-- TMPL_ELSE -->
+			<h5>No databases loaded</h5>
+		<!-- /TMPL_IF -->
+
+		<form name="add_form" method="post" action="/cgi-bin/koha/admin/koha-electronic.pl">
+			<input type="hidden" name="op" value="add_form">
+			<input type="submit" class="button" value="Add OPAC databases">
+		</form>
+	
+	
+	<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/koha2marclinks.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/koha2marclinks.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/koha2marclinks.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/koha2marclinks.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,141 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" -->MARC links <!-- TMPL_VAR name="tagfield" --><!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_IF name="add_form" -->
+<!-- -->
+<h1><!-- TMPL_VAR name="action" --></h1>
+	<p>Choose and validate 1 of the following for <b><!-- TMPL_VAR name="tablename" -->.<!-- TMPL_VAR name="kohafield" --></b></p><table>
+<tr><td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">	<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist0" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+
+		<td>	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" /><input type="submit" value="OK" class="submit" />
+			<!-- TMPL_VAR name="marclist1" -->	</form>
+		</td>
+	</tr>
+	<tr>
+
+		<td>
+				<form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist2" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+	
+		<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist3" --><input type="submit" value="OK" class="submit" />	</form>
+		</td>
+	</tr>
+	<tr>
+	
+		<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist4" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+
+		<td>	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist5" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+	
+		<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist6" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+	
+		<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist7" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+	
+		<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist8" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+	
+		<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+			<input type="hidden" name="op" value="add_validate" />
+			<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+			<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+			<!-- TMPL_VAR name="marclist9" --><input type="submit" value="OK" class="submit" /></form>
+		</td>
+	</tr>
+	<tr>
+		<td>
+			<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
+				<input type="hidden" name="op" value="add_validate" />
+				<input type="hidden" name="tablename" value="<!-- TMPL_VAR name="tablename" -->" />
+				<input type="hidden" name="kohafield" value="<!-- TMPL_VAR name="kohafield" -->" />
+				<input type="hidden" name="choice" value="" />
+				<input type="submit" value="Click to &quot;Unmap&quot;" class="submit" />
+			</form>
+		</td>
+	</tr>
+	</table>
+<!-- /TMPL_IF -->
+
+<!-- -->
+<!-- TMPL_IF name="else" -->
+
+<h1>MARC links <!-- TMPL_VAR name="tagfield" --></h1>
+<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+<p><!-- TMPL_VAR name="tablename" --> <input type="submit" value="OK" class="submit" /></p>
+</form>
+<table>
+<tr>
+	<th>Koha Field</th>
+	<th>Tag</th>
+	<th>Subfield</th>
+	<th>Lib</th>
+	<th>&nbsp;</th>
+</tr>
+<!-- TMPL_LOOP name="loop" -->
+<tr>
+	<td><a href="<!-- TMPL_VAR name="edit" -->"><!-- TMPL_VAR name="kohafield" --></a></td>
+	<td><!-- TMPL_VAR name="tagfield" --></td>
+	<td><!-- TMPL_VAR name="tagsubfield" --></td>
+	<td><!-- TMPL_VAR name="liblibrarian" --></td>
+	<td><a class="edit" href="<!-- TMPL_VAR name="edit" -->">Edit</a></td>
+</tr>
+<!-- /TMPL_LOOP -->
+</table>
+<!-- /TMPL_IF --></div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/koha_attr.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/koha_attr.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/koha_attr.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/koha_attr.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,198 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of attribute '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirmed" -->Data Deleted<!-- /TMPL_IF -->
+<!-- TMPL_IF name="else" -->MARC tag Structure<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>KOHA attr matching for biblios,holdings and authorities XML & MARC records</h1>
+<script language="javascript" type="text/javascript">
+	function _(s) { return s } // dummy function for gettext
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNotNull(f,noalert) {
+		if (f.value.length ==0) {
+   return false;
+		}
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function toUC(f) {
+		var x=f.value.toUpperCase();
+		f.value=x;
+		return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isNum(v,maybenull) {
+	var n = new Number(v.value);
+	if (isNaN(n)) {
+		return false;
+		}
+	if (maybenull==0 && v.value=='') {
+		return false;
+	}
+	return true;
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function isDate(f) {
+		var t = Date.parse(f.value);
+		if (isNaN(t)) {
+			return false;
+		}
+	}
+	/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	function Check(f) {
+		var ok=1;
+		var _alertString="";
+		var alertString2;
+		if (f.marctokoha.value.length==0) {
+			_alertString += "\n- " + _("field name missing");
+		}
+		if (_alertString.length==0) {
+			document.Aform.submit();
+		} else {
+			alertString2  = _("Form not submitted because of the following problem(s)");
+			alertString2 += "\n------------------------------------------------------------------------------------\n";
+			alertString2 += _alertString;
+			alert(alertString2);
+		}
+	}
+	</script>
+
+<!-- TMPL_IF NAME="add_form" -->
+<!-- ------------------------------------------------------------------------ -->
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate" />
+		<input type="hidden" name="id" value='<!-- TMPL_VAR NAME="id" -->' />
+	<div class="data"><table>
+		<caption><!-- TMPL_IF NAME="use-heading-flags-p" --><!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF --><!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF --></caption>
+	<tr><th><label>Kohafield<label></th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
+	<tr><th><label for="label">Field description</label></th><td><input type="text" id="label" name="label" value="<!-- TMPL_VAR NAME="label" escape="HTML" -->" size="80" maxlength="100" /></td></tr>
+	<tr><th><label for="attr">Zebra attribute </label></th><td><input type="text" id="attr" name="attr" value="<!-- TMPL_VAR NAME="attr" escape="HTML" -->" size="40" maxlength="80" /></td></tr>
+	<tr><th><label for="taglist">MARC tag for this field</label></th><td><!-- TMPL_VAR NAME="tagfield"  --></td></tr>
+	<tr><th><label for="tagsublist">MARC subfieldcode for this field</label></th><td><!-- TMPL_VAR NAME="tagsubfield"  --></td></tr>
+	<tr><th><label for="sorts">Sorts on this field</label></th><td><!-- TMPL_VAR NAME="sorts" --></td></tr>
+	<tr><th><label for="opacshow">Shows in librarian searches</label></th><td><!-- TMPL_VAR NAME="intrashow" --><label for="opacshow">Shows in opac search</label><!-- TMPL_VAR NAME="opacshow" --></td></tr>
+	<tr><th><label for="serverlist">Record type for this field</label></th><td><!-- TMPL_VAR NAME="recordtype"  --></td></tr>
+	
+	
+	</table></div>
+		<p><input type="submit" value="Save Changes" class="submit" onclick=Check(this.form) /></p>
+	<p><input type="submit" value="Cancel and Return to Koha attr Structure" class="cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" /></p>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<!-- ------------------------------------------------------------------------ -->
+<div class="data"><table>
+<caption>Confirm Deletion of Field <em><!-- TMPL_VAR NAME="searchfield" --></em>?</caption>
+	<tr><th>Kohafield: </th><td><!-- TMPL_VAR NAME="searchfield" --></td></tr>
+	<tr><th>Description: </th><td><!-- TMPL_VAR NAME="label" --></td></tr>
+	</table></div>
+	<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed"/><input type="hidden" name="id" value='<!-- TMPL_VAR NAME="id" -->' />	<input type="submit" class="cancel" value="Yes, Delete this Tag" /></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do Not Delete" /></form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<!-- ------------------------------------------------------------------------ -->
+	<div class="details"><h3>Field Deleted</h3>
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+	<input type="submit" class="submit" value="Return to Koha attributes Structure" />
+	</form></div>
+<!-- /TMPL_IF -->
+
+
+<!-- ------------------------------------------------------------------------ -->
+<!-- TMPL_IF NAME="else" -->
+	<form name="f" action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		
+		<input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" size="60" />
+		<input type="submit" value="Kohafield Search" class="submit" />
+		<p><!-- TMPL_IF Name="select_display"-->
+				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display" id="onlyused" value="True" checked="checked" onchange="document.f.submit()" />
+			<!-- TMPL_ELSE -->
+				<label for="onlyused">Display only used Tags/Subfields</label><input type="checkbox" name="select_display"  id="onlyused" value="True" onchange="document.f.submit()" />
+			<!--/TMPL_IF --> 
+		</p>
+	</form>
+	<div class="help">NOTE : if you change the link between a KOHA field and a Z39.50 attribute, ask your administrator to reindex ZEBRA with these attributes.</div>
+
+	<div class="data">
+	<table>
+		<tr>
+			<th scope="col">Koha field</th>
+			<th scope="col">Attribute</th>
+			<th scope="col">MARC tag/sub</th>
+			<th scope="col">Label</th>
+			<th scope="col">Sorts</th>
+			<th scope="col">Intra Show</th>
+			<th scope="col">Opac Show</th>
+			
+			<th scope="col">Related record</th>
+			
+			
+			<th scope="col">&nbsp;</th>
+		</tr>
+	<!-- TMPL_IF NAME="select_display" -->
+		<!-- TMPL_LOOP NAME="loop" -->
+		<input type="hidden" value="<!-- TMPL_VAR NAME="attr" -->" />
+		<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
+		<tr class="highlight">
+			<td><b><!-- TMPL_VAR NAME="kohafield" --></b></td>
+			<td><!-- TMPL_VAR NAME="attr" --></td>
+			<td><!-- TMPL_VAR NAME="tagfield" --><!-- TMPL_VAR NAME="tagsubfield" --></td>
+			<td><!-- TMPL_VAR NAME="label" --></td>
+			<td><!-- TMPL_IF NAME="sorts" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="intrashow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="opacshow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="recordtype" --></td>
+			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
+		</tr>
+		<tr>
+			<td>
+				&nbsp;
+			</td>
+			
+		</tr>
+		<!-- /TMPL_LOOP -->
+	<!-- TMPL_ELSE -->
+		<!-- TMPL_LOOP NAME="loop" -->
+	<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
+		<!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+			<td><b><!-- TMPL_VAR NAME="kohafield" --></b></td>
+			<td><!-- TMPL_VAR NAME="attr" --></td>
+			<td><!-- TMPL_VAR NAME="tagfield" --><!-- TMPL_VAR NAME="tagsubfield" --></td>
+			<td><!-- TMPL_VAR NAME="label" --></td>
+			<td><!-- TMPL_IF NAME="sorts" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="intrashow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_IF NAME="opacshow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="recordtype" --></td>
+			<td><a class="edit" href="<!-- TMPL_VAR NAME="edit" -->">Edit Tag</a> <a class="delete" href="<!-- TMPL_VAR NAME="delete" -->">Delete Tag</a></td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	<!--/TMPL_IF -->
+	</table>
+	<div class="tabitem">
+		<!-- TMPL_IF NAME="isprevpage" -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+		<input type="hidden" value="<!-- TMPL_VAR NAME="prevpage" -->" name="offset" /><input type="hidden" value="<!-- TMPL_VAR NAME="searchfield" -->" name="searchfield" /><!--TMPL_IF Name="select_display"--><input type="hidden" value="select_display" name="True" /><!--/TMPL_IF --><input type="submit" value="&lt;&lt; Previous Page" class="submit" /></form>
+		<!-- /TMPL_IF -->	
+		
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="add_form" />
+	
+	
+		<input type="submit" value="Add Koha atrribute" class="submit" /></form>
+		
+		<!-- TMPL_IF NAME="nextpage" -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+		<!--TMPL_IF Name="select_display"--><input type="hidden" name="select_display" value="True" /><!--/TMPL_IF --><input type="submit" class="submit" value="Next Page &gt;&gt;" /></form>
+		<!-- /TMPL_IF -->
+</div>
+</div>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/onlinedatabases.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/onlinedatabases.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/onlinedatabases.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/onlinedatabases.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,280 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME="else" -->z39.50 Servers<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME=searchfield -->Modify z39.50 Server <!-- TMPL_VAR NAME="searchfield" --><!-- TMPL_ELSE -->Add z39.50 Server<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_validate" -->z39.50 Server Added<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirmed" -->z39.50 Server Deleted<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_IF NAME="add_form" -->
+        <script language="JavaScript" type="text/javascript">
+        //
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+                    return false;
+                }
+                return true;
+        }
+        //
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        //
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull==0 && v.value=='') {
+                return false;
+        }
+        return true;
+        }
+        //
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                       return false;                       
+                }
+        }
+        //
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.searchfield.value.length==0) {
+                        _alertString += "- site name missing\n";
+                }
+                if (f.host.value.length==0) {
+                        _alertString += "- host missing\n";
+                }
+                if (f.port.value.length==0) {
+                        _alertString += "- port missing\n";
+                }
+                if (f.db.value.length==0) {
+                        _alertString += "- database missing\n";
+                }
+                if (isNaN(f.port.value)) {
+                        _alertString += "- port must be a number\n";
+                }
+              
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2 = "Form not submitted because of the following problem(s)\n";
+                        alertString2 += "------------------------------------------------------------------------------------\n\n";
+                        alertString2 += _alertString;
+                        alert(alertString2);
+                }
+        }
+        </script>
+
+       
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate" />
+<!-- TMPL_IF NAME=searchfield -->
+                <h1>Modify Online Database Server</h1>
+        <!-- TMPL_ELSE -->
+                <h1>Add Online Database Server</h1>
+        <!-- /TMPL_IF -->                
+        <div class="data"><table>
+        <!-- TMPL_IF NAME=searchfield -->
+                <tr>
+                        <th>Display Name</th>
+                        <td>
+                                <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
+                        </td>
+                </tr>
+        <!-- TMPL_ELSE -->
+                <tr>
+                        <th>Display name</th>
+                        <td>
+                                <input type="text" name="searchfield" size="65" maxlength="100"  />
+                        </td>
+                </tr>
+        <!-- /TMPL_IF -->
+
+		<tr>
+			<th>Z3950 server</th>
+			<td>
+				<input type="text" name="host" size="30" value="<!-- TMPL_VAR NAME="host" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Port</th>
+			<td>
+				<input type="text" name="port" size="5" value="<!-- TMPL_VAR NAME="port" -->" onblur="isNum(this)" />
+			</td>
+		</tr>
+		<tr>
+			<th>Database</th>
+			<td>
+				<input type="text" name="db" value="<!-- TMPL_VAR NAME="db" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Userid</th>
+			<td>
+				<input type="text" name="userid" value="<!-- TMPL_VAR NAME="userid" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Password</th>
+			<td>
+				<input type="text" name="password" value="<!-- TMPL_VAR NAME="password" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Search string</th>
+			<td colspan="3">
+						<textarea name="search_string" row="3" cols="80"><!-- TMPL_VAR NAME="search_string" --></textarea>
+			</td>
+		</tr>
+	
+		<tr>
+			<th>Keyword search attr</th>
+			<td>
+						<input type="text" name="any" value="<!-- TMPL_VAR NAME="any" -->" />
+			</td>
+			<th>Keyword query syntax</th>
+			<td>
+						<input type="text" name="any_query" value="<!-- TMPL_VAR NAME="any_query" -->" />
+			</td>
+		</tr>	
+			<tr>
+			<th>Title search attr</th>
+			<td>
+						<input type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
+			</td>
+			<th>Title query</th>
+			<td>
+						<input type="text" name="title_query" value="<!-- TMPL_VAR NAME="title_query" -->" />
+			</td>
+		</tr>	
+	<tr>
+			<th>Author search attr</th>
+			<td>
+						<input type="text" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
+			</td>
+			<th>Author query</th>
+			<td>
+						<input type="text" name="author_query" value="<!-- TMPL_VAR NAME="author_query" -->" />
+			</td>
+		</tr>	
+		<tr>
+			<th>Subject search attr</th>
+			<td>
+						<input type="text" name="subject" value="<!-- TMPL_VAR NAME="subject" -->" />
+			</td>
+			<th>Subject query</th>
+			<td>
+						<input type="text" name="subject_query" value="<!-- TMPL_VAR NAME="subject_query" -->" />
+			</td>
+		</tr>	
+			
+        </table></div><input type="button" value="<!-- TMPL_IF NAME=searchfield -->Update Online database Server<!-- TMPL_ELSE -->Add Z39.50 Server<!-- /TMPL_IF -->" onclick="Check(this.form)" class="submit" />  <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" />
+        </form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+<h3>Z39.50 Server Added</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="submit" value="OK" class="submit" />
+        </form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+	<!-- TMPL_VAR NAME="reqsel" -->
+<h3>Confirm Deletion of Server <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>	
+        <table>
+                <tr>
+                        <td>Display name</td>
+                        <td>
+                                <!-- TMPL_VAR NAME="searchfield" -->
+                        </td>
+                </tr>
+                <tr>
+                        <td>host</td>
+                        <td><!-- TMPL_VAR NAME="host" --></td>
+                </tr>
+                <tr>
+                        <td>Port</td>
+                        <td><!-- TMPL_VAR NAME="port" --></td>
+                </tr>
+                <tr>
+                        <td>Database</td>
+                        <td><!-- TMPL_VAR NAME="db" --></td>
+                </tr>
+                <tr>
+                        <td>Userid</td>
+                        <td><!-- TMPL_VAR NAME="userid" --></td>
+                </tr>
+              
+              
+                <tr>
+                        <td>                <div class="tabitem"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                        <input type="hidden" name="op" value="delete_confirmed" />
+                        <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="submit" value="Delete this Server" class="cancel" /></form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="Do Not Delete" class="submit" /></form></div></td>
+                </tr>
+	</table>
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<h3>Z39.50 Server Deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="submit" value="OK" class="submit" />
+</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h3>Online Database Servers Admininistration</h3>
+         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+                <input type="submit" name="search" value="Search" class="submit" />
+        </form>
+<div id="results">        <!-- TMPL_IF NAME="searchfield" -->
+                You searched for <b><!-- TMPL_VAR NAME="searchfield" --></b>
+        <!-- /TMPL_IF --></div>		
+<table>
+                <tr>
+                        <th>Site</th>
+                        <th>Hostname/Port</th>
+                        <th>Database</th>
+                        <th>Userid</th>
+                        
+                        <th colspan="2">&nbsp;</th>
+                </tr>
+                <!-- TMPL_LOOP NAME="loop" -->
+               <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+                        <td><!-- TMPL_VAR NAME="server" --></td>
+                        <td><!-- TMPL_VAR NAME="host" -->:<!-- TMPL_VAR NAME="port" --></td>
+                        <td><!-- TMPL_VAR NAME="db" --></td>
+                        <td><!-- TMPL_VAR NAME="userid" --></td>
+                       
+                        <td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="server" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
+                        <td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="server" -->" /><input type="submit" class="delete" value="Delete" /></form></td>                
+			</tr>
+                <!-- /TMPL_LOOP -->
+	</table>
+<div class="tabitem">
+<!-- TMPL_IF NAME="offsetgtzero" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" />
+	<input type="submit" value="&lt;&lt; Prev" class="submit">
+</form><!-- /TMPL_IF -->
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="hidden" name="op" value="add_form" />
+		<input type="submit" value="Add Online Database Server" class="submit" />
+</form>
+<!-- TMPL_IF NAME="ltcount" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" />
+	<input type="submit" value="Next &gt;&gt;" class="submit" />
+</form> <!-- /TMPL_iF -->
+ </div>
+
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/printers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/printers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/printers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/printers.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,191 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF NAME=add_form --><!-- TMPL_IF NAME="searchfield" -->Modify printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add printer<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_validate" -->Printer Added<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Printer '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirmed" -->Printer Deleted<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="else" -->Printers<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_IF NAME=add_form -->
+        <script language="JavaScript" type="text/javascript">
+        //
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+   return false;
+                }
+                return true;
+        }
+        //
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        //
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull==0 && v.value=="") {
+                return false;
+        }
+        return true;
+        }
+        //
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                        return false;
+                }
+        }
+        //
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.printername.value.length==0) {
+                        _alertString += "- printer name missing\n";
+                }
+                if (f.printqueue.value.length==0) {
+                        _alertString += "- Queue missing\n";
+                }
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2 = "Form not submitted because of the following problem(s)\n";
+                        alertString2 += "------------------------------------------------------------------------------------\n\n";
+                        alertString2 += _alertString;
+                        alert(alertString2);
+                }
+        }
+        </script>
+
+
+        
+<!-- TMPL_IF NAME="searchfield" -->
+		<h1>Modify printer</h1>
+	<!-- TMPL_ELSE -->
+		<h1>Add printer</h1>
+	<!-- /TMPL_IF -->
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate" />
+	<table>
+	<!-- TMPL_IF NAME="searchfield" -->
+		<tr>
+			<td>Printer Name</td>
+			<td>
+				<input type="hidden" name="printername" value="<!-- TMPL_VAR NAME=searchfield -->" /><!-- TMPL_VAR NAME="searchfield" -->
+			</td>
+		</tr>
+	<!-- TMPL_ELSE -->
+		<tr>
+			<td>Printer Name</td>
+			<td>
+				<input type="text" name="printername" size="50" maxlength="50" />
+			</td>
+		</tr>
+	<!-- /TMPL_IF -->
+
+        	<tr>
+			<td>Queue</td>
+			<td><input type="text" name="printqueue" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printqueue" -->" /> </td>
+		</tr>
+        	<tr>
+			<td>Type</td>
+			<td><input type="text" name="printtype" size="50" maxlength="50" value="<!-- TMPL_VAR NAME="printtype" -->" /> </td>
+		</tr>
+        </table><p><input type="button" value="OK" onclick="Check(this.form);" class="submit" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" /></p>
+        </form>
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+<h3>Printer Added</h3>
+<div id="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="submit" value="OK" class="submit" />
+</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+<h3>Confirm Deletion of Printer <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>
+<table>
+		<tr>
+			<td>Printer</td>
+			<td><!-- TMPL_VAR NAME="searchfield" --></td>
+		</tr>
+		<tr>
+			<td>Queue</td>
+			<td><!-- TMPL_VAR NAME="printqueue" --></td>
+		</tr>
+        	<tr>
+			<td>Type</td>
+			<td><!-- TMPL_VAR NAME="printtype" --></td>
+		</tr>
+        	<tr>
+			<td>
+
+			</td>
+			<td>
+
+			</td>
+		</tr>
+	</table>
+<div class="tabitem">    	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+			<input type="hidden" name="op" value="delete_confirmed" />
+			<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+			<input type="submit" value="Delete this Printer" class="cancel" />
+			</form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+				<input type="submit" value="Do not Delete" class="submit" />
+			</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<h3>Printer Deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="submit" value="Ok" class="submit" />
+</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h2>Printer Admin</h2>
+	<!-- TMPL_IF NAME=searchfield -->
+		<div id="results">You searched for <span class="ex"><!-- TMPL_VAR NAME="searchfield" --></span></div>
+	<!-- /TMPL_IF -->
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+                <input type="submit" name="submit" value="Search" class="submit" />
+        </form>
+<table>
+		<tr>
+			<th>Name</th>
+			<th>Queue</th>
+			<th>Type</th>
+			<th>&nbsp;</th>
+		</tr>
+		<!-- TMPL_LOOP NAME=loop -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="printername" --></td>
+			<td><!-- TMPL_VAR NAME="printqueue" --></td>
+			<td><!-- TMPL_VAR NAME="printtype" --></td>
+			<td><form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="printername" -->" /><input type="submit" value="Edit" class="submit" /></form> <form class="inline" action="" method="get"><input type="hidden" name=
+"op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="printername" -->" /><input type="submit" class="delete" value="Delete" /></form></td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	</table>
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+       <p> <input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Printer" class="submit" /></p></form>
+	<!-- TMPL_IF NAME="offsetgtzero" -->
+		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; Prev</a>
+	<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF NAME="ltcount" -->
+		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">Next &gt;&gt;</a>	
+	<!-- /TMPL_iF -->
+<!-- /TMPL_IF -->
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/stopwords.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/stopwords.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/stopwords.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/stopwords.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,160 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF NAME="else" -->Stop Words Administration<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->Modify Stop Word<!-- TMPL_ELSE -->Add Stop Word<!-- /TMPL_IF --><!-- /TMPL_IF --> 
+<!-- TMPL_IF NAME="add_validate" -->Stop Word Added<!-- /TMPL_IF --> 
+<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion of Stop Word '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF --> 
+<!-- TMPL_IF NAME="delete_confirmed" -->Stop Word Deleted<!-- /TMPL_IF --> 
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF NAME="add_form" -->
+        <script>
+        //
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+   return false;
+                }
+                return true;
+        }
+        //
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        //
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull==0 && v.value=="") {
+                return false;
+        }
+        return true;
+        }
+        //
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                        return false;
+                }
+        }
+        //
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.word.value.length==0) {
+                        _alertString += "- word missing\n";
+                }
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2 = "Form not submitted because of the following problem(s)\n";
+                        alertString2 += "------------------------------------------------------------------------------------\n\n";
+                        alertString2 += _alertString;
+                        alert(alertString2);
+                }
+        }
+        </SCRIPT>
+
+
+
+        <form action="<!-- TMPL_VAR NAME=script_name -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate" />
+<!-- TMPL_IF NAME="searchfield" -->
+                <h1>Modify Stop Word</h1>
+        <!-- TMPL_ELSE -->
+                <h1>Add Stop Word</h1>
+        <!-- /TMPL_IF -->         
+<table>
+        <!-- TMPL_IF NAME="searchfield" -->
+                <tr>
+                        <td>Stop Word</td>
+                        <td><input type="hidden" name="word" value="<!-- TMPL_VAR NAME=searchfield -->" /><!-- TMPL_VAR NAME="searchfield" -->
+                        </td>
+                </tr>
+        <!-- TMPL_ELSE -->
+                <tr>
+                        <td>Stop Word: </td>
+                        <td>
+                                <input type="text" name="word" size="50" maxlength="250" onblur="toUC(this);" />
+                        </td>
+                </tr>
+        <!-- /TMPL_IF -->
+        </table><p><input type="button" value="<!-- TMPL_IF NAME="searchfield" -->Update Stop Word<!-- TMPL_ELSE -->Add Stop Word <!-- /TMPL_IF -->" onclick="Check(this.form);" class="submit" /> <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" /></p>
+        </form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+<h3>Stop Word Added</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="submit" value="OK" class="submit" />
+        </form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+ <h3>Confirm Deletion of Stop Word <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>                       <table>
+                <tr>
+                        <td>Stop Word: </td>
+                        <td><!-- TMPL_VAR NAME="searchfield" --></td>
+                </tr>
+	</table><div class="tabitem"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                        <input type="hidden" name="op" value="delete_confirmed" />
+                        <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="submit" value="Delete this Stop Word" class="cancel" />
+                                </form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                                        <input type="submit" value="Do Not Delete" class="submit" />
+                                </form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<h3>Stop Word Deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="submit" value="OK" class="submit" />
+</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+ <h3>Stop Words Administration</h3>
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="text" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+                <input type="submit" name="submit" value="Search" class="submit" />
+        </form>
+<div id="results">        <!-- TMPL_IF NAME="searchfield" -->
+                You searched for <b><!-- TMPL_VAR NAME="searchfield" --></b>
+        <!-- /TMPL_IF --></div>
+<!-- TMPL_IF NAME="loop" -->
+<table>
+                <tr>
+                        <th>Word</th>
+                        <th>&nbsp;</th>
+                </tr>
+                <!-- TMPL_LOOP NAME="loop" -->
+                <tr>
+                        <td><!-- TMPL_VAR NAME="word" --></td>
+                        <td><a href="<!-- TMPL_VAR NAME="script_name" -->?op=delete_confirm&amp;searchfield=<!-- TMPL_VAR NAME="word" -->">Delete</a></td>
+                </tr>
+                <!-- /TMPL_LOOP -->
+        </table>
+<!-- /TMPL_IF -->
+<div class="tabitem"><!-- TMPL_IF NAME="offsetgtzero" -->
+               <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" /><input type="submit" class="submit" value="&lt;&lt; Prev" /></form>
+        <!-- /TMPL_IF --> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="hidden" name="op" value="add_form" /><input type="submit" value="Add Word" class="submit" />
+        </form> <!-- TMPL_IF NAME="ltcount" -->
+                <form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="next_page" -->" /><input type="submit" class="submit" value="Next &gt;&gt;" /></form>
+        <!-- /TMPL_iF --></div>
+        
+
+        
+
+        
+
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/systempreferences.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/systempreferences.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/systempreferences.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/systempreferences.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,261 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: 
+<!-- TMPL_IF name="add_form" --><!-- TMPL_IF NAME="modify" -->Modify system preference '<!-- TMPL_VAR NAME="searchfield" -->'<!-- TMPL_ELSE -->Add a system preference<!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="add_validate" -->Data Added<!-- /TMPL_IF -->
+<!-- TMPL_IF name="delete_confirm" -->Confirm Deletion of Parameter '<!-- TMPL_VAR name="searchfield" -->'<!-- /TMPL_IF --><!-- TMPL_IF name="delete_confirmed" -->Parameter Deleted<!-- /TMPL_IF --><!-- TMPL_IF name="else" -->Preferences<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<script language="JavaScript" type="text/javascript">
+		function _(s) { return s } // dummy function for gettext
+		//
+		function isNotNull(f,noalert) {
+			if (f.value.length ==0) {
+	return false;
+			}
+			return true;
+		}
+		//
+		function toUC(f) {
+			var x=f.value.toUpperCase();
+			f.value=x;
+			return true;
+		}
+		//
+		function isNum(v,maybenull) {
+		var n = new Number(v.value);
+		if (isNaN(n)) {
+			return false;
+			}
+		if (maybenull==0 && v.value=='') {
+			return false;
+		}
+		return true;
+		}
+		//
+		function isDate(f) {
+			var t = Date.parse(f.value);
+			if (isNaN(t)) {
+				return false;
+			}
+		}
+		//
+		function Check(f) {
+			var ok=1;
+			var _alertString="";
+			var alertString2;
+			if (f.variable.value.length==0) {
+				_alertString += "\n- " + _("variable missing");
+			}
+			if (f.value.value.length==0) {
+				_alertString += "\n- " + _("value missing");
+			}
+			if (_alertString.length==0) {
+				document.Aform.submit();
+			} else {
+				alertString2  = _("Form not submitted because of the following problem(s)");
+				alertString2 += "\n------------------------------------------------------------------------------------\n";
+				alertString2 += _alertString;
+				alert(alertString2);
+			}
+		}
+		</script>
+
+<div id="main">	<!-- TMPL_IF NAME="add_form" -->
+	
+		<!-- TMPL_IF NAME="modify" -->
+			<h1>Modify a system preference</h1>
+		<!-- TMPL_ELSE -->
+			<h1>Add a system preference</h1>
+		<!-- /TMPL_IF -->
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+		<div class="details">
+		
+		<table>
+			<tr><td><label for="explanation">Explanation: </label></td><td><input type="text" name="explanation" id="explanation" size="60" value="<!-- TMPL_VAR NAME="explanation" escape="HTML" -->" /><input type="hidden" name="op" value="add_validate" /></td></tr>
+			<tr><!-- TMPL_IF NAME="searchfield" --><td><label>Variable</label></td><td><!-- TMPL_VAR NAME="searchfield" --><input type="hidden" name="variable" value="<!-- TMPL_VAR NAME="searchfield" -->"></td>
+			<!-- TMPL_ELSE --><td><label for="variable">Variable</label></td><td><input type="text" name="variable" id="variable" size="60" /></td><!-- /TMPL_IF --></tr>
+			<tr><td><label for="value">Value</label></td><td><!-- TMPL_IF NAME="type-free" -->
+					<input type="text" id="value" name="value" value="<!-- TMPL_VAR NAME="value" escape="HTML" -->" size="<!-- TMPL_VAR NAME="fieldlength" -->" />
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="type-textarea" -->
+					<textarea name="value" id="value" rows="<!--TMPL_VAR NAME="rows" -->" cols="<!-- TMPL_VAR NAME="cols" -->"><!-- TMPL_VAR NAME="value" escape="HTML" --></textarea>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="type-choice" -->
+					<select name="value" id="value">
+						<!-- TMPL_LOOP NAME="options" -->
+<!-- TMPL_IF NAME="selected" -->
+							<option value="<!-- TMPL_VAR NAME="option" -->" selected="selected"><!-- TMPL_VAR NAME="option" --></option>
+<!-- TMPL_ELSE -->
+							<option value="<!-- TMPL_VAR NAME="option" -->"><!-- TMPL_VAR NAME="option" --></option>
+<!-- /TMPL_IF -->
+						<!-- /TMPL_LOOP -->
+					</select>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="type-yesno" -->
+					<!-- TMPL_IF NAME="value-yes" -->
+					<input type="radio" name="value" id="value" value="1" checked="checked"><!-- TMPL_ELSE --><input type="radio" name="value" id="value" value="1" /><!-- /TMPL_IF -->Yes
+				<!-- TMPL_IF NAME="value-no" -->	
+					<input type="radio" name="value" value="0" checked="checked" /><!-- TMPL_ELSE --><input type="radio" name="value" value="0" /><!-- /TMPL_IF -->No<!-- /TMPL_IF -->
+				</td></tr>
+		</table></div>
+		<p>
+		<!-- TMPL_IF NAME="modify" -->
+		<input type="submit" value="Save Changes" class="submit" />
+	<!-- TMPL_ELSE -->
+		<input type="submit" value="Add this Preference" class="submit" />
+	<!-- /TMPL_IF -->
+<input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR name="script_name" -->'; return false;" /></p>
+		
+<h3>Koha internal</h3>		
+		<div class="details"><span class="note">Note: you should have no reasons to modify the following default values</span>
+		<table>
+		<tr><td><label for="preftype">Variable type:</label></td><td><input type="text" name="preftype" id="preftype" value="<!--TMPL_VAR NAME="preftype" -->" size="40" maxlength="40"><span class="formfield-notes"> (<em>Choice</em>, <em>YesNo</em>, <em>Integer</em>, <em>Textarea</em>, <em>Float</em>, <em>Themes</em>, or <em>Languages</em>)</span></td></tr>
+		<tr><td><label for="prefoptions">Variable options:</label></td><td><input type="text" name="prefoptions" id="prefoptions" value="<!-- TMPL_VAR NAME="prefoptions" -->" size="60" maxlength="80" /> <span class="formfield-notes">(a choice list for <em>Choice</em> (separated by <strong>|</strong>) or <strong>cols|rows</strong> for <em>Texarea</em>)</span></td></tr>
+		</table></div>
+		</form>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="add_validate" -->
+	
+
+		<h3>Data recorded</h3>
+		<div class="details">
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="submit" class="submit" value="OK" />
+		</form></div>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="delete_confirm" -->
+	
+<div class="data">	<table>
+		<caption>Confirm Deletion of <em><!-- TMPL_VAR NAME="searchfield" -->?</em></caption>
+		<tr>
+			<th>Variable Name:</th>
+			<td><b><!-- TMPL_VAR NAME="searchfield" --></b></td>
+		</tr>
+		<tr><th>Value: </th><td><!-- TMPL_VAR NAME="Tvalue" --></td></tr></table>
+		<form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="delete_confirmed" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+		<input type="submit" class="cancel" value="Yes, Delete"></form> <form class="inline" action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" class="submit" value="No, Do not Delete" /></form>
+	</div>
+	
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="delete_confirmed" -->
+	
+		<div class="details"><h3>Data deleted</h3></div>
+		<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="submit" class="submit" value="Back to System Preferences" />
+		</form>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="else" -->
+	<h1>System preferences admin</h1>
+<div class="tabitem">
+		<ul>
+			<li>
+				<!--TMPL_IF Name="Admin"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin" class="here">Admin
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Admin">Admin
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+			<li>
+				<!--TMPL_IF Name="Acquisitions"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions" class="here">Acquisitions
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Acquisitions">Acquisitions
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+			<li>
+				<!--TMPL_IF Name="Authorities"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities" class="here">Authorities
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Authorities">Authorities
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+			<li>
+				<!--TMPL_IF Name="Catalogue"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue" class="here">Catalogue
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Catalogue">Catalogue
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+			<li>
+				<!--TMPL_IF Name="Circulation"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation" class="here">Circulation
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Circulation">Circulation
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+	<!--TMPL_IF Name="Librarian"-->
+			<li><a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Intranet" class="here">Intranet</a></li>
+	<!--TMPL_ELSE-->
+			<li><a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Intranet">Intranet</a></li>
+	<!--/TMPL_IF-->
+			<li>
+				<!--TMPL_IF Name="Members"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members" class="here">Members
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=Members">Members
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+			<li>
+				<!--TMPL_IF Name="OPAC"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC" class="here">OPAC
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=OPAC">OPAC
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+			<li>
+				<!--TMPL_IF Name="Others"-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=" class="here">Others
+					</a>
+				<!--TMPL_ELSE-->
+					<a href="/cgi-bin/koha/admin/systempreferences.pl?tab=">Others
+					</a>
+				<!--/TMPL_IF-->
+			</li>
+		</ul>
+</div>
+	<!-- TMPL_VAR NAME="searchfield" -->
+	<table>
+	<tr>
+		<th>Variable</th>
+		<th>Value</th>
+		<th colspan="3">Explanation</th>
+	</tr>
+	<!-- TMPL_LOOP NAME="loop" -->
+	<tr<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+		<td><!-- TMPL_VAR NAME="variable" --></td>
+		<td><!-- TMPL_VAR NAME="value" --></td>
+		<td><!-- TMPL_VAR NAME="explanation" --></td>
+		<td><a href="<!-- TMPL_VAR NAME="edit" -->">Edit</a></td>
+		<td><a href="<!-- TMPL_VAR NAME="delete" -->">Delete</a></td>
+	</tr>
+	<!-- /TMPL_LOOP -->
+	</table>
+	</form>
+	
+	<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+		<input type="hidden" name="op" value="add_form" />
+		<input type="submit" class="submit" value="Add a System Preference" />
+	</form>
+	
+	<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/thesaurus.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/thesaurus.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/thesaurus.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/thesaurus.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,153 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Thesaurus Management
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF name="detail_form" -->
+	<!-- -->
+	<h1>Thesaurus management</h1><table>
+	<tr><td>&nbsp;</td></tr>
+	<tr>
+		<td><b>Values related to <!-- TMPL_VAR name="stdlib" --> (<!-- TMPL_VAR name="category" -->)</b></td>
+	</tr>
+	</table>
+	<br/><br/>
+	<table>
+	<tr>
+		<th>Other forms</th>
+		<th>&nbsp;</th>
+		<th>&nbsp;</th>
+	</tr>
+	<!-- TMPL_LOOP name="loop" -->
+	<tr>
+		<td><!-- TMPL_VAR name="freelib" --></td>
+		<td><a href="<!-- TMPL_VAR name="edit" -->">Edit</a></td>
+		<td><a href="<!-- TMPL_VAR name="delete" -->">Delete</a></td>
+	</tr>
+	<!-- /TMPL_LOOP -->
+	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	</table>
+	<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	<input type="hidden" name="category" value="<!-- TMPL_VAR name="category" -->" />
+	<input type="hidden" name="stdlib" value="<!-- TMPL_VAR name="stdlib" -->" />
+	<br><input type="submit" value="Add thesaurus entry" /><br>
+	</form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF name="add_form" -->
+<!-- -->
+
+	<form action="<!-- TMPL_VAR name="script_name" -->" name="Aform" method="post">
+	<h1><!-- TMPL_IF name="search_category" -->Add<!-- TMPL_ELSE -->Modify<!-- /TMPL_IF --></h1><!-- TMPL_IF name="search_category" -->
+		<input type="hidden" name="op" value="add_validate" />
+	<!-- TMPL_ELSE -->
+		<input type="hidden" name="op" value="mod_validate" />
+	<!-- /TMPL_IF --><table>
+	<tr>
+		<td>Category</td>
+		<td><!-- TMPL_VAR name="category" --></td>
+	</tr>
+	<tr>
+		<td>Authority lib</td>
+		<!-- TMPL_IF name="id" -->
+			<td><!-- TMPL_VAR name="father" --><!-- TMPL_VAR name="stdlib" --><input type="hidden" name="stdlib" value="<!-- TMPL_VAR name="stdlib" -->" /></td>
+		<!-- TMPL_ELSE -->
+			<td><!-- TMPL_VAR name="father" --><input type="text" name="stdlib" value="<!-- TMPL_VAR name="stdlib" escape="HTML" -->" maxlength="80" size="80" /></td>
+		<!-- /TMPL_IF -->
+	</tr>
+	<tr>
+		<td>Other lib</td>
+		<td><!-- TMPL_VAR name="father" --><input type="text" name="freelib" value="<!-- TMPL_VAR name="freelib" escape="HTML" -->" maxlength="80" size="80" /></td>
+	</tr>
+	</table>
+	<p><input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
+			<input type="hidden" name="father" value="<!-- TMPL_VAR name="father" escape="HTML" -->" />
+			<input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" escape="HTML" -->" />
+			<input type="hidden" name="search_category" value="<!-- TMPL_VAR name="search_category" -->" />
+			<input type="hidden" name="searchstring" value="<!-- TMPL_VAR name="searchstring" escape="HTML" -->" />
+			<input type="hidden" name="offset" value="<!-- TMPL_VAR name="offset" -->" />
+			<input type="submit" class="submit" value="<!-- TMPL_IF name="search_category" -->Add<!-- TMPL_ELSE -->Modify<!-- /TMPL_IF --> Value" /></p></form>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF name="delete_confirm" -->
+<!-- -->
+		<table>
+		<tr>
+			<td><b>lib</b></td>
+			<td><b><!-- TMPL_VAR name="search_category" --></b></td>
+		</tr>
+		<tr><td>Value</td><td><!-- TMPL_VAR name="Tvalue" --></td></tr>
+		<tr><td>
+			<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+				<input type="hidden" name="op" value="delete_confirmed" />
+				<input type="hidden" name="id" value="<!-- TMPL_VAR name="id" -->" />
+				<input type="hidden" name="search_category" value="<!-- TMPL_VAR name="search_category" -->" />
+		</tr></td>
+		<tr><td colspan=2 align=center>CONFIRM DELETION of this entry <b>and all entries depending on this one</b></td></tr>
+		<tr><td><input type="submit" value="YES" /></form></td>
+				<td><form action="<!-- TMPL_VAR name="script_name" -->" method="post"><input type="submit" value="NO" /></form></td></tr>
+	</table>
+<!-- /TMPL_IF -->
+
+<!-- -->
+<!-- TMPL_IF name="else" -->
+<h1>Thesaurus management</h1>
+	<p>Manages thesaurus and authorities files.</p>
+	<ul>
+		<li><b>Dig</b>: see data dependent on this one</li>
+		<li><b>Related</b>: see other forms of this authority entry</li>
+	</ul>
+<div class="tabitem">	<form action="/cgi-bin/koha/admin/thesaurus.pl" method="post">
+		<!-- TMPL_VAR name="tab_list" -->
+		<input type="text" name="searchstring" value="<!-- TMPL_VAR name="searchstring" -->" />
+		<input type="submit" value="OK" class="submit" /></form>
+	<form action="/cgi-bin/koha/admin/thesaurus.pl" method="get"><input type="hidden" value="add_form" name="op" /><input type="submit" class="submit" value="New Category" /></form></div>
+	
+	<!-- TMPL_LOOP name="hierarchy_loop" -->
+		<a href="thesaurus.pl?branch=<!-- TMPL_VAR name="branch" -->&search_category=<!-- TMPL_VAR name="category" -->"><!-- TMPL_VAR name="string" --></a><br />
+	<!-- /TMPL_LOOP -->
+	
+<!-- TMPL_IF NAME="loop" -->
+<table>
+	<tr>
+		<th>&nbsp;</th>
+		<th>Free form</th>
+		<th>Authority</th>
+		<th>Dig</th>
+		<th>Related</th>
+		<th>Edit</th>
+		<th>Delete</th>
+	</tr>	<!-- TMPL_LOOP name="loop" -->
+
+	<tr>
+		<td>&nbsp;</td>
+		<td><!-- TMPL_VAR name="freelib" --></td>
+		<td><!-- TMPL_VAR name="father" --> <!-- TMPL_VAR name="stdlib" --></td>
+		<td><!-- TMPL_VAR name="dig" -->Dig</a></td>
+		<td><!-- TMPL_VAR name="related" -->Related</a></td>
+		<td><a href="<!-- TMPL_VAR name="edit" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0" /></a></td>
+		<td><a href="<!-- TMPL_VAR name="delete" -->"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0" /></a></td>
+	</tr>
+	<!-- /TMPL_LOOP -->
+	</table>
+<!-- /TMPL_IF -->
+<p>		<form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+</p>
+<p><form action="<!-- TMPL_VAR name="script_name" -->" method="post">
+	<input type="hidden" name="op" value="add_form" />
+	<input type="hidden" name="category" value="<!-- TMPL_VAR name="category" -->" />
+	<input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" -->" />
+	<input type="hidden" name="father" value="<!-- TMPL_VAR name="father" -->" />
+	<input type="submit" class="submit"  value="Add Thesaurus entry" />
+	</form></p>
+<!-- TMPL_VAR name="previous" --> <!-- TMPL_VAR name="next" -->
+<!-- /TMPL_IF -->
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/viewlog.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/viewlog.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/viewlog.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/viewlog.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,227 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close-calendar.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main" >
+
+<!-- TMPL_IF NAME="do_it" -->
+<script language="JavaScript" type="text/javascript">
+function Dopop(link) {
+	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
+}
+</script>
+		<h1 class="parameters">Koha :  <!-- TMPL_VAR NAME="modulename"--> için yapılan işlemler cetveli. Toplam:<!-- TMPL_VAR NAME="counter"--></h1>
+		<!-- TMPL_IF NAME="loopfilter"-->
+			<p>Filtered on</p>
+			<!-- TMPL_LOOP NAME="loopfilter" -->
+					<p><!-- TMPL_IF NAME="err" --> <font color="red"> <b><!--/TMPL_IF --><label class="label100"> <!-- TMPL_VAR NAME="name"--> =</label><!-- TMPL_VAR NAME="value"--><!-- TMPL_IF NAME="err" --> </font> </b><!--/TMPL_IF --></p>
+			<!-- /TMPL_LOOP -->
+		<!-- /TMPL_IF -->
+		<br>
+		<table border="1">
+			<!-- TMPL_IF NAME="cataloguing" -->
+				<tr >
+							<th class="parameters">Modified on
+							</th>
+							<th class="parameters">Title
+							</th>
+							<th class="parameters">Librarian
+							</th>
+							<th class="parameters">Action
+							</th>
+							<th class="parameters">Info
+							</th>
+				</tr>
+				<!-- TMPL_LOOP NAME="looprow" -->
+					<!-- TMPL_IF NAME="hilighted" --><tr class="higlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+						<td><!-- TMPL_VAR NAME="day" --><br/>(<!-- TMPL_VAR NAME="timestamp" -->)
+						</td>
+						<td><!-- TMPL_VAR NAME="title" -->, <!-- TMPL_VAR NAME="author" -->
+						</td>
+						<td><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
+						</td>
+						<td><!-- TMPL_IF NAME="action" --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF -->
+						</td>
+						<td><!-- TMPL_IF NAME="info" --><!-- TMPL_VAR NAME="info" --><!-- /TMPL_IF -->
+						</td>
+					</tr>
+				<!-- /TMPL_LOOP -->
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="circulation" -->
+				<tr >
+							<th class="parameters">Timestamp
+							</th>
+							<th class="parameters">Circulation
+							</th>
+							<th class="parameters">Title
+							</th>
+							<th class="parameters">User
+							</th>
+							<th class="parameters">Action
+							</th>
+							
+				</tr>
+				<!-- TMPL_LOOP NAME="looprow" -->
+					<!-- TMPL_IF NAME="hilighted" --><tr class="higlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+						<td><!-- TMPL_VAR NAME="timestamp" -->
+						</td>
+						
+						<td><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
+						</td>
+						<td><!-- TMPL_VAR NAME="title" -->, <!-- TMPL_VAR NAME="object" -->
+						</td>
+						
+						<td><a  href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="info" -->"><!-- TMPL_VAR NAME="first" --> <!-- TMPL_VAR NAME="last" -->
+						</td>
+						<td><!-- TMPL_IF NAME="action" --><!-- TMPL_VAR NAME="action" --><!-- /TMPL_IF -->
+						</td>
+					</tr>
+				<!-- /TMPL_LOOP -->
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="members" -->
+				<tr >
+							<th class="parameters">Timestamp
+							</th>
+							<th class="parameters">Librarian
+							</th>
+							<th class="parameters">Action
+							</th>
+							<th class="parameters">Member
+							</th>
+							<th class="parameters">Info
+							</th>
+							
+				</tr>
+				<!-- TMPL_LOOP NAME="looprow" -->
+					<!-- TMPL_IF NAME="hilighted" --><tr class="higlighted"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+						<td><!-- TMPL_VAR NAME="timestamp" -->
+						</td>
+						
+						<td><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->
+						</td>
+						<td><!-- TMPL_VAR NAME="action" -->
+						</td>
+						
+						<td><a  href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="object" -->"><!-- TMPL_VAR NAME="first" --> <!-- TMPL_VAR NAME="last" -->(<!-- TMPL_VAR NAME="card" -->)
+						</td>
+						<td><!-- TMPL_VAR NAME="info" -->
+						</td>
+					</tr>
+				<!-- /TMPL_LOOP -->
+				<!-- /TMPL_IF -->
+		</table>
+<!-- TMPL_ELSE -->
+	<h1 class = "parameters">Koha : Display Logs </h1>
+	<form method="post">
+	
+	<table>
+		<thead>
+			<tr>
+			<th class="parameters">On Module</th>
+			<th class="parameters">User/Action Filters</th>
+			<th class="parameters">Object Filter</th>
+			</tr>
+		</thead>
+		<tbody>
+			<tr>
+				<td>
+					<select name="module">
+						<option value ="circulation" checked>Ödünç verme</option>
+						<option value ="cataloguing" >Eser kaydı</option>
+						<option value ="members">Ãœyeler</option>
+						
+					</select>
+				</td>
+				<td>
+				<p>
+					Librarian : <input type="text" name="user" value="">
+				</p>
+				<p>	Action type : <select name="action">
+						<option value ="">Tümü</option>
+						
+						<option value ="issue">Ödünç</option>
+						<option value ="renew">Uzatma</option>
+						<option value ="return">Ä°ade</option>
+						<option value ="add">Ekleme</option>
+						<option value ="delete">Silme</option>
+						<option value ="modify">DeÄŸiÅŸme</option>
+					</select>
+				</p>
+				<p> From <input type="text" readonly="readonly" size="10" id="from" name="from" >
+							<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
+								<script language="JavaScript" type="text/javascript">
+									function validate1(date) {
+										var day = date.getDate();
+										var month = date.getMonth() + 1;
+										var year = date.getFullYear();
+										var weekDay = date.getDay();
+										var dayMonth = month + '-' + day;
+										var dateString = year + '-' + month + '-' + day;
+										var dateTo = document.getElementById('to').value.split("-");
+										var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
+										if (date > limitDate) {
+											return true;
+										} else {
+											return false;
+										}
+									}
+					
+									Calendar.setup(
+										{
+											inputField : "from",
+											ifFormat : "%Y-%m-%d",
+											button : "openCalendarFrom",
+											disableFunc : validate1,
+											dateStatusFunc : validate1
+										}
+									);
+								</script>
+					To <input readonly="readonly" size="10" id="to" name="Filter" value="" type="to">
+						<img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" valign="top" border="0" hspace="0" vspace="0">
+							<script type="text/javascript">
+								function validate2(date) {
+									var day = date.getDate();
+									var month = date.getMonth() + 1;
+									var year = date.getFullYear();
+									var weekDay = date.getDay();
+									var dayMonth = month + '-' + day;
+									var dateString = year + '-' + month + '-' + day;
+									var dateFrom = document.getElementById('from').value.split("-");
+									var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
+									if (limitDate > date) {
+										return true;
+									} else {
+										return false;
+									}
+								}
+		
+								Calendar.setup(
+									{
+										inputField : "to",
+										ifFormat : "%Y-%m-%d",
+										button : "openCalendarTo",
+										disableFunc : validate2,
+										dateStatusFunc : validate2
+									}
+								);
+							</script>
+				</td>
+			</tr>
+	</table>
+	
+	<div id="bloc25">
+		<h3 class="parameters"> Output </h3>
+		<input type="radio" checked name="output" value="screen" > To screen into the browser
+		<br>
+		<input type="radio" name="output" value="file"> To file <input type="text" name="basename" value="Export"> into an application  
+		<!-- TMPL_VAR NAME="CGIextChoice" -->
+		<!-- TMPL_VAR NAME="CGIsepChoice" -->
+	</p>
+	</div>
+	<p>
+	<input TYPE="submit" value="OK" class="button parameters">
+	<input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->">
+	<input type="hidden" name="do_it" value="1">
+	</form>
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/admin/z3950servers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/admin/z3950servers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/admin/z3950servers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/admin/z3950servers.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,294 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: <!-- TMPL_IF NAME="else" -->z39.50 Servers<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME=searchfield -->Modify z39.50 Server <!-- TMPL_VAR NAME="searchfield" --><!-- TMPL_ELSE -->Add z39.50 Server<!-- /TMPL_IF --><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirm" -->Confirm Deletion<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="add_validate" -->z39.50 Server Added<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="delete_confirmed" -->z39.50 Server Deleted<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><!-- TMPL_IF NAME="add_form" -->
+        <script language="JavaScript" type="text/javascript">
+        //
+        function isNotNull(f,noalert) {
+                if (f.value.length ==0) {
+                    return false;
+                }
+                return true;
+        }
+        //
+        function toUC(f) {
+                var x=f.value.toUpperCase();
+                f.value=x;
+                return true;
+        }
+        //
+        function isNum(v,maybenull) {
+        var n = new Number(v.value);
+        if (isNaN(n)) {
+                return false;
+                }
+        if (maybenull==0 && v.value=='') {
+                return false;
+        }
+        return true;
+        }
+        //
+        function isDate(f) {
+                var t = Date.parse(f.value);
+                if (isNaN(t)) {
+                       return false;                       
+                }
+        }
+        //
+        function Check(f) {
+                var ok=1;
+                var _alertString="";
+                var alertString2;
+                if (f.searchfield.value.length==0) {
+                        _alertString += "- site name missing\n";
+                }
+                if (f.host.value.length==0) {
+                        _alertString += "- host missing\n";
+                }
+                if (f.port.value.length==0) {
+                        _alertString += "- port missing\n";
+                }
+                if (f.db.value.length==0) {
+                        _alertString += "- database missing\n";
+                }
+                if (isNaN(f.port.value)) {
+                        _alertString += "- port must be a number\n";
+                }
+                if (isNaN(f.rank.value)) {
+                        _alertString += "- rank must be a number\n";
+                }
+                if (isNaN(f.checked.value) || f.checked.value<0 || f.checked.value>1) {
+                        _alertString += "- checked must be 0 or 1\n";
+                }
+                if (_alertString.length==0) {
+                        document.Aform.submit();
+                } else {
+                        alertString2 = "Form not submitted because of the following problem(s)\n";
+                        alertString2 += "------------------------------------------------------------------------------------\n\n";
+                        alertString2 += _alertString;
+                        alert(alertString2);
+                }
+        }
+        </script>
+
+       
+        <form action="<!-- TMPL_VAR NAME="script_name" -->" name="Aform" method="post">
+        <input type="hidden" name="op" value="add_validate" />
+<!-- TMPL_IF NAME=searchfield -->
+                <h1>Modify Z39.50 Server</h1>
+        <!-- TMPL_ELSE -->
+                <h1>Add Z39.50 Server</h1>
+        <!-- /TMPL_IF -->                
+        <div class="data"><table>
+        <!-- TMPL_IF NAME=searchfield -->
+                <tr>
+                        <th>Display Name</th>
+                        <td>
+                                <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
+                        </td>
+                </tr>
+        <!-- TMPL_ELSE -->
+                <tr>
+                        <th>Display name</th>
+                        <td>
+                                <input type="text" name="searchfield" size="65" maxlength="100"  />
+                        </td>
+                </tr>
+        <!-- /TMPL_IF -->
+
+		<tr>
+			<th>Z3950 server</th>
+			<td>
+				<input type="text" name="host" size="30" value="<!-- TMPL_VAR NAME="host" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Port</th>
+			<td>
+				<input type="text" name="port" size="5" value="<!-- TMPL_VAR NAME="port" -->" onblur="isNum(this)" />
+			</td>
+		</tr>
+		<tr>
+			<th>Database</th>
+			<td>
+				<input type="text" name="db" value="<!-- TMPL_VAR NAME="db" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Userid</th>
+			<td>
+				<input type="text" name="userid" value="<!-- TMPL_VAR NAME="userid" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Password</th>
+			<td>
+				<input type="text" name="password" value="<!-- TMPL_VAR NAME="password" -->" />
+			</td>
+		</tr>
+		<tr>
+			<th>Checked (searched by default)</th>
+			<td>
+				<!-- TMPL_VAR NAME="checked" -->  
+			</td>
+		</tr>
+	<tr>
+			<th>Show in OPAC</th>
+			<td>
+				<!-- TMPL_VAR NAME="opacshow" -->
+			</td>
+			</tr>
+		<tr>
+			<th>Search this as online database</th>
+			<td>
+				<!-- TMPL_VAR NAME="onlinecatalog" -->
+			</td>
+		</tr>	
+			<tr>
+			<th>Rank (display order)</th>
+			<td>
+				<input type="text" name="rank" size="4" value="<!-- TMPL_VAR NAME="rank" -->" onblur="isNum(this)" />
+			</td>
+		</tr>
+				<tr>
+			<th>Syntax (z3950 can send<br>
+			 records in various format. Choose one)</th>
+			<td>
+				<select name="syntax">
+					<option value="USMARC">USMARC</option>
+					<option value="UNIMARC">UNIMARC</option>
+				</select>
+			</td>
+		</tr>
+        </table></div><input type="button" value="<!-- TMPL_IF NAME=searchfield -->Update Z39.50 Server<!-- TMPL_ELSE -->Add Z39.50 Server<!-- /TMPL_IF -->" onclick="Check(this.form)" class="submit" />  <input type="button" class="cancel" value="Cancel" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->';" />
+        </form>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="add_validate" -->
+<h3>Z39.50 Server Added</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="submit" value="OK" class="submit" />
+        </form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirm" -->
+	<!-- TMPL_VAR NAME="reqsel" -->
+<h3>Confirm Deletion of Server <em><!-- TMPL_VAR NAME="searchfield" --></em></h3>	
+        <table>
+                <tr>
+                        <td>Display name</td>
+                        <td>
+                                <!-- TMPL_VAR NAME="searchfield" -->
+                        </td>
+                </tr>
+                <tr>
+                        <td>Z3950 host</td>
+                        <td><!-- TMPL_VAR NAME="host" --></td>
+                </tr>
+                <tr>
+                        <td>Port</td>
+                        <td><!-- TMPL_VAR NAME="port" --></td>
+                </tr>
+                <tr>
+                        <td>Database</td>
+                        <td><!-- TMPL_VAR NAME="db" --></td>
+                </tr>
+                <tr>
+                        <td>Userid</td>
+                        <td><!-- TMPL_VAR NAME="userid" --></td>
+                </tr>
+                <tr>
+                        <td>Password</td>
+                        <td><!-- TMPL_VAR NAME="password" --></td>
+                </tr>
+                <tr>
+			<th>This is an online database</th>
+			<td>
+				<!-- TMPL_VAR NAME="onlinecatalog" -->
+			</td>
+		</tr>
+                <tr>
+                        <td>Rank</td>
+                        <td><!-- TMPL_VAR NAME="rank" --></td>
+                </tr>
+                <tr>
+                        <td>                <div class="tabitem"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                        <input type="hidden" name="op" value="delete_confirmed" />
+                        <input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" /><input type="submit" value="Delete this Server" class="cancel" /></form> <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="Do Not Delete" class="submit" /></form></div></td>
+                </tr>
+	</table>
+
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="delete_confirmed" -->
+<h3>Z39.50 Server Deleted</h3>
+<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="submit" value="OK" class="submit" />
+</form></div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="else" -->
+<h3>Z39.50 Servers Admininistration</h3>
+         <form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+                <input type="text" name="description" value="<!-- TMPL_VAR NAME="searchfield" -->" />
+                <input type="submit" name="search" value="Search" class="submit" />
+        </form>
+<div id="results">        <!-- TMPL_IF NAME="searchfield" -->
+                You searched for <b><!-- TMPL_VAR NAME="searchfield" --></b>
+        <!-- /TMPL_IF --></div>		
+<table>
+                <tr>
+                        <th>Site</th>
+                        <th>Hostname/Port</th>
+                        <th>Database</th>
+                        <th>Userid</th>
+                        <th>Password</th>
+                        <th>Checked</th>
+                        <th>Rank</th> 
+	<th>Show in Opac</th> 
+	<th>Online database</th>            
+						<th>Syntax</th>
+                        <th colspan="2">&nbsp;</th>
+                </tr>
+                <!-- TMPL_LOOP NAME="loop" -->
+               <!-- TMPL_IF NAME="toggle" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
+                        <td><!-- TMPL_VAR NAME="name" --></td>
+                        <td><!-- TMPL_VAR NAME="host" -->:<!-- TMPL_VAR NAME="port" --></td>
+                        <td><!-- TMPL_VAR NAME="db" --></td>
+                        <td><!-- TMPL_VAR NAME="userid" --></td>
+                        <td><!-- TMPL_VAR NAME="password" --></td>
+                        <td><!-- TMPL_IF NAME="checked" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+                        <td><!-- TMPL_VAR NAME="rank" --></td>
+				<td><!-- TMPL_IF NAME="opacshow" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+		<td><!-- TMPL_IF NAME="onlinecatalog" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+
+						<td><!-- TMPL_VAR NAME="syntax" --></td>
+                        <td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="name" -->" /><input type="submit" class="submit" value="Edit" /></form></td>
+                        <td><form action="<!-- TMPL_VAR name="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="name" -->" /><input type="submit" class="delete" value="Delete" /></form></td>                
+			</tr>
+                <!-- /TMPL_LOOP -->
+	</table>
+<div class="tabitem">
+<!-- TMPL_IF NAME="offsetgtzero" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="prevpage" -->" />
+	<input type="submit" value="&lt;&lt; Prev" class="submit">
+</form><!-- /TMPL_IF -->
+<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
+        <input type="hidden" name="op" value="add_form" />
+		<input type="submit" value="Add z39.50 Server" class="submit" />
+</form>
+<!-- TMPL_IF NAME="ltcount" --><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get">
+	<input type="hidden" name="offset" value="<!-- TMPL_VAR NAME="nextpage" -->" />
+	<input type="submit" value="Next &gt;&gt;" class="submit" />
+</form> <!-- /TMPL_iF -->
+ </div>
+
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/auth_finder.tmpl	26 Mar 2007 02:19:21 -0000	1.10.2.1
@@ -0,0 +1,54 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="authorities-topmenu.inc" -->
+
+
+<div id="main">
+
+<h1>Authority search</h1>
+
+<form name="f" method="post">
+	<input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
+	<input type="hidden" name="op" value="do_search">
+	<input type="hidden" name="type" value="author">
+	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
+	<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+	<div id="bloc25">
+		<h2 class="authority">Search on</h2>
+		<p>
+			<label class="label100">Authority type</label>
+			<!-- TMPL_VAR NAME="authtypecode" -->
+			<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->">
+		</p>
+		<p>
+			<label class="label100">Main heading(a)</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
+			<input type="hidden" name="marclist" value="mainentry">
+			<input type="hidden" name="and_or" value="and">
+			<input type="hidden" name="excluding" value="">
+			<select name="operator">
+				<option value="all">All words</option>
+				<option value="phrase">Phrase</option>
+			</select>
+			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+		</p>
+		<p>
+			<label class="label100">Sub heading</label><input type="text" name="value">
+			<input type="hidden" name="marclist" value="">
+			<input type="hidden" name="and_or" value="and">
+			<input type="hidden" name="excluding" value="">
+			<select name="operator">
+				<option value="all">All words</option>
+				<option value="phrase">Phrase</option>
+			</select>
+			
+		</p>
+		<p>
+			<input type="submit" value="Start search" class="button authority">
+		</p>
+	</div>
+</form>
+</div>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/auth_linker.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,58 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+
+<div id="main">
+
+<h1>Authority search</h1>
+
+<form name="f" method="post">
+	<input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
+	<input type="hidden" name="op" value="do_search">
+	<input type="hidden" name="type" value="author">
+	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->">
+	<div id="bloc25">
+		<h2 class="authority">Search on</h2>
+		<p>
+			
+<label for="authtypecode">Authority type</label></th><td><select id="authtypecode" name="authtypecode">
+			<!-- TMPL_LOOP NAME="authtypesloop" -->
+				<option value="<!-- TMPL_VAR NAME="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->>
+					<!-- TMPL_VAR NAME="authtypetext" -->
+				</option>
+			<!-- /TMPL_LOOP -->
+			</select>
+			
+		</p>
+		<p>
+			<label class="label100">Main heading(a)</label><input type="text" name="value" value="<!-- TMPL_VAR name="resultstring" -->">
+			<input type="hidden" name="marclist" value="mainentry">
+			<input type="hidden" name="and_or" value="and">
+			<input type="hidden" name="excluding" value="">
+			<select name="operator">
+				<option value="all">All words</option>
+				<option value="phrase">Phrase</option>
+			</select>
+			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+		</p>
+		<p>
+			<label class="label100">Sub heading</label><input type="text" name="value">
+			<input type="hidden" name="marclist" value="">
+			<input type="hidden" name="and_or" value="and">
+			<input type="hidden" name="excluding" value="">
+			<select name="operator">
+				<option value="all">All words</option>
+				<option value="phrase">Phrase</option>
+			</select>
+			<input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+		</p>
+		<p>
+			<input type="submit" value="Start search" class="button authority">
+		</p>
+	</div>
+</form>
+</div>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/authorities-home.tmpl	26 Mar 2007 02:19:21 -0000	1.7.2.1
@@ -0,0 +1,44 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="authorities-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+
+<form name="f" method="post">
+	<input type="hidden" name="op" value="do_search" />
+	<input type="hidden" name="type" value="intranet" />
+	<input type="hidden" name="stype" value="author" />
+	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
+<div class="data"><table>
+<caption>Authority search</caption>
+<tr><th><label for="authtypecode">Authority type</label></th><td><select id="authtypecode" name="authtypecode"  >
+			<!-- TMPL_LOOP NAME="authtypesloop" -->
+				<option value="<!-- TMPL_VAR NAME="value" -->" >
+					<!-- TMPL_VAR NAME="authtypetext" -->
+				</option>
+			<!-- /TMPL_LOOP -->
+			</select></td></tr>
+<tr><th><label id="mainentry">Main entry</label></th><td><select name="operator" id="mainentry">
+				<option value="all">All words</option>
+				<option value="phrase">Phrase</option>
+			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->" />
+			<input type="hidden" name="marclist" value="mainentry" />
+			
+			</td></tr>			
+<tr><th><label for="anywhere">Anywhere</label></th><td><select name="operator" id="anywhere">
+				<option value="all">All words</option>
+				<option value="phrase">Phrase</option>
+			</select> <input type="text" name="value" value="<!-- TMPL_VAR NAME="value" -->">
+			<input type="hidden" name="marclist" value="">
+			
+			</td></tr></table></div>
+		<p>
+			<input type="submit" value="Start search" class="submit">
+		</p>
+</form>
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/authorities.tmpl	26 Mar 2007 02:19:21 -0000	1.12.2.1
@@ -0,0 +1,340 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
+<!--TMPL_UNLESS NAME="nonav"--><!-- TMPL_INCLUDE NAME="masthead.inc" --><!--/TMPL_UNLESS-->
+<!-- TMPL_INCLUDE NAME="authorities-topmenu.inc" -->
+<!--TMPL_UNLESS NAME="nonav"--><!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" --><!--/TMPL_UNLESS-->
+
+
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/includes/marc-editor.css">
+<div id="main">
+<!-- TMPL_IF name="error" -->
+			<div class="error">
+				<!--TMPL_IF NAME="xmlerror"-->
+				<ul>
+					<li>Non UTF-8 characters present or malformed XML</li>
+					<li>Please correct and save.</li>
+				</ul>
+				<!--/TMPL_IF-->
+			</div>
+<!-- /TMPL_IF -->
+<form method="post" name="f" id="f" action="authorities.pl?authid=<!-- TMPL_VAR NAME="authid" -->&nonav=<!-- TMPL_VAR NAME="nonav" -->&linkid="+document.form.f.linkid.value >
+	
+<div class="tabitem">
+	<h1>Authority number <!-- TMPL_VAR NAME="authid" --></h1>
+	<p><input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->"><input type="hidden" name="index" value="<!-- TMPL_VAR NAME="index" -->">
+		<input type="hidden" name="op" value="add">
+		<input type="hidden" name="addfield_field">
+		<input type="hidden" name="authtypecode" value="<!-- TMPL_VAR NAME="authtypecode" -->">
+		<input type="hidden" name="authid" value="<!-- TMPL_VAR NAME="authid" -->">
+	<input type="hidden" name="linkid" id="linkid" value="0000">
+		<!-- TMPL_IF name="authid" -->
+			<input type="button" value="Save" onClick="Check(this.form)" accesskey="w" class="button authority">
+		<!-- TMPL_ELSE -->
+			<input type="button" value="Add authority" onClick="Check(this.form)" accesskey="w" class="button authority">
+		<!-- /TMPL_IF -->
+	</p>
+</div>
+<br>
+	<div class="tabs">
+        <!-- TMPL_LOOP name="BIG_LOOP" -->
+            <a href="#" onclick="active(<!-- TMPL_VAR name="number"-->); return false;" id="link<!-- TMPL_VAR name="number"-->"><!-- TMPL_VAR name="number"--></a>
+        <!--  /TMPL_LOOP -->
+	</div>
+
+
+<! -- RESET PAGINATION -->
+<!-- TMPL_LOOP name="BIG_LOOP" -->
+<!-- hide every tab except the 1st -->
+<!-- TMPL_IF name="number" -->
+    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:hidden">
+<!-- TMPL_ELSE -->
+    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:visible">
+<!-- /TMPL_IF -->
+<!-- TMPL_UNLESS name="number" -->
+    <!-- show duplicate warning on tab 0 only -->
+<!-- TMPL_IF name="duplicateauthid" -->
+			<div class="error">
+				<p>Is this a duplicate of <a href="detail.pl?authid=<!-- TMPL_VAR name="duplicateauthid" -->&nonav=<!-- TMPL_VAR name="nonav" -->" onclick="openWindow('detail.pl?nonav=<!-- TMPL_VAR name="nonav" -->&authid=<!-- TMPL_VAR name="duplicateauthid" -->&popup=1', ''; return false;)"><!-- TMPL_VAR name="duplicateauthvalue" --></a>?</p>
+				
+				<ul>
+					
+					<li>If not, click to <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> <a href="#" onclick="confirmnotdup(); return false;">Confirm it's not a duplicate</a></li>
+				</ul>
+			</div>
+		<!-- /TMPL_IF -->
+  <!-- /TMPL_UNLESS -->
+    <!-- TMPL_LOOP NAME="innerloop" -->
+		<div style=";" id="tag<!-- TMPL_VAR name="tag"-->">
+        <!-- TMPL_IF name="tag" -->
+        <p class="MARCtag">
+            <input type="hidden" name="ind_tag" value="<!-- TMPL_VAR NAME="tag" -->">
+            <!-- TMPL_UNLESS name="hide_marc" -->
+                <a title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></a>
+                <input tabindex="1" onblur="this.style.backgroundColor='#ffffff';" onfocus="this.style.backgroundColor='#ffff00;'" type="text" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" size="2" maxlength="2" value="<!-- TMPL_VAR NAME="indicator" -->" class="flat"> -
+            <!-- TMPL_ELSE -->
+                <input tabindex="1" type="hidden" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" value="<!-- TMPL_VAR NAME="indicator" -->">
+            <!-- /TMPL_UNLESS -->
+            <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
+            <!-- TMPL_VAR NAME="tag_lib" -->
+            <!-- /TMPL_UNLESS -->
+            <!-- TMPL_IF name="repeatable" --><a href="javascript:AddField('<!-- TMPL_VAR NAME="tag" -->')">+</a><!-- /TMPL_IF -->
+        </p>
+        <!-- /TMPL_IF -->
+        <!-- TMPL_LOOP NAME="subfield_loop" -->
+            <!-- TMPL_IF NAME="visibility" -->
+                <a tabindex="1" style="color: grey; font-size: 80%; cursor: se-resize;" id="label<!-- TMPL_VAR name="index" -->" onclick="unHideSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->','label<!-- TMPL_VAR name="index" -->')">
+                    <!-- TMPL_VAR NAME="subfield" -->
+                </a>
+            <!-- /TMPL_IF -->
+            <div style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='index' -->">
+                <p>
+                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
+                    <label <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> class="labelsubfield">
+                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_UNLESS name="hide_marc" -->
+                    <img style="cursor: crosshair; color: grey; font-size: 80%;" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> src="<!-- TMPL_VAR NAME="themelang" -->/images/up.png" onclick="upSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')"/>
+                        <input title="<!-- TMPL_VAR NAME="marc_lib_plain" -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" DISABLE READONLY tabindex=-1 />
+                <!-- TMPL_ELSE -->
+                    <input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->"/>
+                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
+                    <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF -->
+                    <!-- TMPL_VAR NAME="marc_lib" -->
+                    <!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF -->
+                    </label>
+                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_VAR NAME="marc_value" -->
+                <!-- TMPL_IF NAME="repeatable" -->
+                    <a style="cursor: crosshair; color: grey; font-size: 80%;" onclick="cloneSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')">+</a>
+                <!-- /TMPL_IF -->
+                <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->"/>
+                <input type="hidden" name="subfieldYYY" value="<!-- TMPL_VAR NAME="subfield" -->" size="2" maxlength="1"/>
+                <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"/>
+                <input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->"/>
+                </p>
+            </div>
+        <!-- /TMPL_LOOP -->
+        </div>
+    <!-- /TMPL_LOOP -->
+    </div>
+<!-- /TMPL_LOOP -->
+		<div name="hidden" id="hidden" class="tab">
+		<!-- TMPL_LOOP NAME="hidden_loop" -->
+				<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->">
+				<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->">
+				<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->">
+				<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
+		<!-- /TMPL_LOOP -->
+		</div>
+		<!-- TMPL_IF name="oldauthnumtagfield" -->
+			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthnumtagfield" -->">
+			<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="oldauthnumtagsubfield" -->">
+			<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authid" -->">
+			<input type="hidden" name="mandatory" value="0">
+			<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
+			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldauthtypetagfield" -->">
+			<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="oldauthtypetagsubfield" -->">
+			<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="authtypecode" -->">
+			<input type="hidden" name="mandatory" value="0">
+			<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
+
+		<!-- /TMPL_IF -->
+	</form>
+<script language="JavaScript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+function confirmnotdup(){
+	document.getElementById("confirm_not_duplicate").value = 1;
+	var checkform =	document.getElementById("f");
+	Check(checkform);
+}
+function active(numlayer)
+{
+	for (i=0; i <= 9 ; i++ ) {
+		ong = i+"XX";
+		link = "link"+i;
+		if (numlayer==i) {
+			with(document){
+			if (document.getElementById(ong)){
+				document.getElementById(ong).style.visibility="visible";
+			}
+			if(document.getElementById(link)){
+				document.getElementById(link).style.color="#000066";
+				document.getElementById(link).style.backgroundColor="#FFFFCC";
+			}
+			}
+		} else {
+			with(document){
+			if (document.getElementById(ong)){
+				document.getElementById(ong).style.visibility="hidden";
+			}
+			if (document.getElementById(link)) {
+				document.getElementById(link).style.color="#669999";
+				document.getElementById(link).style.backgroundColor="#D8DEB8";
+			}
+			}
+		}
+	}
+}
+active(0);
+function Check(f) {
+	document.body.style.cursor ="wait";
+	// Scan for nonempty fields
+	var field_is_nonempty_p = new Array();
+	for (i=0 ; i<f.field_value.length ; i++) {
+	    field_is_nonempty_p[f.tag[i].value] = 0;
+	}
+	for (i=0 ; i<f.field_value.length ; i++) {
+	    if (f.field_value[i].value.length != 0) {
+		field_is_nonempty_p[f.tag[i].value] += 1;
+	    }
+	}
+
+	// Scan for missing mandatory subfields
+	var total_missing_mandatory_subfields = 0;
+	var missing_mandatory_subfields = new Array();
+	for (i=0 ; i<f.field_value.length-2 ; i++) {
+		if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
+		    // We should not flag an error unless the tag is also
+		    // mandatory, or if something else in the tag is entered
+
+		    if (f.tag_mandatory[i].value == 1 || field_is_nonempty_p[f.tag[i].value]) {
+				f.field_value[i].style.backgroundColor="#FF0000";
+				total_missing_mandatory_subfields++;
+			if (f.field_value[i].parentNode.tagName == "B")
+			{
+				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+			}
+			else
+			{
+				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+			}
+
+			}
+		} else {
+			f.field_value[i].style.backgroundColor="#FFFFFF";
+		}
+	}
+
+	// Scan for missing mandatory tags
+	var total_missing_mandatory_tags = 0;
+	var seen_mandatory_tag_p = new Array();
+	var missing_mandatory_tags = new Array();
+	for (i=0 ; i<f.field_value.length ; i++) {
+	    var j = f.tag[i].value;
+	    if (!field_is_nonempty_p[j] && f.tag_mandatory[i].value == 1) {
+		if (seen_mandatory_tag_p[j] != 1) {
+		    seen_mandatory_tag_p[j] = 1;
+		    total_missing_mandatory_tags++;
+ 		    if (f.field_value[i].parentNode.tagName == "B")
+		    {
+				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+		    }
+		    else
+		    {
+				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+			}
+		}
+		f.field_value[i].style.backgroundColor="#FFFF00";
+	    }
+	}
+
+	var total_errors = total_missing_mandatory_tags + total_missing_mandatory_subfields;
+	var alertString2;
+	if (total_errors!=0) {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += "\n- "+ total_missing_mandatory_tags +_(" mandatory tags empty");
+		for (i=0; i<missing_mandatory_tags.length; i++)
+		{
+			alertString2 += "\n--->"+ missing_mandatory_tags[i];
+		}
+  		alertString2 += "\n- "+ total_missing_mandatory_subfields +_(" mandatory fields empty (see bold subfields)");
+		for (i=0; i<missing_mandatory_subfields.length; i++)
+		{
+			alertString2 += "\n--->"+ missing_mandatory_subfields[i];
+		}
+		alert(alertString2);
+	} else {
+		document.forms['f'].submit();
+	}
+}
+function Dopop(link,id) {
+ var subf=document.getElementsByName('subfield'+id);
+var fields=document.getElementsByName('field_value'+id);
+var defaultvalue="";
+	for (var s=0; s<fields.length; s++){
+		if (subf.item(s).value == 'a'){
+		defaultvalue=fields.item(s).value;
+		}
+	}
+
+	newin=window.open(link+"&result="+defaultvalue,"",'width=550,height=550,toolbar=false,scrollbars=yes');
+
+}
+
+
+function AddField(field) {
+	document.forms['f'].op.value = "addfield";
+	document.forms['f'].addfield_field.value=field;
+	document.f.submit();
+}
+
+function cloneSubfield(index) {
+ var original = document.getElementById(index);
+ var clone = original.cloneNode(true);
+ clone.setAttribute("id", index + index); 
+// orginput : the value of the original field (in [0] if hide_marc=1, otherwise in [1]
+// image : the up button. don't exist is hide_marc=1
+ <!-- TMPL_IF name="hide_marc" -->
+	var orginput = original.getElementsByTagName('input')[0];
+ <!-- TMPL_ELSE -->
+ 	var orginput = original.getElementsByTagName('input')[1];
+	image = clone.getElementsByTagName('img')[0];
+	image.setAttribute("onclick","upSubfield('" + index + index + "')");
+ <!-- /TMPL_IF -->
+ trigger = original.getElementsByTagName('a')[0];
+ if (trigger) {
+ 	trigger.parentNode.removeChild(trigger);
+ }
+ clonetrigger = clone.getElementsByTagName('a')[0];
+ clonetrigger.setAttribute("onclick","cloneSubfield('" + index + index + "')");
+ clone.setAttribute("tabindex","1");
+ orginput.value = '';
+ original.parentNode.insertBefore( clone, original); 
+}
+
+function upSubfield(index) {
+	try{
+		var line = document.getElementById(index); // get the line where the user has clicked.
+	} catch(e) {
+		return;
+	}
+	var tag = line.parentNode; // get the dad of this line. (should be "<div tag=XXX>")
+	
+	// getting all subfields for this tag
+	var subfields = tag.getElementsByTagName('div');
+	var subfieldsLength = subfields.length;
+	if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
+	// among all subfields 
+	for(var i=0;i<subfieldsLength;i++){ 
+		if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
+			if(i==0){ // if the clicked subfield is on the top
+				tag.appendChild(subfields[0]);
+				return;
+			}else{
+				var lineAbove = subfields[i-1];
+				tag.insertBefore(line,lineAbove);
+				return;
+			}
+		}
+	}
+}
+
+function unHideSubfield(index,labelindex) {
+	subfield = document.getElementById(index);
+	subfield.style.display = 'block';
+	label = document.getElementById(labelindex);
+	label.style.display='none';	
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-biblio-search.tmpl	26 Mar 2007 02:19:21 -0000	1.8.2.1
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<html>
+<body>
+
+<script language="JavaScript" type="text/javascript">
+
+function goforward()
+{
+var start = <!-- TMPL_VAR NAME="index">;
+var subfields=opener.opener.document.getElementsByName('subfield'+start);
+var fields=opener.opener.document.getElementsByName('field_value'+start);
+// go forward, until reaching the end of the field.
+for  (var i=0; i<fields.length; i++) {
+	if ( subfields.item(i).value == '<!-- TMPL_VAR NAME="linkidsubfield">') {
+		fields.item(i).value = "<!-- TMPL_VAR NAME="authid">";
+	}
+	<!-- TMPL_LOOP NAME="0XX" -->
+		<!-- TMPL_LOOP NAME="subfield" -->
+			if (subfields.item(i).value == '<!-- TMPL_VAR NAME="marc_subfield" -->') 
+			{
+				fields.item(i).value = "<!-- TMPL_VAR NAME="marc_value" -->";
+			}
+		<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+}
+
+	opener.close();
+	self.close();
+	return false;
+
+
+}
+</script>
+<script language="javascript" type="text/javascript">
+window.onload=goforward();
+</script>
+
+
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/blinddetail-linker.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,29 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<html>
+<body>
+<script language="JavaScript" type="text/javascript">
+
+function go()
+{
+var index_start = <!-- TMPL_VAR NAME="index" -->;
+var whichfield = opener.opener.document.f.tag[index_start].value;
+i=index_start
+//try to fill authid as linkid to be used for linking authorities
+//opener.opener.document.f.linkid.value="<!-- TMPL_VAR NAME="authid"-->";
+
+// go forward, until reaching the end of the field.
+				opener.opener.document.f.field_value[i].value = "<!-- TMPL_VAR NAME="authid" -->";
+
+	opener.close();
+	self.close();
+	return false;
+
+
+}
+</script>
+<script language="javascript" type="text/javascript">
+window.onload = go();
+</script>
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/authorities/detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/detail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/detail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/detail.tmpl	26 Mar 2007 02:19:21 -0000	1.7.2.1
@@ -0,0 +1,50 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities 
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!--TMPL_UNLESS NAME="nonav"--><!-- TMPL_INCLUDE NAME="masthead.inc" --><!--/TMPL_UNLESS-->
+<!-- TMPL_INCLUDE NAME="authorities-topmenu.inc" -->
+<!--TMPL_UNLESS NAME="nonav"--><!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" --><!--/TMPL_UNLESS-->
+
+
+<div id="main">
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/includes/marc-editor.css">
+<div class="tabbed"><input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
+	<h1>Authority number : <!-- TMPL_VAR NAME="authid" --> in <!-- TMPL_VAR NAME="authtypetext" --></h1>
+	<a href="authorities.pl?authid=<!-- TMPL_VAR NAME="authid" -->&nonav=<!-- TMPL_VAR NAME="nonav" -->&authtypecode=<!-- TMPL_VAR name="authtypecode" -->"><img border="0" src="<!-- TMPL_VAR NAME="themelang" -->/../images/fileopen.gif" alt="Edit"></a>
+	<!--TMPL_UNLESS NAME="nonav"--><a href="javascript:confirm_deletion()">
+		<img border="0" src="<!-- TMPL_VAR NAME="themelang" -->/../images/erase.gif" alt="Delete"></a>
+	<a href="javascript:Dopop('detailprint.pl?authid=<!-- TMPL_VAR NAME="authid" -->')"><img border="0" src="<!-- TMPL_VAR NAME="themelang" -->/../images/print.gif" alt="Print"></a>
+	<!--/TMPL_UNLESS--><!--TMPL_IF NAME="count"-->&nbsp;<a href="/cgi-bin/koha/catalogue/catalogue-search.pl?value=<!-- TMPL_VAR NAME="authid" -->&kohafield=authid&amp;op=do_search&amp;zoom=1" class="button authority">Used in <!-- TMPL_VAR NAME="count" --> biblio(s)</a><!--/TMPL_IF-->
+</div>
+
+<div name="0XX" id="0XX" class="tab" style="visibility:visible">
+	<!-- TMPL_LOOP NAME="0XX" -->
+			<p class="MARCtag">
+				<!-- TMPL_VAR NAME="tag" -->
+			</p>
+		<!-- TMPL_LOOP NAME="subfield" -->
+			<p>
+				<label class="labelsubfield">
+				<a href="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->&marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_VAR NAME="marc_subfield" -->&and_or=and&excluding=&operator=all&stype=author&value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">
+					<img border="0" src="<!-- TMPL_VAR NAME="themelang" -->/../images/lupe.gif" height="15" alt="Search">
+				</a>
+				<!-- TMPL_VAR NAME="marc_subfield" -->
+				<!-- TMPL_VAR NAME="marc_lib" --></label>
+				<!-- TMPL_VAR NAME="marc_value" -->
+			</p>
+		<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+</div>
+	
+<script language="JavaScript" type="text/javascript">
+
+function confirm_deletion() {
+	var is_confirmed = confirm('Are you sure you want to delete this biblio?');
+	if (is_confirmed) {
+		window.location="authorities.pl?op=delete&authid=<!-- TMPL_VAR NAME="authid" -->&nonav=<!-- TMPL_VAR NAME="nonav" -->";
+	}
+}
+function Dopop(link) {
+	newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/linkresultlist-auth.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,94 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<div id="main">
+	<h1 class="authority">Authority search results</h1>
+		<div id="resultnumber">
+			<p>
+				<!-- TMPL_IF name="displayprev" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif"  border="0">
+					</a>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_LOOP NAME="numbers" -->
+					<!-- TMPL_IF name="highlight" -->
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+					<!-- TMPL_ELSE -->
+						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
+							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+					<!-- /TMPL_IF -->
+				<!-- /TMPL_LOOP -->
+				<!-- TMPL_IF name="displaynext" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
+				<!-- /TMPL_IF -->
+			</p>
+			<p>
+				<!-- TMPL_IF name="total" -->
+					&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
+				<!-- TMPL_ELSE -->
+					&nbsp;No results found.<br>
+				<!-- /TMPL_IF -->
+			</p>
+		</div>
+		<div id="resultlist">
+			<table>
+				<tr>
+					<th class="authority">Summary</th>
+					<th class="authority">Used</th>
+					<th class="authority">Get It!</th>
+					
+				</tr>
+				<tr>
+					<td>Clear any entry</td>
+					<td>&nbsp;</td>
+					<td>
+						<a href="javascript:jumpfull('blinddetail-linker.pl?authid=0&amp;index=<!-- TMPL_VAR NAME="index" -->&amp;authtypecode=<!-- TMPL_VAR NAME="authtypecode" -->')" class="button authority">
+							Clear
+						</a>
+					</td>
+				<!-- TMPL_LOOP NAME="result" -->
+					<tr>
+						<td><!-- TMPL_VAR NAME="summary" --></td>
+						<td><!-- TMPL_VAR NAME="used" --> times</td>
+						<td>
+							<a href="javascript:jumpfull('blinddetail-linker.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
+						</td>
+							</tr>
+				<!-- /TMPL_LOOP -->
+			</table>
+	
+		</div>
+		<div id="resultnumber">
+			<p>
+				<!-- TMPL_IF name="displayprev" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
+					</a>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_LOOP NAME="numbers" -->
+					<!-- TMPL_IF name="highlight" -->
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+					<!-- TMPL_ELSE -->
+						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
+							<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+					<!-- /TMPL_IF -->
+				<!-- /TMPL_LOOP -->
+				<!-- TMPL_IF name="displaynext" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0"></a>
+				<!-- /TMPL_IF -->
+			</p>
+		</div>	
+		<a href="auth_linker.pl?index=<!-- TMPL_VAR NAME="index" -->">Search again</a>
+	</div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+
+function jumpfull(page)
+{	
+	window.open(page,'','');
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist-auth.tmpl	26 Mar 2007 02:19:21 -0000	1.10.2.1
@@ -0,0 +1,95 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="authorities-topmenu.inc" -->
+
+<div id="main">
+	<h1 class="authority">Authority search results</h1>
+		<div id="resultnumber">
+			<p>
+				<!-- TMPL_IF name="displayprev" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif"  border="0">
+					</a>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_LOOP NAME="numbers" -->
+					<!-- TMPL_IF name="highlight" -->
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+					<!-- TMPL_ELSE -->
+						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
+							<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+					<!-- /TMPL_IF -->
+				<!-- /TMPL_LOOP -->
+				<!-- TMPL_IF name="displaynext" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=any&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author&index=<!-- TMPL_VAR NAME="index" -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/next.gif" border="0"></a>
+				<!-- /TMPL_IF -->
+			</p>
+			<p>
+				<!-- TMPL_IF name="total" -->
+					&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
+				<!-- TMPL_ELSE -->
+					&nbsp;No results found.<br>
+				<!-- /TMPL_IF -->
+			</p>
+		</div>
+		<div id="resultlist">
+			<table>
+				<tr>
+					<th class="authority">Summary</th>
+					<th class="authority">Used</th>
+					<th class="authority">Get It!</th>
+					<th class="authority">Edit It!</th>
+				</tr>
+				<tr>
+					<td>Clear any entry</td>
+					<td>&nbsp;</td>
+					<td>
+						<a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=0&amp;index=<!-- TMPL_VAR NAME="index" -->')" class="button authority">
+							Clear
+						</a>
+					</td>
+				<!-- TMPL_LOOP NAME="result" -->
+					<tr>
+						<td><!-- TMPL_VAR NAME="summary" --></td>
+						<td><!-- TMPL_VAR NAME="used" --> times</td>
+						<td>
+							<a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=<!-- TMPL_VAR NAME="authid" -->&amp;index=<!-- TMPL_VAR NAME="index" -->')"><img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/../images/arrow.gif" width="16" height="16" hspace="0" vspace="0" border="0"></a>
+						</td>
+						<td> <a href="/cgi-bin/koha/authorities/authorities.pl?nonav=<!-- TMPL_VAR NAME="nonav" -->&authid=<!-- TMPL_VAR NAME="authid" -->&index=<!-- TMPL_VAR NAME="index" -->&authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Edit<a/></td>
+					</tr>
+				<!-- /TMPL_LOOP -->
+			</table>
+	
+		</div>
+		<div id="resultnumber">
+			<p>
+				<!-- TMPL_IF name="displayprev" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif" border="0">
+					</a>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_LOOP NAME="numbers" -->
+					<!-- TMPL_IF name="highlight" -->
+						<img src="/intranet-tmpl/default/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+					<!-- TMPL_ELSE -->
+						<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
+							<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0"></a>
+					<!-- /TMPL_IF -->
+				<!-- /TMPL_LOOP -->
+				<!-- TMPL_IF name="displaynext" -->
+					<a href="auth_finder.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->&and_or=and&operator=contains&value=<!-- TMPL_VAR NAME="resultstring" -->&op=do_search&type=intranet&stype=author">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/numbers/next.gif" border="0"></a>
+				<!-- /TMPL_IF -->
+			</p>
+		</div><a href="auth_finder.pl?index=<!-- TMPL_VAR NAME="index" -->&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">Search again</a>	
+	</div>
+</div>
+
+<script language="JavaScript" type="text/javascript">
+
+function jumpfull(page)
+{	
+	window.open(page,'','');
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/authorities/searchresultlist.tmpl	26 Mar 2007 02:19:21 -0000	1.11.2.1
@@ -0,0 +1,110 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Authorities
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="authorities-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<h1 class="authority">Authority search results</h1>
+	<div id="resultnumber">
+		<p>
+			<!-- TMPL_IF name="displayprev" -->
+				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif" border="0">
+				</a>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME="numbers" -->
+				<!-- TMPL_IF name="highlight" -->
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+					<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
+					</a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF name="displaynext" -->
+				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/next.gif" border="0">
+				</a>
+				<!-- /TMPL_IF -->
+		</p>
+		<p>
+			<!-- TMPL_IF name="total" -->
+			&nbsp;<b>Results <!-- TMPL_VAR NAME="from" --> to <!-- TMPL_VAR NAME="to" --> of <!-- TMPL_VAR NAME="total" --></b><br><br>
+			<!-- TMPL_ELSE -->
+			&nbsp;No results found.<br>
+			<!-- /TMPL_IF -->
+		</p>
+	</div>
+	<div id="resultlist">
+		<table>
+			<tr>
+				<th class="authority">Summary</th>
+				<th class="authority">Used in</th>
+				<th class="authority">Authid/Delete</th>
+				
+			</tr>
+			<!-- TMPL_LOOP NAME="result" -->
+				<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
+				
+					<td><!-- TMPL_VAR NAME="summary" --></td>
+					<td><a href="/cgi-bin/koha/catalogue/catalogue-search.pl?kohafield=authid&amp;value=<!-- TMPL_VAR NAME="authid" -->&amp;op=do_search&amp;zoom=1" class="button authority"><!-- TMPL_VAR NAME="used" --> biblio(s)</a></td>
+					
+					<td><!-- TMPL_VAR NAME="authid" -->&nbsp;
+						<!-- TMPL_UNLESS name="used" -->
+						<a href="javascript:do_delete('authorities-home.pl?op=delete&authid=<!-- TMPL_VAR NAME="authid" -->')">Delete</a>
+						<!-- /TMPL_UNLESS -->
+					</td>
+					
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+	</div>
+	<div id="resultnumber">
+		<p>
+			<!-- TMPL_IF name="displayprev" -->
+				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/prev.gif" border="0">
+				</a>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME="numbers" -->
+				<!-- TMPL_IF name="highlight" -->
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+					<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
+					</a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF name="displaynext" -->
+				<a href="authorities-home.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&amp;<!-- TMPL_LOOP NAME="searchdata" --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="val" ESCAPE=URL -->&amp;<!-- /TMPL_LOOP -->&amp;resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&amp;type=intranet&amp;stype=author&amp;op=do_search&amp;authtypecode=<!-- TMPL_VAR name="authtypecode" -->">
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/../images/numbers/next.gif" border="0">
+				</a>
+				<!-- /TMPL_IF -->
+		</p>
+	</div>	
+<form name"m" id="m">
+
+From:<input type="text" size="10" name="mergefrom" id="mergefrom" value=""/>&nbsp;&nbsp;To:<input type="text" size="10" id="mergeto" name="mergeto" value=""/>
+<input type="button" class="submit" value="Merge" onclick="do_merge(); return false;" /></form>
+					
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+
+
+<script language="JavaScript" type="text/javascript" >
+function do_delete(page)
+{
+window.location = page;
+}
+function do_merge(page)
+{
+
+X = document.forms['m'].elements['mergefrom'].value;
+	Y = document.forms['m'].elements['mergeto'].value;
+var is_confirmed = confirm('Merging from ID:'+X+'  to ID: '+Y+' .Confirm?');
+	if (is_confirmed) {
+window.location="authorities-home.pl?op=merge&mergefrom="+X+"&mergeto="+Y;
+}
+}
+</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/barcodes/barcodes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/barcodes/barcodes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/barcodes/barcodes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/barcodes/barcodes.tmpl	26 Mar 2007 02:19:21 -0000	1.5.2.1
@@ -0,0 +1,104 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Advanced Search<!-- TMPL_INCLUDE NAME="doc-head-barcodes-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+
+
+
+<div class="data">
+	<h1>Barcodes Generator</h1>
+	<ul>
+		<li>Insert 6 digit new barcode to generate 10 digit new barcodes. </li>
+		<li>Existing barcodes can be regenerated by inserting as a series or individually.</li>
+		
+	</ul>
+
+	<form id="formulario" method="POST" action="/cgi-bin/koha/barcodes/barcodes.pl" name="form1" onsubmit="return checkFields(this);" >
+		
+		<table class="myTable" border="1"'
+		<input type="hidden" id="labelsconfigs" name="labelsconfigs" value="<!--TMP_VAR NAME='labelsconfig'-->">
+		<caption>Generate barcodes </caption>
+			<!-- TMPL_IF NAME="ERROR" -->
+			<tr>
+				<td colspan="2">
+					<p class="error">This barcode does not exist.</p>
+				</td>
+			</tr>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="tmpFileName" -->
+			<tr>
+				<td colspan="2">
+					<p class="error">Barcodes are saved as <!-- TMPL_VAR NAME="tmpFileName" -->  </p>
+					<a href="/uploaded-files/tmp-pdf/<!-- TMPL_VAR NAME="tmpFileName" -->" target="_blank">Click to view</a>
+				</td>
+			</tr>
+			<!-- /TMPL_IF -->
+  			<tr>
+				<td><label for="rangeType">Type:</label> <!-- TMPL_VAR NAME="RANGE_TYPE" --></td>
+				<td> 
+					<div id="continuous" class="panel" style="display:inline">
+						<table class="ranges">
+							<tr>
+					   			<td>From:</td> 
+								<td><input id="from" type="text" name="from" size="20"></td>
+							</tr>
+							<tr>
+					   			<td>To:</td>
+								<td><input id="to" type="text" name="to" size="20"></td>
+							</tr>
+						</table>
+					</div> 
+ 				    <div id="individuals" class="panel" style="display:none">
+						<table class="ranges">
+							<tr>
+								<td width="5%">
+									BarCodes <BR>
+									<input id="inventaryCode" type="text" name="inventaryCode" size="20">
+								<td>
+								<td>	
+									<a href="#" onclick="addItem(); return false;">&gt;&gt;</a><br>
+									<a href="#" onclick="removeItem(); return false;">&lt;&lt;</a>
+								</td>
+								<td width="95%">		   
+									<select id="inventaryList" size="5" style="width:150px">
+									</select>
+									<input type="hidden" id="individualCodes" name="individualCodes">																						
+								</td>
+							</tr>
+						</table>	
+					</div>						
+				</td> 
+			</tr>
+			<tr> <td>Label:<select type="text" size=1 id="labelsconfig" name="labelsconfig" onchange="javascript:document.form1.submit()">
+					<option value="itemsLabelConfig" <!--TMPL_IF NAME="itemsLabelConfig"-->selected<!--/TMPL_IF-->>Label 1</option>
+					<option value="itemsLabelConfig2" <!--TMPL_IF NAME="itemsLabelConfig2"-->selected<!--/TMPL_IF-->>Label 2</option>
+					<option value="itemsLabelConfig3" <!--TMPL_IF NAME="itemsLabelConfig3"-->selected<!--/TMPL_IF-->>Label 3</option>
+					</select>
+					
+				</td> 
+				<td><label for="pageType">Page Lenght</label> <input type="text" name="pageType" id="pageType" readonly value="<!-- TMPL_VAR NAME="PAGES" -->" size="10"> <a href="/cgi-bin/koha/barcodes/printerConfig.pl?SCRIPT_NAME=barcodes.pl&labelsconfig=<!-- TMPL_VAR NAME="labelsconfig" -->">[Arrange Page]</a></td>
+			</tr>
+			<tr> 
+				<td colspan="2"><label for="text_under_label">Label caption: </label>	<input type="text" name="text_under_label" id="text_under_label" size="40" value="<!-- TMPL_VAR name="text_under_label" -->"/> </td>
+			</tr></table>
+
+						    	<table style="width:50%">
+						<tr>
+							<th colspan="<!-- TMPL_VAR NAME="COL_SPAN" -->">Start from</th>
+						</tr>
+						<!-- TMPL_LOOP NAME="LABEL_TABLE" -->
+							<tr>
+								<!-- TMPL_LOOP NAME="columns" -->
+									<td style="white-space: nowrap;">
+										<input type="radio" id="label" value="<!-- TMPL_VAR NAME="tagname" -->" name="label" <!-- TMPL_VAR NAME="check" -->>  Label  <!-- TMPL_VAR NAME="labelname" --></td>
+								<!-- /TMPL_LOOP -->
+							</tr>
+						<!-- /TMPL_LOOP -->  			    
+					</table>
+					
+<p><input type="submit" value="Generate Barcodes" name="op" class="submit"></p>
+	</form>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/barcodes/cbarcodes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/barcodes/cbarcodes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/barcodes/cbarcodes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/barcodes/cbarcodes.tmpl	26 Mar 2007 02:19:21 -0000	1.1.2.1
@@ -0,0 +1,98 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Advanced Search<!-- TMPL_INCLUDE NAME="doc-head-barcodes-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+
+<div id="main">
+
+
+
+<div class="data">
+	<h1>Membership Card Generator</h1>
+	<ul>
+		
+		<li>Enter user cardnumber/s to produce membership card</li>
+		<li>You need Acrobat Reader to be able to view/print the cards.</li>
+		</li>
+	</ul>
+
+	<form id="formulario" method="POST" action="" name="form1" onsubmit="return checkFields(this);" >
+		
+		<table class="myTable" border="1">
+		<caption>Generate cards </caption>
+			<!-- TMPL_IF NAME="ERROR" -->
+			<tr>
+				<td colspan="2">
+					<p class="error">This cardnumber does not exist.</p>
+				</td>
+			</tr>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="tmpFileName" -->
+			<tr>
+				<td colspan="2">
+					<p class="error">File is saved as <!-- TMPL_VAR NAME="tmpFileName" --> .</p>
+					<a href="/uploaded-files/tmp-pdf/<!-- TMPL_VAR NAME="tmpFileName" -->" target="_blank">Click to view</a>
+				</td>
+			</tr>
+			<!-- /TMPL_IF -->
+  			<tr>
+				<td><label for="rangeType">Range type:</label> <!-- TMPL_VAR NAME="RANGE_TYPE" --></td>
+				<td> 
+					<div id="continuous" class="panel" style="display:inline">
+						<table class="ranges">
+							<tr>
+					   			<td>From:</td> 
+								<td><input id="from" type="text" name="from" size="20"></td>
+							</tr>
+							<tr>
+					   			<td>To:</td>
+								<td><input id="to" type="text" name="to" size="20"></td>
+							</tr>
+						</table>
+					</div> 
+ 				    <div id="individuals" class="panel" style="display:none">
+						<table class="ranges">
+							<tr>
+								<td width="5%">
+									CardNumbers <BR>
+									<input id="inventaryCode" type="text" name="inventaryCode" size="20">
+								<td>
+								<td>	
+									<a href="#" onclick="addItem(); return false;">&gt;&gt;</a><br>
+									<a href="#" onclick="removeItem(); return false;">&lt;&lt;</a>
+								</td>
+								<td width="95%">		   
+									<select id="inventaryList" size="5" style="width:150px">
+									</select>
+									<input type="hidden" id="individualCodes" name="individualCodes">																						
+								</td>
+							</tr>
+						</table>	
+					</div>						
+				</td> <!-- Fin Rangos -->
+			</tr>
+			<tr> 
+				
+				<td><label for="pageType">Page type</label> <input type="text" name="pageType" id="pageType" readonly value="<!-- TMPL_VAR NAME="PAGES" -->" size="10"> <a href="/cgi-bin/koha/barcodes/printerConfig.pl?SCRIPT_NAME=cbarcodes.pl&labelsconfig=<!-- TMPL_VAR NAME="labelsconfig" -->"">[Arrange Page]</a></td>
+			</tr>
+			</table>
+
+						    	<table style="width:50%">
+						<tr>
+							<th colspan="<!-- TMPL_VAR NAME="COL_SPAN" -->">Starting on page</th>
+						</tr>
+						<!-- TMPL_LOOP NAME="LABEL_TABLE" -->
+							<tr>
+								<!-- TMPL_LOOP NAME="columns" -->
+									<td style="white-space: nowrap;">
+										<input type="radio" id="label" value="<!-- TMPL_VAR NAME="tagname" -->" name="label" <!-- TMPL_VAR NAME="check" -->>  Label  <!-- TMPL_VAR NAME="labelname" --></td>
+								<!-- /TMPL_LOOP -->
+							</tr>
+						<!-- /TMPL_LOOP -->  			    
+					</table>
+					
+<p><input type="submit" value="Generate Cards" name="op" class="submit"></p>
+	</form>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/barcodes/printerConfig.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/barcodes/printerConfig.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/barcodes/printerConfig.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/barcodes/printerConfig.tmpl	26 Mar 2007 02:19:21 -0000	1.3.2.1
@@ -0,0 +1,62 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Barcode Generator Printer Configuration<!-- TMPL_INCLUDE NAME="doc-head-barcodes-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+
+	<h1>Printer Configuration</h1>
+	<h3>Set the printer configuration corresponding to your environment</h3>
+	<ul>
+		<li>Set width and height of the label that you are going to work with.</li>
+		<li>Set your system's default DPI.</li>
+		<li>Set the page size.</li>
+		<li>Select how many columns and rows are in your page size.</li>
+		<li>Set the left margin bottom margin the page that you are going to use. This parameters will help to center the barcodes into the labels.</li>
+	</ul>
+
+	<form id="formulario" method="POST" action="" name="form1">
+		<input type="hidden" name="saveSettings" value="1" >
+		<input type="hidden" name="labelsconfig" value="<!-- TMPL_VAR NAME="labelsconfig" -->">
+		<input type="hidden" name="SCRIPT_NAME" value="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->">
+		<div class="table"><table border="1" class="myTable">
+			<tr>
+				<th>Label width (in mm)</th>
+				<th>Label height (in mm)</th>
+				<th>System DPI</th>
+				<th>Page Size</th>
+				<th>Columns</th>
+				<th>Rows</th>
+				<th>Margin Bottom (mm)</th>
+				<th>Margin Left (Expressed in mm)</th>
+			<tr>
+  			<tr>
+				<td> <input id="labelWidth" type="text" name="labelWidth" size="5" value="<!-- TMPL_VAR NAME="LABEL_WIDTH" -->"></td>
+				<td><input id="labelHeigth" type="text" name="labelHeigth" size="5" value="<!-- TMPL_VAR NAME="LABEL_HEIGTH" -->"></td>
+				<td><input id="systemDpi" type="text" name="systemDpi" size="5" value="<!-- TMPL_VAR NAME="SYSTEM_DPI" -->"></td>
+				<td><select name="pageType" id="pageType" size="1">
+						<!-- TMPL_IF name="A4" -->
+							<option value="A4" selected>A4</option>
+				        <!-- TMPL_ELSE -->
+							<option value="A4">A4</option>
+						<!-- /TMPL_IF -->
+						<!-- TMPL_IF name="Letter" -->
+							<option value="Letter" selected>Letter</option>
+				        <!-- TMPL_ELSE -->
+							<option value="Letter">Letter</option>
+						<!-- /TMPL_IF -->
+						<!-- TMPL_IF name="Legal" -->
+							<option value="Legal" selected>Legal</option>
+				        <!-- TMPL_ELSE -->
+							<option value="Legal">Legal</option>
+						<!-- /TMPL_IF -->
+		            </select></td>
+  			    <td><input id="columns" type="text" name="columns" size="5" value="<!-- TMPL_VAR NAME="COLUMNS" -->"></td>
+  			    <td><input id="rows" type="text" name="rows" size="5" value="<!-- TMPL_VAR NAME="ROWS" -->"></td>
+  			    <td><input id="marginBottom" type="text" name="marginBottom" size="5" value="<!-- TMPL_VAR NAME="MARGIN_TOP" -->"></td>
+  			    <td><input id="marginLeft" type="text" name="marginLeft" size="5" value="<!-- TMPL_VAR NAME="MARGIN_LEFT" -->"></td>
+  			</tr></table></div>
+<p>		<input type="submit" value="Save Settings" class="submit"></p>
+	</form>
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/bookshelves/shelves.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/bookshelves/shelves.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/bookshelves/shelves.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/bookshelves/shelves.tmpl	26 Mar 2007 02:19:22 -0000	1.9.2.1
@@ -0,0 +1,246 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+Koha -- Add to Virtual Shelf
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+<div id="main">
+<!-- TMPL_IF Name="viewshelf" -->
+
+
+    <a class="button" href="/cgi-bin/koha/bookshelves/shelves.pl">Back to Virtual Shelves</a>
+    <!-- TMPL_IF name="manageshelf" -->
+    <a class="button" href="/cgi-bin/koha/bookshelves/shelves.pl?op=modif&shelf=<!-- TMPL_VAR Name="shelfnumber" -->">
+        Modify this Shelf</a>
+    <!-- /TMPL_IF -->
+
+
+<h3>Contents of <!-- TMPL_VAR Name="shelfname" --></h3>
+
+<form class="inline" action="/cgi-bin/koha/bookshelves/shelves.pl" method="post" name="mainform">
+    <!-- TMPL_IF NAME="itemsloop" -->
+    <table>
+        <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR Name="shelfnumber" -->" />
+        <input type="hidden" name="modifyshelfcontents" value="1" />
+            <tr>
+                <th>
+                    <a href="javascript:CheckAll();">
+                        <small>(Un)Check All</small>
+                    </a>
+                </th>
+                <th>&nbsp;</th>
+                <th>Title</th>
+                <th>Author</th>
+                <th>Call No.</th>
+            </tr>
+        <!-- TMPL_LOOP Name="itemsloop" -->
+            <tr<!-- TMPL_IF name="color" --> class="highlight"<!-- /TMPL_IF -->>
+                    <td>
+                        <input type="checkbox" name="REM-<!-- TMPL_VAR Name="biblionumber" -->" />
+                    </td>
+                    <td>
+                        <img src="<!-- TMPL_VAR NAME="themelang" -->/images/<!-- TMPL_VAR NAME="itemtype" -->.gif" alt="<!-- TMPL_VAR NAME="itemtype" -->" title="<!-- TMPL_VAR NAME="itemtype" -->" />
+                    </td>
+                    <td>
+                <!-- TMPL_IF name="BiblioDefaultViewmarc" -->
+                            <a class="title" href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
+                                <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
+                            </a>
+                        <!-- TMPL_ELSE -->
+                            <!-- TMPL_IF name="BiblioDefaultViewisbd" -->
+                                <a class="title" href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
+                                    <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
+                                </a>
+                            <!-- TMPL_ELSE -->
+                                <a class="title" href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
+                                    <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" -->
+                                </a>
+                            <!-- /TMPL_IF -->
+                        <!-- /TMPL_IF -->
+                    </td>
+                    <td><!-- TMPL_VAR Name="author" --></td>
+                    <td><!-- TMPL_VAR NAME="classification" --></td>
+        </tr>
+        <!-- /TMPL_LOOP -->
+    </table>
+    <!-- TMPL_ELSE -->
+    <br />
+    <b>This shelf is empty.</b>
+    <!-- TMPL_UNLESS NAME="itemsloop" -->
+        <input type="hidden" name="DEL-<!-- TMPL_VAR NAME="shelfnumber" -->" />
+        <input type="hidden" name="shelves" value="1" />
+        <input type="submit" class="icon delete"
+               value="Delete this Shelf"
+               onclick="return confirmDelete('Are you sure you want to delete this shelf?')" />
+        <!-- /TMPL_UNLESS -->
+        <!-- /TMPL_IF -->
+    <!-- TMPL_IF name="manageshelf" -->
+        <!-- TMPL_IF NAME="itemsloop" -->
+            <b>With selected items :</b>
+            <input type="submit"
+                   value="Remove"
+                   class="icon delete"
+                   onclick="return confirmDelete('Are you sure you want to remove these items from the shelf?')"
+                   style="display:inline;"
+                   />
+        <!-- /TMPL_IF -->
+        <!-- /TMPL_IF -->
+</form>
+    <!-- TMPL_IF name="manageshelf" -->
+    
+<br />
+<form action="/cgi-bin/koha/bookshelves/shelves.pl" method="post">
+    <table>
+        <tr><th colspan="2">Add an Item to this Shelf by Barcode</th></tr>
+        <tr>
+            <td>
+                <label for="addbarcode">Barcode:</label>
+            </td>
+            <td>
+                <input name="addbarcode" type="text" id="addbarcode" size="14" maxlength="14" />
+                <input type="hidden" name="viewshelf" value="<!-- TMPL_VAR Name="shelfnumber" -->" />
+                <input type="hidden" name="modifyshelfcontents" value="1" />
+                <input type="submit" value="Save" />
+            </td>
+        </tr>
+    </table>
+</form>
+<!-- /TMPL_IF -->
+<!-- TMPL_ELSE -->
+    <!-- TMPL_IF Name="shelves" -->
+        <!-- TMPL_IF Name="status1" -->
+            <p class="error"><!-- TMPL_VAR Name="string1" --></p>
+        <!-- /TMPL_IF -->
+        <!-- TMPL_LOOP Name="paramsloop" -->
+            <!-- TMPL_IF Name="status" -->
+                <p class="error"><!-- TMPL_VAR Name="string" --></p>
+            <!-- /TMPL_IF -->
+        <!-- /TMPL_LOOP -->
+    <form method="post" action="/cgi-bin/koha/bookshelves/shelves.pl">
+        <input type="hidden" name="shelves" value="1">
+        <h3>Create a New a Virtual Shelf</h3>
+        <table>
+        <tr><th scope="row"><label for="addshelf">Shelf Name:</label> </th><td> <input id="addshelf" type="text" name="addshelf" size="25"></td></tr>
+        <tr><th scope="row"><label for="owner">Owner:</label> </th><td><input type="hidden" name="owner" id="owner" value="<!-- TMPL_VAR name="loggedinuser" -->"><!-- TMPL_VAR name="loggedinusername" --></td></tr>
+        <tr><th scope="row"><label for="category">Category:</label> </th><td><select name="category" id="category">
+                                    <option value="1">Private</option>
+                                    <option value="2">Public</option>
+                                    </select></td></tr></table>
+        <ul>
+            <li>A <b>private</b> virtual shelf is managed by you and can be seen only by you.</li>
+            <li> A <b>public</b> virtual shelf can be seen by everybody, but managed only by you.</li>
+        </ul>
+                                <p><input type="submit" value="Add New Shelf"></p>
+                    </form>
+        
+        <!-- TMPL_IF NAME="numberCanManage" -->
+        <!-- TMPL_IF NAME="shelvesloop" -->
+        <form method="post" action="/cgi-bin/koha/bookshelves/shelves.pl" name="mainform">
+                    <input type="hidden" name="shelves" value="1" />
+                    <h3>Delete Virtual Shelves</h3>
+                    <table>
+                        <tr><th>&nbsp;</th><th>Shelf Name</th><th>Contents</th></tr>
+                        <!-- TMPL_LOOP Name="shelvesloop" -->
+                        <!-- TMPL_IF name="canmanage" -->
+                        <tr>
+                            <td>
+                                <input type="checkbox" name="DEL-<!-- TMPL_VAR Name="shelf" -->" />
+                            </td>
+                            <td>
+                                <a href="/cgi-bin/koha/bookshelves/shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a>
+                            </td>
+                            <td>
+                                <!-- TMPL_VAR Name="shelfbookcount" --> item(s)
+                            </td>
+                        </tr>
+                        <!-- /TMPL_IF -->
+                        <!-- /TMPL_LOOP -->
+                    </table>
+        <input type="submit" value="Delete Shelves" /></form>
+        <!-- /TMPL_IF -->
+        <!-- /TMPL_IF -->
+        <br />
+        <p><form class="inline" action="/cgi-bin/koha/bookshelves/shelves.pl" method="get"><input type="submit" value="Back to Virtual Shelves" /></form></p>
+
+    <!-- TMPL_ELSE -->
+    <!-- TMPL_IF name="edit" -->
+        <form method="post">
+            <input type="hidden" name="op" value="modifsave">
+            <input type="hidden" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
+<h3>Modify Virtual Shelf <!-- TMPL_VAR name="shelfname"--></h3>
+            <table>
+            <tr><td><label for="shelfname">Shelf Name: </label></td><td><input type="text" id="shelfname" name="shelfname" size="25" value="<!-- TMPL_VAR name="shelfname"-->" /></td></tr>
+            <tr><td><label for="owner">Owner: </label></td><td><input type="hidden" id="owner" name="owner" value="<!-- TMPL_VAR NAME="loggedinuser" -->"><!-- TMPL_VAR NAME="loggedinusername" --></td></tr>
+            <tr><td><label for="category">Category: </label></td><td><select id="category" name="category">
+                    <!-- TMPL_IF name="category1" -->
+                        <option value="1" selected>Private</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="1">Private</option>
+                    <!-- /TMPL_IF -->
+                    <!-- TMPL_IF name="category2" -->
+                        <option value="2" selected>Public</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="2">Public</option>
+                    <!-- /TMPL_IF -->
+                </select></td></tr>
+            </table>
+            <ul><li>A <strong>private</strong> virtual shelf is managed by you and can be seen <strong>only</strong> by you.</li>
+                <li> A <strong>public</strong> virtual shelf can be seen by <strong>everybody</strong>, but managed only by you.</li>
+            </ul>
+            <p><input type="submit" value="Save Changes"></p>
+
+        </form>
+<!-- /TMPL_IF -->
+<h3>Virtual Shelves</h3>
+
+<table>
+<tr><th>Shelf Name</th><th>Category</th><th>Content Size</th><th>&nbsp;</th></tr>
+<!-- TMPL_LOOP Name="shelvesloop" -->
+<tr<!-- TMPL_IF name="toggle" --> class="highlight"<!-- /TMPL_IF -->><td><a href="/cgi-bin/koha/bookshelves/shelves.pl?viewshelf=<!-- TMPL_VAR Name="shelf" -->"><!-- TMPL_VAR Name="shelfname" --></a></td><td><!-- TMPL_IF NAME="private" -->Private<!-- /TMPL_IF --><!-- TMPL_IF NAME="public" -->Public<!-- /TMPL_IF --><!-- TMPL_IF NAME="free" -->Free<!-- /TMPL_IF --></td><td><!-- TMPL_VAR Name="shelfbookcount" --> item(s)</td><td><!-- TMPL_IF name="canmanage" --><a href="/cgi-bin/koha/bookshelves/shelves.pl?op=modif&amp;shelf=<!-- TMPL_VAR NAME="shelf" -->">Modify</a><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
+            <!-- /TMPL_LOOP -->
+        </table>
+        <p><form action="/cgi-bin/koha/bookshelves/shelves.pl" method="get"><input type="hidden" value="1" name="shelves" /><input type="submit" value="Add or Remove Book Shelves" /></form></p>
+    <!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+<br clear="both" />
+</div>
+<script type="text/javascript">
+	function confirmDelete(s){
+		if (window.confirm(s))
+			return true;
+		return false;
+	}
+	/**
+	 * this function checks all checkbox 
+	 * or uncheck all if there are already checked.
+	 */
+	function CheckAll(){
+		var checkboxes = document.getElementsByTagName('input');
+		var nbCheckbox = checkboxes.length;
+		var check = areAllChecked();
+		check = !check;
+		for(var i=0;i<nbCheckbox;i++){
+			if(checkboxes[i].getAttribute('type') == "checkbox" ){
+				checkboxes[i].checked = check;
+			}
+		}
+	}
+	/**
+	 * this function return true if all checkbox are checked
+	 */
+	function areAllChecked(){
+		var checkboxes = document.getElementsByTagName('input');
+		var nbCheckbox = checkboxes.length;
+		for(var i=0;i<nbCheckbox;i++){
+			if(checkboxes[i].getAttribute('type') == "checkbox" ){
+				if(checkboxes[i].checked == 0){
+					return false;
+				}
+			}
+		}
+		return true;
+	}
+	
+</script>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc"-->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/ISBDdetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/ISBDdetail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/ISBDdetail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/ISBDdetail.tmpl	26 Mar 2007 02:19:22 -0000	1.7.2.1
@@ -0,0 +1,18 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: ISBD View<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="search-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+
+<div class="tabitem"><form action="MARCdetail.pl" method="get">
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
+<input type="submit" class="submit" value="View MARC" /></form> <form action="/cgi-bin/koha/catalogue/moredetail.pl" method="get"><input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" /><input type="hidden" name="item" value="<!-- TMPL_VAR NAME="itemnumber" -->" /><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Item Details" /></form> <form action="detailprint.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Print" onclick="Dopop('detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->'); return false;" /></form><!-- TMPL_IF NAME="norequests" --><!-- TMPL_ELSE --> <form action="request.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="biblionumber" -->" name="biblionumber" /> <input type="submit" value="Place Reserve" class="submit" /></form> <form action="/cgi-bin/koha/cataloguing/addbiblio.pl"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" /><input type="submit" value="Edit this Record" class="submit" /></form><!-- /TMPL_IF -->
+</div>
+
+	<div class="isbd">
+		<p><!-- TMPL_VAR NAME="ISBD" --></p>
+	</div>
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail.tmpl	26 Mar 2007 02:19:22 -0000	1.38.2.1
@@ -0,0 +1,212 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: MARC Record View<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!--TMPL_UNLESS NAME="popup"-->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<!--/TMPL_UNLESS-->
+<div id="main">
+<h2>MARC Record for number <em><!-- TMPL_VAR name="biblionumber" --><!-- TMPL_VAR NAME="biblio_title" --><!-- TMPL_IF NAME="biblio_subtitle" -->: <!-- TMPL_VAR NAME="biblio_subtitle" --><!-- /TMPL_IF --></em></h2>
+<div class="tabitem"><form action="detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" value="intra" name="type" /><input type="submit" class="submit" value="Brief Display" /></form><!-- TMPL_IF NAME="norequests" -->&nbsp;<!-- TMPL_ELSE --> <form action="/cgi-bin/koha/reserve/request.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /> <input type="submit" class="submit" value="Place Reserve" /></form>
+		<!-- /TMPL_IF --><form action="detailprint.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Simple Print View" /></form> <!-- TMPL_IF name="subscriptionid" --><form action="/cgi-bin/koha/bull/subscription-detail.pl" method="get"><input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" /><input type="submit" value="Subscription" class="submit" /></form>
+<form action="/cgi-bin/koha/serials/serial-issues.pl" method="get"><input type="hidden" name="subscriptionid" value="!-- TMPL_VAR NAME="subscriptionid" -->" /><input type="submit" value="Serial Issues" class="submit" /></form><!-- /TMPL_IF -->  <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Edit MARC" /></form> <form action="/cgi-bin/koha/cataloguing/additem.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber"-->" /><input type="submit" class="submit" value="Edit Items" /></form> <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="cancel" value="Delete Record" onclick="confirm_deletion(); return false;" /></form></div>
+
+<!-- TMPL_IF NAME="0XX" -->
+<table class="marc">
+	<!-- TMPL_LOOP NAME="0XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+<!--		<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td>   -->
+	</tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="1XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="1XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+	 
+<!-- TMPL_IF NAME="2XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="2XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+<!--		<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+	 
+<!-- TMPL_IF NAME="3XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="3XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+<!--		<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="4XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="4XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="5XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="5XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="6XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="6XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="7XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="7XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td>	-->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+	 <!-- /TMPL_IF -->
+
+	 
+<!-- TMPL_IF NAME="8XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="8XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td> -->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="9XX" -->
+    <table class="marc">
+	<!-- TMPL_LOOP NAME="9XX" -->
+	<tr><th colspan="5"><!-- TMPL_VAR NAME="tag" --></th></tr>
+	<!-- TMPL_LOOP NAME="subfield" -->
+	<tr>
+         <td>&nbsp;</td>
+	    <td><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS --></td>
+		<td class="label"><!-- TMPL_VAR NAME="marc_lib" --></td>
+		<td class="data"><!-- TMPL_VAR NAME="marc_value" --></td>
+	<!--	<td><a href="search.marc/search.pl?op=do_search&amp;marclist=<!-- TMPL_VAR NAME="marc_tag" --><!-- TMPL_UNLESS name="hide_marc" --><!-- TMPL_VAR NAME="marc_subfield" --><!-- /TMPL_UNLESS -->&amp;operator=&#x003D;&amp;type=intranet&amp;value=<!-- TMPL_VAR NAME="marc_value" ESCAPE=URL -->">?</a></td>	-->
+       </tr>
+	<!-- /TMPL_LOOP -->
+	<!-- /TMPL_LOOP -->
+     </table>
+<!-- /TMPL_IF -->
+
+
+<!-- TMPL_IF NAME="item_loop" -->    <table>
+		<tr>
+			<!-- TMPL_LOOP NAME="item_header_loop" --><th><!-- TMPL_VAR NAME="header_value" --></th><!-- /TMPL_LOOP -->
+		</tr>
+		<!-- TMPL_LOOP NAME="item_loop" -->
+			<tr>
+					<!-- TMPL_VAR NAME="item_value" -->
+			</tr>
+		<!-- /TMPL_LOOP -->
+     </table><!-- /TMPL_IF -->
+
+	 </div>
+	<script language="JavaScript" type="text/javascript">
+function confirm_deletion() {
+	var is_confirmed = confirm('Are you sure you want to delete this record and all the attached items?');
+	if (is_confirmed) {
+		window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&amp;oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
+	}
+}
+function Changefwk(FwkList) {
+  var fwk = FwkList.options[FwkList.selectedIndex].value;
+  window.location = "MARCdetail.pl?biblionumber=<!--TMPL_VAR Name="biblionumber"-->&frameworkcode="+fwk;
+}
+function Addbiblio(op) {
+  var fwk = document.forms['duplicate'].Frameworks.options[document.forms['duplicate'].Frameworks.selectedIndex].value;
+  window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode="+fwk+"&op="+op; 
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail_wrapper.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail_wrapper.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail_wrapper.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/MARCdetail_wrapper.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,31 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: MARC Record View<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!--TMPL_UNLESS NAME="popup"-->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<!--/TMPL_UNLESS-->
+<div id="main">
+<h2>MARC Record for number <em><!-- TMPL_VAR name="biblionumber" --><!-- TMPL_VAR NAME="biblio_title" --><!-- TMPL_IF NAME="biblio_subtitle" -->: <!-- TMPL_VAR NAME="biblio_subtitle" --><!-- /TMPL_IF --></em></h2>
+<div class="tabitem"><form action="detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" value="intra" name="type" /><input type="submit" class="submit" value="Brief Display" /></form><!-- TMPL_IF NAME="norequests" -->&nbsp;<!-- TMPL_ELSE --> <form action="/cgi-bin/koha/reserve/request.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /> <input type="submit" class="submit" value="Place Reserve" /></form>
+		<!-- /TMPL_IF --><form action="detailprint.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Simple Print View" /></form> <!-- TMPL_IF name="subscriptionid" --><form action="/cgi-bin/koha/bull/subscription-detail.pl" method="get"><input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" /><input type="submit" value="Subscription" class="submit" /></form>
+<form action="/cgi-bin/koha/serials/serial-issues.pl" method="get"><input type="hidden" name="subscriptionid" value="!-- TMPL_VAR NAME="subscriptionid" -->" /><input type="submit" value="Serial Issues" class="submit" /></form><!-- /TMPL_IF -->  <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Edit MARC" /></form> <form action="/cgi-bin/koha/cataloguing/additem.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber"-->" /><input type="submit" class="submit" value="Edit Items" /></form> <form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="cancel" value="Delete Record" onclick="confirm_deletion(); return false;" /></form></div>
+
+<!--TMPL_VAR NAME="result"-->
+
+	 </div>
+	<script language="JavaScript" type="text/javascript">
+function confirm_deletion() {
+	var is_confirmed = confirm('Are you sure you want to delete this record and all the attached items?');
+	if (is_confirmed) {
+		window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&amp;oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->";
+	}
+}
+function Changefwk(FwkList) {
+  var fwk = FwkList.options[FwkList.selectedIndex].value;
+  window.location = "MARCdetail.pl?biblionumber=<!--TMPL_VAR Name="biblionumber"-->&frameworkcode="+fwk;
+}
+function Addbiblio(op) {
+  var fwk = document.forms['duplicate'].Frameworks.options[document.forms['duplicate'].Frameworks.selectedIndex].value;
+  window.location = "/cgi-bin/koha/cataloguing/addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&frameworkcode="+fwk+"&op="+op; 
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/bookcount.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/bookcount.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/bookcount.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/bookcount.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,37 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Circulation Statistics for <!-- TMPL_VAR Name="title" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>
+<!-- TMPL_VAR Name="title" --> <!-- TMPL_IF NAME="author" -->(<!-- TMPL_VAR Name="author" -->)<!-- /TMPL_IF --></a></h1>
+<h2>Barcode <!-- TMPL_VAR Name="barcode" --></h2>
+<div class="tabitem"><form action="/cgi-bin/koha/catalogue/detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->"><input type="hidden" name="type" value="intra"><input type="submit" class="submit" value="Brief Display"></form> <form action="/cgi-bin/koha/catalogue/moredetail.pl" method="get"><input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->"><input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->"><input type="submit" class="submit" value="Item Details"></form><!-- TMPL_IF NAME="norequests" --><!-- TMPL_ELSE --> <form action="/cgi-bin/koha/circ/request.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="biblionumber" -->" name="biblionumber"> <input type="submit" value="Place Reserve" class="submit"></form><!-- /TMPL_IF --></div>
+<div class="data">
+<table>
+		<tr><th>Home Branch: </th><td> <!-- TMPL_VAR Name="homebranch" --> </td></tr>
+		<tr><th>Current Branch: </th><td> <!-- TMPL_VAR Name="holdingbranch" --></td></tr>
+		<tr><th>Date arrived at current branch: </th><td> <!-- TMPL_VAR Name="lastdate" --> </td></tr>
+		<tr><th>Number of issues since since the above date :</th><td> <!-- TMPL_VAR Name="count" --> </td></tr>
+</table>
+</div>
+<div class="table">
+		<table>
+			<tr>
+				<th> Branch</th>
+				<th> No. of Issues</th>
+				<th> Last seen at branch</th>
+			</tr>
+			<!-- TMPL_LOOP Name="branchloop" -->
+				<tr>
+					<td class="data"><!-- TMPL_VAR Name="branchname" --> </td>
+					<td class="data"><!-- TMPL_VAR Name="issues" --> </td>
+					<td class="data"><!-- TMPL_VAR Name="seen" --> </td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table></div>
+		</td>
+	</tr>
+</table></div>
+
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_search.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,253 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main">
+	<h1>Catalogue Search</h1>
+
+<table align ="center" >
+	
+	    <td align ="center">
+	       <input id="searchType1" type="button" value="Zoom Search" onclick="changeSearch1()" <!-- TMPL_IF name="zoom_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF -->>
+		</td>	
+		<td align ="center">
+	       <input id="searchType2" type="button" value="SQL search" onclick="changeSearch2()" <!-- TMPL_IF name="sql_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
+		</td>
+		<td align ="center">
+	       <input id="searchType3" type="button" value="Brave search" onclick="changeSearch3()" <!-- TMPL_IF name="brave_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
+		</td>
+	</tr>
+</table>
+
+<form  name="zoom_form" id="zoom_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="zoom_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
+    <input type="hidden" name="op" value="do_search">
+    <input type="hidden" name="search_type" value="zoom">
+    <input type="hidden" name="startfrom" value="0">
+	<input type="hidden" name="zoom" value="1">
+<table style="border:0" align="center"><tbody id="queryarea">
+
+<tr><td ><fieldset><b>Display per page:</b><input type text name="number_of_results" value="10" size="3"/></fieldset></td><td colspan="2"><fieldset><b>Format to display </b>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></fieldset></td></tr>
+
+<tr>	<td align="right">Search on:</td><td><select size="1"  name="kohafield" style="width:170px">
+				<!-- TMPL_LOOP name="kohafields" -->
+	                <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
+				<!-- /TMPL_LOOP --></select></td><td><input type="text"  size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
+							<td>With</td><td><Select type="text"  name="relation">
+							<option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >&nbsp;
+							</option>
+				            			<option value="@attr 5=1 @attr 4=6 " <!-- TMPL_IF name="@attr 5=1 @attr 4=6 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
+							</option>
+							<option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
+							</option>
+							<option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
+							</option>
+							<option value="@attr 5=1 @attr 6=3 " <!-- TMPL_IF name="@attr 5=1 @attr 6=3 " -->selected<!-- /TMPL_IF --> >Starts with
+							</option>
+							<option value="@attr 2=1  " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
+							</option>
+							<option value="@attr 2=2  " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
+							</option>
+							<option value="@attr 2=5  " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
+							</option>
+							<option value="@attr 2=4  " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
+							</option>
+						</select></td></tr>
+		<tr id="andor"><td>		
+					<Select type="text"   name="and_or">
+				            			<option value="@and" <!-- TMPL_IF name="and" -->selected<!-- /TMPL_IF --> >AND
+							</option>
+							<option value="@or" <!-- TMPL_IF name="or" -->selected<!-- /TMPL_IF --> >OR
+							</option>
+							<option value="@not" <!-- TMPL_IF name="not" -->selected<!-- /TMPL_IF --> >NOT
+							</option>
+						</select></td>
+				<td><select size="1"  name="kohafield" id="kohafield" style="width:170px">
+				
+				<!-- TMPL_LOOP name="kohafields" -->
+	               		 <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
+				<!-- /TMPL_LOOP --></select></td><td><input type="text"  size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
+							<td>With</td><td><Select type="text"  name="relation">
+							<option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >&nbsp;
+							</option>
+				            			<option value="@attr 5=1 @attr 4=6 " <!-- TMPL_IF name="@attr 5=1 @attr 4=6 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
+							</option>
+							<option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
+							</option>
+							<option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
+							</option>
+							<option value="@attr 3=1 " <!-- TMPL_IF name="@attr 3=1 " -->selected<!-- /TMPL_IF --> >Starts with
+							</option>
+							<option value="@attr 2=1  " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
+							</option>
+							<option value="@attr 2=2  " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
+							</option>
+							<option value="@attr 2=5  " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
+							</option>
+							<option value="@attr 2=4  " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
+							</option>
+						</select></td></tr></tbody>
+	<tr>
+<td ><fieldset>Limit with itemtype: <br>
+			<input type="hidden" name="kohafield" value="itemtype"/>
+			<input type="hidden" name="and_or" value="@and"/><input type="hidden" name="relation" value="@attr 2=3">
+			<select name="value"  style="width:170px">			
+			<option value="">All item types</option>
+		<!-- TMPL_LOOP NAME="itemtypeloop" -->
+			<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
+		<!-- /TMPL_LOOP -->
+			</select></fieldset>
+</td>
+<td colspan="4">
+	<fieldset>Location:<input type="hidden" name="kohafield" value="holdingbranch"/>
+		<input type="hidden" name="and_or" value="@and"/><input type="hidden" name="relation" value="@attr 2=3">
+		<select name="value" id="branchloop" size="1">
+		<option value="">All Branches</option>
+		<!-- TMPL_LOOP NAME="branchloop" -->
+		<option value=<!-- TMPL_VAR NAME="branchcode" --> ><!-- TMPL_VAR NAME="branchname"--></option>
+		<!-- /TMPL_LOOP -->
+		</select><br>
+		<input type="hidden" name="kohafield" value="onloan"/>
+		<input type="hidden" name="and_or" value="@and"/><input type="hidden" name="relation" value="@attr 2=1">
+		<label for="available-items">Only items currently available</label><input type="checkbox" id="available-items" name="value" value="1"/>
+	</fieldset>
+</td>
+
+</tr>
+<tr>
+			<td colspan="2"><fieldset >Sort on:<select size="1"  name="order" style="width:170px">
+			<option value="">System Ranked</option>	
+			<!-- TMPL_LOOP name="sorts" -->
+	              	  <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
+				<!-- /TMPL_LOOP --></select>
+			<select size="1"  name="asc" style="width:100px">
+				<option value=" <i">Ascending</option>
+				<option value=" >i">Descending</option>
+				</fieldset></td>
+		<td colspan="2"><fieldset >Catalogue:<select size="1"  name="serverid" style="width:170px">
+			<option value="-1" selected>Library Catalogue</option>
+			<option value="0">All Catalogues</option>	
+			<!-- TMPL_LOOP name="servers" -->
+	              	  <option value="<!-- TMPL_VAR name="serverid" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="server" --></option>
+				<!-- /TMPL_LOOP --></select>
+			
+				</fieldset></td>
+
+</tr>
+<tr><td colspan=2><input class = "button" type="submit" value="Start search"></td><td><a href="#" onClick="cloneQuery();" title="add another search field">[+]</a></td></tr>
+</table>
+</form>
+<form onSubmit="return checkSQLSearch()" name="precise_form" id="sql_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="sql_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
+
+    <input type="hidden" name = "op" value="do_search">
+    <input type="hidden" name = "search_type" value="sql">
+<input type="hidden" name="zoom" value="0">
+	<table style="border:0" align="center">
+<tr>
+<td><b>Format to display</b></td><td>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></td>
+	    <tr>
+			<td>Barcode</td>
+			<td colspan="1"><input type="text"  size="15"   name="barcode" value="<!-- TMPL_VAR name="barcode" -->" onchange="if(this.value != '') {this.form.itemnumber.value = ''; this.form.biblionumber.value = ''}"></td>
+		    <td>Item number</td>
+			<td colspan="1"><input type="text"  size="15"   name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" onchange="if(this.value != '') {this.form.biblionumber.value = ''; this.form.barcode.value = ''} "></td>
+		
+			 <td>Biblio Number</td>
+			<td colspan="1"><input type="text"  size="15"   name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" onchange="if(this.value != '') {this.form.barcode.value = ''; this.form.itemnumber.value = ''} "></td>
+		</tr>
+
+	    <tr>
+			<td colspan = "4" align = "center">
+			    <br>
+				<input class = "button" type="submit" value="Start search">
+	      		</td>
+		</tr>
+
+	</table>
+</form>
+<form onSubmit="return BraveSearch()" name="brave_form" id="brave_form" action="/cgi-bin/koha/catalogue/catalogue-search.pl" method='post' <!-- TMPL_IF name="brave_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
+
+    <input type="hidden" name = "op" value="do_search">
+  <input type="hidden" name="search_type" value="brave">
+<input type="hidden" name="zoom" value="1">
+	<table style="border:0" align="center">
+<tr>
+<td><fieldset><b>Format to display </b>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></fieldset></td><td><fieldset><b>Display per page:</b><input type text name="number_of_results" value="10" size="1"/></fieldset></td></tr>
+	    <tr>
+			<td>Query  <textarea name = "value"  id="bravetext" cols="40" rows="5" ></textarea></td>
+			 <td> of type: <select  name = "searchtype" >
+			<option value="pqf">PQF</option>
+			<option value="ccl">CCL</option>
+			<option value="cql">CQL</option>
+			</select>
+			</td>
+		</tr>
+
+	    <tr>
+			<td colspan = "4" align = "center">
+			    <br>
+				<input class = "button" type="submit" value="Start search">
+	      		</td>
+		</tr>
+
+	</table>
+</form>
+</table>	
+</div>
+<script language="JavaScript" type="text/javascript">
+function hideSearchsTypes() {
+            document.getElementById('zoom_form').style.display = 'none';
+            document.getElementById('sql_form').style.display = 'none';
+	 document.getElementById('brave_form').style.display = 'none';
+          
+		}
+
+		function resetButtonsColors() {
+			document.getElementById('searchType1').style.backgroundColor = 'yellow';
+			document.getElementById('searchType2').style.backgroundColor = 'yellow';
+			document.getElementById('searchType3').style.backgroundColor = 'yellow';
+			
+		}
+
+		function changeSearch1() {
+		    resetButtonsColors();
+		    document.getElementById('searchType1').style.backgroundColor = 'orange';
+		    hideSearchsTypes();
+		    document.getElementById('zoom_form').style.display = 'inline';
+		}
+
+        function changeSearch2() {
+            resetButtonsColors();
+		    document.getElementById('searchType2').style.backgroundColor = 'orange';
+		    hideSearchsTypes();
+		    document.getElementById('sql_form').style.display = 'inline';
+		}
+	 function changeSearch3() {
+            resetButtonsColors();
+		    document.getElementById('searchType3').style.backgroundColor = 'orange';
+		    hideSearchsTypes();
+		    document.getElementById('brave_form').style.display = 'inline';
+		}
+function checkSQLSearch() {
+		if ( (document.sql_form.barcode.value == '') &&
+			(document.sql_form.itemnumber.value == '') && (document.sql_form.biblionumber.value == '') ) {
+			alert("Enter a barcode or itemnumber or biblionumber to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+
+function BraveSearch() {
+		if ( document.brave_form.text.value == '')   {
+			alert("Enter some code to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+function cloneQuery() {
+var cloneoriginal = document.getElementById('andor');
+ var clone = cloneoriginal.cloneNode(true);
+queryarea.appendChild(clone);
+
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_searchresults.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_searchresults.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_searchresults.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/catalogue_searchresults.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,267 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_IF NAME="facets_loop" -->
+<!-- TMPL_INCLUDE NAME="intranet-facets.inc" -->
+<!--TMPL_ELSE-->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<!--/TMPL_IF-->
+<script language="JavaScript" type="text/javascript">
+
+var no_biblios_selected = "Select one or more documents to add to your virtual shelves.";
+var no_shelves_selected = "Select one or more virtual shelves to add the selected documents.";
+
+/*Add the selected biblionumber to the seleted virtual shelves*/
+function addBibliosToShelves(){
+	shelf_frm = document.shelf_form;
+	//check for at least one shelf seleted
+	shelf_sel = false;
+	for (var i=0; i < shelf_frm.shelfnumber.length; i++) {
+		if (shelf_frm.shelfnumber[i].checked) {
+			shelf_sel = true;
+			break;
+		}
+	}
+	if (shelf_sel) {
+	    shelf_frm.biblios.value = '';
+		for (var i=0; i < document.myform.bibid.length; i++) {
+			if (document.myform.bibid[i].checked) {
+				shelf_frm.biblios.value = shelf_frm.biblios.value + document.myform.bibid[i].value + ",";
+			}
+		}
+		if (shelf_frm.biblios.value == '') {
+            alert(no_biblios_selected);
+		} else {
+			shelf_frm.submit();
+		}
+	} else {
+        alert(no_shelves_selected);
+	}
+}
+
+function show_shelfPanel() {
+
+	if (document.getElementById('shelf_panel').style.display == 'block') {
+	    //document.getElementById('shelf_panel').style.visibility = 'hidden';
+	    document.getElementById('shelf_panel').style.display = 'none';
+	} else {
+	    document.getElementById('shelf_panel').style.display = 'block';
+        //document.getElementById('shelf_panel').style.visibility = 'visible';
+	}
+}
+
+</script>
+
+
+<div id="main" align="center">
+    <h1>Catalogue search</h1>
+<!-- TMPL_IF name="error" --><div class="error">The server is too busy TRY AGAIN!</div>
+<!-- TMPL_ELSE -->
+	<!-- TMPL_LOOP NAME="searchdesc" -->
+    	You searched:
+    	<div style="color:green;">|&nbsp;
+	 <!-- TMPL_VAR name="query" -->&nbsp;|&nbsp;
+		</div>
+	<!-- /TMPL_LOOP -->
+
+<!-- TMPL_IF name="onlineloop" -->
+<div class="pages">
+<table width="80%"  border="0" align="center">
+<th colspan="3">Documents Found</th>
+	 <tr bgcolor="#DCD9CF">
+		<td bgcolor="#DCD9CF" >Database</td>
+		<td bgcolor="#DCD9CF" >Results</td>
+		<td bgcolor="#DCD9CF">View</td>
+		
+	</tr>
+	<tr bgcolor="#99cccc" >
+			<td>NEU Library Catalogue</td>
+			<td><!-- TMPL_VAR NAME="numrecords" --></td>
+	<td><a  href="catalogue-search.pl?op=do_search&amp;zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&serverid=-1">View results</a></td>
+	</tr>
+	<!-- TMPL_LOOP name="onlineloop" -->
+		<tr <!--TMPL_IF NAME="even"-->bgcolor="DEE5E7"<!--TMPL_ELSE-->bgcolor="#F2F0E9"<!--/TMPL_IF-->>
+			<td><!-- TMPL_VAR NAME="server" --></td>
+			<td><!-- TMPL_VAR NAME="numresults" --></td>
+			<td><a href='<!-- TMPL_VAR NAME="search_string" -->' target="_blank">Click to view</a></td>
+			
+			
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table></div><br>
+<!--TMPL_ELSE-->
+	<!-- TMPL_VAR NAME="numrecords" --> results found in <!-- TMPL_VAR NAME="timetaken" --> seconds
+
+<div id="pages" >
+    <!-- Row of numbers corresponding to search result pages -->
+    
+    <!-- TMPL_LOOP NAME="numbers" -->
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
+		<!-- TMPL_ELSE -->
+		    <span class="pages">
+	        <a class="pages"  href="catalogue-search.pl?op=do_search&amp;zoom=1&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME="number" --></a>
+	        </span>
+		<!-- /TMPL_IF -->
+    <!-- /TMPL_LOOP -->
+    
+</div>
+
+<!-- TMPL_IF name="shelvescount" -->
+<table style="border:0">
+	<tr>
+	    <td width="75%"></td>
+		<td>
+			<input type="button" value="Add to my virtual shelves" class="button"
+				    style="border:0px;background-color:#F2F0E9;text-align:left;display:block;"
+					onclick="show_shelfPanel();">
+
+			<div class="shelf_panel" id="shelf_panel" style="display:none;">
+	    		<form name="shelf_form" action="/cgi-bin/koha/bookshelves/add-biblios-to-shelves.pl" method="post">
+        		<input type="checkbox" name="shelfnumber" value="-1" style="display:none;">
+				<input type="hidden" name="biblios" value="">
+				<input type="hidden" name="return_url" value="/cgi-bin/koha/catalogue/catalogue-search.pl?op=do_search&amp;zoom=1&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->">
+				<span class="style3">Select one or more documents and the virtual shelves you want to add them.</span>
+				<table style="border:0">
+				<!-- TMPL_LOOP name="shelves" -->
+		    	<tr>
+		        	<td>
+						<input type="checkbox" name="shelfnumber" value="<!-- TMPL_VAR name="shelfnumber" -->">
+					</td>
+		        	<td>
+						<a class="style12" href="/cgi-bin/koha/bookshelves/shelves.pl?viewshelf=<!-- TMPL_VAR name="shelfnumber" -->"><!-- TMPL_VAR name="shelfname" --></a>
+					</td>
+					<td>
+						<!-- TMPL_VAR name="shelfbookcount" --> documents
+					</td>
+				</tr>
+				<!-- /TMPL_LOOP -->
+				</table>
+				<div align="right" class="style5">
+					<input type="button" onclick="addBibliosToShelves()" value="Add" style="border:0px;background-color:#4898B0;height:20px;" class="button">
+				</div>
+				</form>
+			</div>
+  		</td>
+  	</tr>
+</table>
+<!-- /TMPL_IF -->
+
+<!-- Search Results Table -->
+<!-- TMPL_IF NAME="numrecords" -->
+<form name="myform" action="" style="margin:0px">
+	<br>
+	<table border="0" cellspacing="0" cellpadding="2" width="80%" align="center">
+	<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/../images/background-opac.gif">
+        <th colspan="2"></th>
+		<th align="left"> <a  href="catalogue-search.pl?op=do_search&amp;zoom=1&amp;reorder=title,2<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->">â–¼</a>Title <a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=title,1">â–²</a>
+	   </th>
+		<th align="left"> <a  href="catalogue-search.pl?op=do_search&amp;zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=author,2 ">â–¼</a>Author<a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=author,1">â–²</a>
+
+		<th>Publisher</th>
+		
+		<th>&copy;</th>
+		<th align="left"> <a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=local-number,2 ">â–¼</a>LC <a  href="catalogue-search.pl?op=do_search&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;reorder=local-number,1">â–²</a>
+	<th>Availability</th>
+		<th>&nbsp;</th>
+	</tr>
+
+
+	<!-- Actual Search Results -->
+	    <input type="checkbox" name="bibid" value="0" style="display:none">
+		<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
+			<tr <!-- TMPL_IF name="even" -->bgcolor="#ffffcc"<!-- /TMPL_IF -->>
+				<td>
+					<div align="center">
+							<img src='<!-- TMPL_VAR NAME="themelang" -->/../images/<!-- TMPL_VAR NAME="itemtype" -->.gif'
+							     width="16" height="16">
+						</div>
+				</td>
+				<td width="10" align="center" valign="middle">
+					<input type="checkbox" name="bibid" value='<!-- TMPL_VAR NAME="biblionumber" -->'>
+				</td>
+				<td >
+					
+					<a class="transparent" href="/cgi-bin/koha/<!--TMPL_VAR NAME="script"-->?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" -->
+					</a>
+					<br>
+					<span style="font-size:90%">
+                    <!-- TMPL_IF NAME="subtitle" --><!-- TMPL_VAR NAME="subtitle" --><br> <!-- /TMPL_IF -->
+					<!-- TMPL_IF NAME="isbn" -->ISBN: <!-- TMPL_VAR NAME="isbn" --> <!-- /TMPL_IF -->
+					</span>
+				</td>
+				<td> <!-- TMPL_IF NAME="author" --> <a class="transparent" href="catalogue-search.pl?op=do_search&zoom=1&kohafield=author&value=<!-- TMPL_VAR NAME="author"  -->"><!-- TMPL_VAR NAME="author" --></a><br><!-- /TMPL_IF -->
+				    <span style="font-size:90%">
+					<!-- TMPL_LOOP NAME="additionalauthors" -->
+					    <a class="transparent" href="catalogue-search.pl?op=do_search&zoom=1&kohafield=author&value=<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="value" --></a><br>
+                   				 <!-- /TMPL_LOOP -->
+                    </span>
+				</td>
+                <td ><!-- TMPL_VAR NAME="publishercode" --></a></td>
+				
+				<td align="center" > <!-- TMPL_IF NAME="copyrightdate" --> <!-- TMPL_VAR NAME="copyrightdate" --> <!-- TMPL_ELSE --> - <!-- /TMPL_IF --> </td>
+				<td><!-- TMPL_VAR NAME="classification" --></td>
+				<td align="center">
+                    <!-- TMPL_IF NAME="on-loan-p" --> <!-- TMPL_VAR NAME="on-loan-p" --> - On Loan <br> <!-- /TMPL_IF -->
+					    <!-- TMPL_IF NAME="lost-p" --> <!-- TMPL_VAR NAME="lost-p" --> - Lost <br> <!-- /TMPL_IF -->
+					  <!-- TMPL_IF NAME="withdrawn-p" --> <!-- TMPL_VAR NAME="withdrawn-p" --> -Withdrawn <br> <!-- /TMPL_IF -->
+					  
+					    <!-- TMPL_IF NAME="not-available-p" --> <!-- TMPL_VAR NAME="not-available-p" --> - Not available <br> <!-- /TMPL_IF -->
+							<!-- TMPL_IF name="location-only" -->
+							<!-- TMPL_VAR name="location-only" -->
+						<!-- TMPL_ELSE -->
+							-
+						<!-- /TMPL_IF -->
+				</td>
+				<td align="center">
+					<!-- TMPL_IF NAME="noitems" -->
+								-
+							<!-- TMPL_ELSE -->
+								<!-- TMPL_IF NAME="norequests" -->
+        							 Not reservable
+								<!-- TMPL_ELSE -->
+									<a class="style1"
+									   href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->">
+          								Reserve
+									</a>
+								<!-- /TMPL_IF -->
+							<!-- /TMPL_IF -->
+				</td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+
+
+		
+		</table>
+</form>
+<br>
+<div class="pages">
+    <!-- Row of numbers corresponding to search result pages -->
+
+    <!-- TMPL_LOOP NAME="numbers" -->
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
+		<!-- TMPL_ELSE -->
+		    <span class="pages">
+	        <a class="pages" href="catalogue-search.pl?op=do_search&zoom=1&startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME=number --></a>
+	        </span>
+		<!-- /TMPL_IF -->
+    <!-- /TMPL_LOOP -->
+    
+</div>
+<br>
+<div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
+<!-- TMPL_ELSE -->
+	<div align="center">0 records <br></div>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+<div align="center"><a class="transparent" href="catalogue-search.pl">New search</a></div>
+
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl	26 Mar 2007 02:19:22 -0000	1.25.2.1
@@ -0,0 +1,95 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Details for <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
+<h3 class="title"><!-- TMPL_VAR NAME="title" --> <!-- TMPL_IF NAME="author" -->(<!-- TMPL_VAR NAME="author" -->)<!-- /TMPL_IF --></h3>
+
+	<div class="tabitem">
+<form action="MARCdetail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" /><input type="submit" class="submit" value="View MARC" /></form>
+<form action="moredetail.pl" method="get"><input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->" /><input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->" /><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="View Item Details" /></form> 	
+<form action="/cgi-bin/koha/bookshelves/addbookbybiblionumber.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Add to Shelf" onclick="openWindow('/cgi-bin/koha/bookshelves/addbookbybiblionumber.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->', 'popped'); return false;" /></form> 
+<form action="detailprint.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Print" onclick="openWindow('detailprint.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->','printview'); return false;" /></form>
+<!-- TMPL_UNLESS NAME="norequests" --> <form action="/cgi-bin/koha/reserve/request.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="biblionumber" -->" name="biblionumber" /> <input type="submit" value="Reserves" class="submit" /></form><!-- /TMPL_UNLESS -->
+	 </div>
+<!-- TMPL_IF NAME="isbn" --><div >
+<img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="isbn" -->.01.MZZZZZZZ.jpg" alt="Book Cover Image" />
+</div><!-- /TMPL_IF -->
+<div class="details">
+			
+<ul>
+			<!-- TMPL_IF NAME="subtitle" --><li><b>Subtitle:</b> <!-- TMPL_VAR NAME="subtitle" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="author" --><li><b>Author:</b> <a href="catalogue-search.pl?kohafield=author&op=do_search&value=<!--TMPL_VAR NAME="author" ESCAPE=URL>&and_or=@and&order=author,1&zoom=1"><!-- TMPL_VAR NAME="author" --></a></li><!--/TMPL_IF-->
+			<!-- TMPL_IF NAME="additionalauthor" --><li><b>Additional Author:</b> <!-- TMPL_VAR NAME="additionalauthor" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="isbn" --><li><strong>ISBN:</strong> <!-- TMPL_VAR NAME="isbn" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="classification" --><li><strong>Classification:</strong> <!-- TMPL_VAR NAME="classification" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="seriestitle" --><li><b>Series Title:</b> <!-- TMPL_VAR NAME="seriestitle" --><!-- TMPL_IF NAME="volume" --><!-- TMPL_VAR NAME="volume" --><!-- /TMPL_IF --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="subject" --><li><b>Subject:</b> <!-- TMPL_VAR NAME="subject" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="copyrightdate" --><li><b>Copyright:</b> <!-- TMPL_VAR NAME="copyrightdate" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="notes" --><li><b>Notes:</b> <!-- TMPL_VAR NAME="notes" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="unititle" --><li><b>Unititle:</b> <!-- TMPL_VAR NAME="unititle" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="serial" --><li><b>Serial:</b> <!-- TMPL_VAR NAME="serial" --></li><!-- /TMPL_IF --> 
+			<!-- TMPL_IF name="url" --><li><b>URL:</b> <a href="<!-- TMPL_VAR name="url" -->"><!--TMPL_VAR NAME="url" --></a></li><!-- /TMPL_IF -->
+			
+<!-- /TMPL_LOOP -->
+			<li><b>Subjects:</b><!-- TMPL_LOOP NAME="MARCSUBJCTS" --><!-- TMPL_VAR NAME="MARCSUBJCT" -->, <!-- /TMPL_LOOP -->
+			<li><b>URLs:</b><!-- TMPL_LOOP NAME="MARCURLS" --><a href="<!-- TMPL_VAR name="MARCURL" -->"><!-- TMPL_VAR NAME="MARCURL" --></a> <!-- /TMPL_LOOP -->
+			<li><b>Abstract:</b><!-- TMPL_LOOP NAME="MARCNOTES" --><!-- TMPL_VAR NAME="MARCNOTE" -->, <!-- /TMPL_LOOP -->
+
+			<li><b>Biblio Record</b> <!-- TMPL_VAR NAME="biblionumber" --></li>
+			<li><b>Total Number of Items:</b> <!-- TMPL_VAR NAME="count" --></li>
+			</ul>
+
+<br clear="both" /></div><div class="tabitem">
+		<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="submit" value="Edit Record" /></form>
+		<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" name="op" value="duplicate" /><input type="submit" class="submit" value="Duplicate Record" /></form>
+		<form action="/cgi-bin/koha/cataloguing/additem.pl" method="get" ><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber"-->" /><input type="submit" class="submit" value="Edit Items" /></form>
+		</div>
+
+
+<div class="table"><table>
+	<tr>
+		<th>Item Type</th>
+		<th>LC Classifiction</th>
+		<th>Location</th>
+		<th>Date Due</th>
+		<th>Last Seen</th>
+		<th>Barcode</th>
+		<!-- <th>Volume</th> -->
+	</tr>
+	
+<!-- TMPL_IF NAME="ITEM_RESULTS" -->
+<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="ctype" --></td>
+			<td><!-- TMPL_IF NAME="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="classification" --><!-- /TMPL_IF --></td>
+			<td><!--TMPL_IF  NAME="itemlost"--> LOST !!!<!--TMPL_ELSE--><!-- TMPL_VAR NAME="branchname" -->-<!-- TMPL_VAR NAME="shelf" --><!--/TMPL_IF--></td>
+			<td><!-- TMPL_VAR NAME="datedue" --></td>
+			<td><!-- TMPL_VAR NAME="datelastseen" --></td>
+			<td><a href="moredetail.pl?type=<!-- TMPL_VAR NAME="type" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;barcode=<!-- TMPL_VAR NAME="barcode" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
+			 <td><!-- TMPL_IF NAME="volumedesc" --><!-- TMPL_VAR NAME="volumeddesc" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td> 
+		
+		</tr>
+	<!-- /TMPL_LOOP --><!-- TMPL_ELSE --><tr><td colspan="6">This record has no items.</td></tr><!-- /TMPL_IF -->
+	
+</table></div>
+
+
+
+<!-- TMPL_IF NAME="SITE_RESULTS" -->
+<table>
+<caption>Links to Associated Web Sites</caption>
+<!-- TMPL_LOOP NAME="SITE_RESULTS" -->
+<tr>
+<td><b>Title:</b> <!-- TMPL_VAR name="title" --><br>
+<b>Description:</b> <!-- TMPL_VAR name="description" --><br>
+<b>URL:</b><a href="http://<!-- TMPL_VAR name="url" -->">http://<!--TMPL_VAR name="url"></a><br>
+</td>
+</tr>
+<!-- /TMPL_LOOP -->
+</table>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/detailprint.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/detailprint.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/detailprint.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/detailprint.tmpl	26 Mar 2007 02:19:22 -0000	1.5.2.1
@@ -0,0 +1,43 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Print View for <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close-print.inc" -->
+
+<!-- main site -->
+<div id="main">
+<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
+	<table class="list">
+	<caption><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></caption>
+	<tr><th>Biblio Record Number: </th><td> <!-- TMPL_VAR NAME="biblionumber" -->	</td></tr>
+<!-- TMPL_IF NAME="author" --><tr><th>Author: </th><td><!-- TMPL_VAR NAME="author" --></td></tr><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="additional" --><tr><th>Additional Author: </th><td><!-- TMPL_VAR NAME="additional" --></td></tr><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
+<!-- TMPL_IF name="publishercode" --><tr><th>Publisher: </th><td><!-- TMPL_VAR NAME="publishercode" --></td></tr><!-- /TMPL_IF -->
+<tr><th>Publication Details: </th><td>			<!-- TMPL_IF name="publicationyear" --><!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="pages" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="pages" -->
+			<!-- TMPL_IF name="size" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="size" --></td></tr>
+			<!-- TMPL_IF name="collection" --><tr><th>Collection:</th><td> <!-- TMPL_VAR NAME="seriestitle" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="subject" --><tr><th>Subject: </th><td><!-- TMPL_VAR NAME="subject" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="copyrightdate" --><tr><th>Copyright Date: </th><td> <!-- TMPL_VAR NAME="copyrightdate" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="notes" --><tr><th>Notes: </th><td><!-- TMPL_VAR NAME="notes" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="unititle" --><tr><th>Unititle: </th><td><!-- TMPL_VAR NAME="unititle" --></td></tr><!-- /TMPL_IF --> 
+			<!-- TMPL_IF name="dewey" --><tr><th>Dewey: </th><td><!-- TMPL_VAR name="dewey" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="classification" --><tr><th>Classification: </th><td> <!-- TMPL_VAR name="classification" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="lccn" --><tr><th>LCCN: </th><td><!-- TMPL_VAR name="lccn" --></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="url" --><tr><th>URL: </th><td><a href="<!-- TMPL_VAR name="url" -->"><!-- TMPL_VAR NAME="url" --></a></td></tr><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="ISBN" --><tr><th>ISBN: </th><td><!-- TMPL_VAR NAME="ISBN" --></td></tr><!-- /TMPL_IF -->
+	</table>
+<!-- /TMPL_LOOP -->
+
+<table>
+	<tr><th>Item Type</th><th>Call Number</th><th>Location</th><th>Date Due</th><th>Last Seen</th><th>Barcode</th></tr>
+	<!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="itemtype" --></td>
+			<td><!-- TMPL_VAR NAME="itemcallnumber" --></td>
+			<td><!-- TMPL_VAR NAME="branchname" --><!-- TMPL_IF NAME="bulk" -->, <!-- TMPL_VAR NAME="bulk" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="date_due" --></td>
+			<td><!-- TMPL_VAR NAME="datelastseen" --></td>
+			<td><!-- TMPL_VAR NAME="barcode" --></td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/livesearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/livesearch.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/livesearch.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/livesearch.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1 @@
+<ul class="LSRes"><!-- TMPL_LOOP name="results" --><li class="LSRow" onmouseover="liveSearchHover(this)" onclick="liveSearchClicked(this)"><a href="<!--TMPL_VAR name="script"-->"></a><!-- TMPL_VAR name="description" --><!-- TMPL_IF name="cuted" --> ...<!-- /TMPL_IF --></a><span class="LSResRight"><!-- TMPL_VAR name="translation" --></span></li><!-- /TMPL_LOOP --></ul>

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/moredetail.tmpl	26 Mar 2007 02:19:22 -0000	1.17.2.1
@@ -0,0 +1,87 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Item Details for <!-- TMPL_LOOP NAME="BIBITEM_DATA" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main">
+
+<!-- TMPL_LOOP NAME="BIBITEM_DATA" -->
+<!-- TMPL_IF NAME="error" --><div id="error" class="error"><!-- TMPL_VAR NAME="error" -->
+<form class="inline" method="get" action="moredetail.pl">
+<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" />
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+<input type="hidden" name="lost" value="<!-- TMPL_VAR name="lost" -->" />
+<input type="hidden" name="withdrawn" value="<!-- TMPL_VAR name="withdrawn" -->" />
+<input type="hidden" name="override" value="yes" />
+<input type="hidden" name="op" value="update" />
+<input type="submit" value="Confirm Change" class="submit" accesskey="y" /></form><form class="inline" method="get" action="moredetail.pl"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="submit" class="cancel" value="Don't Change" accesskey="n" /></form>
+</div><!--/TMPL_IF-->
+
+<!-- BIBLIO ITEM  -->
+<h1><!-- TMPL_VAR NAME="title" -->
+<!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --></h1>
+<div class="tabitem"><form action="/cgi-bin/koha/reserve/request.pl" method="post"><input type="hidden" value="<!-- TMPL_VAR NAME="biblionumber" -->" name="biblionumber" /><input type="submit" class="submit" value="Reserves" /></form> <form action="detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" value="intra" name="type" /><input type="submit" class="submit" value="Return to Brief Display" /></form><form action="MARCdetail.pl" method="get">
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
+<input type="submit" class="submit" value="View MARC" /></form></div>
+<div class="data-main"><table>
+	<caption>Bibliographic Details</caption>
+	<!-- TMPL_IF NAME="biblionumber" --><tr><th>Biblionumber:</th><td><!-- TMPL_VAR NAME="biblionumber" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="itemtype" --><tr><th>Item Type:</th><td><!-- TMPL_VAR NAME="itemtype" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="url" --><tr><th>URL:</th><td><!-- <!-- TMPL_VAR NAME="url" --> --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="loanlength" --><tr><th>Loan Length:</th><td><!-- TMPL_VAR NAME="loanlength" --> days</td></tr><!-- /TMPL_IF -->
+	<!-- <tr><th>Rental Charge:</th><td><!-- TMPL_VAR NAME="rentalcharge" --></td></tr> -->
+	<!-- TMPL_IF NAME="dewey" --><tr><th>Classification:</th><td><!-- TMPL_VAR NAME="classification" --><!-- TMPL_VAR NAME="subclass" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="isbn" --><tr><th>ISBN:</th><td> <!-- TMPL_VAR NAME="isbn" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="publishercode" --><tr><th>Publisher:</th><td><!-- TMPL_VAR NAME="publishercode" --></td> </tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="place" --><tr><th>Place:</th><td><!-- TMPL_VAR NAME="place" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="publicationyear" --><tr><th>Date:</th><td><!-- TMPL_VAR NAME="publicationyear" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="volumedesc" --><tr><th>Volume:</th><td><!-- TMPL_VAR NAME="volumeddesc" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="pages" --><tr><th>Pages:</th><td><!-- TMPL_VAR NAME="pages" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="illus" --><tr><th>Illus:</th><td><!-- TMPL_VAR NAME="illus" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="size" --><tr><th>Size:</th><td><!-- TMPL_VAR NAME="size" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="bnotes" --><tr><th>Notes:</th><td><!-- TMPL_VAR NAME="bnotes" --></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="count" --><tr><th>No. of Items:</th><td><!-- TMPL_VAR NAME="count" --></td></tr><!-- /TMPL_IF -->
+</table></div>
+
+
+<!-- /TMPL_LOOP -->
+
+<!-- TMPL_LOOP NAME="ITEM_DATA" -->
+<div class="data">
+<table>
+<caption><a name="<!-- TMPL_VAR NAME="barcode" -->" id="<!-- TMPL_VAR NAME="barcode" -->">Barcode: <!-- TMPL_VAR NAME="barcode" --></a></caption>
+<!-- TMPL_IF NAME="homebranch" --><tr><th>Home Branch:</th><td> <!-- TMPL_VAR NAME="homebranch" --></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="holdingbranch" --><tr><th>Current Branch:</th><td> <!-- TMPL_VAR NAME="holdingbranch" --></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="datelastseen" --><tr><th>Last seen:</th><td> <!-- TMPL_VAR NAME="datelastseen" --></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="issue" --><tr><th>Item Status:</th><td> Due <!-- TMPL_VAR NAME="date_due" --> (Issued to <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="cardnumber" --></a>)</td></tr><!-- TMPL_ELSE --><tr><th>Item Status</th><td>Available</td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="datelastborrowed" --><tr><th>Last borrowed:</th><td> <!-- TMPL_VAR NAME="datelastborrowed" --></td></tr><!-- /TMPL_IF -->
+<!-- on issue bit -->
+<!-- TMPL_IF NAME="card0" --><tr><th>Last Borrower 1:</th><td> <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="card0" -->"><!-- TMPL_VAR NAME="card0" --></a></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="card1" --><tr><th>Last Borrower 2:</th><td> <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="card1" -->"><!-- TMPL_VAR NAME="card1" --></a></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="replacementprice" --><tr><th>Replacement Price:</th><td> $<!-- TMPL_VAR NAME="replacementprice" --></td></tr><!-- /TMPL_IF -->
+<tr><th>Lost Status:</th><td><!-- TMPL_IF NAME="itemlost" -->Lost<!-- TMPL_ELSE -->Not Lost<!-- /TMPL_IF -->
+<form class="inline" action="moredetail.pl" method="post"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
+<input type="hidden" name="op" value="update">
+<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
+<!-- TMPL_IF NAME="itemlost" --><input type="hidden" value="0" name="lost" /><!-- TMPL_ELSE --><input type="hidden" value="1" name="lost" /><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="wthdrawn" --><input type="hidden" name="withdrawn" value="1" /><!-- TMPL_ELSE --><input type="hidden" name="withdrawn" value="0" /><!-- /TMPL_IF -->
+<input type="submit" name="submit" class="submit" value="<!-- TMPL_IF NAME="itemlost" -->Make Found<!-- TMPL_ELSE -->Make Lost<!-- /TMPL_IF -->" /></form></td></tr>
+<tr><th>Withdrawn: </th><td><!-- TMPL_IF NAME="wthdrawn" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --> 
+<form class="inline" action="moredetail.pl" method="post"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
+<input type="hidden" name="op" value="update">
+<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
+<!-- TMPL_IF NAME="itemlost" --><input type="hidden" value="1" name="lost" /><!-- TMPL_ELSE --><input type="hidden" value="0" name="lost" /><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="wthdrawn" --><input type="hidden" name="withdrawn" value="0" /><!-- TMPL_ELSE --><input type="hidden" name="withdrawn" value="1" /><!-- /TMPL_IF -->
+
+<input type="submit" name="submit" class="submit" value="<!-- TMPL_IF NAME="wthdrawn" -->Restore<!-- TMPL_ELSE -->Make Withdrawn<!-- /TMPL_IF -->" /></form></td></tr>
+<!-- TMPL_IF NAME="paidfor" --><tr><th>Paid for:</th><td> <!-- TMPL_VAR NAME="paidfor" --></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="itemnotes" --><tr><th>Notes:</th><td> <!-- TMPL_VAR NAME="itemnotes" --></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="renewals" --><tr><th>Renewals:</th><td> <!-- TMPL_VAR NAME="renewals" --></td></tr><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="dateaccessioned" --><tr><th>Accession Date:</th><td><!-- TMPL_VAR NAME="dateaccessioned" --> (<a href="/cgi-bin/koha/acqui/acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;invoice=<!-- TMPL_VAR NAME="booksellerinvoicenumber" -->&amp;catview=yes">View Receipt Summary</a>)</td></tr><!-- /TMPL_IF -->
+
+<tr><th>Total Issues:</th><td><!-- TMPL_VAR NAME="issues" --> (<a href="bookcount.pl?&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">View Circulation History</a>)</td></tr>
+</table></div>
+
+<!-- /TMPL_LOOP -->
+
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/news_searchresults.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/news_searchresults.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/news_searchresults.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/news_searchresults.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,113 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_IF NAME="facets_loop" -->
+<!-- TMPL_INCLUDE NAME="intranet-facets.inc" -->
+<!--TMPL_ELSE-->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<!--/TMPL_IF-->
+
+
+
+<div id="main" align="center">
+    <h1>Catalogue search</h1>
+<!-- TMPL_IF name="error" --><div class="error">The server is too busy TRY AGAIN!</div>
+<!-- TMPL_ELSE -->
+	<!-- TMPL_LOOP NAME="searchdesc" -->
+    	You searched:
+    	<div style="color:green;">|&nbsp;
+	
+									<!-- TMPL_IF name="any" -->Any field = <!-- TMPL_VAR name="any" -->&nbsp;|&nbsp;<!-- /TMPL_IF -->
+									<!-- TMPL_IF name="title" -->Title = <!-- TMPL_VAR name="title" -->&nbsp;|&nbsp;<!-- /TMPL_IF -->
+									<!-- TMPL_IF name="publishercode" -->Publisher = <!-- TMPL_VAR name="publishercode" -->&nbsp;|&nbsp;<!-- /TMPL_IF -->
+									
+		</div>
+	<!-- /TMPL_LOOP -->
+
+
+	<!-- TMPL_VAR NAME="numrecords" --> results
+
+<div id="pages" >
+    <!-- Row of numbers corresponding to search result pages -->
+    
+    <!-- TMPL_LOOP NAME="numbers" -->
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
+		<!-- TMPL_ELSE -->
+		    <span class="pages">
+	        <a class="pages"  href="cyprus-search.pl?op=do_search&amp;zoom=1&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME="number" --></a>
+	        </span>
+		<!-- /TMPL_IF -->
+    <!-- /TMPL_LOOP -->
+    
+</div>
+
+
+
+<!-- Search Results Table -->
+<!-- TMPL_IF NAME="numrecords" -->
+<form name="myform" action="" style="margin:0px">
+	<br>
+	<table border="0" cellspacing="0" cellpadding="2" width="80%" align="center">
+	<tr bgcolor="#99cccc" background="<!-- TMPL_VAR NAME="themelang" -->/images/background-opac.gif">
+        	<th align="left"> Title (click to read ) </th>
+		<th>Publisher</th>		
+		<th><a  href="cyprus-search.pl?op=do_search&amp;zoom=1&amp;reorder=date i&gt<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->">â–¼</a>Date <a  href="cyprus-search.pl?op=do_search&amp;reorder=date i&lt&zoom=1<!-- TMPL_LOOP NAME="FORMINPUTS" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->">â–²</a></th>
+	
+	</tr>
+
+
+	<!-- Actual Search Results -->
+	    <input type="checkbox" name="bibid" value="0" style="display:none">
+		<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
+			<tr <!-- TMPL_IF name="even" -->bgcolor="#ffffcc"<!-- /TMPL_IF -->>
+				
+				<td >
+					
+					<a class="transparent" href="/cgi-bin/koha/<!--TMPL_VAR NAME="script"-->?id=<!-- TMPL_VAR NAME="id" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="title" -->
+					</a>
+					
+				</td>
+				
+                <td ><!-- TMPL_VAR NAME="source" --></a></td>
+				
+				<td align="center" >  <!-- TMPL_VAR NAME="date" --> </td>
+			
+			</tr>
+		<!-- /TMPL_LOOP -->
+
+
+		
+		</table>
+</form>
+<br>
+<div class="pages">
+    <!-- Row of numbers corresponding to search result pages -->
+
+    <!-- TMPL_LOOP NAME="numbers" -->
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
+		<!-- TMPL_ELSE -->
+		    <span class="pages">
+	        <a class="pages" href="cyprus-search.pl?op=do_search&zoom=1&startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME=number --></a>
+	        </span>
+		<!-- /TMPL_IF -->
+    <!-- /TMPL_LOOP -->
+    
+</div>
+<br>
+<div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
+<!-- TMPL_ELSE -->
+	<div align="center">0 records <br></div>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+
+<div align="center"><a class="transparent" href="catalogue-search.pl">New search</a></div>
+
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/newsdetail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/newsdetail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/newsdetail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/newsdetail.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,23 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Details for <!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --><!-- /TMPL_LOOP --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+
+<h3 class="title"><!-- TMPL_VAR NAME="title" --> </h3>
+
+
+<div class="details">
+			
+<ul>
+			<!-- TMPL_IF NAME="date" --><li><b>Date:</b> <!-- TMPL_VAR NAME="date" --></li><!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="source" --><li><b>Paper:</b> <a href="cyprus-search.pl?kohafield=publisher&op=do_search&value=<!--TMPL_VAR NAME="source" ESCAPE=URL>&and_or=@and&zoom=1"><!-- TMPL_VAR NAME="source" --></a></li><!--/TMPL_IF-->
+			<!-- TMPL_IF NAME="news" --><li><b>News:</b></li> <!-- TMPL_VAR NAME="news" --><!-- /TMPL_IF -->
+			
+
+			
+			</ul>
+
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/search.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,254 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main">
+	<h1>Catalogue Search</h1>
+
+<table align ="center" >
+	
+	    <td align ="center">
+	       <input id="searchType1" type="button" value="Zoom Search" onclick="changeSearch1()" <!-- TMPL_IF name="zoom_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF -->>
+		</td>	
+		<td align ="center">
+	       <input id="searchType2" type="button" value="SQL search" onclick="changeSearch2()" <!-- TMPL_IF name="sql_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
+		</td>
+		<td align ="center">
+	       <input id="searchType3" type="button" value="Brave search" onclick="changeSearch3()" <!-- TMPL_IF name="brave_search" -->style="background-color:orange"<!-- TMPL_ELSE -->style="background-color:yellow"<!-- /TMPL_IF --> background-color="orange">
+		</td>
+	</tr>
+</table>
+
+<form  name="zoom_form" id="zoom_form" action="/cgi-bin/koha/catalogue/search.pl" method='post' <!-- TMPL_IF name="zoom_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
+    <input type="hidden" name="op" value="do_search">
+    <input type="hidden" name="search_type" value="zoom">
+    <input type="hidden" name="startfrom" value="0">
+	<input type="hidden" name="zoom" value="1">
+<table style="border:0" align="center"><tbody id="queryarea">
+
+<tr><td ><fieldset><b>Display per page:</b><input type text name="number_of_results" value="10" size="3"/></fieldset></td><td colspan="2"><fieldset><b>Format to display </b>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></fieldset></td></tr>
+
+<tr>	<td align="right">Search on:</td><td><select size="1"  name="kohafield" style="width:170px">
+				<!-- TMPL_LOOP name="kohafields" -->
+	                <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
+				<!-- /TMPL_LOOP --></select></td><td><input type="text"  size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
+							<td>With</td><td><Select type="text"  name="relation">
+							<option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >&nbsp;
+							</option>
+				            			<option value="@attr 5=1 " <!-- TMPL_IF name="@attr 5=1 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
+							</option>
+							<option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
+							</option>
+							<option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
+							</option>
+							<option value="@attr 5=1 @attr 6=3 " <!-- TMPL_IF name="@attr 5=1 @attr 6=3 " -->selected<!-- /TMPL_IF --> >Starts with
+							</option>
+							<option value="@attr 2=1  " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
+							</option>
+							<option value="@attr 2=2  " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
+							</option>
+							<option value="@attr 2=5  " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
+							</option>
+							<option value="@attr 2=4  " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
+							</option>
+						</select></td></tr>
+		<tr id="andor"><td>		
+					<Select type="text"   name="and_or">
+				            			<option value="@and" <!-- TMPL_IF name="and" -->selected<!-- /TMPL_IF --> >AND
+							</option>
+							<option value="@or" <!-- TMPL_IF name="or" -->selected<!-- /TMPL_IF --> >OR
+							</option>
+							<option value="@not" <!-- TMPL_IF name="not" -->selected<!-- /TMPL_IF --> >NOT
+							</option>
+						</select></td>
+				<td><select size="1"  name="kohafield" id="kohafield" style="width:170px">
+				
+				<!-- TMPL_LOOP name="kohafields" -->
+	               		 <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
+				<!-- /TMPL_LOOP --></select></td><td><input type="text"  size="25" name="value" value="<!-- TMPL_VAR name="value" -->" ></td>
+							<td>With</td><td><Select type="text"  name="relation">
+							<option value=" " <!-- TMPL_IF name="blank" -->selected<!-- /TMPL_IF --> >&nbsp;
+							</option>
+				            			<option value="@attr 5=1 " <!-- TMPL_IF name="@attr 5=1 " -->selected<!-- /TMPL_IF --> >* wildcard anywhere
+							</option>
+							<option value="@attr 5=100 " <!-- TMPL_IF name="@attr 5=100 " -->selected<!-- /TMPL_IF --> >No truncation
+							</option>
+							<option value="@attr 5=102 " <!-- TMPL_IF name="@attr 5=102 " -->selected<!-- /TMPL_IF --> >Mistakes allowed
+							</option>
+							<option value="@attr 3=1 " <!-- TMPL_IF name="@attr 3=1 " -->selected<!-- /TMPL_IF --> >Starts with
+							</option>
+							<option value="@attr 2=1  " <!-- TMPL_IF name="@attr 2=1 " -->selected<!-- /TMPL_IF --> >Less than
+							</option>
+							<option value="@attr 2=2  " <!-- TMPL_IF name="@attr 2=2 " -->selected<!-- /TMPL_IF --> >Less than & equal
+							</option>
+							<option value="@attr 2=5  " <!-- TMPL_IF name="@attr 2=5 " -->selected<!-- /TMPL_IF --> >Greater than
+							</option>
+							<option value="@attr 2=4  " <!-- TMPL_IF name="@attr 2=4 " -->selected<!-- /TMPL_IF --> >Greater than & equal
+							</option>
+						</select></td></tr></tbody>
+	<tr>
+<td ><fieldset>Limit with itemtype: <br>
+			<input type="hidden" name="kohafield" value="itemtype"/>
+			<input type="hidden" name="and_or" value="@and"/><input type="hidden" name="relation" value="@attr 2=3">
+			<select name="value"  style="width:170px">			
+			<option value="">All item types</option>
+		<!-- TMPL_LOOP NAME="itemtypeloop" -->
+			<option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="description" --></option>
+		<!-- /TMPL_LOOP -->
+			</select></fieldset>
+</td>
+<td colspan="4">
+	<fieldset>Location:<input type="hidden" name="kohafield" value="holdingbranch"/>
+		<input type="hidden" name="and_or" value="@and"/><input type="hidden" name="relation" value="@attr 2=3">
+		<select name="value" id="branchloop" size="1">
+		<option value="">All Branches</option>
+		<!-- TMPL_LOOP NAME="branchloop" -->
+		<option value=<!-- TMPL_VAR NAME="branchcode" --> ><!-- TMPL_VAR NAME="branchname"--></option>
+		<!-- /TMPL_LOOP -->
+		</select><br>
+		<input type="hidden" name="kohafield" value="date_due"/>
+		<input type="hidden" name="and_or" value="@and"/><input type="hidden" name="relation" value="@attr 2=6">
+		<label for="available-items">Only items currently available</label><input type="checkbox" id="available-items" name="value" value="0000-00-00"/>
+	</fieldset>
+</td>
+
+</tr>
+<tr>
+			<td colspan="2"><fieldset >Sort on:<select size="1"  name="order" style="width:170px">
+			<option value="">System Ranked</option>	
+			<!-- TMPL_LOOP name="sorts" -->
+	              	  <option value="<!-- TMPL_VAR name="kohafield" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="label" --></option>
+				<!-- /TMPL_LOOP --></select>
+			<select size="1"  name="asc" style="width:100px">
+				<option value=" <i">Ascending</option>
+				<option value=" >i">Descending</option>
+				</fieldset></td>
+		<td colspan="2"><fieldset >Catalogue:<select size="1"  name="serverid" style="width:170px">
+			<option value="-1" selected>Library Catalogue</option>
+			<option value="0">All Catalogues</option>	
+			<!-- TMPL_LOOP name="servers" -->
+	              	  <option value="<!-- TMPL_VAR name="serverid" -->" <!-- TMPL_IF name="sel" -->selected<!-- /TMPL_IF -->  ><!-- TMPL_VAR name="server" --></option>
+				<!-- /TMPL_LOOP --></select>
+			
+				</fieldset></td>
+
+</tr>
+<tr><td colspan="2">Fill a filename to export results:<input type="text" name="basename"/>full path ie (c:\export)</td></tr>
+<tr><td colspan=2><input class = "button" type="submit" value="Start search"></td><td><a href="#" onClick="cloneQuery();" title="add another search field">[+]</a></td></tr>
+
+</form>
+<form onSubmit="return checkSQLSearch()" name="precise_form" id="sql_form" action="/cgi-bin/koha/catalogue/search.pl" method='post' <!-- TMPL_IF name="sql_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
+
+    <input type="hidden" name = "op" value="do_search">
+    <input type="hidden" name = "search_type" value="sql">
+<input type="hidden" name="zoom" value="0">
+	<table style="border:0" align="center">
+<tr>
+<td><b>Format to display</b></td><td>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></td>
+	    <tr>
+			<td>Barcode</td>
+			<td colspan="1"><input type="text"  size="15"   name="barcode" value="<!-- TMPL_VAR name="barcode" -->" onchange="if(this.value != '') {this.form.itemnumber.value = ''; this.form.biblionumber.value = ''}"></td>
+		    <td>Item number</td>
+			<td colspan="1"><input type="text"  size="15"   name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" onchange="if(this.value != '') {this.form.biblionumber.value = ''; this.form.barcode.value = ''} "></td>
+		
+			 <td>Biblio Number</td>
+			<td colspan="1"><input type="text"  size="15"   name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" onchange="if(this.value != '') {this.form.barcode.value = ''; this.form.itemnumber.value = ''} "></td>
+		</tr>
+
+	    <tr>
+			<td colspan = "4" align = "center">
+			    <br>
+				<input class = "button" type="submit" value="Start search">
+	      		</td>
+		</tr>
+
+	</table>
+</form>
+<form onSubmit="return BraveSearch()" name="brave_form" id="brave_form" action="/cgi-bin/koha/catalogue/search.pl" method='post' <!-- TMPL_IF name="brave_search" -->style="display:inline;"<!-- TMPL_ELSE -->style="display:none;"<!-- /TMPL_IF -->>
+
+    <input type="hidden" name = "op" value="do_search">
+  <input type="hidden" name="search_type" value="brave">
+<input type="hidden" name="zoom" value="1">
+	<table style="border:0" align="center">
+<tr>
+<td><fieldset><b>Format to display </b>MARC<input type="radio" name="MARC" value="1" checked=1>Brief<input type="radio" name="MARC" value="0"></fieldset></td><td><fieldset><b>Display per page:</b><input type text name="number_of_results" value="10" size="1"/></fieldset></td></tr>
+	    <tr>
+			<td>Query  <textarea name = "value"  id="bravetext" cols="40" rows="5" ></textarea></td>
+			 <td> of type: <select  name = "searchtype" >
+			<option value="pqf">PQF</option>
+			<option value="ccl">CCL</option>
+			<option value="cql">CQL</option>
+			</select>
+			</td>
+		</tr>
+
+	    <tr>
+			<td colspan = "4" align = "center">
+			    <br>
+				<input class = "button" type="submit" value="Start search">
+	      		</td>
+		</tr>
+
+	</table>
+</form>
+</table>	
+</div>
+<script language="JavaScript" type="text/javascript">
+function hideSearchsTypes() {
+            document.getElementById('zoom_form').style.display = 'none';
+            document.getElementById('sql_form').style.display = 'none';
+	 document.getElementById('brave_form').style.display = 'none';
+          
+		}
+
+		function resetButtonsColors() {
+			document.getElementById('searchType1').style.backgroundColor = 'yellow';
+			document.getElementById('searchType2').style.backgroundColor = 'yellow';
+			document.getElementById('searchType3').style.backgroundColor = 'yellow';
+			
+		}
+
+		function changeSearch1() {
+		    resetButtonsColors();
+		    document.getElementById('searchType1').style.backgroundColor = 'orange';
+		    hideSearchsTypes();
+		    document.getElementById('zoom_form').style.display = 'inline';
+		}
+
+        function changeSearch2() {
+            resetButtonsColors();
+		    document.getElementById('searchType2').style.backgroundColor = 'orange';
+		    hideSearchsTypes();
+		    document.getElementById('sql_form').style.display = 'inline';
+		}
+	 function changeSearch3() {
+            resetButtonsColors();
+		    document.getElementById('searchType3').style.backgroundColor = 'orange';
+		    hideSearchsTypes();
+		    document.getElementById('brave_form').style.display = 'inline';
+		}
+function checkSQLSearch() {
+		if ( (document.sql_form.barcode.value == '') &&
+			(document.sql_form.itemnumber.value == '') && (document.sql_form.biblionumber.value == '') ) {
+			alert("Enter a barcode or itemnumber or biblionumber to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+
+function BraveSearch() {
+		if ( document.brave_form.text.value == '')   {
+			alert("Enter some code to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+function cloneQuery() {
+var cloneoriginal = document.getElementById('andor');
+ var clone = cloneoriginal.cloneNode(true);
+queryarea.appendChild(clone);
+
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/searchresults.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/searchresults.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/searchresults.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/searchresults.tmpl	26 Mar 2007 02:19:22 -0000	1.18.2.1
@@ -0,0 +1,109 @@
+<html>
+<body>
+
+
+<div id="main" align="center">
+    <h1>Catalogue search</h1>
+<!-- TMPL_IF name="error" --><div class="error">The server is too busy TRY AGAIN!</div>
+<!-- TMPL_ELSE -->
+	<!-- TMPL_LOOP NAME="searchdesc" -->
+    	You searched:
+    	<div >|&nbsp;
+	 <!-- TMPL_VAR name="query" -->&nbsp;|&nbsp;
+		</div>
+	<!-- /TMPL_LOOP -->
+
+
+	<!-- TMPL_VAR NAME="numrecords" --> results
+
+<div id="pages" >
+    <!-- Row of numbers corresponding to search result pages -->
+    
+    <!-- TMPL_LOOP NAME="numbers" -->
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
+		<!-- TMPL_ELSE -->
+		    <span class="pages">
+	        <a class="pages"  href="search.pl?op=do_search&amp;zoom=1&amp;startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="HTML" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME="number" --></a>
+	        </span>
+		<!-- /TMPL_IF -->
+    <!-- /TMPL_LOOP -->
+    
+</div>
+
+
+
+<!-- Search Results Table -->
+<!-- TMPL_IF NAME="numrecords" -->
+<form name="myform" action="" style="margin:0px">
+	<br>
+	<table border="0" cellspacing="0" cellpadding="2" width="80%" align="center">
+	<tr >
+       	<th align="left"> Title
+	   </th>
+		<th align="left"> Author
+		<th>Issue</th>
+	</tr>
+
+
+	<!-- Actual Search Results -->
+	  	<!-- TMPL_LOOP NAME="SEARCH_RESULTS" -->
+			<tr >
+				
+				<td >
+					
+					<a class="transparent" ><!-- TMPL_VAR NAME="title" -->
+					</a>
+					<br>
+					<span style="font-size:90%">
+                    <!-- TMPL_IF NAME="subtitle" --><!-- TMPL_VAR NAME="subtitle" --><br> <!-- /TMPL_IF -->
+					<!-- TMPL_IF NAME="isbn" -->ISBN: <!-- TMPL_VAR NAME="isbn" --> <!-- /TMPL_IF -->
+					</span>
+				</td>
+				<td> <!-- TMPL_IF NAME="author" --> <a class="transparent"><!-- TMPL_VAR NAME="author" --></a><br><!-- /TMPL_IF -->
+				    <span style="font-size:90%">
+					<!-- TMPL_LOOP NAME="additionalauthors" -->
+					    <a class="transparent" ><!-- TMPL_VAR NAME="value" --></a><br>
+                   				 <!-- /TMPL_LOOP -->
+                  			  </span>
+				</td>
+                			<td><!-- TMPL_VAR NAME="totalissue" --></td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+
+
+		
+		</table>
+</form>
+<br>
+<div class="pages">
+    <!-- Row of numbers corresponding to search result pages -->
+
+    <!-- TMPL_LOOP NAME="numbers" -->
+		<!-- TMPL_IF NAME="highlight" -->
+		    <span class="current">
+		    <!-- TMPL_VAR NAME="number" -->
+	        </span>
+		<!-- TMPL_ELSE -->
+		    <span class="pages">
+	        <a class="pages" href="search.pl?op=do_search&zoom=1&startfrom=<!-- TMPL_VAR NAME="startfrom" --><!-- TMPL_LOOP NAME="forminputs" -->&amp;<!-- TMPL_VAR NAME="field" -->=<!-- TMPL_VAR NAME="value" ESCAPE="URL" --><!-- /TMPL_LOOP -->&amp;pg=<!-- TMPL_VAR NAME="pg" -->&amp;reorder=<!-- TMPL_VAR NAME="reorder" -->"><!-- TMPL_VAR NAME=number --></a>
+	        </span>
+		<!-- /TMPL_IF -->
+    <!-- /TMPL_LOOP -->
+    
+</div>
+<br>
+<div align="center">Results <b><!-- TMPL_VAR NAME="beginning" --></b> - <b><!-- TMPL_VAR NAME="endat" --></b> of <b><!-- TMPL_VAR NAME="numrecords" --></b> records.</div>
+<!-- TMPL_ELSE -->
+	<div align="center">0 records <br></div>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+
+<div align="center"><a class="transparent" href="search.pl">New search</a></div>
+
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/translation.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/translation.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/translation.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/translation.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title><!--TMPL_VAR name="LibraryName"--></title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<script type="text/javascript" language="javascript" src="<!--TMPL_VAR name="themelang"-->/includes/livesearch.js"></script>
+	<link href='<!-- TMPL_VAR name="themelang" -->/includes/livesearch.css' rel="stylesheet" type="text/css">
+	<link href='<!-- TMPL_VAR name="themelang" -->/includes/intranet.css' rel="stylesheet" type="text/css">
+</head>
+<body onload="liveSearchInit()">
+
+ <form method="get" action="" id="keyword" onSubmit="return liveSearchSubmit()">
+	<input type="text" autocomplete="off" size="27" name="keyword" id="keyword"  onkeypress="javascript:liveSearchStart()" style="width:250px;overflow:auto" />	
+<div id="LSResult" style="display: none;"><ul id="LSShadow"><li> </li></ul></div>
+</form>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/translation_en.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/translation_en.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/translation_en.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/translation_en.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+	<title>Dictionary</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<script type="text/javascript" language="javascript" src="<!--TMPL_VAR name="themelang"-->/includes/livesearch-en.js"></script>
+	<link href='<!-- TMPL_VAR name="themelang" -->/includes/livesearch.css' rel="stylesheet" type="text/css">
+	<link href='<!-- TMPL_VAR name="themelang" -->/includes/intranet.css' rel="stylesheet" type="text/css">
+</head>
+<body onload="liveSearchInit()">
+
+ <form method="get" action="" id="keyword" onSubmit="return liveSearchSubmit()">
+	<input type="text" autocomplete="off" size="27" name="keyword" id="keyword"  onkeypress="javascript:liveSearchStart()" style="width:250px;overflow:auto" />	
+<div id="LSResult" style="display: none;"><ul id="LSShadow"><li> </li></ul></div>
+</form>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/catalogue/union-searchresult.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/catalogue/union-searchresult.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/catalogue/union-searchresult.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/catalogue/union-searchresult.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,76 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog: Simple Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main">
+<table width="760" border="0" align="center" cellpadding="4" cellspacing="2">
+  
+        <tr>
+          <td colspan="2" bgcolor="#F9F8F4"><table width="100%"  border="0" align="center" cellpadding="4" cellspacing="2">
+            <tr>
+              <td bgcolor="#06B4D2" class="style5">Union search</td>
+            </tr>  
+<!--TMPL_IF name="opsearch"-->
+<tr>
+              <td>
+				<table width="50%" border="0" align="left" cellpadding="0" cellspacing="0">
+                  <tr>
+<form method="post" action="/cgi-bin/koha/catalogue/union-search.pl" name="f">
+<input type="hidden" name="op" value="do_search"/>
+
+
+<tr>
+		<td bgcolor="#DCD9CF" class="style1">Library</td>
+		 <td width="10" bgcolor="#DCD9CF">Select</td>
+</tr>
+<!-- TMPL_LOOP name="serverloop" -->
+		<tr <!--TMPL_IF NAME="even"-->bgcolor="DEE5E7"<!--TMPL_ELSE-->bgcolor="#F2F0E9"<!--/TMPL_IF-->>
+			<td><!-- TMPL_VAR NAME="server" --></td>
+			
+			<td> <input type="checkbox" name="id" value=<!-- TMPL_VAR NAME="id" --> <!-- TMPL_IF name="checked" -->checked="1"<!-- /TMPL_IF --> ></td>
+	</tr>
+	<!-- /TMPL_LOOP -->
+	
+	<tr><td class="style1">Search <input name="field_value"       type="text" 	   class="style1"  /> 
+	on <select name="field" class="style2">
+	<option value="any">Any field</option>
+	<option value="author">Author</option>
+	<option value="title">Title</option>
+	<option value="subject">Subject</option>
+	</select></td>
+	</tr>
+	<tr><td class="style1"><input type="submit"  class="submit" value="Search" onclick="cursor :'wait'"; />
+	</td></tr>
+	</form>
+	</tr></table></td></tr>
+<!-- TMPL_ELSE -->
+		<tr>
+              <td><table width="100%"  border="0" align="left">
+<caption>Documents Found</caption>
+	 <tr bgcolor="#DCD9CF">
+		<td bgcolor="#DCD9CF" class="style1">Database</td>
+		<td bgcolor="#DCD9CF" class="style1">Results</td>
+		<td bgcolor="#DCD9CF" class="style1">View</td>
+		
+	</tr>
+	<!-- TMPL_IF name="breeding_loop" -->
+	<!-- TMPL_LOOP name="breeding_loop" -->
+		<tr <!--TMPL_IF NAME="even"-->bgcolor="DEE5E7"<!--TMPL_ELSE-->bgcolor="#F2F0E9"<!--/TMPL_IF-->>
+			<td><!-- TMPL_VAR NAME="server" --></td>
+			<td><!-- TMPL_VAR NAME="numresults" --></td>
+			<td><a href='<!-- TMPL_VAR NAME="search_string" -->' target="_blank">Click to view</a></td>
+			
+			
+		</tr>
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_ELSE -->
+		<tr><td colspan="6">Nothing found</td></tr>
+	<!-- /TMPL_IF -->
+</table></td></tr>
+<!-- /TMPL_IF -->
+</table>
+</div>
+
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/cataloguing/addbiblio.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/cataloguing/addbiblio.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/cataloguing/addbiblio.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/cataloguing/addbiblio.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,446 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: <!-- TMPL_IF NAME="oldbiblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
+<!--TMPL_UNLESS NAME="fromserials" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="acqui-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+<div id="main">
+<!--/TMPL_UNLESS-->
+
+
+<!-- TMPL_IF name="error" -->
+			<div class="error">
+				<!--TMPL_IF NAME="onloan"-->
+				<ul>
+					<li>Item currenly onloan you can not DELETE!</li>
+					<li><a href="/cgi-bin/koha/mainpage.pl">Return to home page</a></li>
+				</ul>
+				<!--/TMPL_IF-->
+				<!--TMPL_IF NAME="xmlerror"-->
+				<ul>
+					<li>Non UTF-8 characters present or malformed XML</li>
+					<li>Please correct and save.</li>
+				</ul>
+				<!--/TMPL_IF-->
+			</div>
+<!-- /TMPL_IF -->
+<!--TMPL_UNLESS NAME="onloan"-->
+	<form method="post" name="f" id="f" action="/cgi-bin/koha/cataloguing/addbiblio.pl" >
+<h1><!-- TMPL_IF NAME="oldbiblionumtagfield" -->Edit MARC Record Number <!-- TMPL_VAR name="oldbiblionumber" --><!-- TMPL_ELSE -->Add MARC Record<!-- /TMPL_IF --> With Framework : <!--TMPL_VAR Name="framework" --></h1>
+
+<div class="tabitem">
+		<input type="hidden" name="fromserials" value="<!-- TMPL_VAR NAME="fromserials" -->" />
+		<input type="hidden" name="op" value="addbiblio" />
+		<input type="hidden" name="addfield_field" /><input type="hidden" name="duplicateok" value="<!-- TMPL_VAR NAME="duplicateok" -->" />
+		<input type="hidden" name="frameworkcode" value="<!-- TMPL_VAR NAME="frameworkcode" -->" />
+		<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="oldbiblionumber" -->" />
+		<!-- TMPL_IF name="biblionumber" -->
+			<input type="button" value="Save Bibliographic Record and go to Items"  onclick="Check(this.form);" accesskey="w" class="submit" />
+		<!-- TMPL_ELSE -->
+			<!--TMPL_UNLESS NAME="fromserials" -->
+			<input type="button" value="Add Bibliographic Record and go to Items" onclick="Check(this.form);" accesskey="w" class="submit" />
+			<!-- TMPL_ELSE -->
+			<input type="button" value="Add Bibliographic Record" onclick="Check(this.form);" accesskey="w" class="submit" />
+			<!--/TMPL_UNLESS-->
+		<!-- /TMPL_IF -->
+	<input type="button" value="z39.50 Search" class="submit" onclick="PopupZ3950(); return false;" / >
+	<input type="button" value="DVD Import" class="submit" onclick="PopupDVD(); return false;" / >
+</div>
+
+<br>
+	<div class="tabs">
+        <!-- TMPL_LOOP name="BIG_LOOP" -->
+            <a href="#" onclick="active(<!-- TMPL_VAR name="number"-->); return false;" id="link<!-- TMPL_VAR name="number"-->"><!-- TMPL_VAR name="number"--></a>
+        <!--  /TMPL_LOOP -->
+	</div>
+
+<! -- RESET PAGINATION -->
+<!-- TMPL_LOOP name="BIG_LOOP" -->
+<!-- hide every tab except the 1st -->
+<!-- TMPL_IF name="number" -->
+    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:hidden">
+<!-- TMPL_ELSE -->
+    <div name="<!-- TMPL_VAR name="number" -->XX" id="<!-- TMPL_VAR name="number" -->XX" class="tab" style="visibility:visible">
+<!-- /TMPL_IF -->
+<!-- TMPL_UNLESS name="number" -->
+    <!-- show duplicate warning on tab 0 only -->
+        <!-- TMPL_IF name="duplicatebiblionumber" -->
+                    <div class="error">
+                        <p>Is this a duplicate of <a href="../catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->" onclick="openWindow('../catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->&popup=1', 'Duplicatebiblio'); return false;"><!-- TMPL_VAR name="duplicatetitle" --></a>?</p>
+                        <p>You must either :</p>
+                        <ul>
+                            <li>If it <em>is</em> a duplicate, <a href="additem.pl?biblionumber=<!-- TMPL_VAR name="duplicatebiblionumber" -->">Edit Items</a> of the existing record.</li>
+                            <li>If not, click to <input type="hidden" value="0" id="confirm_not_duplicate" name="confirm_not_duplicate" /> <a href="#" onclick="confirmnotdup(); return false;">Confirm it's not a duplicate</a></li>
+                        </ul>
+                    </div>
+        <!-- /TMPL_IF -->
+    <!-- /TMPL_UNLESS -->
+    <!-- TMPL_LOOP NAME="innerloop" -->
+		<div style=";" id="tag<!-- TMPL_VAR name="tag"-->">
+        <!-- TMPL_IF name="tag" -->
+        <p class="MARCtag">
+            <input type="hidden" name="ind_tag" value="<!-- TMPL_VAR NAME="tag" -->">
+            <!-- TMPL_UNLESS name="hide_marc" -->
+                <a title="<!-- TMPL_VAR NAME="tag_lib" -->"><!-- TMPL_VAR NAME="tag" --></a>
+                <input tabindex="1" onblur="this.style.backgroundColor='#ffffff';" onfocus="this.style.backgroundColor='#ffff00;'" type="text" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" size="2" maxlength="2" value="<!-- TMPL_VAR NAME="indicator" -->"  class="flat"> -
+            <!-- TMPL_ELSE -->
+                <input tabindex="1" type="hidden" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> name="indicator" value="<!-- TMPL_VAR NAME="indicator" -->">
+            <!-- /TMPL_UNLESS -->
+            <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
+            <!-- TMPL_VAR NAME="tag_lib" -->
+            <!-- /TMPL_UNLESS -->
+            <!-- TMPL_IF name="repeatable" --><a href="javascript:AddField('<!-- TMPL_VAR NAME="tag" -->')">+</a><!-- /TMPL_IF -->
+        </p>
+        <!-- /TMPL_IF -->
+        <!-- TMPL_LOOP NAME="subfield_loop" -->
+            <!-- TMPL_IF NAME="visibility" -->
+                <a tabindex="1" style="color: grey; font-size: 80%; cursor: se-resize;" id="label<!-- TMPL_VAR name="index" -->" onclick="unHideSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->','label<!-- TMPL_VAR name="index" -->')">
+                    <!-- TMPL_VAR NAME="subfield" -->
+                </a>
+            <!-- /TMPL_IF -->
+            <div style="<!-- TMPL_VAR NAME='visibility' -->;" id="subfield<!-- TMPL_VAR NAME='tag' --><!-- TMPL_VAR NAME='index' -->">
+                <p>
+                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
+                    <label <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> class="labelsubfield">
+                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_UNLESS name="hide_marc" -->
+                    <img style="cursor: crosshair; color: grey; font-size: 80%;" <!-- TMPL_IF NAME="fixedfield" --> style="display:none;" <!-- /TMPL_IF --> src="<!-- TMPL_VAR NAME="themelang" -->/images/up.png" onclick="upSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')"/>
+                        <input title="<!-- TMPL_VAR NAME="marc_lib_plain" -->" style=" <!-- TMPL_IF NAME="fixedfield" -->display:none; <!-- /TMPL_IF -->border:0;" type="text" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->"  value="<!-- TMPL_VAR NAME="subfield" -->" size="1" maxlength="1" class="flat" DISABLE READONLY tabindex=-1 />
+                <!-- TMPL_ELSE -->
+                    <input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->"/>
+                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_UNLESS NAME="advancedMARCEditor" -->
+                    <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF -->
+                    <!-- TMPL_VAR NAME="marc_lib" -->
+                    <!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF -->
+                    </label>
+                <!-- /TMPL_UNLESS -->
+                <!-- TMPL_VAR NAME="marc_value" -->
+                <!-- TMPL_IF NAME="repeatable" -->
+                    <a style="cursor: crosshair; color: grey; font-size: 80%;" onclick="cloneSubfield('subfield<!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR name="index" -->')">+</a>
+                <!-- /TMPL_IF -->
+	 <input type="hidden" name="tagindex" value="<!-- TMPL_VAR NAME="id" -->"/>
+                <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->"/>
+                <input type="hidden" name="subfieldYYY" value="<!-- TMPL_VAR NAME="subfield" -->" size="2" maxlength="1"/>
+                <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"/>
+                <input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->"/>
+                </p>
+            </div>
+        <!-- /TMPL_LOOP -->
+        </div>
+    <!-- /TMPL_LOOP -->
+    </div>
+<!-- /TMPL_LOOP -->
+		<div name="hidden" id="hidden" class="tab">
+		<!-- TMPL_LOOP NAME="hidden_loop" -->
+				<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->">
+				<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="subfield" -->">
+				<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->">
+				<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
+		<!-- /TMPL_LOOP -->
+		</div>
+		<!-- TMPL_IF name="oldbiblionumtagfield" -->
+			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldbiblionumtagfield" -->">
+			<input type="hidden" name="subfield" id="subfield<!--TMPL_VAR NAME="id"-->" value="<!-- TMPL_VAR NAME="oldbiblionumtagsubfield" -->">
+			<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="oldbiblionumber" -->">
+			<input type="hidden" name="mandatory" value="0">
+			<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="oldbiblioitemnumtagfield" -->">
+			<input type="hidden" id="subfield<!--TMPL_VAR NAME="id"-->" name="subfield" value="<!-- TMPL_VAR NAME="oldbiblioitemnumtagsubfield" -->">
+				<input type="hidden" name="mandatory" value="0">
+				<input type="hidden" name="tag_mandatory" value="<!-- TMPL_VAR NAME="tag_mandatory" -->">
+		<!-- /TMPL_IF -->
+	</form>
+
+
+
+<script language="JavaScript" type="text/javascript">
+function loading(){
+	document.getElementById("loading").style.display = "none";
+}
+function _(s) { return s } // dummy function for gettext
+	<!--TMPL_IF name="exit"-->
+var	finished=CloseMe(<!--TMPL_VAR NAME="biblionumber"-->,'<!--TMPL_VAR NAME="title"-->');
+	<!--/TMPL_IF-->
+function confirmnotdup(){
+	document.getElementById("confirm_not_duplicate").value = 1;
+	var checkform =	document.getElementById("f");
+	Check(checkform);
+}
+function active(numlayer)
+{
+	for (i=0; i <= 9 ; i++ ) {
+		ong = i+"XX";
+		link = "link"+i;
+		if (numlayer==i) {
+			with(document){
+			if (document.getElementById(ong)){
+				document.getElementById(ong).style.visibility="visible";
+			}
+			if(document.getElementById(link)){
+				document.getElementById(link).style.color="#000066";
+				document.getElementById(link).style.backgroundColor="#FFFFCC";
+			}
+			}
+		} else {
+			with(document){
+			if (document.getElementById(ong)){
+				document.getElementById(ong).style.visibility="hidden";
+			}
+			if (document.getElementById(link)) {
+				document.getElementById(link).style.color="#669999";
+				document.getElementById(link).style.backgroundColor="#D8DEB8";
+			}
+			}
+		}
+	}
+}
+active(0);
+function Check(f) {
+	document.body.style.cursor ="wait";
+	// Scan for nonempty fields
+	var field_is_nonempty_p = new Array();
+	for (i=0 ; i<f.field_value.length ; i++) {
+	    field_is_nonempty_p[f.tag[i].value] = 0;
+	}
+	for (i=0 ; i<f.field_value.length ; i++) {
+	    if (f.field_value[i].value.length != 0) {
+		field_is_nonempty_p[f.tag[i].value] += 1;
+	    }
+	}
+
+	// Scan for missing mandatory subfields
+	var total_missing_mandatory_subfields = 0;
+	var missing_mandatory_subfields = new Array();
+	for (i=0 ; i<f.field_value.length-2 ; i++) {
+		if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
+		    // We should not flag an error unless the tag is also
+		    // mandatory, or if something else in the tag is entered
+
+		    if (f.tag_mandatory[i].value == 1 || field_is_nonempty_p[f.tag[i].value]) {
+				f.field_value[i].style.backgroundColor="#FF0000";
+				total_missing_mandatory_subfields++;
+			if (f.field_value[i].parentNode.tagName == "B")
+			{
+				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+			}
+			else
+			{
+				missing_mandatory_subfields.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+			}
+
+			}
+		} else {
+			f.field_value[i].style.backgroundColor="#FFFFFF";
+		}
+	}
+
+	// Scan for missing mandatory tags
+	var total_missing_mandatory_tags = 0;
+	var seen_mandatory_tag_p = new Array();
+	var missing_mandatory_tags = new Array();
+	for (i=0 ; i<f.field_value.length ; i++) {
+	    var j = f.tag[i].value;
+	    if (!field_is_nonempty_p[j] && f.tag_mandatory[i].value == 1) {
+		if (seen_mandatory_tag_p[j] != 1) {
+		    seen_mandatory_tag_p[j] = 1;
+		    total_missing_mandatory_tags++;
+ 		    if (f.field_value[i].parentNode.tagName == "B")
+		    {
+				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+		    }
+		    else
+		    {
+				missing_mandatory_tags.push(f.field_value[i].innerHTML + " (tab " +  f.field_value[i].parentNode.parentNode.parentNode.id.substr(0,1) + ")");
+			}
+		}
+		f.field_value[i].style.backgroundColor="#FFFF00";
+	    }
+	}
+
+	var total_errors = total_missing_mandatory_tags + total_missing_mandatory_subfields;
+	var alertString2;
+	if (total_errors!=0) {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += "\n- "+ total_missing_mandatory_tags +_(" mandatory tags empty");
+		for (i=0; i<missing_mandatory_tags.length; i++)
+		{
+			alertString2 += "\n--->"+ missing_mandatory_tags[i];
+		}
+  		alertString2 += "\n- "+ total_missing_mandatory_subfields +_(" mandatory fields empty (see bold subfields)");
+		for (i=0; i<missing_mandatory_subfields.length; i++)
+		{
+			alertString2 += "\n--->"+ missing_mandatory_subfields[i];
+		}
+		alert(alertString2);
+	} else {
+		document.forms['f'].submit();
+
+	}
+}
+function Dopop(link,id) {
+ var subf=document.getElementsByName('subfield'+id);
+var fields=document.getElementsByName('field_value'+id);
+var defaultvalue="";
+	for (var s=0; s<fields.length; s++){
+		if (subf.item(s).value == 'a'){
+		defaultvalue=fields.item(s).value;
+		}
+	}
+
+	newin=window.open(link+"&result="+defaultvalue,"",'width=550,height=550,toolbar=false,scrollbars=yes');
+
+}
+
+function PopupZ3950() {
+    var strQuery="";
+	var error = 0;
+	for (i=0 ; i<document.forms['f'].field_value.length ; i++) {
+		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="isbntag"-->"){
+		     if (document.forms['f'].subfieldYYY[i].value =="<!--TMPL_VAR NAME="isbnsub"-->"){
+			if(document.forms['f'].field_value[i].value.length>0) {
+		    	strQuery += "&isbn="+document.forms['f'].field_value[i].value;			
+			} else {
+			error++;
+			}
+		    }
+		}
+		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="titletag"-->"){
+		    if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="titlesub"-->"){
+			if(document.forms['f'].field_value[i].value.length>0) {
+		 	   strQuery += "&title="+document.forms['f'].field_value[i].value;
+			} else {
+			error++;
+			}
+		    }
+		}
+		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="authortag"-->"){
+		   if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="authorsub"-->"){
+			if(document.forms['f'].field_value[i].value.length>0) {
+		  	  strQuery += "&author="+document.forms['f'].field_value[i].value;
+			} else { 
+			error++;
+			}
+		    }
+		}
+		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="issntag"-->"){
+		     if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="issnsub"-->"){
+		             if(document.forms['f'].field_value[i].value.length>0) {
+		   	 strQuery += "&issn="+document.forms['f'].field_value[i].value;
+			} else {
+			error++;
+			}
+		      }
+		}
+	}
+	if(error < 4){
+	newin=window.open("../z3950/search.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"+strQuery,"z3950search",'width=640,height=400,location=yes,toolbar=no,scrollbars=yes');
+	} else {
+		alert("To perform a z39.50 search, you must enter at least one of the following: \n\n ISBN\n ISSN\n Title\n Author\n");
+	}
+}
+function PopupDVD() {
+    var strQuery="";
+	var error = 0;
+	for (i=0 ; i<document.forms['f'].field_value.length ; i++) {
+		
+		if (document.forms['f'].tag[i].value == "<!--TMPL_VAR NAME="urltag"-->"){
+		    if (document.forms['f'].subfieldYYY[i].value == "<!--TMPL_VAR NAME="urlsub"-->"){
+			if(document.forms['f'].field_value[i].value.length>0) {
+		 	   strQuery = document.forms['f'].field_value[i].value;
+			} else {
+			error++;
+			}
+		    }
+		}
+		
+		
+	}
+	if(error < 1){
+	newin=window.open("/cgi-bin/koha/cataloguing/get-imdb.php?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&website="+strQuery,"DVDsearch",'width=640,height=400,location=yes,toolbar=no,scrollbars=yes');
+	} else {
+		alert("To get DVD details, you must enter  856$u field\n as http://akas.imdb.com/title/tt0105435");
+	}
+}
+
+function Changefwk(FwkList) {
+  var fwk = FwkList.options[FwkList.selectedIndex].value;
+  window.location = "addbiblio.pl?oldbiblionumber=<!--TMPL_VAR Name="oldbiblionumber"-->&frameworkcode="+fwk;
+}
+
+
+
+function AddField(field) {
+	document.forms['f'].op.value = "addfield";
+	document.forms['f'].addfield_field.value=field;
+	document.f.submit();
+}
+
+function cloneSubfield(index) {
+ var original = document.getElementById(index);
+ var clone = original.cloneNode(true);
+ clone.setAttribute("id", index + index); 
+// orginput : the value of the original field (in [0] if hide_marc=1, otherwise in [1]
+// image : the up button. don't exist is hide_marc=1
+ <!-- TMPL_IF name="hide_marc" -->
+	var orginput = original.getElementsByTagName('input')[0];
+ <!-- TMPL_ELSE -->
+ 	var orginput = original.getElementsByTagName('input')[1];
+	image = clone.getElementsByTagName('img')[0];
+	image.setAttribute("onclick","upSubfield('" + index + index + "')");
+ <!-- /TMPL_IF -->
+ trigger = original.getElementsByTagName('a')[0];
+ if (trigger) {
+// 	trigger.parentNode.removeChild(trigger);
+ }
+ clonetrigger = clone.getElementsByTagName('a')[0];
+ clonetrigger.setAttribute("onclick","cloneSubfield('" + index + index + "')");
+ clone.setAttribute("tabindex","1");
+ orginput.value = '';
+ original.parentNode.insertBefore( clone, original); 
+}
+
+
+function unHideSubfield(index,labelindex) {
+	subfield = document.getElementById(index);
+	subfield.style.display = 'block';
+	label = document.getElementById(labelindex);
+	label.style.display='none';	
+}
+function CloseMe(biblionumber,title) {
+	var myfield = opener.document.getElementById('biblionumber');
+	 myfield.value = biblionumber;
+	var myfield = opener.document.getElementById('title');
+	 myfield.value = title;
+	self.close();
+return false;
+	}
+function upSubfield(index) {
+	try{
+		var line = document.getElementById(index); // get the line where the user has clicked.
+	} catch(e) {
+		return;
+	}
+	var tag = line.parentNode; // get the dad of this line. (should be "<div tag=XXX>")
+	
+	// getting all subfields for this tag
+	var subfields = tag.getElementsByTagName('div');
+	var subfieldsLength = subfields.length;
+	if(subfieldsLength<=1) return; // nothing to do if there is just one subfield.
+	// among all subfields 
+	for(var i=0;i<subfieldsLength;i++){ 
+		if(subfields[i].getAttribute('id') == index){ //looking for the subfield which is clicked :
+			if(i==0){ // if the clicked subfield is on the top
+				tag.appendChild(subfields[0]);
+				return;
+			}else{
+				var lineAbove = subfields[i-1];
+				tag.insertBefore(line,lineAbove);
+				return;
+			}
+		}
+	}
+}
+</script>
+<!--/TMPL_UNLESS-->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/cataloguing/addbooks.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/cataloguing/addbooks.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/cataloguing/addbooks.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/cataloguing/addbooks.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,43 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging Home<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<h1>Catalog Maintenance</h1>
+	<!-- TMPL_IF name="noitemsfound" -->
+		<font color="red" size="4">No items found</font>
+	<!-- /TMPL_IF -->
+	
+	<div class="data">
+		<form action="isbnsearch.pl">
+		<table>
+		<caption>Search Existing Records</caption>
+		<tr><th><label for="title">Title</label></th>
+		<td>		<input type="text" name="title" id="title"size="35" /></td></tr>
+		<tr><th><label for="isbn">ISBN</label></th>
+		<td><input type="text" name="isbn" id="isbn"size="35" /></td></tr>		
+		</table></div>
+				<p><input type="submit" value="Search" class="submit" /></p>
+				<div class="help"><ul class="notes"><li>If the ISBN is found into the database, that record will be retrieved and can be modified.</li>
+	<li>If the ISBN is found in the reservoir, it will be retrieved and a full record added.</li>
+	<li>Otherwise, a record can be added from scratch.</li></ul></div>
+		</form>
+
+		<!-- TMPL_IF name="noitemsfound" -->
+				<form action="addbiblio.pl" method="post">
+		<div class="data"><table>
+		<caption>Create a Blank Bibliographic Record</caption>
+		<tr><th><label for="frameworkcode">Choose a Framework:</label></th><td><select name="frameworkcode" id="frameworkcode">
+						<option value="">Default</option>
+						<!-- TMPL_LOOP NAME="frameworkcodeloop" -->
+							<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="frameworktext" --></option>
+						<!-- /TMPL_LOOP -->
+					</select> <input type="submit" value="Add Record Without Search" class="submit" /></td></tr>
+		</table></div></form>
+			
+		<!-- /TMPL_IF -->
+
+
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/cataloguing/additem.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/cataloguing/additem.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/cataloguing/additem.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/cataloguing/additem.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,150 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: Items for Bibliographic Record <!-- TMPL_VAR name="biblionumber" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!--TMPL_UNLESS NAME="fromserials"-->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+<div id="main">
+
+<!--/TMPL_UNLESS-->
+<h1>Items for Record <!-- TMPL_VAR name="biblionumber" -->:</h1><h2><!-- TMPL_VAR name="title" -->, <!-- TMPL_VAR name="author" --></h2>
+	
+<!--TMPL_UNLESS NAME="fromserials"-->	
+<div class="tabitem">
+<form action="/cgi-bin/koha/cataloguing/addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"><input type="submit" class="submit" value="Edit Bibliographic Record"></form> <form action="addbiblio.pl" method="get"><input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" /><input type="hidden" name="op" value="duplicate" /><input type="submit" class="submit" value="Duplicate this Record" /></form></div> <div class="tabitem"><form action="/cgi-bin/koha/catalogue/detail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"> <input type="submit" class="submit" value="View in Catalog"></form> <form action="/cgi-bin/koha/catalogue/MARCdetail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"> <input type="submit" class="submit" value="View MARC in Catalog"></form>  <form action="/cgi-bin/koha/catalogue/ISBDdetail.pl" method="get"><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->"> <input type="submit" class="submit" value="View ISBD in Catalog"></form></div>
+<!--/TMPL_UNLESS-->
+<!-- TMPL_IF name="book_on_loan" -->
+ 	         <div class="error">ERROR: This book is on LOAN DO NOT DELETE!</div>
+ 	 <!-- /TMPL_IF -->
+<!-- TMPL_IF name="book_branch" -->
+ 	         <div class="error">ERROR: You are not a member of this library branch!</div>
+ 	 <!-- /TMPL_IF -->
+<!-- TMPL_IF name="non_utf8" -->
+ 	         <div class="error">ERROR: This record contains non UTF-8 chatacters correct and resave!!</div>
+ 	 <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="barcode_not_unique" -->
+ 	         <div class="error">ERROR: Barcode already exists!</div>
+ 	 <!-- /TMPL_IF -->
+<!--TMPL_UNLESS NAME="fromserials"-->
+	<!-- TMPL_IF name="item_loop" -->
+			<div name="10XX" id="10XX">
+			<table class="editing">
+			<caption>Existing Items</caption>
+				<tr>
+					<!-- TMPL_LOOP NAME="item_header_loop" -->
+						<th><!-- TMPL_VAR NAME="header_value" --></th>
+					<!-- /TMPL_LOOP -->
+					<th colspan="2">&nbsp;</th>
+				</tr>
+					<!-- TMPL_LOOP NAME="item_loop" -->
+					<tr>
+						<!-- TMPL_VAR NAME="item_value" -->
+						<td><a href="additem.pl?op=edititem&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;itemnumber=<!-- TMPL_VAR NAME="itemnumber" -->">Edit</a></td>
+						<td><a href="javascript:confirm_deletion(<!-- TMPL_VAR NAME="biblionumber" -->,<!-- TMPL_VAR NAME="itemnumber" -->)">Delete</a></td>
+					</tr>
+					<!-- /TMPL_LOOP -->
+			</table>
+			</div>
+
+	<!-- /TMPL_IF -->
+<!--/TMPL_UNLESS-->
+	<form method="post" action="additem.pl" name="f">
+	<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
+	<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->">	
+	<input type="hidden" name="fromserials" value="<!--TMPL_VAR NAME="fromserials"-->">
+	<input type="hidden" name="serialid" value="<!--TMPL_VAR NAME="serialid"-->">
+	<input type="hidden" name="itemnumber" value="<!--TMPL_VAR NAME="itemnumber"-->">
+	<div class="data">
+	<table>
+		<caption><!-- TMPL_IF name="opisadd" -->Add New Item<!-- TMPL_ELSE -->Update Item<!-- /TMPL_IF --></caption>
+	<!-- TMPL_LOOP NAME="item" -->
+			<tr style="<!-- TMPL_VAR NAME='hidden' -->;">
+					<th><label><!-- TMPL_VAR NAME="tag" --><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label></th>
+					<td><!-- TMPL_VAR NAME="marc_value" -->
+					<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->">
+					<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->">
+					<input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->"></td>
+			</tr>		
+<!-- /TMPL_LOOP -->
+		</table>
+	<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
+	 <!-- TMPL_IF name="barcode_not_unique" -->
+ 	         <div class="error">ERROR: Barcode already exists!</div>
+ 	 <!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF name="opisadd" -->
+	<input type="button" value="Add item" onClick="Check(this.form)" accesskey="w" class="submit">
+	<!-- TMPL_ELSE -->
+	<input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="itemtagfield" -->">
+	<input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="itemtagsubfield" -->">
+	<input type="hidden" name="field_value" value="<!-- TMPL_VAR NAME="itemnumber" -->">
+	<input type="button" value="Save Changes" onClick="Check(this.form)" accesskey="w" class="submit">
+	<!-- /TMPL_IF -->
+	</form>
+</div>
+</div>
+<script language="JavaScript" type="text/javascript">
+
+	
+	<!--TMPL_IF name="exit"-->
+var	finished=CloseMe(<!--TMPL_VAR NAME="serialid"-->,<!--TMPL_VAR NAME="itemnumber"-->,"<!--TMPL_VAR NAME="holdingbranch"-->");
+	<!--/TMPL_IF-->
+
+function _(s) { return s } // dummy function for gettext
+function active(numlayer)
+{
+	for (i=10; i < 11 ; i++ ) {
+		ong = i+"XX";
+			link = "link"+i;
+		if (numlayer==i) {
+			document.getElementById(ong).style.visibility="visible";
+			document.getElementById(link).style.backgroundColor="#11AA11";
+			document.getElementById(link).style.backgroundImage="url(<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif)";
+		} else {
+			document.getElementById(ong).style.visibility="hidden";
+			document.getElementById(link).style.backgroundColor="#FFFFFF";
+			document.getElementById(link).style.backgroundImage="";
+		}
+	}
+}
+function Check(f) {
+	var total_errors=0;
+//	alert(f.field_value.length);
+	for (i=0 ; i<f.field_value.length ; i++) {
+//	alert (f.field_value[i].value);
+		if (f.field_value[i].value.length==0 && f.mandatory[i].value==1) {
+			document.getElementById("error"+i).style.backgroundColor="#FF0000";
+			total_errors++;
+		} else {
+//			document.getElementById("error"+i).style.backgroundColor="#FFFFFF";
+		}
+	}
+	var alertString2;
+	if (total_errors==0) {
+		document.f.submit();
+	} else {
+		alertString2  = _("Form not submitted because of the following problem(s)");
+		alertString2 += "\n------------------------------------------------------------------------------------\n";
+		alertString2 += "\n- "+ total_errors+_(" mandatory fields empty (see bold subfields)");
+		alert(alertString2);
+	}
+}
+function Dopop(link,i) {
+	defaultvalue=document.forms[0].field_value[i].value;
+	newin=window.open(link+"&result="+defaultvalue,"value builder",'width=500,height=400,toolbar=false,scrollbars=yes');
+}
+function confirm_deletion(biblionumber,itemnumber) {
+	var is_confirmed = confirm(_('Do you confirm item deletion?'));
+	if (is_confirmed) {
+	window.location = "additem.pl?op=delitem&biblionumber="+biblionumber+"&itemnumber="+itemnumber;
+	}
+}
+function CloseMe(serialid,itemnumber,holdingbranch) {
+	var myfield = opener.document.getElementById('serial'+serialid);
+	 myfield.value = itemnumber;
+	var myfield = opener.document.getElementById('holdingbranch'+serialid);
+	 myfield.value = holdingbranch;
+	self.close();
+return false;
+	}
+</script>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/cataloguing/isbnsearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/cataloguing/isbnsearch.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/cataloguing/isbnsearch.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/cataloguing/isbnsearch.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,105 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: Search Results for <!-- TMPL_IF name="isbn" -->ISBN <!-- TMPL_VAR name="isbn" --><!-- /TMPL_IF --><!-- TMPL_IF name="title" -->title <!-- TMPL_VAR name="title" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<h1 class="acquisition">Search Results</h1>
+	<div id="bloc25">
+		<h2 class="acquisition">Results for <b><!-- TMPL_IF name="isbn" -->ISBN <!-- TMPL_VAR NAME="isbn" --><!-- /TMPL_IF --><!-- TMPL_IF name="title" -->title <!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF --></b></h2>
+		<!-- TMPL_IF name="total" -->
+			<p><!-- TMPL_VAR NAME="grandtotal" --> total results</p>
+			<p>Results <i><!-- TMPL_VAR NAME="showoffset" --></i> to <i><!-- TMPL_VAR NAME="total" --></i> displayed</p>
+		<!-- /TMPL_IF -->
+	</div>
+	<div id="bloc100">
+		<h2 class="acquisition">Exists in Koha</h2>
+		<table>
+			<tr>
+				<th class="acquisition">Title</th>
+				<th class="acquisition">Author</th>
+				<th class="acquisition">copyright</th>
+				<th class="acquisition">LC</th>
+				<th class="acquisition">&nbsp;</th>
+<th class="acquisition">&nbsp;</th>
+<th class="acquisition">&nbsp;</th>
+			</tr>
+			<!-- TMPL_IF name="results_loop" -->
+			<!-- TMPL_LOOP NAME="results_loop" -->
+				<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
+					<td><!-- TMPL_VAR NAME="title" --></a>
+					<td><!-- TMPL_VAR NAME="author" --></td>
+					<td><!-- TMPL_VAR NAME="copyrightdate" --></td>
+					<td><!-- TMPL_VAR NAME="classification" -->&nbsp;<!-- TMPL_VAR NAME="subclass" --></td>
+					
+					<td><a href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->" class="button acquisition">Edit Book</a></td>
+					<td><a href="additem.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Edit Items</a></td>
+						
+						
+						<td><a href="addbiblio.pl?oldbiblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;op=duplicate">Duplicate</a></td></tr>
+				</tr>
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_ELSE -->
+			<tr><td colspan="4">Nothing found</td></tr>
+			<!-- /TMPL_IF -->
+		</table>
+		<p class="center">
+			<!-- Row of numbers corresponding to search result pages -->
+			<!-- TMPL_IF name="displayprev" -->
+				<a href="isbnsearch.pl?offset=<!-- TMPL_VAR NAME="prevstartfrom" -->&amp;<!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL -->">
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border="0">
+				</a>
+			<!-- TMPL_ELSE -->
+				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME="numbers" -->
+				<!-- TMPL_IF name="highlight" -->
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+					<a href="isbnsearch.pl?offset=<!-- TMPL_VAR NAME="startfrom" -->&amp;<!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL -->">
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->.gif" border="0">
+					</a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF name="displaynext" -->
+				<a href="isbnsearch.pl?offset=<!-- TMPL_VAR NAME="nextstartfrom" -->&amp;<!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR NAME="value" ESCAPE=URL -->">
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border="0">
+				</a>
+			<!-- TMPL_ELSE -->
+				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/placeholder.gif" border="0">
+			<!-- /TMPL_IF -->
+		</p>
+		<h2 class="acquisition">Books in breeding farm</h2>
+		<!-- TMPL_IF name="breeding_loop" -->
+			<table>
+				<tr>
+					<th>Title</th>
+					<th>Author</th>
+					<th>ISBN</th>
+					<th>LC</th>
+					<th>coming from</th>
+					<th>&nbsp;</th>
+					
+					<!-- TMPL_LOOP NAME="breeding_loop" -->
+						<tr bgcolor="<!-- TMPL_VAR NAME="toggle" -->">
+							<td><!-- TMPL_VAR NAME="title" --></a>
+							<td><!-- TMPL_VAR NAME="author" --></td>
+							<td><!-- TMPL_VAR NAME="isbn" --></td>
+							<td><!-- TMPL_VAR NAME="classification" -->&nbsp;<!-- TMPL_VAR NAME="subclass" --></td>
+							<td><!-- TMPL_VAR NAME="file" --></td>
+							<td><a href="addbiblio.pl?breedingid=<!-- TMPL_VAR NAME="id" -->">Add biblio</a></td>
+							
+						</tr>
+					<!-- /TMPL_LOOP -->
+			</table>
+		<!-- TMPL_ELSE -->
+			<p class="center">Nothing found</p>
+		<!-- /TMPL_IF -->
+		<p class="center">
+		
+			<a href="addbiblio.pl" class="button acquisition">Add new record</a>
+		
+		</p>
+	</div>
+	
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/circ/branchreserves.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/branchreserves.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/branchreserves.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/branchreserves.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,82 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
+
+<h1>Circulation: Branch Reserves</h1>
+
+<div id="mainbloc">
+	<h1 class="circulation">Reserves of your library the : <!-- TMPL_VAR NAME="show_date" --></h1>
+	<!-- TMPL_IF NAME="messagetransfert" -->
+		<div>
+				<h2>Reserve find for the document(<!-- TMPL_VAR NAME="nextreservtitle" -->)must transfered</h2>
+			<p>This documen is reserved by : <b> <!-- TMPL_VAR NAME="nextreservsurname" --> <!-- TMPL_VAR NAME="nextreservfirstname" --></b> at the library : <b> <!-- TMPL_VAR NAME="branchname" --> </b>, Please put this document in transfer .
+			</p>
+			<form name="cancelReservewithtransfert" action="branchreserves.pl" method="post">
+				<input type="submit" class="button circulation">
+			</form>
+		</div>
+	<!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="waiting" -->
+		<div id="bloc25">
+				<h2 class="circulation">This document is in Waiting status</h2>
+			<p>This document (<!-- TMPL_VAR NAME="nextreservtitle" -->) is reserved by <b> : <!-- TMPL_VAR NAME="nextreservsurname" --> <!-- TMPL_VAR NAME="nextreservfirstname" --></b>,
+			Please keep this document for the next reserve .
+			</p>
+			<form name="cancelReservewithwaiting" action="branchreserves.pl" method="post">
+				<input type="submit">
+			</form>
+		</div>
+	<!-- /TMPL_IF -->
+	<!-- TMPL_UNLESS NAME="message" -->
+	<div id="resultlist">
+		<table>
+		<tr>
+			<th class="circulation" colspan="5">Reserves of your library</th>
+		</tr>
+		<tr>
+			<th class="circulation">Available since</th>
+			<th class="circulation">Title</th>
+			<th class="circulation">Borrower</th>
+			<th class="circulation">Localisation</th>
+			<th class="circulation">Action</th>
+		</tr>
+			<!-- TMPL_LOOP NAME="reserveloop" -->
+				<tr <!-- TMPL_IF NAME="messcompa" --> class="problem" <!-- /TMPL_IF -->>
+					<td><p><!-- TMPL_VAR NAME="waitingdate" --></p> <!-- TMPL_IF NAME="messcompa" --> Reserve Over <!-- /TMPL_IF --></td>
+					<td>
+						<p>
+							<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
+							&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --></b>)
+							<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
+						</p>
+					</td>
+					<td>
+						<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
+					<!-- TMPL_IF NAME="borrowermail" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
+		<!-- TMPL_VAR NAME="borrowermail" --></a><!--/TMPL_IF-->
+						</p>
+					</td>
+					<td><p><!-- TMPL_VAR NAME="homebranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
+					<td>
+						<form name="cancelReserve -->" action="branchreserves.pl" method="post">
+							<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernum" -->">
+							<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
+							<input type="hidden" name="fbr" value="<!-- TMPL_VAR NAME="holdingbranch" -->">
+							<input type="hidden" name="tbr" value="<!-- TMPL_VAR NAME="homebranch" -->">
+							<input type="submit" 
+								<!-- TMPL_IF NAME="dotransfer" -->
+							value="Cancel reserve and return this document" 
+							<!-- TMPL_ELSE -->
+							value="Cancel reserve" 
+						<!-- /TMPL_IF -->
+						>
+						</form>
+					</td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+	</div>
+	<!-- /TMPL_UNLESS -->
+</div>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/circ/branchtransfers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/branchtransfers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/branchtransfers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/branchtransfers.tmpl	26 Mar 2007 02:19:22 -0000	1.16.2.1
@@ -0,0 +1,141 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation: Transfers<!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="circ-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>Circulation: Transfers</h1>
+
+<!-- TMPL_IF Name="found" -->
+	<h3 class="alert">Reserve Found</h3>
+		
+	<div class="form">
+		<table>
+		<caption><!-- TMPL_IF Name="reserved" -->Reserve found for <!-- TMPL_VAR Name="name" --> (<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a>).<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="waiting" -->
+    Item is marked waiting at <!-- TMPL_VAR Name="branchname" --> for <!-- TMPL_VAR Name="name" --> (<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a>).<!-- /TMPL_IF --></caption>
+		<tr><th>
+			<!-- TMPL_IF Name="reserved" -->Set reserve to waiting and transfer book to <b><!-- TMPL_VAR Name="branchname" --> </b>: <!-- /TMPL_IF -->
+			<!-- TMPL_IF Name="waiting" -->Cancel reservation and then attempt transfer: <!-- /TMPL_IF -->
+		</th>
+		<td>
+			<form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
+				<!-- TMPL_LOOP Name="trsfitemloop" -->
+					<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+					<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
+					<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
+				<!-- /TMPL_LOOP -->
+				<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
+				<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
+				<!-- TMPL_IF Name="waiting" --><input type="hidden" name="barcode" value="<!-- TMPL_VAR Name="barcode" -->" />
+					<input type="hidden" name="request" value="KillWaiting" />
+					<input type="submit" value="Cancel" class="cancel" />
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="reserved" --><input type="hidden" name="request" value="SetWaiting" />
+					<input type="submit" value="Waiting" class="submit" /><!-- /TMPL_IF -->
+			</form>
+		</td></tr>
+		<!-- TMPL_IF Name="reserved" --><tr><th>Cancel reservation and then attempt transfer:</th>
+			<td>
+			<form method="post" name="mainform" id="mainform" action="branchtransfers.pl">
+
+			<!-- TMPL_LOOP Name="trsfitemloop" -->
+				<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
+				<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
+			<!-- /TMPL_LOOP -->
+
+			<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
+			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<input type="hidden" name="tobranchcd" value="<!-- TMPL_VAR Name="tobranchcd" -->" />
+			<input type="hidden" name="barcode" value=<!-- TMPL_VAR Name="barcode" --> />
+			<input type="hidden" name="loggedinuser" value=<!-- TMPL_VAR Name="loggedinusername" --> />
+			<input type="hidden" name="request" value="KillReserved" />
+			<input type="submit" class="cancel" value="Cancel" />
+			</form>
+		<!-- /TMPL_IF -->
+		</td></tr>
+		<tr><th>Ignore and return to transfers: </th>
+			<td>
+			<form method="post" name="mainform" id="mainform" action="branchtransfers.pl" />
+			<input type="hidden" name="tobranchcd" value=<!-- TMPL_VAR Name="tobranchcd" --> />
+			<input type="hidden" name="barcode" />
+			<!-- TMPL_LOOP Name="trsfitemloop" -->
+				<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
+				<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
+			<!-- /TMPL_LOOP -->
+			<input type="submit" value="Ignore" class="submit" />
+			</form>
+			</td>
+		</tr></table></div>
+
+<!-- TMPL_ELSE -->
+	<div class="table"><table>
+	<caption>Messages</caption>
+	<tr><td>
+	<!-- TMPL_IF Name="reqmessage" -->
+		<!-- TMPL_IF Name="cancelled" -->
+			Reserve Cancelled<br>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="setwaiting" -->
+			Item should now be waiting at branch: <!-- TMPL_VAR Name="reqbrchname" --><br>
+		<!-- /TMPL_IF -->
+	<!-- /TMPL_IF -->
+	<!-- TMPL_LOOP Name="errmsgloop" -->
+		<font color='red' size='+2'>
+		<!-- TMPL_IF Name="errbadcode" -->
+			No Item with barcode: <!-- TMPL_VAR Name="msg" -->
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="errispermanent" -->
+			Please return item to home branch: <!-- TMPL_VAR Name="msg" -->
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="errdesteqholding" -->
+			Item is already at destination branch.
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="errwasreturned" -->
+			Item was on loan to <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a>
+<!-- TMPL_VAR Name="name" --> and has been returned.
+		<!-- /TMPL_IF -->
+		</font>
+		<br />
+	<!-- /TMPL_LOOP -->
+	</td></tr></table></div>
+	<form method="post" name="mainform" id="mainform" action="/cgi-bin/koha/circ/branchtransfers.pl">
+	<h3>Transfer</h3><div class="form">
+	<input type="hidden" name="loggedinuser" value=<!-- TMPL_VAR Name="loggedinusername" --> />
+	<table><tr><th>Destination Branch:</th><td><select name="tobranchcd">
+			<!-- TMPL_LOOP Name="branchoptionloop" -->
+				<option value="<!-- TMPL_VAR Name="code" -->" <!-- TMPL_VAR Name="selected" -->><!-- TMPL_VAR Name="name" --></option>
+			<!-- /TMPL_LOOP -->
+		</select></td></tr>
+<tr><th>Enter Book Barcode</th><td><input name="barcode" size="15" /></td></tr>
+</table>
+	<input type="hidden" name="tobranchcd" value="<!-- TMPL_VAR Name="tobrancd" -->" />
+	<!-- TMPL_LOOP Name="trsfitemloop" -->
+		<input type="hidden" name="bc-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+		<input type="hidden" name="fb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="frombrcd" -->" />
+		<input type="hidden" name="tb-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="tobrcd" -->" />
+	<!-- /TMPL_LOOP -->
+	<input type="submit" class="submit" value="Transfer" />
+
+	<div class="form"><table>
+		<caption>Transfered Items</caption>
+		<tr><th >Bar Code</th><th>Title</th><th>From</th><th>To</th></tr>
+		<!-- TMPL_LOOP Name="trsfitemloop" -->
+			<tr><td align="left" width="20">
+			<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR Name="barcode" --></a></td>
+			<td align="center"  width="200"><!-- TMPL_VAR Name="title" --></td>
+			
+		
+			<td align="left"  width="100"><!-- TMPL_VAR Name="frbrname" --></td>
+			<td align="left"  width="100"><!-- TMPL_VAR Name="tobrname" --></td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+		</table></div>
+	</div>
+	</form>
+		
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/circulation.tmpl	26 Mar 2007 02:19:22 -0000	1.42.2.1
@@ -0,0 +1,303 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation<!-- TMPL_IF Name="borrowernumber" -->: Issuing to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->  (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main"><h1>Circulation: Issues  <!-- TMPL_VAR NAME="today" --></h1></div>
+
+ <div id="main">
+	
+<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
+	
+	
+	<!-- RESULT OF ISSUING REQUEST -->
+	
+		<!-- TMPL_IF NAME="IMPOSSIBLE" -->
+		<div class="error">
+		<h3>Error Issuing:</h3>
+			<ul>
+			<!-- TMPL_IF NAME="hr_LIMIT" -->
+				24 hour limit:
+				<p><!-- TMPL_VAR name="hr_LIMIT" --> </p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="TOO_MANY" -->
+				
+				<li>Too many isseus of <!-- TMPL_VAR NAME="TOO_MANY" --> </li>				
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="INVALID_DATE" -->
+				<li>Invalid date</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="TOO_EARLY" -->
+				
+				<li>Too early to renew. <!-- TMPL_VAR NAME="barcode" --> </li>				
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="RESERVE_FOUND" -->
+				
+				<li>Barcode: <!-- TMPL_VAR NAME="barcode" --> is reserved cannot issue</li>				
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="UNKNOWN_BARCODE" -->
+				
+				<li>Barcode Unkown</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="NOT_FOR_LOAN" -->
+				
+				<li>NOT FOR LOAN</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="WTHDRAWN" -->
+				<li>Item is cancelled</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="GNA" -->
+				<li>Patron's address is in doubt</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="CARD_LOST" -->
+				<li>Patron's card is lost</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="DEBARRED" -->
+				<li>Patron is debarred</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="NO_MORE_RENEWALS" -->
+				<li>No more renewals possible</li>
+			<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="EXPIRED" -->
+				<li>Borrower card expired</li>
+			<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="IN_RESERVE" -->
+				<li>This is a Reserve Section book. Use Reserve issue</li>
+			<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="NOTSAMEBRANCH" -->
+				<li>You cannot issue a book which is not in your branch</li>
+			<!-- /TMPL_IF -->
+			</ul>
+		</div>
+		<!-- TMPL_ELSE -->
+		
+		<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
+		
+		<div class="error">
+		<h3>Please Confirm Issue:</h3>
+			<!-- TMPL_IF NAME="hr_LIMIT" -->
+				24 hour limit:
+				<p><!-- TMPL_VAR name="hr_LIMIT" --> </p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="DEBT" -->
+				<p>The patron has a debt of <!-- TMPL_VAR name="DEBT" --> YTL</p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="RENEW_ISSUE" -->
+				<p>You are trying RE-ISSUE.  USE RENEW</p>
+			<!-- /TMPL_IF -->	
+			<!-- TMPL_IF NAME="SUCCESFUL_RENEW" -->
+				<p>Succesfully renewd items</p>
+			<!-- /TMPL_IF -->	
+			<!-- TMPL_IF NAME="RESERVE_WAITING" -->
+				<p>Item is consigned for <!-- TMPL_VAR NAME="RESERVE_WAITING" --></p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="RESERVED" -->
+				<p>Item is on reserve for <!-- TMPL_VAR NAME="RESERVED" --></p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ISSUED_TO_ANOTHER" -->
+				<p>Item issued to <!-- TMPL_VAR NAME="ISSUED_TO_ANOTHER" -->. Return and issue?</p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="TOO_MANY" -->
+				<p>Too many issues (already issued / max : <!-- TMPL_VAR name="TOO_MANY" -->)</p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_UNLESS name="IMPOSSIBLE" -->
+			<div class="action"><form class="inline" method="post" action="/cgi-bin/koha/circ/circulation.pl">
+				<!-- TMPL_IF NAME="RESERVED" -->
+					<p><input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" /><label for="cancelreserve">Cancel Reserve</label></p>
+				<!-- /TMPL_IF -->
+				
+			
+				
+				<!-- TMPL_IF NAME="RESERVE_WAITING" -->
+					<p><input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" /><label for="cancelreserve">Cancel Reserve</label></p>
+				<!-- /TMPL_IF -->
+				<input type="hidden" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->" tabindex="0"/>
+				
+		
+				<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
+				<input type="hidden" name="issueconfirmed" value="1" />
+				<input type="hidden" name="day" value="<!-- TMPL_VAR name="day" -->" />
+				<input type="hidden" name="month" value="<!-- TMPL_VAR name="month" -->" />
+				<input type="hidden" name="year" value="<!-- TMPL_VAR name="year" -->" />
+			 	<!-- TMPL_UNLESS name="RENEW_ISSUE" --><input type="submit" value="Confirm Issue" class="submit" accesskey="y" /></form><form class="inline" method="post" action="/cgi-bin/koha/circ/circulation.pl"><input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="submit" class="cancel" value="Don't Issue" accesskey="n" /><!--/TMPL_UNLESS--></form></div>
+			</div>
+			<!-- /TMPL_UNLESS -->
+		<!-- /TMPL_IF -->
+		<!-- /TMPL_IF -->
+		
+		<!-- TMPL_IF NAME="issued" -->
+			<div class="error"><p>Item issued</p></div>
+		<!-- /TMPL_IF -->
+	
+	<div class="details">
+	<!-- TMPL_IF NAME="message" -->
+	<div class="details">
+	No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> <a href="/cgi-bin/koha/members/memberentry.pl?actionType=Add">Add a new patron</a>
+	</div>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="CGIselectborrower" -->
+	<form method="post" action="/cgi-bin/koha/circ/circulation.pl" id="mainform" name="mainform">
+		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+		<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
+	<label for="borrnumber">Select a borrower: </label>
+		<style type="text/css">
+		option:hover {
+			background-color : #f0f0f0;
+			color : #000099;
+		}
+	</style>
+	<p><!-- TMPL_VAR name="CGIselectborrower" --></p>
+	<p><input type="submit" class="submit" value="Select" /></p>
+	<p>Patron not found? <a href="/cgi-bin/koha/members/memberentry.pl?actionType=Add">Add a new patron</a></p>
+	</form>
+	<!-- TMPL_ELSE -->
+		<!-- TMPL_IF NAME="borrowernumber" -->
+	<div id="notes">                                							
+	<ul>
+	<li><!-- TMPL_VAR NAME="streetaddress" -->, <!-- TMPL_VAR NAME="city" --></li>
+	<!-- TMPL_IF NAME="phone" --><li><!-- TMPL_VAR NAME="phone" --></li><!--/TMPL_IF-->
+	<!-- TMPL_IF NAME="emailaddress" --><li><a href="mailto:<!-- TMPL_VAR NAME="emailaddress" -->"><!-- TMPL_VAR NAME="emailaddress" --></a></li><!-- /TMPL_IF -->
+	<li>Category: <!-- TMPL_VAR name="categorycode" --></li>
+	<li>(<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">details</a> / <a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&amp;modify=edit&amp;destination=circ">edit</a>)</li>
+	</ul>
+	</div><table width= "70%"><tr><td>
+
+	<h3><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h3>
+	<h4> &nbsp; &nbsp; <!-- TMPL_VAR NAME="issuecount" --> out<!-- TMPL_IF NAME="overduecount" -->, <span class="error"><!-- TMPL_VAR name="overduecount" --> overdue</span><!-- /TMPL_IF --></h4><br clear="right" />
+	<!-- TMPL_IF NAME="resissuecount" -->, <h4> &nbsp;<span class="error"> Reserve section <!-- TMPL_VAR NAME="resissuecount" --> out, <!-- TMPL_VAR name="resfine" --> YTL fine</span></h4><br clear="right" /><!-- /TMPL_IF -->
+	
+	</td><td><img src="<!-- TMPL_VAR NAME="borrowerphoto" -->" alt="Photo" hspace="0" vspace="0" border="0" width="100px" heigth="100px" style="clear:both;float:right;position:relative;">
+	</td></tr></table>
+									
+						
+
+
+<!-- TMPL_IF NAME="flagged" -->
+</div><div class="details">
+<ul>
+<!-- TMPL_IF NAME="gna" -->
+<li><span class="error">Address:</span> Patron's address in doubt</li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="lost" -->
+<li><span class="error">Lost:</span> Patron's card is lost</li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="dbarred" -->
+<li><span class="error">Debarred:</span> Patron is debarred <form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post"><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" value="circ" name="destination" /><input type="hidden" name="status" value="0" /><input type="submit" class="submit" value="Lift Debarment" /></form></li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF name="odues" -->	<li><!-- TMPL_IF name="nonreturns" -->
+					<span class="error">Overdues:</span> Patron has <span class="error">ITEMS OVERDUE</span> See highlighted items <a href="#previous">below</a>
+				<!-- /TMPL_IF --></li><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="noissues" -->
+<!-- TMPL_IF NAME="charges" --><li><span class="error">Fines:</span> Patron has <a href="/cgi-bin/koha/members/boraccount.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">outstanding fines</a>. Make <a href="/cgi-bin/koha/members/pay.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li><!-- /TMPL_IF -->
+<!-- TMPL_ELSE -->
+	<!-- TMPL_IF name="charges" --><li>Fines: Patron has <a href="/cgi-bin/koha/members/boraccount.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">outstanding fines</a>. Make <a href="/cgi-bin/koha/members/pay.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li><!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+</ul>
+
+<dl>
+		
+<!-- TMPL_IF name="waiting" -->
+		<dt>Reserves waiting:</dt>
+			<dd><ul><!-- TMPL_LOOP name="itemswaiting" -->
+				<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR name="title" --></a> (<!-- TMPL_VAR name="barcode" --> -- <!-- TMPL_VAR name="branchname" -->)</li>
+			<!-- /TMPL_LOOP -->
+			</ul></dd>
+		<!-- /TMPL_IF -->
+
+		<!-- TMPL_IF name="notes" -->
+					<dt>Notes:</dt> <dd class="error"><!-- TMPL_VAR name="notesmsg" --></dd>
+				<!-- /TMPL_IF -->
+</dl>
+<!-- /TMPL_IF -->
+	<!-- TMPL_ELSE -->
+	<!-- No card entered yet -->
+	<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform" id="mainform">
+<label for="findborrower">Enter borrower card number or partial last name: </label>
+				<input name="findborrower" type="text" size="40" />
+					<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+					<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
+				<input type="submit" class="submit" value="Submit" />
+				</form>
+		<!-- /TMPL_IF -->
+	<!-- /TMPL_IF -->
+	</div>
+
+<!-- BARCODE ENTRY -->
+
+<!-- TMPL_IF NAME="borrowernumber" -->
+	<div class="details">
+	<form method="post" action="/cgi-bin/koha/circ/circulation.pl" name="mainform">
+<label for="barcode">Enter Item Barcode: </label><input name="barcode" size="14" maxlength="14"class="unfocus" onfocus="this.className='focus'" onblur="this.className='unfocus'" /> <input type="submit" value="Issue" class="submit" /><!-- Display for NPL <input type="hidden" name="day" value="0" /><input type="hidden" name="month" value="0" /><input type="hidden" name="year" value="0" /> /Display for NPL -->
+	<p><input type="hidden" name="day" value="0" /><input type="hidden" name="month" value="0" /><input type="hidden" name="year" value="0" />
+	<!--/TMPL_IF-->		
+		<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
+		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+		<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
+		<input type="hidden" name="print" value="maybe" />
+		<!-- TMPL_IF NAME="CHARGES" -->
+			<input type="hidden" name="charges" value="yes" />
+			<input type="hidden" name="oldamount" value="<!-- TMPL_VAR NAME="amountold" -->" />
+		<!-- /TMPL_IF -->
+		</p>
+	</form>
+	</div>
+
+
+
+
+
+
+<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
+<!-- TMPL_IF NAME="borrowernumber" -->
+<div class="table"><form class="inline" action="/cgi-bin/koha/circ/renewscript.pl" method="post"><input type="hidden" value="circ" name="destination" /><input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
+	<table>
+		<caption>Issues <span class="print"><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">(Print Page)</a> <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">(Print Slip)</a></span></caption>
+		<tr><th>Format</th>
+			<th>Due Date</th>
+			<th>Title</th>
+			<th>Author</th>
+			<th>Call No</th>
+			<th>Barcode</th>
+			<th>Renew?</th>
+		</tr>
+	<!-- TMPL_IF NAME="todayissues" -->
+		<!-- TMPL_LOOP NAME="todayissues" -->
+		<!-- TMPL_IF NAME="tcolor" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
+			
+			<td><!-- TMPL_VAR NAME="ctype" --></td>
+			<td><!-- TMPL_VAR NAME="dd" --></td>
+			<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" --></a><br/><i><!-- TMPL_VAR name="itemnotes" --></i></td>
+			<td><!-- TMPL_IF NAME="author" --><!-- TMPL_VAR NAME="author" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="additionalauthor" --><!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR NAME="classification" --></td>
+			<td><!-- TMPL_VAR NAME="barcode" --></td>
+		</tr>
+		<!-- /TMPL_LOOP -->
+	
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="previssues" -->
+		<tr><th colspan="7"><a name="previous" id="previous">Previous Issues</a></th></tr>
+		<!-- TMPL_LOOP NAME="previssues" -->
+			<!-- TMPL_IF NAME="tcolor" --><tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
+			
+			<td><!-- TMPL_VAR NAME="ctype" --></td>
+			<td><!-- TMPL_IF NAME="od" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="dd" --><!-- TMPL_IF NAME="od" --></span><!-- /TMPL_IF --></td>
+			<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" --></a><br/><i><!-- TMPL_VAR name="itemnotes" --></i></td>
+			<td><!-- TMPL_VAR NAME="author" --></td>
+			<td><!-- TMPL_VAR NAME="classification" --></td>
+			<td><!-- TMPL_VAR NAME="barcode" --></td>
+			<td><input type="checkbox" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y"<!-- TMPL_IF NAME="od" --> checked="checked"<!-- /TMPL_IF --> /></td></tr>
+		<!-- /TMPL_LOOP -->
+	</table>
+	
+	<p><input type="submit" class="submit" value="Renew Checked Items" /></p>
+<!-- /TMPL_IF -->
+</form>
+
+	
+</div>
+
+<!-- /TMPL_IF -->
+</div>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/circ/currenttransfers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/currenttransfers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/currenttransfers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/currenttransfers.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,59 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
+
+<div id="mainbloc">
+	<h1 class="circulation">Transfers in wait for your library the : <!-- TMPL_VAR NAME="show_date" --></h1>
+	<div id="resultlist">
+	<!-- TMPL_LOOP NAME="branchesloop" -->
+		<!-- TMPL_IF NAME="branchcode" -->
+		<table>
+		<tr>
+			<th class="circulation" colspan="5">current transfers from the library : <!-- TMPL_VAR NAME="branchname" --> </th>
+		</tr>
+		<tr>
+			<th class="circulation">Date of transfer</th>
+			<th class="circulation">Title</th>
+			<th class="circulation">Borrower</th>
+			<th class="circulation">Localisation</th>
+			<th class="circulation">Action</th>
+		</tr>
+		<!-- TMPL_LOOP NAME="reserv" -->
+			<tr <!-- TMPL_IF NAME="messcompa" --> class="problem" <!-- /TMPL_IF -->>
+				<td><p><!-- TMPL_VAR NAME="datetransfer" --></p> <!-- TMPL_IF NAME="messcompa" --> check this transfer<!-- /TMPL_IF --></td>
+				<td>
+					<p>
+						<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
+						&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --> </b>)
+						<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
+					</p>
+				</td>
+				<td>
+				<!-- TMPL_IF NAME="borrowername" -->
+					<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
+				<!-- TMPL_IF NAME="borrowermail" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
+	<!-- TMPL_VAR NAME="borrowermail" --></a><!--/TMPL_IF-->
+					</p>
+				<!-- TMPL_ELSE -->
+					<P>
+					Transfer without reserv linked
+					</P>
+				<!-- /TMPL_IF -->
+				</td>
+				<td><p><!-- TMPL_VAR NAME="homebranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
+				<td>
+				<form name="dotransfer" action="currenttransfers.pl" method="post">
+						<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
+				<input type="submit" value="Cancel this transfer">
+				</form>
+				</td>	
+			</tr>
+		<!-- /TMPL_LOOP -->	
+		</table>
+		<br><br>
+		<!-- /TMPL_IF -->
+	<!-- /TMPL_LOOP -->
+	</div>
+</div>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/circ/rescirculation.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/rescirculation.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/rescirculation.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/rescirculation.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,340 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation<!-- TMPL_IF Name="borrowernumber" -->: Issuing to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->  (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main"><h1>Reserve Section: Issues  <!-- TMPL_VAR NAME="today" --></h1></div>
+
+ <div id="main">
+	
+<!--  INITIAL BLOC : PARAMETERS & BORROWER INFO -->
+	
+	
+	<!-- RESULT OF ISSUING REQUEST -->
+	
+		<!-- TMPL_IF NAME="IMPOSSIBLE" -->
+		<div class="error">
+		<h3>Error Issuing Item:</h3>
+			<ul>
+			<!-- TMPL_IF NAME="INVALID_DATE" -->
+				<li>The due date is invalid</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="TOO_EARLY" -->
+				<li>You are not allowed to renew this item yet. Too Early</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="UNKNOWN_BARCODE" -->
+				<li>The barcode was not found</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="NOT_INRESERVE" -->
+				<li>The item is not in Reserve Section</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="NOT_FOR_LOAN" -->
+				<li>Item not for loan</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="WTHDRAWN" -->
+				<li>Item is cancelled</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="GNA" -->
+				<li>Patron's address is in doubt</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="CARD_LOST" -->
+				<li>Patron's card is lost</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="DEBARRED" -->
+				<li>Patron is debarred</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="NO_MORE_RENEWALS" -->
+				<li>No more renewals possible</li>
+			<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="EXPIRED" -->
+				<li>Borrower card expired</li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="NOTSAMEBRANCH" -->
+				<li>You cannot issue a book which is not in your branch</li>
+			<!-- /TMPL_IF -->
+			</ul>
+		</div>
+		<!-- TMPL_ELSE -->
+		<!-- TMPL_IF NAME="NEEDSCONFIRMATION" -->
+		<div class="error">
+		<h3>Please Confirm Issue:</h3>
+			<!-- TMPL_IF NAME="DEBT" -->
+				<p>The patron has a debt of <!-- TMPL_VAR name="DEBT" --> YTL</p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="RENEW_ISSUE" -->
+				<p>Item is currently issued to this patron.  Renew?</p>
+			<!-- /TMPL_IF -->	
+			<!-- TMPL_IF NAME="RESERVE_WAITING" -->
+				<p>Item is consigned for <!-- TMPL_VAR NAME="RESERVE_WAITING" --></p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="RESERVED" -->
+				<p>Item is on reserve for <!-- TMPL_VAR NAME="RESERVED" --></p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ISSUED_TO_ANOTHER" -->
+				<p>Item issued to <!-- TMPL_VAR NAME="ISSUED_TO_ANOTHER" -->. Return and issue?</p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="TOO_MANY" -->
+				<p>Too many issues (already issued / max : <!-- TMPL_VAR name="TOO_MANY" -->)</p>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_UNLESS name="IMPOSSIBLE" -->
+			<div class="action"><form class="inline" method="post" action="/cgi-bin/koha/circ/rescirculation.pl">
+				<!-- TMPL_IF NAME="RESERVED" -->
+					<p><input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" /><label for="cancelreserve">Cancel Reserve</label></p>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="RENEW_ISSUE" -->
+				<input type="hidden" name="renew" value="1" />
+			
+				<!-- TMPL_LOOP NAME="todayissues" -->
+				<input type="hidden" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y"/>
+				<!--/TMPL_LOOP-->
+				<!-- TMPL_LOOP NAME="previssues" -->
+				<input type="hidden" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y"/>
+				<!--/TMPL_LOOP-->
+			
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF NAME="RESERVE_WAITING" -->
+					<p><input type="checkbox" id="cancelreserve" name="cancelreserve" value="1" /><label for="cancelreserve">Cancel Reserve</label></p>
+				<!-- /TMPL_IF -->
+				<input type="hidden" name="barcode" value="<!-- TMPL_VAR NAME="barcode" -->" />
+				
+				<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
+				<input type="hidden" name="issueconfirmed" value="1" />
+				<input type="hidden" name="day" value="" />
+				<input type="hidden" name="month" value="" />
+				<input type="hidden" name="year" value="" />
+				<input type="submit" value="Confirm Issue (Y)" class="submit" accesskey="y" /></form><form class="inline" method="post" action="/cgi-bin/koha/circ/rescirculation.pl"><input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="submit" class="cancel" value="Don't Issue (N)" accesskey="n" /></form></div>
+			</div>
+			<!-- /TMPL_UNLESS -->
+		<!-- /TMPL_IF -->
+		<!-- /TMPL_IF -->
+		
+		<!-- TMPL_IF NAME="issued" -->
+			<div class="error"><p>Item issued</p></div>
+		<!-- /TMPL_IF -->
+	
+	<div class="details">
+	<!-- TMPL_IF NAME="message" -->
+	<div class="details">
+	No patron matched <span class="ex"><!-- TMPL_VAR name="message" --></span> <a href="/cgi-bin/koha/members/memberentry.pl?actionType=Add">Add a new patron</a>
+	</div>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="CGIselectborrower" -->
+	<form method="post" action="/cgi-bin/koha/circ/rescirculation.pl" id="mainform" name="mainform">
+		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+		<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
+	<label for="borrnumber">Select a borrower: </label>
+		<style type="text/css">
+		option:hover {
+			background-color : #f0f0f0;
+			color : #000099;
+		}
+	</style>
+	<p><!-- TMPL_VAR name="CGIselectborrower" --></p>
+	<p><input type="submit" class="submit" value="Select" /></p>
+	<p>Patron not found? <a href="/cgi-bin/koha/members/memberentry.pl?type=Add">Add a new patron</a></p>
+	</form>
+	<!-- TMPL_ELSE -->
+		<!-- TMPL_IF NAME="borrowernumber" -->
+	<div id="notes">                                							
+	<ul>
+	<li><!-- TMPL_VAR NAME="streetaddress" -->, <!-- TMPL_VAR NAME="city" --></li>
+	<!-- TMPL_IF NAME="phone" --><li><!-- TMPL_VAR NAME="phone" --></li><!--/TMPL_IF-->
+	<!-- TMPL_IF NAME="emailaddress" --><li><a href="mailto:<!-- TMPL_VAR NAME="emailaddress" -->"><!-- TMPL_VAR NAME="emailaddress" --></a></li><!-- /TMPL_IF -->
+	<li>Category: <!-- TMPL_VAR name="categorycode" --></li>
+	<li>(<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">details</a> / <a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!-- TMPL_VAR name="borrowernumber" -->&amp;modify=edit&amp;destination=circ">edit</a>)</li>
+	</ul>
+	</div><table width= "70%"><tr><td>
+
+	<h3><!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)</h3>
+	<h4> &nbsp; &nbsp; <!-- TMPL_VAR NAME="issuecount" --> out<!-- TMPL_IF NAME="overduecount" -->, <span class="error"><!-- TMPL_VAR name="overduecount" --> overdue</span><!-- /TMPL_IF --></h4><br clear="right" />
+	</td><td><img src="<!-- TMPL_VAR NAME="borrowerphoto" -->" alt="Photo" hspace="0" vspace="0" border="0" width="100px" heigth="100px" style="clear:both;float:right;position:relative;">
+	</td></tr></table>
+									
+						
+
+
+<!-- TMPL_IF NAME="flagged" -->
+</div><div class="details">
+<ul>
+<!-- TMPL_IF NAME="gna" -->
+<li><span class="error">Address:</span> Patron's address in doubt</li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="lost" -->
+<li><span class="error">Lost:</span> Patron's card is lost</li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="dbarred" -->
+<li><span class="error">Debarred:</span> Patron is debarred <form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post"><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="hidden" name="cardnumber" value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" value="circ" name="destination" /><input type="hidden" name="status" value="0" /><input type="submit" class="submit" value="Lift Debarment" /></form></li>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF name="odues" -->	<li><!-- TMPL_IF name="nonreturns" -->
+					<span class="error">Overdues:</span> Patron has <span class="error">ITEMS OVERDUE</span> See highlighted items <a href="#previous">below</a>
+				<!-- /TMPL_IF --></li><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="noissues" -->
+<!-- TMPL_IF NAME="resfine" --><li><span class="error">Fines:</span> Patron has outstanding reserve section fines of <!-- TMPL_VAR NAME="resfine" --> YTL. Return book and make payment</li><!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="charges" --><li><span class="error">Fines:</span> Patron has <a href="/cgi-bin/koha/boraccount.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">outstanding fines</a>. Make <a href="/cgi-bin/koha/pay.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li><!-- /TMPL_IF -->
+<!-- TMPL_ELSE -->
+	<!-- TMPL_IF name="charges" --><li>Fines: Patron has <a href="/cgi-bin/koha/boraccount.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">outstanding fines</a>. Make <a href="/cgi-bin/koha/pay.pl?bornum=<!-- TMPL_VAR name="borrowernumber" -->">Payment</a></li><!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+</ul>
+
+<dl>
+		
+<!-- TMPL_IF name="waiting" -->
+		<dt>Reserves waiting:</dt>
+			<dd><ul><!-- TMPL_LOOP name="itemswaiting" -->
+				<li><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR name="title" --></a> (<!-- TMPL_VAR name="barcode" --> -- <!-- TMPL_VAR name="branchname" -->)</li>
+			<!-- /TMPL_LOOP -->
+			</ul></dd>
+		<!-- /TMPL_IF -->
+
+		<!-- TMPL_IF name="notes" -->
+					<dt>Notes:</dt> <dd class="error"><!-- TMPL_VAR name="notesmsg" --></dd>
+				<!-- /TMPL_IF -->
+</dl>
+<!-- /TMPL_IF -->
+	<!-- TMPL_ELSE -->
+	<!-- No card entered yet -->
+	<form method="post" action="/cgi-bin/koha/circ/rescirculation.pl" name="mainform" id="mainform">
+<label for="findborrower">Enter borrower card number or partial last name: </label>
+				<input name="findborrower" type="text" size="40" />
+					<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+					<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
+				<input type="submit" class="submit" value="Submit" />
+				</form>
+		<!-- /TMPL_IF -->
+	<!-- /TMPL_IF -->
+	</div>
+
+<!-- BARCODE ENTRY -->
+
+<!-- TMPL_IF NAME="borrowernumber" -->
+	<div class="details">
+	<form method="post" action="/cgi-bin/koha/circ/rescirculation.pl" name="mainform">
+<label for="barcode">Enter Item Barcode: </label><input name="barcode" size="14" maxlength="14"class="unfocus" onfocus="this.className='focus'" onblur="this.className='unfocus'" /> <input type="submit" value="Issue" class="submit" /><!-- Display for NPL <input type="hidden" name="day" value="0" /><input type="hidden" name="month" value="0" /><input type="hidden" name="year" value="0" /> /Display for NPL -->
+	<!-- <p>
+			<label for="day">Specify Due Date: </label><select name="day" id="day">
+				<option value="0">Day</option>
+				<option value="1"<!-- TMPL_IF NAME="day1" --> selected="selected"<!-- /TMPL_IF -->>1</option>
+				<option value="2"<!-- TMPL_IF NAME="day2" --> selected="selected"<!-- /TMPL_IF -->>2</option>
+				<option value="3"<!-- TMPL_IF NAME="day3" --> selected="selected"<!-- /TMPL_IF -->>3</option>
+				<option value="4"<!-- TMPL_IF NAME="day4" --> selected="selected"<!-- /TMPL_IF -->>4</option>
+				<option value="5"<!-- TMPL_IF NAME="day5" --> selected="selected"<!-- /TMPL_IF -->>5</option>
+				<option value="6"<!-- TMPL_IF NAME="day6" --> selected="selected"<!-- /TMPL_IF -->>6</option>
+				<option value="7"<!-- TMPL_IF NAME="day7" --> selected="selected"<!-- /TMPL_IF -->>7</option>
+				<option value="8"<!-- TMPL_IF NAME="day8" --> selected="selected"<!-- /TMPL_IF -->>8</option>
+				<option value="9"<!-- TMPL_IF NAME="day9" --> selected="selected"<!-- /TMPL_IF -->>9</option>
+				<option value="10"<!-- TMPL_IF NAME="day10" --> selected="selected"<!-- /TMPL_IF -->>10</option>
+				<option value="11"<!-- TMPL_IF NAME="day11" --> selected="selected"<!-- /TMPL_IF -->>11</option>
+				<option value="12"<!-- TMPL_IF NAME="day12" --> selected="selected"<!-- /TMPL_IF -->>12</option>
+				<option value="13"<!-- TMPL_IF NAME="day13" --> selected="selected"<!-- /TMPL_IF -->>13</option>
+				<option value="14"<!-- TMPL_IF NAME="day14" --> selected="selected"<!-- /TMPL_IF -->>14</option>
+				<option value="15"<!-- TMPL_IF NAME="day15" --> selected="selected"<!-- /TMPL_IF -->>15</option>
+				<option value="16"<!-- TMPL_IF NAME="day16" --> selected="selected"<!-- /TMPL_IF -->>16</option>
+				<option value="17"<!-- TMPL_IF NAME="day17" --> selected="selected"<!-- /TMPL_IF -->>17</option>
+				<option value="18"<!-- TMPL_IF NAME="day18" --> selected="selected"<!-- /TMPL_IF -->>18</option>
+				<option value="19"<!-- TMPL_IF NAME="day19" --> selected="selected"<!-- /TMPL_IF -->>19</option>
+				<option value="20"<!-- TMPL_IF NAME="day20" --> selected="selected"<!-- /TMPL_IF -->>20</option>
+				<option value="21"<!-- TMPL_IF NAME="day21" --> selected="selected"<!-- /TMPL_IF -->>21</option>
+				<option value="22"<!-- TMPL_IF NAME="day22" --> selected="selected"<!-- /TMPL_IF -->>22</option>
+				<option value="23"<!-- TMPL_IF NAME="day23" --> selected="selected"<!-- /TMPL_IF -->>23</option>
+				<option value="24"<!-- TMPL_IF NAME="day24" --> selected="selected"<!-- /TMPL_IF -->>24</option>
+				<option value="25"<!-- TMPL_IF NAME="day25" --> selected="selected"<!-- /TMPL_IF -->>25</option>
+				<option value="26"<!-- TMPL_IF NAME="day26" --> selected="selected"<!-- /TMPL_IF -->>26</option>
+				<option value="27"<!-- TMPL_IF NAME="day27" --> selected="selected"<!-- /TMPL_IF -->>27</option>
+				<option value="28"<!-- TMPL_IF NAME="day28" --> selected="selected"<!-- /TMPL_IF -->>28</option>
+				<option value="29"<!-- TMPL_IF NAME="day29" --> selected="selected"<!-- /TMPL_IF -->>29</option>
+				<option value="30"<!-- TMPL_IF NAME="day30" --> selected="selected"<!-- /TMPL_IF -->>30</option>
+				<option value="31"<!-- TMPL_IF NAME="day31" --> selected="selected"<!-- /TMPL_IF -->>31</option>
+			</select>
+			<select name="month">
+				<option value="0">Month</option>
+				<option value="1"<!-- TMPL_IF NAME="month1" --> selected="selected"<!-- /TMPL_IF -->>Jan</option>
+				<option value="2"<!-- TMPL_IF NAME="month2" --> selected="selected"<!-- /TMPL_IF -->>Feb</option>
+				<option value="3"<!-- TMPL_IF NAME="month3" --> selected="selected"<!-- /TMPL_IF -->>Mar</option>
+				<option value="4"<!-- TMPL_IF NAME="month4" --> selected="selected"<!-- /TMPL_IF -->>Apr</option>
+				<option value="5"<!-- TMPL_IF NAME="month5" --> selected="selected"<!-- /TMPL_IF -->>May</option>
+				<option value="6"<!-- TMPL_IF NAME="month6" --> selected="selected"<!-- /TMPL_IF -->>Jun</option>
+				<option value="7"<!-- TMPL_IF NAME="month7" --> selected="selected"<!-- /TMPL_IF -->>Jul</option>
+				<option value="8"<!-- TMPL_IF NAME="month8" --> selected="selected"<!-- /TMPL_IF -->>Aug</option>
+				<option value="9"<!-- TMPL_IF NAME="month9" --> selected="selected"<!-- /TMPL_IF -->>Sep</option>
+				<option value="10"<!-- TMPL_IF NAME="month10" --> selected="selected"<!-- /TMPL_IF -->>Oct</option>
+				<option value="11"<!-- TMPL_IF NAME="month11" --> selected="selected"<!-- /TMPL_IF -->>Nov</option>
+				<option value="12"<!-- TMPL_IF NAME="month12" --> selected="selected"<!-- /TMPL_IF -->>Dec</option>
+			</select>
+			<select name="year">
+				<option value="0">Year</option>
+				<option value="2004"<!-- TMPL_IF NAME="year2004" --> selected="selected"<!-- /TMPL_IF -->>2004</option>
+				<option value="2005"<!-- TMPL_IF NAME="year2005" --> selected="selected"<!-- /TMPL_IF -->>2005</option>
+				<option value="2006"<!-- TMPL_IF NAME="year2006" --> selected="selected"<!-- /TMPL_IF -->>2006</option>
+				<option value="2007"<!-- TMPL_IF NAME="year2007" --> selected="selected"<!-- /TMPL_IF -->>2007</option>
+				<option value="2008"<!-- TMPL_IF NAME="year2008" --> selected="selected"<!-- /TMPL_IF -->>2008</option>
+			</select>
+<label for="stickyduedate">Remember for Session:</label><input type="checkbox" id="stickyduedate" name="stickyduedate" <!-- TMPL_VAR NAME="selected" --> />    -->
+		<input type="hidden" name="borrnumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" />
+		<input type="hidden" name="branch" value="<!-- TMPL_VAR NAME="branch" -->" />
+		<input type="hidden" name="printer" value="<!-- TMPL_VAR NAME="printer" -->" />
+		<input type="hidden" name="print" value="maybe" />
+		<!-- TMPL_IF NAME="CHARGES" -->
+			<input type="hidden" name="charges" value="yes" />
+			<input type="hidden" name="oldamount" value="<!-- TMPL_VAR NAME="amountold" -->" />
+		<!-- /TMPL_IF -->
+		</p>
+	</form>
+	</div>
+
+
+<!-- /TMPL_IF -->
+
+
+
+<!-- SUMMARY : TODAY & PREVIOUS ISSUES -->
+<!-- TMPL_IF NAME="borrowernumber" -->
+<div class="table"><form class="inline"  method="post"><input type="hidden" value="circ" name="destination" />
+	<table>
+		<caption>Issues from reserve section</caption>
+		<tr>
+			<th>Due Date</th>
+			<th>Title</th>
+			<th>Author</th>
+			<th>Call No</th>
+			<th>Barcode</th>
+			
+		</tr>
+	<!-- TMPL_IF NAME="todayissues" -->
+		<!-- TMPL_LOOP NAME="todayissues" -->
+		<tr>
+			<td><!-- TMPL_VAR NAME="dd" --></td>
+			<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" --></a><br/><i><!-- TMPL_VAR name="itemnotes" --></i></td>
+			<td><!-- TMPL_VAR NAME="author" --></td>
+			<td><!-- TMPL_VAR NAME="classification" --></td>
+			<td><!-- TMPL_VAR NAME="barcode" --></td>
+			
+		</tr>
+		<!-- /TMPL_LOOP -->
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF NAME="previssues" -->
+		<tr><th colspan="6"><a name="previous" id="previous">Previous Issues</a></th></tr>
+		<!-- TMPL_LOOP NAME="previssues" -->
+			<tr>
+			<td><!-- TMPL_IF NAME="od" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="dd" --><!-- TMPL_IF NAME="od" --></span><!-- /TMPL_IF --></td>
+			<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->&amp;type=intra"><!-- TMPL_VAR NAME="title" --></a><br/><i><!-- TMPL_VAR name="itemnotes" --></i></td>
+			<td><!-- TMPL_VAR NAME="author" --></td>
+			<td><!-- TMPL_VAR NAME="classification" --></td>
+			<td><!-- TMPL_VAR NAME="barcode" --></td>
+			
+		<!-- /TMPL_LOOP -->
+	</table>
+	
+	
+</form>
+
+<!-- TMPL_IF name="previssues" --><form class="inline" action="" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><!-- TMPL_LOOP NAME="previssues" --><input type="hidden" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y" /><!-- /TMPL_LOOP --></form><!-- /TMPL_IF -->
+	
+</div>
+<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+</div>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/circ/resreturns.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/resreturns.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/resreturns.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/resreturns.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,160 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation: Returns<!-- TMPL_IF Name="returned" -->: <!-- TMPL_VAR Name="itemtitle" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF Name="found" -->
+		<h3 class="alert">Reserve Found<!-- TMPL_IF Name="waiting" --> (item is already <em>consigned</em>) <!-- /TMPL_IF --></h3>
+		<!-- TMPL_IF Name="waiting" -->
+		<div class="items">
+		<table>
+		<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
+		<tr><th>Patron: </th><td>
+			<ul>
+						<li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a></li>
+			<li><!-- TMPL_VAR Name="borsurname" -->, <!-- TMPL_VAR Name="borfirstname" --> </li>
+			<li><!-- TMPL_VAR Name="borstraddress" --><br />
+			<!-- TMPL_VAR Name="borcity" -->  <!-- TMPL_VAR NAME="borzip" --></li>
+			<li><!-- TMPL_VAR Name="borphone" --></li>
+			<!-- Display for NPL // <!-- TMPL_IF NAME="boremail" --><li><a href="/intranet-intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->" onclick="window.open('/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->','notify','width=650,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes'); return false;"><!-- TMPL_VAR Name="boremail" --></a></li><!-- /TMPL_IF --> // Display for NPL -->
+			</ul></td></tr>
+	<tr><th>Transfer to:</th><td><!-- TMPL_VAR Name="branchname" --></td></tr>
+		</table></div><form method="post" action="resreturns.pl" name="mainform" id="mainform">
+			<input type="submit" value="Confirm" class="submit" /><!-- TMPL_LOOP Name="inputloop" -->
+				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<!-- /TMPL_LOOP -->
+			<input type="hidden" name="barcode" value="0" />
+			</form>
+		
+			
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="diffbranch" -->
+			<h3>Item Consigned:</h3><br>
+    	<div class="item">
+		<table>
+		<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
+		<tr><th>Patron:</th><td><!-- TMPL_VAR Name="name" --></td></tr>
+		</table></div><form method="post" action="resreturns.pl" name="mainform" id="mainform"><input type="submit" value="OK" />
+			<!-- TMPL_LOOP Name="inputloop" -->
+				<!-- TMPL_UNLESS Name="first" -->
+					<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+					<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+					<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+				<!-- /TMPL_UNLESS -->
+			<!-- /TMPL_LOOP -->
+			<input type="hidden" name="barcode" value="0" />
+			
+			</form>
+		
+
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="reserved" -->
+			<div class="items">
+			<table>
+			<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
+			<tr><th>Patron: </th><td>
+			<ul>
+						<li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a></li>
+			<li><!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" --></li>
+			<li><!-- TMPL_VAR Name="borstraddress" --><br />
+			<!-- TMPL_VAR Name="borcity" --> <!-- TMPL_VAR NAME="borzip" --></li>
+			<li><!-- TMPL_VAR Name="borphone" --></li>
+			<!-- Display for NPL // <!-- TMPL_IF NAME="boremail" --><li><a href="/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->" onclick="window.open('/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->','notify','width=650,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes'); return false;"><!-- TMPL_VAR Name="boremail" --></a></li><!-- /TMPL_IF --> // Display for NPL -->
+			</ul></td></tr>
+			<tr><th>Transfer to: </th><td><!-- TMPL_VAR Name="branchname" --></td></tr></table>
+			</div> <form method="post" action="resreturns.pl" name="mainform" id="mainform">
+			<input type="submit" class="submit" value="Confirm" />
+			<!-- TMPL_LOOP Name="inputloop" -->
+				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<!-- /TMPL_LOOP -->
+			<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
+			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<input type="hidden" name="resbarcode" value="<!-- TMPL_VAR Name="barcode" -->" /></form>
+		<!-- /TMPL_IF -->
+	
+<!-- TMPL_ELSE -->
+<h3 class="alert">Reserve section: Returns</h1>
+	<div class="details">
+	<form method="post" action="/cgi-bin/koha/circ/resreturns.pl"  name="mainform" id="mainform">
+			<label for="barcode">Enter Item Barcode</label>
+			<input name="barcode" id="barcode" size="14" maxlength="14" class="unfocus" onfocus="this.className='focus'" onblur="this.className='unfocus'" />
+			<input type="submit" class="submit" value="Submit" />
+			<!-- TMPL_LOOP Name="inputloop" -->
+				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<!-- /TMPL_LOOP -->
+		</form><!-- TMPL_IF NAME="errmsgloop" --><!-- TMPL_LOOP Name="errmsgloop" -->
+				<div class="error">
+				<!-- TMPL_IF Name="badbarcode" -->
+					No Item with barcode: <!-- TMPL_VAR Name="msg" -->
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="ispermanent" -->
+					Please return to  <!-- TMPL_VAR Name="msg" -->
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="notissued" -->
+					Not On Issue.
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="waslost" -->
+					Item was lost, now found.
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="withdrawn" -->
+					Item Cancelled
+				<!-- /TMPL_IF -->
+				</div>
+			<!-- /TMPL_LOOP --><!-- /TMPL_IF -->
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF Name="returned" -->
+<div class="table"><table>
+		<tr><th>Item Information</th><th>Patron Information</th></tr>
+		<tr><td><!-- TMPL_VAR Name="itemtitle" -->
+		</td><td><div class="flags">
+<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="ribornum" -->"><!-- TMPL_VAR Name="riborcnum" --></a>
+		<!-- TMPL_VAR Name="riborsurname" -->, <!-- TMPL_VAR Name="ribortitle" --> <!-- TMPL_VAR Name="riborfirstname" -->
+
+<!-- removed: removed-from-returns.tmpl -->
+<!-- TMPL_IF Name="flagset" -->
+ (<!-- TMPL_LOOP Name="flagloop" -->
+<span class="error"><!-- TMPL_VAR Name="flag" -->, </span>
+<!-- /TMPL_LOOP -->)<!-- /TMPL_IF --></div>
+</td></tr></table>
+</div>
+<!-- /TMPL_IF -->
+
+
+
+<!-- TMPL_IF Name="riloop" -->
+<div class="table">
+		<table>
+		<caption>Returned Items</caption>
+		<tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Type</th><th>Patron</th></tr>
+		<!-- TMPL_LOOP Name="riloop" -->
+			<tr><td><!-- TMPL_IF Name="duedate" --><!-- TMPL_IF Name="early" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR Name="duedate" --><!-- TMPL_IF Name="early" --></span><!-- /TMPL_IF --><!-- TMPL_ELSE -->Not on Issue.<!-- /TMPL_IF --></td>
+			<td>
+			<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="itembiblionumber" -->&type=intra"><!-- TMPL_VAR Name="barcode" --></a></td>
+			<td><!-- TMPL_VAR Name="itemtitle" --></td>
+			<td><!-- TMPL_VAR Name="itemauthor" --></td>
+			<td><!-- TMPL_VAR Name="itemtype" --></td>
+			<td>
+			<!-- TMPL_IF Name="duedate" -->
+				<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->">
+					<!-- TMPL_VAR Name="borcnum" -->
+				</a> <!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" -->
+			<!-- TMPL_ELSE -->
+								<a href="/cgi-bin/koha/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a> <!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" -->
+			<!-- /TMPL_IF -->
+			</td></tr>
+		<!-- /TMPL_LOOP -->
+		</table>
+		</div>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/circ/returns.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/returns.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/returns.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/returns.tmpl	26 Mar 2007 02:19:22 -0000	1.24.2.1
@@ -0,0 +1,163 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation: Returns<!-- TMPL_IF Name="returned" -->: <!-- TMPL_VAR Name="itemtitle" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF Name="found" -->
+		<h3 class="alert">Reserve Found<!-- TMPL_IF Name="waiting" --> (item is already <em>consigned</em>) <!-- /TMPL_IF --></h3>
+		<!-- TMPL_IF Name="waiting" -->
+		<div class="items">
+		<table>
+		<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
+		<tr><th>Patron: </th><td>
+			<ul>
+						<li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a></li>
+			<li><!-- TMPL_VAR Name="borsurname" -->, <!-- TMPL_VAR Name="borfirstname" --> </li>
+			<li><!-- TMPL_VAR Name="borstraddress" --><br />
+			<!-- TMPL_VAR Name="borcity" -->  <!-- TMPL_VAR NAME="borzip" --></li>
+			<li><!-- TMPL_VAR Name="borphone" --></li>
+			
+			</ul></td></tr>
+	<tr><th>Transfer to:</th><td><!-- TMPL_VAR Name="branchname" --></td></tr>
+		</table></div><form method="post" action="returns.pl" name="mainform" id="mainform">
+			<input type="submit" value="Confirm" class="submit" /><!-- TMPL_LOOP Name="inputloop" -->
+				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<!-- /TMPL_LOOP -->
+			<input type="hidden" name="barcode" value="0" />
+			</form>
+		
+			
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="diffbranch" -->
+			<h3>Item Consigned:</h3><br>
+    	<div class="item">
+		<table>
+		<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
+		<tr><th>Patron:</th><td><!-- TMPL_VAR Name="name" --></td></tr>
+		</table></div><form method="post" action="returns.pl" name="mainform" id="mainform"><input type="submit" value="OK" />
+			<!-- TMPL_LOOP Name="inputloop" -->
+				<!-- TMPL_UNLESS Name="first" -->
+					<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+					<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+					<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+				<!-- /TMPL_UNLESS -->
+			<!-- /TMPL_LOOP -->
+			<input type="hidden" name="barcode" value="0" />
+			
+			</form>
+		
+
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF Name="reserved" -->
+			<div class="items">
+			<table>
+			<caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=<!-- TMPL_VAR NAME="itembiblionumber" -->"><!-- TMPL_VAR Name="itemtitle" --></a></caption>
+			<tr><th>Patron: </th><td>
+			<ul>
+						<li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a></li>
+			<li><!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" --></li>
+			<li><!-- TMPL_VAR Name="borstraddress" --><br />
+			<!-- TMPL_VAR Name="borcity" --> <!-- TMPL_VAR NAME="borzip" --></li>
+			<li><!-- TMPL_VAR Name="borphone" --></li>
+			<!-- Display for NPL // <!-- TMPL_IF NAME="boremail" --><li><a href="/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->" onclick="window.open('/intranet-reserve-notify.php?bornum=<!-- TMPL_VAR NAME="bornum" -->&amp;biblionum=<!-- TMPL_VAR NAME="itembiblionumber" -->','notify','width=650,height=450,location=no,menubar=no,toolbar=no,scrollbars=yes'); return false;"><!-- TMPL_VAR Name="boremail" --></a></li><!-- /TMPL_IF --> // Display for NPL -->
+			</ul></td></tr>
+			<tr><th>Transfer to: </th><td><!-- TMPL_VAR Name="branchname" --></td></tr></table>
+			</div> <form method="post" action="returns.pl" name="mainform" id="mainform">
+			<input type="submit" class="submit" value="Confirm" />
+			<!-- TMPL_LOOP Name="inputloop" -->
+				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<!-- /TMPL_LOOP -->
+			<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR Name="itemnumber" -->" />
+			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<input type="hidden" name="resbarcode" value="<!-- TMPL_VAR Name="barcode" -->" /></form>
+		<!-- /TMPL_IF -->
+	
+<!-- TMPL_ELSE -->
+<h1>Circulation: Returns</h1>
+	<div class="details">
+	<form method="post" action="/cgi-bin/koha/circ/returns.pl"  name="mainform" id="mainform">
+			<label for="barcode">Enter Item Barcode</label>
+			<input name="barcode" id="barcode" size="14" maxlength="14" class="unfocus" onfocus="this.className='focus'" onblur="this.className='unfocus'" />
+			<input type="submit" class="submit" value="Submit" />
+			<!-- TMPL_LOOP Name="inputloop" -->
+				<input type="hidden" name="ri-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="barcode" -->" />
+				<input type="hidden" name="dd-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="duedate" -->" />
+				<input type="hidden" name="bn-<!-- TMPL_VAR Name="counter" -->" value="<!-- TMPL_VAR Name="bornum" -->" />
+			<!-- /TMPL_LOOP -->
+		</form><!-- TMPL_IF NAME="errmsgloop" --><!-- TMPL_LOOP Name="errmsgloop" -->
+				<div class="error">
+				<!-- TMPL_IF Name="badbarcode" -->
+					No Item with barcode: <!-- TMPL_VAR Name="msg" -->
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="ispermanent" -->
+					Please return to  <!-- TMPL_VAR Name="msg" -->
+				<!-- /TMPL_IF -->
+				
+				<!-- TMPL_IF Name="reserveissued" -->
+					Issued from RESERVE Section-  Use RESERVE return.
+				<!-- TMPL_ELSE -->
+				<!-- TMPL_IF Name="notissued" -->
+					Not On Issue.
+				<!-- /TMPL_IF --><!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="waslost" -->
+					Item was lost, now found.
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF Name="withdrawn" -->
+					Item Cancelled
+				<!-- /TMPL_IF -->
+				</div>
+			<!-- /TMPL_LOOP --><!-- /TMPL_IF -->
+</div>
+<!-- /TMPL_IF -->
+
+<!-- TMPL_IF Name="returned" -->
+<div class="table"><table>
+		<tr><th>Item Information</th><th>Patron Information</th></tr>
+		<tr><td><!-- TMPL_VAR Name="itemtitle" -->
+		</td><td><div class="flags">
+<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="ribornum" -->"><!-- TMPL_VAR Name="riborcnum" --></a>
+		<!-- TMPL_VAR Name="riborsurname" -->, <!-- TMPL_VAR Name="ribortitle" --> <!-- TMPL_VAR Name="riborfirstname" -->
+
+<!-- removed: removed-from-returns.tmpl -->
+<!-- TMPL_IF Name="flagset" -->
+ (<!-- TMPL_LOOP Name="flagloop" -->
+<span class="error"><!-- TMPL_VAR Name="flag" -->, </span>
+<!-- /TMPL_LOOP -->)<!-- /TMPL_IF --></div>
+</td></tr></table>
+</div>
+<!-- /TMPL_IF -->
+
+
+
+<!-- TMPL_IF Name="riloop" -->
+<div class="table">
+		<table>
+		<caption>Returned Items</caption>
+		<tr><th>Due Date</th><th>Bar Code</th><th>Title</th><th>Author</th><th>Type</th><th>Patron</th></tr>
+		<!-- TMPL_LOOP Name="riloop" -->
+			<tr><td><!-- TMPL_IF Name="duedate" --><!-- TMPL_IF Name="early" --><span class="error"><!-- /TMPL_IF --><!-- TMPL_VAR Name="duedate" --><!-- TMPL_IF Name="early" --></span><!-- /TMPL_IF --><!-- TMPL_ELSE -->Not on Issue.<!-- /TMPL_IF --></td>
+			<td>
+			<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="itembiblionumber" -->&type=intra"><!-- TMPL_VAR Name="barcode" --></a></td>
+			<td><!-- TMPL_VAR Name="itemtitle" --></td>
+			<td><!-- TMPL_VAR Name="itemauthor" --></td>
+			<td><!-- TMPL_VAR Name="ctype" --></td>
+			<td>
+			<!-- TMPL_IF Name="duedate" -->
+				<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->">
+					<!-- TMPL_VAR Name="borcnum" -->
+				</a> <!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" -->
+			<!-- TMPL_ELSE -->
+								<a href="/cgi-bin/koha/moremember.pl?bornum=<!-- TMPL_VAR Name="bornum" -->"><!-- TMPL_VAR Name="borcnum" --></a> <!-- TMPL_VAR Name="borfirstname" --> <!-- TMPL_VAR Name="borsurname" -->
+			<!-- /TMPL_IF -->
+			</td></tr>
+		<!-- /TMPL_LOOP -->
+		</table>
+	</div>
+<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/circ/selectbranchprinter.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/selectbranchprinter.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/selectbranchprinter.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/selectbranchprinter.tmpl	26 Mar 2007 02:19:22 -0000	1.9.2.1
@@ -0,0 +1,35 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation: Select Your Home Branch<!-- TMPL_INCLUDE NAME="doc-head-circ-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="circ-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>Circulation: Select Your Home Branch</h1>
+
+<form method="post" action="/cgi-bin/koha/circ/circulation.pl">
+<!-- TMPL_VAR NAME="branch" -->
+<div class="details">
+<label for="branch">Choose your Branch:</label>
+<!--branchselection-->
+	<select name="branch" id="branch">
+	<!-- TMPL_LOOP Name="branchloop" -->
+		<option value="<!-- TMPL_VAR Name="value" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR Name="name" --></option>
+	<!-- /TMPL_LOOP -->
+	</select>
+</div>
+<div class="details">
+<!-- <label for="printer">Choose a Network Printer:</label> -->
+<!--printerselection-->
+<!-- 	<select name="printer" id="printer">
+	<!-- TMPL_LOOP Name="printerloop" -->
+		<option value="<!-- TMPL_VAR Name="value" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR Name="name" -->
+	<!-- /TMPL_LOOP -->
+	</select>
+ --><input type="hidden" name="setcookies" value="1" />
+<p><input type="submit" class="submit" value="Submit" name="changesettings" /></p></div>
+</form>
+
+
+</div>
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/circ/waitingreservestransfers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/circ/waitingreservestransfers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/circ/waitingreservestransfers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/circ/waitingreservestransfers.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,62 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Circulation
+<!-- TMPL_IF Name="borrowernumber" -->
+: Issuing to <!-- TMPL_VAR name="surname" -->, <!-- TMPL_VAR name="firstname" -->
+(<!-- TMPL_VAR NAME="cardnumber" -->)
+<!-- /TMPL_IF -->
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-circ.inc" -->
+
+
+<h1>Circulation: Transfers To do</h1>
+
+<div id="mainbloc">
+	<h1>Transfers to do <!-- TMPL_VAR NAME="show_date" --></h1>
+	<div id="resultlist">
+	<!-- TMPL_LOOP NAME="branchesloop" -->
+		<!-- TMPL_IF NAME="branchcode" -->
+		<table>
+		<tr>
+			<th class="circulation" colspan="5">Reserves in wait to the library : <!-- TMPL_VAR NAME="branchname" --> </th>
+		</tr>
+		<tr>
+			<th class="circulation">Date of reserve</th>
+			<th class="circulation">Title</th>
+			<th class="circulation">Borrower</th>
+			<th class="circulation">Localisation</th>
+			<th class="circulation">Action</th>
+		</tr>
+		<!-- TMPL_LOOP NAME="reserv" -->
+			<tr <!-- TMPL_IF NAME="messcompa" --> class="problem" <!-- /TMPL_IF -->>
+				<td><p><!-- TMPL_VAR NAME="reservedate" --></p> <!-- TMPL_IF NAME="messcompa" --> Reserve over <!-- /TMPL_IF --></td>
+				<td>
+					<p>
+						<a href="/cgi-bin/koha/MARCdetail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
+						&nbsp; (<b><!-- TMPL_VAR NAME="itemtype" --> </b>)
+						<br />Barcode : <!-- TMPL_VAR NAME="barcode" -->
+					</p>
+				</td>
+				<td>
+					<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!--TMPL_VAR Name="borrowernum"-->"><!-- TMPL_VAR NAME="borrowername" --> &nbsp; <!-- TMPL_VAR NAME="borrowerfirstname" --></a><br /><!-- TMPL_VAR NAME="borrowerphone" --><br />
+				<!-- TMPL_IF NAME="borrowermail" --><a href="mailto:<!-- TMPL_VAR NAME="email" -->?subject=Reservation: <!-- TMPL_VAR NAME="title" -->">
+	<!-- TMPL_VAR NAME="borrowermail" --></a><!--/TMPL_IF-->
+					</p>
+				</td>
+				<td><p><!-- TMPL_VAR NAME="holdingbranch" --> <!-- TMPL_VAR NAME="itemcallnumber" --></p></td>
+				<td>
+				<form name="dotransfer" action="waitingreservestransfers.pl" method="post">
+						<input type="hidden" name="itemnumber" value="<!-- TMPL_VAR NAME="itemnumber" -->">
+						<input type="hidden" name="fbr" value="<!-- TMPL_VAR NAME="holdingbranch" -->">
+						<input type="hidden" name="tbr" value="<!-- TMPL_VAR NAME="branchcode" -->">
+				<input type="submit" value="Transfer this document">
+				</form>
+				</td>	
+			</tr>
+		<!-- /TMPL_LOOP -->	
+		</table>
+		<br><br>
+		<!-- /TMPL_IF -->
+	<!-- /TMPL_LOOP -->
+	</div>
+</div>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/export/marc-time.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/export/marc-time.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/export/marc-time.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/export/marc-time.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,17 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Cataloging: MARC Export<!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+
+<div id="main"><h1>MARC Export</h1>
+<div class="details"><h4>Export in MARC format the following biblios:</h4>
+<form method="post">
+<p>From date (yyyy-mm-dd): <input type="text" name="start_bib" />
+to date (yyyy-mm-dd): <input type="text" name="end_bib" /></p>
+<p>(leave blank to export every biblio, giving only 'from date' exports starting 'from date')</p>
+<input type="hidden" name="op" value="export" />
+<input type="submit" value="Export" class="submit" />
+</form></div>
+<p>Note : Exporting all by this tool may take some time</p>
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/export/marc.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/export/marc.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/export/marc.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/export/marc.tmpl	26 Mar 2007 02:19:22 -0000	1.9.2.1
@@ -0,0 +1,17 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Cataloging: MARC Export<!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+
+<div id="main"><h1>MARC Export</h1>
+<div class="details"><h4>Export in MARC format the following biblios:</h4>
+<form method="post">
+<p>From biblio number: <input type="text" name="start_bib" />
+to biblio number: <input type="text" name="end_bib" /></p>
+<p>(leave blank to export every biblio)</p>
+<input type="hidden" name="op" value="export" />
+<input type="submit" value="Export" class="submit" />
+</form></div>
+<p>Note : Exporting all by this tool may take some time</p>
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/export/marc_item.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/export/marc_item.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/export/marc_item.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/export/marc_item.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,17 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Cataloging: MARC Export<!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+
+<div id="main"><h1>MARC Export</h1>
+<div class="details"><h4>Export in MARC format the following items:</h4>
+<form method="post">
+<p>From item number: <input type="text" name="start_bib" />
+to item number: <input type="text" name="end_bib" /></p>
+<p>(leave blank to export every biblio)</p>
+<input type="hidden" name="op" value="export" />
+<input type="submit" value="Export" class="submit" />
+</form></div>
+<p>Note : Exporting all by this tool may take some time</p>
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/aqbookfund.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/aqbookfund.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/aqbookfund.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/aqbookfund.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,16 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Book Fund Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+
+<h1>Book Fund Administration</h1>
+
+<p>The first time you access this page, you will be asked to add your first book fund -- thereafter you will also have the option of editing and deleting book funds.</p>
+
+<p>Book Funds may be ignored if you are setting your System Preferences to "simple" acquisitions: the funds are only useful when using "normal" acquisitions.</p>
+
+<p>"Book Funds" are accounts that you establish to keep track of your expenditures for library materials. They may be used for any kind of material, not just books, and should match the lines in your materials budget. For instance, if your library establishes a budget line for books, another for audiovisual materials, a third line for magazines, and a fourth budget line for electronic databases, then you would have four Book Funds.</p>
+
+<p>Each Book Fund has a unique fund code, limited to no more than five characters, that identifies it. You should decide on your fund codes (e.g. something like BOOKS, AV, MAGS, DATA for the four book funds described above) and enter the code in the "Book fund" box, then a full name in the "Name" box.</p>
+
+<p>Once you have set up a fund, you will see a link to a page for setting up the fund budget. Here you will enter the beginning and ending dates of your budget year and the amount of money in that particular budget line. Do not use any kind of currency notation (like "$") or commas when entering the number. (Commas will be converted to decimal points.) NOTE: Your dates will not saved correctly unless you have set your date format in the System Preferences section of the Parameters page -- DO THIS BEFORE setting budgets.)</p>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/auth_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/auth_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/auth_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/auth_subfields_structure.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,34 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Authorities MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. </li>
+<li>hidden : allows you to select possible visibility conditions. Each section OPAC INTRANET or Editor can be set separately:</li>
+<li><b>Is a linking field : Select this if you want to use this field for linking other authorities to this authority. The kohafield should be set to auth_header.linkid in this subfield(preferred) or any other subfield in this field :</b>
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : shows the authority type</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>
+<li><b>Example MARC21 Subject Headings Authority</b>
+<ul>Use field 035$a for your auth_header.authid and 035$8 for auth_header.authtypecode. Make sure your zebra authorities index these fields</ul>
+<ul>Use field 150 for your subject headings</ul>
+<ul>Use field 750$9 (add subfield if not present) for auth_header.linkid . Select <b>Is a linking field</b>. You may use any subfield for linking as $9 is not hardcoded
+<ul>When you add or modify an authority clicking on ... that will appear next to 750$9 will let you search any authority and link it to this record. You may repeat tag 750 and add as many linkages as you like</u>
+</li>
+</ul>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/authorised_values.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/authorised_values.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/authorised_values.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/authorised_values.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,12 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Authorised values management<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Authorised values management</h1>
+<p>Koha allows you to restrict the values that catalogers can place in some MARC subfields to certain pre-defined "authorised" values. These authorised values are defined here.</p>
+
+<p>For example, if your Koha installation is used by several libraries, and you use MARC21, you might want to restrict the 850a MARC subfield to the instition codes for just those libraries. In that case, you could define a new authorised values category (perhaps called "INST") and enter the institution codes as the authorised values for that category. Once the 850a subfield is linked to the INST authorised values category in your MARC tag structure, catalogers must choose a value from the list you define here, and may not type in any other value.</p>
+<ul>
+<li>HINT : if a subfield is non mandatory, Koha automatically adds an empty value to the authorised value list, that is selected by default. If the subfield is mandatory, no empty value is added (and you should NOT add it in the list, as it's an illegal value !)</li>
+<li>HINT2 : in the MARC editor, the list is ordered by Text, NOT by value. So you can define a default value by putting a space before the value you want to see first. For example, if your list is related to language, you can set "ENG" as authorised value and " English" as text. The space will order "ENG" as first default value, and the space won't be shown (because HTML automatically discard useless spaces). Super hint : you can put a value 1st with N spaces, then another one 2nd with N-1 space,..., a value in Nth position with 1 space. Don't abuse of this feature, it's easier to find a value in an alphabetical order. It should be used only to have a default value</li>
+</ul>
+<p>Koha automatically sets up authorised value categories for your item types and branch codes, and you can link these authorised values to MARC subfields when you set up your MARC tag structure.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/authtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/authtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/authtypes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/authtypes.tmpl	26 Mar 2007 02:19:22 -0000	1.3.2.1
@@ -0,0 +1,19 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Authority types<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+	<h1>Authority types</h1>
+	<p>You can define as many Authority types as you want.</p>
+	<ul>
+		<li>with the MARC structure button, you can define the MARC structure of a given authority type</li>
+		<li>The tag reported must contain a MARC tag number. Every subfield in the selected tag will be copied to the "destination tag" in the biblio. for example, in UNIMARC, the tag 200 ot personal authority will be reported to 600, 700, 701, depending on what is cliqued in the biblio MARC editor.</li>
+		<li>The summary contains an "ISBD" like description to explain how the entry must be shown in the result list. The syntax is : 
+		<ul>
+			<li>[xxxFFFSyyy] where xxx are up to 3 digits BEFORE the field, FFF the field number, S the subfield code, yyy up to 3 digits AFTER the field.</li>
+			<li>things outside [] are kept as is (including HTML)</li>
+			<li>repeatable fields are manages.</li>
+		<ul>
+	</ul>
+	<p>IMPORTANT</p>
+	<p>
+		In the biblio framework, the reported tag <b>MUST</b> contain a $9 subfield, activated in the tab where the tag is, and hidden (hidden maybe omitted, but the field has no reason to appear anywhere). The $9 subfield in the biblio will contain the Authority number (the internal Koha number)
+	</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/biblio_framework.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/biblio_framework.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/biblio_framework.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/biblio_framework.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,7 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Biblio framework<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+	<h1>Biblio framework</h1>
+	<p>biblio frameworks are used to catalogue your biblios.</p>
+	<p>Unlike Koha 2.0, in this version you can have more than 1 framework to catalogate differently various materials. You can, for example, define 1 framework for monographies, 1 framework for serials, 1 framework for URL...</p>
+	<p>Once a framework type is created, you can clic on "MARC structure" to define the exact MARC structure. The first time, Koha will ask you to select an existing framework to copy into the new one. Thus, you don't have to define all the MARC structure</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/biblios_framework.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/biblios_framework.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/biblios_framework.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/biblios_framework.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,7 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Biblio framework<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+	<h1>Biblio framework</h1>
+	<p>biblio frameworks are used to catalogue your biblios.</p>
+	<p>Unlike Koha 2.0, in this version you can have more than 1 framework to catalogate differently various materials. You can, for example, define 1 framework for monographies, 1 framework for serials, 1 framework for URL...</p>
+	<p>Once a framework type is created, you can clic on "MARC structure" to define the exact MARC structure. The first time, Koha will ask you to select an existing framework to copy into the new one. Thus, you don't have to define all the MARC structure</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/branches.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/branches.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/branches.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/branches.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,12 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Branches<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<div id="main-compact">
+<h1>Help: Library Branches</h1>
+
+<p>Fill in information about your library service outlets on this page.</p>
+
+<p>Begin by defining your branch categories. If, for example, you have one main library and several branch libraries, you might set up an "M" (Main) category and a "B" (Branch) category, with descriptions "Main Library" and "Branch Library."</p>
+
+<p>Now add the names and addresses, phone numbers, etc of your libraries in the "Branches" section. (All of your libraries should be described here, not just the branch libraries.) Give each library a unique and easily-remembered code (maximum of four characters). This code will be used in Koha's database to identify each library. When libraries are listed in Koha, they will be listed in alphabetical order by code. (Note that until you set your branch the first time you use a computer to circulate items in Koha, the branch will default to the first library in the alphabetical code list -- be careful to set the branch the first time you use Koha or whenever you add a new computer!)</p>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/categorie.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/categorie.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/categorie.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/categorie.tmpl	26 Mar 2007 02:19:22 -0000	1.3.2.1
@@ -0,0 +1,26 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Borrower Categories<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Borrower Categories</h1>
+
+<p>Here is where you define the types of users of your library and how they will be handled.</p>
+
+<h2>Category Code and Description</h2>
+<p>Start by assigning a Category Code and a Description to each borrower type. The code is limited on no more than two characters and may be anything you choose. Four codes, however, have special meaning for Koha :</p>
+<ul>
+	<li>"I" can be used for institutional members, like other libraries that borrow from you, in which case Koha expects slightly different information about the institution;</li>
+	<li>"A" (Adult) and "W" can be linked as "guarantors" to other borrowers who are their dependents.</li>
+	<li>"C" (Children) is a borrower category that has a "guarantor"</li>
+</ul>
+
+<h2>Enrollment Period</h2>
+<p>Enrollment period is a number indicating how many years a user's enrollment is valid. If you consider enrollments to expire after four years for example (as in a school, perhaps), then set this number to 4. If enrollments never expire, set this to an impossibly high number (99).</p>
+
+<h2>Upper Age Limit and Age Required</h2>
+<p>Upper Age Limit and Age Required set the age parameters for this type of user. If you issue children's cards to users between the ages of 2 and 18, for example, then Age Required would be "2" and Upper Age Limit would be "18." If there is no upper age limit, set this value to 99 (the highest allowed).</p>
+
+<h2>Enrollment Fee and Reserve Fee</h2>
+<p>Enrollment Fee and Reserve Fee (if any) should be entered either as whole numbers or with six decimal places, with no currency notation (e.g. "1.250000" instead of "$1.25").</p>
+
+<h2>Overdue Notice Required</h2>
+<p>Overdue Notice Required lets you bypass generating overdue notices for this user type.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/checkmarc.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/checkmarc.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/checkmarc.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/checkmarc.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,7 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC Check<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC Check</h1>
+<p>Once you have completed the process of setting up your MARC tag structure (MarcTagstruct) and checked your MARC to Koha mapping (Koha2MarcLinks), click on this link to activate a small program that checks for major errors in your MARC setup.</p>
+
+<p>This MARC check does not guarantee that you will like the first results of your efforts to set up your MARC displays, etc. -- it simply checks for major errors. You will probably revise your MARC setup several times before you are completely pleased with it. Be sure to run checkmarc after every revision.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/currency.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/currency.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/currency.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/currency.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,7 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Currencies administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Currencies administration</h1>
+<p>Define the currencies you deal with here.</p>
+
+<p>You should at least define your local currency here, giving it a name (like US DOLLAR or EURO) and setting the "rate" at 1. If you do business with vendors who charge in a different currency, enter a name for that currency (e.g. PESO) and set the approximate exchange rate compared to your currency. (Note: names are limited to 10 characters or less.) The exchange rate is used to calculate the remain balances in your materials budgets when you purchase materials using "normal" acquisitions.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/holdings_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/holdings_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/holdings_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/holdings_subfields_structure.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,33 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : This section is not implemented anymore-- will  be depreceated --- Zebra indexing sets these fields</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
+<li>hidden : You can choose whether this field will show in opac, intranet or editor separately. For editor an extra choice is to display the field collapsed.</li>
+
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>link : If you enter a field/subfield here (200b), a little glass appears after the subfield. If the user clic on the glass, a search is done on the DB for the field/subfield with the same value. Can be used for 2 main topic : 
+	<ul>
+		<li>on a field like author (200f in UNIMARC), put 200f here, you will be able to see all biblios with the same author</li>
+		<li>on a field that is a link (4xx) to reach another biblio. For example, put 011a in 464$x, will find the serial that was previously with this issn. With the 4xx pligin, you get a powerful tool to manage biblios connected to biblios</li>
+	</ul>
+</li>
+</ul>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/holdingstagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/holdingstagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/holdingstagstructure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/holdingstagstructure.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,26 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
+<li>hidden : means that the field is managed, but NOT shown in opac. It's usually for internal fields</li>
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>link : useless for instance</li>
+</ul>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/issuingrules.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/issuingrules.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/issuingrules.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/issuingrules.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,20 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Issuing rules<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Issuing rules</h1>
+<p>Issuing rules deals with 2 topics :</p>
+<ul>
+	<li>Issuing length and quantity : they say how many items and how long a borrower category can issue for an itemtype </li>
+	<li>Overdue charges : they are based on the item type and borrower type. These charges are defined on this page.</li>
+</ul>
+<p>Itemtypes and borrower categories must be defined before issuing rules are defined. Your defined items types and borrower categories are then displayed in a grid on this page.</p>
+
+<h2>Issuing length and quantity</h2>
+<p>Each box in the grid contains 2 numbers, separated by commas, defining how many days a given borrower type can issue how many material. For example : 21,5 means the borrower can issue up to 5 books for up to 21 days</p>
+<p>The <b>*</b> have a specific meaning. They mean "any". If you set 21,5 for itemtype=*, borrower category=student, branch=main, then a student can't issue more than 5 items of ANY item type. This "any" box is cumulative with other boxes. It means that 21,5 as itemtype=book, 14,2 as itemtype=CD and 30,6 as itemtype=* (with category=student) means a student can issue up to 5 books, up to 2 CD but a maximum of 6 items (books or CD). In this case the "30 days" in itemtype=* is discarded and the issuing length is calculated on the exact itemtype</p>
+
+<h2>Overdue charges</h2>
+<p>Each box in the grid contains three numbers separated by commas, defining the fine, how many days overdue the item must be before the fine is assessed and a first notice prepared (the "grace period"), and how many days after that the fine is assessed again and a second notice sent. For example, if you charge adults 1 dollar (or euro, or whatever currency) for overdue videos after three days and add another dollar charge after another five days, put "1,3,5" in the box in the grid that aligns with "Adult" and "Video." If you charge adults 25 cents for overdue fiction books after a grace period of seven days and repeat the charge seven days later, then the entry in the corresponding box in the grid would be ".25,7,7". After the first and second notice are given, Koha prepares a "final notice" after the number of days set by the final number in the grid and sets the charge to the maximum, which is 5.</p>
+
+<p>(Note : fines are calculated by the fines2.pl script, located in misc directory. Ask your system administrator to put this script in crontab, after midnight, to have fines calculated every night.)</p>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/items_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/items_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/items_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/items_subfields_structure.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,57 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
+<li>hidden : allows you to select from 19 possible visibility conditions, 17 of which are implemented. They are the following:</li>
+<code><br />
+( ! means 'not visible' or in the case of Collapsed 'not
+Collapsed')
+<br /><br />
+  -9 => Future use<br/>
+  -8 =>  Flag<br/>
+  -7 =>  OPAC !Intranet !Editor  Collapsed<br/>
+  -6 =>  OPAC  Intranet !Editor !Collapsed<br/>
+  -5 =>  OPAC  Intranet !Editor  Collapsed<br/>
+  -4 =>  OPAC !Intranet !Editor !Collapsed<br/>
+  -3 =>  OPAC !Intranet  Editor  Collapsed<br/>
+  -2 =>  OPAC !Intranet  Editor !Collapsed<br/>
+  -1 =>  OPAC  Intranet  Editor  Collapsed<br/>
+   0 =>  OPAC  Intranet  Editor !Collapsed<br/>
+   1 => !OPAC  Intranet  Editor  Collapsed<br/>
+   2 => !OPAC !Intranet  Editor !Collapsed<br/>
+   3 => !OPAC !Intranet  Editor  Collapsed<br/>
+   4 => !OPAC  Intranet  Editor !Collapsed<br/>
+   5 => !OPAC !Intranet !Editor  Collapsed<br/>
+   6 => !OPAC  Intranet !Editor !Collapsed<br/>
+   7 => !OPAC  Intranet !Editor  Collapsed<br/>
+   8 => !OPAC !Intranet !Editor !Collapsed<br/>
+   9 => Future use<br/>
+</code>
+
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>link : If you enter a field/subfield here (200b), a little glass appears after the subfield. If the user clic on the glass, a search is done on the DB for the field/subfield with the same value. Can be used for 2 main topic : 
+	<ul>
+		<li>on a field like author (200f in UNIMARC), put 200f here, you will be able to see all biblios with the same author</li>
+		<li>on a field that is a link (4xx) to reach another biblio. For example, put 011a in 464$x, will find the serial that was previously with this issn. With the 4xx pligin, you get a powerful tool to manage biblios connected to biblios</li>
+	</ul>
+</li>
+</ul>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/itemstagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/itemstagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/itemstagstructure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/itemstagstructure.tmpl	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,26 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
+<li>hidden : means that the field is managed, but NOT shown in opac. It's usually for internal fields</li>
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>link : useless for instance</li>
+</ul>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/itemtypes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/itemtypes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/itemtypes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/itemtypes.tmpl	26 Mar 2007 02:19:22 -0000	1.4.2.1
@@ -0,0 +1,20 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Item types management<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Item types management</h1>
+<p>You can define as many itemtypes as you want.</p>
+
+<p>The item types are the "categories" into which your library items fall. For instance, you probably want to have videocassettes in a different category from non-fiction books, and mysteries in a different category from children's picture books. If you already are using a commercial ILS, you almost certainly already have all of your materials divided up into such categories. Now you need to tell Koha what your categories are.</p>
+
+<p>The itemtype code is limited to four characters. This code is rarely displayed by Koha; instead the description of the type will be what users see.</p>
+
+<p>"Rental charge" is any amount you might charge to users for borrowing items of a certain type (like videos).</p>
+
+<p>"Renewals allowed" says how many times an items of this type may be renewed.</p>
+
+<p>Item types are useful for many things, and <b>very</b> important in controlling how Koha works :</p>
+<ul>
+    <li>Borrowers can search on itemtypes</li>
+    <li>Issuing rules are set for item types (and for borrower types / branches)</li>
+</ul>
+<p>Setting up item types is one of the first things you should do after installing the Koha software.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/koha2marclinks.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/koha2marclinks.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/koha2marclinks.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/koha2marclinks.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,13 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Koha 2 MARC links<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Koha 2 MARC links</h1>
+<p>This page provides a simplified way to map your MARC tags and subfields to the non-MARC Koha database tables <b>for default biblio framework</b>. This can also be done while setting the MARC tag structure, but it is easier to see the relationship between the MARC database and the Koha database here.</p>
+
+<p>The pull-down menu lists all the Koha tables that can receive values from the MARC records. The columns from each table are listed below the pull-down menu.</p>
+
+<p>Do not expect to have every Koha table.column mapped to a MARC subfield. Some (such as biblionumber, biblioitemnumber, and itemnumber) are values generated by Koha and will probably be automatically mapped. Others are flags which are set in the course of normal circulation activities and will contain information that is not part of your MARC record.</p>
+
+<p>This is a one-to-one mapping. In other words, a MARC tag/subfield can be mapped to one, and only one, Koha table.column.</p>
+
+<p>MARC data that is not mapped to a Koha table does not disappear -- it is simply not available for display on circulation screens and on some search results screens.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/marc_subfields_structure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/marc_subfields_structure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/marc_subfields_structure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/marc_subfields_structure.tmpl	26 Mar 2007 02:19:22 -0000	1.3.2.1
@@ -0,0 +1,57 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
+<li>hidden : allows you to select from 19 possible visibility conditions, 17 of which are implemented. They are the following:</li>
+<code><br />
+( ! means 'not visible' or in the case of Collapsed 'not
+Collapsed')
+<br /><br />
+  -9 => Future use<br/>
+  -8 =>  Flag<br/>
+  -7 =>  OPAC !Intranet !Editor  Collapsed<br/>
+  -6 =>  OPAC  Intranet !Editor !Collapsed<br/>
+  -5 =>  OPAC  Intranet !Editor  Collapsed<br/>
+  -4 =>  OPAC !Intranet !Editor !Collapsed<br/>
+  -3 =>  OPAC !Intranet  Editor  Collapsed<br/>
+  -2 =>  OPAC !Intranet  Editor !Collapsed<br/>
+  -1 =>  OPAC  Intranet  Editor  Collapsed<br/>
+   0 =>  OPAC  Intranet  Editor !Collapsed<br/>
+   1 => !OPAC  Intranet  Editor  Collapsed<br/>
+   2 => !OPAC !Intranet  Editor !Collapsed<br/>
+   3 => !OPAC !Intranet  Editor  Collapsed<br/>
+   4 => !OPAC  Intranet  Editor !Collapsed<br/>
+   5 => !OPAC !Intranet !Editor  Collapsed<br/>
+   6 => !OPAC  Intranet !Editor !Collapsed<br/>
+   7 => !OPAC  Intranet !Editor  Collapsed<br/>
+   8 => !OPAC !Intranet !Editor !Collapsed<br/>
+   9 => Future use<br/>
+</code>
+
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>link : If you enter a field/subfield here (200b), a little glass appears after the subfield. If the user clic on the glass, a search is done on the DB for the field/subfield with the same value. Can be used for 2 main topic : 
+	<ul>
+		<li>on a field like author (200f in UNIMARC), put 200f here, you will be able to see all biblios with the same author</li>
+		<li>on a field that is a link (4xx) to reach another biblio. For example, put 011a in 464$x, will find the serial that was previously with this issn. With the 4xx pligin, you get a powerful tool to manage biblios connected to biblios</li>
+	</ul>
+</li>
+</ul>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/marctagstructure.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/marctagstructure.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/marctagstructure.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/marctagstructure.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,26 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- MARC tag structure administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>MARC tag structure administration</h1>
+<p>Koha allows you to specify which MARC tags you want to use and which you want to ignore. When you downloaded and installed Koha, you also got the entire list of MARC21 tags and subfields in current use. Now you need to use the administration page to edit this list and tell Koha which tags you want to use and how you want to use them.</p>
+<p>You can define as the marc tag structure for each biblio framework you have defined</p>
+
+<p>If you are CERTAIN that you will never use a MARC tag, then you can delete it, but since this will not result in any appreciable improvement in performance, it is probably better to leave it. There will be tags you want to add, however. If you are using older MARC tags that are not in the list of tags supplied with Koha, then use the MARC tag structure administration page to add them. Similarly, you will probably need to add the holdings tag you currently use, or at least check the subfield structure of the 852 tag if you use it for holdings.</p>
+
+<p>Editing the SubFields from the MARC tag structure page is very time-consuming, but also very important; be sure to click the subfield link for each tag in your MARC tag structure.</p>
+<p>For each subfield you can set :</p>
+<ul>
+<li>repeatable : wether it can be repeated or not. If it can be repeated, separate the values by a | in the MARC editor when you want to have the subfield twice</li>
+<li>Mandatory : wether the field is mandatory or not. If mandatory, the cataloger can't validate the biblio if the subfield is empty.</li>
+<li>Search also : a list of field that Koha will also search on when the user do a search on the subfield</li>
+<li>Koha link : <b>very important</b>. Koha is multi-MARC compliant. So, it does not know what the 245$a means, neither what 200$f (those 2 fields being both the title in MARC21 and UNIMARC !). So, in this list you can "map" a MARC subfield to it's meaning. Koha constantly maintains consistency between a subfield and it's meaning. When the user want to search on "title", this link is used to find what is searched (245 if you're MARC21, 200 if you're UNIMARC).</li>
+<li>Text for librarian : what appears before the subfield in the librarian interface</li>
+<li>Text for OPAC : what appears before the field in the OPAC. If empty, the text for librarian is used instead</li>
+<li>Managed in tab : deals with the tab where the subfield is shown. Ignore means that the subfield is not managed. All subfields of a given field must be in the same tab or ignored : 1st it's more logic, 2nd, Koha would be confused to repeat repeatable fields otherwise !!!</li>
+<li>hidden : means that the field is managed, but NOT shown in opac. It's usually for internal fields</li>
+<li>URL : if checked, the subfield is an URL, and can be clicked</li>
+<li>Auth value : means the value is not free, but in the authorised value list of the selected type</li>
+<li>thesaurus : means that the value is not free, but can be searched in authority/thesaurus of the selected category</li>
+<li>plugin : means the value is calculated or managed by a plugin. Plugins can do almost anything. For example, in UNIMARC there are plugins for every 1xx fields that are coded fields. The plugin is a huge help for cataloger ! There are also two plugins (unimarc_plugin_210c and unimarc_plugin_225a that can "magically" find the editor from an ISBN, and the collection list for the editor)</li>
+<li>link : useless for instance</li>
+</ul>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/printers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/printers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/printers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/printers.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,9 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Printer Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Printer Administration</h1>
+<p>If you are going to be using a printer (or several printers) that are attached to your Koha server for producing statistical and operations reports, then you need to give each printer a name and tell Koha how to access it. You do this by telling Koha which print queue to use.</p>
+
+<p>(In linux, each printer configuration in your printcap file defines a print queue. The default print queue is "lp," but if you use more than one printer you will have other queues, probably with names like "text" or "postscript." Tell Koha which printer queue(s) you want to use for printing reports directly from the server.)</p>
+
+<p>Note that you can always print Koha screens directly to a printer attached to your workstation just by using your web browser's Print function.</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/stopwords.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/stopwords.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/stopwords.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/stopwords.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,9 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Stop word administration page<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Stop word administration page</h1>
+<p>Here you should list all of the words you wish Koha to ignore when performing catalog searches or building the keyword index.</p>
+
+<p>Normally, you will not want Koha to save keyword references to articles like "The" and "A" and other very common words. Saving keyword references to these words does not help to limit a search and will make the keyword index very large and "cluttered" with words that are not really useful. The "stopwords" list defines these unnecessary words for your installation.</p>
+
+<p>(Hint: If you are proficient at MySQL, it is often faster and easier to find an existing stopwords list, edit it, put it in the correct format, and use the MySQL "Load Data Infile" command to import the list into the stopwords table. Many academic libraries publish their stopwords list on the Internet, or you can ask other Koha libraries if they would share their stopword list.)</p>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/systempreferences.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/systempreferences.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/systempreferences.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/systempreferences.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,71 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- System preferences administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>System preferences administration</h1>
+<p>This page allows you to set the system preferences that control much of the basic behavior of Koha. These parameters should be set before any other parameters.</p>
+<ul>
+<li><b>acquisitions --</b> The choices are either "normal" or "simple." "Normal" sets the system to track orders and update budgeting and vendor information as you add materials to your collection. "Simple" tells Koha that you are going to add materials to the collection without tracking orders.</li>
+
+<li><b>authoritysep --</b> The separator used in authority/thesaurus. Usually " -- ". Deprecated and useless in Koha 2.2</li>
+
+<li><b>autoBarcode --</b> The barcode number to be assigned to items is automatically assigned (sequentially) by Koha if this is set to "yes" ("1" = "yes").</li>
+
+<li><b>autoMemberNum --</b> The membership number (patron card number) to be assigned to new library users is automatically assigned by Koha if this is set to "yes" ("1" = "yes").</li>
+
+<li><b>checkdigit --</b> Validity checks on membership number (patron card number): none or "Katipo" style checks. In most cases, you will choose "none" because you will be using pre-printed barcodes.</li>
+
+<li><b>dateformat --</b> Choose "metric," "us," or "iso" date format (us = mm/dd/yyyy, metric = dd/mm/yyy, ISO = yyyy/mm/dd). This controls how dates are displayed, not how they are stored in the database.</li>
+
+<li><b>gist --</b> "gist" is "GST" (Good and Sales Tax) rate. If your local tax laws require you to pay taxes on purchases from your suppliers, enter the tax rate here. Set to "0" if you are not required to pay tax.</li>
+
+<li><b>insecure --</b> The best choice is "no." If you choose "yes," users do not have to login and all information is open to anyone. Be careful if you set this to "yes!"</li>
+
+<li>
+	<p><b>ISBD --</b> Koha can display records in International Standard Bibliographic Description format. the syntax of this field is quite complex : </p>
+	<p>it's divided into blocks, that can contain a text before, X fields, each having -or not- a string before, a string after, and a text after :</p>
+	<p><b>#995|&lt;br&gt;Items :|{\n995b}{ - 995j}{/995k}|</b></p>
+	<p>means the "block" 995 has &lt;br&gt;Items : BEFORE, then fields 995b, 995j and 995k, repeated for each item (995 is an UNIMARC standard), then nothing after the block.</p>
+	<p> The # means "beginning of a block", the | is the separator of each part, the {} being used for each subfield. A subfield can have up to 3 digits BEFORE and up to 3 digits AFTER each subfield</p>
+	<p>The UNIMARC (partial) definition for ISBD is </p><i>
+	<p>#700|<label>Titre/auteur</label>|{700a}{701a}{702a}| ;
+		#200||{200a}{ [200b] }{. 200c}{ : 200e}{. 200h}{. 200i}{ / 200f}{ ; 200g}|<br/>
+		#230||{ ; 230a}|<br/>
+		#205||{ ; 205a}{ , 205b}{ = 205d}{ / 205f}{ ; 205g}|<br/>
+		#210|&lt;br/&gt;&lt;label&gt;Editeur&lt;/label&gt;|{ ; 210a}{ (210b) }{ : 210c}{, 210d}|<br/>
+		#210|(|{210e}{(210f)}{ : 210g}{, 210h}|)<br/>
+		#215|&lt;br/&gt;&lt;label&gt;&nbsp;&lt;/label&gt;|{ ; 215a}{ : 215c}{ ; 215d}{ + 215e}|<br/>
+		#225|&lt;br/&gt;&lt;label&gt;Description&lt;/label&gt;|{ (225a}{ = 225d}{ : 225e}{. 225h}{. 225i}{ / 225f}{, I225x}{ ; 225v}|)<br/>
+		#606|&lt;br/&gt;&lt;label&gt;Sujets&lt;/label&gt;|{ 606a - }|&lt;br/&gt;&lt;br/&gt;<br/>
+		#995|&lt;br&gt;Exemplaires :|{\n995b}{ - 995j}{/995k}|<br/>
+	</i></p>
+</li>
+
+<li><b>KohaAdminEmailAddress --</b> The email address that will receive requests from borrowers for modification of their records.</li>
+
+<li><b>ldapserver and ldapinfos --</b> Koha 2.0 can use Perl LDAP (Lightweight Directory Access Protocol, see http://search.cpan.org/~gbarr/perl-ldap-0.3202/lib/Net/LDAP.pod) to manage user access and privileges. To avoid a useless Perl package for libraries without ldap, all what is related to LDAP has been moved to KohaInstall/modules/C4/Auth_with_ldap.pm. Ask your system administrator to set up LDAP with Auth_with_ldap.pm (perldoc Auth_with_ldap.pm for help). Those 2 parameters are useless in 2.2 and have should not appear on a new install.</li>
+
+<li><b>LibraryName --</b> The library name or message that will be shown on the main OPAC page. You may use HTML tags to format the name. Example: Welcome to <i>Koha<br/>Free Software ILS</i></li>
+
+<li><b>marc --</b> Turn on MARC support. Set to "no" if you do not intend to use MARC records.</li>
+
+<li><b>marcflavour --</b> Your MARC flavor (MARC21 or UNIMARC). This choice tells Koha how to interpret your MARC records.</li>
+
+<li><b>maxoutstanding --</b> The maximum amount of outstanding charges a borrower may have before he/she is barred from making reserve requests. The number represents units of your local currency (e.g. "5" means $5.00, if the dollar is your local currency.)</li>
+
+<li><b>maxreserves --</b> The maximum number of reserves a member can make.</li>
+
+<li><b>noissuescharge --</b> The maximum amount of outstanding charges a borrower may have before he/she is barred from checking out items. The number represents units of your local currency (e.g. "5" means $5.00, if the dollar is your local currency.)</li>
+
+<li><b>opaclanguages --</b> Set your language preference. (Despite the name, this choice controls the language used for all Koha screens, not just the OPAC). The top language in your list will be tried first.</li>
+
+<li><b>opacthemes --</b> Set the preferred order for themes. The top theme will be tried first.</li>
+
+<li><b>printcirculationslips --</b> if set to 1, circulation "slips" are printed on your receipt printer. If set to 0, no slips are printed.</li>
+
+<li><b>suggestion --</b> If set to 1, the Suggestions feature is activated in the OPAC. This feature allows OPAC users to suggest book purchases. When a suggestion is made in the OPAC, it is assigned the status "ASKED." A librarian then manages the suggestion and can set the status to "REJECTED" or "ORDERED." When a book is ordered and has arrived in the library, the status becomes "AVAILABLE." Suggestions that are not yet "AVAILABLE" are visible to all users of the OPAC.</li>
+
+<li><b>template --</b> Preference order for screen templates. Koha comes with several different options for templates that control the look and feel of your Koha screens, and you can also write your own templates.</li>
+
+<li><b>timeout --</b> Inactivity timeout period (in seconds). If a workstation is idle for longer than this period, the user will have to login again.</li>
+
+<li><b>virtualshelves --</b> Set virtual shelves management on or off ("1" or "0"). Users can set up and manage their own "virtual bookshelves" of favorite library items if this feature is turned on.</li></ul>
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/help/admin/z3950servers.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/admin/z3950servers.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/admin/z3950servers.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/admin/z3950servers.tmpl	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,16 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: System Preferences -- Z39.50 servers administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+<h1>Z39.50 servers administration</h1>
+<p>Defines the Z39.50 servers you want Koha to search.</p>
+
+<p>Koha comes with one Z39.50 server site defined (the U.S. Library of Congress) for finding catalog records to import directly into your catalog. In this area, you can define other servers for searching.</p>
+
+<p>To add servers, you will need to know the domain name or IP address of the server, the port number to use, and the name of the database to access. This information is available for many servers worldwide by acessing the Index Data website at http://www.indexdata.dk/targettest/. All of the servers listed there accept anonymous connections. (Be sure to choose servers which deliver records in the proper MARC format for your Koha installation.)</p>
+
+<p>If you have a login name and password for other Z39.50 servers, Koha will save your user ID and password in addition to the other information it needs to make a connection. (For anonymous servers, leave the userid and password fields blank.) The other fields on the form control whether or not the server is automatically searched when you request a Z39.50 search (put a "1" in the "Checked" field) and the order in which it is checked.</p>
+
+<p>It is a good idea to be selective in choosing servers. Defining more than five or six checked servers may slow down your Z39.50 search results, even if they are queried all together.</p>
+
+<p>IMPORTANT NOTE : the z3950search will NOT work until your system administrator has not activated the z3950 client daemon on your server. The daemon is in KohaDirectory/script/z3950daemon. It should be added to rc.d to be launched during server boot.</p>
+
+<!-- TMPL_INCLUDE name="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/help/nohelp.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/help/nohelp.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/help/nohelp.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/help/nohelp.tmpl	26 Mar 2007 02:19:22 -0000	1.3.2.1
@@ -0,0 +1,7 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Online Help: No help for this topic!<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+	<div id="main-compact">
+	<h1>Online Help</h1>
+	<p>Sorry, there is no help available for this topic</p>
+	</div>
+<!-- TMPL_INCLUDE NAME="help-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/acqui-full-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/acqui-full-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/acqui-full-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/acqui-full-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1 @@
+<div id="topmenu"><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions Home</a> | <a href="/cgi-bin/koha/acqui/lateorders.pl">Late Orders</a> | <a href="/cgi-bin/koha/acqui/histsearch.pl">History Search</a></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/acqui-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/acqui-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/acqui-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/acqui-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1 @@
+<div id="topmenu"><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging Home</a> | <a href="/cgi-bin/koha/tools/import.pl">MARC Import</a> | <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/acquisitions-bottom.inc	26 Mar 2007 02:19:22 -0000	1.15.2.1
@@ -0,0 +1,2 @@
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/includes/admin-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/admin-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/admin-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/admin-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1 @@
+<div id="topmenu"><a href="/cgi-bin/koha/admin/admin-home.pl">System Administration Home</a> | <a href="/cgi-bin/koha/admin/systempreferences.pl">System Preferences</a></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/alt_menu-serials.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/alt_menu-serials.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/alt_menu-serials.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/alt_menu-serials.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,6 @@
+    <p>
+         <a href="/cgi-bin/koha/serials/serials-home.pl">Search/Add Subscription</a>
+         <a href="/cgi-bin/koha/serials/serials-home.pl?routing=1">Create/Edit Routing List</a>
+         <a href="/cgi-bin/koha/serials/lateissues.pl">Outstanding Issues</a>
+	 <a href="/cgi-bin/koha/serials/claims.pl">Claims</a>
+    </p>

Index: koha-tmpl/intranet-tmpl/default/en/includes/authorities-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/authorities-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/authorities-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/authorities-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,20 @@
+<script language="JavaScript" type="text/javascript">
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function addauthority() {
+	X = document.forms[0].authtype.value;
+	window.location="/cgi-bin/koha/authorities/authorities.pl?nonav=<!-- TMPL_VAR NAME="nonav" -->&index=<!-- TMPL_VAR NAME="index" -->&authtypecode="+X;
+}
+function searchauthority() {
+	X = document.forms[0].authtype2.value;
+	Y = document.forms[0].value.value;
+	window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=all";
+}
+</script>
+
+<div id="topmenu">
+	<form><input type="hidden" name="nonav" value="<!-- TMPL_VAR NAME="nonav" -->">
+	 <select name="authtype" id="authtype"><!-- TMPL_LOOP name="authtypesloop" --><option value="<!-- TMPL_VAR name="value" -->"<!-- TMPL_IF name="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR name="authtypetext" --></option><!-- /TMPL_LOOP --></select>
+	<input type="button" class="submit" value="Add Authority" onclick="addauthority(); return false;" /></form></div>

Index: koha-tmpl/intranet-tmpl/default/en/includes/blank.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/blank.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/blank.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/blank.css	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,62 @@
+a:link {
+	color : #000066;
+	text-decoration: none;
+}
+
+a:visited {
+	color : #000066;
+	text-decoration: none;
+}
+
+a:hover {
+	color : #993300;
+	text-decoration: none;
+}
+
+body {
+	background-color : #FFF;
+	font-size : 14px;
+	margin : 0px 0px 0px 0px;
+	padding : 0px;
+}
+
+caption {
+	color : #000000;
+	font-weight : bold;
+	margin-top : 5px;
+	text-align : left;
+}
+
+div.table {
+	font-weight: normal;
+}
+
+h3 {
+	color : #000000;
+	font-size : 14px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+table {
+	border-collapse : collapse;
+	border : 0px solid #cccccc;
+
+}
+
+td, th {
+	border : 0px solid #cccccc;
+	padding : 2px;
+	}
+	
+th {
+	text-align : left;
+	}
+	
+
+#main {
+	background-color : #FFF;
+	border-left : 0px solid #CCCC99;
+	position : relative;
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-bottom.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,19 @@
+<br clear="all">
+<p> &nbsp; </p>
+
+<div class="center">
+<a href="/cgi-bin/koha/mainpage.pl">Home</a> ||
+<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a> ||
+<a href="/cgi-bin/koha/members/members-home.pl">Users</a> ||
+<a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a> ||
+<a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a> ||
+<a href="/cgi-bin/koha/reports-home.pl">Reports</a> ||
+<a href="/cgi-bin/koha/admin-home.pl">Parameters</a> ||
+<a href="/cgi-bin/koha/about.pl">About</a> || 
+<a href="javascript: Help('circulation-hlp')">Help</a>
+</div>
+<script language="JavaScript" type="text/javascript">
+	document.getElementById('barcode').focus();
+</script>
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/borrcirculation-top.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,384 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>KOHA: INTRANET: Circulation</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
+
+<link rel="stylesheet" type="text/css" href='<!-- TMPL_VAR name="themelang" -->/includes/common-style.css'>
+<link rel="stylesheet" type="text/css" href='<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css'/>
+
+<!-- *********** This links are to manage the calendar. *********** -->
+<script type="text/javascript" src='<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar.js'></script>
+<script type="text/javascript" src='<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-es.js'></script>
+<script type="text/javascript" src='<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-setup.js'></script>
+<!-- ************************************************************** -->
+
+<script language="JavaScript" type="text/javascript">
+	/* Devuelve true si el explorador es Internet Explorer */
+	var IE = document.all?true:false;
+
+	/* Pop up windows handlers and control variables */
+	var issueWindow;
+	var issuecount = <!-- TMPL_VAR NAME="ISSUECOUNT" -->;
+	var currentCount = <!-- TMPL_VAR NAME="CURRENTCOUNT" -->;
+	var todayIssuesWindow;
+	var currentIssuesWindow;
+
+	/* gives the main window a name */
+	window.name = "main";
+
+	/* Declare an array to store the last issues */
+	var issuedBarcodes = new Array();
+
+	// Captura el evento onkeypress para cualquier navegador
+	if (document.layers) { // Netscape
+		document.captureEvents(Event.KEYDOWN);
+	    document.onkeydown = captureShortKey;
+		document.captureEvents(Event.MOUSEMOVE);
+	    document.onmousemove = captureMousePosition;
+	} else if (document.all) { // Internet Explorer
+	    document.onkeydown = captureShortKey;
+	    document.onmousemove = captureMousePosition;
+	} else if (document.getElementById) { // Netcsape 6
+	    document.onkeydown = captureShortKey;
+	    document.onmousemove = captureMousePosition;
+	}
+
+	function captureShortKey(e) {
+		if (IE) {
+			if (event.ctrlKey) { 
+				switch(event.keyCode) {
+				    case 50: {
+							   openQuickSearch()
+							   break;
+							  }
+					case 52: { 
+							   if (document.getElementById('internalloan').checked) {	
+								   document.getElementById('internalloan').checked = false; 
+                               } else {
+								   document.getElementById('internalloan').checked = true;
+							   }
+							   break;
+							  }
+					case 53: { 
+							   window.location.href = "/cgi-bin/koha/circ/returns.pl"; 
+							   break;
+							  }
+					case 54: {
+								showCurrentIssuesWindow();
+								currentIssuesWindow.focus();
+								break;
+							  }
+					case 55: { 
+								sendBarcodesToPrint();
+								break;
+							  }	
+					case 56: {
+								showTodayIssuesWindow();
+								todayIssuesWindow.focus(); 
+								break;
+							  }
+					case 57: {
+							   window.location.href = "/cgi-bin/koha/circ/circulation.pl"; 
+							   break;
+							  }
+				}
+			}			
+		} else {
+			if (e.ctrlKey) { 
+				switch(e.keyCode) {
+				    case 50: {
+							   openQuickSearch()
+							   break;
+							  }
+					case 52: { 
+							   if (document.getElementById('internalloan').checked) {	
+								   document.getElementById('internalloan').checked = false; 
+                               } else {
+								   document.getElementById('internalloan').checked = true;
+							   }
+							   break;
+							  }
+					case 53: { 
+							    window.location.href = "/cgi-bin/koha/circ/returns.pl"; 
+							    break;
+							  }
+					case 54: {
+								showCurrentIssuesWindow();
+								currentIssuesWindow.focus();
+								break;
+							  }
+					case 55: { 
+								sendBarcodesToPrint();
+								break;
+							  }	
+					case 56: {
+								showTodayIssuesWindow();
+								todayIssuesWindow.focus(); 
+								break;
+							  }
+					case 57: {
+							   window.location.href = "/cgi-bin/koha/circ/circulation.pl"; 
+							   break;
+							  }
+				}			
+			}
+		}
+	}
+
+	function closeAll() {
+		issueWindow.close();		
+		todayIssuesWindow.close();
+		currentIssuesWindow.close();
+	}
+
+	/* Add a barcode to the barcodes array */
+	function addBarcode(aBarcode) {
+		issuedBarcodes[issuedBarcodes.length] = aBarcode;
+	}
+
+	/* Returns true if the barcode is stored into the barcodes array */
+	function isLastIssue(aBarcode) {
+		var ok = false;
+		var i = 0;
+		while ((!(ok)) && (i < issuedBarcodes.length)) {
+			if (issuedBarcodes[i] == aBarcode) {
+				ok = true;
+			}
+			i++;
+		}
+		return ok;
+	}
+
+	/* Empty the barcodes array */
+	function emptyBarcodes() {
+		issuedBarcodes = new Array();
+	}
+
+	/* Returns an array with the last issues. */
+	function lastIssues() {
+		return issuedBarcodes;
+	}
+
+	/* Send the barcodes array to print */
+	function sendBarcodesToPrint() {
+		if (issuedBarcodes.length == 0) {
+			alert("There are no issues without printed circulation proof.");
+		} else {
+			var barcodes = issuedBarcodes.join("::");
+			emptyBarcodes();
+			window.open('/cgi-bin/koha/circ/print-todayissues.pl?hiddenBarcodes=' + barcodes + ';borrowernumber=<!-- TMPL_VAR NAME="BORROWERNUMBER" -->', 'PrintIssues');
+		}
+	}
+
+	function showIssueItemWindow(aForm) {
+		if (!window.focus) {
+			return true;
+		} else {
+			issueWindow = window.open('', 'issueWindow', 'width=600,height=400,toolbar=false,scrollbars=yes,resizable=no');
+			aForm.target = 'issueWindow';
+			return true;	
+		}
+	}
+
+	function issueReserve(barcode, borrowernumber, reserveID) {
+
+		var issueForm = document.getElementById('issueItemForm');
+		issueForm.barcode.value = barcode;
+		issueForm.reserveid.value = reserveID;
+		issueForm.action = '/cgi-bin/koha/circ/borrowercirculation.pl';
+//		issueWindow = window.open('', 'issueWindow', 'width=600,height=400,toolbar=false,scrollbars=yes,resizable=no');
+//		issueForm.target = 'issueWindow';
+		issueForm.submit();
+	}
+
+	function refreshReserveTable(reserveID) {
+		var reservePanel = document.getElementById('reserve_row');
+		var reserveTable = document.getElementById('reserve_table');
+		var reserveRow = document.getElementById(reserveID);
+		reserveTable.tBodies[0].removeChild(reserveRow);
+		if (reserveTable.tBodies[0].rows.length == 1) {
+			var mainTable = document.getElementById('mainTable');
+			mainTable.tBodies[0].removeChild(reservePanel);
+		}
+	}
+
+	function showTodayIssuesWindow() {
+		todayIssuesWindow = window.open('/cgi-bin/koha/circ/todayissues.pl?borrowernumber=<!-- TMPL_VAR NAME="BORROWERNUMBER" -->', 'Prestamos',"height=480,width=640,scrollbars,resizable=no,left=" + ((mouseXMax/2) - 320) + ",top=" + ((mouseYMax/2) - 240));
+        todayIssuesWindow.focus();
+	}
+
+	function showCurrentIssuesWindow() {
+		currentIssuesWindow = window.open('/cgi-bin/koha/circ/currentissues.pl?borrowernumber=<!-- TMPL_VAR NAME="BORROWERNUMBER" -->', 'PrestamosTotales',"height=480,width=640,scrollbars,resizable=no,left=" + ((mouseXMax/2) - 320) + ",top=" + ((mouseYMax/2) - 240));
+        currentIssuesWindow.focus();
+	}
+
+	function refreshIssueCount() {
+		var issueCountObj = document.getElementById('issueCount');
+		var currentIssuesObj = document.getElementById('currentIssues');
+		issuecount = issuecount + 1;
+		currentCount = currentCount + 1;
+		var newIssueCountText = document.createTextNode(issuecount + "");		
+		issueCountObj.removeChild(issueCountObj.firstChild);
+		issueCountObj.appendChild(newIssueCountText);
+		var newCurrentIssueCountText = document.createTextNode(currentCount + "");		
+		currentIssuesObj.removeChild(currentIssuesObj.firstChild);
+		currentIssuesObj.appendChild(newCurrentIssueCountText);	
+	}
+
+	function cleanBarcodeField() {
+		document.getElementById('barcode').value = "";
+	}
+
+	function Help(tmpl) {
+		var hlpwin = window.open("/cgi-bin/koha/help/intranet-help.pl?help_template=" + tmpl,"Ayuda",'width=600,height=450,resizable=yes,toolbar=false,scrollbars=1');
+        hlpwin.focus();
+	}
+
+	function showHideItems(imageObj, panelID) {
+		var panel = document.getElementById(panelID);
+		if (panel.style.display == 'none') {
+			imageObj.src = '<!-- TMPL_VAR NAME="themelang" -->/images/' + 'less.gif'; 
+			panel.style.display = 'inline';
+		} else {
+			imageObj.src = '<!-- TMPL_VAR NAME="themelang" -->/images/' + 'more.gif';
+			panel.style.display = 'none';
+		}
+	}
+
+	function select_borrower() {
+		var list = document.getElementById('borrowerList');
+		if (list.selectedIndex == -1) {
+			alert("Select a user from the list.");
+			return false;
+		} else {
+			return true;
+		}
+	}
+
+	function openWindow(targeturl, windowname) {
+		newwin = window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+	}
+
+	function setFocus() {
+		document.getElementById('barcode').focus();
+	}
+
+	function showNote(formID) {
+		var panel = document.getElementById(formID);
+		panel.style.display = 'inline';
+		panel.style.top = mouseY;
+	    panel.style.left = mouseX - 250;
+	}
+
+	function hideNote(formID) {
+		var panel = document.getElementById(formID);
+		panel.style.display = "none";
+	}
+
+	var mouseXMax = 0;
+	var mouseYMax = 0;
+	var mouseX = 0;
+	var mouseY = 0;
+	function captureMousePosition(e) {
+	    if (document.layers) {
+		    mouseX = e.pageX;
+			mouseY = e.pageY;
+	        mouseXMax = window.innerWidth + window.pageXOffset;
+		    mouseYMax = window.innerHeight + window.pageYOffset;
+	    } else if (document.all) {
+		    mouseX = window.event.x + document.body.scrollLeft;
+	        mouseY = window.event.y + document.body.scrollTop;
+	        mouseXMax = document.body.clientWidth + document.body.scrollLeft;
+	        mouseYMax = document.body.clientHeight + document.body.scrollTop;
+	    } else if (document.getElementById) {
+	        mouseX = e.pageX;
+		    mouseY = e.pageY;
+	        mouseXMax = window.innerWidth + window.pageXOffset;
+	        mouseYMax = window.innerHeight + window.pageYOffset;
+	    }
+//		window.status = "mouseX=" + mouseX + ", mouseY=" + mouseY + ", mouseXMax=" + mouseXMax + ", mouseYMax=" + mouseYMax;
+	}
+
+
+	/* Creates all the structures to deal with all diferents kinds of holidays */
+	var week_days = new Array();
+	var holidays = new Array();
+	var exception_holidays = new Array();
+	var day_month_holidays = new Array();
+
+	<!-- TMPL_LOOP NAME="WEEK_DAYS_LOOP" -->
+		week_days['<!-- TMPL_VAR NAME="KEY" -->'] = {title:'<!-- TMPL_VAR NAME="TITLE" -->', 
+													 description:'<!-- TMPL_VAR NAME="DESCRIPTION" -->'};
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_LOOP NAME="HOLIDAYS_LOOP" -->
+		holidays['<!-- TMPL_VAR NAME="KEY" -->'] = {title:'<!-- TMPL_VAR NAME="TITLE" -->', 
+													description:'<!-- TMPL_VAR NAME="DESCRIPTION" -->'};
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_LOOP NAME="EXCEPTION_HOLIDAYS_LOOP" -->
+		exception_holidays['<!-- TMPL_VAR NAME="KEY" -->'] = {title:'<!-- TMPL_VAR NAME="TITLE" -->', 
+															  description:'<!-- TMPL_VAR NAME="DESCRIPTION" -->'};
+	<!-- /TMPL_LOOP -->
+	<!-- TMPL_LOOP NAME="DAY_MONTH_HOLIDAYS_LOOP" -->
+		day_month_holidays['<!-- TMPL_VAR NAME="KEY" -->'] = {title:'<!-- TMPL_VAR NAME="TITLE" -->',
+															  description:'<!-- TMPL_VAR NAME="DESCRIPTION" -->'};
+	<!-- /TMPL_LOOP -->
+
+	var dateToday = new Date();
+	var dayToday = dateToday.getDate();
+	var monthToday = dateToday.getMonth() + 1;
+	var yearToday = dateToday.getFullYear();
+
+
+	function openQuickSearch() {
+	    var qs_window = window.open('/cgi-bin/koha/circ/quicksearch.pl','_blanck','height=325,width=550,status=yes,toolbar=no,menubar=no,location=no,resizable=yes,scrollbars=yes,top=100,left=100');
+        qs_window.focus();
+	
+	}
+</script>
+
+<style type="text/css">
+.circulation {
+	background-color: #be6170;
+	color:#FFFFFF;
+	background-image:none;
+	text-decoration: normal;
+	font-weight: bold;
+	}
+a.circulation:hover {
+	background-color: #be6170;
+	color: #FFFFFF;
+	text-decoration: normal;
+	font-weight: bold;
+	}
+.circulation-reserves {
+	background-color: #BE619E;
+	color:#FFFFFF;
+	background-image:none;
+	text-decoration: normal;
+	font-weight: bold;
+	}
+</style>
+</head>
+
+<body onload="javascript: setFocus()" onunload="javascript: closeAll()"
+      onkeydown="javascript: captureShortKey()">
+
+<!-- MENUS -->
+<div id="menubar">
+	<span class="koha"><a class="home" href="/cgi-bin/koha/mainpage.pl">Koha</a></span>
+	<a class="catalogue" href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a> <a class="circulation"  href="/cgi-bin/koha/circ/circulation.pl">Circulation</a> <a class="members" href="/cgi-bin/koha/members/members-home.pl">Users</a> <!-- <a class="authority" href="/cgi-bin/koha/authorities/authorities-home.pl">Autoridades</a> --> <a class="reports" href="/cgi-bin/koha/reports-home.pl">Reports</a> <a class="acquisition" href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a> <a class="parameters" href="/cgi-bin/koha/admin-home.pl">Parameters</a> <a class="about" href="/cgi-bin/koha/about.pl">About</a>
+</div>
+<div id="submenu">
+	<span class="koha">Options &gt;&gt;&nbsp;&nbsp;</span>
+	<a href="/cgi-bin/koha/circ/circulation.pl" class="submenu">Issues</a> <a href="/cgi-bin/koha/circ/returns.pl" class="submenu2">Returns</a> <a href="/cgi-bin/koha/circ/branchtransfers.pl" class="submenu">Library Transfers</a>
+    <a class="submenu" href="javascript: Help('circulation-hlp')">Help</a>
+</div>
+
+<!-- TMPL_IF NAME="loggedinusername" -->
+    <p align="left">Administrator: <!-- TMPL_VAR NAME="loggedinusername" --> [<a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log out</a>]</p>
+<!-- TMPL_ELSE -->
+    <p align="left"><a href="/cgi-bin/koha/opac-user.pl">Log in</a> to Koha</p>
+<!-- /TMPL_IF -->

Index: koha-tmpl/intranet-tmpl/default/en/includes/circ-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/circ-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/circ-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/circ-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,6 @@
+<div id="topmenu"><a class="button" href="circulation.pl?borrnumber=<!-- TMPL_VAR name="borrowernumber" -->&amp;branch=<!-- TMPL_VAR name="branch" -->&amp;printer=<!-- TMPL_VAR name="printer" -->&amp;print=yes">
+				Circulation Home</a> | <a class="button" href="returns.pl">
+				Returns</a> | <a class="button" href="branchtransfers.pl">
+				Transfers</a> | <form method="post" action="/cgi-bin/koha/circ/circulation.pl">
+
+</form></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/colors.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/colors.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/colors.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/colors.css	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,437 @@
+a:hover {
+	color : #009933;
+}
+
+a.delete {
+	background-color : #CC3300;
+	color : #CCCCCC;
+}
+
+a.delete:hover {
+	background-color : #999999;
+	color : #CCCCCC;
+}
+
+a.edit {
+	background-color : Gray;
+	color : #330099;
+}
+
+a.edit:hover {
+	background-color : #CCCCCC;
+	color : #444444;
+}
+
+a:link, a:visited {
+	color : #330099;
+}
+
+a.current:link {
+	background-color : transparent;
+	color : #330099;
+}
+
+a.nav:link, a.nav:visited {
+	background-color : #FAFAFA;
+	color : #3366CC;
+}
+
+a.pages:link, a.pages:visited {
+	background-color : #E6E6E6;
+	color : #330099;
+}
+
+a.current:visited, a.current:link, a.current:visited {
+	background-color : transparent;
+	color : #330099;
+}
+
+a.current:hover, a.nav:hover, a.pages:hover {
+	background-color : #CCFF00;
+}
+
+a.nav:active, a.current:active {
+	background-color : #99CC00;
+	color : #FFFF99;
+}
+
+a:active.pages {
+	background-color : #99CC00;
+	color : #FFFF99;
+}
+
+body {
+	background-color : #FFFFFF;
+	color : #000000;
+}
+
+div#help .loggedin a {
+	background-color : transparent;
+	color : #6666CC;
+	text-decoration : underline;
+}
+
+div#help .loggedin, #topmenu {
+	color : #666699;
+}
+
+div#help .loggedinusername {
+	color : #7EABD6;
+}
+
+div#help a {
+	background-color : transparent;
+	color : #6666CC;
+}
+
+div.compact th {
+	border-bottom : 1px solid #666666;
+	border-left : 1px solid #D9D9D9;
+	border-right : 1px solid #666666;
+	border-top : 0px;
+}
+
+div.data table col, div.data-main table col {
+	background-color : #CCCCCC;
+}
+
+div.data table td, div.data-main table td {
+	background-color : #E6E6E6;
+	border-bottom : 1px solid #B2B2B2;
+	border-right : 1px solid #B2B2B2;
+}
+
+div.data table th, div.data-main table th {
+	background-color : #D9D9D9;
+	border-bottom : 1px solid #B2B2B2;
+	border-left : 1px solid #666666;
+	border-right : 1px solid #B2B2B2;
+}
+
+div.data table, div.data-main table, div.tabitem li a.here, #submenu {
+	background-color : #CBCBCB;
+}
+
+div.data-main table td, div.data {
+	background-color : #F0F0F0;
+}
+
+table tr.highlight td {
+	background-color : #FAFAFA;
+}
+
+div.data-main table th, td.onissue, table.editing tr:hover td {
+	background-color : #E4E4E4;
+}
+
+div.details {
+	border-bottom : 1px solid #666666;
+}
+
+div.details dt {
+	border-bottom : 1px solid #CBCBCB;
+}
+
+div.details td, div.form td, div.compact td {
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 1px solid #D9D9D9;
+}
+
+div.error .cancel {
+	background-color : #CC3300;
+}
+
+div.error h3 {
+	color : #990000;
+}
+
+div.error, div.notice {
+	background-color : #FFFF99;
+	border : 1px dashed #CC3300;
+}
+
+div.help {
+	background-color : #D9D9D9;
+	border : 0;
+}
+
+div.help h3 {
+	background-color : #E6E6E6;
+	border-bottom : #B2B2B2;
+}
+
+div.items td {
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 1px solid #D9D9D9;
+	border-right : 1px solid #D9D9D9;
+	border-top : 1px solid #D9D9D9;
+}
+
+div.items th {
+	background-color : #E6E6E6;
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 1px solid #D9D9D9;
+	border-right : 0px;
+	border-top : 1px solid #D9D9D9;
+	color : #444444;
+}
+
+div.members th {
+	background-color : #E6E6E6;
+	border-bottom : 1px solid #D9D9D9;
+	border-right : 1px solid #D9D9D9;
+}
+
+div.menu th {
+	background-color : #E6E6E6;
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 1px solid #D9D9D9;
+}
+
+div.tabitem ul li {
+	border-right : 1px solid #4C4C4C;
+}
+
+form.compact input {
+	color : #FFFFFF;
+}
+
+h3.alert {
+	background-color : #FFFF99;
+	color : #CC3300;
+}
+
+h3.title, h4.subtitle, h5.author {
+	background-color : #E6E6E6;
+}
+
+input.focus {
+	background-color : #FFFFFF;
+	border-bottom : 2px dashed #33cc00;
+}
+
+input.unfocus {
+	background-color : #FFFFFF;
+}
+
+label.required:after, sup, div.members label.focus {
+	color : #666666;
+}
+
+table {
+	background-color : #E6E6E6;
+	border-bottom : 0px solid #000000;
+	border-left : 0px solid #000000;
+}
+
+table.marc td.label {
+	color : #000000;
+}
+
+table.marc th, #submenu dl, tfoot, div.tabitem li a, tr.highlight td.onissue {
+	background-color : #D9D9D9;
+}
+
+td {
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 1px solid #CCCCCC;
+}
+
+td fieldset {
+	border : 1px solid #CCCCCC;
+}
+
+td input.delete {
+	background-color : #cc3300;
+	border : 1px outset #B2B2B2;
+	color : #E6E6E6;
+}
+
+td input.submit {
+	border : 1px outset #B2B2B2;
+	color : #E6E6E6;
+}
+
+td input.submit:active, td input.delete:active {
+	border : 1px inset #B2B2B2;
+}
+
+td.debit {
+	color : #4C4C4C;
+}
+
+td.input, div.form td, div.details td {
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 0px;
+	border-right : 0px;
+	color : #000000;
+}
+
+td.label, .form dt {
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 1px solid #D9D9D9;
+	color : #444444;
+}
+
+td.label, div.form th, div.details th {
+	background-color : #E6E6E6;
+	border-bottom : 1px solid #D9D9D9;
+	border-left : 1px solid #D9D9D9;
+	border-right : 0px;
+	border-top : 0px;
+	color : #444444;
+}
+
+td:last-child {
+	border-bottom : 1px solid #D9D9D9;
+	border-right : 0px solid #D9D9D9;
+}
+
+tfoot td, tfoot td:last-child {
+	border-bottom : 1px solid #4C4C4C;
+	border-right : 1px solid #4C4C4C;
+}
+
+th {
+	background-color : #CCCCCC;
+	border-bottom : 1px solid #000000;
+	border-right : 1px solid #000000;
+}
+
+th:last-child {
+	border-right : 0;
+}
+
+tr.highlight, td.highlight, table.marc td.data {
+	background-color : #FFFFFF;
+}
+
+.cancel {
+	background-color : #CC3300;
+	color : #FFFFCC;
+}
+
+.current {
+	background-color : #FFFFFF;
+	color : Gray;
+}
+
+.error, .overdue {
+	color : #CC3300;
+}
+
+.form dd {
+	border-bottom : 1px solid #D9D9D9;
+	color : #000000;
+}
+
+.submit {
+	background-color : #6699CC;
+	color : White;
+}
+
+#auth table td, #auth table th {
+	background-color : #D9D9D9;
+	border-bottom : 0px solid #666666;
+	border-left : 0px solid #FFFFFF;
+	border-right : 0px solid #666666;
+	border-top : 0px solid #FFFFFF;
+}
+
+#auth table td {
+	background-color: #E4E4E4;
+}
+
+#main, #main-compact {
+	background-color : #FFFFFF;
+	border-left : 1px solid #E6E6E6;
+}
+
+#menu dd {
+	border-bottom : 1px dashed #CBCBCB;
+	border-left : 1px dashed #CBCBCB;
+	border-right : 0px solid #000000;
+	border-top : 0px solid #000000;
+}
+
+#menu dt {
+	background-color : #FFFFFF;
+	border-bottom : 1px solid #CBCBCB;
+	border-left : 0px solid #CBCBCB;
+	border-right : 0px solid #000000;
+	border-top : 0px solid #000000;
+	color : #333333;
+}
+
+#menu, div#controls form, div.form, div.details, div.items, div.tabitem li a:hover, table.marc {
+	background-color : #F0F0F0;
+}
+
+#nav {
+	background-color : #B2B2B2;
+}
+
+#nav ul li {
+	background-color : #CBCBCB;
+	border-bottom : 1px solid #E6E6E6;
+	border-left : 0px solid #E6E6E6;
+	border-right : 0px solid #4C4C4C;
+	border-top : 0px solid #E6E6E6;
+}
+
+#nav ul li a:hover {
+	color : #009933;
+}
+
+#nav ul li+li {
+	border-bottom : 1px solid #E6E6E6;
+	border-left : 0px solid #E6E6E6;
+	border-right : 0px solid #4C4C4C;
+}
+
+#nav ul ul li {
+	background-color : #E4E4E4;
+	border-bottom : 1px solid #B2B2B2;
+	border-left : 0px solid #E6E6E6;
+	border-right : 0px solid #4C4C4C;
+	border-top : 0px solid #E6E6E6;
+}
+
+#nav ul ul li+li {
+	border-bottom : 1px solid #B2B2B2;
+	border-left : 0px solid #E6E6E6;
+	border-right : 0px solid #4C4C4C;
+}
+
+#nav #circ {
+	background-color : #C8EEF7;
+}
+
+#nav #patrons {
+	background-color : #D1ECE5;
+}
+
+#nav #catalog {
+	background-color : #E6FBF3;
+}
+
+#nav #cataloging {
+	background-color : #E4F3FB;
+}
+
+#nav #admin {
+	background-color : #C8EEF7;
+}
+
+#notes img {
+	border: 1px solid #CCCCCC;
+}
+
+
+#results, .results, caption, h1, h2, h3, h4, h5, h6 {
+	color : #000066;
+}
+
+#topmenu .submit, #nav .submit {
+	background-color : #7EABD6;
+}

Index: koha-tmpl/intranet-tmpl/default/en/includes/common.js.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/common.js.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/common.js.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/common.js.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,52 @@
+<script language="javascript" type="text/javascript">
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,'height=480,width=640,scrollbars,resizable');
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+
+// http://www.oreillynet.com/pub/a/javascript/2003/10/21/amazonhacks.html
+function verify_images() {
+    for (var i = 0; i < document.images.length; i++) {
+        img = document.images[i];
+        if ((img.src.indexOf('images') >= 0)) {
+			w = img.width;
+            h = img.height;
+     if ((w == 0) && (h == 0) || ((img.complete != null) && (!img.complete))) {
+               img.src = '<!-- TMPL_VAR NAME='themelang' -->/images/patron-blank.png';
+			}
+        }
+    }
+}
+
+function mainfocus() {
+		if(document.forms['mainform']){
+			document.forms['mainform'].elements[0].focus();
+		}
+	}
+</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/dictionary-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/dictionary-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/dictionary-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/dictionary-bottom.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,2 @@
+</BODY>
+</HTML>

Index: koha-tmpl/intranet-tmpl/default/en/includes/dictionary-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/dictionary-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/dictionary-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/dictionary-top.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,20 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<HTML>
+	<HEAD>
+	    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+	    <link rel="stylesheet" type="text/css" href='<!-- TMPL_VAR name="themelang"-->/includes/common-style.css'/>
+		<TITLE>Dictionary</TITLE>
+		<script type="text/javascript" language="javascript">
+		    function selectEntry(target) {
+		        
+		        if (document.dicc_form.dicc_entry.selectedIndex != -1) {
+ 					target.value = document.dicc_form.dicc_entry.value;
+					window.close();
+		        } else {
+					alert("Select an option.")
+				}
+		    }
+        </script>
+	</HEAD>
+	<BODY>
+	

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-barcodes-close.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-barcodes-close.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-barcodes-close.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-barcodes-close.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,136 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+
+
+<script type="text/javascript">
+
+var IE = document.all?true:false;
+
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function correctRange (from, to) {
+	if (from <= to) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function emptyField (field) {
+	if ((field == null) || (field == "")) {
+		return true;
+	} else {
+		return false;
+	}
+}
+
+function checkFields (aForm) {
+  var option = document.getElementById('rangeType').value;
+  if ((option == 'continuous2') || (option == 'continuous')) {
+	if (emptyField(aForm.from.value) || emptyField(aForm.to.value)) {
+		alert("Please, complete all fields");
+	    return false;
+	} else {
+		if (correctRange(aForm.from.value, aForm.to.value)) {
+			return true;			
+		} else {
+			alert("The selected range is not correct");
+			return false;
+		}
+	}
+  } else {
+	var codeCount = document.getElementById('inventaryList').options.length;
+	if (codeCount == 0) {
+		alert("Please, complete all fields"); 
+	    return false;
+	} else {
+		var inventaryList = document.getElementById('inventaryList');
+		var allCodes = '';
+	  	for (i = 0; i <= inventaryList.options.length - 1; i++) {
+			allCodes = allCodes + "'" + inventaryList.options[i].text + "',";
+	  	}
+  		allCodes = '(' + allCodes.substr(0, allCodes.length - 1) + ')';
+	  	document.getElementById('individualCodes').value = allCodes;
+	    return true;
+	}
+  }
+}
+
+function changeRange(selectBox) {
+	var option = selectBox.value;
+	var panel = document.getElementById(option);
+	
+	if  ((option == 'continuous2') || (option == 'continuous')) {
+		document.getElementById('continuous').style.display = 'inline';
+		document.getElementById('inventaryList').options.length = 0;
+		document.getElementById('individuals').style.display = 'none';
+		document.getElementById('individualCodes').value = "";
+		
+	} else {
+		document.getElementById('individuals').style.display = 'inline';
+		document.getElementById('from').value = "";
+		document.getElementById('to').value = "";
+		document.getElementById('continuous').style.display = 'none';
+		
+	}
+}
+
+function itemExists(code, list) {
+  var ok = false;
+  var listLength = list.length - 1;
+  var count = 0;
+  while (!(ok) && (count <= listLength)) {
+	if (code == list[count].value) {
+	  ok = true;
+	}
+	count = count + 1;
+  }
+  return ok;	
+}
+
+function addItem() {
+  var codeObject = document.getElementById('inventaryCode');
+  var inventaryCode = document.getElementById('inventaryCode').value;
+  var inventaryList = document.getElementById('inventaryList');
+  if (inventaryCode == "") {
+    alert('You can´t add an empty code.');
+  } else {
+    if (itemExists(inventaryCode, inventaryList.options)) {
+	  codeObject.value = "";
+  	  alert("The code is already included."); 
+    } else {  	
+	  var optionObject = new Option(inventaryCode, inventaryCode);
+  	   if (!IE) {
+	     inventaryList.add(optionObject, inventaryList.options[inventaryList.options.length]); 
+      } else {
+	    inventaryList.add(optionObject, inventaryList.options.length);
+	  }
+      codeObject.value = "";
+    }
+  }	
+}
+
+function removeItem() {
+  var inventaryList = document.getElementById('inventaryList');
+  if (inventaryList.selectedIndex == -1) {
+  	alert('You have to select a code first.');
+  } else {
+  	inventaryList.options[inventaryList.selectedIndex] = null;
+  }
+}
+
+	function addCountryCode() {
+		var panel = document.getElementById('addCountryCode');
+		panel.style.display = 'inline';
+		panel.style.top = mouseY;
+		panel.style.left = mouseX;
+	}
+</script>
+</head>
+<body onload="javascript: changeRange(document.getElementById('rangeType'))">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-close.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-close.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-close.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-close.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,43 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+<script language="JavaScript" type="text/javascript">
+<!-- Hide from old browsers
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+// end hiding -->
+</script>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-open.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-open.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-open.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-circ-open.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,5 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-addbiblio.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-addbiblio.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-addbiblio.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-addbiblio.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,16 @@
+</title>
+<!-- TMPL_IF NAME="TemplateEncoding" -->
+<meta http-equiv="Content-Type" content="text/html; charset=<!-- TMPL_VAR NAME='TemplateEncoding' -->" />
+<!-- TMPL_ELSE -->
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<!-- /TMPL_IF -->
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css">
+        <!-- TMPL_IF NAME="intranetstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetstylesheet" -->);<!-- TMPL_ELSE -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);<!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="intranetcolorstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetcolorstylesheet" -->);<!-- /TMPL_IF -->
+        @import url(<!-- TMPL_VAR NAME='themelang' -->/includes/marc-editor.css);
+</style>
+<!-- TMPL_INCLUDE NAME="common.js.inc" -->
+</head>
+
+<body >

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-calendar.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-calendar.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-calendar.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-calendar.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,52 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+<!-- Additions to enable Calendar system -->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME='themelang' -->/includes/calendar/calendar-system.css">
+<!-- End of additions -->
+<script language="JavaScript" type="text/javascript">
+<!-- Hide from old browsers
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+// end hiding -->
+</script>
+<!-- Additions to enable Calendar system -->
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-en.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-setup.js"></script>
+<!-- End of additions -->
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat-zoom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat-zoom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat-zoom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat-zoom.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,76 @@
+</title>
+<!-- TMPL_IF NAME="TemplateEncoding" -->
+<meta http-equiv="Content-Type" content="text/html; charset=<!-- TMPL_VAR NAME='TemplateEncoding' -->" />
+<!-- TMPL_ELSE -->
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<!-- /TMPL_IF -->
+<meta http-equiv="Content-Language" content="en-us" />
+<link rel="shortcut icon" href="<TMPL_VAR NAME="themelang">/includes/favicon.ico" type="image/x-icon" />
+    <!-- TMPL_IF name="opacstylesheet" -->
+<style type="text/css">
+    @import url(<!-- TMPL_VAR NAME="opacstylesheet" -->);
+</style>
+    <!-- TMPL_ELSE -->
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang" -->/includes/<!-- TMPL_VAR NAME="opaccolorstylesheet" -->" />
+<style type="text/css">
+    @import url(<!-- TMPL_VAR NAME="themelang" -->/includes/<!-- TMPL_VAR NAME="opaclayoutstylesheet" -->);
+</style>
+    <!-- /TMPL_IF -->
+<script language="JavaScript" type="text/javascript">
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable");
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+
+
+	function openDictionary(dict, search, target) {
+	    if ((dict == 'all') || (dict == 'publicationyear')) {
+	        alert("The selected field is not correct to search on dictionary.");
+		} else {
+	    	var dict_window = window.open('/cgi-bin/koha/dictionary.pl?dictionary=' + dict + '&search=' + search + '&target=' + target,'_blanck','height=325,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,top=100,left=100');
+        	dict_window.focus();
+		}
+	}
+
+	</script>
+	<script type="text/javascript" language="javascript" src="<TMPL_VAR NAME="themelang">/includes/catsearch.js"></script>
+<script type="text/javascript" language="javascript" src="<TMPL_VAR NAME="themelang">/includes/basket.js"></script>
+<script type="text/javascript" language="javascript">
+	var MSG_BASKET_EMPTY = "You book bag is currently empty";
+	var MSG_RECORD_IN_BASKET = "This item is already in your book bag";
+	var MSG_RECORD_ADDED = "This item has been added to your book bag";
+	var MSG_NRECORDS_ADDED = " item(s) added to your book bag";
+	var MSG_NRECORDS_IN_BASKET = "already in the bag";
+	var MSG_NO_RECORD_SELECTED = "No item was selected";
+	var MSG_NO_RECORD_ADDED = "No item was added to your book bag";
+</script>
+</head>
+
+<body>

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-cat.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,196 @@
+</title>
+<!-- TMPL_IF NAME="TemplateEncoding" -->
+<meta http-equiv="Content-Type" content="text/html; charset=<!-- TMPL_VAR NAME='TemplateEncoding' -->" />
+<!-- TMPL_ELSE -->
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<!-- /TMPL_IF -->
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css">
+    <!-- TMPL_IF NAME="intranetstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetstylesheet" -->);<!-- TMPL_ELSE -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);<!-- /TMPL_IF -->
+	    <!-- TMPL_IF NAME="intranetcolorstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetcolorstylesheet" -->);<!-- /TMPL_IF -->
+</style>
+<script language="JavaScript" type="text/javascript">
+<!-- Hide from old browsers
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable");
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+function hideSearchsTypes() {
+            document.getElementById('precise_form').style.display = 'none';
+            document.getElementById('loose_form').style.display = 'none';
+            document.getElementById('keyword_form').style.display = 'none';
+	
+		}
+
+		function resetButtonsColors() {
+			document.getElementById('searchType1').style.backgroundColor = 'orange';
+			document.getElementById('searchType2').style.backgroundColor = 'orange';
+			document.getElementById('searchType3').style.backgroundColor = 'orange';
+			
+		}
+
+		function changeSearch1() {
+		    resetButtonsColors();
+		    document.getElementById('searchType1').style.backgroundColor = 'yellow';
+		    hideSearchsTypes();
+		  //  document.getElementById('keyword_form').reset();
+		    document.getElementById('keyword_form').style.display = 'inline';
+		}
+
+        function changeSearch2() {
+            resetButtonsColors();
+		    document.getElementById('searchType2').style.backgroundColor = 'yellow';
+		    hideSearchsTypes();
+		    //document.getElementById('precise_form').reset;
+		    document.getElementById('precise_form').style.display = 'inline';
+		}
+
+		function changeSearch3() {
+		    resetButtonsColors();
+		    document.getElementById('searchType3').style.backgroundColor = 'yellow';
+		    hideSearchsTypes();
+		   // document.getElementById('loose_form').reset();
+		    document.getElementById('loose_form').style.display = 'inline';
+		}
+		
+		
+		function checkKeywordSearch() {
+		if (document.keyword_form.keyword.value == '') {
+			alert("Enter a word to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+
+	function checkLooseSearch() {
+		if ( document.loose_form.field_value1.value == '' ) {
+			alert("Enter at least the first search to start searching.");
+			document.loose_form.field_value1.focus();
+			return false;
+		    } else {
+		        return true;
+		    }
+	}
+
+	function checkPreciseSearch() {
+		if ( (document.precise_form.barcode.value == '') &&
+			(document.precise_form.itemnumber.value == '') && (document.precise_form.biblionumber.value == '') ) {
+			alert("Enter a barcode or itemnumber or Biblionumber to start searching.");
+			return false;
+		} else {
+		    return true;
+		}
+	}
+
+	function openDictionary(dict, search, target) {
+	    if ((dict == 'all') || (dict == 'publicationyear')) {
+	        alert("The selected field is not correct to search on dictionary.");
+		} else {
+	    	var dict_window = window.open('/cgi-bin/koha/dictionary.pl?dictionary=' + dict + '&search=' + search + '&target=' + target,'_blanck','height=325,width=550,status=no,toolbar=no,menubar=no,location=no,resizable=no,top=100,left=100');
+        	dict_window.focus();
+		}
+	}
+
+
+		
+	</script>
+
+<style type="text/css">
+.catalogue {
+	background-color: #ad11ad;
+	color:#FFFFFF;
+	background-image:none;
+	text-decoration: normal;
+}
+.catalogueReservesLabel {
+	background-color:#5e11ac;
+	color:#FFFFFF;
+	background-image:none;
+	text-decoration: normal;	
+}
+.emptyCell {
+	background-color: transparent;
+	color:#FFFFFF;
+	background-image: none;
+	border: 0px solid;
+}
+
+a.catalogue:hover {
+	background-color: #ad11ad;
+	color: #FFFFFF;
+	text-decoration: none;
+	}
+
+.searchtype {
+    height: 20px;
+    font-size: 9px;
+	text-align: center;
+	padding: 3px, 8px, 3px, 8px;
+	border:0px solid black;
+	text-decoration: none;
+	color: black;
+	border-radius: 6px;
+	-moz-border-radius: 6px;
+	background-color: orange;
+	margin : 3px;
+	vertical-align: middle;
+	}
+
+.searchtypeselected {
+    height: 20px;
+    font-size: 9px;
+	text-align: center;
+	padding: 3px, 8px, 3px, 8px;
+	border:0px solid black;
+	text-decoration: none;
+	color: black;
+	border-radius: 6px;
+	-moz-border-radius: 6px;
+	background-color: yellow;
+	margin : 3px;
+	vertical-align: middle;
+}
+.catalogue_button {
+	border-width: 1px;
+	border-color: black;
+	text-decoration: none;
+	border-radius: 6px;
+	cursor:pointer;
+	vertical-align:middle;
+	-moz-border-radius: 6px;
+	background-color: #ad11ad;
+	color:#FFFFFF;
+}
+</style>
+
+</head>
+
+<body>

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-dic.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-dic.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-dic.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-dic.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,53 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+<script language="JavaScript" type="text/javascript">
+ function selectEntry(target) {
+		        
+		        if (document.dicc_form.dicc_entry.selectedIndex != -1) {
+ 					target.value = document.dicc_form.dicc_entry.value;
+					window.close();
+		        } else {
+					alert("Select an option.")
+				}
+		    }
+<!-- Hide from old browsers
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+// end hiding -->
+</script>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-print.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-print.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-print.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-print.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,9 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/print.css);
+</style>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-receipt.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-receipt.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-receipt.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-receipt.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,9 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/blank.css);
+</style>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-z3950.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-z3950.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-z3950.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close-z3950.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,23 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<!-- TMPL_IF name="refresh" --><meta http-equiv="refresh" content="2; url=<!-- TMPL_VAR NAME="refresh" -->" /><!-- /TMPL_IF -->
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME="themelang" -->/includes/intranet.css);
+	#main {
+		background-color : #CCCC99;
+		border-left : 1px solid #CCCC99;
+		margin-left : 2%;
+		margin-right : 2%;
+		margin-top : 2%;
+		padding : 10px;
+		position : relative;
+	}
+</style>
+<script language="JavaScript" type="text/javascript">
+	function Import(GetThisOne) {
+		opener.document.location= "../acqui.simple/addbiblio.pl?z3950=1&oldbiblionumber=<!-- TMPL_VAR NAME="oldbiblionumber" -->&breedingid="+GetThisOne;
+		self.close();
+		return false;
+	}
+</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-close.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,47 @@
+</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+<script language="JavaScript" type="text/javascript">
+
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha_Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function openWindow(targeturl, windowname) {
+	newwin =
+	window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable");
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+
+
+
+
+</script>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-open.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/doc-head-open.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/doc-head-open.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/doc-head-open.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,5 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/favicon.ico
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/favicon.ico
diff -N koha-tmpl/intranet-tmpl/default/en/includes/favicon.ico
Binary files /dev/null and /tmp/cvsziGbOE differ

Index: koha-tmpl/intranet-tmpl/default/en/includes/help-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/help-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/help-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/help-bottom.inc	26 Mar 2007 02:19:22 -0000	1.2.2.1
@@ -0,0 +1,3 @@
+<div class="action"><form action="help.pl" method="get"><input type="button" class="submit" onclick="window.close(); return false;" value="Close Help Window" /></form></div></div>
+</body>
+</html>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/help-top.inc	26 Mar 2007 02:19:22 -0000	1.6.2.1
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>KOHA: online help</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
+<body>
+<div id="mainbloc">

Index: koha-tmpl/intranet-tmpl/default/en/includes/holidays-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/holidays-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/holidays-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/holidays-bottom.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,4 @@
+
+
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/includes/holidays-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/holidays-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/holidays-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/holidays-top.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,184 @@
+
+
+</title>
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
+
+<!-- Estos scripts permiten manejar calendario de fechas. -->
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-en.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-setup.js"></script>
+<!-- **************************************************** -->
+
+<script language="JavaScript" type="text/javascript">
+	// Captura el evento onmousemove para cualquier navegador
+	if (document.layers) { // Netscape
+		document.captureEvents(Event.MOUSEMOVE);
+	    document.onmousemove = captureMousePosition;
+	} else if (document.all) { // Internet Explorer
+	    document.onmousemove = captureMousePosition;
+	} else if (document.getElementById) { // Netcsape 6
+	    document.onmousemove = captureMousePosition;
+	}
+
+	var mouseXMax = 0;
+	var mouseYMax = 0;
+	var mouseX = 0;
+	var mouseY = 0;
+
+	function captureMousePosition(e) {
+	    if (document.layers) {
+		    mouseX = e.pageX;
+			mouseY = e.pageY;
+	        mouseXMax = window.innerWidth + window.pageXOffset;
+		    mouseYMax = window.innerHeight + window.pageYOffset;
+	    } else if (document.all) {
+		    mouseX = window.event.x + document.body.scrollLeft;
+	        mouseY = window.event.y + document.body.scrollTop;
+	        mouseXMax = document.body.clientWidth + document.body.scrollLeft;
+	        mouseYMax = document.body.clientHeight + document.body.scrollTop;
+	    } else if (document.getElementById) {
+	        mouseX = e.pageX;
+		    mouseY = e.pageY;
+	        mouseXMax = window.innerWidth + window.pageXOffset;
+	        mouseYMax = window.innerHeight + window.pageYOffset;
+	    }
+	}
+
+	function holidayOperation(formObject, opType) {
+		var op = document.getElementsByName('operation');
+		op[0].value = opType;
+		formObject.submit();
+	}
+
+	// This function shows the "Show Holiday" panel //
+	function showHoliday (exceptionPosibility, dayName, day, month, year, weekDay, title, description) {
+		var panel = document.getElementById('showHoliday');
+		panel.style.display = 'inline';
+		document.getElementById('newHoliday').style.display = 'none';
+		panel.style.top = mouseYMax/2;
+		panel.style.left = (mouseXMax/2) - 250;
+		document.getElementById('showDayname').value = dayName;
+		document.getElementById('showBranchName').value = document.getElementById('branch').value;
+		document.getElementById('showDay').value = day;
+		document.getElementById('showMonth').value = month;
+		document.getElementById('showYear').value = year;
+		document.getElementsByName('showWeekday')[0].value = weekDay;
+		document.getElementById('showTitle').value = title;
+		document.getElementById('showDescription').value = description;
+	
+		if (exceptionPosibility == 1) {
+			document.getElementById('exceptionPosibility').style.display = 'inline';
+		} else {
+			document.getElementById('exceptionPosibility').style.display = 'none';
+		}
+	}
+
+	// This function shows the "Add Holiday" panel //
+	function newHoliday (dayName, day, month, year, weekDay) {
+		var panel = document.getElementById('newHoliday');
+		panel.style.display = 'inline';
+		document.getElementById('showHoliday').style.display = 'none';
+		panel.style.top = mouseYMax/2;
+		panel.style.left = (mouseXMax/2)  - 250;
+		document.getElementById('newDayname').value = dayName;
+		document.getElementById('newBranchName').value = document.getElementById('branch').value;
+		document.getElementById('newDay').value = day;
+		document.getElementById('newMonth').value = month;
+		document.getElementById('newYear').value = year;
+		document.getElementsByName('newWeekday')[0].value = weekDay;
+	}
+
+	function hidePanel(aPanelName) {
+		document.getElementById(aPanelName).style.display = 'none';
+	}
+
+	function changeBranch () {
+		var branch = document.getElementById('branch').options[document.getElementById('branch').selectedIndex].value;
+		location.href='/cgi-bin/koha/tools/holidays.pl?branch=' + branch;
+	}
+
+	function additionalInformation (anExplanation) {
+		var panel = document.getElementById('information');
+		var paragraph = document.getElementById('explanation');
+		panel.style.display = 'inline'
+		panel.style.top = mouseY;
+		panel.style.left = mouseX;
+		var info = document.createTextNode(anExplanation);
+		if (paragraph.hasChildNodes()) {
+			paragraph.removeChild(paragraph.lastChild);
+		}
+		paragraph.appendChild(info);
+	}
+
+	function Help() {
+		newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+	}
+</script>
+
+<style type="text/css">
+.parameters {
+	background-color: #86c268;
+	color: #FFFFFF;
+	text-decoration: normal;
+	font-weight: bold;
+	background-image:none;
+	}
+a.parameters:hover {
+	background-color: #86c268;
+	color: #FFFFFF;
+	text-decoration: normal;
+	font-weight: bold;
+	}
+
+.normalday { 
+	background-color: #EDEDED;
+	color: Black; 
+	border:1px solid #000000;
+}
+
+.exception {
+	background-color: #A2B38F;
+	color: Black; 		
+	border:1px solid #000000;
+}
+
+.holiday { 
+	background-color: #8A70D1;
+	color: Black; 
+	border:1px solid #000000;
+}
+
+.repeatableday { 
+	background-color: #8FB1E9;
+	color: Black; 
+	border:1px solid #000000;
+}
+
+.information {
+	z-index:1;
+	background-color: #DCD2F1;
+	width:300px;
+	display:none;
+	border:1px solid #000000;
+	color: #000000;
+	font-size: 8pt;
+	font-weight: bold;
+    background-color: #FFD700;
+	cursor: pointer;
+	padding:2px;
+}
+
+.panel {
+	z-index:1;
+	width:500px;
+	display:none;
+	border:1px solid #000000;
+	padding:0px;
+}
+
+</style>
+</head>
+
+<body>
+
+

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet-bottom.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,2 @@
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet-cvs.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet-cvs.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet-cvs.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet-cvs.css	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,967 @@
+a.delete {
+	display: block;
+	font-weight: bold;
+	margin: 2px;
+	padding: 1px;
+	text-align: center;
+	text-decoration: none;
+}
+
+a.edit {
+	display: block;
+	font-weight: bold;
+	margin: 2px;
+	padding: 1px;
+	text-align: center;
+	text-decoration: none;
+}
+
+a:link.current {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:link.pages {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:visited.current {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:visited.pages {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:hover.current {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:hover.pages {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:active.current {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+a:active.pages {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+body {
+	font-family: arial, geneva, sans-serif;
+	font-size: 16px;
+	margin: 3px 0px 0px 5px;
+}
+
+br.clear {
+	clear : both;
+	line-height: 1px;
+}
+
+caption {
+	font-size: 20px;
+	font-weight: bold;
+	margin-top: 5px;
+	text-align: left;
+}
+
+div#controls {
+	float: right;
+	margin-left: .7em;
+	width: 15%;
+}
+
+div#controls form {
+	font-size: 80%;
+	margin: .3em 0;
+	padding: .3em;
+}
+
+div#help {
+	font-weight: bold;
+	position: absolute;
+	right: 3px;
+	top: 3px;
+}
+
+div#help .loggedin, .menu input {
+	font-size: 80%;
+}
+
+div#help .loggedin a {
+	text-decoration: underline;
+}
+
+div#help a {
+	padding: 1px 2px;
+	text-decoration: none;
+}
+
+div.compact td {
+	border-right: 0px;
+	border-top: 0px;
+	font-size: 13px;
+	font-weight: normal;
+	padding: 1px 1px 1px 10px;
+}
+
+div.compact th {
+	border-top: 0px;
+	padding: 1px 10px 1px 1px;
+	font-weight: normal;
+	font-size: 13px;
+	text-align: right;
+	width: 20%;
+	vertical-align: top;
+}
+
+div.data p {
+	margin: .5em 0;
+}
+
+div.data table caption {
+	font-size: 1em;
+}
+
+div.data table td, div.data-main table td {
+	font-size: 12px;
+	margin: 0 0 0 0;
+	padding: 2px;
+	padding-left: .7em;
+}
+
+div.data table th, div.data-main table th {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 2px;
+	padding-right: 1em;
+	text-align: right;
+	width: 17%;
+}
+
+div.data table th[scope=col], div.data-main table th[scope=col] {
+	border-left: 0;
+}
+
+div.data table tr.highlight th {
+	font-size: 70%;
+	font-weight: bold;
+	padding-right: 1em;
+}
+
+div.data table, div.data-main table {
+	border-collapse: collapse;
+	margin: auto;
+	margin: 0 0 5px 0;
+}
+
+div.data-main table caption {
+	font-size: 1.1em;
+}
+
+div.details {
+	margin-bottom: 5px;
+}
+
+div.details dd {
+	font-size: 12px;
+}
+
+div.details dl {
+	margin: 0px;
+	padding: 0px;
+}
+
+div.details dt {
+	font-weight: bold;
+	font-size: 12px;
+	padding: 2px;
+}
+
+div.details td, div.form td {
+	border-right: 0px;
+	border-top: 0px;
+}
+
+div.details td:first-child, div.form td:first-child {
+	font-weight: bold;
+	text-align: right;
+	width: 25%;
+}
+
+div.details td+td, div.form td+td {
+	font-weight: normal;
+	text-align: left;
+	width: 75%;
+}
+
+div.details ul {
+	margin-top: 0px;
+	margin-bottom: 0px;
+	padding-top: 0px;
+	padding-bottom: 3px;
+	font-size: 12px;
+}
+
+div.error {
+	font-size: 16px;
+	line-height: 18px;
+	margin: 10px auto;
+	padding: 5px;
+	width: 65%;
+}
+
+div.error .cancel {
+	font-size: 14px;
+	margin-left: 5%;
+	padding: 2px 15px 2px 15px;
+}
+
+div.error .submit {
+	font-size: 14px;
+	margin-left: 5%;
+	padding: 2px 15px 2px 15px;
+}
+
+div.error p {
+	margin: 0px;
+	padding: 0px 0px 0px 20px;
+}
+
+div.flags li {
+	list-style: circle;
+}
+
+div.flags ul {
+	margin: 0px;
+	padding: 0px;
+}
+
+div.form, div.details {
+	border: 0px;
+	margin: 0px auto;
+	padding: 5px;
+}
+
+div.help {
+	border: 0;
+	font-size: 90%;
+	margin-bottom: 5px;
+}
+
+div.help .ex {
+	font-weight: bold;
+}
+
+div.help h3 {
+	font-size: 100%;
+	margin: 0;
+	padding: 5px;
+}
+
+div.help p {
+	margin: 0;
+	padding: 2px 5px;
+}
+
+div.items {
+	border: 0px;
+	margin: 0px auto;
+	padding: 5px;
+	width: 98%;
+}
+
+div.items td {
+	font-size: .75em;
+	padding: 2px;
+}
+
+div.items th {
+	font-size: .75em;
+	font-weight: bold;
+	padding: 2px;
+	text-align: left;
+	vertical-align: top;
+}
+
+div.members th {
+	font-size: 12px;
+	padding: 3px 5px;
+	width: 25%;
+	font-weight: bold;
+	text-align: left;
+	vertical-align: top;
+}
+
+div.members th label {
+	display: block;
+	margin: 0;
+	padding: 0;
+}
+
+div.members th p, div.compact th p {
+	font-weight: normal;
+	padding: 0;
+	margin: 0;
+	text-indent: 1em;
+}
+
+div.menu {
+	margin-bottom : 5px;
+	padding: 5px;
+	width: 98%;
+}
+
+div.menu dl {
+	padding: 0;
+	margin : 0;
+}
+
+div.menu dt {
+	font-size : 80%;
+	font-weight: bold;
+	padding: 2px;
+	margin : .3em;
+}
+
+div.menu dd {
+	font-size: 75%;
+	margin-left: 1em;	
+}
+div.notice {
+	font-size: 16px;
+	line-height: 18px;
+	margin: 10px auto;
+	padding: 5px;
+}
+
+div.tabitem {
+	display: inline;
+}
+
+div.tabitem form {
+	display: inline;
+	white-space: nowrap;
+}
+
+div.tabitem li a {
+	font-weight: bold;
+	padding: 3px 3px;
+	text-decoration: none;
+}
+
+div.tabitem ul {
+	margin: 0;
+	padding: 0;
+}
+
+div.tabitem ul li {
+	font-size: 80%;
+	margin: 0 2px 0 0;
+	padding: 3px 0;
+	list-style: none;
+	display: inline;
+}
+
+fieldset {
+	border: 0;
+	padding: 0;
+	white-space: nowrap;
+}
+
+fieldset label {
+	float: left;
+	margin-left: 3px;
+	width: 25%;
+}
+
+fieldset.list {
+	white-space: normal;
+}
+
+form {
+	margin: 0px;
+	padding: 0px;
+}
+
+form.compact input {
+	font-size: 80%;
+	font-weight: normal;
+	padding: 0 6px;
+}
+
+h1	{
+	font-size: 20px;
+	font-weight: bold;
+	margin-bottom: 3px;
+	margin-top: 3px;
+}
+
+h2 {
+	font-size: 18px;
+	font-weight: bold;
+	margin-bottom: 3px;
+	margin-top: 3px;
+}
+
+h3 {
+	font-size: 16px;
+	font-weight: bold;
+	margin-bottom: 3px;
+	margin-top: 3px;
+}
+
+h3.alert {
+	padding: 3px;
+}
+
+h3.title {
+	font-size: 18px;
+	display: block;
+	padding: 5px;
+	margin: 0px auto;
+}
+
+h4 {
+	font-size: 14px;
+	font-weight: bold;
+	margin-bottom: 3px;
+	margin-top: 3px;
+}
+
+h4.subtitle {
+	padding : 0 5px 5px 5px;
+	margin: 0px;
+	text-indent: 1em;
+}
+
+h5 {
+	font-size: 13px;
+	font-weight: bold;
+	margin-bottom: 1px;
+	margin-top: 1px;
+}
+
+h5.author {
+	font-size: 104%;
+	text-indent: 1em;
+	padding: 0 5px 5px 5px;
+	margin: 0;
+}
+
+h6 {
+	font-size: 12px;
+	font-weight: bold;
+	margin-bottom: 1px;
+	margin-top: 1px;
+}
+
+label {
+	font-weight: bold;
+	padding: 0px 5px 0px 5px;
+}
+
+label.required:after {
+	content: "*";
+	font-family: "Courier New", Courier, monospace;
+	font-size: 150%;
+	padding-left: 3px;
+}
+
+p.date-select {
+		font-size: 80%;
+	margin-top: 2px;
+	margin-bottom: 2px;
+}
+
+p.date-select input, p.date-select select {
+	font-size: 70%;
+}
+
+sup {
+	font-family: "courier new", courier, monospace;
+	font-size: .7em;
+	font-weight: bold;
+}
+
+table {
+	border-collapse: collapse;
+	margin: 3px 0px 5px 0px;
+	padding: 0px;
+	width: 99%;
+}
+
+table.marc {
+	border-collapse: collapse;
+	margin: 3px 0px 5px 0px;
+	padding: 0px;
+	width: auto;
+}
+
+table.marc td.label {
+	font-weight: bold;
+	width: 25%;
+}
+
+table.marc th {
+	border: 0px;
+	text-align: left;
+	font-weight: normal;
+}
+
+td {
+	font-size: 12px;
+	padding: 5px 5px 5px 5px;
+}
+
+td fieldset {
+	margin: 0 0 3px 0;
+	padding: 0 0 3px 0;
+}
+
+td form {
+	margin: 0;
+}
+
+td input.delete {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 0 5px 0 5px;
+	margin: 0 5px 0 0;
+}
+
+td input.submit {
+	margin: 0 5px 0 0;
+	padding: 0 5px 0 5px;
+}
+
+td legend {
+	margin: 0;
+	padding: 4px;
+}
+
+td.credit, td.debit, td.sum {
+	font-family: "Courier New", Courier, monospace;
+	text-align: right;
+}
+
+td.input, div.form td, div.details td {
+	line-height: 1.5em;
+	padding: 4px;
+	text-align: right;
+}
+
+td.label {
+	font-weight: bold;
+	line-height: 1.5em;
+	padding: 4px;
+}
+
+td.label, div.form th, div.details th {
+	font-weight: bold;
+	line-height: 1.5em;
+	padding: 4px;
+	text-align: left;
+	vertical-align: top;
+}
+
+td:last-child {
+	font-size: 12px;
+	padding: 5px 5px 5px 5px;
+}
+
+td+ul {
+	margin-top: 0px;
+	margin-bottom: 0px;
+}
+
+tfoot {
+	font-weight: bold;
+}
+
+th {
+	font-size: 14px;
+	font-weight: bold;
+	padding: 5px 5px 5px 5px;
+}
+
+th:last-child {
+	font-size: 14px;
+	font-weight: bold;
+	padding: 5px 5px 5px 5px;
+}
+
+tr th[scope=row], tr.highlight th[scope=row]{
+	font-family: Arial, Geneva, Helvetica, sans-serif;
+	font-size: 70%;
+	font-weight: normal;
+	padding: 0;
+}
+
+.accesskey {
+	text-decoration: underline;
+}
+
+.cancel {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 2px;
+}
+
+.current {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+.error, .overdue {
+	font-weight: bold;
+}
+
+.ex {
+	font-family: "Courier New", Courier, monospace;
+}
+
+.form dd {
+	display: block;
+	line-height: 1.5em;
+	padding: 4px;
+	text-align: right;
+}
+
+.form dl {
+	margin: 0px 0px 0px 0px;
+	padding: 3px;
+	width: 80%;
+}
+
+.form dt {
+	float: left;
+	font-weight: bold;
+	line-height: 1.5em;
+	padding: 4px;
+}
+
+.form-help {
+	font-size: 95%;
+	padding-left: 15px;
+}
+
+.inline {
+	display: inline;
+}
+
+.menu input {
+	font-size: 80%;
+}
+
+.nav {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 1px 5px 1px 5px;
+	text-decoration: none;
+}
+
+.no {
+	float: right;
+	padding: 0px 15px 0px 15px;
+	width: 33%;
+	margin: 0px 2px 0px 2px;
+	text-align: center;
+}
+
+.print {
+	font-size: 10px;
+}
+
+.searchresults p {
+	font-size: 1.2em;
+	font-weight: bold;
+	margin: .2em;
+}
+
+.searchresults p+p {
+	font-size: 1em;
+	font-weight: normal;
+	text-indent: 1em;
+}
+
+.searchresults strong a {
+	font-weight: bold;
+	font-size: 14px;
+}
+
+.searchresults td {
+	padding: 2px 2px 2px 5px;
+}
+
+.submit, div.details dt, .cancel {
+	font-size: 12px;
+	font-weight: bold;
+	padding: 2px;
+}
+
+.thumbnail {
+	float: left;
+	margin: 0 5px 10px 0;
+}
+
+.yes {
+	float: left;
+	padding: 0px 15px 0px 15px;
+	width: 33%;
+	margin: 0px 2px 0px 2px;
+	text-align: center;
+}
+
+#auth {
+	margin: 0 30% 0 30%;
+	padding: 5px;
+}
+
+#auth p {
+	width: 25%;
+	margin: 0 auto;
+	text-align: center;
+	padding: 0;
+}
+
+#auth table {
+	border-collapse: separate;
+}
+
+#auth table td {
+	text-align: left;
+}
+
+#auth table th{
+	text-align: right;
+	width: 25%;
+}
+
+#main {
+	margin-left: 18%;
+	margin-right: 2%;
+	margin-top: 2%;
+	padding: 10px;
+}
+
+#main-compact {
+	margin-left: 2%;
+	margin-right: 2%;
+	margin-top: 2%;
+	padding: 10px;
+}
+
+#menu dd {
+	padding: 3px 45px 3px 10px;
+}
+
+#menu dd a {
+	font-size: 1.05em;
+	font-weight: bold;
+	text-decoration: none;
+}
+
+#menu dd li {
+	display: inline;
+	white-space: nowrap;
+}
+
+#menu dd li:before {
+	content: "\00BB \0020";
+}
+
+#menu dd ul {
+	display: inline;
+	list-style: disc;
+}
+
+#menu dl {
+	margin: 0px;
+	padding: 0px; /*width : 80%;*/
+}
+
+#menu dt {
+	font-size: 1.2em;
+	font-weight: bold;
+	padding: 2px 2px 2px 5px;
+}
+
+#menu dt a {
+	text-decoration: none;
+}
+
+#nav {
+	position: absolute;
+	left: 1px;
+	margin: 2% 0% 0% 5px;
+	padding: 0px;
+	width: 16%;
+}
+
+#nav .submit {
+	font-size: 9px;
+}
+
+#nav a {
+	font-family: Tahoma, arial, geneva, sans-serif;
+	font-weight: bold;
+	text-decoration: none;
+}
+
+#nav h4 {
+	font-size: 12px;
+	font-weight: bold;
+	margin: 0px;
+	padding: 0px;
+	text-align: left;
+}
+
+#nav input {
+	font-size: .8em;
+}
+
+#nav label {
+	font-size: 10px;
+}
+
+#nav ul {
+	margin: 0px;
+	padding: 0px;
+}
+
+#nav ul li {
+	font-size: .8em;
+	list-style: none;
+	padding: 3px 3px 10px 3px;
+	text-align: right;
+	width: 100%;
+}
+
+#nav ul ul {
+	margin: 0px 0px 0px 5px;
+}
+
+#nav ul ul li {
+	font-size: .9em;
+	list-style: none;
+	margin: 0px 0px 0px 0px;
+	padding: 0px 0px 0px 0px;
+	text-align: right;
+	width: 100%;
+}
+
+#nav ul ul li+li {
+	padding: 0px 0px 0px 0px;
+}
+
+#notes {
+	float: right;
+	font-size: 12px;
+	margin: 0px;
+}
+
+#notes img {
+	float: left;
+	margin: 3px;
+	padding : 2px;
+}
+
+#notes ul {
+	margin-left: 95px;
+}
+
+#results, .results {
+	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
+	font-size: .8em;
+	margin: 0px;
+	padding: 3px 0px 15px 0px;
+}
+
+#submenu dd {
+	margin-left: 2%;
+}
+
+#submenu dd ul {
+	margin-left: 0;
+	padding-left: 7%;
+}
+
+#submenu dl {
+	float: left;
+	font-size: 90%;
+	margin: 10px 10px;
+	padding: 2px 2px 2px 7px;
+	width: 27%;
+}
+
+#submenu dt {
+	font-size: 100%;
+	font-weight: bold;
+}
+
+#topmenu {
+	margin-bottom: 5px;
+	margin-left: 20px;
+	margin-right: 10px;
+}
+
+#topmenu .submit {
+	font-size: .7em;
+	padding: 2px;
+}
+
+#topmenu a:link {
+	font-weight: bold;
+	padding: 2px;
+}
+
+#topmenu a:visited {
+	font-weight: bold;
+	padding: 2px;
+}
+
+#topmenu a:hover {
+	font-weight: bold;
+	padding: 2px;
+}
+
+#topmenu a:active {
+	font-weight: bold;
+	padding: 2px;
+}
+
+#topmenu form {
+	display: inline;
+}
+
+#topmenu label {
+	font-weight: bold;
+}

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet-facets.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet-facets.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet-facets.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet-facets.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,18 @@
+<div id="nav">
+<li><a href="/cgi-bin/koha/mainpage.pl">NEULIS Home</a></li>
+<h6>Refine Your Search</h6>
+
+<!-- TMPL_LOOP NAME="facets_loop" -->
+<ul><!-- TMPL_VAR NAME="type_label" -->
+	<!-- TMPL_LOOP NAME="facets" -->
+		<li><a href="/cgi-bin/koha/catalogue/catalogue-search.pl?op=do_search&and_or=@and&<!-- TMPL_VAR NAME="type_link_value" -->&value=<!-- TMPL_VAR NAME="facet_link_value" ESCAPE="URL"-->&zoom=1<!-- TMPL_VAR NAME="facetsdesc" -->"  title="<!-- TMPL_VAR NAME="facet_title_value" -->"><!-- TMPL_VAR NAME="facet_label_value" --> (<!-- TMPL_VAR NAME="facet_count" -->)</a></li>
+	<!-- /TMPL_LOOP -->
+<!-- TMPL_IF NAME="expandable" -->
+	<li class="showmore"><a href="/cgi-bin/koha/catalogue/catalogue-search.pl?q=<!-- TMPL_VAR NAME="forminputs" -->&amp;expand=<!-- TMPL_VAR NAME="expand" -->#<!-- TMPL_VAR NAME="type_id" -->">Show More</a></li>
+</li><!-- /TMPL_IF -->
+</ul>
+<!-- /TMPL_LOOP -->
+
+
+
+</div>

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav-brief.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav-brief.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav-brief.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav-brief.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,22 @@
+<div id="nav">
+    <ul>
+    <li><a href="/cgi-bin/koha/mainpage.pl">Home Page</a></li></ul>
+    <li><a href="/cgi-bin/koha/circ/circulation.pl">Issues</a></li>
+<ul>
+    <li><a accesskey="r" href="/cgi-bin/koha/circ/returns.pl">Returns</a>
+   <li> <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li></ul>
+  <ul><li><label>Rezerv Section</label>
+<a href="/cgi-bin/koha/circ/rescirculation.pl">Issue</a></li>
+<li><label>Reserve Section </label><a href="/cgi-bin/koha/circ/resreturns.pl">Return</a></li></ul>
+<li><a href="/cgi-bin/koha/members/members-home.pl">Users</a></li>
+	<li><a href="/cgi-bin/koha/catalogue/catalogue-search.pl">Catalogue search</a></li>
+<li><a href="#" onclick="javascript:window.open('/cgi-bin/koha/manual.pl','MARC','width=700 height=600,location=yes,toolbar=yes,scrollbars=yes');">MARC Manual</a></li></ul>
+
+
+<li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
+
+
+<!-- TMPL_IF NAME="loggedinusername" --><li>
+    Logged in as: <!-- TMPL_VAR NAME="loggedinusername" --> </li><ul><li><a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a></li></ul><!-- /TMPL_IF -->
+</li>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet-nav.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,50 @@
+<div id="nav">
+ <ul>
+    
+    
+    <li><a href="/cgi-bin/koha/mainpage.pl">KOHAhome</a></li>
+    <li><a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
+
+      <form method="post" action="/cgi-bin/koha/circ/circulation.pl">
+        <label for="navfindborrower">Iss<span class="accesskey">u</span>e to:</label>
+        <input id="navfindborrower" name="findborrower" type="text" size="10" accesskey="u" />
+        <input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" -->" />
+        <input type="hidden" name="printer" value="<!-- TMPL_VAR name="printer" -->" />
+        <input type="submit" class="submit" value="Submit" />
+      </form>
+    </li></ul></li>
+<ul>
+    <li><a accesskey="r" href="/cgi-bin/koha/circ/returns.pl"><span class="accesskey">R</span>eturns</a>
+   <li> <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li></li></ul>
+  <ul><li><label>Reserve Section</label>
+<a href="/cgi-bin/koha/circ/rescirculation.pl">Issue</a></li>
+<li><label>Reserve Section </label><a href="/cgi-bin/koha/circ/resreturns.pl">Return</a></li></ul>
+<li><a href="/cgi-bin/koha/members/members-home.pl">Users</a>
+<ul><li><form action="/cgi-bin/koha/members/member.pl" method="post">
+	<label for="navmember">Search:</label><input id="navmember" type="text" size="10" name="member" />
+	<input type="submit" value="Search" class="submit" />
+
+	</form></li></ul></li>
+
+	<li><a href="/cgi-bin/koha/catalogue/catalogue-search.pl">Catalogue Search</a></li>
+<ul>
+<li><form name="f" method="post" action="/cgi-bin/koha/catalogue/catalogue-search.pl"><input type="hidden" name="op" value="do_search" /><input type="hidden" name="search_type" value="precise" /><input type="hidden" name="zoom" value="0" /><input type="hidden" name="serverid" value="-1" /><input type="hidden" name="number_to_display" value="10" /><label><span class="accesskey">Barcode:</span></label><input type="text" id="barcode" name="barcode" size="10"  /><input type="submit" value="Search" class="submit"></form></li>
+<li><form name="f" method="post" action="/cgi-bin/koha/catalogue/catalogue-search.pl"><input type="hidden" name="op" value="do_search" /><input type="hidden" name="kohafield" value="" /><input type="hidden" name="zoom" value="1" /><input type="hidden" name="MARC" value="0" /><input type="hidden" name="serverid" value="-1" /><input type="hidden" name="number_to_display" value="10" /><label><span class="accesskey">Keyword Search:</span></label><input type="text"  name="value" size="10"  /><input type="submit" value="Search" class="submit"></form></li>
+</ul>
+
+
+
+<li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloging</a></li>
+<ul><li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a></li>
+<li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a></li>
+<li><a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual Shelves</a></li></ul>
+<li><a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a></li>
+<li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
+<li><a href="/cgi-bin/koha/admin/admin-home.pl">System Admin</a></li>
+<li><a href="/cgi-bin/koha/sms/sms.pl">Send SMS</a></li>
+
+<!-- TMPL_IF NAME="loggedinusername" --><li>
+    Logged in as: <!-- TMPL_VAR NAME="loggedinusername" --> </li><ul><li><a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a></li></ul><!-- /TMPL_IF -->
+
+</li>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,6 @@
+<div id="topmenu"><form action="/cgi-bin/koha/member.pl" method="post">
+<label for="member">Patron Search</label>
+  <input type="text" id="member" name="member" value="" />&nbsp;<input type="submit"  class="submit" name="Go" value="Search" /></form><form action="/cgi-bin/koha/simpleredirect.pl" method="post">
+<input type="submit" class="submit" value="Add New Patron" />
+<input type="hidden" name="chooseform" value="adult" />
+</form></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/intranet.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/intranet.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/intranet.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/intranet.css	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,1321 @@
+a:link {
+	color : #0066CC;
+}
+
+a:visited {
+	color : #0066CC;
+}
+
+a:hover {
+	color : #993300;
+}
+
+a.delete {
+	background-color : #CC3333;
+	color : #FFFF99;
+	display : block;
+	margin : 2px;
+	padding : 1px;
+	font-weight : bold;
+	text-align : center;
+	text-decoration : none;
+}
+
+a.delete:hover {
+	background-color : #FF3333;
+	color : #FFFF99;
+}
+
+a.edit {
+	background-color : #EFF1D8;
+	color : #3366CC;
+	display : block;
+	margin : 2px;
+	padding : 1px;
+	font-weight : bold;
+	text-align : center;
+	text-decoration : none;
+}
+
+a.edit:hover {
+	background-color : #CCFF99;
+	color : #000088;
+}
+
+a:link.current {
+	background-color : transparent;
+	color : #3366CC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:link.current {
+	background-color : transparent;
+	color : #3366CC;
+}
+
+a:link.nav {
+	background-color : #D8DEB8;
+	color : #3366CC;
+}
+
+a:link.pages {
+	background-color : #FFFFCC;
+	color : #3366CC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:visited.current {
+	background-color : transparent;
+	color : #3366CC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:visited.current {
+	background-color : transparent;
+	color : #3366CC;
+}
+
+a:visited.nav {
+	background-color : #D8DEB8;
+	color : #3366CC;
+}
+
+a:visited.pages {
+	background-color : #FFFFCC;
+	color : #3366CC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:hover.current {
+	background-color : #CCFF00;
+	color : #CC3333;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:hover.current {
+	background-color : #CCFF00;
+	color : #CC3333;
+}
+
+a:hover.nav {
+	background-color : #CCFF00;
+	color : #CC3333;
+}
+
+a:hover.pages {
+	background-color : #CCFF00;
+	color : #CC3333;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:active.current {
+	background-color : #99CC00;
+	color : #FFFF99;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+a:active.current {
+	background-color : #99CC00;
+	color : #FFFF99;
+}
+
+a:active.nav {
+	background-color : #99CC00;
+	color : #FFFF99;
+}
+
+a:active.pages {
+	background-color : #99CC00;
+	color : #FFFF99;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+body {
+	background-color : #0983A1;
+	color : #333333;
+	font-family : arial, geneva, sans-serif;
+	font-size : 16px;
+	margin : 3px 0px 0px 5px;
+}
+
+caption {
+	color : #000066;
+	font-size : 20px;
+	font-weight : bold;
+	margin-top : 5px;
+	text-align : left;
+}
+
+div.form {
+	background-color : #FFFFCC;
+	border : 0px;
+	margin : 0px auto;
+	padding : 5px;
+}
+
+div.details {
+background-color : #FFFFCC;
+	border : 0px;
+	margin : 1px auto;
+	padding : 5px;
+	margin-bottom: 5px;
+
+}
+
+div.details dl {
+	margin : 0px;
+	padding : 0px;
+}
+
+div.details dt {
+	font-weight: bold;
+	font-size: 12px;
+	border-bottom : 1px solid #D8DEB8;
+	padding : 2px;
+}
+
+div.details dd {
+	font-size: 12px;
+}
+
+div.details ul {
+	margin-top: 0px;
+	margin-bottom: 0px;
+	padding-top : 0px;
+	padding-bottom : 3px;
+	font-size : 12px;
+}
+
+div#help {
+	position : absolute;
+	top : 3px;
+	right : 3px;
+	font-weight : bold;
+}
+
+div#help a {
+	background-color : #3FB2B3;
+	padding : 1px 2px;
+	text-decoration : none;
+}
+
+div#help .loggedin {
+	color : #cccc99;
+	font-size : 80%;
+}
+
+div#help .loggedinusername {
+	color : #D8DEB8;
+}
+
+div#help .loggedin a {
+	background-color : transparent;
+	text-decoration : underline;
+	color : #CCFF66;
+}
+
+div.items {
+	background-color : #FFFFCC;
+	border : 0px;
+	margin : 0px auto;
+	padding : 5px;
+	width : 100%;
+}
+
+div.items td {
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	border-right : 1px solid #E7E7CA;
+	border-top : 1px solid #E7E7CA;
+	font-size : .75em;
+	padding: 2px;
+}
+
+div.items th {
+	background-color : #FFC;
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	border-right : 0px;
+	border-top : 1px solid #E7E7CA;
+	color : #000088;
+	font-size: .75em;
+	font-weight : bold;
+	padding : 2px;
+	text-align : left;
+	vertical-align : top;
+}
+
+div.details td, div.form td {
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	border-right : 0px;
+	border-top : 0px;
+}
+
+div.details td:first-child, div.form td:first-child {
+	font-weight : bold;
+	text-align : right;
+	width : 25%;
+}
+
+div.details td+td, div.form td+td {
+	font-weight : normal;
+	text-align : left;
+	width : 75%;
+}
+
+div.compact td {
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	border-right : 0px;
+	border-top : 0px;
+	font-weight : normal;
+	font-size : 13px;
+	padding : 1px 1px 1px 10px;
+}
+
+div.compact th {
+	border-bottom : 1px solid #999933;
+	border-left : 1px solid #E7E7CA;
+	border-right : 1px solid #999933;
+	border-top : 0px;
+	padding : 1px 10px 1px 1px;
+	font-weight : normal;
+	font-size : 13px;
+	text-align : right;
+	width : 20%;
+	vertical-align: top;
+}
+
+div.error {
+	background-color : #FFFF99;
+	border : 1px dashed #990000;
+	font-size : 16px;
+	line-height : 18px;
+	margin : 10px auto;
+	padding : 5px;
+	width : 65%;
+}
+
+div.error .submit {
+	background-color : #669999;
+	font-size: 14px;
+	margin-left : 5%;
+	padding : 2px 15px 2px 15px;
+}
+
+div.error .cancel {
+	background-color : #993300;
+	font-size: 14px;
+	margin-left : 5%;
+	padding : 2px 15px 2px 15px;
+}
+
+div.error h3 {
+	color : #990033;
+}
+
+div.error p {
+	margin : 0px;
+	padding : 0px 0px 0px 20px;
+}
+
+div.notice {
+	background-color : #FFFF99;
+	border : 1px dashed #990000;
+	font-size : 16px;
+	line-height : 18px;
+	margin : 10px auto;
+	padding : 5px;	
+}
+
+div.flags li {
+	list-style : circle;
+}
+
+div.flags ul {
+	margin : 0px;
+	padding : 0px;
+}
+
+
+
+	div.help {
+		border : 0;
+		background-color : #E7E7CA;
+		font-size : 90%;
+		margin-bottom : 5px;
+	}
+	
+	div.help h3 {
+		font-size : 100%;
+		background-color : #FFFFCC;
+		border-bottom : #CCCC99;
+		margin : 0;
+		padding : 5px;
+	}
+	
+	div.help p {
+		margin : 0;
+		padding : 2px 5px;
+	}
+	
+	div.help .ex {
+		font-weight : bold;
+	}
+
+div.menu {
+	width : 100%;
+}
+
+div.menu th {
+	background-color : #FFFFCC;
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	border-right : 0px;
+	border-top : 0px;
+	font-size : 101%;
+	font-weight : bold;
+	text-align : right;
+	}
+
+div.menu td+td {
+	font-size : 90%;
+	font-weight : normal;
+	text-align : left;
+}
+
+div.tabitem {
+	display : inline;
+}
+
+div.tabitem form {
+	display : inline;
+	white-space : nowrap;
+}
+
+div.tabitem ul li {
+	margin-left: 0;
+	margin-bottom: 0;
+	padding: 2px 10px 5px;
+	
+	list-style: none;
+	display: inline;
+	}
+	
+		
+div.tabitem ul li.here {
+	border-bottom: 1px solid #ffc;
+	list-style: none;
+	display: inline;
+	}
+
+fieldset {
+	border : 0;
+	padding : 0;
+	white-space : nowrap;
+}
+
+fieldset.list {
+	white-space : normal;
+}
+
+form {
+	margin : 0px;
+	padding : 0px;
+}
+
+form.compact input {
+	color : #ffffff;
+	font-size : 80%;
+	font-weight : normal;
+	padding : 0 6px;
+}
+
+h1
+	{
+	color : #000066;
+	font-size : 20px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h2 {
+	color : #000066;
+	font-size : 18px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h3 {
+	color : #000066;
+	font-size : 16px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h3.alert {
+	background-color: #FFCC33;
+	color: #CC0000;
+	padding: 3px;
+}
+
+h3.title {
+	background-color: #EEF0DB;
+	font-size : 18px;
+	display : block;
+	padding : 5px;
+	margin: 0px auto;
+}
+
+h4 {
+	color : #000066;
+	font-size : 14px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h5 {
+	color : #000066;
+	font-size : 13px;
+	font-weight : bold;
+	margin-bottom : 1px;
+	margin-top : 1px;
+}
+
+h6 {
+	color : #000066;
+	font-size : 12px;
+	font-weight : bold;
+	margin-bottom : 1px;
+	margin-top : 1px;
+}
+
+label {
+	font-weight : bold;
+	padding : 0px 5px 0px 5px;
+}
+
+sup {
+	font-size : .7em;
+	color : #cc0000;
+	font-weight : bold;
+	font-family : "courier new", courier, monospace;
+}
+
+table {
+	background-color : #FFFFCC;
+	border-bottom : 0px solid #000000;
+	border-collapse : collapse;
+	border-left : 0px solid #000000;
+	margin : 3px 0px 5px 0px;
+	padding : 0px;
+	width : 99%;
+}
+
+td {
+	border-bottom : 1px solid #E7E7CA;
+	border-right : 1px solid #E7E7CA;
+	font-size : 12px;
+	padding : 5px 5px 5px 5px;
+}
+
+td:last-child {
+	border-bottom : 1px solid #E7E7CA;
+	border-right : 0px solid #E7E7CA;
+	font-size : 12px;
+	padding : 5px 5px 5px 5px;
+}
+
+td+ul {
+	margin-top : 0px;
+	margin-bottom : 0px;
+}
+
+th {
+	background-color : #D8DEB8;
+	border-bottom : 1px solid #000000;
+	border-right : 1px solid #000000;
+	font-size : 14px;
+	font-weight : bold;
+	padding : 5px 5px 5px 5px;
+}
+
+th:last-child {
+	background-color : #D8DEB8;
+	border-bottom : 1px solid #000000;
+	border-right : 0px solid #000000;
+	font-size : 14px;
+	font-weight : bold;
+	padding : 5px 5px 5px 5px;
+}
+
+td.input, div.form td, div.details td {
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 0px;
+	border-right : 0px;
+	color : #000000;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : right;
+}
+
+td.label, div.form th, div.details th {
+	background-color : #FFC;
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	border-right : 0px;
+	border-top : 0px;
+	color : #000088;
+	font-weight : bold;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : left;
+	vertical-align : top;
+}
+
+td.label {
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	color : #000088;
+	font-weight : bold;
+	line-height : 1.5em;
+	padding : 4px;
+}
+
+tr.highlight, td.highlight {
+	background-color : #FFFFFF;
+}
+
+td.onissue {
+	background-color : #EFF1D8;
+}
+
+tr.highlight td.onissue {
+	background-color : #E7E7CA;
+}
+
+table.marc {
+	background-color : #FFFFCC;
+	border-collapse : collapse;
+	margin : 3px 0px 5px 0px;
+	padding : 0px;
+	width : 95%;
+}
+
+table.marc th {
+	background-color: #E7E7CA;
+	border : 0px;
+	text-align : left;
+	font-weight : normal;
+}
+
+table.marc td.label {
+	color : #000000;
+	font-weight : bold;
+	width : 25%;
+}
+
+table.marc td.data {
+	background-color : #FFFFFF;
+}
+
+/*.barcode {
+	display : block;
+	text-align : right;
+	font-style: italic;
+	font-size : .95em;
+	color: #666633;
+}*/
+
+.cancel {
+	background-color : #993300;
+	color : #FFFFCC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 2px;
+}
+
+td.credit, td.debit, td.sum {
+	font-family : "Courier New", Courier, monospace;
+	text-align : right;
+}
+
+td.debit {
+	color : #990000;
+}
+
+.current {
+	background-color : #FFFFFF;
+	color : #3366CC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+.error {
+	color : #CC0033;
+	font-weight : bold;
+}
+
+.ex {
+	font-family : "Courier New", Courier, monospace;
+}
+
+.form dd {
+	border-bottom : 1px solid #E7E7CA;
+	color : #000000;
+	display : block;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : right;
+}
+
+.form dl {
+	margin : 0px 0px 0px 0px;
+	padding : 3px;
+	width : 80%;
+}
+
+.form dt {
+	border-bottom : 1px solid #E7E7CA;
+	border-left : 1px solid #E7E7CA;
+	color : #000088;
+	float : left;
+	font-weight : bold;
+	line-height : 1.5em;
+	padding : 4px;
+}
+
+.form-help {
+	font-size : 95%;
+	padding-left : 15px;
+}
+
+.inline {
+	display : inline;
+}
+
+.menu input {
+	font-size : 80%;
+}
+
+input.focus {
+	background-color: #FFF;
+	border-bottom: 2px dashed #993300;
+}
+
+input.unfocus {
+	background-color : #FFF;
+}
+
+.nav {
+	font-size : 12px;
+	font-weight : bold;
+	padding : 1px 5px 1px 5px;
+	text-decoration : none;
+}
+
+.print {
+	font-size: 10px;
+}
+
+.submit {
+	background-color : #669999;
+	color : #EEF0DB;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 2px;
+}
+
+td form {
+	margin : 0;
+}
+
+td input.submit {
+	border : 1px outset #CCCC99;
+	color : #FFFFCC;
+	margin : 0 5px 0 0;
+	padding : 0 5px 0 5px;
+}
+
+td input.submit:active {
+	border : 1px inset #cccc99;
+}
+
+td input.delete {
+	border : 1px outset #CCCC99;
+	color : #FFFFCC;
+	background-color : #993300;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 0 5px 0 5px;
+	margin : 0 5px 0 0;
+}
+
+td input.delete:active {
+	border : 1px inset #cccc99;
+}
+
+.thumbnail {
+	float : left;
+	margin : 0 5px 10px 0;
+	border : 0px solid #E7E7CA;
+}
+
+.yes {
+	float: left;
+	padding : 0px 15px 0px 15px;
+	width : 33%;
+	margin : 0px 2px 0px 2px;
+	text-align: center;
+}
+
+.no {
+	float: right;
+	padding : 0px 15px 0px 15px;
+	width : 33%;
+	margin : 0px 2px 0px 2px;
+	text-align: center;
+}
+
+#auth {
+	background-color : transparent;
+	margin : 0 30% 0 30%;
+	padding : 5px;
+}
+
+#auth table {
+	border-collapse : separate;
+}
+
+#auth table td {
+	background-color : #E7E7CA;
+	border-bottom : 1px solid #999933;
+	border-left : 1px solid #FFFFFF;
+	border-right : 1px solid #999933;
+	border-top : 1px solid #FFFFFF;
+	text-align : left;
+}
+
+#auth table th{
+	background-color : #E7E7CA;
+	border-bottom : 1px solid #999933;
+	border-left : 1px solid #FFFFFF;
+	border-right : 1px solid #999933;
+	border-top : 1px solid #FFFFFF;
+	width : 50%;
+	text-align : right;			
+}
+
+#auth p {
+	width : 25%;
+	margin : 0 auto;
+	text-align : center;
+	padding : 0;
+}
+
+#main {
+	background-color : #C2CED3;
+	border-left : 1px solid #000000;
+	margin-left : 18%;
+	margin-right : 2%;
+	margin-top : 2%;
+	padding : 10px;
+}
+
+#main-compact {
+	background-color : #C2CED3;
+	border-left : 1px solid #CCCC99;
+	margin-left : 2%;
+	margin-right : 2%;
+	margin-top : 6%;
+	padding : 10px;	
+}
+
+#menu {
+	background-color : #FFFFCC;
+}
+
+#menu dd {
+	border-bottom : 1px dashed #D8DEB8;
+	border-left : 1px dashed #D8DEB8;
+	border-right : 0px solid #000000;
+	border-top : 0px solid #000000;
+	padding : 3px 45px 3px 10px;
+}
+
+#menu dd a {
+	font-size : 1.05em;
+	font-weight : bold;
+	text-decoration : none;
+}
+
+#menu dd li {
+	display : inline;
+	white-space : nowrap;
+}
+
+#menu dd li:before {
+	content : "\00BB \0020";
+}
+
+#menu dd ul {
+	display : inline;
+	list-style : disc;
+}
+
+#menu dl {
+	margin : 0px;
+	padding : 0px; /*width : 80%;*/
+}
+
+#menu dt {
+	background-color : #FFFFFF;
+	border-bottom : 1px solid #D8DEB8;
+	border-left : 0px solid #D8DEB8;
+	border-right : 0px solid #000000;
+	border-top : 0px solid #000000;
+	color : #000066;
+	font-size : 1.2em;
+	font-weight : bold;
+	padding : 2px 2px 2px 5px;
+}
+
+#menu dt a {
+	text-decoration : none;
+}
+
+#nav {
+	background-color : #C2CED3;
+	position : absolute;
+	left : 1px;
+	margin : 2% 0% 0% 1%;
+	padding : 0px;
+	width : 16%;
+}
+
+#nav .submit {
+	font-size : 9px;
+}
+
+#nav a {
+	font-family : Tahoma, arial, geneva, sans-serif;
+	font-weight : bold;
+	text-decoration : none;
+}
+
+#nav h4 {
+	font-size : 12px;
+	font-weight : bold;
+	margin : 0px;
+	padding : 0px;
+	text-align : left;
+}
+
+#nav input {
+	font-size : .8em;
+}
+
+#nav label {
+	font-size : 10px;
+}
+
+#nav ul {
+	margin : 0px;
+	padding : 0px;
+}
+
+
+#nav ul li {
+	background-color : #C4C6C7;
+	border-bottom : 1px solid #FFFFCC;
+	border-left : 0px solid #FFFFCC;
+	border-right : 0px solid #006699;
+	border-top : 0px solid #FFFFCC;
+	font-size : .8em;
+	list-style : none;
+	padding : 3px;
+	text-align : right;
+	width : 100%;
+}
+
+#nav ul li+li {
+	border-bottom : 1px solid #FFFFCC;
+	border-left : 0px solid #FFFFCC;
+	border-right : 0px solid #006699;
+}
+
+#nav ul ul {
+	margin : 0px 0px 0px 5px;
+}
+
+#nav ul ul li {
+	background-color : #EFF1D8;
+	border-bottom : 1px solid #CCCC99;
+	border-left : 0px solid #FFFFCC;
+	border-right : 0px solid #006699;
+	border-top : 0px solid #FFFFCC;
+	font-size : .9em;
+	list-style : none;
+	margin : 0px 0px 0px 0px;
+	padding : 0px 0px 0px 0px;
+	text-align : right;
+	width : 100%;
+}
+
+#nav ul ul li+li {
+	border-bottom : 1px solid #CCCC99;
+	border-left : 0px solid #FFFFCC;
+	border-right : 0px solid #006699;
+	padding : 0px 0px 0px 0px;
+}
+ul#facets {
+	margin: 3px;
+}
+
+#nav h6 {
+	text-align: center;
+}
+
+#nav ul#facets {
+	margin : 0;
+	padding : 0;
+}
+
+#nav ul#facets li {
+	font-weight: bold;
+	text-align: left;
+}
+
+#nav ul#facets li#branch_facet, #nav ul#facets li#subject_facet, #nav ul#facets li#series_facet, #nav ul#facets li#author_facet {
+}
+
+#nav ul#facets ul li {
+	border: 0;
+	font-size: .95em;
+	font-weight: normal;
+	padding: 2px;
+	text-align: left;
+}
+
+#nav ul#facets ul li a {
+	font-weight: normal;
+	text-decoration: underline;
+}
+
+#nav ul#facets ul li.showmore {
+	text-align: center;
+}
+
+#nav ul#facets ul li.showmore a {
+	font-weight: bold;
+	text-decoration: none;
+}
+#notes {
+	float : right;
+	margin : 0px;
+	font-size : 12px;
+}
+
+#notes ul {
+	margin : 0px;
+	padding : 0px;
+}
+
+#results, .results {
+	color : #000066;
+	font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
+	font-size : .8em;
+	margin : 0px;
+	padding : 3px 0px 15px 0px;
+}
+
+#submenu {
+	background-color: #D8DEB8;
+}
+
+#submenu dl {
+	background-color : #E7E7CA;
+	float: left;
+	font-size : 90%;
+	margin: 10px 10px;
+	padding: 2px 2px 2px 7px;
+	width : 27%;
+}
+
+#submenu dt {
+	font-size: 100%;
+	font-weight : bold;
+}
+
+#submenu dd {
+	margin-left: 2%;
+}
+
+#submenu dd ul {
+	margin-left : 0;
+	padding-left : 7%;
+}
+
+#topmenu {
+	color : #CCCC99;
+	margin-bottom : 5px;
+	margin-left : 20px;
+	margin-right : 10px;
+}
+
+#topmenu .submit {
+	background-color : #999933;
+	color : #FFFFCC;
+	font-size : .7em;
+	padding : 2px;
+}
+
+#topmenu a:link {
+	color : #CCFF66;
+	font-weight : bold;
+	padding : 2px;
+}
+
+#topmenu a:visited {
+	color : #CCFF66;
+	font-weight : bold;
+	padding : 2px;
+}
+
+#topmenu a:hover {
+	color : #FFFFCC;
+	font-weight : bold;
+	padding : 2px;
+}
+
+#topmenu a:active {
+	color : #FFFFCC;
+	font-weight : bold;
+	padding : 2px;
+}
+
+#topmenu form {
+	display : inline;
+}
+
+#topmenu label {
+	font-weight : bold;
+}
+
+.searchresults td {
+	padding : 2px 2px 2px 5px;
+}
+
+.searchresults p {
+	font-size : 1.2em;
+	font-weight : bold;
+	margin : .2em;
+}
+
+.searchresults p+p {
+	font-size : 1em;
+	font-weight : normal;
+	text-indent : 1em;
+}
+
+.searchresults strong a {
+	font-weight : bold;
+	font-size : 14px;
+}
+
+div.members th {
+	background-color : #FFFFCC;
+	border-bottom : 1px solid #E7E7CA;
+	border-right : 1px solid #E7E7CA;
+	font-size : 12px;
+	padding : 3px 5px;
+	width : 25%;
+	font-weight : bold;
+	text-align : left;
+	vertical-align : top;
+}
+
+div.members th label {
+	display : block;
+	margin : 0;
+	padding : 0;
+}
+
+div.members label.focus {
+	color : #cc0000;
+}
+
+div.members th p, div.compact th p {
+	font-weight : normal;
+	padding : 0;
+	margin : 0;
+	text-indent : 1em;
+}
+
+td fieldset {
+	border : 1px solid #CCCCCC;
+	margin : 0 0 3px 0;
+	padding : 0 0 3px 0;
+}
+
+fieldset label {
+	float : left;
+	margin-left : 3px;
+	width : 25%;
+}
+
+td legend {
+	margin : 0;
+	padding : 4px;
+}
+
+table.editing tr:hover td {
+	background-color: #EFF1D8;
+}
+
+tfoot {
+	background-color : #E7E7CA;
+	font-weight : bold;
+}
+
+tfoot td, tfoot td:last-child {
+	border-right : 1px solid #999900;
+	border-bottom : 1px solid #999900;
+}
+
+div.data table, div.data-main table {
+	background-color: #D8DeB8;
+	border-collapse: collapse;
+	margin : auto;
+	margin : 0 0 5px 0;
+}
+
+div.data table caption {
+	font-size : 1em;
+}
+
+div.data-main table caption {
+	font-size : 1.1em;
+}
+
+div.data table td, div.data-main table td {
+	border-right : 1px solid #CCCC99;
+	border-bottom : 1px solid #CCCC99;
+	background-color: #FFFFCC;
+	font-size: 12px;
+	padding : 2px;
+	padding-left : .7em;
+	margin : 0 0 0 0;
+}
+
+div.data-main table td {
+	background-color : #FFFFE1;
+}
+
+div.data table th, div.data-main table th  {
+	border-left : 1px solid #999933;
+	border-right : 1px solid #CCCC99;
+	border-bottom : 1px solid #CCCC99;
+	font-size : 12px;
+	font-weight: bold;
+	text-align : right;
+	padding : 2px;
+	padding-right : 1em;
+	background-color: #E7E7CA;
+	width : 17%;
+}
+
+div.data-main table th {
+	background-color : #EFF1D8;
+}
+
+div.data table tr.highlight td {
+	background-color: #FFFFE1;
+}
+
+div.data table th[scope=col], div.data-main table th[scope=col] {
+	text-align: center;
+	border-left : 0;
+}
+
+div.data table col, div.data-main table col {
+	background-color : #CCCCCC;
+}
+
+.accesskey {
+	text-decoration : underline;
+}
+/* MAIN MENU STYLES */
+#mainmenu {
+    display:block;
+    float:left;
+    margin-right:20px;
+    border-right:1px solid black;
+}
+
+#mainmenu a {
+    display:block;
+    margin:5px;
+    text-decoration:none;
+    color:black;
+}
+#mainmenu a:hover {
+    display:block;
+    margin:5px;
+    background-color:#6699cc;
+    color:white;
+}
+
+/* submenus styles */
+#submenu {
+    margin-left:10%;
+}
+#submenu a {
+    margin:5px;
+    text-decoration:none;
+    color:black;
+}
+#submenu a:hover {
+    margin:5px;
+    background-color:#6699cc;
+    color:white;
+}
+
+/* the USER information block */
+#librarian_information {
+/*     position:absolute; */
+    float:right;
+    font-size:10pt;
+}
+

Index: koha-tmpl/intranet-tmpl/default/en/includes/livesearch-en.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/livesearch-en.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/livesearch-en.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/livesearch-en.js	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,205 @@
+
+	/*
+// +----------------------------------------------------------------------+
+// | Copyright (c) 2005 LibLime                                           |
+// +----------------------------------------------------------------------+
+// | Licensed under the Apache License, Version 2.0 (the "License");      |
+// | you may not use this file except in compliance with the License.     |
+// | You may obtain a copy of the License at                              |
+// | http://www.apache.org/licenses/LICENSE-2.0                           |
+// | Unless required by applicable law or agreed to in writing, software  |
+// | distributed under the License is distributed on an "AS IS" BASIS,    |
+// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or      |
+// | implied. See the License for the specific language governing         |
+// | permissions and limitations under the License.                       |
+// +----------------------------------------------------------------------+
+// | Author: Joshua Ferraro <jmf at liblime dot com>                      |
+// | Thanks to Bitflux GmbH <devel at bitflux dot ch>                     |
+// +----------------------------------------------------------------------+
+
+*/
+
+var liveSearchReq = false;
+var t = null;
+var liveSearchLast = "";
+	
+var isIE = false;
+// on !IE we only have to initialize it once
+if (window.XMLHttpRequest) {
+	liveSearchReq = new XMLHttpRequest();
+}
+
+function liveSearchInit() {
+	
+	if (navigator.userAgent.indexOf("Safari") > 0) {
+		document.getElementById('keyword').addEventListener("keydown",liveSearchKeyPress,false);
+//		document.getElementById('keyword').addEventListener("blur",liveSearchHide,false);
+	} else if (navigator.product == "Gecko") {
+		
+		document.getElementById('keyword').addEventListener("keypress",liveSearchKeyPress,false);
+		document.getElementById('keyword').addEventListener("blur",liveSearchHideDelayed,false);
+		
+	} else {
+		document.getElementById('keyword').attachEvent('onkeydown',liveSearchKeyPress);
+//		document.getElementById('keyword').attachEvent("onblur",liveSearchHide,false);
+		isIE = true;
+	}
+	
+	document.getElementById('keyword').setAttribute("autocomplete","off");
+
+}
+
+function liveSearchHideDelayed() {
+	window.setTimeout("liveSearchHide()",400);
+}
+	
+function liveSearchHide() {
+	document.getElementById("LSResult").style.display = "none";
+	var highlight = document.getElementById("LSHighlight");
+	if (highlight) {
+		highlight.removeAttribute("id");
+	}
+
+	//make visible the select box in IE
+	if (isIE) {
+		if (document.getElementById("id1")) {	
+			document.getElementById("id1").style.visibility = 'visible';
+			document.getElementById("id2").style.visibility = 'visible';
+		}
+	}
+}
+
+function liveSearchKeyPress(event) {
+
+	if (event.keyCode == 40 )
+	//KEY DOWN
+	{
+		highlight = document.getElementById("LSHighlight");
+		if (!highlight) {
+			highlight = document.getElementById("LSShadow").firstChild.firstChild;
+		} else {
+			highlight.removeAttribute("id");
+			highlight = highlight.nextSibling;
+		}
+		if (highlight) {
+			highlight.setAttribute("id","LSHighlight");
+		} 
+		if (!isIE) { event.preventDefault(); }
+	} 
+	//KEY UP
+	else if (event.keyCode == 38 ) {
+		highlight = document.getElementById("LSHighlight");
+		if (!highlight) {
+			highlight = document.getElementById("LSResult").firstChild.firstChild.lastChild;
+		} 
+		else {
+			highlight.removeAttribute("id");
+			highlight = highlight.previousSibling;
+		}
+		if (highlight) {
+				highlight.setAttribute("id","LSHighlight");
+		}
+		if (!isIE) { event.preventDefault(); }
+	} 
+	//ESC
+	else if (event.keyCode == 27) {
+		highlight = document.getElementById("LSHighlight");
+		if (highlight) {
+			highlight.removeAttribute("id");
+		}
+		document.getElementById("LSResult").style.display = "none";
+		
+		//make visible the select box in IE
+		if (isIE) {
+			if (document.getElementById("id1")) {	
+				document.getElementById("id1").style.visibility = 'visible';
+				document.getElementById("id2").style.visibility = 'visible';
+			}
+		}
+	} 
+}
+function liveSearchStart() {
+	if (t) {
+		window.clearTimeout(t);
+	}
+	t = window.setTimeout("liveSearchDoSearch()",100);
+}
+
+function liveSearchDoSearch() {
+
+	if (typeof liveSearchRoot == "undefined") {
+		liveSearchRoot = "";
+	}
+	if (typeof liveSearchRootSubDir == "undefined") {
+		liveSearchRootSubDir = "";
+	}
+	if (typeof liveSearchParams == "undefined") {
+		liveSearchParams = "";
+	}
+	if (liveSearchLast != document.forms.keyword.keyword.value) {
+	if (liveSearchReq && liveSearchReq.readyState < 4) {
+		liveSearchReq.abort();
+	}
+	if ( document.forms.keyword.keyword.value == "") {
+		liveSearchHide();
+		return false;
+	}
+	if (window.XMLHttpRequest) {
+	// branch for IE/Windows ActiveX version
+	} else if (window.ActiveXObject) {
+		liveSearchReq = new ActiveXObject("Microsoft.XMLHTTP");
+	}
+	liveSearchReq.onreadystatechange= liveSearchProcessReqChange;
+	liveSearchReq.open("GET", liveSearchRoot + "/cgi-bin/koha/livesearch.pl?value=" + document.forms.keyword.keyword.value + liveSearchParams+"&lang=english");
+	liveSearchLast = document.forms.keyword.keyword.value;
+	liveSearchReq.send(null);
+	}
+}
+
+function liveSearchProcessReqChange() {
+	
+	if (liveSearchReq.readyState == 4) {
+		var  res = document.getElementById("LSResult");
+		res.style.display = "block";
+		var  sh = document.getElementById("LSShadow");
+		sh.innerHTML = liveSearchReq.responseText;
+
+		//hide the select box in IE
+		if (isIE) {
+			if (document.getElementById("id1")) {	
+				document.getElementById("id1").style.visibility = 'hidden';
+				document.getElementById("id2").style.visibility = 'hidden';
+			}
+		}
+		 
+	}
+}
+
+function liveSearchSubmit() {
+	var highlight = document.getElementById("LSHighlight");
+	if (highlight && highlight.firstChild) {
+		window.location = liveSearchRoot + liveSearchRootSubDir + highlight.firstChild.getAttribute("href");
+		return false;
+	} 
+	else {
+		return (document.keyword.keyword.value != '');
+	}
+}
+
+// for mouseovers
+function liveSearchHover(el) {
+		highlight = document.getElementById("LSHighlight");
+		if (highlight) {
+			highlight.removeAttribute("id");
+		}
+		el.setAttribute("id","LSHighlight");
+}
+
+function liveSearchClicked(el) {
+		highlight = document.getElementById("LSHighlight");
+		if (highlight) {
+			highlight.removeAttribute("id");
+		}
+		el.setAttribute("id","LSHighlight");
+		return liveSearchSubmit();
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/livesearch.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/livesearch.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/livesearch.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/livesearch.css	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,81 @@
+/* LiveSearch */
+
+#keyword {
+	margin: 0 25px 5px 0;
+	padding:0px;
+	width: 200px;
+	display: block;
+	border:1px solid #99b58d;
+}
+
+
+#LSResult {
+	position: absolute;
+	background-color: #aaa;
+	width: 450px;
+	margin: 1px 0px 2px 0px;
+      	padding: 0px;
+	font-size:80%
+}
+
+#LSResult li {
+	padding-bottom: 2px;
+    	padding-top: 2px;
+	line-height:normal;
+	margin-bottom: 0px;
+}
+
+
+ul#LSShadow {
+      	position: relative;
+	right: 1px;
+	margin: 0px;
+	padding: 0px;
+	background-color: #666; /*shadow color*/
+	color: inherit;
+}
+#LSResult ul {
+	list-style-position:outside;
+	margin-bottom: -5px;
+	margin-top: 0px;
+	padding-top: 0px;
+	margin: 0px;
+	padding: 0px;
+}
+
+#LSResult ul li {
+	text-indent: -20px;
+	padding: 0px 15px 0 20px;
+	margin-top:0;
+	list-style-type:none;
+}
+
+.LSRes {
+	position: relative;	
+	bottom: 1px;
+	right: 1px;
+	background-color: white;
+	border:  1px solid #AAA;
+	
+    }
+#LSHighlight {
+	color: #564b47;
+	background-color: #ccc;
+}
+.LSRes li a {
+	text-decoration: none;
+	color:black;
+	cursor:default;
+
+}
+.LSResRight {
+	position:absolute;
+	right:2px;
+	display:inline;
+	padding:1;margin:1;
+	width:100%;
+	color:navy;
+	text-align:right;
+
+}
+

Index: koha-tmpl/intranet-tmpl/default/en/includes/livesearch.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/livesearch.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/livesearch.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/livesearch.js	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,205 @@
+
+	/*
+// +----------------------------------------------------------------------+
+// | Copyright (c) 2005 LibLime                                           |
+// +----------------------------------------------------------------------+
+// | Licensed under the Apache License, Version 2.0 (the "License");      |
+// | you may not use this file except in compliance with the License.     |
+// | You may obtain a copy of the License at                              |
+// | http://www.apache.org/licenses/LICENSE-2.0                           |
+// | Unless required by applicable law or agreed to in writing, software  |
+// | distributed under the License is distributed on an "AS IS" BASIS,    |
+// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or      |
+// | implied. See the License for the specific language governing         |
+// | permissions and limitations under the License.                       |
+// +----------------------------------------------------------------------+
+// | Author: Joshua Ferraro <jmf at liblime dot com>                      |
+// | Thanks to Bitflux GmbH <devel at bitflux dot ch>                     |
+// +----------------------------------------------------------------------+
+
+*/
+
+var liveSearchReq = false;
+var t = null;
+var liveSearchLast = "";
+	
+var isIE = false;
+// on !IE we only have to initialize it once
+if (window.XMLHttpRequest) {
+	liveSearchReq = new XMLHttpRequest();
+}
+
+function liveSearchInit() {
+	
+	if (navigator.userAgent.indexOf("Safari") > 0) {
+		document.getElementById('keyword').addEventListener("keydown",liveSearchKeyPress,false);
+//		document.getElementById('keyword').addEventListener("blur",liveSearchHide,false);
+	} else if (navigator.product == "Gecko") {
+		
+		document.getElementById('keyword').addEventListener("keypress",liveSearchKeyPress,false);
+		document.getElementById('keyword').addEventListener("blur",liveSearchHideDelayed,false);
+		
+	} else {
+		document.getElementById('keyword').attachEvent('onkeydown',liveSearchKeyPress);
+//		document.getElementById('keyword').attachEvent("onblur",liveSearchHide,false);
+		isIE = true;
+	}
+	
+	document.getElementById('keyword').setAttribute("autocomplete","off");
+
+}
+
+function liveSearchHideDelayed() {
+	window.setTimeout("liveSearchHide()",400);
+}
+	
+function liveSearchHide() {
+	document.getElementById("LSResult").style.display = "none";
+	var highlight = document.getElementById("LSHighlight");
+	if (highlight) {
+		highlight.removeAttribute("id");
+	}
+
+	//make visible the select box in IE
+	if (isIE) {
+		if (document.getElementById("id1")) {	
+			document.getElementById("id1").style.visibility = 'visible';
+			document.getElementById("id2").style.visibility = 'visible';
+		}
+	}
+}
+
+function liveSearchKeyPress(event) {
+
+	if (event.keyCode == 40 )
+	//KEY DOWN
+	{
+		highlight = document.getElementById("LSHighlight");
+		if (!highlight) {
+			highlight = document.getElementById("LSShadow").firstChild.firstChild;
+		} else {
+			highlight.removeAttribute("id");
+			highlight = highlight.nextSibling;
+		}
+		if (highlight) {
+			highlight.setAttribute("id","LSHighlight");
+		} 
+		if (!isIE) { event.preventDefault(); }
+	} 
+	//KEY UP
+	else if (event.keyCode == 38 ) {
+		highlight = document.getElementById("LSHighlight");
+		if (!highlight) {
+			highlight = document.getElementById("LSResult").firstChild.firstChild.lastChild;
+		} 
+		else {
+			highlight.removeAttribute("id");
+			highlight = highlight.previousSibling;
+		}
+		if (highlight) {
+				highlight.setAttribute("id","LSHighlight");
+		}
+		if (!isIE) { event.preventDefault(); }
+	} 
+	//ESC
+	else if (event.keyCode == 27) {
+		highlight = document.getElementById("LSHighlight");
+		if (highlight) {
+			highlight.removeAttribute("id");
+		}
+		document.getElementById("LSResult").style.display = "none";
+		
+		//make visible the select box in IE
+		if (isIE) {
+			if (document.getElementById("id1")) {	
+				document.getElementById("id1").style.visibility = 'visible';
+				document.getElementById("id2").style.visibility = 'visible';
+			}
+		}
+	} 
+}
+function liveSearchStart() {
+	if (t) {
+		window.clearTimeout(t);
+	}
+	t = window.setTimeout("liveSearchDoSearch()",100);
+}
+
+function liveSearchDoSearch() {
+
+	if (typeof liveSearchRoot == "undefined") {
+		liveSearchRoot = "";
+	}
+	if (typeof liveSearchRootSubDir == "undefined") {
+		liveSearchRootSubDir = "";
+	}
+	if (typeof liveSearchParams == "undefined") {
+		liveSearchParams = "";
+	}
+	if (liveSearchLast != document.forms.keyword.keyword.value) {
+	if (liveSearchReq && liveSearchReq.readyState < 4) {
+		liveSearchReq.abort();
+	}
+	if ( document.forms.keyword.keyword.value == "") {
+		liveSearchHide();
+		return false;
+	}
+	if (window.XMLHttpRequest) {
+	// branch for IE/Windows ActiveX version
+	} else if (window.ActiveXObject) {
+		liveSearchReq = new ActiveXObject("Microsoft.XMLHTTP");
+	}
+	liveSearchReq.onreadystatechange= liveSearchProcessReqChange;
+	liveSearchReq.open("GET", liveSearchRoot + "/cgi-bin/koha/livesearch.pl?value=" + document.forms.keyword.keyword.value + liveSearchParams);
+	liveSearchLast = document.forms.keyword.keyword.value;
+	liveSearchReq.send(null);
+	}
+}
+
+function liveSearchProcessReqChange() {
+	
+	if (liveSearchReq.readyState == 4) {
+		var  res = document.getElementById("LSResult");
+		res.style.display = "block";
+		var  sh = document.getElementById("LSShadow");
+		sh.innerHTML = liveSearchReq.responseText;
+
+		//hide the select box in IE
+		if (isIE) {
+			if (document.getElementById("id1")) {	
+				document.getElementById("id1").style.visibility = 'hidden';
+				document.getElementById("id2").style.visibility = 'hidden';
+			}
+		}
+		 
+	}
+}
+
+function liveSearchSubmit() {
+	var highlight = document.getElementById("LSHighlight");
+	if (highlight && highlight.firstChild) {
+		window.location = liveSearchRoot + liveSearchRootSubDir + highlight.firstChild.getAttribute("href");
+		return false;
+	} 
+	else {
+		return (document.keyword.keyword.value != '');
+	}
+}
+
+// for mouseovers
+function liveSearchHover(el) {
+		highlight = document.getElementById("LSHighlight");
+		if (highlight) {
+			highlight.removeAttribute("id");
+		}
+		el.setAttribute("id","LSHighlight");
+}
+
+function liveSearchClicked(el) {
+		highlight = document.getElementById("LSHighlight");
+		if (highlight) {
+			highlight.removeAttribute("id");
+		}
+		el.setAttribute("id","LSHighlight");
+		return liveSearchSubmit();
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/main-top-addbiblio.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/main-top-addbiblio.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/main-top-addbiblio.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/main-top-addbiblio.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Koha Intranet</title>
+<!-- TMPL_IF NAME="TemplateEncoding" -->
+<meta http-equiv="Content-Type" content="text/html; charset=<!-- TMPL_VAR NAME='TemplateEncoding' -->" />
+<!-- TMPL_ELSE -->
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<!-- /TMPL_IF -->
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	<!-- TMPL_IF NAME="intranetstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetstylesheet" -->);<!-- TMPL_ELSE -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);<!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="intranetcolorstylesheet" -->@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/<!-- TMPL_VAR NAME="intranetcolorstylesheet" -->);<!-- /TMPL_IF -->
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/tabs.css);
+</style>
+<script language="JavaScript" type="text/javascript">
+<!-- Hide from old browsers
+function openWindow(targeturl, windowname) {
+// newwin =
+// window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+	location.href = targeturl;
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+// end hiding -->
+</script>
+</head>
+
+<body onload="showPanel(1);">

Index: koha-tmpl/intranet-tmpl/default/en/includes/main-top-blank.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/main-top-blank.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/main-top-blank.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/main-top-blank.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Koha Intranet</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/blank.css);
+</style>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/main-top-circ.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/main-top-circ.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/main-top-circ.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/main-top-circ.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,45 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Koha Intranet</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+<script language="JavaScript" type="text/javascript">
+<!-- Hide from old browsers
+function openWindow(targeturl, windowname) {
+// newwin =
+// window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+	location.href = targeturl;
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+// end hiding -->
+</script>
+</head>
+
+<body onload="document.forms['mainform'].elements[0].focus();">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/main-top-print.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/main-top-print.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/main-top-print.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/main-top-print.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Koha Intranet</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/print.css);
+</style>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/main-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/main-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/main-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/main-top.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>NEULIS</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="shortcut icon" href="<!-- TMPL_VAR NAME='themelang' -->/includes/favicon.ico" type="image/x-icon" />
+<style type="text/css"> 
+	@import url(<!-- TMPL_VAR NAME='themelang' -->/includes/intranet.css);
+</style>
+<script language="JavaScript" type="text/javascript">
+
+
+function openWindow(targeturl, windowname) {
+// newwin =
+// window.open(targeturl,windowname,"height=480,width=640,scrollbars,resizable")
+	location.href = targeturl;
+}
+ 
+ 	var newwin;
+	
+	// Open the popup window if it doesn't already exist and give it focus.
+	function PopWin(targeturl, windowname) {
+	
+		if (!newwin || newwin.closed) newwin = window.open(targeturl,windowname, "height=300,width=400,scrollbars=yes,resizable=yes");
+	  newwin.focus();
+	}
+	
+  // Set the value of the form field to the passed value and optionally shift
+	// focus and close the popup.
+	function FillForm(val,formname,formfield) {
+	
+		document.forms[formname].elements[formfield].value = val;
+
+		// Uncomment below to shift focus after clicking link in popup.
+		document.forms[formname].elements[formfield].focus();
+		
+		// Uncomment below to close popup after clicking link.
+		newwin.close();
+	}
+ 
+
+</script>
+</head>
+
+<body>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/main.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/main.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/main.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/main.js	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,10 @@
+// one window.onload to rule them all
+
+window.onload=kohajs;
+
+// check to see if functions exist before loading them
+function kohajs() {
+  if ( typeof window.verify_images == "function" ) verify_images();
+//  if ( typeof window.liveSearchInit == "function" ) liveSearchInit();
+  if ( typeof window.runLSPrep == "function" ) runLSPrep();
+}

Index: koha-tmpl/intranet-tmpl/default/en/includes/marc-editor-old.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/marc-editor-old.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/marc-editor-old.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/marc-editor-old.css	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,90 @@
+div.tabbed {
+	border : 1px solid red;
+	/*position: absolute;*/
+	margin-left:5%;
+	width:90%;
+/*	display:block;*/
+}
+
+div.tabs {
+/*	border : 1px solid aqua;*/
+	float : left;
+	margin : 5px 0 0 0;
+/*	position:absolute;
+	margin-left: .5em;
+	margin-top:110px;*/
+}
+
+div.tabs a {
+	display:block;
+	background-color: #D8DEB8;
+	color: #000066;
+	font-weight : bold;
+	text-decoration : none;
+	border-bottom : 1px solid #999933;
+	border-left : 1px solid #999933;
+	border-right : 1px solid #FFFFCC;
+	border-top : 1px solid #FFFFCC;
+	margin : 0 0 2px 0;
+	padding: 10px 5px 10px 5px;
+}
+
+div.tabs a:hover {
+	background-color : #CCFF99;
+	border-left : 1px solid #000066;
+	border-bottom : 1px solid #000066;
+}
+
+div.tab {
+	background-color : #FFFFCC;
+	border : 1px solid #D8DEB8;
+	border-top : 1px solid #FFFFCC;
+	display: block;
+	visibility:hidden;
+	position : absolute;
+	margin : 5px 0 0 10px;
+	padding : 3px;
+	width : 70%;
+	/*margin-top:110px;*/
+}
+
+/* style for tag definition (e.g. 700 - Statement of responsibility) */
+.MARCtag { 
+	clear : left;
+	color : #000000;
+	background-color : #FFFFCC;
+	border-top : 5px solid #FFFFCC;
+	border-bottom : thin solid #CCCC99;
+	font-weight : bold;
+	font-size : .8em;
+	margin-top : 5px;
+}
+
+div.tab p {
+	margin : 3px;
+}	
+
+/* style for each subfield (e.g.: Publication year), just before the biblio subfield */
+.labelsubfield { 
+	background-color : #FFFFE1;
+/*	border : 1px solid red;*/
+	clear : left;
+	float : left;
+	font-size : .8em;
+	font-weight : normal;
+	width : 12em;
+	margin-left : 30px;
+	display : inline;
+}
+
+#loading {
+	position: absolute;
+	top: 3em;
+	left: 3em;
+	padding: 1em;
+	mozopacity: 50%;
+	background-color: #FFFFFF;
+	border: 10px solid #CCCC99;
+	font-size: 1.5em;
+	z-index: 999;
+	}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/marc-editor.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/marc-editor.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/marc-editor.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/marc-editor.css	26 Mar 2007 02:19:22 -0000	1.8.2.1
@@ -0,0 +1,90 @@
+div.tabbed {
+	border : 1px solid red;
+	/*position: absolute;*/
+	margin-left:5%;
+	width:90%;
+/*	display:block;*/
+}
+
+div.tabs {
+/*	border : 1px solid aqua;*/
+	float : left;
+	margin : 5px 0 0 0;
+/*	position:absolute;
+	margin-left: .5em;
+	margin-top:110px;*/
+}
+
+div.tabs a {
+	display:block;
+	background-color: #D8DEB8;
+	color: #000066;
+	font-weight : bold;
+	text-decoration : none;
+	border-bottom : 1px solid #999933;
+	border-left : 1px solid #999933;
+	border-right : 1px solid #FFFFCC;
+	border-top : 1px solid #FFFFCC;
+	margin : 0 0 2px 0;
+	padding: 10px 5px 10px 5px;
+}
+
+div.tabs a:hover {
+	background-color : #CCFF99;
+	border-left : 1px solid #000066;
+	border-bottom : 1px solid #000066;
+}
+
+div.tab {
+	background-color : #FFFFCC;
+	border : 1px solid #D8DEB8;
+	border-top : 1px solid #FFFFCC;
+	display: block;
+	visibility:hidden;
+	position : absolute;
+	margin : 5px 0 0 10px;
+	padding : 3px;
+	width : 70%;
+	/*margin-top:110px;*/
+}
+
+/* style for tag definition (e.g. 700 - Statement of responsibility) */
+.MARCtag { 
+	clear : left;
+	color : #000000;
+	background-color : #FFFFCC;
+	border-top : 5px solid #FFFFCC;
+	border-bottom : thin solid #CCCC99;
+	font-weight : bold;
+	font-size : .7em;
+	margin-top : 5px;
+}
+
+div.tab p {
+	margin : 3px;
+}	
+
+/* style for each subfield (e.g.: Publication year), just before the biblio subfield */
+.labelsubfield { 
+	background-color : #FFFFE1;
+/*	border : 1px solid red;*/
+	clear : left;
+	float : left;
+	font-size : .7em;
+	font-weight : normal;
+	width : 12em;
+	margin-left : 20px;
+	display : inline;
+}
+
+#loading {
+	position: absolute;
+	top: 3em;
+	left: 3em;
+	padding: 1em;
+	mozopacity: 50%;
+	background-color: #FFFFFF;
+	border: 10px solid #CCCC99;
+	font-size: 1.5em;
+	z-index: 999;
+	}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/masthead.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/masthead.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/masthead.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/masthead.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1 @@
+<div id="help">KOHA Intranet&nbsp;<span class="loggedin"><!-- TMPL_IF NAME="loggedinusername" -->Logged in as: <span class="loggedinusername"><!-- TMPL_VAR NAME="loggedinusername" --></span> | <a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a> | <!-- TMPL_ELSE -->You are not logged in | <!-- /TMPL_IF --></span><a href="/cgi-bin/koha/help.pl" onclick="Help(); return false;">[ ? ]</a></div>

Index: koha-tmpl/intranet-tmpl/default/en/includes/masthead_adv.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/masthead_adv.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/masthead_adv.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/masthead_adv.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,19 @@
+<div id="masthead">
+<h1><!-- TMPL_IF NAME="opacsmallimage" --><img alt="<!-- TMPL_VAR NAME="LibraryName" -->" src="<!-- TMPL_VAR NAME="opacsmallimage" -->" /><!-- /TMPL_IF -->Library Catalog Search</h1>
+<div class="menu"><a href="/cgi-bin/koha/opac-main.pl">Search Home</a> <!-- TMPL_IF NAME="opacbookbag" -->| <a href="" onclick="openBasket(); return false;" title="A &quot;shopping cart&quot; for your selections">Book Bag<span id="basket"><script language="javascript" type="text/javascript">if(basketcount){ document.write(basketcount) };</script></span></a><!-- /TMPL_IF --></div><br class="clear">
+
+<!-- TMPL_IF NAME="opacuserlogin" --><!-- TMPL_IF NAME="loggedinusername" --><div id="members">
+	<ul>
+		<li>Logged in as <span class="loggedinusername"><!-- TMPL_LOOP NAME="USER_INFO" --><!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- /TMPL_LOOP --></span></li>
+		<!--TMPL_IF NAME="virtualshelves" --><li><a href="/cgi-bin/koha/opac-shelves.pl">My Virtual Shelves</a></li><!-- /TMPL_IF -->
+		<li><a href="/cgi-bin/koha/opac-user.pl">My Account</a></li>
+		<li><a class="logout" href="/cgi-bin/koha/opac-logout.pl">Log Out</a></li>
+	</ul>	
+</div>
+<!-- TMPL_ELSE -->
+	<div id="members">
+		<a class="card" href="/cgi-bin/koha/opac-user.pl">Log in to access<br /> cardholder features</a>
+	</div>
+<!-- /TMPL_IF -->
+<br class="clear" /><!-- /TMPL_IF -->
+</div>

Index: koha-tmpl/intranet-tmpl/default/en/includes/members-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/members-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/members-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/members-topmenu.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,6 @@
+<div id="topmenu"><a href="/cgi-bin/koha/members/members-home.pl">Patrons Home</a> | <form action="/cgi-bin/koha/members/member.pl" method="post">
+<label for="member">Patron Search</label>
+  <input type="text" id="member" name="member" value="" />&nbsp;<input type="submit"  class="submit" name="Go" value="Search" /></form><form action="/cgi-bin/koha/members/memberentry.pl" method="post">
+<input type="submit" class="submit" value="Add New Patron" />
+<input type="hidden" name="actionType" value="Add" />
+</form></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-acqui.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-acqui.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-acqui.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-acqui.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,9 @@
+<div id="nav">
+<ul><li><a href="/cgi-bin/koha/mainpage.pl">Home page</a></li></ul>
+    <li><a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquitions home page</a></li>
+   <li> <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=0">Add supplier</a></li>
+   <li> <a href="/cgi-bin/koha/acqui/lateorders.pl">Late orders</a></li>
+    <li><a href="/cgi-bin/koha/acqui/histsearch.pl">History search</a></li>
+    <li><a href="/cgi-bin/koha/suggestion/acceptorreject.pl">Manage suggestions</a></li>
+    <li><a href="/cgi-bin/koha/admin/aqbookfund.pl">Parameters</a></li>
+</div>

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-admin.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-admin.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-admin.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-admin.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,18 @@
+<div id="submenu">
+	<a href="/cgi-bin/koha/admin/systempreferences.pl">System pref</a>
+	<a href="/cgi-bin/koha/admin/branches.pl">Branches</a>
+	<a href="/cgi-bin/koha/admin/aqbookfund.pl">Funds</a>
+	<a href="/cgi-bin/koha/admin/currency.pl">Currencies</a>
+	<a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a>
+	<a href="/cgi-bin/koha/admin/categorie.pl">Borrower categories</a>
+	<a href="/cgi-bin/koha/admin/issuingrules.pl">Issuing rules</a>
+	<a href="/cgi-bin/koha/admin/authorised_values.pl">Authorised values</a>
+	<a href="/cgi-bin/koha/admin/authtypes.pl">Thesaurus</a>
+	<a href="/cgi-bin/koha/admin/biblio_framework.pl">Biblio Framework</a>
+	<a href="/cgi-bin/koha/admin/koha2marclinks.pl">Links Koha-MARC DB</a>
+	<a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Check</a>
+	<a href="/cgi-bin/koha/admin/printers.pl">Printers</a>
+	<a href="/cgi-bin/koha/admin/stopwords.pl">Stop words</a>
+	<a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50 Servers</a>
+	<a href="/cgi-bin/koha/import/breeding.pl">Reservoir</a>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-authorities.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-authorities.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-authorities.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-authorities.inc	26 Mar 2007 02:19:22 -0000	1.1.2.1
@@ -0,0 +1,15 @@
+<script language="JavaScript" type="text/javascript">
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+
+function addauthority() {
+	X = document.forms[0].authtype.value;
+	window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
+}
+function searchauthority() {
+	X = document.forms[0].authtype2.value;
+	Y = document.forms[0].value.value;
+	window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
+}
+</script>

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-catalogue.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-catalogue.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-catalogue.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-catalogue.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,7 @@
+<div id="submenu">
+	<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;marc=1&amp;type=intranet">Search</a>
+	<a href="/cgi-bin/koha/loadmodules.pl?module=addbiblio&amp;type=intranet">Add biblio</a>
+	<a class="submenu serial" href="/cgi-bin/koha/serials/serials-home.pl">Subscriptions</a>
+	<a href="/cgi-bin/koha/serials/lateissues.pl">Late issues</a>
+	<a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual shelves</a>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-circ.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-circ.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-circ.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-circ.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,10 @@
+<div id="submenu">
+    <a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
+    <a href="/cgi-bin/koha/circ/circulation.pl">Issues</a>
+    <a href="/cgi-bin/koha/circ/returns.pl">Returns</a>
+    <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a>
+    <a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set branch</a>
+    <a href="/cgi-bin/koha/circ/branchreserves.pl">Waiting reserves</a>
+    <a href="/cgi-bin/koha/circ/waitingreservestransfers.pl">Transfers to do</a>
+    <a href="/cgi-bin/koha/circ/currenttransfers.pl">Transfers to recieve</a>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-main.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-main.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-main.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-main.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,34 @@
+
+<div id="subnav">
+ <ul>
+    <li>
+         <form name="formcirc" method="post" action="/cgi-bin/koha/circ/circulation.pl">
+        <label for="navfindborrower">Iss<span class="accesskey">u</span>e to:</label>
+        <input id="navfindborrower" name="findborrower" type="text" size="10" accesskey="u" />
+        <input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" -->
+        " />
+        <input type="hidden" name="printer" value="<!-- TMPL_VAR name="printer" -->
+        " />
+        <input type="submit" class="submit" value="Submit" />
+      </form>
+    </li></ul></li>
+<ul>
+    <li><a accesskey="r" href="/cgi-bin/koha/circ/returns.pl"><span class="accesskey">R</span>eturns</a>
+   <li> <a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfers</a></li></li></ul>
+  <ul><li><label>Reserve Section</label>
+<a href="/cgi-bin/koha/circ/rescirculation.pl">Issue</a></li>
+<li><label>Reserve Section </label><a href="/cgi-bin/koha/circ/resreturns.pl">Return</a></li></ul>
+<li><a href="/cgi-bin/koha/members/members-home.pl">Users</a>
+<ul><li><form name="fmember" action="/cgi-bin/koha/members/member.pl" method="post">
+	<label for="navmember">Search:</label><input id="navmember" type="text" size="10" name="member" />
+	<input type="submit" value="Search" class="submit" />
+
+	</form></li></ul></li>
+
+	<li><a href="/cgi-bin/koha/catalogue/catalogue-search.pl">Catalogue Search</a></li>
+<ul>
+<li><form name="form1" method="post" action="/cgi-bin/koha/catalogue/catalogue-search.pl"><input type="hidden" name="op" value="do_search" /><input type="hidden" name="search_type" value="precise" /><input type="hidden" name="zoom" value="0" /><input type="hidden" name="number_to_display" value="10" /><label><span class="accesskey">Barcode:</span></label><input type="text" id="barcode" name="barcode" size="10"  /><input type="submit" value="Search" class="submit"></form></li>
+<li><form name="form2" method="post" action="/cgi-bin/koha/catalogue/catalogue-search.pl"><input type="hidden" name="op" value="do_search" /><input type="hidden" name="kohafield" value="" /><input type="hidden" name="zoom" value="1" /><input type="hidden" name="MARC" value="0" /><input type="hidden" name="number_to_display" value="10" /><label><span class="accesskey">Keyword Search:</span></label><input type="text"  name="value" size="10"  /><input type="submit" value="Search" class="submit"></form></li>
+</ul>
+</div>
+<div id="main">
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-members.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-members.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-members.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-members.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,7 @@
+<div id="submenu">
+ 	<a href="/cgi-bin/koha/members/members-home.pl">Search</a>
+ 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=A"/>Add adult</a>
+ 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=C"/>Add child</a>
+ 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=P"/>Add prof</a>
+ 	<a href="/cgi-bin/koha/members/memberentry.pl?op=add&category_type=I"/>Add org</a>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-serials.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-serials.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-serials.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-serials.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,10 @@
+<div id="submenu">
+        <a href="/cgi-bin/koha/serials/serials-home.pl">home</a>
+        <a href="/cgi-bin/koha/serials/serial-issues.pl">Serials issues</a>
+        <a href="/cgi-bin/koha/serials/acqui-search.pl">Supplier search</a>
+        <a href="/cgi-bin/koha/serials/subscription-bib-search.pl">Subscription search</a>
+        <a href="/cgi-bin/koha/serials/subscription-bib-search.pl">Search subscription</a>
+        <a href="/cgi-bin/koha/serials/lateissues.pl">Late issue</a>
+        <a href="/cgi-bin/koha/serials/subscription-add.pl">Add a subscription</a>
+        <a href="/cgi-bin/koha/serials/viewalerts.pl">View alerts</a>
+</div>

Index: koha-tmpl/intranet-tmpl/default/en/includes/menu-tools.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menu-tools.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menu-tools.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menu-tools.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,7 @@
+<div id="submenu">
+    <a href="/cgi-bin/koha/tools/cities.pl">Cities</a>
+    <a href="/cgi-bin/koha/tools/holidays.pl">Holidays</a>
+    <a href="/cgi-bin/koha/tools/marc.pl">Export</a>
+    <a href="/cgi-bin/koha/import/breeding.pl">Reservoir</a>
+    <a href="/cgi-bin/koha/tools/barcodes.pl">Barcodes</a>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/menus.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/menus.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/menus.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/menus.inc	26 Mar 2007 02:19:23 -0000	1.4.2.1
@@ -0,0 +1,23 @@
+<script language="JavaScript" type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+function Help() {
+	newin=window.open("/cgi-bin/koha/help.pl","Koha Help",'width=600,height=600,toolbar=false,scrollbars=yes');
+}
+</script>
+<div id="mainmenu">
+	<a href="/cgi-bin/koha/mainpage.pl">Koha</a>
+	<a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a>
+	<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a>
+	<a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
+	<a href="/cgi-bin/koha/members/members-home.pl">Members</a>
+	<a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
+	<a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
+	<a href="/cgi-bin/koha/admin/admin-home.pl">Parameters</a>
+	<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
+	<a href="/cgi-bin/koha/about.pl">About</a>
+	<a href="/cgi-bin/koha/help.pl" onclick="Help(); return false;">Help</a>
+</div>
+
+<div id="librarian_information">
+<p><!-- TMPL_VAR name="loggedinusername" -->, from <!-- TMPL_VAR name="branchname" --></p>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/popup-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/popup-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/popup-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/popup-bottom.inc	26 Mar 2007 02:19:23 -0000	1.2.2.1
@@ -0,0 +1,2 @@
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/popup-top.inc	26 Mar 2007 02:19:23 -0000	1.5.2.1
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>popup</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/intranet.css">
+
+</head>
+
+<body>
+<!-- NO MENUS for popup-top -->

Index: koha-tmpl/intranet-tmpl/default/en/includes/print-mine.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/print-mine.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/print-mine.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/print-mine.css	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,210 @@
+a:link {
+	color : #000066;
+	text-decoration: none;
+}
+
+a:visited {
+	color : #000066;
+	text-decoration: none;
+}
+
+a:hover {
+	color : #993300;
+	text-decoration: none;
+}
+
+body {
+	background-color : #FFF;
+	color : #333333;
+	font-family : arial, geneva, sans-serif;
+	font-size : 14px;
+	margin : 0px 0px 0px 0px;
+}
+
+caption {
+	color : #000066;
+	font-size : 18px;
+	font-weight : bold;
+	margin-top : 5px;
+	text-align : left;
+}
+
+div.table {
+	width : 100%;
+}
+
+form {
+	margin : 0px;
+	padding : 0px;
+}
+
+h1
+	{
+	color : #000066;
+	font-size : 22px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h2 {
+	color : #000066;
+	font-size : 20px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h3 {
+	color : #000066;
+	font-size : 18px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h4 {
+	color : #000066;
+	font-size : 16px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h5 {
+	color : #000066;
+	font-size : 15px;
+	font-weight : bold;
+	margin-bottom : 1px;
+	margin-top : 1px;
+}
+
+h6 {
+	color : #000066;
+	font-size : 14px;
+	font-weight : bold;
+	margin-bottom : 1px;
+	margin-top : 1px;
+}
+
+table, table.list {
+	background-color : #FFFFFF;
+	border-bottom : 0px solid #CCCCCC;
+	border-collapse : collapse;
+	border-left : 0px solid #CCCCCC;
+	margin : 3px 0px 5px 0px;
+	padding : 0px;
+	width : 99%;
+}
+
+td {
+	background-color : #FFF;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 1px solid #CCCCCC;
+	font-size : 12px;
+	padding : 5px 5px 5px 5px;
+}
+
+td:last-child {
+	background-color : #FFF;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 0px solid #CCCCCC;
+	font-size : 12px;
+	padding : 5px 5px 5px 5px;
+}
+
+table.list th {
+	background-color : #FFFFFF;
+	text-align: left;
+	font-size: 12px;
+	font-weight: bold;
+	padding: 5px;
+	width : 25%;
+}
+
+th {
+	background-color : #E9E9E9;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 1px solid #CCCCCC;
+	font-size : 14px;
+	font-weight : bold;
+	padding : 5px 5px 5px 5px;
+}
+
+th:last-child {
+	background-color : #E9E9E9;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 0px solid #CCCCCC;
+	font-size : 14px;
+	font-weight : bold;
+	padding : 5px 5px 5px 5px;
+}
+
+td.input, div.form td, div.details td {
+	border-bottom : 1px solid #CCCCCC;
+	border-left : 0px;
+	border-right : 0px;
+	color : #000000;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : left;
+}
+
+td.label, div.form th, div.details th {
+	background-color : #FFF;
+	border-bottom : 1px solid #CCCCCC;
+	border-left : 1px solid #CCCCCC;
+	border-right : 0px;
+	border-top : 0px;
+	color : #000088;
+	font-weight : bold;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : right;
+	vertical-align : top;
+}
+
+tr.highlight {
+	background-color: #CCCCCC;
+}
+
+.cancel {
+	background-color : #993300;
+	color : #FFFFCC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 2px;
+}
+
+.error {
+	font-weight: bold;
+}
+
+.ex {
+	font-family : "Courier New", Courier, monospace;
+}
+.inline {
+	display : inline;
+}
+
+.print {
+	display : none;
+}
+
+.submit {
+	background-color : #669999;
+	color : #FFFFCC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 2px;
+}
+
+#main {
+	background-color : #FFF;
+	border-left : 0px solid #CCCC99;
+	margin-left : 2%;
+	margin-right : 2%;
+	margin-top : 1%;
+	padding : 5px;
+	position : relative;
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/print.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/print.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/print.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/print.css	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,214 @@
+a:link {
+	color : #000066;
+	text-decoration: none;
+}
+
+a:visited {
+	color : #000066;
+	text-decoration: none;
+}
+
+a:hover {
+	color : #993300;
+	text-decoration: none;
+}
+
+body {
+	background-color : #FFF;
+	color : #333333;
+	font-family : arial, geneva, sans-serif;
+	font-size : 14px;
+	margin : 0px 0px 0px 0px;
+}
+
+caption {
+	color : #000066;
+	font-size : 18px;
+	font-weight : bold;
+	margin-top : 5px;
+	text-align : left;
+}
+
+div.table {
+	width : 100%;
+}
+
+form {
+	margin : 0px;
+	padding : 0px;
+}
+
+h1
+	{
+	color : #000066;
+	font-size : 22px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h2 {
+	color : #000066;
+	font-size : 20px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h3 {
+	color : #000066;
+	font-size : 18px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h4 {
+	color : #000066;
+	font-size : 16px;
+	font-weight : bold;
+	margin-bottom : 3px;
+	margin-top : 3px;
+}
+
+h5 {
+	color : #000066;
+	font-size : 15px;
+	font-weight : bold;
+	margin-bottom : 1px;
+	margin-top : 1px;
+}
+
+h6 {
+	color : #000066;
+	font-size : 14px;
+	font-weight : bold;
+	margin-bottom : 1px;
+	margin-top : 1px;
+}
+
+table, table.list {
+	background-color : #FFFFFF;
+	border-bottom : 0px solid #CCCCCC;
+	border-collapse : collapse;
+	border-left : 0px solid #CCCCCC;
+	margin : 3px 0px 5px 0px;
+	padding : 0px;
+	width : 99%;
+}
+
+td {
+	background-color : #FFF;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 1px solid #CCCCCC;
+	font-size : 12px;
+	padding : 5px 5px 5px 5px;
+}
+
+td:last-child {
+	background-color : #FFF;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 0px solid #CCCCCC;
+	font-size : 12px;
+	padding : 5px 5px 5px 5px;
+}
+
+table.list th {
+	background-color : #FFFFFF;
+	text-align: left;
+	font-size: 12px;
+	font-weight: bold;
+	padding: 5px;
+	width : 25%;
+}
+
+th {
+	background-color : #E9E9E9;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 1px solid #CCCCCC;
+	font-size : 14px;
+	font-weight : bold;
+	padding : 5px 5px 5px 5px;
+}
+
+th:last-child {
+	background-color : #E9E9E9;
+	border-bottom : 1px solid #CCCCCC;
+	border-right : 0px solid #CCCCCC;
+	font-size : 14px;
+	font-weight : bold;
+	padding : 5px 5px 5px 5px;
+}
+
+td.input, div.form td, div.details td {
+	border-bottom : 1px solid #CCCCCC;
+	border-left : 0px;
+	border-right : 0px;
+	color : #000000;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : left;
+}
+
+td.label, div.form th, div.details th {
+	background-color : #FFF;
+	border-bottom : 1px solid #CCCCCC;
+	border-left : 1px solid #CCCCCC;
+	border-right : 0px;
+	border-top : 0px;
+	color : #000088;
+	font-weight : bold;
+	line-height : 1.5em;
+	padding : 4px;
+	text-align : right;
+	vertical-align : top;
+}
+
+tr.highlight {
+	background-color: #CCCCCC;
+}
+
+.cancel {
+	background-color : #993300;
+	color : #FFFFCC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 2px;
+}
+
+.error {
+	font-weight: bold;
+}
+
+.ex {
+	font-family : "Courier New", Courier, monospace;
+}
+.inline {
+	display : inline;
+}
+
+.print {
+	display : none;
+}
+
+.submit {
+	background-color : #669999;
+	color : #FFFFCC;
+	font-size : 12px;
+	font-weight : bold;
+	padding : 2px;
+}
+
+#main {
+	background-color : #FFF;
+	border-left : 0px solid #CCCC99;
+	margin-left : 2%;
+	margin-right : 2%;
+	margin-top : 1%;
+	padding : 5px;
+	position : relative;
+}
+
+tr.overdue {
+	font-weight : bold;
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/rollovers.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/rollovers.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/rollovers.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/rollovers.js	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,61 @@
+	 	if (document.images) {
+		home0 = new Image();
+		home0.src = "/intranet-tmpl/npl/en/images/home0.gif";
+		library0 = new Image();
+		library0.src = "/intranet-tmpl/npl/en/images/library0.gif";
+		kids0 = new Image();
+		kids0.src = "/intranet-tmpl/npl/en/images/kids0.gif";
+		teens0 = new Image();
+		teens0.src = "/intranet-tmpl/npl/en/images/teens0.gif";
+		readers0 = new Image();
+		readers0.src = "/intranet-tmpl/npl/en/images/readers0.gif";
+		search0 = new Image();
+		search0.src = "/intranet-tmpl/npl/en/images/search0.gif";
+		branch0 = new Image();
+		branch0.src = "/intranet-tmpl/npl/en/images/branch0.gif";
+		programs0 = new Image();
+		programs0.src = "/intranet-tmpl/npl/en/images/programs0.gif";
+		mobile0 = new Image();
+		mobile0.src = "/intranet-tmpl/npl/en/images/mobile0.gif";
+		OPLIN0 = new Image();
+		OPLIN0.src = "/intranet-tmpl/npl/en/images/OPLIN0.gif";
+		contact0 = new Image();
+		contact0.src = "/intranet-tmpl/npl/en/images/contact0.gif";
+		
+		home1 = new Image();
+		home1.src = "/intranet-tmpl/npl/en/images/home1.gif";
+		library1 = new Image();
+		library1.src = "/intranet-tmpl/npl/en/images/library1.gif";
+		kids1 = new Image();
+		kids1.src = "/intranet-tmpl/npl/en/images/kids1.gif";
+		teens1 = new Image();
+		teens1.src = "/intranet-tmpl/npl/en/images/teens1.gif";
+		readers1 = new Image();
+		readers1.src = "/intranet-tmpl/npl/en/images/readers1.gif";
+		search1 = new Image();
+		search1.src = "/intranet-tmpl/npl/en/images/search1.gif";;
+		branch1 = new Image();
+		branch1.src = "/intranet-tmpl/npl/en/images/branch1.gif";
+		programs1 = new Image();
+		programs1.src = "/intranet-tmpl/npl/en/images/programs1.gif";
+		mobile1 = new Image();
+		mobile1.src = "/intranet-tmpl/npl/en/images/mobile1.gif";
+		OPLIN1 = new Image();
+		OPLIN1.src = "/intranet-tmpl/npl/en/images/OPLIN1.gif";
+		contact1 = new Image();
+		contact1.src = "/intranet-tmpl/npl/en/images/contact1.gif";
+}
+
+// Function to 'activate' images.
+function imgOn(imgName) {
+	if (document.images) {
+		document[imgName].src = eval(imgName + "0.src");
+	}
+}
+
+// Function to 'deactivate' images.
+function imgOff(imgName) {
+	if (document.images) {
+		document[imgName].src = eval(imgName + "1.src");
+		}
+	}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/search-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/search-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/search-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/search-topmenu.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1 @@
+<div id="topmenu"><a href="/cgi-bin/koha/search.marc/search.pl?type=intranet">Advanced Search</a> | <form name="f" method="post" action="/cgi-bin/koha/search.marc/search.pl"><input type="hidden" name="op" value="do_search" /><input type="hidden" name="type" value="intranet" /><input type="hidden" name="nbstatements" value="3" /><label for="keyword">Quick Search:</label><input type="hidden" name="marclist" value="" /><input type="hidden" name="and_or" value="and" /><input type="hidden" name="excluding" value="" /><input type="hidden" name="operator" value="contains" /><input type="text" id="keyword" name="value" size="10" /> <input type="submit" value="Start search" class="submit"></form> | <a href="/cgi-bin/koha/bookshelves/shelves.pl">Virtual Shelves</a></div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/serials-menu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/serials-menu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/serials-menu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/serials-menu.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,22 @@
+<div id="nav">
+    <ul>
+    <li><a href="/cgi-bin/koha/mainpage.pl">Home Page</a></li></ul>
+    <li><a href="/cgi-bin/koha/circ/circulation.pl">Issues</a></li>
+
+<li><a href="/cgi-bin/koha/members/members-home.pl">Users</a></li>
+	<li><a href="/cgi-bin/koha/catalogue/catalogue-home.pl">Catalogue search</a></li>
+<li><a href="/cgi-bin/koha/cataloguing/addbooks.pl">Cataloguing</a></li><ul>
+<li><a href="/cgi-bin/koha/serials/serials-home.pl">Serials Home</a></li>
+<li><a href="/cgi-bin/koha/serials/subscription-add.pl">Add Subscription</a></li>
+<li><a href="/cgi-bin/koha/serials/lateissues.pl">Late Issues</a></li>
+<li><a href="/cgi-bin/koha/serials/claims.pl">Claims</a></li>
+<li><a href="#" onclick="javascript:window.open('/cgi-bin/koha/manual.pl','MARC','width=700 height=600,location=yes,toolbar=yes,scrollbars=yes');">MARC Manual</a></li></ul>
+
+
+<li><a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a></li>
+
+
+<!-- TMPL_IF NAME="loggedinusername" --><li>
+    Logged in as: <!-- TMPL_VAR NAME="loggedinusername" --> </li><ul><li><a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a></li></ul><!-- /TMPL_IF -->
+</li>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/serials-topmenu.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/serials-topmenu.inc
diff -N koha-tmpl/intranet-tmpl/default/en/includes/serials-topmenu.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/serials-topmenu.inc	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,7 @@
+<div id="topmenu">
+<a href="/cgi-bin/koha/serials/serials-home.pl">Serials Home</a> | 
+<a href="/cgi-bin/koha/serials/subscription-add.pl">Add Subscription</a> | 
+<a href="/cgi-bin/koha/serials/lateissues.pl">Late Issues</a> |
+ <a href="/cgi-bin/koha/serials/serials-home.pl?routing=1">Create/Edit Routing List</a> |
+ <a href="/cgi-bin/koha/serials/claims.pl">Claims</a>
+</div>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/tabs.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/tabs.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/tabs.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/tabs.css	26 Mar 2007 02:19:23 -0000	1.1.2.1
@@ -0,0 +1,82 @@
+
+
+.contentholder {
+	position: relative;
+	padding-top: 10px;
+	padding-right: 10px;	
+	padding-bottom: 10px;	
+	padding-left: 10px;	
+}
+
+.tabholder {
+	margin-top : 5px;
+	padding: 0;
+	position: relative;
+	z-index: 2;
+}
+.tab {
+	border: 2px;
+	border-color: #999999;
+	border-bottom-style: none;
+	line-height: 150%;
+	text-align: center;
+	padding: 4px 10px 4px 10px;
+	margin: 0;
+	cursor: pointer;
+	cursor: hand;
+	font-family: Arial, Helvetica,  sans-serif; 
+	font-size: 12px;
+	font-weight: bold;
+	background-color: #D8DEB8;
+	color: #000066;				 
+}
+
+.panelholder {
+	position: relative;
+	top: 3px;
+	z-index: 1;
+	width: 100%;
+	visibility: visible;
+	display: block;
+}
+
+.panelholder table {
+	font-family : Verdana, Geneva, Arial, sans-serif;
+}
+
+.panelholder table th {
+	background-color : #EFF1D8;
+	border-bottom : 1px solid #CCCC99;
+	border-right : 1px solid #CCCC99;
+	font-size : 80%;
+	font-weight : bold;
+	text-align : right;
+	width : 30%;
+}
+
+.panelholder table tr.mandatory td, .panelholder table tr.mandatory th {
+	background-color : #FFFFE1;
+	border-bottom : 1px dashed #990000;
+	border-left : 1px dashed #990000;
+	border-top : 1px dashed #990000;
+}
+
+.panelholder table tr.mandatory td:first-child {
+	border-left : 3px dotted #990000;
+}
+
+.panelholder table tr.mandatory td {
+	background-color : #EEF0DB;
+}
+
+.panel {
+	position: relative;
+	color: #000000;
+	background-color: #FFFFCC;
+	border: 2px;
+	border-color: #999999;
+	top: 0;
+	left: 0;
+	padding: 0 0 0 10px;
+	display: none;
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/calendar/cal.gif
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/calendar/cal.gif
diff -N koha-tmpl/intranet-tmpl/default/en/includes/calendar/cal.gif
Binary files /dev/null and /tmp/cvshxmdC7 differ

Index: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-en.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-en.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-en.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-en.js	26 Mar 2007 02:19:25 -0000	1.2.2.1
@@ -0,0 +1,127 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo at infoiasi.ro>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat",
+ "Sun");
+
+// First day of the week. "0" means display Sunday first, "1" means display
+// Monday first, etc.
+Calendar._FD = 0;
+
+// full month names
+Calendar._MN = new Array
+("January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "About the calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Date selection:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
+"- Hold mouse button on any of the above buttons for faster selection.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Time selection:\n" +
+"- Click on any of the time parts to increase it\n" +
+"- or Shift-click to decrease it\n" +
+"- or click and drag for faster selection.";
+
+Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Go Today";
+Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Select date";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
+Calendar._TT["PART_TODAY"] = " (today)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Display %s first";
+
+// This may be locale-dependent.  It specifies the week-end days, as an array
+// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
+Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Time:";

Index: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-setup.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-setup.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-setup.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-setup.js	26 Mar 2007 02:19:25 -0000	1.3.2.1
@@ -0,0 +1,181 @@
+/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar.  They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly.  This script should not be seen as part of the calendar.  It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up.  If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+
+// $Id: calendar-setup.js,v 1.3.2.1 2007/03/26 02:19:25 tgarip1957 Exp $
+
+/**
+ *  This function "patches" an input field (or other element) to use a calendar
+ *  widget for date selection.
+ *
+ *  The "params" is a single object that can have the following properties:
+ *
+ *    prop. name   | description
+ *  -------------------------------------------------------------------------------------------------
+ *   inputField    | the ID of an input field to store the date
+ *   displayArea   | the ID of a DIV or other element to show the date
+ *   button        | ID of a button or other element that will trigger the calendar
+ *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
+ *   ifFormat      | date format that will be stored in the input field
+ *   daFormat      | the date format that will be used to display the date in displayArea
+ *   singleClick   | (true/false) wether the calendar is in single click mode or not (default: true)
+ *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
+ *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
+ *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
+ *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
+ *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
+ *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
+ *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
+ *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
+ *   onClose       | function that gets called when the calendar is closed.  [default]
+ *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
+ *   date          | the date that the calendar will be initially displayed to
+ *   showsTime     | default: false; if true the calendar will include a time selector
+ *   timeFormat    | the time format; can be "12" or "24", default is "12"
+ *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
+ *   step          | configures the step of the years in drop-down boxes; default: 2
+ *   position      | configures the calendar absolute position; default: null
+ *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
+ *   showOthers    | if "true" (but default: "false") it will show days from other months too
+ *
+ *  None of them is required, they all have default values.  However, if you
+ *  pass none of "inputField", "displayArea" or "button" you'll get a warning
+ *  saying "nothing to setup".
+ */
+Calendar.setup = function (params) {
+	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
+
+	param_default("inputField",     null);
+	param_default("displayArea",    null);
+	param_default("button",         null);
+	param_default("eventName",      "click");
+	param_default("ifFormat",       "%Y/%m/%d");
+	param_default("daFormat",       "%Y/%m/%d");
+	param_default("singleClick",    true);
+	param_default("disableFunc",    'dateStatusHandler');
+	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
+	param_default("firstDay",       0); // defaults to "Sunday" first
+	param_default("align",          "Br");
+	param_default("range",          [1900, 2999]);
+	param_default("weekNumbers",    true);
+	param_default("flat",           null);
+	param_default("flatCallback",   null);
+	param_default("onSelect",       null);
+	param_default("onClose",        null);
+	param_default("onUpdate",       null);
+	param_default("date",           null);
+	param_default("showsTime",      false);
+	param_default("timeFormat",     "24");
+	param_default("electric",       true);
+	param_default("step",           2);
+	param_default("position",       null);
+	param_default("cache",          false);
+	param_default("showOthers",     false);
+
+	var tmp = ["inputField", "displayArea", "button"];
+	for (var i in tmp) {
+		if (typeof params[tmp[i]] == "string") {
+			params[tmp[i]] = document.getElementById(params[tmp[i]]);
+		}
+	}
+	if (!(params.flat || params.inputField || params.displayArea || params.button)) {
+		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
+		return false;
+	}
+
+	function onSelect(cal) {
+		var p = cal.params;
+		var update = (cal.dateClicked || p.electric);
+		if (update && p.flat) {
+			if (typeof p.flatCallback == "function")
+				p.flatCallback(cal);
+			else
+				alert("No flatCallback given -- doing nothing.");
+			return false;
+		}
+		if (update && p.inputField) {
+			p.inputField.value = cal.date.print(p.ifFormat);
+			if (typeof p.inputField.onchange == "function")
+				p.inputField.onchange();
+		}
+		if (update && p.displayArea)
+			p.displayArea.innerHTML = cal.date.print(p.daFormat);
+		if (update && p.singleClick && cal.dateClicked)
+			cal.callCloseHandler();
+		if (update && typeof p.onUpdate == "function")
+			p.onUpdate(cal);
+	};
+
+	if (params.flat != null) {
+		if (typeof params.flat == "string")
+			params.flat = document.getElementById(params.flat);
+		if (!params.flat) {
+			alert("Calendar.setup:\n  Flat specified but can't find parent.");
+			return false;
+		}
+		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
+		cal.showsTime = params.showsTime;
+		cal.time24 = (params.timeFormat == "24");
+		cal.params = params;
+		cal.weekNumbers = params.weekNumbers;
+		cal.setRange(params.range[0], params.range[1]);
+		cal.setDateStatusHandler(params.dateStatusFunc);
+		cal.create(params.flat);
+		cal.show();
+		return false;
+	}
+
+	var triggerEl = params.button || params.displayArea || params.inputField;
+	triggerEl["on" + params.eventName] = function() {
+		var dateEl = params.inputField || params.displayArea;
+		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
+		var mustCreate = false;
+		var cal = window.calendar;
+		if (!(cal && params.cache)) {
+			window.calendar = cal = new Calendar(params.firstDay,
+							     params.date,
+							     params.onSelect || onSelect,
+							     params.onClose || function(cal) { cal.hide(); });
+			cal.showsTime = params.showsTime;
+			cal.time24 = (params.timeFormat == "24");
+			cal.weekNumbers = params.weekNumbers;
+			mustCreate = true;
+		} else {
+			if (params.date)
+				cal.setDate(params.date);
+			cal.hide();
+		}
+		cal.showsOtherMonths = params.showOthers;
+		cal.yearStep = params.step;
+		cal.setRange(params.range[0], params.range[1]);
+		cal.params = params;
+		cal.setDateStatusHandler(params.dateStatusFunc);
+		cal.setDateFormat(dateFmt);
+		if (mustCreate)
+			cal.create();
+		cal.parseDate(dateEl.value || dateEl.innerHTML);
+		cal.refresh();
+		if (!params.position)
+			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
+		else
+			cal.showAt(params.position[0], params.position[1]);
+		return false;
+	};
+};

Index: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-system.css
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-system.css
diff -N koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-system.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar-system.css	26 Mar 2007 02:19:25 -0000	1.2.2.1
@@ -0,0 +1,254 @@
+/* The main calendar widget.  DIV containing a table. */
+
+.calendar {
+  position: relative;
+  display: none;
+  border: 1px solid;
+  border-color: #fff #000 #000 #fff;
+  font-size: 11px;
+  cursor: default;
+  background: Window;
+  color: WindowText;
+  font-family: tahoma,verdana,sans-serif;
+  width:250px;
+}
+
+.calendar table {
+  border: 1px solid;
+  border-color: #fff #000 #000 #fff;
+  font-size: 11px;
+  cursor: default;
+  background: Window;
+  color: WindowText;
+  font-family: tahoma,verdana,sans-serif;
+  border-collapse:separate;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */
+  text-align: center;
+  padding: 1px;
+  border: 1px solid;
+  display: table-cell;
+  -moz-border-radius: 0px;
+  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+  background: ButtonFace;
+}
+
+.calendar .nav {
+  background: ButtonFace url('menuarrow.gif') no-repeat 100% 100%;
+}
+
+.calendar thead .title { /* This holds the current "month, year" */
+  font-weight: bold;
+  padding: 1px;
+  border: 1px solid #000;
+  background: ActiveCaption;
+  color: CaptionText;
+  text-align: center;
+}
+
+.calendar thead .headrow { /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames { /* Row <TR> containing the day names */
+}
+
+.calendar thead .name { /* Cells <TD> containing the day names */
+  border-bottom: 1px solid ButtonShadow;
+  padding: 2px;
+  text-align: center;
+  background: ButtonFace;
+  color: ButtonText;
+}
+
+.calendar thead .weekend { /* How a weekend day name shows in header */
+//  color: #f00;
+}
+
+.calendar thead .hilite { /* How do the buttons in header appear when hover */
+  border: 2px solid;
+  padding: 0px;
+  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.calendar thead .active { /* Active (pressed) buttons in header */
+  border-width: 1px;
+  padding: 2px 0px 0px 2px;
+  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day { /* Cells <TD> containing month days dates */
+  width: 2em;
+  text-align: right;
+  padding: 2px 4px 2px 2px;
+}
+.calendar tbody .day.othermonth {
+  font-size: 80%;
+  color: #aaa;
+}
+.calendar tbody .day.othermonth.oweekend {
+  color: #faa;
+}
+
+.calendar table .wn {
+  padding: 2px 3px 2px 2px;
+  border-right: 1px solid ButtonShadow;
+  background: ButtonFace;
+  color: ButtonText;
+}
+
+.calendar tbody .rowhilite td {
+//  background: Highlight;
+//  color: HighlightText;
+}
+
+.calendar tbody td.hilite { /* Hovered cells <TD> */
+  padding: 1px 3px 1px 1px;
+  border-top: 1px solid #fff;
+  border-right: 1px solid #000;
+  border-bottom: 1px solid #000;
+  border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active { /* Active (pressed) cells <TD> */
+//  padding: 2px 2px 0px 2px;
+//  border: 1px solid;
+//  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.calendar tbody td.selected { /* Cell showing selected date */
+  font-weight: bold;
+  border: 1px solid;
+  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+  padding: 2px 2px 0px 2px;
+  background: ButtonFace;
+  color: ButtonText;
+}
+
+.calendar tbody td.weekend { /* Cells showing weekend days */
+//  color: #f00;
+}
+
+.calendar tbody td.today { /* Cell showing today date */
+  font-weight: bold;
+  color: #00f;
+}
+
+.calendar tbody td.disabled { color: GrayText; }
+
+.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */
+  visibility: hidden;
+}
+
+.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */
+  display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow { /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip { /* Tooltip (status bar) cell <TD> */
+  background: ButtonFace;
+  padding: 1px;
+  border: 1px solid;
+  border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+  color: ButtonText;
+  text-align: center;
+}
+
+.calendar tfoot .hilite { /* Hover style for buttons in footer */
+  border-top: 1px solid #fff;
+  border-right: 1px solid #000;
+  border-bottom: 1px solid #000;
+  border-left: 1px solid #fff;
+  padding: 1px;
+  background: #e4e0d8;
+}
+
+.calendar tfoot .active { /* Active (pressed) style for buttons in footer */
+  padding: 2px 0px 0px 2px;
+  border-top: 1px solid #000;
+  border-right: 1px solid #fff;
+  border-bottom: 1px solid #fff;
+  border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+  position: absolute;
+  display: none;
+  width: 4em;
+  top: 0px;
+  left: 0px;
+  cursor: default;
+  border: 1px solid;
+  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+  background: Menu;
+  color: MenuText;
+  font-size: 90%;
+  padding: 1px;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+  text-align: center;
+  padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+  width: 4em;
+}
+
+.calendar .combo .active {
+  padding: 0px;
+  border: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+  background: Highlight;
+  color: HighlightText;
+}
+
+.calendar td.time {
+  border-top: 1px solid ButtonShadow;
+  padding: 1px 0px;
+  text-align: center;
+  background-color: ButtonFace;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+  padding: 0px 3px 0px 4px;
+  border: 1px solid #889;
+  font-weight: bold;
+  background-color: Menu;
+}
+
+.calendar td.time .ampm {
+  text-align: center;
+}
+
+.calendar td.time .colon {
+  padding: 0px 2px 0px 3px;
+  font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+  border-color: #000;
+  background-color: Highlight;
+  color: HighlightText;
+}
+
+.calendar td.time span.active {
+  border-color: #f00;
+  background-color: #000;
+  color: #0f0;
+}
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/calendar/calendar.js	26 Mar 2007 02:19:25 -0000	1.3.2.1
@@ -0,0 +1,1715 @@
+/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
+ * ------------------------------------------------------------------
+ *
+ * The DHTML Calendar, version 0.9.6 "Keep cool but don't freeze"
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+
+// $Id: calendar.js,v 1.3.2.1 2007/03/26 02:19:25 tgarip1957 Exp $
+
+/** The Calendar object constructor. */
+Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
+	// member variables
+	this.activeDiv = null;
+	this.currentDateEl = null;
+	this.getDateStatus = null;
+	this.timeout = null;
+	this.onSelected = onSelected || null;
+	this.onClose = onClose || null;
+	this.dragging = false;
+	this.hidden = false;
+	this.minYear = 1970;
+	this.maxYear = 2050;
+	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
+	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
+	this.isPopup = true;
+	this.weekNumbers = true;
+	this.firstDayOfWeek = firstDayOfWeek; // 0 for Sunday, 1 for Monday, etc.
+	this.showsOtherMonths = false;
+	this.dateStr = dateStr;
+	this.ar_days = null;
+	this.showsTime = false;
+	this.time24 = true;
+	this.yearStep = 2;
+	// HTML elements
+	this.table = null;
+	this.element = null;
+	this.tbody = null;
+	this.firstdayname = null;
+	// Combo boxes
+	this.monthsCombo = null;
+	this.yearsCombo = null;
+	this.hilitedMonth = null;
+	this.activeMonth = null;
+	this.hilitedYear = null;
+	this.activeYear = null;
+	// Information
+	this.dateClicked = false;
+
+	// one-time initializations
+	if (typeof Calendar._SDN == "undefined") {
+		// table of short day names
+		if (typeof Calendar._SDN_len == "undefined")
+			Calendar._SDN_len = 3;
+		var ar = new Array();
+		for (var i = 8; i > 0;) {
+			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
+		}
+		Calendar._SDN = ar;
+		// table of short month names
+		if (typeof Calendar._SMN_len == "undefined")
+			Calendar._SMN_len = 3;
+		ar = new Array();
+		for (var i = 12; i > 0;) {
+			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
+		}
+		Calendar._SMN = ar;
+	}
+};
+
+// ** constants
+
+/// "static", needed for event handlers.
+Calendar._C = null;
+
+/// detect a special case of "web browser"
+Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
+		   !/opera/i.test(navigator.userAgent) );
+
+Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
+
+/// detect Opera browser
+Calendar.is_opera = /opera/i.test(navigator.userAgent);
+
+/// detect KHTML-based browsers
+Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
+
+// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
+//        library, at some point.
+
+Calendar.getAbsolutePos = function(el) {
+	var SL = 0, ST = 0;
+	var is_div = /^div$/i.test(el.tagName);
+	if (is_div && el.scrollLeft)
+		SL = el.scrollLeft;
+	if (is_div && el.scrollTop)
+		ST = el.scrollTop;
+	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
+	if (el.offsetParent) {
+		var tmp = this.getAbsolutePos(el.offsetParent);
+		r.x += tmp.x;
+		r.y += tmp.y;
+	}
+	return r;
+};
+
+Calendar.isRelated = function (el, evt) {
+	var related = evt.relatedTarget;
+	if (!related) {
+		var type = evt.type;
+		if (type == "mouseover") {
+			related = evt.fromElement;
+		} else if (type == "mouseout") {
+			related = evt.toElement;
+		}
+	}
+	while (related) {
+		if (related == el) {
+			return true;
+		}
+		related = related.parentNode;
+	}
+	return false;
+};
+
+Calendar.removeClass = function(el, className) {
+	if (!(el && el.className)) {
+		return;
+	}
+	var cls = el.className.split(" ");
+	var ar = new Array();
+	for (var i = cls.length; i > 0;) {
+		if (cls[--i] != className) {
+			ar[ar.length] = cls[i];
+		}
+	}
+	el.className = ar.join(" ");
+};
+
+Calendar.addClass = function(el, className) {
+	Calendar.removeClass(el, className);
+	el.className += " " + className;
+};
+
+Calendar.getElement = function(ev) {
+	if (Calendar.is_ie) {
+		return window.event.srcElement;
+	} else {
+		return ev.currentTarget;
+	}
+};
+
+Calendar.getTargetElement = function(ev) {
+	if (Calendar.is_ie) {
+		return window.event.srcElement;
+	} else {
+		return ev.target;
+	}
+};
+
+Calendar.stopEvent = function(ev) {
+	ev || (ev = window.event);
+	if (Calendar.is_ie) {
+		ev.cancelBubble = true;
+		ev.returnValue = false;
+	} else {
+		ev.preventDefault();
+		ev.stopPropagation();
+	}
+	return false;
+};
+
+Calendar.addEvent = function(el, evname, func) {
+	if (el.attachEvent) { // IE
+		el.attachEvent("on" + evname, func);
+	} else if (el.addEventListener) { // Gecko / W3C
+		el.addEventListener(evname, func, true);
+	} else {
+		el["on" + evname] = func;
+	}
+};
+
+Calendar.removeEvent = function(el, evname, func) {
+	if (el.detachEvent) { // IE
+		el.detachEvent("on" + evname, func);
+	} else if (el.removeEventListener) { // Gecko / W3C
+		el.removeEventListener(evname, func, true);
+	} else {
+		el["on" + evname] = null;
+	}
+};
+
+Calendar.createElement = function(type, parent) {
+	var el = null;
+	if (document.createElementNS) {
+		// use the XHTML namespace; IE won't normally get here unless
+		// _they_ "fix" the DOM2 implementation.
+		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
+	} else {
+		el = document.createElement(type);
+	}
+	if (typeof parent != "undefined") {
+		parent.appendChild(el);
+	}
+	return el;
+};
+
+// END: UTILITY FUNCTIONS
+
+// BEGIN: CALENDAR STATIC FUNCTIONS
+
+/** Internal -- adds a set of events to make some element behave like a button. */
+Calendar._add_evs = function(el) {
+	with (Calendar) {
+		addEvent(el, "mouseover", dayMouseOver);
+		addEvent(el, "mousedown", dayMouseDown);
+		addEvent(el, "mouseout", dayMouseOut);
+		if (is_ie) {
+			addEvent(el, "dblclick", dayMouseDblClick);
+			el.setAttribute("unselectable", true);
+		}
+	}
+};
+
+Calendar.findMonth = function(el) {
+	if (typeof el.month != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.month != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.findYear = function(el) {
+	if (typeof el.year != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.year != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.showMonthsCombo = function () {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var mc = cal.monthsCombo;
+	if (cal.hilitedMonth) {
+		Calendar.removeClass(cal.hilitedMonth, "hilite");
+	}
+	if (cal.activeMonth) {
+		Calendar.removeClass(cal.activeMonth, "active");
+	}
+	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
+	Calendar.addClass(mon, "active");
+	cal.activeMonth = mon;
+	var s = mc.style;
+	s.display = "block";
+	if (cd.navtype < 0)
+		s.left = cd.offsetLeft + "px";
+	else {
+		var mcw = mc.offsetWidth;
+		if (typeof mcw == "undefined")
+			// Konqueror brain-dead techniques
+			mcw = 50;
+		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
+	}
+	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+};
+
+Calendar.showYearsCombo = function (fwd) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var yc = cal.yearsCombo;
+	if (cal.hilitedYear) {
+		Calendar.removeClass(cal.hilitedYear, "hilite");
+	}
+	if (cal.activeYear) {
+		Calendar.removeClass(cal.activeYear, "active");
+	}
+	cal.activeYear = null;
+	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
+	var yr = yc.firstChild;
+	var show = false;
+	for (var i = 12; i > 0; --i) {
+		if (Y >= cal.minYear && Y <= cal.maxYear) {
+			yr.firstChild.data = Y;
+			yr.year = Y;
+			yr.style.display = "block";
+			show = true;
+		} else {
+			yr.style.display = "none";
+		}
+		yr = yr.nextSibling;
+		Y += fwd ? cal.yearStep : -cal.yearStep;
+	}
+	if (show) {
+		var s = yc.style;
+		s.display = "block";
+		if (cd.navtype < 0)
+			s.left = cd.offsetLeft + "px";
+		else {
+			var ycw = yc.offsetWidth;
+			if (typeof ycw == "undefined")
+				// Konqueror brain-dead techniques
+				ycw = 50;
+			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
+		}
+		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+	}
+};
+
+// event handlers
+
+Calendar.tableMouseUp = function(ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	if (cal.timeout) {
+		clearTimeout(cal.timeout);
+	}
+	var el = cal.activeDiv;
+	if (!el) {
+		return false;
+	}
+	var target = Calendar.getTargetElement(ev);
+	ev || (ev = window.event);
+	Calendar.removeClass(el, "active");
+	if (target == el || target.parentNode == el) {
+		Calendar.cellClick(el, ev);
+	}
+	var mon = Calendar.findMonth(target);
+	var date = null;
+	if (mon) {
+		date = new Date(cal.date);
+		if (mon.month != date.getMonth()) {
+			date.setMonth(mon.month);
+			cal.setDate(date);
+			cal.dateClicked = false;
+			cal.callHandler();
+		}
+	} else {
+		var year = Calendar.findYear(target);
+		if (year) {
+			date = new Date(cal.date);
+			if (year.year != date.getFullYear()) {
+				date.setFullYear(year.year);
+				cal.setDate(date);
+				cal.dateClicked = false;
+				cal.callHandler();
+			}
+		}
+	}
+	with (Calendar) {
+		removeEvent(document, "mouseup", tableMouseUp);
+		removeEvent(document, "mouseover", tableMouseOver);
+		removeEvent(document, "mousemove", tableMouseOver);
+		cal._hideCombos();
+		_C = null;
+		return stopEvent(ev);
+	}
+};
+
+Calendar.tableMouseOver = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return;
+	}
+	var el = cal.activeDiv;
+	var target = Calendar.getTargetElement(ev);
+	if (target == el || target.parentNode == el) {
+		Calendar.addClass(el, "hilite active");
+		Calendar.addClass(el.parentNode, "rowhilite");
+	} else {
+		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
+			Calendar.removeClass(el, "active");
+		Calendar.removeClass(el, "hilite");
+		Calendar.removeClass(el.parentNode, "rowhilite");
+	}
+	ev || (ev = window.event);
+	if (el.navtype == 50 && target != el) {
+		var pos = Calendar.getAbsolutePos(el);
+		var w = el.offsetWidth;
+		var x = ev.clientX;
+		var dx;
+		var decrease = true;
+		if (x > pos.x + w) {
+			dx = x - pos.x - w;
+			decrease = false;
+		} else
+			dx = pos.x - x;
+
+		if (dx < 0) dx = 0;
+		var range = el._range;
+		var current = el._current;
+		var count = Math.floor(dx / 10) % range.length;
+		for (var i = range.length; --i >= 0;)
+			if (range[i] == current)
+				break;
+		while (count-- > 0)
+			if (decrease) {
+				if (--i < 0)
+					i = range.length - 1;
+			} else if ( ++i >= range.length )
+				i = 0;
+		var newval = range[i];
+		el.firstChild.data = newval;
+
+		cal.onUpdateTime();
+	}
+	var mon = Calendar.findMonth(target);
+	if (mon) {
+		if (mon.month != cal.date.getMonth()) {
+			if (cal.hilitedMonth) {
+				Calendar.removeClass(cal.hilitedMonth, "hilite");
+			}
+			Calendar.addClass(mon, "hilite");
+			cal.hilitedMonth = mon;
+		} else if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+	} else {
+		if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+		var year = Calendar.findYear(target);
+		if (year) {
+			if (year.year != cal.date.getFullYear()) {
+				if (cal.hilitedYear) {
+					Calendar.removeClass(cal.hilitedYear, "hilite");
+				}
+				Calendar.addClass(year, "hilite");
+				cal.hilitedYear = year;
+			} else if (cal.hilitedYear) {
+				Calendar.removeClass(cal.hilitedYear, "hilite");
+			}
+		} else if (cal.hilitedYear) {
+			Calendar.removeClass(cal.hilitedYear, "hilite");
+		}
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.tableMouseDown = function (ev) {
+	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
+		return Calendar.stopEvent(ev);
+	}
+};
+
+Calendar.calDragIt = function (ev) {
+	var cal = Calendar._C;
+	if (!(cal && cal.dragging)) {
+		return false;
+	}
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posX = ev.pageX;
+		posY = ev.pageY;
+	}
+	cal.hideShowCovered();
+	var st = cal.element.style;
+	st.left = (posX - cal.xOffs) + "px";
+	st.top = (posY - cal.yOffs) + "px";
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.calDragEnd = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	cal.dragging = false;
+	with (Calendar) {
+		removeEvent(document, "mousemove", calDragIt);
+		removeEvent(document, "mouseup", calDragEnd);
+		tableMouseUp(ev);
+	}
+	cal.hideShowCovered();
+};
+
+Calendar.dayMouseDown = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (el.disabled) {
+		return false;
+	}
+	var cal = el.calendar;
+	cal.activeDiv = el;
+	Calendar._C = cal;
+	if (el.navtype != 300) with (Calendar) {
+		if (el.navtype == 50) {
+			el._current = el.firstChild.data;
+			addEvent(document, "mousemove", tableMouseOver);
+		} else
+			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
+		addClass(el, "hilite active");
+		addEvent(document, "mouseup", tableMouseUp);
+	} else if (cal.isPopup) {
+		cal._dragStart(ev);
+	}
+	if (el.navtype == -1 || el.navtype == 1) {
+		if (cal.timeout) clearTimeout(cal.timeout);
+		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
+	} else if (el.navtype == -2 || el.navtype == 2) {
+		if (cal.timeout) clearTimeout(cal.timeout);
+		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
+	} else {
+		cal.timeout = null;
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseDblClick = function(ev) {
+	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
+	if (Calendar.is_ie) {
+		document.selection.empty();
+	}
+};
+
+Calendar.dayMouseOver = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
+		return false;
+	}
+	if (el.ttip) {
+		if (el.ttip.substr(0, 1) == "_") {
+			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
+		}
+		el.calendar.tooltips.firstChild.data = el.ttip;
+	}
+	if (el.navtype != 300) {
+		Calendar.addClass(el, "hilite");
+		if (el.caldate) {
+			Calendar.addClass(el.parentNode, "rowhilite");
+		}
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseOut = function(ev) {
+	with (Calendar) {
+		var el = getElement(ev);
+		if (isRelated(el, ev) || _C || el.disabled) {
+			return false;
+		}
+		removeClass(el, "hilite");
+		if (el.caldate) {
+			removeClass(el.parentNode, "rowhilite");
+		}
+		el.calendar.tooltips.firstChild.data = _TT["SEL_DATE"];
+		return stopEvent(ev);
+	}
+};
+
+/**
+ *  A generic "click" handler :) handles all types of buttons defined in this
+ *  calendar.
+ */
+Calendar.cellClick = function(el, ev) {
+	var cal = el.calendar;
+	var closing = false;
+	var newdate = false;
+	var date = null;
+	if (typeof el.navtype == "undefined") {
+		Calendar.removeClass(cal.currentDateEl, "selected");
+		Calendar.addClass(el, "selected");
+		closing = (cal.currentDateEl == el);
+		if (!closing) {
+			cal.currentDateEl = el;
+		}
+		cal.date = new Date(el.caldate);
+		date = cal.date;
+		newdate = true;
+		// a date was clicked
+		if (!(cal.dateClicked = !el.otherMonth))
+			cal._init(cal.firstDayOfWeek, date);
+	} else {
+		if (el.navtype == 200) {
+			Calendar.removeClass(el, "hilite");
+			cal.callCloseHandler();
+			return;
+		}
+		date = (el.navtype == 0) ? new Date() : new Date(cal.date);
+		// unless "today" was clicked, we assume no date was clicked so
+		// the selected handler will know not to close the calenar when
+		// in single-click mode.
+		// cal.dateClicked = (el.navtype == 0);
+		cal.dateClicked = false;
+		var year = date.getFullYear();
+		var mon = date.getMonth();
+		function setMonth(m) {
+			var day = date.getDate();
+			var max = date.getMonthDays(m);
+			if (day > max) {
+				date.setDate(max);
+			}
+			date.setMonth(m);
+		};
+		switch (el.navtype) {
+		    case 400:
+			Calendar.removeClass(el, "hilite");
+			var text = Calendar._TT["ABOUT"];
+			if (typeof text != "undefined") {
+				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
+			} else {
+				// FIXME: this should be removed as soon as lang files get updated!
+				text = "Help and about box text is not translated into this language.\n" +
+					"If you know this language and you feel generous please update\n" +
+					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
+					"and send it back to <mishoo at infoiasi.ro> to get it into the distribution  ;-)\n\n" +
+					"Thank you!\n" +
+					"http://dynarch.com/mishoo/calendar.epl\n";
+			}
+			alert(text);
+			return;
+		    case -2:
+			if (year > cal.minYear) {
+				date.setFullYear(year - 1);
+			}
+			break;
+		    case -1:
+			if (mon > 0) {
+				setMonth(mon - 1);
+			} else if (year-- > cal.minYear) {
+				date.setFullYear(year);
+				setMonth(11);
+			}
+			break;
+		    case 1:
+			if (mon < 11) {
+				setMonth(mon + 1);
+			} else if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+				setMonth(0);
+			}
+			break;
+		    case 2:
+			if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+			}
+			break;
+		    case 100:
+			cal.setFirstDayOfWeek(el.fdow);
+			return;
+		    case 50:
+			var range = el._range;
+			var current = el.firstChild.data;
+			for (var i = range.length; --i >= 0;)
+				if (range[i] == current)
+					break;
+			if (ev && ev.shiftKey) {
+				if (--i < 0)
+					i = range.length - 1;
+			} else if ( ++i >= range.length )
+				i = 0;
+			var newval = range[i];
+			el.firstChild.data = newval;
+			cal.onUpdateTime();
+			return;
+		    case 0:
+			// TODAY will bring us here
+			if ((typeof cal.getDateStatus == "function") && cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
+				// remember, "date" was previously set to new
+				// Date() if TODAY was clicked; thus, it
+				// contains today date.
+				return false;
+			}
+			break;
+		}
+		if (!date.equalsTo(cal.date)) {
+			cal.setDate(date);
+			newdate = true;
+		}
+	}
+	if (newdate) {
+		cal.callHandler();
+	}
+	if (closing) {
+		Calendar.removeClass(el, "hilite");
+		cal.callCloseHandler();
+	}
+};
+
+// END: CALENDAR STATIC FUNCTIONS
+
+// BEGIN: CALENDAR OBJECT FUNCTIONS
+
+/**
+ *  This function creates the calendar inside the given parent.  If _par is
+ *  null than it creates a popup calendar inside the BODY element.  If _par is
+ *  an element, be it BODY, then it creates a non-popup calendar (still
+ *  hidden).  Some properties need to be set before calling this function.
+ */
+Calendar.prototype.create = function (_par) {
+	var parent = null;
+	if (! _par) {
+		// default parent is the document body, in which case we create
+		// a popup calendar.
+		parent = document.getElementsByTagName("body")[0];
+		this.isPopup = true;
+	} else {
+		parent = _par;
+		this.isPopup = false;
+	}
+	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
+
+	var table = Calendar.createElement("table");
+	this.table = table;
+	table.cellSpacing = 0;
+	table.cellPadding = 0;
+	table.calendar = this;
+	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
+
+	var div = Calendar.createElement("div");
+	this.element = div;
+	div.className = "calendar";
+	if (this.isPopup) {
+		div.style.position = "absolute";
+		div.style.display = "none";
+	}
+	div.appendChild(table);
+
+	var thead = Calendar.createElement("thead", table);
+	var cell = null;
+	var row = null;
+
+	var cal = this;
+	var hh = function (text, cs, navtype) {
+		cell = Calendar.createElement("td", row);
+		cell.colSpan = cs;
+		cell.className = "button";
+		if (navtype != 0 && Math.abs(navtype) <= 2)
+			cell.className += " nav";
+		Calendar._add_evs(cell);
+		cell.calendar = cal;
+		cell.navtype = navtype;
+		if (text.substr(0, 1) != "&") {
+			cell.appendChild(document.createTextNode(text));
+		}
+		else {
+			// FIXME: dirty hack for entities
+			cell.innerHTML = text;
+		}
+		return cell;
+	};
+
+	row = Calendar.createElement("tr", thead);
+	var title_length = 6;
+	(this.isPopup) && --title_length;
+	(this.weekNumbers) && ++title_length;
+
+	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
+	this.title = hh("", title_length, 300);
+	this.title.className = "title";
+	if (this.isPopup) {
+		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		this.title.style.cursor = "move";
+		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
+	}
+
+	row = Calendar.createElement("tr", thead);
+	row.className = "headrow";
+
+	this._nav_py = hh("&#x00ab;", 1, -2);
+	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
+
+	this._nav_pm = hh("&#x2039;", 1, -1);
+	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
+
+	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
+	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
+
+	this._nav_nm = hh("&#x203a;", 1, 1);
+	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
+
+	this._nav_ny = hh("&#x00bb;", 1, 2);
+	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
+
+	// day names
+	row = Calendar.createElement("tr", thead);
+	row.className = "daynames";
+	if (this.weekNumbers) {
+		cell = Calendar.createElement("td", row);
+		cell.className = "name wn";
+		cell.appendChild(document.createTextNode(Calendar._TT["WK"]));
+	}
+	for (var i = 7; i > 0; --i) {
+		cell = Calendar.createElement("td", row);
+		cell.appendChild(document.createTextNode(""));
+		if (!i) {
+			cell.navtype = 100;
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
+	this._displayWeekdays();
+
+	var tbody = Calendar.createElement("tbody", table);
+	this.tbody = tbody;
+
+	for (i = 6; i > 0; --i) {
+		row = Calendar.createElement("tr", tbody);
+		if (this.weekNumbers) {
+			cell = Calendar.createElement("td", row);
+			cell.appendChild(document.createTextNode(""));
+		}
+		for (var j = 7; j > 0; --j) {
+			cell = Calendar.createElement("td", row);
+			cell.appendChild(document.createTextNode(""));
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+
+	if (this.showsTime) {
+		row = Calendar.createElement("tr", tbody);
+		row.className = "time";
+
+		cell = Calendar.createElement("td", row);
+		cell.className = "time";
+		cell.colSpan = 2;
+		cell.innerHTML = Calendar._TT["TIME"] || "&nbsp;";
+
+		cell = Calendar.createElement("td", row);
+		cell.className = "time";
+		cell.colSpan = this.weekNumbers ? 4 : 3;
+
+		(function(){
+			function makeTimePart(className, init, range_start, range_end) {
+				var part = Calendar.createElement("span", cell);
+				part.className = className;
+				part.appendChild(document.createTextNode(init));
+				part.calendar = cal;
+				part.ttip = Calendar._TT["TIME_PART"];
+				part.navtype = 50;
+				part._range = [];
+				if (typeof range_start != "number")
+					part._range = range_start;
+				else {
+					for (var i = range_start; i <= range_end; ++i) {
+						var txt;
+						if (i < 10 && range_end >= 10) txt = '0' + i;
+						else txt = '' + i;
+						part._range[part._range.length] = txt;
+					}
+				}
+				Calendar._add_evs(part);
+				return part;
+			};
+			var hrs = cal.date.getHours();
+			var mins = cal.date.getMinutes();
+			var t12 = !cal.time24;
+			var pm = (hrs > 12);
+			if (t12 && pm) hrs -= 12;
+			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
+			var span = Calendar.createElement("span", cell);
+			span.appendChild(document.createTextNode(":"));
+			span.className = "colon";
+			var M = makeTimePart("minute", mins, 0, 59);
+			var AP = null;
+			cell = Calendar.createElement("td", row);
+			cell.className = "time";
+			cell.colSpan = 2;
+			if (t12)
+				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
+			else
+				cell.innerHTML = "&nbsp;";
+
+			cal.onSetTime = function() {
+				var hrs = this.date.getHours();
+				var mins = this.date.getMinutes();
+				var pm = (hrs > 12);
+				if (pm && t12) hrs -= 12;
+				H.firstChild.data = (hrs < 10) ? ("0" + hrs) : hrs;
+				M.firstChild.data = (mins < 10) ? ("0" + mins) : mins;
+				if (t12)
+					AP.firstChild.data = pm ? "pm" : "am";
+			};
+
+			cal.onUpdateTime = function() {
+				var date = this.date;
+				var h = parseInt(H.firstChild.data, 10);
+				if (t12) {
+					if (/pm/i.test(AP.firstChild.data) && h < 12)
+						h += 12;
+					else if (/am/i.test(AP.firstChild.data) && h == 12)
+						h = 0;
+				}
+				var d = date.getDate();
+				var m = date.getMonth();
+				var y = date.getFullYear();
+				date.setHours(h);
+				date.setMinutes(parseInt(M.firstChild.data, 10));
+				date.setFullYear(y);
+				date.setMonth(m);
+				date.setDate(d);
+				this.dateClicked = false;
+				this.callHandler();
+			};
+		})();
+	} else {
+		this.onSetTime = this.onUpdateTime = function() {};
+	}
+
+	var tfoot = Calendar.createElement("tfoot", table);
+
+	row = Calendar.createElement("tr", tfoot);
+	row.className = "footrow";
+
+	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
+	cell.className = "ttip";
+	if (this.isPopup) {
+		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		cell.style.cursor = "move";
+	}
+	this.tooltips = cell;
+
+	div = Calendar.createElement("div", this.element);
+	this.monthsCombo = div;
+	div.className = "combo";
+	for (i = 0; i < Calendar._MN.length; ++i) {
+		var mn = Calendar.createElement("div");
+		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
+		mn.month = i;
+		mn.appendChild(document.createTextNode(Calendar._SMN[i]));
+		div.appendChild(mn);
+	}
+
+	div = Calendar.createElement("div", this.element);
+	this.yearsCombo = div;
+	div.className = "combo";
+	for (i = 12; i > 0; --i) {
+		var yr = Calendar.createElement("div");
+		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
+		yr.appendChild(document.createTextNode(""));
+		div.appendChild(yr);
+	}
+
+	this._init(this.firstDayOfWeek, this.date);
+	parent.appendChild(this.element);
+};
+
+/** keyboard navigation, only for popup calendars */
+Calendar._keyEvent = function(ev) {
+	if (!window.calendar) {
+		return false;
+	}
+	(Calendar.is_ie) && (ev = window.event);
+	var cal = window.calendar;
+	var act = (Calendar.is_ie || ev.type == "keypress");
+	if (ev.ctrlKey) {
+		switch (ev.keyCode) {
+		    case 37: // KEY left
+			act && Calendar.cellClick(cal._nav_pm);
+			break;
+		    case 38: // KEY up
+			act && Calendar.cellClick(cal._nav_py);
+			break;
+		    case 39: // KEY right
+			act && Calendar.cellClick(cal._nav_nm);
+			break;
+		    case 40: // KEY down
+			act && Calendar.cellClick(cal._nav_ny);
+			break;
+		    default:
+			return false;
+		}
+	} else switch (ev.keyCode) {
+	    case 32: // KEY space (now)
+		Calendar.cellClick(cal._nav_now);
+		break;
+	    case 27: // KEY esc
+		act && cal.callCloseHandler();
+		break;
+	    case 37: // KEY left
+	    case 38: // KEY up
+	    case 39: // KEY right
+	    case 40: // KEY down
+		if (act) {
+			var date = cal.date.getDate() - 1;
+			var el = cal.currentDateEl;
+			var ne = null;
+			var prev = (ev.keyCode == 37) || (ev.keyCode == 38);
+			switch (ev.keyCode) {
+			    case 37: // KEY left
+				(--date >= 0) && (ne = cal.ar_days[date]);
+				break;
+			    case 38: // KEY up
+				date -= 7;
+				(date >= 0) && (ne = cal.ar_days[date]);
+				break;
+			    case 39: // KEY right
+				(++date < cal.ar_days.length) && (ne = cal.ar_days[date]);
+				break;
+			    case 40: // KEY down
+				date += 7;
+				(date < cal.ar_days.length) && (ne = cal.ar_days[date]);
+				break;
+			}
+			if (!ne) {
+				if (prev) {
+					Calendar.cellClick(cal._nav_pm);
+				} else {
+					Calendar.cellClick(cal._nav_nm);
+				}
+				date = (prev) ? cal.date.getMonthDays() : 1;
+				el = cal.currentDateEl;
+				ne = cal.ar_days[date - 1];
+			}
+			Calendar.removeClass(el, "selected");
+			Calendar.addClass(ne, "selected");
+			cal.date = new Date(ne.caldate);
+			cal.callHandler();
+			cal.currentDateEl = ne;
+		}
+		break;
+	    case 13: // KEY enter
+		if (act) {
+			cal.callHandler();
+			cal.hide();
+		}
+		break;
+	    default:
+		return false;
+	}
+	return Calendar.stopEvent(ev);
+};
+
+/**
+ *  (RE)Initializes the calendar to the given date and firstDayOfWeek
+ */
+Calendar.prototype._init = function (firstDayOfWeek, date) {
+	var today = new Date();
+	this.table.style.visibility = "hidden";
+	var year = date.getFullYear();
+	if (year < this.minYear) {
+		year = this.minYear;
+		date.setFullYear(year);
+	} else if (year > this.maxYear) {
+		year = this.maxYear;
+		date.setFullYear(year);
+	}
+	this.firstDayOfWeek = firstDayOfWeek;
+	this.date = new Date(date);
+	var month = date.getMonth();
+	var mday = date.getDate();
+	var no_days = date.getMonthDays();
+
+	// calendar voodoo for computing the first day that would actually be
+	// displayed in the calendar, even if it's from the previous month.
+	// WARNING: this is magic. ;-)
+	date.setDate(1);
+	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
+	if (day1 < 0)
+		day1 += 7;
+	date.setDate(-day1);
+	date.setDate(date.getDate() + 1);
+
+	var row = this.tbody.firstChild;
+	var MN = Calendar._SMN[month];
+	var ar_days = new Array();
+	var weekend = Calendar._TT["WEEKEND"];
+	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
+		var cell = row.firstChild;
+		if (this.weekNumbers) {
+			cell.className = "day wn";
+			cell.firstChild.data = date.getWeekNumber();
+			cell = cell.nextSibling;
+		}
+		row.className = "daysrow";
+		var hasdays = false;
+		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(date.getDate() + 1)) {
+			var iday = date.getDate();
+			var wday = date.getDay();
+			cell.className = "day";
+			var current_month = (date.getMonth() == month);
+			if (!current_month) {
+				if (this.showsOtherMonths) {
+					cell.className += " othermonth";
+					cell.otherMonth = true;
+				} else {
+					cell.className = "emptycell";
+					cell.innerHTML = "&nbsp;";
+					cell.disabled = true;
+					continue;
+				}
+			} else {
+				cell.otherMonth = false;
+				hasdays = true;
+			}
+			cell.disabled = false;
+			cell.firstChild.data = iday;
+			if (typeof this.getDateStatus == "function") {
+				var status = this.getDateStatus(date, year, month, iday);
+				if (status === true) {
+					cell.className += " disabled";
+					cell.disabled = true;
+				} else {
+					if (/disabled/i.test(status))
+						cell.disabled = true;
+					cell.className += " " + status;
+				}
+			}
+			if (!cell.disabled) {
+				ar_days[ar_days.length] = cell;
+				cell.caldate = new Date(date);
+				cell.ttip = "_";
+				if (current_month && iday == mday) {
+					cell.className += " selected";
+					this.currentDateEl = cell;
+				}
+				if (date.getFullYear() == today.getFullYear() &&
+				    date.getMonth() == today.getMonth() &&
+				    iday == today.getDate()) {
+					cell.className += " today";
+					cell.ttip += Calendar._TT["PART_TODAY"];
+				}
+				if (weekend.indexOf(wday.toString()) != -1) {
+					cell.className += cell.otherMonth ? " oweekend" : " weekend";
+				}
+			}
+		}
+		if (!(hasdays || this.showsOtherMonths))
+			row.className = "emptyrow";
+	}
+	this.ar_days = ar_days;
+	this.title.firstChild.data = Calendar._MN[month] + ", " + year;
+	this.onSetTime();
+	this.table.style.visibility = "visible";
+	// PROFILE
+	// this.tooltips.firstChild.data = "Generated in " + ((new Date()) - today) + " ms";
+};
+
+/**
+ *  Calls _init function above for going to a certain date (but only if the
+ *  date is different than the currently selected one).
+ */
+Calendar.prototype.setDate = function (date) {
+	if (!date.equalsTo(this.date)) {
+		this._init(this.firstDayOfWeek, date);
+	}
+};
+
+/**
+ *  Refreshes the calendar.  Useful if the "disabledHandler" function is
+ *  dynamic, meaning that the list of disabled date can change at runtime.
+ *  Just * call this function if you think that the list of disabled dates
+ *  should * change.
+ */
+Calendar.prototype.refresh = function () {
+	this._init(this.firstDayOfWeek, this.date);
+};
+
+/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
+Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
+	this._init(firstDayOfWeek, this.date);
+	this._displayWeekdays();
+};
+
+/**
+ *  Allows customization of what dates are enabled.  The "unaryFunction"
+ *  parameter must be a function object that receives the date (as a JS Date
+ *  object) and returns a boolean value.  If the returned value is true then
+ *  the passed date will be marked as disabled.
+ */
+Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
+	this.getDateStatus = unaryFunction;
+};
+
+/** Customization of allowed year range for the calendar. */
+Calendar.prototype.setRange = function (a, z) {
+	this.minYear = a;
+	this.maxYear = z;
+};
+
+/** Calls the first user handler (selectedHandler). */
+Calendar.prototype.callHandler = function () {
+	if (this.onSelected) {
+		this.onSelected(this, this.date.print(this.dateFormat));
+	}
+};
+
+/** Calls the second user handler (closeHandler). */
+Calendar.prototype.callCloseHandler = function () {
+	if (this.onClose) {
+		this.onClose(this);
+	}
+	this.hideShowCovered();
+};
+
+/** Removes the calendar object from the DOM tree and destroys it. */
+Calendar.prototype.destroy = function () {
+	var el = this.element.parentNode;
+	el.removeChild(this.element);
+	Calendar._C = null;
+	window.calendar = null;
+};
+
+/**
+ *  Moves the calendar element to a different section in the DOM tree (changes
+ *  its parent).
+ */
+Calendar.prototype.reparent = function (new_parent) {
+	var el = this.element;
+	el.parentNode.removeChild(el);
+	new_parent.appendChild(el);
+};
+
+// This gets called when the user presses a mouse button anywhere in the
+// document, if the calendar is shown.  If the click was outside the open
+// calendar this function closes it.
+Calendar._checkCalendar = function(ev) {
+	if (!window.calendar) {
+		return false;
+	}
+	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+	for (; el != null && el != calendar.element; el = el.parentNode);
+	if (el == null) {
+		// calls closeHandler which should hide the calendar.
+		window.calendar.callCloseHandler();
+		return Calendar.stopEvent(ev);
+	}
+};
+
+/** Shows the calendar. */
+Calendar.prototype.show = function () {
+	var rows = this.table.getElementsByTagName("tr");
+	for (var i = rows.length; i > 0;) {
+		var row = rows[--i];
+		Calendar.removeClass(row, "rowhilite");
+		var cells = row.getElementsByTagName("td");
+		for (var j = cells.length; j > 0;) {
+			var cell = cells[--j];
+			Calendar.removeClass(cell, "hilite");
+			Calendar.removeClass(cell, "active");
+		}
+	}
+	this.element.style.display = "block";
+	this.hidden = false;
+	if (this.isPopup) {
+		window.calendar = this;
+		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
+		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
+		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
+	}
+	this.hideShowCovered();
+};
+
+/**
+ *  Hides the calendar.  Also removes any "hilite" from the class of any TD
+ *  element.
+ */
+Calendar.prototype.hide = function () {
+	if (this.isPopup) {
+		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
+		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
+		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
+	}
+	this.element.style.display = "none";
+	this.hidden = true;
+	this.hideShowCovered();
+};
+
+/**
+ *  Shows the calendar at a given absolute position (beware that, depending on
+ *  the calendar element style -- position property -- this might be relative
+ *  to the parent's containing rectangle).
+ */
+Calendar.prototype.showAt = function (x, y) {
+	var s = this.element.style;
+	s.left = x + "px";
+	s.top = y + "px";
+	this.show();
+};
+
+/** Shows the calendar near a given element. */
+Calendar.prototype.showAtElement = function (el, opts) {
+	var self = this;
+	var p = Calendar.getAbsolutePos(el);
+	if (!opts || typeof opts != "string") {
+		this.showAt(p.x, p.y + el.offsetHeight);
+		return true;
+	}
+	function fixPosition(box) {
+		if (box.x < 0)
+			box.x = 0;
+		if (box.y < 0)
+			box.y = 0;
+		var cp = document.createElement("div");
+		var s = cp.style;
+		s.position = "absolute";
+		s.right = s.bottom = s.width = s.height = "0px";
+		document.body.appendChild(cp);
+		var br = Calendar.getAbsolutePos(cp);
+		document.body.removeChild(cp);
+		if (Calendar.is_ie) {
+			br.y += document.body.scrollTop;
+			br.x += document.body.scrollLeft;
+		} else {
+			br.y += window.scrollY;
+			br.x += window.scrollX;
+		}
+		var tmp = box.x + box.width - br.x;
+		if (tmp > 0) box.x -= tmp;
+		tmp = box.y + box.height - br.y;
+		if (tmp > 0) box.y -= tmp;
+	};
+	this.element.style.display = "block";
+	Calendar.continuation_for_the_fucking_khtml_browser = function() {
+		var w = self.element.offsetWidth;
+		var h = self.element.offsetHeight;
+		self.element.style.display = "none";
+		var valign = opts.substr(0, 1);
+		var halign = "l";
+		if (opts.length > 1) {
+			halign = opts.substr(1, 1);
+		}
+		// vertical alignment
+		switch (valign) {
+		    case "T": p.y -= h; break;
+		    case "B": p.y += el.offsetHeight; break;
+		    case "C": p.y += (el.offsetHeight - h) / 2; break;
+		    case "t": p.y += el.offsetHeight - h; break;
+		    case "b": break; // already there
+		}
+		// horizontal alignment
+		switch (halign) {
+		    case "L": p.x -= w; break;
+		    case "R": p.x += el.offsetWidth; break;
+		    case "C": p.x += (el.offsetWidth - w) / 2; break;
+		    case "r": p.x += el.offsetWidth - w; break;
+		    case "l": break; // already there
+		}
+		p.width = w;
+		p.height = h + 40;
+		self.monthsCombo.style.display = "none";
+		fixPosition(p);
+		self.showAt(p.x, p.y);
+	};
+	if (Calendar.is_khtml)
+		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+	else
+		Calendar.continuation_for_the_fucking_khtml_browser();
+};
+
+/** Customizes the date format. */
+Calendar.prototype.setDateFormat = function (str) {
+	this.dateFormat = str;
+};
+
+/** Customizes the tooltip date format. */
+Calendar.prototype.setTtDateFormat = function (str) {
+	this.ttDateFormat = str;
+};
+
+/**
+ *  Tries to identify the date represented in a string.  If successful it also
+ *  calls this.setDate which moves the calendar to the given date.
+ */
+Calendar.prototype.parseDate = function (str, fmt) {
+	var y = 0;
+	var m = -1;
+	var d = 0;
+	var a = str.split(/\W+/);
+	if (!fmt) {
+		fmt = this.dateFormat;
+	}
+	var b = fmt.match(/%./g);
+	var i = 0, j = 0;
+	var hr = 0;
+	var min = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (!a[i])
+			continue;
+		switch (b[i]) {
+		    case "%d":
+		    case "%e":
+			d = parseInt(a[i], 10);
+			break;
+
+		    case "%m":
+			m = parseInt(a[i], 10) - 1;
+			break;
+
+		    case "%Y":
+		    case "%y":
+			y = parseInt(a[i], 10);
+			(y < 100) && (y += (y > 29) ? 1900 : 2000);
+			break;
+
+		    case "%b":
+		    case "%B":
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
+			}
+			break;
+
+		    case "%H":
+		    case "%I":
+		    case "%k":
+		    case "%l":
+			hr = parseInt(a[i], 10);
+			break;
+
+		    case "%P":
+		    case "%p":
+			if (/pm/i.test(a[i]) && hr < 12)
+				hr += 12;
+			break;
+
+		    case "%M":
+			min = parseInt(a[i], 10);
+			break;
+		}
+	}
+	if (y != 0 && m != -1 && d != 0) {
+		this.setDate(new Date(y, m, d, hr, min, 0));
+		return;
+	}
+	y = 0; m = -1; d = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (a[i].search(/[a-zA-Z]+/) != -1) {
+			var t = -1;
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
+			}
+			if (t != -1) {
+				if (m != -1) {
+					d = m+1;
+				}
+				m = t;
+			}
+		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
+			m = a[i]-1;
+		} else if (parseInt(a[i], 10) > 31 && y == 0) {
+			y = parseInt(a[i], 10);
+			(y < 100) && (y += (y > 29) ? 1900 : 2000);
+		} else if (d == 0) {
+			d = a[i];
+		}
+	}
+	if (y == 0) {
+		var today = new Date();
+		y = today.getFullYear();
+	}
+	if (m != -1 && d != 0) {
+		this.setDate(new Date(y, m, d, hr, min, 0));
+	}
+};
+
+Calendar.prototype.hideShowCovered = function () {
+	var self = this;
+	Calendar.continuation_for_the_fucking_khtml_browser = function() {
+		function getVisib(obj){
+			var value = obj.style.visibility;
+			if (!value) {
+				if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
+					if (!Calendar.is_khtml)
+						value = document.defaultView.
+							getComputedStyle(obj, "").getPropertyValue("visibility");
+					else
+						value = '';
+				} else if (obj.currentStyle) { // IE
+					value = obj.currentStyle.visibility;
+				} else
+					value = '';
+			}
+			return value;
+		};
+
+		var tags = new Array("applet", "iframe", "select");
+		var el = self.element;
+
+		var p = Calendar.getAbsolutePos(el);
+		var EX1 = p.x;
+		var EX2 = el.offsetWidth + EX1;
+		var EY1 = p.y;
+		var EY2 = el.offsetHeight + EY1;
+
+		for (var k = tags.length; k > 0; ) {
+			var ar = document.getElementsByTagName(tags[--k]);
+			var cc = null;
+
+			for (var i = ar.length; i > 0;) {
+				cc = ar[--i];
+
+				p = Calendar.getAbsolutePos(cc);
+				var CX1 = p.x;
+				var CX2 = cc.offsetWidth + CX1;
+				var CY1 = p.y;
+				var CY2 = cc.offsetHeight + CY1;
+
+				if (self.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+					if (!cc.__msh_save_visibility) {
+						cc.__msh_save_visibility = getVisib(cc);
+					}
+					cc.style.visibility = cc.__msh_save_visibility;
+				} else {
+					if (!cc.__msh_save_visibility) {
+						cc.__msh_save_visibility = getVisib(cc);
+					}
+					cc.style.visibility = "hidden";
+				}
+			}
+		}
+	};
+	if (Calendar.is_khtml)
+		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+	else
+		Calendar.continuation_for_the_fucking_khtml_browser();
+};
+
+/** Internal function; it displays the bar with the names of the weekday. */
+Calendar.prototype._displayWeekdays = function () {
+	var fdow = this.firstDayOfWeek;
+	var cell = this.firstdayname;
+	var weekend = Calendar._TT["WEEKEND"];
+	for (var i = 0; i < 7; ++i) {
+		cell.className = "day name";
+		var realday = (i + fdow) % 7;
+		if (i) {
+			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
+			cell.navtype = 100;
+			cell.calendar = this;
+			cell.fdow = realday;
+			Calendar._add_evs(cell);
+		}
+		if (weekend.indexOf(realday.toString()) != -1) {
+			Calendar.addClass(cell, "weekend");
+		}
+		cell.firstChild.data = Calendar._SDN[(i + fdow) % 7];
+		cell = cell.nextSibling;
+	}
+};
+
+/** Internal function.  Hides all combo boxes that might be displayed. */
+Calendar.prototype._hideCombos = function () {
+	this.monthsCombo.style.display = "none";
+	this.yearsCombo.style.display = "none";
+};
+
+/** Internal function.  Starts dragging the element. */
+Calendar.prototype._dragStart = function (ev) {
+	if (this.dragging) {
+		return;
+	}
+	this.dragging = true;
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posY = ev.clientY + window.scrollY;
+		posX = ev.clientX + window.scrollX;
+	}
+	var st = this.element.style;
+	this.xOffs = posX - parseInt(st.left);
+	this.yOffs = posY - parseInt(st.top);
+	with (Calendar) {
+		addEvent(document, "mousemove", calDragIt);
+		addEvent(document, "mouseup", calDragEnd);
+	}
+};
+
+// BEGIN: DATE OBJECT PATCHES
+
+/** Adds the number of days array to the Date object. */
+Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
+
+/** Constants used for time computations */
+Date.SECOND = 1000 /* milliseconds */;
+Date.MINUTE = 60 * Date.SECOND;
+Date.HOUR   = 60 * Date.MINUTE;
+Date.DAY    = 24 * Date.HOUR;
+Date.WEEK   =  7 * Date.DAY;
+
+/** Returns the number of days in the current month */
+Date.prototype.getMonthDays = function(month) {
+	var year = this.getFullYear();
+	if (typeof month == "undefined") {
+		month = this.getMonth();
+	}
+	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
+		return 29;
+	} else {
+		return Date._MD[month];
+	}
+};
+
+/** Returns the number of day in the year. */
+Date.prototype.getDayOfYear = function() {
+	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+	var time = now - then;
+	return Math.floor(time / Date.DAY);
+};
+
+/** Returns the number of the week in year, as defined in ISO 8601. */
+Date.prototype.getWeekNumber = function() {
+	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+	var DoW = d.getDay();
+	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
+	var ms = d.valueOf(); // GMT
+	d.setMonth(0);
+	d.setDate(4); // Thu in Week 1
+	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
+};
+
+/** Checks dates equality (ignores time) */
+Date.prototype.equalsTo = function(date) {
+	return ((this.getFullYear() == date.getFullYear()) &&
+		(this.getMonth() == date.getMonth()) &&
+		(this.getDate() == date.getDate()) &&
+		(this.getHours() == date.getHours()) &&
+		(this.getMinutes() == date.getMinutes()));
+};
+
+/** Prints the date in a string according to the given format. */
+Date.prototype.print = function (str) {
+	var m = this.getMonth();
+	var d = this.getDate();
+	var y = this.getFullYear();
+	var wn = this.getWeekNumber();
+	var w = this.getDay();
+	var s = {};
+	var hr = this.getHours();
+	var pm = (hr >= 12);
+	var ir = (pm) ? (hr - 12) : hr;
+	var dy = this.getDayOfYear();
+	if (ir == 0)
+		ir = 12;
+	var min = this.getMinutes();
+	var sec = this.getSeconds();
+	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
+	s["%A"] = Calendar._DN[w]; // full weekday name
+	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
+	s["%B"] = Calendar._MN[m]; // full month name
+	// FIXME: %c : preferred date and time representation for the current locale
+	s["%C"] = 1 + Math.floor(y / 100); // the century number
+	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
+	s["%e"] = d; // the day of the month (range 1 to 31)
+	// FIXME: %D : american date style: %m/%d/%y
+	// FIXME: %E, %F, %G, %g, %h (man strftime)
+	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
+	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
+	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
+	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
+	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
+	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
+	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
+	s["%n"] = "\n";		// a newline character
+	s["%p"] = pm ? "PM" : "AM";
+	s["%P"] = pm ? "pm" : "am";
+	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
+	// FIXME: %R : the time in 24-hour notation %H:%M
+	s["%s"] = Math.floor(this.getTime() / 1000);
+	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
+	s["%t"] = "\t";		// a tab character
+	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
+	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
+	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
+	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
+	// FIXME: %x : preferred date representation for the current locale without the time
+	// FIXME: %X : preferred time representation for the current locale without the date
+	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
+	s["%Y"] = y;		// year with the century
+	s["%%"] = "%";		// a literal '%' character
+
+	var re = /%./g;
+	if (!Calendar.is_ie5)
+		return str.replace(re, function (par) { return s[par] || par; });
+
+	var a = str.match(re);
+	for (var i = 0; i < a.length; i++) {
+		var tmp = s[a[i]];
+		if (tmp) {
+			re = new RegExp(a[i], 'g');
+			str = str.replace(re, tmp);
+		}
+	}
+
+	return str;
+};
+
+Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
+Date.prototype.setFullYear = function(y) {
+	var d = new Date(this);
+	d.__msh_oldSetFullYear(y);
+	if (d.getMonth() != this.getMonth())
+		this.setDate(28);
+	this.__msh_oldSetFullYear(y);
+};
+
+// END: DATE OBJECT PATCHES
+
+
+// global object that remembers the calendar
+window.calendar = null;

Index: koha-tmpl/intranet-tmpl/default/en/includes/calendar/menuarrow.gif
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/calendar/menuarrow.gif
diff -N koha-tmpl/intranet-tmpl/default/en/includes/calendar/menuarrow.gif
Binary files /dev/null and /tmp/cvsIeXZye differ

Index: koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/countryCodes.dat
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/countryCodes.dat
diff -N koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/countryCodes.dat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/countryCodes.dat	26 Mar 2007 02:19:26 -0000	1.3.2.1
@@ -0,0 +1,15 @@
+00 = USA I
+93 = Australia
+94 = New Zealand
+779 = Argentina
+773 = Uruguay
+30 = France I
+84 = Spain
+45 = Japan
+777 = Bolivia
+80 = Italy I
+73 = Sweden
+40 = Germany
+31 = France II
+254 = Ucrania
+090=Turkey

Index: koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/labelCodes.dat
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/labelCodes.dat
diff -N koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/labelCodes.dat
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/countryCodes/labelCodes.dat	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,3 @@
+itemslabelConfig = Etiket 1
+itemslabelConfig2= Etiket 2
+itemslabelConfig3= Etiket 3
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/includes/javascript/members.js
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/javascript/members.js
diff -N koha-tmpl/intranet-tmpl/default/en/includes/javascript/members.js
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/javascript/members.js	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,178 @@
+<script language="JavaScript" type="text/javascript">
+function CheckDate(d) {
+	if (d!="")
+{
+      // Cette fonction vérifie le format JJ/MM/AAAA saisi et la validité de la date.
+      // Le séparateur est défini dans la variable separateur
+      var amin=1900; // année mini
+      var amax=2100; // année maxi
+      var separateur="/"; // separateur entre jour/mois/annee
+      var j=(d.substring(0,2));
+      var m=(d.substring(3,5));
+      var a=(d.substring(6));
+      var ok=1;
+	var msg; 
+      if ( ((isNaN(j))||(j<1)||(j>31)) && (ok==1) ) {
+        msg = _("day not correct."); 
+	alert(msg); ok=0;
+      }
+      if ( ((isNaN(m))||(m<1)||(m>12)) && (ok==1) ) {
+        msg = _("month not correct.");
+	 alert(msg); ok=0;
+      }
+      if ( ((isNaN(a))||(a<amin)||(a>amax)) && (ok==1) ) {
+         msg = _("years not correct."); 
+	alert(msg); ok=0;
+      }
+      if ( ((d.substring(2,3)!=separateur)||(d.substring(5,6)!=separateur)) && (ok==1) ) {
+         alert("Separator must be "+separateur); ok=0;
+      }
+      return ok;
+   }
+}   
+   
+
+
+
+//function test if member is unique and if it's right the member is registred
+function unique() {
+var msg1;
+var msg2;
+if (  document.form.check_member.value==1){
+	if (document.form.categorycode.value != "I"){
+		
+		msg1 += _("Warning  !!!! Duplicate borrower!!!!");
+		alert(msg1);
+	check_form_borrowers(0);
+	document.form.submit();
+	
+	}else{
+		msg2 += _("Warning !!!! Duplicate organisation!!!!");
+		alert(msg2);
+	check_form_borrowers(0);
+	}
+}
+else
+{
+	document.form.submit();
+}
+
+}
+//end function
+//function test if date enrooled < date expiry
+function check_manip_date(status) {
+if (status=='verify'){
+// this part of function('verify') is used to check if dateenrolled<date expiry
+var myDate1=document.form.dateenrolled.value.split ('/');
+var myDate2=document.form.dateexpiry.value.split ('/');
+	if ((myDate1[2]>myDate2[2])||(myDate1[2]==myDate2[2] && myDate1[1]>myDate2[1])||(myDate1[2]==myDate2[2] && myDate1[1]>=myDate2[1] && myDate1[0]>=myDate2[0]))
+	
+		{ 
+		var msg = _("Warning !!! check date expiry  > date enrolment");
+		alert(msg);
+		document.form.dateexpiry.value="";
+		document.form.dateexpiry.setfocus;
+		}
+	}
+}
+//end function
+
+
+// function to test all fields in forms and nav in different forms(1 ,2 or 3)
+ function check_form_borrowers(nav){
+var statut=0;
+if (nav < document.form.step.value) {
+	document.form.step.value=nav;
+	if ((document.form.step.value==0) && document.form.check_member.value == 1 )
+	{
+ 	
+		if (document.form_double.answernodouble)	{
+			if( (!(document.form_double.answernodouble.checked))){
+				document.form.nodouble.value=0;
+			}
+			else {
+			document.form.nodouble.value=1;
+			}
+ 		}
+ 	} 
+	document.form.submit();
+	
+
+} else {
+	if (document.form.BorrowerMandatoryfield.value==''||document.form.FormFieldList.value=='' )
+	{}
+	else
+	{
+	var champ_verif = document.form.BorrowerMandatoryfield.value.split ('|');
+ 	var champ_form= document.form.FormFieldList.value.split('|');
+		var message ="The following fields are mandatory :\n";
+		var message_champ="";
+	for (var j=0; j<champ_form.length; j++){ 
+		if (document.getElementsByName(""+champ_form[j]+"")[0]){
+			for (var i=0; i<champ_verif.length; i++) {
+					if (document.getElementsByName(""+champ_verif[i]+"")[0]) {
+						var val_champ=eval("document.form."+champ_verif[i]+".value");
+						var ref_champ=eval("document.form."+champ_verif[i]);
+						var val_form=eval("document.form."+champ_form[j]+".value");
+						if (champ_verif[i] == champ_form[j]){
+							//check if it's a select
+							if (ref_champ.type=='select-one'){
+								if (ref_champ.options[0].selected ){
+									// action if field is empty
+									message_champ+=champ_verif[i]+"\n";
+									//test to konw if u must show a message with error
+									statut=1;
+								}
+							}else {
+								if ( val_champ == '' ) {
+									// action if the field is not empty
+									message_champ+=champ_verif[i]+"\n";
+									statut=1;
+								}	
+							}
+						}
+					}
+			}
+		}
+	}
+	}
+//borrowers form 2 test if u chcked no to the quetsion of double 
+ 	if (document.form.step.value==2 && statut!=1 && document.form.check_member.value > 0 )
+	{
+		
+  		
+			if (!(document.form_double.answernodouble.checked)){
+					
+				message ="";
+					message_champ+=_("Please confirm suspicious duplicate borrower !!! ");
+					statut=1;
+					document.form.nodouble.value=0;
+			}
+			else {
+			document.form.nodouble.value=1;
+			}
+ 	}
+		
+			if (statut==1){
+			//alert if at least 1 error
+				alert(message+"\n"+message_champ);
+			}
+			else 
+			{
+			document.form.step=nav;
+			document.form.submit();
+			}
+		}
+
+}
+function Dopop(link) {
+// // 	var searchstring=document.form.value[i].value;
+	newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
+}
+
+function Dopopguarantor(link) {
+
+	newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=no,top');
+}
+
+</script>

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardConfig.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardConfig.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardConfig.conf	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+marginBottom = 12
+pageType = A4
+columns = 2
+systemDpi = 72
+labelHeigth = 54
+rows = 4
+marginLeft = 6
+labelWidth = 84

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardsConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardsConfig.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardsConfig.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/cardsConfig.conf	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+marginBottom = 10
+pageType = A4
+columns = 2
+systemDpi = 72
+labelHeigth = 54
+rows = 5
+marginLeft = 17
+labelWidth = 88

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig.conf	26 Mar 2007 02:19:26 -0000	1.4.2.1
@@ -0,0 +1,8 @@
+marginBottom = 5
+pageType = A4
+columns = 4
+systemDpi = 72
+labelHeigth = 22
+rows = 13
+marginLeft = 3.5
+labelWidth = 50

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig3.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig3.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig3.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemsLabelConfig3.conf	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+marginBottom = 5
+pageType = A4
+columns = 4
+systemDpi = 72
+labelHeigth = 22
+rows = 13
+marginLeft = 3.5
+labelWidth = 50

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemslabelConfig2.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemslabelConfig2.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemslabelConfig2.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/itemslabelConfig2.conf	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+marginBottom = 5
+pageType = A4
+columns = 4
+systemDpi = 72
+labelHeigth = 22
+rows = 13
+marginLeft = 3,5
+labelWidth = 50

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/labelConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/labelConfig.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/labelConfig.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/labelConfig.conf	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+marginBottom = 25
+pageType = A4
+columns = 5
+systemDpi = 96
+labelHeigth = 21
+rows = 13
+marginLeft = 2
+labelWidth = 41

Index: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/membersConfig.conf
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/membersConfig.conf
diff -N koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/membersConfig.conf
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/includes/labelConfig/membersConfig.conf	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,8 @@
+marginBottom = 0
+pageType = A4
+columns = 4
+systemDpi = 72
+labelHeigth = 29.7
+rows = 10
+marginLeft = 0
+labelWidth = 52.5

Index: koha-tmpl/intranet-tmpl/default/en/members/boraccount.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/boraccount.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/boraccount.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/boraccount.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,41 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Account for  <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<!-- The table with the account items -->
+<div id="main">
+<div class="table"><table>
+<caption>Account for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></caption>
+  <tr>
+  	<th>Date</th>
+	<th>Click to credit</th>
+    <th>Description of Charges</th>
+    <th>Amount</th>
+    <th>Still Owed</th>
+  </tr>
+
+  <!-- TMPL_LOOP NAME="accounts" -->
+
+   <!-- TMPL_IF NAME="toggle" --> <tr><!-- TMPL_ELSE --><tr class="highlight"><!-- /TMPL_IF -->
+      <td><!-- TMPL_VAR NAME="date" --></td>
+   <td>  <!-- TMPL_IF NAME="amountoutstandingcredit" --><!-- TMPL_VAR NAME="itemnum" --><!-- TMPL_ELSE --><a href="mancredit.pl?itemnum=<!-- TMPL_VAR NAME="itemnum" -->&accountid=<!-- TMPL_VAR NAME="accountid" -->&bornum=<!-- TMPL_VAR NAME="bornum" -->&accounttype=<!-- TMPL_VAR NAME="accounttype" -->&amount=<!-- TMPL_VAR NAME="amountoutstanding" -->&user=<!-- TMPL_VAR NAME="firstname" -->%20<!-- TMPL_VAR NAME="surname" -->"><!--TMPL_IF NAME="itemnum"--><!-- TMPL_VAR NAME="itemnum" --><!--TMPL_ELSE-->Click<!--/TMPL_IF--></a><!-- /TMPL_IF --></td>
+      <td><!-- TMPL_VAR NAME="description" --><!-- TMPL_IF NAME="printtitle" --> <!-- TMPL_VAR NAME="title" --><!-- /TMPL_IF --></td>
+      <!-- TMPL_IF NAME="amountcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="amount" --> YTL</td>
+      <!-- TMPL_IF NAME="amountoutstandingcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="amountoutstanding" --> YTL</td>
+    </tr>
+
+  <!-- /TMPL_LOOP -->
+<tfoot>
+  <tr>
+    <td colspan="4">Total Due</td>
+    <!-- TMPL_IF NAME="totalcredit" --><td class="credit"><!-- TMPL_ELSE --><td class="debit"><!-- /TMPL_IF --><!-- TMPL_VAR NAME="total" --> YTL</td>
+  </tr>
+  </tfoot>
+</table></div>
+<!-- The manual invoice and credit buttons -->
+<div class="tabitem">
+<form action="maninvoice.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /><input type="submit" class="submit" value="Create Manual Invoice" /></form><form action="moremember.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /> <input type="submit" value="Return to User Record" class="submit" /></form>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/borrowers_details.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/borrowers_details.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/borrowers_details.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/borrowers_details.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,59 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Borrower Details<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="mainbloc">
+	<h1>BORROWER DETAILS</h1>
+	
+	<form name="form" method="post" action="/cgi-bin/members/borrowers_details.pl">
+	<div >
+	<!-- TMPL_IF NAME="Institution"-->	
+		
+		<p>
+		
+			<label>borrower categorie</label>		
+			<input  type="text" name="description" size="20"  value="<!-- TMPL_VAR NAME="description" -->" >
+		</p>
+		<p>
+			
+			<label>organisation name</label>
+			<input  style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
+		</p>
+		
+	<!-- TMPL_ELSE -->	
+
+		<p>
+			<label>borrower categorie</label>
+			<input  type="text" name="description" size="20"  value="<!-- TMPL_VAR NAME="description" -->" >
+			</p>
+		<p>
+			<label>title</label>
+			<input  type="text" name="title" size="20"  value="<!-- TMPL_VAR NAME="title" -->" >
+			
+		</p>
+		<p>
+			<label>surname</label>
+			<input  style="text-transform:uppercase;" type="text" name="surname" size="20"  value="<!-- TMPL_VAR NAME="surname" -->" >
+		</p>
+			
+		<p>	
+			
+			<label>firstname</label>
+			<input  style="text-transform:capitalize;" type="text" name="firstname" size="20"  value="<!-- TMPL_VAR NAME="firstname" -->">
+		</p>
+		<p>
+			<label>Date of birth </label>
+			<input  type="text" name="dateofbirth" size="20"  value="<!-- TMPL_VAR NAME="dateofbirth" -->">
+		</p>		
+		
+		
+			
+		
+	<!-- /TMPL_IF -->
+	<p>
+		<div align="center">
+		<a href="#" onclick="window.close()">Close Window</a>
+		</div>
+	</p>
+	
+	</form>
+
+
+

Index: koha-tmpl/intranet-tmpl/default/en/members/deletemem.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/deletemem.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/deletemem.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/deletemem.tmpl	26 Mar 2007 02:19:26 -0000	1.2.2.1
@@ -0,0 +1,21 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Cannot Delete User<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<div class="error">
+	<h3>Cannot Delete Patron</h3>
+		<!-- TMPL_IF name="ItemsOnIssues" -->
+			<p>Patron has <!-- TMPL_VAR name="ItemsOnIssues" --> item(s) checked out.</p>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="charges -->
+			<p>Patron has <!-- TMPL_VAR name="charges" --> in fines.</p>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="guarantees" -->
+			<p>Patron's record has child accounts attached.</p>
+		<!-- /TMPL_IF -->
+		<form action="moremember.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR NAME="bornum" -->" name="bornum" /><input type="submit" class="submit" value="&lt;&lt; Return to Patron Record" /></form>
+	</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/guarantor_search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/guarantor_search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/guarantor_search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/guarantor_search.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,43 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Guarantor search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<h1>Search guarantor</h1>
+	Search on
+	<form action="/cgi-bin/koha/members/guarantor_search.pl" method="post">
+		<input type="text" name="member" value="<!-- TMPL_VAR NAME="member" -->"> Ordered by
+		<select name="orderby">
+			<option value="surname,firstname">Surname</option>
+			<option value="cardnumber">cardnumber</option>
+		</select>
+		<input type="submit" class="button" value="OK">
+	</form>
+</div>
+
+<!--TMPL_IF NAME="results" -->
+	<p>filter on <!-- TMPL_VAR NAME="member" -->, <!-- TMPL_VAR Name ="numresults" --> members found</p>
+	<table>
+		<tr>
+			<th>cardnumber</th>
+			<th>surname</th>
+			<th>firstname</th>
+			<th>Date of birth</th>
+			<th>address</th>
+		</tr>
+		<!-- TMPL_LOOP NAME="resultsloop" -->
+			<!-- TMPL_IF NAME="background" -->
+				<tr bgcolor="#ffffcc">
+			<!-- TMPL_ELSE -->
+				<tr bgcolor="white">
+			<!-- /TMPL_IF -->
+				<td><!-- TMPL_VAR NAME="cardnumber" --></td>
+				<td><p><a href="javascript:window.opener.document.form.guarantorid.value=<!-- TMPL_VAR NAME="borrowernumber" -->;self.close();"><!-- TMPL_VAR NAME="surname" --></a></p>
+				<td><b><!-- TMPL_VAR NAME="firstname" --></b></td> 
+				<td><!-- TMPL_VAR NAME="dateofbirth" --></td>
+				<td><p><!-- TMPL_VAR NAME="address" --> <!-- TMPL_VAR NAME="city" --></p></td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+	</table>
+</div>
+</div>
+<!--/TMPL_IF-->
+
+
+

Index: koha-tmpl/intranet-tmpl/default/en/members/mancredit.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/mancredit.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/mancredit.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/mancredit.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,43 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Users: Create Manual Credit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><h3>Manual Credit</h3>
+<!-- TMPL_IF NAME="error" -->
+		<div class="error">
+		<h3>Error Crediting User: Either no such invoice exists or no amount given</h3>
+		
+</div><!--/TMPL_IF-->
+<form class="inline" action="mancredit.pl" method="post" name="manualcredit">
+<input type="hidden" name="bornum" value="<!-- TMPL_VAR Name="bornum" -->" />
+<input type="hidden" name="loggedinuser" value="<!-- TMPL_VAR NAME="loggedinusername" -->">
+<input type="hidden" name="accounttype" value=  "<!-- TMPL_VAR NAME="accounttype" -->"/>
+<input type="hidden" name="itemnum" value=  "<!-- TMPL_VAR NAME="itemnum" -->"/>
+<input type="hidden" name="accountid" value=  "<!-- TMPL_VAR NAME="accountid" -->"/>
+<input type="hidden" name="user" value=  "<!-- TMPL_VAR NAME="user" -->"/>
+<input type="hidden" name="add" value=  "add"/>
+<div class="data">
+<table>
+	<tr><th>Fine Details</th><td><div class="error">User:<!-- TMPL_VAR Name="user" -->&nbsp;&nbsp;&nbsp;Amount:<!-- TMPL_VAR NAME="amount" --> </div></td></tr>
+	<tr><th>Description</th><td><input type="text" name="desc" size="50" /></td></tr>
+	<tr><th>Amount</th><td><input type="text" name="amount" /></td></tr>
+</table>
+</div>
+<input type="button"  onclick="AddCredit(this.form)" value="Add Credit" />
+</form> <form class="inline" action="boraccount.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR Name="bornum" -->" name="bornum" /><input type="submit" class="cancel" value="Cancel" /></form>
+
+<script type="text/javascript">
+function AddCredit(f){
+if (f.amount.value==""){
+alert("No amount given");
+return false;
+}
+document.manualcredit.submit();
+
+
+
+}
+</script>
+<div>
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/maninvoice.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/maninvoice.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/maninvoice.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/maninvoice.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,29 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Users: Create Manual Invoice<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+
+<div id="main">
+<form class="inline" action="maninvoice.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR Name="bornum" -->" />
+	<div class="data"><table>
+	<caption>Manual Invoice</caption>
+	<tr><th>User</th><td><!-- TMPL_VAR Name="user" --></td></tr>
+	<tr><th>Type</th><td><select name="type">
+<option value="L">Lost Item</option>
+<option value="F">Fine</option>
+<option value="A">Account Management Fee</option>
+<option value="N">New Card</option>
+<option value="M">Sundry</option>
+<option value="REF">Cash Refund</option>
+</select></td></tr>
+	<tr><th>Description</th><td><input type="text" name="desc" size="50" /></td></tr>
+	<tr><th>Amount</th><td>YTL<input type="text" name="amount" /></td></tr>
+	</table></div>
+<input type="submit" name="add" value="Add Charge" class="submit" />
+</form> <form class="inline" action="boraccount.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR Name="bornum" -->" /><input type="submit" class="cancel" value="Cancel" /></form>
+
+
+</div>
+
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/member-flags.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/member-flags.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/member-flags.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/member-flags.tmpl	26 Mar 2007 02:19:26 -0000	1.4.2.1
@@ -0,0 +1,30 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Set Privileges for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<form method="post" action="/cgi-bin/koha/members/member-flags.pl">
+	<input type="hidden" name="member" value="<!-- TMPL_VAR NAME="member" -->" />
+	<input type="hidden" name="newflags" value="1" />
+<div class="table">	<table>
+	<caption>Set Privileges for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></caption>
+	<tr><th>Flag</th><th>Name</th><th>Description</th></tr>
+	<!-- TMPL_LOOP NAME="loop" -->
+		<tr>
+			<td>
+				<input type="checkbox" name="flag-<!-- TMPL_VAR NAME="bit" -->" <!-- TMPL_VAR NAME="checked" --> />
+			</td>
+			<td>
+				<!-- TMPL_VAR NAME="flag" -->
+			</td>
+			<td>
+				<!-- TMPL_VAR NAME="flagdesc" -->
+			</td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+	</table></div>
+<p><input type="submit" value="Set Flags" class="submit" /> <input class="cancel" type="button" value="Cancel" onclick="location.href='/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="member" -->'; return false;" /></p>
+
+</form>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/member-password.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/member-password.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/member-password.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/member-password.tmpl	26 Mar 2007 02:19:26 -0000	1.10.2.1
@@ -0,0 +1,27 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Users: <!-- TMPL_IF NAME="newpassword" -->Password Updated <!-- TMPL_ELSE -->Update Password for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<!-- TMPL_IF NAME="newpassword" -->
+<h3>Password Updated</h3>
+<div class="details">
+<p><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="member" -->">Return to Member Details</a></p>
+</div>
+<!-- TMPL_ELSE --><form method="post" action="/cgi-bin/koha/members/member-password.pl">
+<h3>Change Username and/or Password for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></h3>
+	
+	<!-- TMPL_IF NAME="warn" --><div class="error">
+		You have entered a User ID that already exists.  Please choose another one.</div>
+	<!-- /TMPL_IF -->
+<div class="details">
+<table><tr><th>New UserID:</th><td><input type="hidden" name="member" value="<!-- TMPL_VAR NAME="member" -->" />
+	
+<input name="newuserid" size="20" value="<!-- TMPL_VAR NAME=userid -->" /></td></tr>
+<tr><th>New Password:</th><td><input name="newpassword" type="text" size="20" value="<!-- TMPL_VAR NAME="defaultnewpassword" -->" /></td></tr></table>
+	</div><p><input type="submit" value="Confirm Password" class="submit" /> <input class="cancel" type="button" value="Cancel" onclick="location.href='/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="member" -->'; return false;" /></p>
+</form><!-- /TMPL_IF -->
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/member-picupload.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/member-picupload.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/member-picupload.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/member-picupload.tmpl	26 Mar 2007 02:19:26 -0000	1.2.2.1
@@ -0,0 +1,20 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Patrons: Details for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+ 
+ <div id="main">
+ 	<div id="bloc25">
+ 	<h2 class="members">Upload Picture</h2>
+ 	Member name:: <!-- TMPL_VAR NAME="name" --> cardnumber:<!-- TMPL_VAR NAME="cardnum" --><br>
+ 	<FORM ACTION="/cgi-bin/koha/members/member-picupload.pl" METHOD="post"
+ENCTYPE="multipart/form-data"> 
+     Photo to Upload: <INPUT TYPE="file" NAME="photo"> 
+     <INPUT TYPE="hidden" NAME="cardnum" VALUE="<!-- TMPL_VAR NAME="cardnum" -->">
+    <INPUT TYPE="hidden" NAME="bornum" VALUE="<!-- TMPL_VAR NAME="bornum" -->">
+  <br><br> 
+  <INPUT TYPE="submit" NAME="Submit" VALUE="Submit Form"> 
+  </FORM>
+ 	</div>
+ </div>
+ <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->	
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch-results.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch-results.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch-results.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch-results.tmpl	26 Mar 2007 02:19:26 -0000	1.5.2.1
@@ -0,0 +1,28 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Users Quick Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<div id="main-compact">
+
+<div class="table"><table>
+  <tr>
+  	<th>&nbsp;</th>
+    <th>Card</th>
+    <th>Name (Cat.)</th>
+    <th>Address</th>
+  </tr>
+  <!-- TMPL_IF NAME="resultsloop" -->
+  <!-- TMPL_LOOP NAME="resultsloop" -->
+    <!-- TMPL_IF NAME="background" -->
+    <tr class="highlight">
+    <!-- TMPL_ELSE -->
+    <tr>
+    <!-- /TMPL_IF -->
+	 <td><form action="member-search-results.pl" method="get"><input type="button" class="submit" value="Choose" title="Choose this Patron" onclick="window.opener.FillForm('<!-- TMPL_VAR NAME="cardnumber" -->','mainform','member'); return false;" /></form></td>
+      <td><!-- TMPL_VAR NAME="cardnumber" --></td>
+      <td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> (<!-- TMPL_VAR NAME="categorycode" -->)</td>
+      <td><!-- TMPL_VAR NAME="streetaddress" --> <!-- TMPL_VAR NAME=city --></td>
+    </tr>
+  <!-- /TMPL_LOOP -->
+  <!-- TMPL_ELSE --><td colspan="6">No results found</td><!-- /TMPL_IF -->
+</table></div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/member-quicksearch.tmpl	26 Mar 2007 02:19:26 -0000	1.2.2.1
@@ -0,0 +1,10 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS-- Users Quick Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<div id="main-compact">
+	<form action="/cgi-bin/koha/members/member.pl" method="post" id="mainform" class="mainform">
+	<label for="member">Patron Search:</label><input id="member" type="text" size="25" name="member" /><input type="hidden" name="quicksearch" value="1" />
+	<input type="submit" value="Search" class="submit" />
+	</form>
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/member.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/member.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/member.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/member.tmpl	26 Mar 2007 02:19:26 -0000	1.20.2.1
@@ -0,0 +1,43 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Patrons: Search Results<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<div class="table"><table>
+	<caption>Patron Search Results</caption>
+  <tr>
+    <th>Card</th>
+    <th>Name</th>
+    <th>Cat</th>
+    <th>Address</th>
+    <th>OD/Issues</th>
+<!--     <th>Charges</th> -->
+    <th>Notes</th>
+	<th>&nbsp;</th>
+  </tr>
+  <!-- TMPL_IF NAME="resultsloop" -->
+  <!-- TMPL_LOOP NAME="resultsloop" -->
+    <!-- TMPL_IF NAME="background" -->
+    <tr class="highlight">
+    <!-- TMPL_ELSE -->
+    <tr>
+    <!-- /TMPL_IF -->
+      <td><!-- TMPL_VAR NAME="cardnumber" --> (<a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber" -->" title="Issue to this Patron">Issue</a>)</td>
+      <td><a class="searchresults" href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --></a> </td>
+      <td><!-- TMPL_VAR NAME="categorycode" --></td>
+      <td><!-- TMPL_VAR NAME="streetaddress" --> <!-- TMPL_VAR NAME=city --></td>
+      <td><!-- TMPL_VAR NAME="odissue" --></td>
+<!--       <td><!-- TMPL_VAR NAME="fines" --></td> -->
+      <td><div class="notes"><!-- TMPL_VAR NAME="borrowernotes" --></div></td>
+	  <td><a href="/cgi-bin/koha/members/memberentry.pl?borrowernumber=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;modify=edit">Edit</a></td>
+    </tr>
+  <!-- /TMPL_LOOP -->
+  <!-- TMPL_ELSE --><td colspan="6">No results found</td><!-- /TMPL_IF -->
+</table></div>
+<div class="tabitem"><form action="/cgi-bin/koha/members/memberentry.pl" method="post"><input type="hidden" name="categorycode" value="" /><input type="hidden" name="actionType" value="Add" />
+	<input type="submit" class="submit" value="Add New Patron" /></form>
+	<form action="/cgi-bin/koha/members/memberentry.pl" method="post"><input type="hidden" name="categorycode" value="I" /><input type="hidden" name="actionType" value="Add" /><input type="submit" class="submit" value="Add New Institution" /></form>
+	</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/memberentry.tmpl	26 Mar 2007 02:19:26 -0000	1.39.2.1
@@ -0,0 +1,161 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Patrons: <!-- TMPL_IF NAME="modify" -->Edit Record for  <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- TMPL_ELSE -->Add New <!-- TMPL_IF NAME="institution" -->Institutional <!-- /TMPL_IF -->Patron<!-- /TMPL_IF --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<!-- TMPL_IF NAME="addAction" -->
+	<h1>
+		Add New <!-- TMPL_IF NAME="institution" -->Institutional <!-- /TMPL_IF -->Patron
+	</h1>
+	<!-- TMPL_ELSE -->
+	<h1>
+		Update <!-- TMPL_IF NAME="institution" -->Institutional <!-- TMPL_ELSE -->Patron<!-- /TMPL_IF --> Details
+</h1><h2><!-- TMPL_IF NAME="surname" --><!-- TMPL_VAR NAME="surname" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="firstname" -->, <!-- TMPL_VAR name="firstname" --><!-- /TMPL_IF --></h2>
+	<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF Name="NOK" -->
+		
+		<div class="error">
+		<h3>Missing Information</h3>
+			<p>The following fields have a forbidden value. Correct them and press OK again :</p><ul>
+			<!-- TMPL_IF NAME="ERROR_surname" -->
+				<li><a href="#lastname"><!-- TMPL_IF NAME="institution" -->Institutional <!-- TMPL_ELSE -->Last Name<!-- /TMPL_IF --></a></li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERROR_firstname" -->
+				<li><a href="#firstname">First Name</a></li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERROR_gender" -->
+				<li><a href="sex">Sex</a></li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERROR_address" -->
+				<li><a href="#address">Mailing Address</a></li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERROR_city" -->
+				<li><a href="#city">Mailing Address City/State</a><br>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERROR_cardnumber" -->
+				<li><a href="#cardnumber">Card Number</a></li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERROR_invalid_cardnumber" -->
+				<li><a href="#cardnumber">Invalid Card Number</a></li>
+			<!-- /TMPL_IF -->
+			</ul>
+		</div>
+	<!-- /TMPL_IF -->
+	<form action="/cgi-bin/koha/members/memberentry.pl" method="post">
+		<input type="hidden" name="destination" value="<!-- TMPL_VAR NAME="destination" -->" />
+		<input type="hidden" name="type" value="borrowers">
+<input type="hidden" name="joining" value="<!-- TMPL_VAR NAME="joining" -->">
+		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->">
+		<input type="hidden" name="updtype" value="<!-- TMPL_VAR NAME="updtype" -->">
+	<input type="hidden" name="actionType" value="<!-- TMPL_VAR NAME="actionType" -->">
+		<!-- TMPL_IF NAME="addAction" -->
+			<input type="hidden" name="op" value="add">
+		<!-- TMPL_ELSE -->
+			<input type="hidden" name="op" value="modify">
+		<!-- /TMPL_IF -->
+<div class="table members"><table>
+
+	<!-- TMPL_UNLESS name="institution" --><tr><th><label for="title">Salutation:</label></th><td colspan="4"><!-- TMPL_VAR NAME="Mr" -->
+				<select name="title" id="title">
+					<option <!-- TMPL_VAR NAME="title_selected_ " --> value="">No Title</option>
+					<option value="Miss" <!-- TMPL_VAR NAME="title_Miss" -->>Miss</option>
+					<option value="Mrs" <!-- TMPL_VAR NAME="title_Mrs" -->>Mrs</option>
+					<option value="Ms" <!-- TMPL_VAR NAME="title_Ms" -->>Ms</option>
+					<option <!-- TMPL_VAR NAME="title_Mr" --> value="Mr" >Mr</option>
+					<option value="Dr" <!-- TMPL_VAR NAME="title_Dr" -->>Dr</option>
+					<option value="Sir" <!-- TMPL_VAR NAME="title_Sir" -->>Sir</option>
+				</select>
+				</td></tr><!-- /TMPL_UNLESS -->
+	<!-- TMPL_UNLESS name="institution" --><tr><th><label for="initials">Initials:</label></th><td colspan="4"><input type="text" id="initials" name="initials" size="5" value="<!-- TMPL_VAR NAME="initials" -->"></td></tr><!-- /TMPL_UNLESS -->
+
+	<tr><th><label for="surname"<!-- TMPL_IF NAME="ERROR_surname" --> class="focus"<!-- /TMPL_IF -->><a name="lastname" id="lastname"><!-- TMPL_IF NAME="institution" -->Institution name:<!-- TMPL_ELSE -->Last Name: <!-- /TMPL_IF --></a></label></th><td><input type="text" id="surname" name="surname" size="20" value="<!-- TMPL_VAR NAME="surname" -->"<!-- TMPL_IF NAME="ERROR_surname" --> class="focus"<!-- /TMPL_IF -->></td>
+
+<!-- TMPL_UNLESS name="institution" --><th><label for="sex"<!-- TMPL_IF NAME="ERROR_gender" --> class="focus"<!-- /TMPL_IF -->><a name="sex" id="sex">Sex:</a> </label></th><td><input type="radio" id="sex" name="sex" value="F"<!-- TMPL_IF NAME="female" --> checked="checked"<!-- /TMPL_IF --><!-- TMPL_IF NAME="ERROR_gender" --> class="focus"<!-- /TMPL_IF -->>F	<input type="radio" name="sex" value="M"<!-- TMPL_UNLESS name="female" --> checked="checked"<!-- /TMPL_UNLESS --><!-- TMPL_IF NAME="ERROR_gender" --> class="focus"<!-- /TMPL_IF -->> M</td><!-- /TMPL_UNLESS -->
+</tr>
+
+	<!-- TMPL_UNLESS name="institution" --><tr><th><label for="firstname"<!-- TMPL_IF NAME="ERROR_firstname" --> class="focus"<!-- /TMPL_IF -->><a name="firstname" id="firstname">First Name:</a></label> </th><td><input type="text" id="firstname" name="firstname" size="20" value="<!-- TMPL_VAR NAME="firstname" -->"<!-- TMPL_IF NAME="ERROR_firstname" --> class="focus"<!-- /TMPL_IF -->></td>
+
+<!-- TMPL_UNLESS name="institution" --><th><label for="dateofbirth">Date of Birth: </label></th><td><input type="text" id="dateofbirth" name="dateofbirth" size="10" value="<!-- TMPL_VAR NAME="dateofbirth" -->"> (<!-- TMPL_VAR NAME="dateformat" -->)</td><!-- /TMPL_UNLESS -->
+</tr><!-- /TMPL_UNLESS -->
+					
+	<!-- TMPL_UNLESS name="institution" --><tr><th><label for="othernames">Prefered Name:</label></th><td colspan="4"><input type="text" id="othernames" name="othernames" size="20" value="<!-- TMPL_VAR NAME="othernames" -->"></td></tr><!-- /TMPL_UNLESS -->
+
+	<tr><th>Addresses:</th><td colspan="4"><fieldset><legend>Mailing Address</legend><label for="streetaddress"<!-- TMPL_IF NAME="ERROR_address" --> class="focus"<!-- /TMPL_IF -->><a name="address" id="address">Address:</a> </label><input type="text" id="streetaddress" name="streetaddress" size="25" value="<!-- TMPL_VAR NAME="address" -->"<!-- TMPL_IF NAME="ERROR_address" --> class="focus"<!-- /TMPL_IF -->>
+<br><label for="city"<!-- TMPL_IF NAME="ERROR_city" --> class="focus"<!-- /TMPL_IF -->><a name="#city" id="#city">City:</a></label> <input type="text" id="city" name="city" size="20" value="<!-- TMPL_VAR NAME="city" -->"<!-- TMPL_IF NAME="ERROR_city" --> class="focus"<!-- /TMPL_IF -->>
+<br><label for="zipcode">Postal Code:</label> <input type="text" id="zipcode" name="zipcode" size="20" maxlength="20" value="<!-- TMPL_VAR NAME="zipcode" -->"></fieldset>
+
+<fieldset><legend>Street Address (if different)</legend>
+<label for="physstreet">Address:</label><input type="text" id="physstreet" name="physstreet" size="25" value="<!-- TMPL_VAR NAME="physstreet" -->">
+<br><label for="streetcity">City: </label><input type="text" id="streetcity" name="streetcity" size="20" value="<!-- TMPL_VAR NAME="streetcity" -->">
+<br><label for="homezipcode">Postal Code:</label><input type="text" id="homezipcode" name="homezipcode" size="20" maxlength="20" value="<!-- TMPL_VAR NAME="homezipcode" -->">
+</fieldset>
+</td></tr><tr><th><label for="preferedcont">Prefered method to contact:</label> </th><td ><input type="radio" id="preferredcont" name="preferredcont"  value="sms" <!-- TMPL_IF NAME="sms" -->checked<!--/TMPL_IF-->>SMS<input type="radio" id="preferredcont" name="preferredcont"  value="email" <!-- TMPL_IF NAME="email" -->checked<!--/TMPL_IF-->>E-mail<input type="radio" id="preferredcont" name="preferredcont"  value="letter" <!-- TMPL_IF NAME="letter" -->checked<!--/TMPL_IF-->>Letter</td><td>If Letter is chosen fill Mailing address properly</tr>
+	
+	<tr><th><label for="phoneday">GSM Mobile:</label> </th><td colspan="4"><input type="text" id="phoneday" name="phoneday" size="20" value="<!-- TMPL_VAR NAME="phoneday" -->">If SMS is chosen please fill one number as 05338717273</td></tr>
+	<tr><th><label for="phone"> Other Phone :</label> </th><td colspan="4"><input type="text" id="phone" name="phone" size="20" value="<!-- TMPL_VAR NAME="phone" -->"></td></tr>
+	<tr><th><label for="faxnumber">Fax: </label></th><td colspan="4"><input type="text" id="faxnumber" name="faxnumber" size="20" value="<!-- TMPL_VAR NAME="faxnumber" -->"></td></tr>
+	<tr><th><label for="emailaddress">Email :</label> </th><td colspan="4"><input type="text" id="emailaddress" name="emailaddress" size="40" value="<!-- TMPL_VAR NAME="emailaddress" -->">If Email is chosen write a valid e-mail</td></tr>
+			</tr>
+	<tr><th><label for="textmessaging">Patron message:</label><p> (appears in OPAC)</p></th><td colspan="4"><textarea id="textmessaging" name="textmessaging" cols="30" rows="3"><!-- TMPL_VAR NAME="textmessaging" --></textarea></td></tr>
+	<tr><th><label for="borrowernotes">Circulation note:</label> <p>(appears in Circulation)</p> </th><td colspan="4"><textarea id="borrowernotes" name="borrowernotes" cols="30" rows="3"><!-- TMPL_VAR NAME="borrowernotes" --></textarea></td></tr>
+			</table></div>
+
+
+
+		<div class="table members"><table>
+<!-- TMPL_UNLESS name="institution" -->
+		<caption>Alternate Contact</caption>
+		<tr><th><label for="contactname">Name: </label></th><td><input type="text" id="contactname"  name="contactname" size="40" value="<!-- TMPL_VAR NAME="contactname" -->"></td></tr>
+		<tr><th><label for="altphone">Phone:</label> </th><td><input type="text" id="altphone" name="altphone" size="20" value="<!-- TMPL_VAR NAME="altphone" -->"></td></tr>
+		<tr><th><label for="altrelationship">Relationship:</label> </th><td><select id="altrelationship" name="altrelationship" size="1">
+					<!-- TMPL_LOOP NAME="relshiploop" -->
+						<option <!-- TMPL_VAR NAME="selected" -->><!-- TMPL_VAR NAME="relationship" --></option>
+					<!-- /TMPL_LOOP -->
+					</select></td></tr><!-- /TMPL_UNLESS -->
+
+		<tr><th><label for="altnotes">Notes: </label></th><td><textarea id="altnotes" name="altnotes" cols="30" rows="3"><!-- TMPL_VAR NAME="altnotes" --></textarea></td></tr>
+		
+	<tr></table></div><div class="table members"><table>
+				<caption>Library Use</caption>
+			</tr>
+			<tr>
+				<!-- TMPL_IF NAME="addAction" -->
+					<th>Joining date (leave blank for today)</th>
+					<td><input type="text" name="joining" id="joining" size="12" maxlength="10" value="<!-- TMPL_VAR name="joining" -->"> (<!-- TMPL_VAR NAME="dateformat" -->)</td>
+				<!-- TMPL_ELSE -->
+					<td>Joining date</td>
+					<td><!-- TMPL_VAR name="joining" --></td>
+				<!-- /TMPL_IF -->
+				<th><label for="expiry">Expiry date (leave blank for auto calc)</label></th>
+				<td><input type="text" name="expiry" id ="expiry" size="12" maxlength="10" value="<!-- TMPL_VAR name="expiry" -->"> (<!-- TMPL_VAR NAME="dateformat" -->)</td>
+			</tr>
+
+</table></div>
+<div class="table members"><table>
+	<caption>Flags</caption>
+	<!-- TMPL_LOOP NAME="flagloop" -->
+	<tr><th><label for="<!-- TMPL_VAR NAME="name" -->"><!-- TMPL_VAR NAME="html" --></label></th><td><input type="radio" id="<!-- TMPL_VAR NAME="name" -->" name="<!-- TMPL_VAR NAME="name" -->" value="1" <!-- TMPL_VAR NAME="yes" -->>Yes <input type="radio" name="<!-- TMPL_VAR NAME="name" -->" value="0" <!-- TMPL_VAR NAME="no" -->>No</td></tr>
+				<!-- /TMPL_LOOP -->
+</table></div>
+
+<div class="table members"><table>
+<caption>Patron Details</caption>
+	<!-- TMPL_UNLESS NAME="addAction" --><tr><th><label>Member Number:</label></th><td><span class="ex"><!-- TMPL_VAR NAME="member" --></span></td></tr><!-- /TMPL_UNLESS -->
+	<tr><th><label for="categorycode">Category:</label> </th><td><!-- TMPL_VAR NAME="catcodepopup" --></td></tr>
+	<tr><th><label for="branchcode">Branch:</label></th><td><!-- TMPL_VAR NAME="CGIbranch" --></td></tr>	
+	<tr><th><label for="cardnumber"<!-- TMPL_IF NAME="ERROR_cardnumber" --> class="focus"<!-- /TMPL_IF --><!-- TMPL_IF NAME="ERROR_invalid_cardnumber" --> class="focus"<!-- /TMPL_IF -->><a name="cardnumber" id="cardnumber">Card Number</a></label></th><td><input id="cardnumber" type="text" name="cardnumber" size="10" value="<!-- TMPL_VAR NAME="cardnumber" -->"<!-- TMPL_IF NAME="ERROR_cardnumber" --> class="focus"<!-- /TMPL_IF --><!-- TMPL_IF NAME="ERROR_invalid_cardnumber" --> class="focus"<!-- /TMPL_IF -->></td></tr>
+</table>
+<table><caption>Additional Fields</caption>
+	<tr><th><label for="sort1">Sorting field 1</label></th><td><input type="text" id="sort1" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->"></td><td rowspan="2"><p>These fields are available for your own usage. They can be useful for statistical purposes</p></td></tr>
+	<tr><th><label for="sort2">Sorting field 2</label></th><td><input type="text" id="sort2" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->"></td></tr>
+</table>
+</div>
+
+<p>	<input type="hidden" name="type" value="<!-- TMPL_VAR NAME="type" -->">
+	<input name="submit" type="submit" class="submit" value="<!-- TMPL_IF NAME="modify" -->Update<!-- TMPL_ELSE -->Add<!-- /TMPL_IF --> This Patron" /></p>
+	</form>
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/members-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/members-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/members-home.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/members-home.tmpl	26 Mar 2007 02:19:26 -0000	1.13.2.1
@@ -0,0 +1,53 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Users<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+<h1>Users</h1>
+<div id="menu">
+<dl><dt>User Search</dt>
+			<dd>Start with a search to add, update, or delete a record, check accounts, &amp; renew items.
+	<form action="/cgi-bin/koha/members/member.pl" method="post">
+	<label for="member">Enter Name or Barcode</label><input id="member" type="text" size="25" name="member" />  <select name="orderby" id="orderby">
+			<option value="surname,firstname">Order by Last Name</option>
+			<option value="cardnumber">Order by Card Number</option>
+		</select><br />
+	<input type="submit" value="Search" class="submit" />
+	</form></dd>
+<dt>Browse Users</dt>
+<dd>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=a">A</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=b">B</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=c">C</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=d">D</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=e">E</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=f">F</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=g">G</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=h">H</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=i">I</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=j">J</a>
+
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=k">K</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=l">L</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=m">M</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=n">N</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=o">O</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=p">P</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=q">Q</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=r">R</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=s">S</a>
+
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=t">T</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=u">U</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=v">V</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=w">W</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=x">X</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=y">Y</a>
+<a class="nav" href="/cgi-bin/koha/members/member.pl?member=z">Z</a>
+</dd>
+</dl>
+</div>
+</div>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/moremember-print.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/moremember-print.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/moremember-print.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/moremember-print.tmpl	26 Mar 2007 02:19:26 -0000	1.3.2.1
@@ -0,0 +1,76 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Summary for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->  (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- TMPL_INCLUDE NAME="doc-head-close-print.inc" -->
+
+
+<div id="main">
+<h3><!-- TMPL_VAR NAME="LibraryName" --></h3><br><br>
+<h3><a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber" -->">Account: <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->      &nbsp;&nbsp; &nbsp;&nbsp;Student/Members card:<!-- TMPL_VAR NAME="cardnumber" --></a></h3>
+
+<ul><li><!-- TMPL_VAR NAME="streetaddress" --></li><li><!-- TMPL_VAR NAME="city" -->, <!-- TMPL_VAR NAME="zipcode" --></li>
+<li><!-- TMPL_IF NAME="phone" --><!-- TMPL_VAR NAME="phone" --><!-- TMPL_ELSE -->(no phone number on file)<!-- /TMPL_IF --></li>
+<li><!-- TMPL_IF NAME="emailaddress" --><!-- TMPL_VAR NAME="emailaddress" --><!-- TMPL_ELSE -->(no email on file)<!-- /TMPL_IF --></li>
+</ul>
+
+<table>
+	<caption>Fines &amp; Charges</caption>
+		
+		<tr>
+			<!-- TMPL_IF name="totaldue" --><th>Total Due:</th><td><!-- TMPL_VAR NAME="totaldue" --> YTL</td></tr><!-- TMPL_ELSE --><td>No Outstanding Charges (Hiçbir borcu yoktur)</td><!-- /TMPL_IF --></table>
+<table>
+	<caption>Items Checked Out</caption>
+<!-- TMPL_IF name="issueloop" -->
+	<tr>
+		<th>Title</th>
+		<th>Author</th>
+		<th>Format</th>
+		<th>Date Due</th>
+		<th>Status</th>
+	</tr>
+
+	<!-- TMPL_loop name="issueloop" -->
+	<tr<!-- TMPL_IF name="red" --> class="overdue"</TMPL_IF>>
+		<td>
+		<!-- TMPL_VAR NAME="title" -->
+		<a href="/cgi-bin/koha/catalogue/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->">
+		</a>
+		</td>
+		<td><!-- TMPL_VAR NAME="author" --></td>
+		<td><!-- TMPL_VAR NAME="itemtype" --></td>
+		<td><!-- TMPL_VAR NAME="date_due" --></td>
+		<td><!-- TMPL_IF NAME="red" -->Overdue!<!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
+	</tr>
+	<!-- /TMPL_LOOP -->
+<!-- TMPL_ELSE -->
+<tr>
+		<td>No items onloan (Hiçbir ödünç yayını yoktur)</td></tr><!-- /TMPL_IF -->
+	</table>
+<!-- TMPL_IF name="reserveloop" -->	
+<table>
+
+	<caption>Items on Reserve</caption>
+
+	<tr>
+		<th>Title</th>
+		<th>Author</th>
+		<th>Format</th>
+		<th>Requested</th>
+	</tr>
+
+<!-- TMPL_loop name="reserveloop" -->
+	<tr>
+		<td><a href="/cgi-bin/koha/reserve/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="btitle" --></a></td>
+		<td><!-- TMPL_VAR NAME="author" --></td>
+		<td><!-- TMPL_VAR NAME="description" --></td>
+		<td><!-- TMPL_VAR NAME="reservedate2" --></td>
+	</tr>
+	<!-- /tmpl_loop -->
+
+</table>
+<!-- /TMPL_IF -->
+<br>
+Date:<!-- TMPL_VAR NAME="today" --><br><br><br>
+
+Signed:..................................................
+</div>
+
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/moremember-receipt.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/moremember-receipt.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/moremember-receipt.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/moremember-receipt.tmpl	26 Mar 2007 02:19:26 -0000	1.3.2.1
@@ -0,0 +1,44 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --><!-- TMPL_INCLUDE NAME="doc-head-close-receipt.inc" -->
+
+<!-- main site -->
+<div id="main">
+<h3>NEU Grand Library</h3>
+<!-- TMPL_IF NAME="branchname" --><!-- TMPL_VAR NAME="branchname" --><br><!-- /TMPL_IF -->
+Issued To <a href="/cgi-bin/koha/circ/circulation.pl?findborrower=<!-- TMPL_VAR NAME="cardnumber">"><!-- TMPL_VAR NAME="cardnumber" --></a><br>
+<!-- TMPL_VAR NAME="todaysdate" --><br>
+<table>
+	<caption>Issues</caption>
+	<tr>
+		<th>Date Due</th>
+		<th>Title</th>
+	</tr>
+
+	<!-- TMPL_loop name="issueloop" -->
+	<!-- TMPL_IF name="red" --><!-- TMPL_ELSE -->
+		<tr>
+		<td><!-- TMPL_VAR NAME="date_due" --></td>
+		<td><a href="/cgi-bin/koha/catalogue/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+		</tr>
+	<!-- /TMPL_IF -->
+	<!-- /TMPL_LOOP -->
+	</table>
+	
+	<table>
+	<caption>Overdues</caption>
+	<tr>
+	<th>Date Due</th>
+	<th>Title</th>
+	</tr>
+	<!-- TMPL_LOOP NAME="issueloop" -->
+	<!-- TMPL_IF NAME="red" --><tr>
+	<td><!-- TMPL_VAR NAME="date_due" --></td>
+	<td><a href="cgi-bin/koha/catalogue/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;bib=<!-- TMPL_VAR NAME="biblionumber" -->&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="title" --></a></td>
+	</tr>
+	<!-- /TMPL_IF -->
+	<!-- /TMPL_LOOP -->
+	</table>
+
+</div>
+<!-- endmenu -->
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/moremember.tmpl	26 Mar 2007 02:19:26 -0000	1.42.2.1
@@ -0,0 +1,236 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Patrons: Details for <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --> (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<!-- main site -->
+<div id="main">
+<h1><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --> (<!-- TMPL_VAR NAME="cardnumber" -->) <span class="print"><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=page">(İlişik kesme mektubu)</a> <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;print=slip">(Print Slip)</a><a href="/cgi-bin/koha/reports/contact_history.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;do_contacts=1">(Gönderilen mesajlar)</a></span></h1>
+<!-- TMPL_IF NAME="borrowerphoto" -->
+ 		<img src="<!-- TMPL_VAR NAME="borrowerphoto" -->">
+  	<!-- /TMPL_IF --><br>
+  	<a href="/cgi-bin/koha/members/member-picupload.pl?cardnum=<!-- TMPL_VAR NAME="cardnumber"-->&bornum=<!-- TMPL_VAR NAME=bornum -->&name=<!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="othernames" --> <!--
+TMPL_VAR NAME="surname" -->" class="button">Upload Picture</a><br>
+
+<div class="tabitem">
+			 <form method="post" action="/cgi-bin/koha/circ/circulation.pl"><input name="findborrower" type="hidden" value="<!-- TMPL_VAR NAME="cardnumber" -->" /><input type="hidden" name="branch" value="<!-- TMPL_VAR name="branch" -->" /><input type="hidden" name="printer" value="<!-- TMPL_VAR name="printer" -->" /> <input type="submit" class="submit" value="Issue" /></form>
+
+<!-- Hide from NPL --><!-- TMPL_IF name="IS_ADULT" --> <form action="/cgi-bin/koha/members/jmemberentry.pl" method="post"> <input type="submit" name="submit" value="Add Child" class="submit" alt="Add Child" /><input type="hidden" name="type" value="add" /><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /></form><!-- /TMPL_IF --><!-- /Hide from NPL -->
+
+<!-- TMPL_IF name="I" --> <form action="/cgi-bin/koha/members/imemberentry.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /> <input type="submit" name="modify" class="submit" value="Edit" /></form>
+<!-- TMPL_ELSE --> <form action="/cgi-bin/koha/members/memberentry.pl" method="post"><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="bornum" -->" /> <input type="submit" class="submit" name="modify" value="Edit" /></form>
+<!-- /TMPL_IF -->
+
+<form action="/cgi-bin/koha/members/member-password.pl" method="post"><input type="hidden" name="member" value="<!-- TMPL_VAR NAME=bornum -->" /> <input type="submit" class="submit" value="Change Password" /></form>
+
+ <form action="/cgi-bin/koha/members/member-flags.pl" method="post"><input type="hidden" name="member" value="<!-- TMPL_VAR NAME=bornum -->" /> <input type="submit" class="submit" value="Modify Privileges" /></form>
+
+
+<form action="/cgi-bin/koha/members/deletemem.pl?member=<!-- TMPL_VAR NAME="bornum" -->" onclick="confirm_deletion(); return false;"><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="bornum" -->"><input type="submit" class="cancel" value="Delete"></form>
+
+</div>
+<!-- TMPL_IF NAME="flagged" -->	<div class="details">
+	<ul>
+		<!-- TMPL_IF NAME="debarred" --><li>Patron is <span class="error">debarred</span>. <form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post"><input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="borrowernumber" -->" /><input type="hidden" name="status" value="0" /><input type="submit" class="submit" value="Lift Debarment" /></form></li><!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="gonenoaddress" --><li>Patron's <span class="error">address is not known or garduated</span>.</li><!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="lost" --><li>Patron's card has been reported <span class="error">lost</span>.</li><!-- /TMPL_IF -->
+	</ul>
+<!-- TMPL_IF name="borrowernotes" --><dl><dt>Notes:</dt> <dd class="error"><!-- TMPL_VAR name="borrowernotes" --></dd></dl><!-- /TMPL_IF --></div>
+<!-- /TMPL_IF -->
+
+<div class="compact">
+<table>
+<tr><th>Name:</th><td><!-- TMPL_IF name="IS_ADULT" --><!-- TMPL_IF NAME="title" -->[<!-- TMPL_VAR NAME="title" -->]. <!-- /TMPL_IF --><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_IF NAME="othernames" -->"<!-- TMPL_VAR NAME="othernames" -->" <!-- /TMPL_IF --><!-- TMPL_VAR NAME="surname" --> <!-- TMPL_IF NAME="initials" -->(<!-- TMPL_VAR NAME="initials" -->)<!-- /TMPL_IF --><!-- /TMPL_IF --></td></tr>
+		<tr><th>Mailing Address:</th><td><!-- TMPL_IF NAME="streetaddress" --><!-- TMPL_VAR NAME="streetaddress" --><br /><!-- /TMPL_IF -->
+<!-- TMPL_VAR NAME="city" -->, <!-- TMPL_VAR NAME="zipcode" --></td></tr>
+		<!-- TMPL_IF NAME="physstreet" --><tr><th>Street Address:</th><td><!-- TMPL_VAR NAME="physstreet" --><br /><!-- TMPL_VAR NAME="streetcity" -->, <!-- TMPL_VAR NAME="homezipcode" --></td></tr><!-- /TMPL_IF -->
+		<!-- TMPL_UNLESS name="I" -->
+		<tr><th>Home Phone: </th><td><!-- TMPL_IF NAME="phone" --><!-- TMPL_VAR NAME="phone" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr><!-- /TMPL_UNLESS -->
+		<!-- TMPL_IF NAME="phoneday" --><tr><th>Mobile Phone: </th><td><!-- TMPL_VAR NAME="phoneday" --></td></tr><!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="faxnumber" --><tr><th>Fax: </th><td><!-- TMPL_VAR NAME="faxnumber" --></td></tr><!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="emailaddress" --><tr><th>E-mail:</th><td><a href="mailto:<!-- TMPL_VAR NAME="emailaddress" -->"><!-- TMPL_VAR NAME="emailaddress" --></a></td></tr><!-- /TMPL_IF -->
+	<!-- TMPL_UNLESS name="I" -->
+			<tr><th>Date of Birth:</th><td><!-- TMPL_IF NAME="dateofbirth" --><!-- TMPL_VAR NAME="dateofbirth" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
+			<tr><th>Sex:</th><td><!-- TMPL_IF NAME="sex" --><!-- TMPL_VAR NAME="sex" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr><!-- /TMPL_UNLESS -->
+</table></div>
+<div class="compact">
+	<table>
+		<tr><th>Member Number:</th><td><!-- TMPL_VAR NAME="borrowernumber" --></td></tr>
+		<tr><th>Category:</th><td><!-- TMPL_VAR NAME="categorycode" --></td></tr>
+		<tr><th>Registration Date:</th><td><!-- TMPL_IF NAME="dateenrolled" --><!-- TMPL_VAR NAME="dateenrolled" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
+		<tr><th>Expiration Date</th><td><!-- TMPL_IF NAME="expiry" --><!-- TMPL_VAR NAME="expiry" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td></tr>
+		<tr><th>Registration Branch:</th><td><!-- TMPL_VAR NAME="branchcode" --></td></tr>
+		<!-- TMPL_IF name="printethnicityline" -->
+			<tr><th>Ethnicity:</th><td><!-- TMPL_VAR NAME="ethnicity" -->, <!-- TMPL_VAR NAME="ethnotes" --></td></tr>
+	<!-- /TMPL_IF --><tr><th>To contact with : </th><td><!-- TMPL_VAR NAME="preferredcont" --></td></tr>
+			<!-- TMPL_IF NAME="sort1" -->
+			<tr><th>Sort field 1 : </th><td><!-- TMPL_VAR NAME="sort1" --></td></tr>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="sort2" -->
+			<tr><th>Sort field 2 :</th> <td><!-- TMPL_VAR NAME="sort2" --></td></tr>
+		<!-- /TMPL_IF -->
+</table>
+</div>
+
+
+<div class="compact">
+<table>
+<!-- TMPL_IF NAME="userid" -->
+	<tr><th>OPAC login: </th><td><!-- TMPL_VAR name="userid" --></td></tr>
+	<tr><th>OPAC Password: </th><td><!-- TMPL_IF name="password" -->On Record<!-- TMPL_ELSE -->Not Set <form class="inline compact" action="/cgi-bin/koha/members/member-password.pl" method="post"><input type="hidden" name="member" value="<!-- TMPL_VAR NAME=bornum -->" /> <input type="submit" class="submit" value="Set Password" /></form><!-- /TMPL_IF --></td></tr> 
+<!-- TMPL_ELSE -->
+	<tr><th>OPAC Login Not Defined!</th><td><form class="inline compact" action="/cgi-bin/koha/members/member-password.pl" method="post"><input type="hidden" name="member" value="<!-- TMPL_VAR NAME=bornum -->" /> <input type="submit" class="submit" value="Set Login and Password" /></form></td></tr>
+<!-- /TMPL_IF -->
+</table>
+</div>
+
+
+<div class="compact">
+<table>
+		<!-- TMPL_IF NAME="borrowernotes" -->
+		<tr><th>Circulation Note: <p>(appears in Circulation)</p></th> 
+		<td><p class="notes"><!-- TMPL_VAR NAME="borrowernotes" --></p></td></tr>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="textmessaging" --><tr><th>Patron Message:<p>(appears in OPAC)</p></th><td><!-- TMPL_VAR NAME="textmessaging" --></td></tr><!-- /TMPL_IF -->
+</table></div>
+<div class="compact">
+<table>
+			<tr><th><!-- TMPL_UNLESS name="I" -->Alternate<!-- /TMPL_UNLESS --> Contact:</th> 
+			<td>
+				<!-- TMPL_UNLESS name="I" --><ul><li>Name: <!-- /TMPL_UNLESS --><!-- TMPL_VAR NAME="contactname" --><!-- TMPL_UNLESS name="I" --></li><!-- /TMPL_UNLESS -->
+				<!-- TMPL_UNLESS name="I" --><li>Phone: <!-- TMPL_VAR NAME="altphone" --></li>
+				<li>Relationship: <!-- TMPL_VAR NAME="altrelationship" --></li>
+		<!-- /TMPL_UNLESS -->
+		<!-- TMPL_IF NAME="altnotes" --><li>Notes: <!-- TMPL_VAR NAME="altnotes" --></li><!-- /TMPL_IF -->
+				<!-- TMPL_UNLESS name="I" --></ul><!-- /TMPL_UNLESS --></td></tr>
+
+		<!-- TMPL_UNLESS name="I" -->
+		
+			<!-- TMPL_IF name="isguarantee" -->
+
+				<!-- TMPL_IF NAME="guaranteeloop" --><tr><th>Guarantees:</th><td><ul><!-- tmpl_loop name="guaranteeloop" --><li><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="borrowernumber" -->"><!-- TMPL_VAR NAME=name --> - <!-- TMPL_VAR NAME="cardnumber" --></a></li><!-- /tmpl_loop --></ul></td></tr><!-- /TMPL_IF -->
+
+			<!-- TMPL_ELSE -->
+
+<!-- TMPL_IF name="guarantorborrowernumber" --><tr><th>Guarantor:</th>
+					<td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="guarantorborrowernumber" -->"><!-- TMPL_VAR NAME="guarantorcardnumber" --></a></td></tr><!-- /TMPL_IF -->
+
+			<!-- /TMPL_IF -->
+			
+		<!-- /TMPL_UNLESS -->
+</table>
+</div><div class="data">
+<table>
+	<caption>Fines &amp; Charges</caption>
+		
+		<tr>
+			<!-- TMPL_IF name="totaldue" --><th>Total Due:</th><td><!-- TMPL_VAR NAME="totaldue" --> YTL</td></tr><!-- TMPL_ELSE --><td>No Outstanding Charges</td><!-- /TMPL_IF --></table>
+<p><form class="inline" action="/cgi-bin/koha/members/boraccount.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /><input type="submit" value="View Account" class="submit" /></form>
+
+
+	<form class="inline" action="/cgi-bin/koha/members/pay.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /><input type="submit" value="Pay Fines" class="submit" /></form>
+
+
+</p></div>
+
+<form class="inline" action="/cgi-bin/koha/circ/renewscript.pl" method="post">
+	<input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" />
+	
+<div class="table"><table>
+	<caption>Items On Loan</caption>
+	<tr>
+		<th>Title</th>
+		<th>Due</th>
+		<th>Itemtype</th>
+<!-- 		<th>Charge</th> -->
+		<th>Price</th>
+		<th>Renew</th>
+		<th>Return</th>
+	</tr>
+
+	<!-- tmpl_loop name="issueloop" -->
+	<tr>
+		<td><!-- TMPL_IF name="red" --><font color="red"><!-- /TMPL_IF -->
+		<!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="red" --></font><!-- /TMPL_IF -->
+		<a href="/cgi-bin/koha/catalogue/detail.pl?item=<!-- TMPL_VAR NAME="itemnumber" -->&amp;biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">
+			<!-- TMPL_VAR NAME="barcode" -->
+		</a>
+		</td>
+		<td><!-- TMPL_VAR NAME="date_due" --></td>
+		<td><!-- TMPL_VAR NAME="itemtype" --></td>
+		<!-- <td><!-- TMPL_VAR NAME="charge" --></td> -->
+		<td><!-- TMPL_VAR NAME="replacementprice" --></td>
+		<td>
+		<!-- TMPL_IF name="norenew" -->
+			<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Reserved</a>
+		<!-- TMPL_ELSE -->
+			<input type="checkbox" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y"<!-- TMPL_IF name="red" -->checked="checked"<!-- /TMPL_IF --> />
+		<!-- /TMPL_IF -->
+		</td>
+		<td><a href="/cgi-bin/koha/circ/returns.pl?barcode=<!-- TMPL_VAR NAME="barcode" -->">Return</a></td>
+	</tr>
+	<!-- /tmpl_loop -->
+	<tfoot><tr><td colspan="3">Total Replacement Cost:</td><td><!-- TMPL_VAR NAME="totalprice" --></td><td colspan="2">&nbsp;</td></tr></tfoot>
+	</table></div><p><input type="submit" class="submit" value="Renew Checked Items" /></p>
+</form>
+
+<form class="inline" action="/cgi-bin/koha/circ/renewscript.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /><!-- TMPL_LOOP NAME="issueloop" --><!-- TMPL_UNLESS NAME="norenew" --><input type="hidden" name="renew_item_<!-- TMPL_VAR NAME="itemnumber" -->" value="y" /><!-- /TMPL_UNLESS --><!-- /TMPL_LOOP --><input type="submit" class="submit" value="Renew All" /></form>
+
+
+
+
+	<form action="/cgi-bin/koha/reserve/modrequest.pl" method="post">
+	<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="bornum" -->" />
+	<div class="table"><table>
+	<caption>Reserves</caption>
+	<tr>
+		<th>Title</th>
+		<th>Requested</th>
+		<th>Remove</th>
+	</tr>
+
+
+
+	<!-- TMPL_LOOP name="reserveloop" -->
+	<tr>
+		<td><input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+			<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" --></a>
+			<!-- TMPL_IF name="volumeddesc" -->
+				<!-- TMPL_VAR NAME="volumeddesc" -->
+				<!-- TMPL_VAR NAME="itemtype" -->
+			<!-- /TMPL_IF -->
+		</td>
+		<td><!-- TMPL_VAR NAME="reservedate" --></td>
+		<td>
+			<select name="rank-request">
+			<option value="n">No</option>
+			<option value="del">Yes</option>
+			</select>
+		</td>
+		<input type="hidden" name="biblio" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
+		<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR NAME="bornum" -->" />
+	</tr>
+	<!-- /TMPL_LOOP -->
+
+</table>		<!-- TMPL_IF name="reserveloop" -->
+			<p><input type="submit" class="cancel" name="submit" value="Cancel Marked Requests" /></p>
+		<!-- /TMPL_IF --></div></form>
+
+
+<!-- Hide from NPL --><div class="table">
+<h1>Reading Record</h1>
+<form class="inline" action="/cgi-bin/koha/members/readingrec.pl" method="get"><input type="hidden" name="bornum" value="<!-- TMPL_VAR NAME="bornum" -->" /> <input type="submit" class="submit" value="View Patron's Reading Record" /></form>
+</div><!-- /Hide from NPL -->
+
+</div>
+
+<script language="JavaScript" type="text/javascript">
+function confirm_deletion() {
+	var is_confirmed = confirm('Are you sure you want to delete this patron?');
+	if (is_confirmed) {
+		window.location="/cgi-bin/koha/members/deletemem.pl?member=<!-- TMPL_VAR NAME="bornum" -->";
+	}
+}
+</script>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/pay.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/pay.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/pay.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/pay.tmpl	26 Mar 2007 02:19:26 -0000	1.10.2.1
@@ -0,0 +1,57 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Pay Fines for  <!-- TMPL_VAR NAME="surname" -->, <!-- TMPL_VAR NAME="firstname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+	<form class="inline" id="payment" action="/cgi-bin/koha/members/pay.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR name="bornum" -->" />
+<div class="table"><table>
+<input type="hidden" name="loggedinuser" value="<!-- TMPL_VAR NAME="loggedinusername" -->">
+<caption>Pay Fines for <!-- TMPL_VAR name="firstname" --> <!-- TMPL_VAR name="surname" --></caption>
+<tr>
+	<th>Fines &amp; Charges</th>
+	<th>Description</th>
+	<th>Account Type</th>
+	<th>Amount</th>
+	<th>Amount Outstanding</th>
+	<th>Amount to pay</th></tr>
+	
+<!-- TMPL_LOOP name="loop_pay" -->
+<tr>
+	<td><fieldset><label for="payfine<!-- TMPL_VAR name="i" -->">Unpaid</label><input id="payfine<!-- TMPL_VAR name="i" -->" type="radio" name="payfine<!-- TMPL_VAR name="i" -->" value="no" checked="checked" /><br>
+	<label for="payfine<!-- TMPL_VAR name="i" -->">Pay</label><input type="radio" id="payfine<!-- TMPL_VAR name="i" -->" name="payfine<!-- TMPL_VAR name="i" -->" value="yes" /><br>
+	<!--TMPL_IF NAme="CAN_user_management"--> <label for="payfine<!-- TMPL_VAR name="i" -->">Writeoff</label><input type="radio" id="payfine<!-- TMPL_VAR name="i" -->" name="payfine<!-- TMPL_VAR name="i" -->" value="wo" /><!--/TMPL_IF--> </fieldset>
+	<input type="hidden" name="itemnumber<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="itemnumber" -->" />
+	<input type="hidden" name="accounttype<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="accounttype" -->" />
+	<input type="hidden" name="amount<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="amount" -->" />
+	<input type="hidden" name="out<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="amountoutstanding" -->" />
+	<input type="hidden" name="bornum<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="bornum" -->" />
+	<input type="hidden" name="accountno<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="accountno" -->" />
+	<input type="hidden" name="desc<!-- TMPL_VAR name="i" -->" value="<!-- TMPL_VAR name="description" --><!-- TMPL_VAR name="title" -->" />
+	<input type="hidden" id="counter" value="">
+	</td>
+	<td><!-- TMPL_VAR name="description" --><!-- TMPL_VAR name="title" --></td>
+	<td><!-- TMPL_VAR name="accounttype" --></td>
+	<td><!-- TMPL_VAR name="amount" --></td>
+	<td><!-- TMPL_VAR name="amountoutstanding" --></td>
+	<td><input type="text" name="amounttopay<!-- TMPL_VAR name="i" -->" size="5" value="<!-- TMPL_VAR name="amountoutstanding" -->" />
+	</td>
+</tr>
+<!-- /TMPL_LOOP -->
+<tr>
+	<td colspan="4">Total Due</td>
+	<td><!-- TMPL_VAR name="total" --></td>
+	</tr>
+</table></div>
+<input type="submit" name="submit"  value="Make Payment" class="submit" /></form> <form class="inline" action="/cgi-bin/koha/members/moremember.pl" method="get"><input type="hidden" value="<!-- TMPL_VAR name="bornum" -->" name="bornum" /> <input type="submit" class="submit" value="Return to Member Record" /></form>
+</div>
+<script language="JavaScript" type="text/javascript">
+function changetotal() {
+mytotal=0;
+for (i=0 ; i<document.forms['payment'].counter.length ; i++) {
+ mytotal +=document.getElementById("amounttopay"+i).value;
+}
+document.forms['payment'].totalamountopay.value=mytotal;
+}
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/members/payprint.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/payprint.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/payprint.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/payprint.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,29 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Payment for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->  (<!-- TMPL_VAR NAME="cardnumber" -->)<!-- TMPL_INCLUDE NAME="doc-head-close-print.inc" -->
+
+
+<div id="main" >
+<input type="hidden" name="bornum" value="<!-- TMPL_VAR name="bornum" -->" />
+<h3><!-- TMPL_VAR NAME="LibraryName" --></h3>
+<h3>Account: <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" -->     <br>Members card:<!-- TMPL_VAR NAME="cardnumber" --></h3>
+
+<ul><li><!-- TMPL_VAR NAME="streetaddress" --></li><li><!-- TMPL_VAR NAME="city" -->, <!-- TMPL_VAR NAME="zipcode" --></li>
+</ul>
+
+
+	<h3>Payment Receipt</h3><br>
+<div id="notes">		
+	
+			Fee Type:<!-- TMPL_VAR NAME="accounttype" --><br>
+Description: <!-- TMPL_VAR NAME="desc" --> <br>
+<b>Total: <!-- TMPL_VAR NAME="amount" -->YTL</b></div>
+
+<br><br>
+Date:<!-- TMPL_VAR NAME="date" --><br><br>
+
+Librarian:<!-- TMPL_VAR NAME="loggeduser" -->
+<br>
+
+</div>
+<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="bornum" -->">Return</a>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/readingrec.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/readingrec.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/readingrec.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/readingrec.tmpl	26 Mar 2007 02:19:26 -0000	1.18.2.1
@@ -0,0 +1,45 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Reading Record for <!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="members-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main"><div class="table">
+<table>
+<caption>Reading Record for <a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR NAME="bornum" -->"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></a></caption>
+<!-- TMPL_IF NAME="showfulllink" -->
+<tr><td colspan="4">Showing All Items | <a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;limit=full">Show Last 50 Items Only</a></td></tr><!-- TMPL_ELSE -->
+<tr><td colspan="4">Showing Last 50 Items | <a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;limit=full">Show All Items</a></td></tr>
+<!-- /TMPL_IF --><tr>
+	<th>
+		<a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;order=title&amp;amp;limit=<!-- TMPL_VAR name="limit" -->">Title</a>
+	</th>
+	<th>
+		<a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;order=author&amp;limit=<!-- TMPL_VAR name="limit" -->">Author</a>
+	</th>
+	<th>Call No.</th>
+	<th>
+		<a href="readingrec.pl?bornum=<!-- TMPL_VAR name="bornum" -->&amp;order=returndate DESC&amp;limit=<!-- TMPL_VAR name="limit" -->">Return Date</a>
+	</th>
+</tr>
+<!-- TMPL_LOOP name="loop_reading" -->
+<tr<!-- TMPL_IF NAME="toggle" --><!-- TMPL_ELSE --> class="highlight"<!-- /TMPL_IF -->>
+	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->>
+ 		<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR name="title" --></a>&nbsp;
+	</td>
+	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->>
+ 		<!-- TMPL_VAR name="author" -->&nbsp;
+	</td>
+	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="classification" --></td>
+	<td<!-- TMPL_IF NAME="returndate" --><!-- TMPL_ELSE --> class="onissue"<!-- /TMPL_IF -->><!-- TMPL_IF NAME="returndate" --><!-- TMPL_VAR name="returndate" --><!-- TMPL_ELSE -->Checked Out<!-- /TMPL_IF -->
+	</td>
+<!-- /TMPL_LOOP -->
+</table>
+
+<p><form action="/cgi-bin/koha/members/moremember.pl" method="post"><input type="hidden" name="bornum" value="<!-- TMPL_VAR name="bornum" -->"><input type="submit" class="submit" value="Return to Member Record" /></form></p>
+
+</div></div>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+
+

Index: koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-bottom.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-bottom.inc
diff -N koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-bottom.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-bottom.inc	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,17 @@
+<br clear="all">
+<p> &nbsp; </p>
+
+<div class="center">
+<a href="/cgi-bin/koha/mainpage.pl">Home</a> ||
+<a href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a> ||
+<a href="/cgi-bin/koha/members/members-home.pl">Members</a> ||
+<a href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a> ||
+<a href="/cgi-bin/koha/circ/circulation.pl">Circulation</a> ||
+<a href="/cgi-bin/koha/reports-home.pl">Reports</a> ||
+<a href="/cgi-bin/koha/admin-home.pl">Parameters</a> ||
+<a href="/cgi-bin/koha/about.pl">About</a> || 
+Help
+</div>
+
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-top.inc
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-top.inc
diff -N koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-top.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf-top.inc	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,175 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<title>KOHA: INTRANET: Parameters</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/common-style.css">
+<style>
+.parameters {
+	background-color: #86c268;
+	color: #FFFFFF;
+	text-decoration: normal;
+	font-weight: bold;
+	}
+a.parameters:hover {
+	background-color: #86c268;
+	color: #FFFFFF;
+	text-decoration: normal;
+	font-weight: bold;
+	}
+.ranges {
+	border:0;
+}
+
+.myTable TD{
+  border-width: 0px;
+  border-color: navy;
+  border-style: solid;
+}
+
+.panel { 
+	position:relative;
+}
+
+.countryPanel {
+	z-index:1;
+	width:300px;
+	display:none;
+	border:1px solid #000000;
+	padding:0px;
+}
+</style>
+
+
+<script type="text/javascript">
+	// Captura el evento onmousemove para cualquier navegador
+	if (document.layers) { // Netscape
+		document.captureEvents(Event.MOUSEMOVE);
+	    document.onmousemove = captureMousePosition;
+	} else if (document.all) { // Internet Explorer
+	    document.onmousemove = captureMousePosition;
+	} else if (document.getElementById) { // Netcsape 6
+	    document.onmousemove = captureMousePosition;
+	}
+
+	var mouseXMax = 0;
+	var mouseYMax = 0;
+	var mouseX = 0;
+	var mouseY = 0;
+
+	function captureMousePosition(e) {
+	    if (document.layers) {
+		    mouseX = e.pageX;
+			mouseY = e.pageY;
+	        mouseXMax = window.innerWidth + window.pageXOffset;
+		    mouseYMax = window.innerHeight + window.pageYOffset;
+	    } else if (document.all) {
+		    mouseX = window.event.x + document.body.scrollLeft;
+	        mouseY = window.event.y + document.body.scrollTop;
+	        mouseXMax = document.body.clientWidth + document.body.scrollLeft;
+	        mouseYMax = document.body.clientHeight + document.body.scrollTop;
+	    } else if (document.getElementById) {
+	        mouseX = e.pageX;
+		    mouseY = e.pageY;
+	        mouseXMax = window.innerWidth + window.pageXOffset;
+	        mouseYMax = window.innerHeight + window.pageYOffset;
+	    }
+	}
+	
+function getFileExt(fname) {
+	var fileExtExp = /\.([\w]*)$/;
+	var fext;
+	if ( (fext = fileExtExp.exec(fname)) && fext[1] ) {
+		return (fext[1].toLowerCase());
+	} else {
+		return ('');
+}}
+
+function checkFileExt(fname){
+	var fileKind = 'image';
+	var allowedFilesExt = ['jpg'];
+	if (fname == '') {
+			alert("You must select a file to upload.");
+			return false;
+			}
+	var fext = getFileExt(fname);
+	var i = 0;
+	while ( (allowedFilesExt[i] != fext) && (i < allowedFilesExt.length) ) {i++;}
+	if (i == allowedFilesExt.length)	{
+			alert("The selected file isn't an " + fileKind + " file (" + allowedFilesExt.join(", ") + ").");
+			return false;
+	}
+	return true;
+}
+
+//this functions trim the leading spaces of a string.
+function trim(s) {
+  while (s.substring(0,1) == ' ') {
+    s = s.substring(1,s.length);
+  }
+  while (s.substring(s.length-1,s.length) == ' ') {
+    s = s.substring(0,s.length-1);
+  }
+  return s;
+}
+
+function addField2(selectBox1, textArea) {
+	if (selectBox1.options.selectedIndex != -1) {
+		var value = selectBox1.options[selectBox1.options.selectedIndex].value;
+		if (value.substring(0,1) == '<') {
+		    alert("You cannot add this value, it's only a reference."); }
+		else {
+		    if (textArea.value.substring(textArea.value.length - 1,textArea.value.length) == ' ') {
+				textArea.value = textArea.value + '<' + value + '>';}
+			else {textArea.value = textArea.value + ' <' + value + '>';}
+	}}
+}
+
+function checkReceiptOptions() {
+  if (trim(document.linesForm.legend.value) == '') {
+	alert("The card legend isn't valid.");
+	return false;
+  }
+  if ((trim(document.linesForm.line1.value) == '') && (trim(document.linesForm.line2.value) == '') && (trim(document.linesForm.line3.value) == '')) {
+	alert("You have to write at least one line.");
+	return false;
+  }
+  if ( (document.linesForm.customPage.checked) && ( (isNaN(document.linesForm.pageWidth.value)) || (trim(document.linesForm.pageWidth.value) == '') || (isNaN(document.linesForm.pageHeight.value)) || (trim(document.linesForm.pageHeight.value) == '') ) ) {
+	alert("The page size is incorrect.");
+	return false;
+  }
+  return true;
+}
+
+
+</script>
+</head>
+<body onload="javascript: changeRange(document.getElementById('rangeType'))">
+<!-- MENUS -->
+<div id="menubar">
+	<span class="koha">KOHA</span>
+	<a class="home" href="/cgi-bin/koha/mainpage.pl">Home</a>
+	<a class="catalogue" href="/cgi-bin/koha/loadmodules.pl?module=search&amp;type=intranet">Catalogue</a>
+	<a class="members" href="/cgi-bin/koha/members/members-home.pl">Members</a>
+	<a class="acquisition" href="/cgi-bin/koha/loadmodules.pl?module=acquisitions">Acquisitions</a>
+	<a class="circulation"  href="/cgi-bin/koha/circ/circulation.pl">Circulation</a>
+	<a class="authority" href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
+	<a class="reports" href="/cgi-bin/koha/reports-home.pl">Reports</a>
+	<a class="parameters" href="/cgi-bin/koha/admin-home.pl">Parameters</a>
+	<a class="about" href="/cgi-bin/koha/about.pl">About</a>
+	<a class="catalogue" href="/cgi-bin/koha/help.pl" onclick="Help(); return false;">Help</a>
+</div>
+<div id="submenu">
+	<span class="koha">options &gt;&gt;&nbsp;&nbsp;</span>
+	<a href="/cgi-bin/koha/admin/aqbookfund.pl" class="submenu">Funds</a>
+	<a href="/cgi-bin/koha/admin/authorised_values.pl" class="submenu2">Auth value</a>
+	<a href="/cgi-bin/koha/admin/thesaurus.pl" class="submenu">Thesaurus</a>
+	<a href="/cgi-bin/koha/admin/currency.pl" class="submenu2">Currencies</a>
+	<a href="/cgi-bin/koha/admin/printers.pl" class="submenu">Printers</a>
+</div>
+<!-- TMPL_IF NAME="loggedinusername" -->
+    <p align="left">Logged in as: <!-- TMPL_VAR NAME="loggedinusername" --> [<a href="/cgi-bin/koha/mainpage.pl?logout.x=1">Log Out</a>]</p>
+<!-- TMPL_ELSE -->
+    <p align="left"><a href="/cgi-bin/koha/opac-user.pl">Log In</a> to Koha</p>
+<!-- /TMPL_IF -->

Index: koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/receipts/print-receipts-conf.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,126 @@
+<!-- TMPL_INCLUDE NAME="print-receipts-conf-top.inc" -->
+<div id="main">
+	<h1>Receipt print options</h1>
+	
+	<ul>
+	 <li>Select a branch and set the receipt print options.</li>
+	</ul>
+	<br>
+
+ 	<form name ="branchesForm" action="/cgi-bin/koha/members/receipts/print-receipts-conf.pl" method="post">
+		<Table style = "border-width:0px;">
+			<tr>
+		 		<td width = "80">Branches</td>
+				<td><!-- TMPL_VAR NAME="branches" --></td>
+			</tr>
+		</table>
+	</form>
+
+	<form method="POST" action= "/cgi-bin/koha/members/receipts/print-receipts-conf.pl" name="linesForm" onSubmit ="return checkReceiptOptions();">
+		<INPUT TYPE= "hidden" name="setLines" value="<!-- TMPL_VAR NAME="BRANCH_CODE" -->">
+		<TABLE class = "myTable">
+            <tr><th colspan = '3'>Lines & others options</th></tr>
+			<tr>
+                <td colspan = '3'>
+					<input type="radio" name="outputtype" value = "PLAIN" <!-- TMPL_IF name="asPLAIN" --> checked <!-- /TMPL_IF --> >  Print as text plain
+					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+					<input type="radio" name="outputtype" value = "PDF" <!-- TMPL_IF name="asPDF" --> checked <!-- /TMPL_IF --> >  Print as PDF file
+					<hr>
+				</td>
+			<tr>
+
+			<tr>
+				<td colspan = '3'><b style="margin-right:5px;">Line 1 - Legend:</b><input type="text" style = "width:100%" name="legend" value = "<!-- TMPL_VAR NAME="LEGEND" -->"></td>
+			</tr>
+			<tr>
+			    <td colspan = '3'><hr></td>
+			<tr>
+		  	<tr>
+			  <td colspan = '3'><b>Lines 2 - 4</b></td>
+			</tr>
+		  	<tr>
+			  <td  rowspan = "<!-- TMPL_VAR NAME="ROW_SPAN" -->">
+			  	<div  style = "margin-bottom: 5px;">Fields of borrowers table, accountlines table and special values.</div>
+			  	<!-- TMPL_VAR NAME="FIELD_LIST" -->
+			  </td>
+			</tr>
+      		<!-- TMPL_LOOP NAME="FIELD_LIST_LOOP" -->
+			<tr>
+				<td width = "110" align = "center">
+					<div>
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/rightarrow.png" onclick="<!-- TMPL_VAR NAME="IMG_ADD_CLICK" -->"
+									     border="0">
+					</div>
+				</td>
+				<td align = "left">
+					<div><!-- TMPL_VAR NAME="LINE_NUM" --></div>
+					<!-- TMPL_VAR NAME="LINE_VALUE" -->
+				</td>
+			</tr>
+			<!-- /TMPL_LOOP -->
+			<tr>
+                <td colspan = '3'>
+					<hr>
+				</td>
+			</tr>
+           
+            <tr>
+                <td colspan = '2'>
+                	<b>Page size:</b>
+                	<br>
+                    <div>
+                    Predefined sizes
+     				<select name="pageType" style="width:200px" size="1">
+						<!-- TMPL_IF name="A4" -->
+							<option value="A4" selected>A4</option>
+				        <!-- TMPL_ELSE -->
+							<option value="A4">A4</option>
+						<!-- /TMPL_IF -->
+						<!-- TMPL_IF name="Letter" -->
+							<option value="Letter" selected>Letter</option>
+				        <!-- TMPL_ELSE -->
+							<option value="Letter">Letter</option>
+						<!-- /TMPL_IF -->
+						<!-- TMPL_IF name="Legal" -->
+							<option value="Legal" selected>Legal</option>
+				        <!-- TMPL_ELSE -->
+							<option value="Legal">Legal</option>
+						<!-- /TMPL_IF -->
+		            </select>
+		            </div>
+		            <br>
+     				<div><!-- TMPL_VAR NAME="CUSTOM_PAGE_CHECK" -->&nbsp;&nbsp;&nbsp;
+     				Width:&nbsp;<!-- TMPL_VAR NAME="CUSTOM_PAGE_WIDTH" --> &nbsp;mm&nbsp;&nbsp;Height:&nbsp;<!-- TMPL_VAR NAME="CUSTOM_PAGE_HEIGHT" -->&nbsp;mm</div>
+
+				</td>
+				<td valign = "top">
+				    <b>Currency:</b>
+				    <br>
+				    <div>
+				    <!-- TMPL_VAR NAME="CURRENCIES" -->
+				    </div>
+				</td>
+            </tr>
+			<tr>
+  				<td  colspan= '3'>
+  				    <hr>
+					<input type="submit" value="Save" class="button" style = "width:100px">
+				</td>
+  			</tr>
+		</table>		
+	</form>
+	
+	<form name ="logoForm" action="/cgi-bin/koha/members/receipts/print-receipts-conf.pl" method="post" enctype="multipart/form-data" onSubmit="return checkFileExt(document.logoForm.logo.value);">
+		<input type="hidden" name="uploadLogo" value="<!-- TMPL_VAR NAME="BRANCH_CODE" -->">
+		<table style = "width:100%">
+			<tr><th colspan = '3'>Logo</th></tr>
+			<tr>
+				<td align = "center" width = "50" style= "padding:5px;"><img width = "100%" src="<!-- TMPL_VAR NAME="LOGO" -->" border="1"></td>
+			    <td align = "left">(Only for PDF printing) <input type= "file" name="logo" style = "width:100%"></td>
+				<td width = "110"><input type = "submit" style = "width:100px" value="Upload logo" class="button"></td>
+			</tr>
+		</table>
+	</form>
+
+</div>
+<!-- TMPL_INCLUDE NAME="print-receipts-conf-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-plain.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-plain.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-plain.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-plain.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,26 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+	<head>
+		<title>Receipt</title>
+
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		
+		<style>
+		    h6 {margin-top: 2px;margin-bottom:2px; font-weight: normal}
+		</style>
+		
+	</head>
+	<body style="padding:10px;font-family:arial,helvetica" onload="window.print()">
+        <h5>-----------------------------</h5>
+        <h6><!-- TMPL_VAR name="LibraryName" --></h6>
+		<h6><!-- TMPL_VAR name="today" --></h6>
+		<h6><!-- TMPL_VAR name="legend" --></h6>
+		<br>
+	    <h6><!-- TMPL_VAR name="line1" --></h6>
+        <h6><!-- TMPL_VAR name="line2" --></h6>
+        <h6><!-- TMPL_VAR name="line3" --></h6>
+        <br>
+	    <h6>Signed: _______________</h6>
+		<h5>------------------------------</h5>
+	</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-rich.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-rich.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-rich.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/members/receipts/receipt-rich.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+	<head>
+		<title>Receipt</title>
+
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+		
+		<style>
+		    h5, h4 {margin-top: 2px;margin-bottom:2px;}
+		    h6 {margin-top: 2px;margin-bottom:2px; font-weight: normal}
+		</style>
+		
+	</head>
+	<body style="padding:10px;font-family:arial,helvetica" onload="window.print()">
+        <hr>
+        <table>
+            <tr>
+                <td valing="middle">
+                    <img style="float:left;margin-right:10px;width:50px;height:50px" src="<!-- TMPL_VAR name="image_logo" -->"
+				    <h4><!-- TMPL_VAR name="LibraryName" --></h4>
+				</td>
+            </tr>
+			<tr>
+			    <td><h5> <!-- TMPL_VAR name="legend" --> - <!-- TMPL_VAR name="today" --></h5></td>
+			</tr>
+			<tr>
+			    <td style="padding-left:15px">
+			        <h6><!-- TMPL_VAR name="line1" --></h6>
+		            <h6><!-- TMPL_VAR name="line2" --></h6>
+		            <h6><!-- TMPL_VAR name="line3" --></h6>
+                </td>
+            </tr>
+	        <tr>
+	            <td align="right">
+					<br>
+	                <h6>_________________</h6>
+	            </td>
+	        </tr>
+        
+        </table>
+        <hr>
+        
+	</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/reserve/request.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/reserve/request.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/reserve/request.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/reserve/request.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,151 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->NEULIS -- Catalogue: Add Reserve for <!-- TMPL_VAR Name="title" --><!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main">
+<form action="placerequest.pl" method="post" id="mainform">
+
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" />
+<input type="hidden" name="type" value="str8" />
+<input type="hidden" name="title" value="<!-- TMPL_VAR Name="title" -->" />
+<input type="hidden" name="loggedinuser" value="<!-- TMPL_VAR Name="loggedinusername" -->" />
+<h3>Add Reserve for
+<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="biblionumber" -->"><!-- TMPL_VAR Name="title" --></a>
+<!-- TMPL_VAR Name="author" --></h3>
+<div class="form">
+	<table>
+		<tr><th>Rank</th><td>
+<select name="rank-request">
+			<!-- TMPL_LOOP Name="optionloop" -->
+				<option value="<!-- TMPL_VAR Name="num" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->>
+					<!-- TMPL_VAR Name="num" -->
+				</option>
+			<!-- /TMPL_LOOP -->
+			</select>
+			</td></tr>
+
+		<tr><th><label for="notes">Notes</label></th><td><input type="text" size="20" name="notes" id="notes"></tr>
+		<tr><th><label for="date">Date</label></th><td><!-- TMPL_VAR name="date" --></td></tr>
+		<tr><th><label for="pickup">Pickup</label></th><td><!-- TMPL_VAR name="CGIbranch" --></td></tr>
+		<tr><th><label for="member">Card Number</label> <a href="/cgi-bin/koha/members/members-home.pl?quicksearch=1" onclick="PopWin(this, 'newwin', 300, 400); return false;">(Quick Search)</a></th><td><input type="text" size="10" name="member" id="member" /></td></tr>
+	</table>
+</div>
+
+	<div class="table"><table>
+<tr>
+	<th>Reservables</th>
+	<th>Item Type</th>
+	<th>Call Number</th>
+	<th>Volume</th>
+	<th>Pubdate</th>
+	
+</tr>
+
+<!-- TMPL_LOOP Name="bibitemloop" -->
+	<tr>
+		<td><!-- TMPL_LOOP Name="barcodeloop" -->
+			<!-- TMPL_IF Name="itemlost" -->
+				Cannot be selected
+			<!-- TMPL_ELSE -->
+				<li><!-- TMPL_IF Name="date_due" --><input type="checkbox" name="reqbib" value=<!-- TMPL_VAR Name="itemnumber" -->><!-- TMPL_VAR Name="barcode" -->
+				<input type="hidden" name="itemnumber" value=<!-- TMPL_VAR Name="itemnumber" -->><!--TMPL_ELSE-->On shelf:<!-- TMPL_VAR Name="barcode" --><input type="hidden" name="reqbib" value=""><!--/TMPL_IF--></li>
+			<!-- /TMPL_IF --><!-- /TMPL_LOOP -->
+		</td>
+			
+		</td>
+		<td>
+			<!-- TMPL_VAR Name="description" -->
+		</td>
+		<td>
+			<!-- TMPL_IF NAME="class" --><!-- TMPL_VAR Name="class" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
+		</td>
+		<td>
+			<!-- TMPL_IF NAME="volumedesc" --><!-- TMPL_VAR Name="volumeddesc" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
+		</td>
+		<td>
+			<!-- TMPL_IF NAME="publicationyear" --><!-- TMPL_VAR Name="publicationyear" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF -->
+		</td>
+		
+	</tr>
+<!-- /TMPL_LOOP -->
+</table></div>
+
+<input type="submit" name="submit"  value="Place New Request"  class="submit"  >
+</form>
+<!-- TMPL_IF NAME="reserveloop" -->
+<form name="T<!-- TMPL_VAR Name="time" -->" action="modrequest.pl" method="post">
+<input type="hidden" name="loggedinuser" value="<!-- TMPL_VAR Name="loggedinusername" -->" >
+
+<h3>Modify Existing Requests</h3>
+<div class="table"><table>
+	<tr>
+		<th>Rank</th>
+		<th>Patron</th>
+		<th>Notes</th>
+		<th>Date</th>
+		<th>Pickup Location</th>
+		<th>Request</th>
+	</tr>
+
+	<!-- TMPL_LOOP Name="reserveloop" -->
+		<tr>
+			<td>
+			<input type="hidden" name="borrowernumber" value="<!-- TMPL_VAR Name="borrowernumber" -->" >
+			<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR Name="biblionumber" -->" >
+			<select name="rank-request">
+				<!-- TMPL_IF Name="wait" -->
+					<option value="W" selected="selected">Consigned</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_LOOP Name="optionloop" -->
+					<option value="<!-- TMPL_VAR Name="num" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->>
+						<!-- TMPL_VAR Name="num" -->
+					</option>
+				<!-- /TMPL_LOOP -->
+				<option value="del">Del</option>
+			</select></td>
+			<td>
+			<a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR Name="borrowernumber" -->"><!-- TMPL_VAR Name="firstname" --> <!-- TMPL_VAR Name="surname" --></a>
+			</td>
+			<td><!-- TMPL_IF NAME="notes" --><!-- TMPL_VAR Name="notes" --><!-- TMPL_ELSE -->&nbsp;<!-- /TMPL_IF --></td>
+			<td><!-- TMPL_VAR Name="date" --></td>
+			<td><!-- TMPL_IF Name="wait" -->
+				<input type="hidden" name="pickup" value="<!-- TMPL_VAR Name="wbrcode" -->" >
+				<!-- TMPL_IF NAME="atdestination" -->
+				<strong>Waiting</strong> at <!-- TMPL_VAR Name="wbrcode" -->
+				<!-- TMPL_ELSE -->
+				In transit from <!-- TMPL_VAR NAME="holdingbranch" --> to <!-- TMPL_VAR Name="wbrcode" -->
+				<!-- /TMPL_IF -->
+				
+				<!-- TMPL_ELSE -->
+					<select name="pickup">
+						<!-- TMPL_LOOP Name="branchloop" -->
+							<option value="<!-- TMPL_VAR Name="branch" -->"<!-- TMPL_IF Name="selected" --> selected="selected"<!-- /TMPL_IF -->>
+								<!-- TMPL_VAR Name="branchname" -->
+							</option>
+						<!-- /TMPL_LOOP -->
+					</select>
+				<!-- /TMPL_IF -->
+			</td>
+			<td>
+				<!-- TMPL_IF Name="wait" -->
+					<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR Name="biblionumber"-->&type=intra" >
+						<!-- TMPL_VAR Name="barcode" -->
+					</a>
+				<!-- TMPL_ELSE -->
+					<!-- TMPL_IF Name="constrainttypea" -->
+						<!-- TMPL_VAR Name="barcode" -->
+					<!-- TMPL_ELSE -->
+						<!-- TMPL_IF Name="constrainttypeo" -->
+							Item : <!-- TMPL_VAR Name="volumeddesc" --> <!-- TMPL_VAR Name="barcode" -->
+						<!-- /TMPL_IF -->
+					<!-- /TMPL_IF -->
+				<!-- /TMPL_IF -->
+
+			</td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+<p>Delete a request by selecting "del" from the rank list.</p>
+<p><input type="submit" name="submit"  value="Update List" class="submit" /></p>
+</div></form><!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE Name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/acqui-search-result.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/acqui-search-result.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/acqui-search-result.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/acqui-search-result.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,27 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<h1>Supplier Search Results</h1>
+<h2>You searched on <b>supplier <!-- TMPL_VAR name="supplier" -->,</b> <!-- TMPL_VAR name="count" --> results found</h2>
+<table>
+	<tr>
+		<th>Book seller</th>
+		<th>Select</th>
+	</tr>
+	<!-- TMPL_LOOP name="loop_suppliers" -->
+		<tr>
+			<td><!-- TMPL_VAR name="name" --></td>
+			<td><a href="#" onclick="javascript:GetIt(<!-- TMPL_VAR name="aqbooksellerid" -->,'<!-- TMPL_VAR name="name" -->')">Get It !</td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+
+<script language="Javascript">
+
+function GetIt(aqbooksellerid,name)
+{
+  opener.document.f.aqbooksellerid.value = aqbooksellerid;
+  opener.document.f.aqbooksellername.value = name;
+  self.close();
+}
+</script>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/acqui-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/acqui-search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/acqui-search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/acqui-search.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,21 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Search supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+
+
+<script language="Javascript">
+
+function GetIt(aqbooksellerid,name)
+{
+  opener.document.f.aqbooksellerid.value = aqbooksellerid;
+  opener.document.f.aqbooksellername.value = name;
+  self.close();
+}
+</script>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
+
+<h1>Search supplier for serial subscription</h1>
+	<form action="/cgi-bin/koha/serials/acqui-search-result.pl" method=post>
+		Supplier name : <input type="text"  size="25"   name="supplier">
+        <input type="submit" class="button serial" value="OK">
+	</form>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/serials/claims.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/claims.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/claims.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/claims.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,166 @@
+<!-- TMPL_UNLESS NAME="preview" -->
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--
+TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+<!-- TMPL_ELSE -->
+<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
+<div class="popup-block">
+<!-- /TMPL_UNLESS -->
+
+<!-- TMPL_UNLESS NAME="preview" -->
+	<h1>Claims</h1>
+
+	<p>
+	<form action="claims.pl" method="post">
+	<input type="hidden" name="claimletter" value="<!-- TMPL_VAR NAME="claimletter"-->">
+	<!-- TMPL_VAR name="CGIsupplier" -->
+	<input type="submit" value="Filter by Supplier" class="button">
+	</form>
+	</p>
+<!--
+	<p>
+	<form action="claims.pl" method="post">
+	<input type="hidden" name="supplierid" value="<!-- TMPL_VAR NAME="supplierid"-->">
+	<!-- TMPL_VAR name="CGIletter" -->
+	<input type="submit" value="Choose Claim Form" class="button">
+	</form>
+	</p> -->
+
+<form method="post" action="lateissues-excel.pl">
+<input type="hidden" name="op" value="claims" />
+
+		<!-- TMPL_IF NAME="missingissues" -->
+		<h3>Missing Issues</h3>
+		<table cellpadding="0" cellspacing="0" border="0" class="collapse">
+			<tr>
+				<th class="cell-header">&nbsp;</th>
+				<th class="cell-header">Supplier</th>
+				<th class="cell-header">Title</th>
+				<th class="cell-header">Issue number</th>
+				<th class="cell-header">Missing since</th>
+				<th class="cell-header">Began Claim</th>
+				<th class="cell-header">&nbsp;</th>
+			</tr>
+			<!-- TMPL_LOOP name="missingissues" -->
+				<tr>
+					<td class="cell">
+					<input type="checkbox" name="serialid" value="<!-- TMPL_VAR NAME="serialid"-->">
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="name" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="Title" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="serialseq" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="planneddate" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="claimdate" -->
+					</td>
+					<td class="cell">
+					<a href="lateissues-excel.pl?supplierid=<!--TMPL_VAR NAME="supplierid"-->&amp;serialid=<!-- TMPL_VAR name="serialid" -->&amp;op=claims" class="button">Export Item Data</a>
+					<!--
+					<a href="claims.pl?serialid=<!-- TMPL_VAR name="serialid" -->&amp;supplierid=<!-- TMPL_VAR name="supplierid" -->&amp;op=preview" onclick="popup(<!-- TMPL_VAR name="supplierid" -->,<!-- TMPL_VAR name="serialid" -->); return false">Claim Letter</a> -->
+					</td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+		<!-- TMPL_ELSE -->
+		<p>There are no missing issues to claim</p>
+		<!-- /TMPL_IF -->
+
+	<!-- TMPL_IF Name="singlesupplier"-->
+<input type="hidden" name="supplierid" value="<!--TMPL_VAR NAME="supplierid"-->" />
+
+		<!--
+		<a href="claims.pl?supplierid=<!-- TMPL_VAR
+name="supplierid" -->&amp;op=preview" onclick="popup(<!-- TMPL_VAR
+name="supplierid" -->,''); return false" class="button">Supplier Group Claim Letter</a></p> -->
+	<!-- /TMPL_IF -->
+<p><br/>
+		<input type="submit" name="submit" class="button" value="Export Selected Data" />
+
+</form>
+<!-- TMPL_ELSE -->
+	<!-- TMPL_IF Name="supplierloop"-->
+		<!-- TMPL_LOOP Name="supplierloop"-->
+		<!-- TMPL_IF NAME="name" -->
+		<p><b><!-- TMPL_VAR NAME="name" --></b><br />
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="postal" -->
+		<!-- TMPL_VAR NAME="postal" --><br />
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="contphone" -->
+		Ph: <!-- TMPL_VAR NAME="contphone" --><br />
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="contfax" -->
+		Fax: <!-- TMPL_VAR NAME="contfax" --><br />
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="contemail" -->
+		Email: <!-- TMPL_VAR NAME="contemail" --><br />
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="accountnumber" -->
+		A/C: <!-- TMPL_VAR NAME="accountnumber"></p>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="contact" -->
+		<p>Dear <!-- TMPL_VAR NAME="contact" --></p>
+		<!-- TMPL_ELSE -->
+		<p>To whom it may concern</p>
+		<!-- /TMPL_IF -->
+		<p>The following items have not been received from you and are now considered missing:</p>
+		<!-- /TMPL_LOOP -->
+	<!-- /TMPL_IF -->
+		<!-- TMPL_IF NAME="missingissues" -->
+		<h3>Missing Issues</h3>
+		<table cellpadding="0" cellspacing="4" border="0" width="550" class="collapse">
+			<tr>
+				<td class="cell"><b>Supplier<b></td>
+				<td class="cell"><b>Title</b></td>
+				<td class="cell"><b>Issue number</b></td>
+				<td class="cell"><b>Missing since</b></td>
+			</tr>
+			<!-- TMPL_LOOP name="missingissues" -->
+				<tr>
+					<td class="cell">
+					<!-- TMPL_VAR name="name" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="Title" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="serialseq" -->
+					</td>
+					<td class="cell">
+					<!-- TMPL_VAR name="planneddate" -->
+					</td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+		<!-- /TMPL_IF -->
+<br />
+<p class="noprint"><a href="javascript:window.print()" class="button">Print</a> &nbsp; <a href="javascript:window.close()" class="button">Close</a></p>
+<!-- /TMPL_UNLESS -->
+
+</div>
+<script type="text/javascript">
+<!--
+
+function popup(supplierid,serialid){
+	window.open('claims.pl?supplierid='+ supplierid +'&amp;serialid='+ serialid +'&amp;op=preview' ,'popup', 'width=600,height=400,toolbar=no,scrollbars=yes');
+}
+//-->
+</script>
+<!-- TMPL_UNLESS NAME="preview" -->
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+<!-- TMPL_ELSE -->
+<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
+<!-- /TMPL_UNLESS -->
+
+

Index: koha-tmpl/intranet-tmpl/default/en/serials/distributedto.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/distributedto.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/distributedto.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/distributedto.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,88 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit -- Select supplier<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+	<h1>Select borrowers or enter manually the names</h1>
+	<p>
+		<form action="/cgi-bin/koha/serials/distributedto.pl" method="post" name="Aform">
+			<table>
+			<tr>
+			<td>
+				<input type="text" name="searchfield" value="<!-- TMPL_VAR name="searchfield" -->">
+				<input type="submit" class="button" value="Filter">
+			</td>
+			<td rowspan="2">
+				<h2>Distributed to</h2>
+				<p>
+					<textarea name="distributedto" rows="15" cols="30"><!-- TMPL_VAR name="distributedto" --></textarea>
+				</p>
+				<p>
+					<!-- TMPL_IF name="save" -->
+						saved</p><p>
+					<!-- /TMPL_IF -->
+					<input type="hidden" name="SaveList" value="0">
+					<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
+					<input type="button" name="save" value="Save" class="button" onClick="FSaveList()">
+					<input type="button" name="clode" value="Close" class="button" onClick="javascript:window.close()">
+			</td>
+			</tr>
+			<tr>
+			<td>
+				<!-- TMPL_VAR NAME="borrowername" -->
+				<select name="borlist" size="15">
+					<!-- TMPL_LOOP name="borlist" -->
+						<option value="<!-- TMPL_VAR name="surname" --><!-- TMPL_VAR name="firstname" -->">
+							<!-- TMPL_VAR name="surname" --> <!-- TMPL_VAR name="firstname" -->
+						</option>
+					<!-- /TMPL_LOOP -->
+				</select>
+				<input type="button" name="insert" value="&gt;&gt;" class="button" onclick="insertValueQuery()" title="Insert" />
+			</td>
+			</tr>
+			</table>
+		</form>
+	</p>
+	<script language="javascript" type="text/javascript">
+		// GPL code coming from PhpMyAdmin
+		function insertValueQuery() {
+			var myQuery = document.Aform.distributedto;
+			var myListBox = document.Aform.borlist;
+		
+			if(myListBox.options.length > 0) {
+				var chaineAj = "";
+				var NbSelect = 0;
+				for(var i=0; i<myListBox.options.length; i++) {
+					if (myListBox.options[i].selected){
+						NbSelect++;
+						if (NbSelect > 1)
+							chaineAj += ", ";
+						chaineAj += myListBox.options[i].value;
+					}
+				}
+		
+				//IE support
+				if (document.selection) {
+					myQuery.focus();
+					sel = document.selection.createRange();
+					sel.text = chaineAj;
+					document.Aform.insert.focus();
+				}
+				//MOZILLA/NETSCAPE support
+				else if (document.Aform.distributedto.selectionStart || document.Aform.distributedto.selectionStart == "0") {
+					var startPos = document.Aform.distributedto.selectionStart;
+					var endPos = document.Aform.distributedto.selectionEnd;
+					var chaineSql = document.Aform.distributedto.value;
+					myQuery.value = chaineSql.substring(0, startPos) +''+ chaineAj+"\n" + chaineSql.substring(endPos, chaineSql.length);
+				} else {
+					myQuery.value += chaineAj;
+				}
+			}
+		}
+		function FSaveList() {
+			document.Aform.SaveList.value=1;
+			document.Aform.submit();
+		}
+	</script>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/lateissues.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/lateissues.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/lateissues.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/lateissues.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,86 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+<h1>Late issues</h1>
+<p>
+	<form action="lateissues.pl" method="post">
+		<!-- TMPL_VAR name="CGIsupplier" -->
+			<!-- TMPL_IF name="phone" -->Phone: <!-- TMPL_VAR name="phone" --><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="booksellerfax" -->Fax: <!-- TMPL_VAR name="booksellerfax" --><!-- /TMPL_IF -->
+			<!-- TMPL_IF name="bookselleremail" --></p><p><a href="mailto:<!-- TMPL_VAR name="bookselleremail" -->"><!-- TMPL_VAR name="bookselleremail" --></a><!-- /TMPL_IF -->
+		<input type="submit" value="filter">
+	</form>
+</p>
+        <!-- TMPL_IF NAME="lateissues" -->
+	
+<table>
+	<tr>
+		<th>Title</th>
+		<th>Issue number</th>
+		<th>Late since</th>
+		<th colspan=2>&nbsp;</th>
+	</tr>
+	<!-- TMPL_LOOP name="lateissues" -->
+		<tr>
+			<!-- TMPL_IF name="odd" -->
+				<td class="hilighted"><!-- TMPL_IF name="title" --><!-- TMPL_VAR name="title" --><!-- TMPL_ELSE -->|<!-- /TMPL_IF --></td>
+				<td class="hilighted"><!-- TMPL_VAR name="serialseq" --></td>
+				<td class="hilighted"><!-- TMPL_VAR name="planneddate" --></td>
+				<td class="hilighted">
+					<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
+					<a href="serials-recieve.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Recieve</a>
+				</td>
+			<!-- TMPL_ELSE -->
+				<td><!-- TMPL_VAR name="title" --></td>
+				<td><!-- TMPL_VAR name="serialseq" --></td>
+				<td><!-- TMPL_VAR name="planneddate" --></td>
+				<td>
+					<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Detail</a>
+					<a href="statecollection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Receive</a>
+				</td>
+			<!-- /TMPL_IF -->
+		</tr>
+	<!-- /TMPL_LOOP -->
+</table>
+        <!-- TMPL_ELSE -->
+               <p>There are currently no outstanding issues.</p>
+	<!-- /TMPL_IF -->
+	
+        <!-- TMPL_IF NAME="missingissues" -->
+	        <h1 class="bull">Missing Issues</h1>
+		<table cellpadding="0" cellspacing="0" border="0" class="collapse">
+		<tr>
+		<th class="cell-header">Supplier</th>
+		<th class="cell-header">Title</th>
+		<th class="cell-header">Issue number</th>
+		<th class="cell-header">Missing since</th>
+		<th class="cell-header">&nbsp;</th>
+		</tr>
+		<!-- TMPL_LOOP name="missingissues" -->
+		<tr>
+		<td class="cell">
+		<!-- TMPL_VAR name="name" -->
+		</td>
+		<td class="cell">
+		<!-- TMPL_VAR name="Title" -->
+		</td>
+		<td class="cell">
+		<!--TMPL_VAR name="serialseq" -->
+		</td>
+		<td class="cell">
+		<!-- TMPL_VAR name="planneddate" -->
+		</td>
+		<td class="cell">
+		<a href="statecollection.pl?op=found&amp;planneddate=<!-- TMPL_VAR name="planneddate" -->&amp;missingissue=<!-- TMPL_VAR name="serialseq" -->&amp;subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Receive</a>
+                </td>
+		</tr>
+		<!--/TMPL_LOOP -->
+		</table>
+	<!-- /TMPL_IF -->
+		
+</div>		       
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/serials/member-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/member-search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/member-search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/member-search.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,45 @@
+<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
+<script type="text/javascript">
+<!--
+
+function add_member(subscriptionid,bornum){
+     var myurl = "routing.pl?subscriptionid="+subscriptionid+"&bornum="+bornum+"&op=add";
+     window.opener.location.href = myurl;
+}
+
+//-->
+</script>
+
+<div class="popup-block">
+<h1>Member Search</h1>
+
+<p>
+<form name="search" action="/cgi-bin/koha/serials/member-search.pl" method="post">
+<input type="text" name="member" size="30" />
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->">
+<input type="submit" class="button" value="Search" />
+</form>
+</p>
+<!-- TMPL_IF NAME="memberloop" -->
+<table cellspacing="0" cellpadding="0" border="0" width="480" class="collapse">
+<tr><td class="cell-header">Name</td>
+    <td class="cell-header">Location</td>
+    <td class="cell-header">Add</td></tr>
+<!-- TMPL_LOOP NAME="memberloop" -->
+<tr><td class="cell"><!-- TMPL_VAR NAME="firstname" --> <!-- TMPL_VAR NAME="surname" --></td>
+    <td class="cell"><!-- TMPL_VAR NAME="streetaddress" --></td>
+    <td class="cell"><a onclick="add_member(<!-- TMPL_VAR
+NAME="subscriptionid" -->,<!-- TMPL_VAR NAME="borrowernumber" -->); return false" href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;bornum=<!-- TMPL_VAR NAME="borrowernumber" -->&amp;op=add">Add</a></td></tr>
+<!-- /TMPL_LOOP -->
+        </table></td></tr>
+</table>
+<!-- TMPL_ELSE -->
+    <!-- TMPL_IF NAME="member" -->
+        <p>No results found</p>
+    <!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+<br />
+<p><a href="javascript:self.close()" class="button">Close</a></p>
+</div>
+
+<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/printlist.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/printlist.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/printlist.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/printlist.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,21 @@
+<html>
+
+<!-- TMPL_INCLUDE NAME="serials-topmenu.inc" -->
+
+<body onLoad="window.print();">
+<h1>Distribution list</h1>
+<h2>Title : <!-- TMPL_VAR name="title" -->, <!-- TMPL_VAR name="serialseq" --></h2>
+<div style="border : 1px solid black;">
+	<!-- TMPL_VAR name="distributedto" -->
+</div>
+
+<div style=border-top: 1px solid black;">
+	<p><!-- TMPL_VAR name="branchname" --></p>
+	<p><!-- TMPL_VAR name="branchaddress1" --></p>
+	<p><!-- TMPL_VAR name="branchaddress2" --></p>
+	<p><!-- TMPL_VAR name="branchaddress3" --></p>
+	<p>phone : <!-- TMPL_VAR name="branchphone" --> <i><!-- TMPL_VAR name="branchemail" --></i></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/serials/receipt-search-result.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/receipt-search-result.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/receipt-search-result.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/receipt-search-result.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,80 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+	<h1 class="authority">Serial search results</h1>
+	<div id="resultnumber">
+		<p>
+			<!-- TMPL_IF NAME=displayprev -->
+				<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search>
+					<img src="/intranet-tmpl/default/images/numbers/prev.gif" border=0>
+				</a>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME=numbers -->
+				<!-- TMPL_IF NAME=highlight -->
+					<img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+					<a href=search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF NAME=displaynext -->
+				<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/next.gif" border=0></a>
+				<!-- /TMPL_IF -->
+		</p>
+
+	</div>
+	<div id="resultlist">
+		<table>
+			<tr>
+				<th class="authority">Serial</th>
+				<th class="authority">View</th>
+				<th class="authority">State of collection</th>
+				<th class="authority">Delete</th>
+			</tr>
+			<!-- TMPL_LOOP name="result" -->
+				<tr>
+					<td><!-- TMPL_VAR name="serial" --></td>
+
+					<td>
+		<div align="center">				<a href="subscription-detail.pl?suscr=<!-- TMPL_VAR name="subscriptionid" -->">
+							<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0" alt="Authority number <!-- TMPL_VAR name="authid" -->" title="Serial number<!-- TMPL_VAR name="subscriptionid" -->">
+						</a> </div>
+					</td>
+	<td><div align="center"><a href="serials-recieve.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&serial=<!-- TMPL_VAR name="serial" -->">
+
+							<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR name="theme" -->/images/Fleche.jpg"  width="32" hspace="0" vspace="0" border="0" alt="Subscribtion serial<!-- TMPL_VAR name="subscriptionid" -->" title="Serial number<!-- TMPL_VAR name="subscriptionid" -->">
+
+
+</a></td></div>
+				</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+	</div>
+	<div id="resultnumber">
+		<p>
+			<!-- TMPL_IF NAME=displayprev -->
+			<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/prev.gif" border=0></a>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME=numbers -->
+				<!-- TMPL_IF NAME=highlight -->
+				<img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+				<a href=search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF NAME=displaynext -->
+			<a href=search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="/intranet-tmpl/default/images/numbers/next.gif" border=0></a>
+				<!-- /TMPL_IF -->
+		</p>
+	</div>	
+</div>
+<!-- TMPL_INCLUDE NAME="serials-bottom.inc" -->
+
+
+<script language="JavaScript" type="text/javascript" >
+function do_delete(page)
+{
+window.location = page;
+}
+</script>

Index: koha-tmpl/intranet-tmpl/default/en/serials/result.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/result.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/result.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/result.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,86 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+
+
+	<h1 class="catalogue">Search results</h1>
+	<div id="resultnumber">
+		<p>
+			<!-- TMPL_IF NAME=displayprev -->
+				<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search>
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border=0>
+				</a>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME=numbers -->
+				<!-- TMPL_IF NAME=highlight -->
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME="number" -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+					<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF NAME=displaynext -->
+				<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border=0></a>
+				<!-- /TMPL_IF -->
+		</p>
+		<p>
+			<!-- TMPL_IF name=total -->
+			&nbsp<b>Results <!-- TMPL_VAR name="from" --> to <!-- TMPL_VAR name="to" --> of <!-- TMPL_VAR name="total" --></b><br><br>
+			<!-- TMPL_ELSE -->
+			&nbsp No results found.<br>
+			<!-- /TMPL_IF -->
+		</p>
+	</div>
+	<div id="resultlist">
+		<table>
+			<tr>
+			<th class="catalogue">Summary</th>
+			<th class="catalogue">&nbsp;</th>
+			</tr>
+			<!-- TMPL_LOOP name="result" -->
+			<tr>
+				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
+					<p>
+						<p><b><!-- TMPL_VAR NAME="title" --></b></p>
+						<p><!-- TMPL_VAR NAME="author" -->
+						<!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="notes" --> : <!-- TMPL_VAR name="notes" --><!-- /TMPL_IF -->
+						<!-- TMPL_IF name="size" --> ; <!-- TMPL_VAR name="size" --><!-- /TMPL_IF -->
+					</p>
+				</td>
+				<td <!-- TMPL_IF name="even" -->class="hilighted"<!-- /TMPL_IF -->>
+						<a class="transparent" href="#" onclick="GetIt('<!-- TMPL_VAR NAME="biblionumber" -->','<!-- TMPL_VAR name="title" escape="URL" -->') ">Get it!</a>
+				</td>
+			</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+	</div>
+	<div id="resultnumber">
+		<p>
+			<!-- TMPL_IF NAME=displayprev -->
+			<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromprev" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/prev.gif" border=0></a>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_LOOP NAME=numbers -->
+				<!-- TMPL_IF NAME=highlight -->
+				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->-highlight.gif">
+				<!-- TMPL_ELSE -->
+				<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME=startfrom -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/<!-- TMPL_VAR NAME=number -->.gif" border=0></a>
+				<!-- /TMPL_IF -->
+			<!-- /TMPL_LOOP -->
+			<!-- TMPL_IF NAME=displaynext -->
+			<a href=subscription-bib-search.pl?startfrom=<!-- TMPL_VAR NAME="startfromnext" -->&<!-- TMPL_LOOP NAME=searchdata --><!-- TMPL_VAR NAME="term" -->=<!-- TMPL_VAR name="val" ESCAPE=URL -->&<!-- /TMPL_LOOP -->&resultsperpage=<!-- TMPL_VAR NAME="resultsperpage" -->&type=intranet&op=do_search><img src="<!-- TMPL_VAR NAME="themelang" -->/images/numbers/next.gif" border=0></a>
+				<!-- /TMPL_IF -->
+		</p>
+	</div>	
+
+
+
+<script language="Javascript">
+
+function GetIt(bibno,title)
+{
+  opener.document.f.biblionumber.value = bibno;
+  opener.document.f.title.value = title;
+  self.close();
+}
+</script>
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/serials/routing-preview-slip.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/routing-preview-slip.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/routing-preview-slip.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/routing-preview-slip.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,23 @@
+<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
+
+<div id="slip-block">
+<table cellspacing="0" cellpadding="0" border="0" class="collapse routingslip">
+<tr><td class="cell" colspan="3"><h3>Opus International Consultants - Information Centre</h3></td></tr>
+<tr><td class="cell" colspan="3"><b>Title:</b> <!-- TMPL_VAR NAME="title" --><br />
+<!-- TMPL_VAR NAME="issue" --></td></tr>
+<tr><td class="cell"><b>Name/Location</b></td>
+    <td class="cell"><b>Date Due</b></td></tr>
+<!-- TMPL_LOOP NAME="memberloop" -->
+        <tr><td class="name"><b><!-- TMPL_VAR NAME="name" --></b> <!-- TMPL_VAR NAME="location" --></td>
+            <td class="date">&nbsp;</td></tr>
+<!-- /TMPL_LOOP -->
+</table>
+<p><b>Notes:</b> Please return this journal
+promptly as others are waiting.
+<br /><!-- TMPL_VAR NAME="routingnotes" --></p>
+   <div id="slip-block-links">
+   <a class="button" href="javascript:window.print();self.close()">Print</a> &nbsp; <a class="button" href="javascript:self.close()">Close</a>
+   </div>
+</div>
+
+<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/routing-preview.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/routing-preview.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/routing-preview.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/routing-preview.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,44 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+<h1 class="bull">Preview Routing List</h1>
+
+<form method="post" action="routing-preview.pl">
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" />
+<p><b>Serial Title:</b> <!-- TMPL_VAR NAME="title" --></p>
+<p><b>Issue:</b> <!-- TMPL_VAR NAME="issue" --></p>
+
+<table border="0" cellspacing="0" cellpadding="0">
+<tr valign="top"><td style="padding-top: 5px;"><b>List Member:</b>&nbsp;</td>
+    <td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
+        <tr><td class="cell-header">Name</td>
+            <td class="cell-header">Location</td></tr>
+<!-- TMPL_LOOP NAME="memberloop" -->
+        <tr><td class="cell"><!-- TMPL_VAR NAME="name" --></td>
+            <td class="cell"><!-- TMPL_VAR NAME="location" --></td></tr>
+<!-- /TMPL_LOOP -->
+        </table></td></tr>
+<tr valign="top"><td colspan="2">&nbsp;</td></tr>
+<tr valign="top"><td><b>Notes:</b></td>
+    <td><!-- TMPL_VAR NAME="routingnotes" --></td></tr>
+</table>
+<p>
+<input type="submit" name="ok" class="button" value="OK, Preview Routing Slip" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" -->,'<!-- TMPL_VAR NAME="issue" -->'); return false" />
+<input type="submit" name="edit" class="button" value="Edit" />
+<input type="submit" name="delete" class="button" value="Delete" /></p>
+</form>
+</div>
+
+<script type="text/javascript">
+<!--
+
+function print_slip(subscriptionid,issue){
+    var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
+window.open(myurl,'PrintSlip','width=400,height=500,toolbar=no,scrollbars=yes');
+    window.location.href='serials-home.pl';
+}
+//-->
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/routing.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/routing.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/routing.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/routing.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,82 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+
+
+<script language="javascript" type="text/javascript">
+<!--
+
+function reorder_item(sid,rid,rank){
+    var mylocation = 'reorder_members.pl?subscriptionid='+sid+'&routingid='+rid+'&rank='+rank;
+    window.location.href=mylocation; 
+}
+//-->
+</script>
+
+<div id="main">
+<!-- TMPL_IF NAME="op" -->
+<h1>Create Routing List</h1>
+<!-- TMPL_ELSE -->
+<h1>Edit Routing List</h1>
+<!-- /TMPL_IF -->
+
+<form method="post" action="routing.pl">
+<input type="hidden" name="op" value="save" />
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR NAME="subscriptionid" -->" />
+<p><b>Serial Title:</b> <!-- TMPL_VAR NAME="title" --></p>
+<p><b>Issue:</b> 
+
+<select name="date_selected">
+<!-- TMPL_LOOP NAME="dates" -->
+<option value="<!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="serialseq" --> (<!-- TMPL_VAR NAME="planneddate" -->)</option>
+<!-- /TMPL_LOOP -->
+</select>
+
+
+<!-- TMPL_VAR NAME="issue" --></p>
+
+<!-- TMPL_IF NAME="memberloop" -->
+<table border="0" cellspacing="0" cellpadding="0">
+<tr valign="top"><td style="padding-top:5px;"><b>List Member:</b>&nbsp;</td>
+    <td><table cellspacing="0" cellpadding="0" border="0" class="collapse">
+        <tr><td class="cell-header">Name</td>
+            <td class="cell-header">Location</td>
+            <td class="cell-header">Rank</td>
+            <td class="cell-header">Delete</td></tr>
+<!-- TMPL_LOOP NAME="memberloop" -->
+        <tr><td class="cell"><!-- TMPL_VAR NAME="name" --></td>
+            <td class="cell"><!-- TMPL_VAR NAME="location" --></td>
+            <td class="cell"><!-- TMPL_VAR NAME="routingbox" --></td>
+            <td class="cell"><a href="/cgi-bin/koha/serials/routing.pl?routingid=<!-- TMPL_VAR NAME="routingid" -->&amp;subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete">Delete</a></td></tr>
+<!-- /TMPL_LOOP -->
+        <tr><td colspan="4"><br /><a onclick="search_member(<!-- TMPL_VAR
+NAME="subscriptionid" -->); return false"
+href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=<!-- TMPL_VAR
+NAME="subscriptionid" -->" class="button">Add List Member</a> &nbsp; <a
+href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=delete" class="button">Delete All</a></td></tr>
+        </table></td></tr>
+
+<!-- TMPL_ELSE -->
+<table border="0" cellspacing="0" cellpadding="0">
+<tr><td><b>List Member:&nbsp;</b></td>
+    <td><p><a onclick="search_member(<!-- TMPL_VAR NAME="subscriptionid"
+-->); return false" href="/cgi-bin/koha/serials/member-search.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->" class="button">Add List Member</a></p></td></tr>
+<!-- /TMPL_IF -->
+<tr><td valign="top" colspan="2">&nbsp;</td></tr>
+<tr><td valign="top"><b>Notes:</b></td>
+    <td><textarea name="notes" rows="3" cols="50"><!-- TMPL_VAR NAME="routingnotes" --></textarea></td></tr>
+<tr><td></td>
+    <td><input type="submit" name="submit" class="button" value="Save" /></td></tr>
+</table>
+</form>
+</div>
+<script type="text/javascript">
+<!--
+
+function search_member(subscriptionid){
+    var myurl = 'member-search.pl?subscriptionid='+subscriptionid; window.open(myurl,'FindAMember','width=500,height=400,toolbar=no,scrollbars=yes');
+}
+//-->
+</script>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/serial-issues-full.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/serial-issues-full.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/serial-issues-full.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/serial-issues-full.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,72 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+
+<div id="main">
+<!-- TMPL_UNLESS name="popup" -->
+	<h1 class="serial">Subscription information for biblio #<!-- TMPL_VAR NAME="biblionumber" --> with title : <!-- TMPL_VAR name="bibliotitle" --></h1>
+	<p>
+	<a href="opac-detail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button serial">Back to biblio</a>
+<!-- /TMPL_UNLESS -->
+	<!-- TMPL_LOOP NAME="years" -->
+		<!-- TMPL_IF NAME="year" -->
+			<a  class="button serial" href="javascript:active(<!-- TMPL_VAR NAME="year" -->)"><!-- TMPL_VAR NAME="year" --></a>
+		<!-- /TMPL_IF -->
+	<!-- /TMPL_LOOP -->
+	<a class=" button serial" href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->&selectview=small">Compact view</a>
+	</p>
+	<!-- TMPL_LOOP NAME="years" -->
+	<div name="<!-- TMPL_VAR NAME="year" -->" id="<!-- TMPL_VAR NAME="year" -->" style="position:absolute; visibility:hidden; margin-top:0px; border:4px;" <!--TMPL_IF Name="first" -->style="visibility:visible"<!--/TMPL_IF -->>
+		<table>
+			<tr>
+				<th class="serial">Information
+				</th>
+				<th class="serial">Date
+				</th>
+				<th class="serial">Number
+				</th>
+				<th class="serial">Status
+				</th>
+			</tr>
+			<!-- TMPL_LOOP Name="serials" -->
+			<tr>
+				<td>
+					<!-- TMPL_VAR name="notes" -->
+				</td>
+				<td>
+					<!-- TMPL_VAR Name="planneddate" -->
+				</td>
+				<td>
+					<!-- TMPL_VAR Name="serialseq" -->
+				</td>
+				<td>
+					<!-- TMPL_IF Name="status1" -->Arrived<!-- /TMPL_IF -->
+					<!-- TMPL_IF Name="status2" -->Waited<!-- /TMPL_IF -->
+					<!-- TMPL_IF Name="status3" -->Late<!-- /TMPL_IF -->
+					<!-- TMPL_IF Name="status4" -->Missing<!-- /TMPL_IF -->
+				</td>
+			</tr>
+			<!-- /TMPL_LOOP -->
+		</table>
+	</div>
+</div>
+	<!--/TMPL_LOOP -->
+<script language="JavaScript" type="text/javascript">
+active(<!-- TMPL_VAR name="yearmin" -->);
+function active(numlayer)
+{
+	for (i=<!--TMPL_VAR Name="yearmin"-->; i<=<!--TMPL_VAR Name="yearmax"-->; i++ ) {
+		ong = i;
+		link = "link"+i;
+		if (numlayer==i) {
+			document.getElementById(ong).style.visibility="visible";
+		} else {
+			document.getElementById(ong).style.visibility="hidden";
+		}
+	}
+}
+
+</script>
+</body>
+</html>

Index: koha-tmpl/intranet-tmpl/default/en/serials/serial-issues.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/serial-issues.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/serial-issues.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/serial-issues.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,109 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+
+<h1>Issues for a subscription</h1>
+<!-- TMPL_LOOP name="subscription_LOOP" -->
+	<div id="serials_serial_issue_<!-- TMPL_VAR name="subscriptionid" -->">
+		<h2>Subscription information for <!-- TMPL_VAR name="bibliotitle" --></h2>
+		<p>It began on <b><!-- TMPL_VAR name="histstartdate" --></b> and is issued every
+		<b>
+		<!--TMPL_IF name="periodicity1" -->
+				day
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity2" -->
+				week
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity3" -->
+				2 weeks
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity4" -->
+				3 weeks
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity5" -->
+				month
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity6" -->
+				2 months
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity7" -->
+				3 months
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity8" -->
+				quarter
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity9" -->
+				2 quarters
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity10" -->
+				year
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity11" -->
+				2 years
+		<!-- /TMPL_IF -->
+		</b>
+		<!--TMPL_IF name="arrival1" -->
+			on <b>monday</b>
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="arrival2" -->
+			on <b>tuesday</b>
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="arrival3" -->
+			on <b>wednesday</b>
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="arrival4" -->
+			on <b>thursday</b>
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="arrival5" -->
+			on <b>friday</b>
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="arrival6" -->
+			on <b>saturday</b>
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="arrival7" -->
+			on <b>sunday</b>
+		<!-- /TMPL_IF -->
+		for <b>
+			<!-- TMPL_IF name="numberlength" --><!-- TMPL_VAR name="numberlength" --> issues<!-- /TMPL_IF -->
+			<!-- TMPL_IF name="weeklength" --><!-- TMPL_VAR name="weeklength" --> weeks<!-- /TMPL_IF -->
+			<!-- TMPL_IF name="monthlength" --><!-- TMPL_VAR name="monthlength" --> months<!-- /TMPL_IF -->
+			</b>
+		</p>
+		<p>Last renewal of subscription was <b><!-- TMPl_VAR name="startdate" --></b></p>
+		<!-- TMPL_IF name="enddate" --><p><b>This subscription is now ended. The last issue was received on <!-- TMPL_VAR name="enddate" --></b></p><!-- /TMPL_IF name="enddate" -->
+	<!--TMPL_UNLESS Name=fullinfo -->
+		<p><!-- TMPL_VAR name="notes" --></p>
+		<!-- TMPL_IF name="opacnote" -->
+			<h3 class="serial">Issues summary</h2>
+			<p>
+				<!-- TMPL_VAR name="opacnote" -->
+			</p>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="receivedlist" -->
+			<h3 class="serial">received issues</h2>
+			<p>
+				<!-- TMPL_VAR name="receivedlist" -->
+			</p>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="missinglist" -->
+			<h3 class="serial">Missing issues</h2>
+			<p>
+				<!-- TMPL_VAR name="missinglist" -->
+			</p>
+		<!-- /TMPL_IF -->
+	</div>
+	<!-- /TMPL_UNLESS -->
+<!-- /TMPL_LOOP -->
+
+<div id="action">
+	
+	<form action="/cgi-bin/koha/serials/serial-issues.pl">
+		<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->">
+		<input type="hidden" name="selectview" value="full">
+		<input type="submit" value="Complete view">
+	</form>
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/serials-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/serials-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/serials-home.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/serials-home.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,104 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+<div id="main">
+
+<h1>Serials</h1>
+<div id="serials_home">
+	<h2>Serials subscriptions</h2>
+<!-- TMPL_IF NAME="routing" -->
+        <h3>Search for Serial Routing List</h3>
+<!-- /TMPL_IF -->
+
+    <table>
+        <tr><th>Supplier Id</th>
+<th>Biblionumber</th>
+            <th>ISSN</th>
+            <th>Title</th>
+            <th>
+                Note
+            </td>
+            <th colspan=2>&nbsp;</th>
+        </tr>
+        <tr>
+            <form action="serials-home.pl" method="post">
+            <!-- TMPL_IF NAME="routing" -->
+                <input type="hidden" name="routing" value="<!-- TMPL_VAR NAME="routing" -->" />
+            <!-- /TMPL_IF -->
+            <input type="hidden" name="searched" value="1" />
+	<td>
+                <input type="text" size=10 maxlength=15 name="supplierid" value="<!-- TMPL_VAR name="supplierid" -->" title="type biblionumber here to filter subscription">
+            </td>
+	<td>
+                <input type="text" size=10 maxlength=15 name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" title="type biblionumber here to filter subscription">
+            </td>
+            <td>
+                <input type="text" size=10 maxlength=11 name="ISSN" value="<!-- TMPL_VAR name="ISSN" -->" title="type ISSN here to filter subscription">
+            </td>
+            <td>
+                <input type="text" size=40 maxlength=40 name="title" value="<!-- TMPL_VAR name="title" -->" title="type a title -complete or partial- to filter subscription">
+            </td>
+            <td>
+                &nbsp;
+            </td>
+            <td colspan=2>
+                <input type="submit" value="filter" class="button serial" title="set a filter on ISSN / title">
+            </td>
+        </tr>
+        <!-- TMPL_LOOP name="subscriptions" -->
+	 <!-- TMPL_IF name="toggle" -->
+            <tr class="hilighted">
+                <!-- TMPL_ELSE -->
+	<tr>
+	          <!-- /TMPL_IF -->
+                 <td><!-- TMPL_VAR name="aqbooksellerid" --></td>   
+               <td><a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="Biblio"><!-- TMPL_VAR name="biblionumber" --></a></td>
+       <td>
+                <!-- TMPL_IF name="ISSN" -->
+                   <a href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="Issues history"><!-- TMPL_VAR name="ISSN" --></a>   
+                <!-- /TMPL_IF -->
+             </td>
+               
+                    <td>
+            
+                <!-- TMPL_IF name="title" -->
+                    <!-- TMPL_VAR name="title" -->
+                <!-- TMPL_ELSE -->
+                    |
+                <!-- /TMPL_IF -->
+                </td>
+                
+                    <td>
+             
+                <!-- TMPL_IF name="notes" -->(<!-- TMPL_VAR name="notes" -->)<!-- /TMPL_IF -->
+                </td>
+                <!-- TMPL_IF NAME="routing" -->
+                        <td>
+                        <a href="routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" --><!-- TMPL_UNLESS NAME="routingedit" -->&op=new<!-- /TMPL_UNLESS -->">Routing List</a>
+                    </td>
+                <!-- TMPL_ELSE -->
+                            <td>
+                            <a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="subscription detail">Detail</a>
+                        </td>
+                            <td>
+                            <a href="serials-receive.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="receive issues for this subscription">Receive</a>
+                        </td>
+                <!-- /TMPL_IF -->
+
+            </tr>
+        <!-- /TMPL_LOOP -->
+    </table>
+    
+    <!-- TMPL_IF NAME="routing" -->
+    <!-- TMPL_ELSE -->
+        <!-- TMPL_IF NAME="alt_links" -->
+            <a href="/cgi-bin/koha/serials/alt_subscription-add.pl" class="button serial">Add subscription</a>	      
+        <!-- TMPL_ELSE -->      
+            <a href="/cgi-bin/koha/serials/subscription-add.pl" class="button serial">Add subscription</a>
+        <!-- /TMPL_IF -->
+    <!-- /TMPL_IF -->
+</div>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/serials/serials-receive.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/serials-receive.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/serials-receive.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/serials-receive.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,187 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+
+
+<!--------------------------MAIN BODY OF PAGE-------------------------->
+<div id="main">
+<h1 class="serial">Subscription for <!-- TMPL_VAR name="bibliotitle" --></h1>
+<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="detail of the subscription">Subscription</a>
+<a href="/cgi-bin/koha/serials/serials-home.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="all subscriptions on <!-- TMPL_VAR name="title" -->">Subscriptions</a>
+<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial" title="go to <!-- TMPL_VAR name="title" -->">Back to biblio</a>
+
+<div id="bloc25">
+<h2 class="serial">waited or late numbers</h2>
+    <form method="post" name="f" id="f" action="serials-receive.pl">
+        <input type="hidden" name="op" value="serialchangestatus">
+        <input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
+        <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
+        <input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
+    <table class="small">
+    <tr>
+        <th class="serial">
+            Numbered
+        </th>
+       <th class="serial">
+            Published on
+        </th>	
+        <th class="serial">
+            Planned for
+        </th>
+        <th class="serial">
+            Status
+        </th>
+        <th class="serial">
+            Notes
+        </th>
+    </tr>
+    <!-- TMPL_LOOP name="serialslist" -->
+        <tr>
+            <td>
+                <input type="text" name="serialseq" value="<!-- TMPL_VAR name="serialseq" -->" size=30 maxlength=100>
+            </td>
+	  <td>
+                <input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size=10 maxlength=15>
+            </td>
+            <td>
+                <input type="text" name="planneddate" value="<!-- TMPL_VAR name="planneddate" -->" size=10 maxlength=15>
+            </td>
+            <td>
+                <input type="hidden" id="serialidnumber" name="serialid" value="<!-- TMPL_VAR name="serialid" -->">
+                <select name="status" size="1"   <!--TMPL_IF name="serialsadditems" -->onChange="javascript:AddItemRefresh();"<!--/TMPL_IF-->>
+                    <!--TMPL_IF name="status1" -->
+                        <option value="1" selected>Waited</option>
+                    <!-- /TMPL_IF -->
+                    <!--TMPL_IF name="status2" -->
+                        <option value="2" selected>Arrived</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="2">Arrived</option>
+                    <!-- /TMPL_IF -->
+                    <!--TMPL_IF name="status3" -->
+                        <option value="3" selected>Late</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="3">Late</option>
+                    <!-- /TMPL_IF -->
+                    <!--TMPL_IF name="status4" -->
+                        <option value="4" selected>Missing</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="4">Missing</option>
+                    <!-- /TMPL_IF -->
+                    <!--TMPL_IF name="status5" -->
+                        <option value="5" selected>Not published</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="5">Not published</option>
+                    <!-- /TMPL_IF -->
+                    <!--TMPL_IF name="status6" -->
+                        <option value="6" selected>Delete</option>
+                    <!-- TMPL_ELSE -->
+                        <option value="6">Delete</option>
+                    <!-- /TMPL_IF -->
+                </select>
+            </td>
+            <td>
+                <input type="text" name="notes" value="<!-- TMPL_VAR name="notes" -->" size=20 maxlength=255>
+            </td>
+<!--TMPL_IF name="serialsadditems" -->
+	<td>    <input type="hidden" id="serial<!-- TMPL_VAR name="serialid" -->" name="itemnumber" value="<!-- TMPL_VAR name="itemnumber" -->" />
+		<input type="hidden" id="holdingbranch<!-- TMPL_VAR name="serialid" -->" name="holdingbranch" value="" />
+	             <a  style="display:none;" href="javascript:AddItem('<!-- TMPL_VAR name="scriptaddserials" -->',<!-- TMPL_VAR name="serialid" -->)" name="addbutton" class="button serial" onblur="javascript:AddItemRefresh();">Add item</a>
+	</td>
+<!--/TMPL_IF-->     
+            <td>
+                <a href="javascript:PrintList(<!-- TMPL_VAR name="subscriptionid" -->,'<!-- TMPL_VAR name="serialseq" -->')" class="button serial">print</a>
+            </td>
+        </tr>
+    <!-- /TMPL_LOOP -->
+    <!-- TMPL_UNLESS name="hassubscriptionexpired" -->
+        <tr>
+            <td>
+                Manual issue <input type="text" name="serialseq" size=30 maxlength=100>
+            </td>
+ <td>
+                <input type="text" name="publisheddate" size=10 maxlength=15>
+            </td>
+            <td>
+                <input type="text" name="planneddate" size=10 maxlength=15>
+            </td>
+            <td>
+                <input type="hidden" name="serialid" value="0">
+                <select name="status" size="1" <!--TMPL_IF name="serialsadditems" -->onChange="javascript:AddItemRefresh();"<!--/TMPL_IF-->>
+                        <option value="2">Arrived</option>
+                        <option value="3" selected>Late</option>
+                        <option value="4">Missing</option>
+                </select>
+            </td>
+      <!--TMPL_IF name="serialsadditems" -->
+	<td>    <input type="hidden" id="serial0" name="itemnumber" value="0" />
+		<input type="hidden" id="holdingbranch0" name="holdingbranch" value="" />
+	             <a  style="display:none;" href="javascript:AddItem('<!-- TMPL_VAR name="scriptaddserials" -->',0)" name="addbutton" class="button serial" onblur="javascript:AddItemRefresh();">Add item</a>
+	</td>
+<!--/TMPL_IF-->   
+	
+   </tr>
+	
+    <!-- /TMPL_UNLESS -->
+    </table>
+    <input type="submit" value="Save changes" accesskey="w" class="button serial">
+    <!-- TMPL_IF name="hassubscriptionexpired" -->
+        <p>Subscription has expired. Waited last issue status can't be changed. <a href="#" onClick="popup()" class="button serial">Renew</a> your subscription</p>
+    <!-- /TMPL_IF -->
+    </form>
+</div>
+
+<div id="bloc25">
+    <h2 class="serial">Subscription summary</h2>
+    <form method="post" name="f" action="serials-receive.pl">
+        <input type="hidden" name="op" value="modsubscriptionhistory">
+        <input type="hidden" name="serial" value="<!-- TMPL_VAR name="serial" -->">
+        <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
+        <input type="hidden" name="user" value="<!-- TMPL_VAR name="user" -->">
+        <p><label>Librarian</label><!-- TMPL_VAR name="user" --></p>
+        <p><label class="label100">Beginning date (*)</label><input type="text" name="histstartdate" value="<!-- TMPL_VAR name="histstartdate" -->"></p>
+        <p><label class="label100">End date</label><input type="text" name="enddate" value="<!-- TMPL_VAR name="enddate" -->"></p>
+        <p>received issues</p>
+        <p>&nbsp;<textarea name="receivedlist" COLS=60 ROWS=5><!-- TMPL_VAR name="receivedlist" --></textarea></p>
+        <p>Missing issues</p>
+        <p>&nbsp;<textarea name="missinglist" COLS=60 ROWS=2><!-- TMPL_VAR name="missinglist" --></textarea></p>
+        <!--TMPL_IF Name="notissuedlist"-->
+        <p>Not issued</p>
+        <p>&nbsp;<textarea name="notissuedlist" COLS=60 ROWS=2><!-- TMPL_VAR name="notissuedlist" --></textarea></p>
+        <!--/TMPL_IF-->
+        <p>Opac's note</p>
+        <p>&nbsp;<textarea name="opacnote" COLS=60 ROWS=5><!-- TMPL_VAR name="opacnote" --></textarea></p>
+        <input type="submit" value="Save changes" class="button serial">
+    </form>
+</div>
+
+</table>
+<script language="JavaScript" type="text/javascript">
+
+function popup() {
+     window.open("subscription-renew.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid">","subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
+}
+function AddItem(itemscript,serial) {
+     window.open(itemscript+serial,"AddItem",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
+
+}
+function PrintList(subscriptionid,serialseq) {
+
+    window.open("printlist.pl?subscriptionid="+subscriptionid+"&serialseq="+serialseq);
+}
+function AddItemRefresh(){
+var subf=document.getElementsByName('status');
+var adder=document.getElementsByName('addbutton');
+var itemnos=document.getElementsByName('itemnumber');
+     for (var s=0; s<subf.length; s++ ){
+	if (subf.item(s).value == 2 && itemnos.item(s).value==0){
+	adder.item(s).style.display = 'block';
+	}else{
+	adder.item(s).style.display = 'none';
+	}
+     }
+}
+
+</script>
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/subscription-add.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/subscription-add.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/subscription-add.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/subscription-add.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,1023 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+
+
+<link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR name="themelang" -->/includes/calendar/calendar-system.css">
+
+
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-en.js"></script>
+<script type="text/javascript" src="<!-- TMPL_VAR NAME="themelang" -->/includes/calendar/calendar-setup.js"></script>
+<!-- **************************************************** -->
+
+
+<script type="text/javascript" language="javascript">
+// the english words used in display purposes
+var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
+'Autumn','Winter','Spring','Summer','Fall','Season','Year');
+var is_season = 0;
+var is_hemisphere = 1;
+
+// common pre defined number patterns
+function num_pattern() {
+var patternchoice = document.getElementById("numberpattern").value;
+	switch(patternchoice){
+	case "2":
+	 	document.f.add1.value=1;
+	 	document.f.add2.value=1;
+	 	document.f.add3.value=1;
+		document.f.every1.value=12;
+		document.f.every2.value=1;
+		document.f.every3.value=1;
+		document.f.whenmorethan1.value=9999999;
+		document.f.whenmorethan2.value=12;
+		document.f.whenmorethan3.value=4;
+		document.f.setto1.value=0;
+		document.f.setto2.value=1;
+		document.f.setto3.value=1;
+		document.f.lastvalue1.value=1;
+		document.f.lastvalue2.value=1;
+		document.f.lastvalue3.value=1;
+		document.f.numberingmethod.value='Vol {X}, No {Y}, Issue {Z}';
+		moreoptions(text[1],text[0],text[2]);
+		display_table(0); // toggle info box on (1) or off (0)
+		break;
+	case "3":
+	 	document.f.add1.value=1;
+	 	document.f.add2.value=1;
+	 	document.f.add3.value='';
+		document.f.every1.value=12;
+		document.f.every2.value=1;
+		document.f.every3.value='';
+		document.f.whenmorethan1.value=9999999;
+		document.f.whenmorethan2.value=12;
+		document.f.whenmorethan3.value='';
+		document.f.setto1.value=0;
+		document.f.setto2.value=1;
+		document.f.setto3.value='';
+		document.f.lastvalue1.value=1;
+		document.f.lastvalue2.value=1;
+		document.f.lastvalue3.value='';
+		document.f.numberingmethod.value='Vol {X}, No {Y}';
+		moreoptions(text[1],text[0]);
+		display_table(0);
+		break;
+	case "4":
+	 	document.f.add1.value=1;
+	 	document.f.add2.value=1;
+	 	document.f.add3.value='';
+		document.f.every1.value=12;
+		document.f.every2.value=1;
+		document.f.every3.value='';
+		document.f.whenmorethan1.value=9999999;
+		document.f.whenmorethan2.value=12;
+		document.f.whenmorethan3.value='';
+		document.f.setto1.value=0;
+		document.f.setto2.value=1;
+		document.f.setto3.value='';
+		document.f.lastvalue1.value=1;
+		document.f.lastvalue2.value=1;
+		document.f.lastvalue3.value='';
+		document.f.numberingmethod.value='Vol {X}, Issue {Y}';
+		moreoptions(text[1],text[2]);
+		display_table(0);
+		break;
+	case "5":
+	 	document.f.add1.value=1;
+	 	document.f.add2.value=1;
+	 	document.f.add3.value='';
+		document.f.every1.value=12;
+		document.f.every2.value=1;
+		document.f.every3.value='';
+		document.f.whenmorethan1.value=9999999;
+		document.f.whenmorethan2.value=12;
+		document.f.whenmorethan3.value='';
+		document.f.setto1.value=0;
+		document.f.setto2.value=1;
+		document.f.setto3.value='';
+		document.f.lastvalue1.value=1;
+		document.f.lastvalue2.value=1;
+		document.f.lastvalue3.value='';
+		document.f.numberingmethod.value='No {X}, Issue {Y}';
+		moreoptions(text[0],text[2]);
+		display_table(0);
+		break;
+	case "6":
+		var d = new Date();
+		var sYear = d.getFullYear();
+	 	document.f.add1.value=1;
+	 	document.f.add2.value='1';
+	 	document.f.add3.value='';
+		document.f.every1.value=4;
+		document.f.every2.value='1';
+		document.f.every3.value='';
+		document.f.whenmorethan1.value=9999999;
+		document.f.whenmorethan2.value='4';
+		document.f.whenmorethan3.value='';
+		document.f.setto1.value=0;
+		document.f.setto2.value='1';
+		document.f.setto3.value='';
+		document.f.lastvalue1.value=sYear;
+		document.f.lastvalue2.value='1';
+		document.f.lastvalue3.value='';
+		document.f.periodicity.value='8';
+		document.f.numberingmethod.value='{Y} {X}';
+		moreoptions_seasons(text[15],sYear);
+		display_table(0);
+		is_season = 1;
+		break;
+	case "7":
+		display_table(1);
+		document.f.irreg_check.value=1; 
+		break;
+	default:
+	 	document.f.add1.value=1;
+	 	document.f.add2.value='';
+	 	document.f.add3.value='';
+		document.f.every1.value=1;
+		document.f.every2.value='';
+		document.f.every3.value='';
+		document.f.whenmorethan1.value=9999999;
+		document.f.whenmorethan2.value='';
+		document.f.whenmorethan3.value='';
+		document.f.setto1.value=0;
+		document.f.setto2.value='';
+		document.f.setto3.value='';
+		document.f.lastvalue1.value=1;
+		document.f.lastvalue2.value='';
+		document.f.lastvalue3.value='';
+		document.f.numberingmethod.value='{X}';
+		moreoptions_daily_check(text[0]);
+		document.f.irreg_check.value=1;
+		display_table(0);
+		break;
+	}
+}
+
+function display_table(n) {
+	if(n==1){
+		document.getElementById("basetable").style.display = 'block';
+	} else {
+		document.getElementById("basetable").style.display = 'none';
+	}
+}
+
+function modify_num_pattern() {
+	document.getElementById("numberpattern").value = '<!-- TMPL_VAR NAME="numberpattern" -->';
+	num_pattern();
+	
+	document.f.add1.value='<!-- TMPL_VAR NAME="add1" -->';
+	document.f.add2.value='<!-- TMPL_VAR NAME="add2" -->';
+	document.f.add3.value='<!-- TMPL_VAR NAME="add3" -->';
+	document.f.every1.value='<!-- TMPL_VAR NAME="every1" -->';
+	document.f.every2.value='<!-- TMPL_VAR NAME="every2" -->';
+	document.f.every3.value='<!-- TMPL_VAR NAME="every3" -->';
+	document.f.whenmorethan1.value='<!-- TMPL_VAR NAME="whenmorethan1" -->';
+	document.f.whenmorethan2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
+	document.f.whenmorethan3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
+	document.f.setto1.value='<!-- TMPL_VAR NAME="setto1" -->';
+	document.f.setto2.value='<!-- TMPL_VAR NAME="setto2" -->';
+	document.f.setto3.value='<!-- TMPL_VAR NAME="setto3" -->';
+	document.f.lastvalue1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
+	document.f.lastvalue2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
+	document.f.lastvalue3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
+	document.f.numberingmethod.value='<!-- TMPL_VAR NAME="numberingmethod" -->';
+
+	var more_strY;
+	var more_strZ;
+	<!-- TMPL_IF NAME="add2" -->
+	if(<!-- TMPL_VAR NAME="add2" --> > 0){
+		more_strY="Y";
+	}
+	<!-- /TMPL_IF -->
+	<!-- TMPL_IF NAME="add3" -->
+	if(<!-- TMPL_VAR NAME="add3" --> > 0){
+		more_strZ="Z";
+	}
+	<!-- /TMPL_IF -->
+
+	document.f.lastvaluetemp1.value='<!-- TMPL_VAR NAME="lastvalue1" -->';
+	if(more_strY){
+		document.f.lastvaluetemp2.value='<!-- TMPL_VAR NAME="lastvalue2" -->';
+	document.f.whenmorethantemp2.value='<!-- TMPL_VAR NAME="whenmorethan2" -->';
+	}
+	if(more_strZ){
+		document.f.lastvaluetemp3.value='<!-- TMPL_VAR NAME="lastvalue3" -->';
+	document.f.whenmorethantemp3.value='<!-- TMPL_VAR NAME="whenmorethan3" -->';
+	}
+}
+
+// a pre check with more options to see if 'number' and '1/day' are chosen
+function moreoptions_daily_check(x) {
+	var periodicity = document.f.periodicity.value;
+	var errortext='';
+	if(periodicity == 1){
+		document.getElementById("irregularity").innerHTML = '';
+		document.getElementById("more_options").innerHTML = '';
+		var daynames = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
+		errortext ="Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>";
+		for(var j=0;j<daynames.length;j++){
+			errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
+		}
+	var error = errortext;
+	document.getElementById("irregularity").innerHTML = error;
+	} else {
+		document.getElementById("irregularity").innerHTML = '';
+		document.getElementById("more_options").innerHTML = '';
+		moreoptions(x);
+	}
+}
+
+// to dispaly the more options section
+function moreoptions(x,y,z){
+document.getElementById("irregularity").innerHTML = '';
+document.getElementById("more_options").innerHTML = '';
+var textbox = '';
+	// alert("X: "+x+"Y: "+y+"Z: "+z);
+	if(x){
+		textbox +="<table>\n<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
+		if(y){
+			textbox +="<td>"+y+"<\/td>";
+			if(z){
+				textbox +="<td>"+z+"<\/td>";
+			}
+		}
+		textbox +="<\/tr>\n";
+		textbox +="<tr><td>"+text[5]+"<\/td><td><input type='text' name='lastvaluetemp1' size='4' onkeyup='moreoptionsupdate(\"lastvalue1\")'><\/td>\n";
+		if(y){
+			textbox +="<td><input type='text' name='lastvaluetemp2' size='4' onkeyup='moreoptionsupdate(\"lastvalue2\")'><\/td>\n";
+			if(z){
+				textbox +="<td><input type='text' name='lastvaluetemp3' size='4' onkeyup='moreoptionsupdate(\"lastvalue3\")'><\/td>\n";
+			}
+		}
+		textbox +="<\/tr>\n";
+		if(y){
+			textbox +="<tr><td>"+text[6]+"<\/td>";
+			textbox +="<td><a href='javascript:irregularity_check()'>Irregularity?<\/a><\/td>\n";
+			textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
+			if(z){
+				textbox +="<td><input type='text' name='whenmorethantemp3' size='4' onkeyup='moreoptionsupdate(\"whenmorethan3\",1)'><\/td>\n";
+			}
+			textbox +="<\/tr>";
+		}
+		textbox +="<\/table>\n";
+	}
+	document.getElementById("more_options").innerHTML = textbox;
+}
+
+function hemispheres(chosen){
+var selbox = document.getElementById("season1");
+    if(selbox){
+	var selboxselected = selbox.options[selbox.selectedIndex].value;
+	selbox.options.length = 0;
+
+	if (chosen == "1") {
+		selbox.options[selbox.options.length] = new Option(text[11],'1');
+		selbox.options[selbox.options.length] = new Option(text[12],'2');
+		selbox.options[selbox.options.length] = new Option(text[13],'3');
+		selbox.options[selbox.options.length] = new Option(text[14],'4');
+		is_hemisphere = 1;
+		selbox.options[selboxselected-1].selected = true;
+	}
+
+	if (chosen == "2") {
+		selbox.options[selbox.options.length] = new Option(text[13],'1');
+		selbox.options[selbox.options.length] = new Option(text[10],'2');
+		selbox.options[selbox.options.length] = new Option(text[11],'3');
+		selbox.options[selbox.options.length] = new Option(text[12],'4');
+		is_hemisphere = 2;
+		selbox.options[selboxselected-1].selected = true;
+	}
+    }
+}
+
+// to dispaly the more options section for seasons
+function moreoptions_seasons(x,y){
+document.getElementById("irregularity").innerHTML = '';
+document.getElementById("more_options").innerHTML = '';
+var textbox = '';
+	// alert("X: "+x+"Year: "+y);
+	if(x){
+		var hemi_select = parseInt('<!-- TMPL_VAR NAME="hemisphere" -->');
+		textbox +="<table>\n<tr><td>"+ text[7]  +"<\/td><td colspan='2'><select name='hemisphere' onchange='hemispheres(this.options[this.selectedIndex].value)'>";
+		for(var i = 1; i <= 2; i++){
+			textbox +="<option value='"+i+"'";
+			if(i == hemi_select){
+				textbox += " selected "
+			}
+			textbox +=">"+text[i+7]+"<\/option>";
+		}
+		textbox +="<\/select><\/td><\/tr>\n";
+		textbox +="<tr><td>&nbsp;<\/td><td>"+x+"<\/td>";
+		textbox +="<td>"+text[16]+"<\/td>";
+		textbox +="<\/tr>\n";
+		textbox +="<tr><td>"+text[5]+"<\/td><td><select name='lastvaluetemp2' id='season1' onchange='moreoptionsupdate(\"lastvalue2\")'>";
+		for(var j = 1; j <= 4; j++){
+			textbox +="<option value='"+j+"'>"+text[j+10]+"<\/option>";
+		}
+		textbox +="<\/select><\/td><td><select name='lastvaluetemp1' onchange='moreoptionsupdate(\"lastvalue1\")'>";
+		for(var k = parseInt(y); k <= parseInt(y)+15; k++){
+			textbox +="<option value='"+k+"'>"+k+"<\/option>";
+		}
+		textbox +="<\/select><\/td><\/tr>\n";
+		textbox +="<tr><td>"+text[6]+"<\/td>";
+		textbox +="<td><a href='javascript:irregularity_check()'>Irregularity?<\/a><\/td>\n";
+		textbox +="<td><input type='text' name='whenmorethantemp2' size='4' onkeyup='moreoptionsupdate(\"whenmorethan2\",1)'><\/td>\n";
+    	        textbox +="<\/tr><\/table>\n";
+	}
+	document.getElementById("more_options").innerHTML = textbox;
+}
+
+function irregularity_check(){
+	document.f.irreg_check.value = 1; // Irregularity button now pushed
+	var periodicity = document.f.periodicity.value;
+	var rollover = document.f.whenmorethantemp2.value;
+	if(document.f.whenmorethantemp3){
+		rollover = document.f.whenmorethantemp3.value;
+	}
+	var error='';
+	var toobig;
+	var expected; 
+	var errortext = "<b>Warning irregularity detected<\/b><br \/>";
+	switch(periodicity){
+	case "1":
+		if(rollover < 365) expected =365;
+		if(rollover > 365) {
+			expectedover=365;
+			toobig=1;
+		}
+		break;
+	case "2":
+		if(rollover < 52) expected =52;
+		if(rollover > 52){
+			expectedover=52;
+			toobig=1;
+		}
+		break;
+	case "3":
+		if(rollover < 26) expected =26;
+		if(rollover > 26){
+			expectedover=26;
+			toobig=1;
+		}
+		break;
+	case "4":
+		if(rollover < 17) expected =17;
+		if(rollover > 17){
+			expectedover=17;
+			toobig=1;
+		}
+		break;
+	case "5":
+		if(rollover < 12) expected =12;
+		if(rollover > 12){
+			expectedover=12;
+			toobig=1;
+		}
+		break;
+	case "6":
+		if(rollover < 6) expected =6;
+		if(rollover > 6){
+			expectedover=6;
+			toobig=1;
+		}
+		break;
+	case "7":
+		if(rollover < 4) expected =4;
+		if(rollover > 4){
+			expectedover=4;
+			toobig=1;
+		}
+		break;
+	case "8":
+		if(rollover < 4) expected =4;
+		if(rollover > 4){
+			expectedover=4;
+			toobig=1;
+		}
+		break;
+	case "9":
+		if(rollover < 2) expected =2;
+		if(rollover > 2){
+			expectedover=2;
+			toobig=1;
+		}
+		break;
+	case "10":
+		if(rollover < 1) expected =1;
+		if(rollover > 1){
+			expectedover=1;
+			toobig=1;
+		}
+		break;
+	default:
+		break;
+	}
+	if(expected){
+		if(expected == 365){
+			var daynames = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
+			errortext +="Please indicate which days of the week you <b>DO NOT<\/b> expect to receive issues.<br \/>";
+			for(var j=0;j<daynames.length;j++){
+				errortext +="<input type='checkbox' name='irregular' id='irregular"+(j+1)+"' value='"+(j+1)+"' />"+daynames[j]+" &nbsp; ";
+			}
+			error=errortext;
+		} else {
+			errortext +=expected+" issues expected "+rollover+" were entered. <br \/>Please indicate which date(s) an issue is not expected<br \/>";
+			var count=0;
+			for(var i=rollover;i<expected;i++){
+				errortext +="<select name='irregular' id='irregular"+count+"' onchange='display_example(expected)'>\n";
+				errortext +=irregular_options(periodicity);
+				errortext +="<\/select>\n";
+				count++;
+			}
+			error=errortext;
+		}
+	}
+	if(toobig){
+		errortext +=expectedover+" issues expected "+rollover+" were entered.<br \/> You seem to have indicated more issues per year than expected.";
+		error=errortext;
+	}
+	if(error.length ==0){
+		error='No irregularities noticed';
+	}
+	display_example(expected);
+	document.getElementById("irregularity").innerHTML = error;
+}
+
+function irregular_options(periodicity){
+	var titles;
+	var count;
+<!-- TMPL_IF NAME="weekarrayjs" -->
+	var weeks = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
+<!-- /TMPL_IF -->
+	var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
+	var seasons = new Array('Autumn','Winter','Spring','Summer','Fall');
+	var errortext='';
+	if(periodicity == 1) {
+		expected = 366;
+		titles = "Day";
+		count = 1;
+	}
+	if(periodicity == 2 || periodicity == 3 || periodicity == 4) { 
+		expected = 52;
+	<!-- TMPL_IF NAME="weekarrayjs" -->
+		titles = weeks;
+		count = <!-- TMPL_VAR NAME="weekno" -->;
+	<!-- TMPL_ELSE -->
+		titles = "Week";
+		count = 1;
+	<!-- /TMPL_IF -->
+	}
+	if(periodicity == 5 || periodicity == 6 || periodicity == 7 || periodicity == 8 || periodicity == 9) {
+		if(periodicity == 8) {
+			is_season = 1; // setting up from edit page
+		} 
+		if(is_season){
+			titles = seasons;
+			expected = 4;
+			if(is_hemisphere == 2){
+				count = 2;
+			} else {
+				count = 1;
+			}
+		} else {
+			titles = months;
+			expected = 12;
+			count = 1;
+		}
+	}
+	for(var j=1;j<=expected;j++){
+		if(isArray(titles)){
+			if(count>expected){
+				count = count-expected;
+			}
+			if(is_season && is_hemisphere == 1){
+				errortext +="<option value='"+((count*3)-2)+"'>"+titles[j]+"<\/option>\n";
+// alert("value: "+((count*3)-2)+" title: "+titles[j]);
+			} else if(is_season && is_hemisphere == 2){
+				errortext +="<option value='"+((count*3)-2)+"'>"+titles[j-1]+"<\/option>\n";
+// alert("value: "+((count*3)-2)+" title: "+titles[j-1]);
+			} else {
+				errortext +="<option value='"+count+"'>"+titles[j-1]+"<\/option>\n";
+			}
+			count++;
+		} else {
+			errortext +="<option value='"+j+"'>"+titles+" "+j+"<\/option>\n";
+		}
+	}
+	return errortext;
+}
+
+function irregular_order(){
+	var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
+	var periodicity = document.f.periodicity.value;
+	var irregarray = irregular.split('|');
+	if(periodicity ==1){
+		for(j=0;j<irregarray.length;j++){
+		document.getElementById("irregular"+irregarray[j]).checked = true; 
+		}
+	} else {
+		for(i=0;i<irregarray.length;i++){    
+			document.getElementById("irregular"+i).value = irregarray[i];
+		}
+	}
+}
+
+function display_example(expected){
+	var startfrom1 = parseInt(document.f.lastvalue1.value);
+	var startfrom2 = parseInt(document.f.lastvalue2.value);
+	var startfrom3 = parseInt(document.f.lastvalue3.value);
+	var every1 = parseInt(document.f.every1.value);
+	var every2 = parseInt(document.f.every2.value);
+	var every3 = parseInt(document.f.every3.value);
+	var numberpattern = document.f.numberingmethod.value;
+	var whenmorethan2 = parseInt(document.f.whenmorethan2.value);
+	var whenmorethan3 = parseInt(document.f.whenmorethan3.value);
+	var setto2 = parseInt(document.f.setto2.value);
+	var setto3 = parseInt(document.f.setto3.value);
+	var displaytext = 'Based on the information<br \/>entered the Numbering Pattern<br \/>will look like this<br \/>\n';
+	if(startfrom3>0){
+		var count=startfrom3-1;
+		var count2=startfrom2;
+		for(var i=0;i<12;i++){
+			if(count>=whenmorethan3){
+				count=setto3;
+				if(count2>=whenmorethan2){
+					startfrom1++;
+					count2=setto2;
+				} else {
+					count2++;
+				}
+			} else {
+				count++;
+			}
+			displaytext += numberpattern.replace(/{Z}/,count)+'\n';
+			displaytext = displaytext.replace(/{Y}/,count2)+'<br \/>\n';
+			displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
+
+		}
+	}
+	if(startfrom2>0 && !startfrom3){
+		var count=startfrom2-1;
+		for(var i=0;i<12;i++){
+			if(count>=whenmorethan2){
+				startfrom1++;
+				count=setto2;
+			} else {
+				count++;
+			}
+
+			if(is_season){
+				if(is_hemisphere == 2){
+					if(count == 1) {
+						displaytext += numberpattern.replace(/{Y}/,text[count+12])+'\n';
+					} else {
+						displaytext += numberpattern.replace(/{Y}/,text[count+8])+'\n';
+					}
+				} else {
+				displaytext += numberpattern.replace(/{Y}/,text[count+10])+'\n';
+				}
+			} else {
+				displaytext += numberpattern.replace(/{Y}/,count)+'\n';
+			}
+			displaytext = displaytext.replace(/{X}/,startfrom1)+'<br \/>\n';
+		}
+	}
+	if(startfrom1>0 && !startfrom2 && !startfrom3){
+		for(var i=startfrom1;i<(startfrom1+12);i=i+(1*every1)){
+			startfrom1 = i;
+			displaytext += numberpattern.replace(/{X}/,startfrom1)+'<br \/>\n';
+		}
+	}
+	displaytext = "<div style='padding: 5px; background-color: #CCCCCC'>"+displaytext+"<\/div>";
+	document.getElementById("displayexample").innerHTML = displaytext;
+}
+
+function isArray(obj) {
+   if (obj.constructor.toString().indexOf("Array") == -1)
+      return false;
+   else
+      return true;
+}
+
+function moreoptionsupdate(fieldnames,rollover){
+	fieldname = fieldnames;
+	fld = fieldname.length;
+	fld = fld-1;
+	fieldnametempnumber = fieldname.substr(fld);
+	//alert(fieldnametempnumber);
+	fieldnametemp = fieldname.slice(0,-1)+"temp"+fieldnametempnumber;
+	// alert(fieldnametemp);
+	eval("document.f."+fieldname+".value = document.f."+fieldnametemp+".value");
+	if(rollover){
+		eval("document.f.every"+(fieldnametempnumber-1)+".value = document.f."+fieldnametemp+".value");
+	}
+}
+
+
+function check_input(e){
+	var unicode=e.charCode? e.charCode : e.keyCode
+	if (unicode!=8 && unicode !=46){ // if key isn't backspace or delete
+		if (unicode<48||unicode>57) { // if not a number
+			alert("Needs to be entered in digit form -eg 10");
+			return false // disable key press
+		}
+	}
+}
+
+</script>
+
+<div id="main">
+<!-- TMPL_IF name="mod" -->
+	<h1>Modify subscription</h1>
+	<form method="post" name="f" action="subscription-detail.pl">
+		<input type="hidden" name="op" value="modsubscription">
+		<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
+<!-- TMPL_ELSE -->
+	<h1>Add a subscription (Serial Holdings Record)</h1>
+	<form method="post" name="f">
+		<input type="hidden" name="op" value="addsubscription">
+<!-- /TMPL_IF -->
+		<input type="hidden" name="user" value="<!-- TMPL_VAR name="loggedinusername" -->">
+		<input type="hidden" name="irreg_check" value="0">
+
+
+<div id="bloc25">
+	<h2>Subscription information</h2>
+	<table border="0" cellspacing="5" cellpadding="0">
+	<tr><td>Librarian:</td>
+	    <td><!-- TMPL_VAR name="loggedinusername" --></td></tr>
+	<tr><td><label>Supplier:</label></td>
+	    <td><input type="text" name="aqbooksellerid" value="<!-- TMPL_VAR name="aqbooksellerid" -->" size="4"> (<input type="text" name="aqbooksellername" value="<!-- TMPL_VAR name="aqbooksellername" -->" disabled readonly>) <a href="#" onClick="FindAcqui(f)">Search for a Supplier</a></td>
+	<tr><td><label>Biblio</label></td>
+	    <td><input type="text" id="biblionumber"  name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" size="4"> (<input type="text" id="title" name="title" value="<!-- TMPL_VAR name="title" -->" disabled readonly>) <a href="#" onClick="Plugin(f)">Search for Biblio</a> | <a href="#" onClick="AddBiblio()">Create Biblio</a></td>
+	<tr><td><label>Call Number</label></td>
+	    <td><input type="text" name="callnumber" value="<!-- TMPL_VAR name="callnumber" -->" size="20"></td></tr>
+	<tr><td><label>Notes</label></td>
+	    <td><textarea name="notes" cols="30" rows="2"><!-- TMPL_VAR name="notes" --></textarea></td></tr>
+		<!-- TMPL_IF name="letters" -->
+			<tr><td><label>Enable issue alert</label>
+				<select name="letter">
+					<option value=""></option>
+					<!-- TMPL_LOOP name="letters" -->
+						<!-- TMPL_IF name="selected" -->
+							<option value="<!-- TMPL_VAR name="code" -->" selected><!-- TMPL_VAR name="name" --></option>
+						<!-- TMPL_ELSE -->
+							<option value="<!-- TMPL_VAR name="code" -->"><!-- TMPL_VAR name="name" --></option>
+						<!-- /TMPL_IF -->
+					<!-- /TMPL_LOOP -->
+				</select>
+			</td>
+		<!-- /TMPL_IF -->
+		<td><label>Distributed to </label><a href="#" onClick="DistributedTo()">...</a></td><tr>
+
+
+
+
+
+
+
+
+
+	<tr><td><b>Warning:</b></td>
+	    <td>
+		<ul>
+			<li>Remember you <b>must</b> have created a biblio <b>before</b> creating a subscription</li>
+			<li>You also must have selected a supplier if you want to ask for late issues</li>
+		</ul></td></tr>
+	</table>
+</div>
+<div id="bloc25">
+	<h2>Planning</h2>
+	<table border="0" cellspacing="5" cellpadding="0">
+	<tr><td><label class="label100">This issue publishes on:</label></td>
+	    <td> <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="button2" style="cursor: pointer;"  />
+
+<input type="text" name="publisheddate" value="<!-- TMPL_VAR name="publisheddate" -->" size=13 maxlength=10 id="acqui_date" style="border-width: 0px;">
+<!-- both scripts for calendar must follow the input field --> 
+                                        <script type="text/javascript">
+                                            Calendar.setup({
+                                                inputField:"acqui_date",
+                                                ifFormat       :   "%d/%m/%Y",
+                                                button         :   "button2",
+                                                align          :   "Tl"
+                                            });
+                                        </script>
+                                        <script type="text/javascript">
+                                            Calendar.setup({
+                                                inputField     :   "acqui_date",
+                                                ifFormat       :   "%d/%m/%Y",
+                                                button         :   "acqui_date",
+                                                align          :   "Tl"
+                                            });
+                                        </script></td>
+	    <td rowspan="5"><div id="displayexample"></div></td></tr>
+	<tr><td><label class="label100">Frequency: (*)</label></td>
+	    <td>	<select name="periodicity" size="1">
+				<option value="" selected>-- please choose --</option>
+				
+				<!-- TMPL_IF name="periodicity1" -->
+					<option value="1" selected>1/day</option>
+				<!-- TMPL_ELSE -->
+					<option value="1">1/day</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity2" -->
+					<option value="2" selected>1/week</option>
+				<!-- TMPL_ELSE -->
+					<option value="2">1/week</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity3" -->
+					<option value="3" selected>1/2 weeks (2/month)</option>
+				<!-- TMPL_ELSE -->
+					<option value="3">1/2 weeks (2/months)</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity4" -->
+					<option value="4" selected>1/3 weeks</option>
+				<!-- TMPL_ELSE -->
+					<option value="4">1/3 weeks</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity5" -->
+					<option value="5" selected>1/month</option>
+				<!-- TMPL_ELSE -->
+					<option value="5">1/month</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity6" -->
+					<option value="6" selected>1/2 months (6/year)</option>
+				<!-- TMPL_ELSE -->
+					<option value="6">1/2 months (6/year)</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity7" -->
+					<option value="7" selected>1/3 months (1/quarter)</option>
+				<!-- TMPL_ELSE -->
+					<option value="7">1/3 months (1/quarter)</option>
+				<!-- /TMPL_IF -->
+				<!-- periodicity8 is 1/quarter, exactly like periodicity7 but will use it for seasonal option -->
+				<!-- TMPL_IF name="periodicity8" -->
+					<option value="8" selected>1/quarter (seasonal)</option>
+				<!-- TMPL_ELSE -->
+					<option value="8">1/quarter (seasonal)</option>
+				<!-- /TMPL_IF -->
+
+				<!-- TMPL_IF name="periodicity9" -->
+					<option value="9" selected>2/years</option>
+				<!-- TMPL_ELSE -->
+					<option value="9">2/year</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity10" -->
+					<option value="10" selected>1/year</option>
+				<!-- TMPL_ELSE -->
+					<option value="10">1/year</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="periodicity11" -->
+					<option value="11" selected>1/2 years</option>
+				<!-- TMPL_ELSE -->
+					<option value="11">1/2 years</option>
+				<!-- /TMPL_IF -->
+			</select>
+	</td></tr>
+	<tr><td><label class="label100">Numbering Pattern:</label></td>
+	    <td><select name="numbering_pattern" size="1" id="numberpattern" onchange="num_pattern()">
+		<option value="" selected>-- please choose --</option>
+		<!-- TMPL_IF name="numberpattern1" -->
+			<option value="1" selected>Number</option>
+		<!-- TMPL_ELSE -->
+			<option value="1">Number</option>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern2" -->
+			<option value="2" selected>Volume, Number, Issue</option>
+		<!-- TMPL_ELSE -->
+			<option value="2">Volume, Number, Issue</option>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern3" -->
+			<option value="3" selected>Volume, Number</option>
+		<!-- TMPL_ELSE -->
+			<option value="3">Volume, Number</option>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern4" -->
+			<option value="4" selected>Volume, Issue</option>
+		<!-- TMPL_ELSE -->
+			<option value="4">Volume, Issue</option>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern5" -->
+			<option value="5" selected>Number, Issue</option>
+		<!-- TMPL_ELSE -->
+			<option value="5">Number, Issue</option>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern6" -->
+			<option value="6" selected>Seasonal only</option>
+		<!-- TMPL_ELSE -->
+	 		<option value="6">Seasonal only</option>
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern7" -->
+			<option value="7" selected>None of the above</option>
+		<!-- TMPL_ELSE -->
+	 		<option value="7">None of the above</option>
+		<!-- /TMPL_IF -->
+
+		</select>
+<div id="more_options"></div>
+<div id="irregularity"></div></td></tr>
+	<tr><td><label class="label100">Planned to arrive on: (*)</label></td>
+	    <td><img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="button1" style="cursor: pointer;"  />
+<input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->" size=13 maxlength=10 id="beginning_date" style="border-width: 0px;">
+<!-- both scripts for calendar must follow the input field --> 
+                                        <script type="text/javascript">
+                                            Calendar.setup({
+                                                inputField   : "beginning_date",
+                                                ifFormat     : "%d/%m/%Y",
+                                                button       : "button1",
+                                                align        : "Tl"
+                                            });
+                                        </script>
+                                        <script type="text/javascript">
+                                            Calendar.setup({
+                                                inputField   : "beginning_date",
+                                                ifFormat     : "%d/%m/%Y",
+                                                button       : "beginning_date",
+                                                align        : "Tl"
+                                            });
+                                        </script></td></tr>
+</table> 
+</div>
+
+<!--	<tr><td><label class="label100">Arrives on</label></td>
+	    <td>	<select name="dow" size="1">
+				<option value="">None</option>
+				<!-- TMPL_IF name="dow1" -->
+					<option value="1" selected>Monday</option>
+				<!-- TMPL_ELSE -->
+					<option value="1">Monday</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="dow2" -->
+					<option value="2" selected>Tuesday</option>
+				<!-- TMPL_ELSE -->
+					<option value="2">Tuesday</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="dow3" -->
+					<option value="3" selected>Wednesday</option>
+				<!-- TMPL_ELSE -->
+					<option value="3">Wednesday</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="dow4" -->
+					<option value="4" selected>Thursday</option>
+				<!-- TMPL_ELSE -->
+					<option value="4">Thursday</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="dow5" -->
+					<option value="5" selected>Friday</option>
+				<!-- TMPL_ELSE -->
+					<option value="5">Friday</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="dow6" -->
+					<option value="6" selected>Saturday</option>
+				<!-- TMPL_ELSE -->
+					<option value="6">Saturday</option>
+				<!-- /TMPL_IF -->
+				<!-- TMPL_IF name="dow7" -->
+					<option value="7" selected>Sunday</option>
+				<!-- TMPL_ELSE -->
+					<option value="7">Sunday</option>
+				<!-- /TMPL_IF -->
+			</select></td></tr> -->
+
+<div id="bloc25">
+	<h2>Subscription length</h2>
+		<p><select name="subtype">
+<!-- TMPL_LOOP NAME="subtype" -->
+<option value="<!-- TMPL_VAR NAME="name" -->" <!-- TMPL_IF NAME="selected" --> selected="SELECTED" <!-- /TMPL_IF -->><!-- TMPL_VAR NAME="name" --></option>
+<!-- /TMPL_LOOP -->
+</select> <input type="text" name="sublength" value="<!-- TMPL_VAR name="sublength" -->" size="3" onkeypress="return check_input(event)"> (*) (enter amount in numerals)</p>
+
+</div>
+<div id="bloc25">
+	<h2>Numbering calculation</h2>
+	<p>Numbering formula: <input type="text" name="numberingmethod" value="<!-- TMPL_VAR name="numberingmethod" -->"></p>
+	<div id="basetable" style="display: none;">
+		<table class="small">
+			<tr>
+				<th>&nbsp;</th>
+				<th>X</th>
+				<th>Y</th>
+				<th>Z</th>
+			</tr>
+			<tr>
+				<td>Add</td>
+				<td>
+					<input type="text" name="add1" value="<!-- TMPL_VAR name="add1" -->">
+				</td>
+				<td>
+					<input type="text" name="add2" value="<!-- TMPL_VAR name="add2" -->">
+				</td>
+				<td>
+					<input type="text" name="add3" value="<!-- TMPL_VAR name="add3" -->">
+				</td>
+			</tr>
+			<tr>
+				<td>once every</td>
+				<td><input type="text" name="every1" value="<!-- TMPL_VAR name="every1" -->"></td>
+				<td><input type="text" name="every2" value="<!-- TMPL_VAR name="every2" -->"></td>
+				<td><input type="text" name="every3" value="<!-- TMPL_VAR name="every3" -->"></td>
+			</tr>
+			<tr>
+				<td>When more than</td>
+				<td><input type="text" name="whenmorethan1" value="<!-- TMPL_VAR name="whenmorethan1" -->"></td>
+				<td><input type="text" name="whenmorethan2" value="<!-- TMPL_VAR name="whenmorethan2" -->"></td>
+				<td><input type="text" name="whenmorethan3" value="<!-- TMPL_VAR name="whenmorethan3" -->"></td>
+			</tr>
+			<!-- TMPL_IF name="mod" -->
+			<tr>
+				<td>The loop is for instance</td>
+				<td><input type="text" name="innerloop1" value="<!-- TMPL_VAR name="innerloop1" -->"></td>
+				<td><input type="text" name="innerloop2" value="<!-- TMPL_VAR name="innerloop2" -->"></td>
+				<td><input type="text" name="innerloop3" value="<!-- TMPL_VAR name="innerloop3" -->"></td>
+			</tr>
+			<!-- /TMPL_IF -->
+			<tr>
+				<td>Set back to</td>
+				<td><input type="text" name="setto1" value="<!-- TMPL_VAR name="setto1" -->"></td>
+				<td><input type="text" name="setto2" value="<!-- TMPL_VAR name="setto2" -->"></td>
+				<td><input type="text" name="setto3" value="<!-- TMPL_VAR name="setto3" -->"></td>
+			</tr>
+			<tr>
+				<td>
+					<!-- TMPL_IF name="mod" -->
+						Last value
+					<!-- TMPL_ELSE -->
+						Begins with
+					<!-- /TMPL_IF -->
+				</td>
+				<td><input type="text" name="lastvalue1" value="<!-- TMPL_VAR name="lastvalue1" -->"></td>
+				<td><input type="text" name="lastvalue2" value="<!-- TMPL_VAR name="lastvalue2" -->"></td>
+				<td><input type="text" name="lastvalue3" value="<!-- TMPL_VAR name="lastvalue3" -->"></td>
+			</tr>
+		</table> </div>
+</div>
+<!-- TMPL_IF name="mod" -->
+	<input type="button" value="Save subscription" onclick="Check(this.form)" accesskey="w" class="button">
+<!-- TMPL_ELSE -->
+	<input type="button" value="Add subscription" onclick="Check(this.form)" accesskey="w" class="button">
+<!-- /TMPL_IF -->
+</form>
+</div>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
+
+<script language="JavaScript" type="text/javascript">
+
+function Plugin(f)
+{
+	 window.open('subscription-bib-search.pl','FindABibIndex','width=500,height=400,toolbar=no,scrollbars=yes');
+}
+
+function FindAcqui(f)
+{
+	 window.open('acqui-search.pl','FindASupplier','width=500,height=400,toolbar=no,scrollbars=yes');
+}
+
+function Find_ISSN(f)
+{
+	 window.open('issn-search.pl','FindABibIndex','width=500,height=400,toolbar=no,scrollbars=yes');
+}
+
+
+function Check(f) {
+	if (f.startdate.value.length != 0 && f.sublength.value > 0) {
+		if (f.irreg_check.value == 1) {
+			document.f.submit();
+		} else {
+			if(f.numbering_pattern.value == ''){
+				alert("need to choose a numbering pattern");
+			} else {
+				alert("need to check for irregularity by clicking 'Irregularity?'");
+			}
+		}
+	} else {
+	 	alert('field marked with * are mandatory');
+	}
+	return false;
+}
+function DistributedTo()
+{
+	newwin= window.open('distributedto.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->',"Distributed_to",'width=800,height=600,toolbar=false,scrollbars=yes');
+}
+function AddBiblio() {
+     window.open("/cgi-bin/koha/cataloguing/addbiblio.pl?fromserials=1&popup=1","AddBiblio",'width=700,height=400,toolbar=no,scrollbars=yes,status=yes');
+
+}
+</script>
+<!-- TMPL_IF name="mod" -->
+<script language="JavaScript" type="text/javascript">
+window.onload = modify_num_pattern();
+	<!-- TMPL_IF name="hemisphere" -->
+	window.onload = hemispheres(<!-- TMPL_VAR NAME="hemisphere" -->);
+	<!-- /TMPL_IF -->
+</script>
+<!-- /TMPL_IF -->
+<!-- TMPL_IF name="irregularity" -->
+<script language="JavaScript"  type="text/javascript">
+window.onload = irregularity_check();
+window.onload = irregular_order();
+</script>
+<!-- /TMPL_IF -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/serials/subscription-bib-search.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/subscription-bib-search.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/subscription-bib-search.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/subscription-bib-search.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,74 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Catalog Search<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<div id="main-compact">
+
+<h1>Catalogue search</h1>
+
+<form name="f" action="/cgi-bin/koha/serials/subscription-bib-search.pl" method="post">
+	<input type="hidden" name="op" value="do_search" />
+	<input type="hidden" name="type" value="intranet" />
+	<input type="hidden" name="nbstatements" value="<!-- TMPL_VAR NAME="nbstatements" -->" />
+	<div class="data">
+		<table>
+		<caption>Search on</caption>
+		<tr><th scope="row"><label for="keyword">Search</label></th><td>
+			
+			<input type="hidden" name="and_or" value="@and" />
+			<input type="hidden" name="relation" value="@attr 5=1" /> 
+			<input type="text" id="keyword" name="value"> 
+		</td><td><select align="right" id="kohafield" name="kohafield" size="1">
+				<option value="any">Any field</option>
+				<option value="title">Title</option>
+				<option value="Author">Author</option>
+				<option value="ISSN">ISSN</option>
+			</select></td></tr>
+		<tr><th scope="row"><label for="itemtype">Itemtype</label></th><td>
+			<!-- TMPL_VAR name="CGIitemtype" -->
+			<input type="hidden" name="kohafield" value="itemtype" />
+			<input type="hidden" name="value" value="<!-- TMPL_VAR name="category" -->">
+		
+			<input type="hidden" name="and_or" value="@and" />
+			<input type="hidden" name="relation" value="@attr 5=1" />
+
+			<input type="hidden" name="index" value="<!-- TMPL_VAR name="index" -->" />
+		</td></tr>
+	</div>
+	<div class="data">
+		<tr><th scope="row"><label for="resultsperpage">Results per page :</label></th><td>
+			<select align="right" id="resultsperpage" name="resultsperpage" size="1">
+				<option value="10">10</option>
+				<option value="20">20</option>
+				<option value="50">50</option>
+			</select></td><td>
+		<label for="orderby">Ordered by</label>
+			<select id="orderby" name="order" size="1">
+				<option value="title i>">Title</option>
+				<option value="author i>">Author</option>
+					</select>
+		</td></tr>
+		</table>
+		<p>
+			<input type="submit" value="Start search" class="submit" />
+			
+		</p>
+	</div>
+</form>
+
+<script language="Javascript" type="text/javascript">
+function AddStatement() {
+
+	document.forms['f'].op.value="AddStatement";
+	document.f.submit();
+}
+
+function PopupSuggestion() {
+    var strQuery="";
+	for (i=0 ; i<document.f.marclist.length ; i++) {
+		if (document.f.value[i].value.length>0) {
+		    strQuery += " "+document.f.value[i].value;
+		}
+	}
+	newin=window.open("suggest.pl?Q="+strQuery,"Suggestions",'width=500,height=400,toolbar=false,scrollbars=yes');
+}
+
+</script>
+</div>

Index: koha-tmpl/intranet-tmpl/default/en/serials/subscription-detail.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/subscription-detail.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/subscription-detail.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/subscription-detail.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,420 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Subscription edit<!--
+TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="serials-menu.inc" -->
+<script language="Javascript" type="text/javascript">
+<!--
+// the english words used in display purposes
+var text = new Array('Number','Volume','Issue','Month','Week','Starting with:','Rollover at:','Choose Hemisphere:','Northern','Southern',
+'Autumn','Winter','Spring','Summer','Fall','Season','Year');
+
+// common pre defined number patterns
+function num_pattern() {
+var patternchoice = '<!--TMPL_VAR NAME='numberpattern'-->';
+	switch(patternchoice){
+	case "2":
+		options(text[1],text[0],text[2]);
+		irregularity();
+		display_table(0);
+		break;
+	case "3":
+		options(text[1],text[0]);
+		irregularity();
+		display_table(0);
+		break;
+	case "4":
+		options(text[1],text[2]);
+		irregularity();
+		display_table(0);
+		break;
+	case "5":
+		options(text[0],text[2]);
+		irregularity();
+		display_table(0);
+		break;
+	case "6":
+		var d = new Date();
+		var sYear = d.getFullYear();
+		// options_seasons(text[15],sYear);
+		irregularity();
+		is_season = 1;
+		display_table(0);
+		break;
+	case "7":
+		display_table(1);
+		irregularity();
+		break;
+	default:
+		options(text[0]);
+		irregularity();
+		display_table(0);
+		break;
+	}
+}
+
+function display_table(n) {
+	if(n==1){
+		document.getElementById("basetable").style.display = 'block';
+	} else {
+		document.getElementById("basetable").style.display = 'none';
+	}
+}
+
+// to dispaly the options section
+function options(x,y,z){
+var textbox = '';
+	// alert("X: "+x+"Y: "+y+"Z: "+z);
+	if(x){
+		document.f.xfield.value = x;
+		if(y){
+			document.f.yfield.value = y;
+			if(z){
+				document.f.zfield.value = z;
+			}
+		}
+	}
+}
+
+function irregularity(){
+	var periodicity = '<!-- TMPL_VAR NAME="periodicity"-->';
+	switch(periodicity){
+	case "1":
+		var names = new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
+		break;
+	case "2":
+		<!-- TMPL_IF NAME="weekarrayjs" -->
+		var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
+		<!-- /TMPL_IF -->
+		break;
+	case "3":
+		<!-- TMPL_IF NAME="weekarrayjs" -->
+		var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
+		<!-- /TMPL_IF -->
+		break;
+	case "4":
+		<!-- TMPL_IF NAME="weekarrayjs" -->
+		var names = new Array(<!-- TMPL_VAR NAME="weekarrayjs" -->); 
+		<!-- /TMPL_IF -->
+		break;
+	case "5":
+		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
+		break;
+	case "6":
+		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
+		break;
+	case "7":
+		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
+		break;
+	case "8":
+		var names = new Array('Autumn','Winter','Spring','Summer','Fall');
+		break;
+	case "9":
+		var names = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
+		break;
+	case "10":
+		expected =1;
+		break;
+	default:
+		break;
+	}
+
+	<!-- TMPL_IF NAME="irregularity" -->
+	var irregular = '<!-- TMPL_VAR NAME="irregularity" -->';
+	var irregarray = irregular.split('|');
+	var irregtext = '<p>';
+	for(var i=0;i<irregarray.length;i++){
+		irregtext += names[i]+' &nbsp;';
+	}
+	irregtext += '</p>';
+	document.getElementById("irreg").innerHTML = irregtext;
+	<!-- /TMPL_IF -->
+}
+
+-->
+</script>
+
+<div id="main">
+
+<h1>Subscription Details for biblio :  <!-- TMPL_VAR name="biblionumber" --></h1>
+<form class="inline" method="get" action="subscription-add.pl">
+<input type="hidden" name="op" value="mod" />
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
+<input type="submit" class="submit" title="Modify subscription" value="Edit" /></form>
+
+<form class="inline" method="get" action="serials-receive.pl">
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
+<input type="submit" class="submit" value="Receive Issues" /></form>
+
+<form class="inline" method="get" action="serial-issues.pl">
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
+<input type="submit" class="submit"  title="All issues on this title" value="Issue History" /></form>
+
+<form class="inline" method="get" action="/cgi-bin/koha/serials/serials-home.pl">
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
+<input type="submit" class="submit"  title="all subscriptions on <!-- TMPL_VAR name="bibliotitle" -->" value="Subscriptions" /></form>
+
+<form class="inline" method="get" action="/cgi-bin/koha/catalogue/MARCdetail.pl">
+<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR name="biblionumber" -->" />
+<input type="submit" class="submit"  title="go to <!-- TMPL_VAR name="bibliotitle" -->" value="View Biblio Record" /></form>
+
+<form class="inline"><input type="submit" class="cancel" value="Delete Subscription" onclick="confirm_deletion(); return false;" /></form>
+<!-- TMPL_IF NAME="routing" -->
+<form class="inline" method="get" action="/cgi-bin/koha/serials/routing.pl">
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
+<input type="submit"  class="submit" value="Edit Routing List"/></form>
+<!-- TMPL_ELSE -->
+<form class="inline" method="get" action="/cgi-bin/koha/serials/routing.pl">
+<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
+<input type="hidden" name="op" value="new" />
+<input type="submit"  class="submit" value="Create Routing List"/></form>
+<!-- /TMPL_IF -->
+
+<table>
+<tr valign="top"><td>
+
+<div class="bloc25">
+	<h2>Subscription information</h2>
+	<p><label class="label100">Librarian identity:</label> <!-- TMPL_VAR name="librarian" --></p><br />
+
+	<p><label class="label100">Supplier:</label> <!-- TMPL_VAR name="aqbooksellername" -->&nbsp;</p>
+
+	<p><label class="label100">Cost:</label> <!-- TMPL_VAR name="cost" -->&nbsp;</p>
+
+	<p><label class="label100">Budget:</label> <!-- TMPL_VAR name="bookfundid" -->&nbsp;</p>
+
+	<p><label class="label100">Biblio:</label> <i>(<!-- TMPL_VAR name="biblionumber" -->)</i> <!-- TMPL_VAR name="bibliotitle" --></p><br />
+	<p><label class="label100">Call Number:</label> <!-- TMPL_VAR name="callnumber" -->&nbsp;</p>
+
+	<p><label class="label100">Notes:</label> <!-- TMPL_VAR name="notes" --></p>
+</div>
+
+<div class="bloc25">
+	<form name="f">
+	<h2>Planning</h2>
+	<p><label class="label100">Beginning date:</label> <!-- TMPL_VAR name="publisheddate" -->
+	</p>
+	<p><label class="label100">Frequency (*):</label>
+		<!--TMPL_IF name="periodicity1" -->
+				1/day
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity2" -->
+				1/week
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity3" -->
+				1/2 weeks
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity4" -->
+				1/3 weeks
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity5" -->
+				1/Month
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity6" -->
+				1/2 Months (6/year)
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity7" -->
+				1/quarter
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity8" -->
+				1/quarter
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity9" -->
+				2/year
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity10" -->
+				1/year
+		<!-- /TMPL_IF -->
+		<!--TMPL_IF name="periodicity11" -->
+				1/2 years
+		<!-- /TMPL_IF -->
+	</p>
+	<p><label class="label100">Number Pattern:</label>
+		<!-- TMPL_IF name="numberpattern1" -->
+			Number
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern2" -->
+			Volume, Number, Issue
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern3" -->
+			Volume, Number
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern4" -->
+			Volume, Issue
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern5" -->
+			Number, Issue
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern6" -->
+			Seasonal only
+		<!-- /TMPL_IF -->
+		<!-- TMPL_IF name="numberpattern7" -->
+			None of the above
+		<!-- /TMPL_IF -->
+	</p>
+	<table cellpadding="0" cellspacing="0">
+	<tr><td>&nbsp;</td>
+	    <td align="right"><input type="text" name="xfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
+	<!--TMPL_IF NAME="lastvalue2"-->
+	    <td align="right"><input type="text" name="yfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
+	<!--/TMPL_IF-->
+	<!--TMPL_IF NAME="lastvalue3"-->
+	    <td align="right"><input type="text" name="zfield" style="border:0px solid #FFFFFF; text-align:center;"></td>
+	<!--/TMPL_IF-->
+	</tr>
+	<tr><td><p><label class="label100">Starting with:</label></p></td>
+	    <td align="center"><!--TMPL_VAR NAME="lastvalue1"--></td>
+	<!--TMPL_IF NAME="lastvalue2"-->
+	    <td align="center">&nbsp; 
+			<!--TMPL_VAR NAME="lastvalue2"-->
+	    </td>
+	<!--/TMPL_IF-->
+	<!--TMPL_IF NAME="lastvalue3"-->
+	    <td align="center">&nbsp; 
+			<!--TMPL_VAR NAME="lastvalue3"-->
+	    </td>
+	<!--/TMPL_IF-->
+	</tr>
+	<tr><td><p><label class="label100">Rollover:</label></p></td>
+	    <td align="center">&nbsp;</td>
+	<!--TMPL_IF NAME="whenmorethan2"-->
+	    <td align="center">&nbsp; 
+			<!--TMPL_VAR NAME="whenmorethan2"-->
+	    </td>
+	<!--/TMPL_IF-->
+	<!--TMPL_IF NAME="whenmorethan3"-->
+	    <td align="center">&nbsp; 
+			<!--TMPL_VAR NAME="whenmorethan3"-->
+	    </td>
+	<!--/TMPL_IF-->
+	</tr>
+	</table>
+	<!-- TMPL_IF NAME="irregularity" -->
+	<p><label class="label100">Irregularity:</label>
+		<div id="irreg"></div>
+	</p>
+	<!-- /TMPL_IF -->
+	<p><label class="label100">Begins on:</label>
+		<!--TMPL_VAR name="startdate" -->
+	</p>
+	</form>
+</div>
+<div class="bloc25">
+	<h2>Subscription length</h2>
+	<!-- TMPL_IF name="numberlength" --><p><label>Number of issues:</label> <!-- TMPL_VAR name="numberlength" --></p><!-- /TMPL_IF -->
+	<!-- TMPL_IF name="weeklength" --><p><label>Number of weeks:</label> <!-- TMPL_VAR name="weeklength" --></p><!-- /TMPL_IF -->
+	<!-- TMPL_IF name="monthlength" --><p><label class="label100">Number of months:</label> <!-- TMPL_VAR name="monthlength" --></p><!-- /TMPL_IF -->
+
+</div>
+<div class="bloc25">
+	<h2>Numbering calculation</h2>
+	<p><label class="label100">Numbering formula:</label> <!-- TMPL_VAR name="numberingmethod" --></p>
+</div>
+<div class="bloc25" id="basetable">
+	<table cellpadding="0" cellspacing="0" border="0" class="collapse">
+		<tr>
+			<th class="cell-header">&nbsp;</th>
+			<th class="cell-header">X</th>
+			<th class="cell-header">Y</th>
+			<th class="cell-header">Z</th>
+			</tr>
+			<tr>
+				<td class="cell">Add</td>
+				<td class="cell">
+					<!-- TMPL_VAR name="add1" -->
+				</td>
+				<td class="cell">
+					<!-- TMPL_VAR name="add2" -->
+				</td>
+				<td class="cell">
+					<!-- TMPL_VAR name="add3" -->
+				</td>
+			</tr>
+			<tr>
+				<td class="cell">once every</td>
+				<td class="cell"><!-- TMPL_VAR name="every1" --></td>
+				<td class="cell"><!-- TMPL_VAR name="every2" --></td>
+				<td class="cell"><!-- TMPL_VAR name="every3" --></td>
+			</tr>
+			<tr>
+				<td class="cell">When more than</td>
+				<td class="cell"><!-- TMPL_VAR name="whenmorethan1" --> <!-- TMPL_IF name="innerloop1" --><br/>
+					<i>(is <!-- TMPL_VAR name="innerloop1" -->)</i><!-- /TMPL_IF --></td>
+				<td class="cell"><!-- TMPL_VAR name="whenmorethan2" --> <!-- TMPL_IF name="innerloop2" --><br/>
+					<i>(is <!-- TMPL_VAR name="innerloop2" -->)</i><!-- /TMPL_IF --></td>
+				<td class="cell"><!-- TMPL_VAR name="whenmorethan3" --> <!-- TMPL_IF name="innerloop3" --><br/>
+					<i>(is <!-- TMPL_VAR name="innerloop3" -->)</i><!-- /TMPL_IF --></td>
+			</tr>
+			<tr>
+				<td class="cell">Set back to</td>
+				<td class="cell"><!-- TMPL_VAR name="setto1" --></td>
+				<td class="cell"><!-- TMPL_VAR name="setto2" --></td>
+				<td class="cell"><!-- TMPL_VAR name="setto3" --></td>
+			</tr>
+			<tr>
+				<td class="cell">
+						Last value
+				</td>
+				<td class="cell"><!-- TMPL_VAR name="lastvalue1" --></td>
+				<td class="cell"><!-- TMPL_VAR name="lastvalue2" --></td>
+				<td class="cell"><!-- TMPL_VAR name="lastvalue3" --></td>
+			</tr>
+		</table>
+</div>
+</td><td>
+<div class="bloc25">
+	<h2>Issues</h2>
+	<table cellpadding="0" cellspacing="0" border="0" class="collapse">
+	<tr>
+		<th class="cell-header">Issue number</th>
+		<th class="cell-header">Planned date</th>
+		<th class="cell-header">Status</th>
+	</tr>
+	<!-- TMPL_LOOP name="serialslist" -->
+		<tr>
+			<td class="cell">
+				<!-- TMPL_VAR name="serialseq" -->
+			</td>
+			<td class="cell">
+				<!-- TMPL_VAR name="planneddate" -->
+			</td>
+			<td class="cell">
+					<!--TMPL_IF name="status1" -->
+						Waited
+					<!-- /TMPL_IF -->
+					<!--TMPL_IF name="status2" -->
+						Arrived
+					<!-- /TMPL_IF -->
+					<!--TMPL_IF name="status3" -->
+						Late
+					<!-- /TMPL_IF -->
+					<!--TMPL_IF name="status4" -->
+						Missing
+					<!-- /TMPL_IF -->
+					<!--TMPL_IF name="status5" -->
+						Not Published
+					<!-- /TMPL_IF -->
+			</td>
+		</tr>
+	<!-- /TMPL_LOOP -->
+	</table>
+</div>
+</td></tr>
+</table>
+
+</div>
+<script type="text/javascript">
+function _(s) { return s } // dummy function for gettext
+function confirm_deletion() {
+	<!-- TMPL_IF name="totalissues" -->
+		var is_confirmed = confirm(_('You already made <!-- TMPL_VAR name="totalissues"--> receipts. Do you confirm deletion?'));
+	<!-- TMPL_ELSE -->
+		var is_confirmed = confirm(_('Are you sure you want to delete this subscription?'));
+	<!-- /TMPL_IF -->	
+	if (is_confirmed) {
+		window.location="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&biblionumber=<!-- TMPL_VAR name="biblionumber" -->&op=del";
+	}
+}
+window.onload = num_pattern();
+</script>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/serials/subscription-renew.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/subscription-renew.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/subscription-renew.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/subscription-renew.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,32 @@
+<!-- TMPL_INCLUDE NAME="popup-top.inc" -->
+<div id="main">
+
+<h1 class="serial">subscription renewal for <!-- TMPL_VAR name="bibliotitle" --></h1>
+
+<form name="f" action="/cgi-bin/koha/serials/subscription-renew.pl" method="post">
+	<div id="bloc25">
+		<input type="hidden" name="op" value="renew">
+		<input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->">
+		<p><label class="label100">start date</label><input type="text" name="startdate" value="<!-- TMPL_VAR name="startdate" -->"></p>
+		<p>Subscription length :</p>
+		<p><label class="label100">Number of num</label><input type="text" name="numberlength" value="<!-- TMPL_VAR name="numberlength" -->"></p>
+		<p><label class="label100">Number of weeks</label><input type="text" name="weeklength" value="<!-- TMPL_VAR name="weeklength" -->"></p>
+		<p><label class="label100">Number of months</label><input type="text" name="monthlength" value="<!-- TMPL_VAR name="monthlength" -->"></p>
+		<p>Note for the librarian that will manage your renewal request</p>
+		<ul><textarea name="note" rows="10" cols="60"></textarea></ul>
+		<input type="submit" value="Request a renewal" class="button serial">
+	</div>
+</form>
+</div>
+
+        <!-- TMPL_IF NAME="done" -->
+	<script type="text/javascript">
+	<!--
+	opener.document.location.reload();
+	self.close();
+	//-->
+	</script>
+	<!-- /TMPL_IF -->
+
+<!-- TMPL_INCLUDE NAME="popup-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/serials/viewalerts.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/serials/viewalerts.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/serials/viewalerts.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/serials/viewalerts.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,28 @@
+<!-- TMPL_INCLUDE NAME="serials-top.inc" -->
+
+<div id="main">
+		<h1 class="serial">Alert subscribers for <!-- TMPL_VAR name="bibliotitle" --></h1>
+		<a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial">subscription</a>
+		<div class="bloc25">
+		<!-- TMPL_IF name="alertloop" -->
+			<table>
+			<tr>
+				<th class="serial">Borrower name</th>
+				<th class="serial">&nbsp;</th>
+			</tr>
+
+			<!-- TMPL_LOOP NAME="alertloop" -->
+				<tr>
+					<td><!-- TMPL_VAR name="name" --></td>
+					<td><a href="/cgi-bin/koha/members/moremember.pl?bornum=<!-- TMPL_VAR name="borrowernumber">" class="button serial">View</a></td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+			</table>
+		<!-- TMPL_ELSE -->
+			Nobody
+		<!-- /TMPL_IF -->
+		</div>
+
+	
+</div>
+<!-- TMPL_INCLUDE NAME="serials-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/barcodes.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/barcodes.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/barcodes.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/barcodes.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,80 @@
+<!-- TMPL_INCLUDE NAME="doc-head-barcodes.inc" -->
+
+<!--   START OF ADD COUNTRY CODE PANEL  -->
+<div class="countryPanel" id="addCountryCode">
+ 	<form action="/cgi-bin/koha/barcodes/barcodes.pl" method="post" style="display:inline">
+		<input type="hidden" name="addCode" value="1" />
+<h4>Add a new Country Code</h4>
+<ul>
+	<li><label for="countryName">Country Name:</label> <input type="text" size="10" id="countryName" name="countryName" /></li>
+	<li><label for="countryCode">Country Code:</label> <input type="text" size="3" id="countryCode" name="countryCode" /></li>
+</ul>
+<input type="submit" name="submit" id="submit" value="Save Code"/>
+<input type="button" name="cancel" id="cancel" value="Cancel" onclick="document.getElementById('addCountryCode').style.display = 'none'" />
+	</form>
+</div>
+
+<!--   END OF ADD COUNTRY CODE PANEL  -->
+
+	<h1>Barcodes Generator</h1>
+	<h3>Generate barcodes from inventory codes</h3>
+	<ul>
+		<li>Select a range of inventary codes. You can choose a continuous range or individual inventory codes</li>
+		<li>Select the standard type to generate barcodes.</li>
+		<li>Define the page size for output the PDF.</li>
+		<li>Depending on page size, Koha will show you how the page is arranged
+		    for each barcode. You can define wich point to start printing the page.
+		</li>
+	</ul>
+	
+<!-- TMPL_IF NAME="ERROR" -->Can't find inventory codes in that range. Please try again.<!-- /TMPL_IF -->
+
+	<form id="formulario" method="POST" action="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->" name="form1" onsubmit="return checkFields(this);" target="_blank">
+		<label for="rangeType">Type of Interval: </label><!-- TMPL_VAR NAME="RANGE_TYPE" -->
+
+<div id="continuous" class="panel" style="display:inline">
+	<ul>
+		<li><label for="from">From:</label><input id="from" type="text" name="from" size="20" /></li>
+		<li><label for="to">To:</label><input id="to" type="text" name="to" size="20" /></li>
+	</ul>
+</div>
+
+					 
+ <div id="individuals" class="panel" style="display:none; background-color: #ffffff;">
+<label for="inventaryCode">Inventory Code: </label><input id="inventaryCode" type="text" name="inventaryCode" size="20" />
+<a href="#" onclick="addItem(); return false;">[+]</a>	
+<a href="#" onclick="removeItem(); return false;">[-]</a>
+<select id="inventaryList" size="5" style="width:150px">
+</select>
+<input type="hidden" id="individualCodes" name="individualCodes">																						
+</div>						
+
+<p>
+<label for="numbersystem">Country Code: </label><!-- TMPL_VAR NAME="NUMBER_SYSTEM" --><a href="#" onClick="addCountryCode(); return false;">[+]</a></p>
+
+<p>								<label for="pageType">Page Size</label><input type="text" id="pageType" name="pageType" readonly="readonly" disabled="disabled" value="<!-- TMPL_VAR NAME="PAGES" -->"  size="10" /><a href="/cgi-bin/koha/barcodes/printerConfig.pl">[Go to Printer Configuration]</a></p>
+								
+
+<p><label for="text_under_label">Text under label</label>
+					<input type="text" id="text_under_label" name="text_under_label" size="40" value="<!-- TMPL_VAR name="text_under_label -->" /> If this field is empty, author and title will be used instead</p>
+
+			    	<table>
+						<tr>
+							<th colspan="<!-- TMPL_VAR NAME="COL_SPAN" -->">Label number to start printing</th>
+						</tr>
+						<!-- TMPL_LOOP NAME="LABEL_TABLE" -->
+							<tr>
+								<!-- TMPL_LOOP NAME="columns" -->
+									<td>
+										<input type="radio" id="label" value="<!-- TMPL_VAR NAME="tagname" -->" name="label" <!-- TMPL_VAR NAME="check" -->>  Label  <!-- TMPL_VAR NAME="labelname" --></td>
+								<!-- /TMPL_LOOP -->
+							</tr>
+						<!-- /TMPL_LOOP -->  			    
+					</table>
+
+<input type="submit" value="Generate Barcodes" name="B1">
+<input type="reset" value="Clear Fields" name="B2">
+</form>
+
+<!-- TMPL_INCLUDE name="intranet-bottom.inc" -->
+

Index: koha-tmpl/intranet-tmpl/default/en/tools/export.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/export.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/export.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/export.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,16 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Cataloging: MARC Export<!-- TMPL_INCLUDE NAME="doc-head-close-addbiblio.inc" -->
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
+<h1>MARC Export</h1>
+<div class="details"><h4>Export in MARC format the following biblios (bibliographic records only):</h4>
+<form method="post">
+<p>From biblio number: <input type="text" name="start_bib" />
+to biblio number: <input type="text" name="end_bib" /></p>
+<p>(leave blank to export every biblio)</p>
+<input type="hidden" name="op" value="export" />
+<input type="submit" value="Export" class="submit" />
+</form></div>
+<p>Note : Exporting all by this tool may take some time</p>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/holidays.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/holidays.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/holidays.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/holidays.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,347 @@
+<!-- TMPL_INCLUDE NAME="holidays-top.inc" -->Holiday Management<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav-brief.inc" -->
+
+
+<div id="main">
+	<div id="bloctitle">Calendars</div>
+	<table bgcolor="#ffcc00" width="80%" cellpadding="3">
+		<tr valign="center">
+			<td><font size="4">Define the holidays</font></td>
+		</tr>
+	</table>
+	<ul>
+		<li>Search in the calendar the day you want to set as holiday.</li>
+		<li>Complete the information in the right area.</li>
+		<li>Once you finish the steps above, click Save.</li>
+	</ul>
+
+<!-- *************************************** FLAT PANELS **************************************************** -->
+<!-- *****                      Makes all the flat panel to deal with holidays                          ***** -->
+<!-- ******************************************************************************************************** -->
+
+<!-- *************************** Panel for showing already loaded holidays ********************************** -->
+<div class="panel" style="position:absolute" id="showHoliday">
+ 	<form action="/cgi-bin/koha/tools/exceptionHolidays.pl" method="post" style="display:inline">
+			<table style="background-color:#EFEFEF;border:1px" align="center">
+			<tr>
+				<th colspan="2">
+					<p onclick="javascript: hidePanel('showHoliday');hidePanel('information')" style="cursor:pointer">
+					   Hide Details
+					   <img src="<!-- TMPL_VAR NAME="themelang" -->/images/signClose.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+					</p>
+				</th>
+			</tr>
+			<tr>
+				<td>
+					Day name
+				</td>
+				<td>
+					Library
+				</td>
+			<tr>
+			</tr>
+				<td>
+					<input type="text" size="20" id="showDayname" name="showDayname" readonly
+						   style="background-color:#FFFFFF;color:Black"/>
+					
+				</td>
+				<td>
+					<input type="text" size="20" id="showBranchName" name="showBranchName" readonly style="background-color:#FFFFFF;color:Black"/>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<div style="display:inline">
+						Day&nbsp;<input type="text" size="4" id="showDay" name="showDay" readonly
+						       style="background-color:#FFFFFF;color:Black"/>Month&nbsp<input type="text" size="4" id="showMonth" name="showMonth" readonly
+						        style="background-color:#FFFFFF;color:Black"/> Year<input type="text" size="4" id="showYear" name="showYear" readonly
+						       style="background-color:#FFFFFF;color:Black"/>
+						Day of the week<input type="text" size="4" id="showWeekday" name="showWeekday" readonly
+						       style="background-color:#FFFFFF;color:Black"/>		
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<div style="display:inline">				
+						Day title
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+				    Add a description to holiday day.
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2" align="center">
+					<textarea rows="4" cols="40" id="showDescription" name="showDescription"></textarea>	
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2" align="left">
+					<div id="exceptionPosibility" style="position:static;display:none">
+						<input type="radio" name="showOperation" value="exception"> Generate an exception to this holiday
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0"   style="vertical-align:middle;cursor:pointer"
+						     onclick="javascript: additionalInformation('You can make an exception for this holiday rule. This means that you will be able to say for a repeatable holiday, that there is one of those days that is going to be an exception.')">
+						<br>
+					</div>
+					<input type="radio" name="showOperation" value="delete" checked> Delete this holiday.
+					<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
+						     onclick="javascript: additionalInformation('This will delete this holiday rule. In case it is a repeatable holiday, this option checks for posible exceptions. In case those exists, this option take care of set this exceptions to regular holidays.')">
+				</td>
+			</tr>
+			<tr>
+				<td align="right">
+					<input type="submit" name="submit" id="submit" value="Save">
+				</td>
+				<td align="left">
+					<input type="button" name="cancel2" id="cancel2" value="Cancel" onclick="javascript: hidePanel('showHoliday');hidePanel('information')">
+				</td>
+			</tr>
+		</table>
+	</form>
+</div>
+
+<!-- ********************************** Panel to deal with new holidays **********************************  -->
+<div class="panel" style="position:absolute" id="newHoliday">
+ 	<form action="/cgi-bin/koha/tools/newHolidays.pl" method="post" style="display:inline">
+		<table style="background-color:#EFEFEF" align="center">
+			<tr>
+				<th colspan="2">
+					<p onclick="javascript: hidePanel('newHoliday');hidePanel('information')"
+					   style="cursor:pointer">
+					   Add new holiday - Hide details
+					   <img src="<!-- TMPL_VAR NAME="themelang" -->/images/signClose.gif" hspace="0" vspace="0" border="0"     
+				        style="vertical-align:middle">
+					</p>
+				</th>
+			</tr
+			><tr>
+				<td>
+					Day name
+				</td>
+				<td>
+					Library
+				</td>
+			<tr>
+			</tr>
+				<td>
+					<input type="text" size="20" id="newDayname" name="newDayname" readonly
+						   style="background-color:#FFFFFF;color:Black"/>
+					<input type="text" size="20" id="newWeekday" name="newWeekday" readonly
+						   style="background-color:#FFFFFF;color:Black"/>
+					
+				</td>
+				<td>
+					<input type="text" size="20" id="newBranchName" name="newBranchName" readonly
+						   style="background-color:#FFFFFF;color:Black"/>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<div style="display:inline">
+						Day&nbsp<input type="text" size="4" id="newDay" name="newDay" readonly style="background-color:#FFFFFF;color:Black"/>Month&nbsp<input type="text" size="4" id="newMonth" name="newMonth"  readonly style="background-color:#FFFFFF;color:Black"/> Year&nbsp<input type="text" size="4" id="newYear" name="newYear" readonly style="background-color:#FFFFFF;color:Black"/>
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					<div style="display:inline">				
+						Title day
+					</div>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2">
+					Add a description to holiday day.
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2" align="center">
+					<textarea rows="4" cols="40" id="newDescription" name="newDescription"></textarea>	
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2" align="left">
+					<input type="radio" name="newOperation" value="holiday" checked> Holiday only on this day.
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
+						     onclick="javascript: additionalInformation('This will take this date to make it holiday just for this time. Through this option, you can set a single holiday. For example, suppose you are in August 1st, and only for this year you want to make it holiday.')">
+					<br>
+					<input type="radio" name="newOperation" value="weekday"> Holiday repeated every same day of the week
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
+						     onclick="javascript: additionalInformation('This will take this week day and make it holiday. No matter what date it is, this option will repeat this rule for every week. For example, if this date correspond to a saturday, every saturdays will be holidays.')">
+					<br>
+					<input type="radio" name="newOperation" value="repeatable">Holiday repeated yearly on the same date.
+						<img src="<!-- TMPL_VAR NAME="themelang" -->/images/more.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle;cursor:pointer"
+						     onclick="javascript: additionalInformation('This will take this day and month as a reference to make it holiday. Through this option, you can repeat this rule for every year. For example, if this date correspond to a August 1st, every August 1st will be holiday, no matter what year you are.')">
+				</td>
+			</tr>
+			<tr>
+				<td align="right">
+					<input type="submit" name="submit" id="submit" value="Save"/>
+				</td>
+				<td align="left">
+					<input type="button" name="cancel2" id="cancel2" value="Cancel" onclick="javascript: hidePanel('newHoliday');hidePanel('information')">
+				</td>
+			</tr>
+		</table>
+ 	</form>
+</div>
+
+
+<!-- ******************************************************************************************************** -->
+<!-- ******                                END OF FLAT PANELS                                          ****** -->
+<!-- ******************************************************************************************************** -->
+
+
+
+<!-- ******************************************************************************************************** -->
+<!-- ******                             START OF INFORMATION PANEL                                     ****** -->
+<!-- ******************************************************************************************************** -->
+
+<div class="information" style="position:absolute" id="information" onclick="javascript: hidePanel('information')" onblur="javascript: hidePanel('information')">
+	<table>
+		<tr>
+			<td valign="top">
+				<img src="<!-- TMPL_VAR NAME="themelang" -->/images/info.gif" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+			</td>
+			<td valign="top">
+				<p id="explanation" style="display:inline;align:justify"></p>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<!-- ******************************************************************************************************** -->
+<!-- ******                              END OF INFORMATION PANEL                                      ****** -->
+<!-- ******************************************************************************************************** -->
+
+<h1>Define the holidays for branch <!-- TMPL_VAR name="BRANCHES" --></h1>
+
+
+
+<!-- ******************************************************************************************************** -->
+<!-- ******                                 MAIN SCREEN CODE                                           ****** -->
+<!-- ******************************************************************************************************** -->
+			
+			<center>
+				<fieldset align="center" style="width:50%">
+					<legend></legend>
+						<table style="width:50%;border:0px" align="left">
+							<tr>
+								
+							</tr>
+						</table>	
+				</fieldset>	
+			</center>
+
+			<br>
+			<br>
+			<table align="center" style="width:50%">
+				<tr>
+					<th colspan="2">Calendar information<th>
+				</tr>
+				<tr valign="top" align="center">
+					<td align="center" valign="top" style="padding:2%">
+						<div id="calendar-container" align="center"></div>
+						<script type="text/javascript">
+							/* Creates all the structures to deal with all diferents kinds of holidays */
+							var week_days = new Array();
+							var holidays = new Array();
+							var exception_holidays = new Array();
+							var day_month_holidays = new Array();
+							var hola= "<!-- TMPL_VAR NAME="code" -->";
+							<!-- TMPL_LOOP NAME="WEEK_DAYS_LOOP" -->
+							week_days["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+							<!-- /TMPL_LOOP -->
+							<!-- TMPL_LOOP NAME="HOLIDAYS_LOOP" -->
+							holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+							<!-- /TMPL_LOOP -->
+							<!-- TMPL_LOOP NAME="EXCEPTION_HOLIDAYS_LOOP" -->
+							exception_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+							<!-- /TMPL_LOOP -->
+							<!-- TMPL_LOOP NAME="DAY_MONTH_HOLIDAYS_LOOP" -->
+							day_month_holidays["<!-- TMPL_VAR NAME="KEY" -->"] = {title:"<!-- TMPL_VAR NAME="TITLE" -->", description:"<!-- TMPL_VAR NAME="DESCRIPTION" -->"};
+							<!-- /TMPL_LOOP -->
+
+							/* This function gives css clases to each kind of day */
+							function dateStatusHandler(date) {
+								var day = date.getDate();
+								var month = date.getMonth() + 1;
+								var year = date.getFullYear();
+								var weekDay = date.getDay();
+								var dayMonth = month + '/' + day;
+								var dateString = year + '/' + month + '/' + day;
+								if (exception_holidays[dateString] != null) {
+									return 'exception';
+								} else if ((week_days[weekDay] != null) || (day_month_holidays[dayMonth] != null)) {
+									return 'repeatableday';
+								} else if (holidays[dateString] != null) {
+									return 'holiday';
+								} else {
+									return 'normalday';
+								}
+							}
+	
+							/* This function is in charge of showing the correct panel considering the kind of holiday */
+							function dateChanged(calendar) {
+								var day = calendar.date.getDate();
+								var month = calendar.date.getMonth() + 1;
+								var year = calendar.date.getFullYear();
+								var weekDay = calendar.date.getDay();
+								var dayName = calendar.date.print('%A');
+								var dayMonth = month + '/' + day;
+								var dateString = year + '/' + month + '/' + day;
+								if (calendar.dateClicked) {
+									if (holidays[dateString] != null) {
+										showHoliday(0, dayName, day, month, year, weekDay, holidays[dateString].title, 	holidays[dateString].description);
+									} else if (exception_holidays[dateString] != null) {
+										showHoliday(0, dayName, day, month, year, weekDay, exception_holidays[dateString].title, exception_holidays[dateString].description);
+									} else if (week_days[weekDay] != null) {
+										showHoliday(1, dayName, day, month, year, weekDay, week_days[weekDay].title, 	week_days[weekDay].description);
+									} else if (day_month_holidays[dayMonth] != null) {
+										showHoliday(1, dayName, day, month, year, weekDay, day_month_holidays[dayMonth].title, day_month_holidays[dayMonth].description);
+									} else {
+										newHoliday(dayName, day, month, year, weekDay);
+									}
+								}
+							};
+							Calendar.setup(
+								{
+									flat : "calendar-container",
+									flatCallback : dateChanged,
+									dateStatusFunc : dateStatusHandler
+								}
+							);
+						</script>						
+					</td>
+					<td align="left" style="padding:2%">
+						<fieldset>
+							<legend>Legend</legend>
+							<div style="display:inline">
+								<img src="<!-- TMPL_VAR NAME="themelang" -->/images/regularDay.jpg" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+								Working day
+							</div>
+							<br>
+							<div style="display:inline">
+								<img src="<!-- TMPL_VAR NAME="themelang" -->/images/regularHoliday.jpg" hspace="0" vspace="0" 	border="0" style="vertical-align:middle">
+								Holiday
+							</div>
+							<br>
+							<div style="display:inline">
+								<img src="<!-- TMPL_VAR NAME="themelang" -->/images/repeatable.jpg" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+								Repetible holiday
+							</div>
+							<br>
+							<div style="display:inline">
+								<img src="<!-- TMPL_VAR NAME="themelang" -->/images/exception.jpg" hspace="0" vspace="0" border="0" style="vertical-align:middle">
+								Exception
+							</div>
+						</fieldset>
+					</td>
+				</tr>
+		</table>
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/import.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/import.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/import.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/import.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,58 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- Cataloging: MARC Import<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="acqui-topmenu.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+
+<div id="main">
+
+<h1>MARC acquisition system</h1>
+<h4>Import into the reservoir</h4>
+
+<!-- TMPL_IF name="uploadmarc" -->
+<p>Import results :</p>
+<ul>
+	<li><!-- TMPL_VAR name="imported" --> imported records</li>
+	<li><!-- TMPL_VAR name="alreadyindb" --> not imported because already in catalog</li>
+	<li><!-- TMPL_VAR name="alreadyinfarm" --> not imported because already in the reservoir</li>
+	<li><!-- TMPL_VAR name="notmarcrecord" --> not imported because they seem not to be in MARC format (or ISBN/ISSN missing) !</li>
+	<li><!-- TMPL_VAR name="total" -->  records parsed</li>
+	<li><a href="/cgi-bin/koha/admin-home.pl">Back</a></li>
+</ul>
+<!-- TMPL_ELSE -->
+<ul>
+	<li>Select a file to import into the reservoir. It will be parsed, and for each ISBN found, a new baby will be created in the reservoir.</li>
+	<li>If an ISBN already exists in the reservoir, you can choose whether to ignore the new one or overwrite the old one.</li>
+	<li>You can enter a name for this import. It may be useful, when creating a biblio, to remember where the suggested MARC data comes from!</li>
+	<li>Of course, if the ISBN already exists in the active DB, the biblio will be ignored.</li>
+</ul>
+<form method="post" action="<!-- TMPL_VAR name="SCRIPT_NAME" -->" enctype="multipart/form-data">
+<table>
+	<tr>
+		<th scope="row"><label for="uploadmarc">Select the file to import: </label></th>
+		<td>
+			<input type="file" id="uploadmarc" name="uploadmarc" /><br />
+		</td>
+	</tr>
+	<tr>
+		<th scope="row"><label for="filename">Name of this import: </label></th>
+		<td>
+			<input type="text" id="filename" name="filename" />
+		</td>
+	</tr>
+	<tr>
+		<th scope="row"><label for="syntax">Character encoding: </label></th>
+		<td>
+			<select name="syntax" id="syntax"><option value="MARC21">MARC21</option><option value="UNIMARC">UNIMARC</option></select>
+		</td>
+	</tr>
+	<tr>
+		<th scope="row" rowspan="2">If ISBN is already in the reservoir: </th>
+		<td><input type="radio" name="overwrite_biblio" value="0" checked="checked" />Ignore this one, keep the existing one</td></tr>
+<tr><td>
+			<input type="radio" name="overwrite_biblio" value="1" />Overwrite the existing one with this</td>
+	</tr>
+</table><input type="submit" value="Import" />
+</form>
+<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/koha-news.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/koha-news.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/koha-news.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/koha-news.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,104 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="masthead.inc" -->
+<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->
+<div id="main">
+	<h1> OPAC & KOHA News</h1>
+	<!-- TMPL_IF name="add_form" -->
+
+		<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
+			<input type="hidden" name="op" value="<!-- TMPL_VAR NAME="op" -->">
+			<input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->">
+			<table style="border:0" cellspacing="0" cellpadding="2">
+			    <tr>
+			        <td>Language</td>
+			        </td>
+			        <td>
+						<select name="lang">
+				<option value="">All news</option>
+				<option value="koha">Librarian interface</option>
+				<!-- TMPL_LOOP name="lang_list" -->
+					
+						<option value="<!-- TMPL_VAR name="language" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="language" -->	</option>
+				<!-- /TMPL_LOOP -->
+			</select>
+					</td>
+			    </tr>
+				<tr>
+					<td>Title</td>
+					<td><input size="30" type="text" name="title" value="<!-- TMPL_VAR NAME="title" -->"></td>
+				</tr>
+				<tr>
+					<td>News</td>
+					<td><textarea name="new" cols="35" rows="4"><!-- TMPL_VAR NAME="new" --></textarea></td>
+				</tr>
+				<tr>
+					<td  colspan="2">
+						<input class="button" type="submit" value="Save">
+						<input class="button" type="button" value="Cancel" onclick="window.location.href='/cgi-bin/koha/tools/koha-news.pl'">
+					</td>
+				</tr>
+			</table>
+		</form>
+
+
+	<!-- TMPL_ELSE -->
+
+		<!-- TMPL_IF NAME="opac_news_count" -->
+
+            <form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" >
+			Language:
+			
+			<select name="lang">
+				<option value="">All news</option>
+				<option value="koha">Librarian interface</option>
+				<!-- TMPL_LOOP name="lang_list" -->
+					
+						<option value="<!-- TMPL_VAR name="language" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="language" -->	</option>
+				<!-- /TMPL_LOOP -->
+			</select>
+		
+			<input type="submit" class="button" value="Filter">
+			</form>
+
+			<form name="del_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl" onsubmit="return confirm('¿Are you sure you want to delete the selected news?')">
+				<table border="0" cellspacing="0" cellpadding="3">
+					<tr bgcolor="#99cc33">
+						<th></td>
+						<th style="padding-left:3px;padding-right:3px">Language</th>
+						<th>Date</th>
+						<th  width="20%">Title</th>
+						<th>News</th>
+						<th></th>
+					</tr>
+
+					<!-- TMPL_LOOP NAME="opac_news" -->
+						<tr>
+							<td width="5%"><input type="checkbox" name="ids" value="<!-- TMPL_VAR NAME="idnew" -->"</td>
+							<td align="center"><!-- TMPL_VAR NAME="lang" --></td>
+							<td><!-- TMPL_VAR NAME="newdate" --></td>
+							<td align="center"><!-- TMPL_VAR NAME="title" --></td>
+							<td><!-- TMPL_VAR NAME="new" --></td>
+							<td width="5%">
+								<a href="/cgi-bin/koha/tools/koha-news.pl?op=add_form&id=<!-- TMPL_VAR NAME="idnew" -->">Edit</a>
+							</td>
+						</tr>
+					<!-- /TMPL_LOOP -->
+
+				</table>
+					<input type="hidden" name="op" value="del">
+					<input type="submit" class="button" value="Delete selected">
+			</form>
+		<!-- TMPL_ELSE -->
+			<h5>No news loaded</h5>
+		<!-- /TMPL_IF -->
+
+		<form name="add_form" method="post" action="/cgi-bin/koha/tools/koha-news.pl">
+			<input type="hidden" name="op" value="add_form">
+			<input type="submit" class="button" value="Add  news">
+		</form>
+	
+	
+	<!-- /TMPL_IF -->
+
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/letter.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/letter.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/letter.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/letter.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,290 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
+	Letters admin
+<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
+
+	<!-- TMPL_IF NAME="else" -->
+		<form action="/cgi-bin/koha/tools/letter.pl" method="post">
+		<input type="text" name="searchfield" value="">
+		<input type="submit" class="button" value="Filter"></form>
+		<!-- TMPL_IF NAME="search" -->
+		<br>You Searched for <b><!-- TMPL_VAR NAME="searchfield" --></b><p><br>
+		<!-- /TMPL_IF -->
+		<table>
+		<tr>
+			<th>Module</th>
+			<th>Code</th>
+			<th>Name</th>
+			<th>&nbsp;</th>
+			<th>&nbsp;</th>
+		</tr>
+		<!-- TMPL_LOOP NAME="letter" -->
+			<tr bgcolor=<!-- TMPL_VAR NAME="toggle" --> >
+				<td><!-- TMPL_VAR NAME="module" --></td>
+				<td><!-- TMPL_VAR NAME="code" --></td>
+				<td><!-- TMPL_VAR NAME="name" --></td>
+				<td>
+					<a href="/cgi-bin/koha/tools/letter.pl?op=add_form&amp;module=<!-- TMPL_VAR name="module" -->&amp;code=<!-- TMPL_VAR NAME="code" -->">
+						<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/fileopen.png"  width="32" hspace="0" vspace="0" border="0">
+					</a>
+				</td>
+				<td>
+					<a href="/cgi-bin/koha/tools/letter.pl?op=delete_confirm&amp;module=<!-- TMPL_VAR name="module"-->&amp;code=<!-- TMPL_VAR NAME="code" -->">
+						<img src="<!-- TMPL_VAR NAME="interface" -->/<!-- TMPL_VAR NAME="theme" -->/images/edittrash.png" width="32" hspace="0" vspace="0" border="0">
+					</a>
+				</td>
+			</tr>
+		<!-- /TMPL_LOOP -->
+		</table>
+		<form action="/cgi-bin/koha/tools/letter.pl" method="post">
+			<input type="hidden" name="op" value="add_form">
+			<br>
+			<input type="submit" class="button" value="Add Letter" title="Add Letter" alt="Add Letter">
+			<br>
+		</form>
+		<br clear="all">
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="add_form" -->
+	<script language="javascript" type="text/javascript">
+		function _(s) { return s } // dummy function for gettext
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function isNotNull(f,noalert) {
+			if (f.value.length ==0) {
+	return false;
+			}
+			return true;
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function toUC(f) {
+			var x=f.value.toUpperCase();
+			f.value=x;
+			return true;
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function isNum(v,maybenull) {
+		var n = new Number(v.value);
+		if (isNaN(n)) {
+			return false;
+			}
+		if (maybenull==0 && v.value=='') {
+			return false;
+		}
+		return true;
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function isDate(f) {
+			var t = Date.parse(f.value);
+			if (isNaN(t)) {
+				return false;
+			}
+		}
+		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+		function Check(f) {
+			var ok=1;
+			var _alertString="";
+			var alertString2;
+/*			if (!(isNotNull(window.document.Aform.code))) {
+				_alertString += "\n- " + _("Code missing");
+			}*/
+/*			if (!(isNotNull(window.document.Aform.name))) {
+				_alertString += "\n- " + _("Name missing");
+			}*/
+			if (_alertString.length==0) {
+				document.Aform.submit();
+			} else {
+				alertString2  = _("Form not submitted because of the following problem(s)");
+				alertString2 += "\n------------------------------------------------------------------------------------\n";
+				alertString2 += _alertString;
+				alert(alertString2);
+			}
+		}
+		// GPL code coming from PhpMyAdmin
+		function insertValueQuery() {
+			var myQuery = document.Aform.content;
+			var myListBox = document.Aform.SQLfieldname;
+		
+			if(myListBox.options.length > 0) {
+				var chaineAj = "";
+				var NbSelect = 0;
+				for(var i=0; i<myListBox.options.length; i++) {
+					if (myListBox.options[i].selected){
+						NbSelect++;
+						if (NbSelect > 1)
+							chaineAj += ", ";
+						chaineAj += myListBox.options[i].value;
+					}
+				}
+		
+				//IE support
+				if (document.selection) {
+					myQuery.focus();
+					sel = document.selection.createRange();
+					sel.text = chaineAj;
+					document.Aform.insert.focus();
+				}
+				//MOZILLA/NETSCAPE support
+				else if (document.Aform.content.selectionStart || document.Aform.content.selectionStart == "0") {
+					var startPos = document.Aform.content.selectionStart;
+					var endPos = document.Aform.content.selectionEnd;
+					var chaineSql = document.Aform.content.value;
+					myQuery.value = chaineSql.substring(0, startPos) +'<<'+ chaineAj+'>>' + chaineSql.substring(endPos, chaineSql.length);
+				} else {
+					myQuery.value += chaineAj;
+				}
+			}
+		}
+		
+		</script>
+	<div id="bloc25">
+		<!-- TMPL_IF name="modify" -->
+			<h2 class="parameters">Modify letter</h2>
+		<!-- TMPL_ELSE -->
+			<h2 class="parameters">Add letter</h2>
+		<!-- /TMPL_IF -->
+		<form action="/cgi-bin/koha/tools/letter.pl" name="Aform" method="post">
+		<input type="hidden" name="op" value="add_validate">
+		<input type="hidden" name="checked" value="0">
+		<!-- TMPL_IF NAME="modify" -->
+			<p>
+				<label class="label100">Koha module:</label>
+				<select name="module">
+					<!-- TMPL_IF name="acquisition" -->
+						<option value="acquisition" selected>Acquisition</option>
+					<!-- TMPL_ELSE -->
+						<option value="acquisition">Acquisition</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="catalogue" -->
+						<option value="catalogue" selected>Catalogue</option>
+					<!-- TMPL_ELSE -->
+						<option value="catalogue">Catalogue</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="serial" -->
+						<option value="serial" selected>Serial</option>
+					<!-- TMPL_ELSE -->
+						<option value="serial">Serial</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="circulation" -->
+						<option value="circulation" selected>Circulation</option>
+					<!-- TMPL_ELSE -->
+						<option value="circulation">Circulation</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="members" -->
+						<option value="members" selected>Members</option>
+					<!-- TMPL_ELSE -->
+						<option value="members">Members</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="authorities" -->
+						<option value="authorities" selected>Authorities</option>
+					<!-- TMPL_ELSE -->
+						<option value="authorities">Authorities</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="reports" -->
+						<option value="reports" selected>Reports</option>
+					<!-- TMPL_ELSE -->
+						<option value="reports">Reports</option>
+					<!-- /TMPL_IF -->
+					<!-- TMPL_IF name="parameters" -->
+						<option value="parameters" selected>Parameters</option>
+					<!-- TMPL_ELSE -->
+						<option value="parameters">Parameters</option>
+					<!-- /TMPL_IF -->
+				</select>
+			</p>
+			<p>
+				<label class="label100">Code:</label><input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="code" -->
+			</p>
+		<!-- /TMPL_IF -->
+		
+		<!-- TMPL_IF NAME="adding" -->
+			<p>
+				<label class="label100">Koha module:</label>
+				<select name="module">
+						<option value="acquisition">Acquisition</option>
+						<option value="catalogue">Catalogue</option>
+						<option value="serial">Serial</option>
+						<option value="circulation">Circulation</option>
+						<option value="members">Members</option>
+						<option value="authorities">Authorities</option>
+						<option value="reports">Reports</option>
+						<option value="parameters">Parameters</option>
+				</select>
+			</p>
+			<p>
+				<label class="label100">Code:</label><input type="text" name="code" size="20" maxlength="20">
+			</p>
+		<!-- /TMPL_IF -->
+		
+		<p>
+			<label class="label100">Name:</label><input type="text" name="name" size="100" value="<!-- TMPL_VAR NAME="name" -->">
+		</p>
+		<p>
+			<label class="label100">Title (mail subject):</label><input type="text" name="title" size="100" value="<!-- TMPL_VAR NAME="title" -->">
+		</p>
+		<p>
+			<label class="label100">Content (mail content):</label>
+		</p>
+		<p><textarea name="content" cols="80" rows="10"><!-- TMPL_VAR NAME="content" --></textarea>
+		<input type="button" name="insert" value="&lt;&lt;" onclick="insertValueQuery()" title="Insert" />
+		<select name="SQLfieldname" size=10>
+			<!-- TMPL_LOOP name="SQLfieldname" -->
+				<option value="<!-- TMPL_VAR name="value"-->"><!-- TMPL_VAR name="text"--></option>
+			<!-- /TMPL_LOOP -->
+		</select>
+		</p>
+		<p><input type="button" value="OK" onclick="Check(this.form)" class="button"></p>
+		</form>
+	</div>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="add_validate" -->
+	Data recorded
+	<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
+	<input type="submit" value="OK">
+	</form>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="delete_confirm" -->
+	<table border="0" cellspacing="0" cellpadding="5">
+		<tr valign="top" bgcolor="#99cc33">
+			<td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
+				<b>module / Code</b>
+			</td>
+			<td background="<!-- TMPL_VAR NAME="themelang" -->/images/background-mem.gif">
+				<b><!-- TMPL_VAR name="module"--> / <!-- TMPL_VAR NAME="code" --></b>
+			</td>
+		</tr>
+	
+		<form action="<!-- TMPL_VAR NAME="action" -->" method="post"><input type="hidden" name="op" value="delete_confirmed">
+		<input type="hidden" name="code" value="<!-- TMPL_VAR NAME="code" -->">
+		<input type="hidden" name="module" value="<!-- TMPL_VAR NAME="module" -->">
+		<tr>
+			<td>Name</td>
+			<td><!-- TMPL_VAR NAME="Name" --></td>
+		</tr>
+		<tr>
+			<td colspan="2" align="center">CONFIRM DELETION</td>
+		</tr>
+		<tr>
+			<td>
+				<input type="submit" value="YES">
+				</form>
+			</td>
+			<td>
+				<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
+					<input type="submit" value="NO">
+				</form>
+			</td>
+		</tr>
+	</table>
+	<!-- /TMPL_IF -->
+	
+	<!-- TMPL_IF NAME="delete_confirmed" -->
+	Data deleted
+	<form action="<!-- TMPL_VAR NAME="action" -->" method="post">
+	<input type="submit" value="OK">
+	</form>
+	<!-- /TMPL_IF -->
+</div>
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
\ No newline at end of file

Index: koha-tmpl/intranet-tmpl/default/en/tools/overduerules.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/overduerules.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/overduerules.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/overduerules.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,107 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration: Overdue Rules<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-admin.inc" -->
+
+	<h1>Defining <!-- TMPL_IF NAME="branch" -->overdue rules for <!-- TMPL_VAR NAME="branch" --><!-- TMPL_ELSE -->default overdue rules<!-- /TMPL_IF --></h1>
+	<div class="help">
+		<p>Overdue will be taken into account provided that you input delays as numbers only.</p>
+		<p>Delay is a number of days for the older issue to be taken into account before doing an action (Sending a letter)</p>
+		<p>If you want Koha to do an action (send a letter or debar member), delay is needed.</p>
+		<p>Column 1 is supposed to be filled in first, then Second one then Third one.</p>
+	</div>
+		<form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
+		<label for="branch">Select a branch :</label>
+			<select id="branch" name="branch">
+				<option value="">Default</option>
+			<!-- TMPL_LOOP NAME="branchloop" -->
+				<option value="<!-- TMPL_VAR NAME="value" -->"<!-- TMPL_IF NAME="selected" --> selected="selected"<!-- /TMPL_IF -->><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_LOOP --></select>
+			<input type="submit" value="Select" />
+		</form>
+		<!--TMPL_IF Name="ERROR"-->
+		<h3>Data error</h3>
+			<p>The following fields have a forbidden value. Correct them and press OK again :</p><ul>
+			<!-- TMPL_IF NAME="ERRORDELAY" -->
+				<li>Delay <!--TMPL_VAR Name="ERRORDELAY"--> for <!--TMPL_VAR Name="bor"--> borrower category have some unexpected characters. There should be only numerical characters. </li>
+			<!-- /TMPL_IF -->
+			<!-- TMPL_IF NAME="ERRORORDER" -->
+				<li>Delay1 should be less than Delay2 which should be less than Delay3 for <!--TMPL_VAR Name="bor"--> borrower category </li>
+			<!-- /TMPL_IF -->
+			</ul>
+		<!--/TMPL_IF -->
+		<form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
+			<input type="hidden" name="op" value="save" />
+			
+			<table>
+			<caption>Defining Overdue rules for <!--TMPL_IF Name="branch"--><!-- TMPL_VAR NAME="branch" --><!--TMPL_ELSE--> default branch <!--/TMPL_IF-->		<!--TMPL_IF Name="datasaved"-->
+		<br /><h3 align="center">INPUT SAVED</h3>
+		<!--/TMPL_IF -->
+			</caption>
+			<tr>
+				<th>&nbsp;</th><th colspan="3" scope="col">First</th><th colspan="3" scope="col">Second</th><th colspan="3" scope="col">Third</th>
+			</tr>
+			<tr>
+				<th>&nbsp;</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debarred</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debarred</th><th scope="col">Delay</th><th scope="col">Letter</th><th scope="col">Debarred</th>
+			</tr>
+			<!-- TMPL_LOOP NAME="table" -->
+				<tr>
+					<th><!-- TMPL_VAR NAME="line" --></th>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<input name="delay1-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay1" -->" />
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<!--TMPL_IF Name="noletter" --><input type="text" name="letter1-<!-- TMPL_VAR NAME="overduename" -->" value="<!--TMPL_VAR Name="letter1"-->"/>
+						<!--TMPL_ELSE -->
+							<select name="letter1-<!-- TMPL_VAR NAME="overduename" -->">
+								<option value="">Default</option>
+								<!-- TMPL_LOOP name="letterloop1" -->
+									<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
+								<!-- /TMPL_LOOP -->
+							</select>
+						<!--/TMPL_IF -->
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<input type="checkbox" name="debarred1-<!-- TMPL_VAR NAME="overduename" -->" <!-- TMPL_IF NAME="debarred1" -->checked<!-- /TMPL_IF --> value="1" />
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<input name="delay2-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay2" -->" />
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<!--TMPL_IF Name="noletter" --><input type="text" name="letter2-<!-- TMPL_VAR NAME="overduename" -->" value="<!--TMPL_VAR Name="letter2"-->"/>
+						<!--TMPL_ELSE -->
+							<select name="letter2-<!-- TMPL_VAR NAME="overduename" -->">
+								<option value="">Default</option>
+								<!-- TMPL_LOOP name="letterloop2" -->
+									<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
+								<!-- /TMPL_LOOP -->
+							</select>
+						<!--/TMPL_IF -->
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<input type="checkbox" name="debarred2-<!-- TMPL_VAR NAME="overduename" -->" <!-- TMPL_IF NAME="debarred2" -->checked<!-- /TMPL_IF --> value="1" />
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<input name="delay3-<!-- TMPL_VAR NAME="overduename" -->" size="5" value="<!-- TMPL_VAR NAME="delay3" -->" />
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<!--TMPL_IF Name="noletter" --><input type="text" name="letter3-<!-- TMPL_VAR NAME="overduename" -->" value="<!--TMPL_VAR Name="letter3"-->"/>
+						<!--TMPL_ELSE -->
+							<select name="letter3-<!-- TMPL_VAR NAME="overduename" -->">
+								<option value="">Default</option>
+								<!-- TMPL_LOOP name="letterloop3" -->
+									<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="lettername" --></option>
+								<!-- /TMPL_LOOP -->
+							</select>
+						<!--/TMPL_IF -->
+					</td>
+					<td<!-- TMPL_IF NAME="toggle" --> class="highlight"<!-- /TMPL_IF -->>
+						<input type="checkbox" name="debarred3-<!-- TMPL_VAR NAME="overduename" -->" <!-- TMPL_IF NAME="debarred3" -->checked<!-- /TMPL_IF --> value="1" />
+					</td>
+				</tr>
+			<!-- /TMPL_LOOP -->
+			</table>
+			
+			<input type="submit" value="Save Changes" />
+		</form>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/printerConfig.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/printerConfig.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/printerConfig.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/printerConfig.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,83 @@
+<!-- TMPL_INCLUDE NAME="doc-head-barcodes.inc" -->
+
+	<h1>Printer Configuration</h1>
+	<h3>Set printer configuration corresponding to your environment</h3>
+	<ul>
+		<li>Set width and height of the label that you are going to work with.</li>
+		<li>Set your system's default DPI.</li>
+		<li>Set the page type.</li>
+		<li>Select how many columns and rows are in your page type.</li>
+		<li>Set left- and bottom-margins of the page that you are going to use. This parameter will help to center the barcodes on the labels.</li>
+	</ul>
+	<br>
+	<form id="formulario" method="POST" action="<!-- TMPL_VAR NAME="SCRIPT_NAME" -->" name="form1">
+		<input type="hidden" name="saveSettings" value="1" />
+		<table>
+			<tr>
+				<th scope="row">
+					Label width (Expressed in mm)
+				</th><td> 
+					<input id="labelWidth" type="text" name="labelWidth" size="5"
+					       value="<!-- TMPL_VAR NAME="LABEL_WIDTH" -->">
+				</td></tr>
+				<th scope="row">
+					Label heigth (Expressed in mm)
+				</th><td> 
+					<input id="labelHeigth" type="text" name="labelHeigth" size="5"
+					       value="<!-- TMPL_VAR NAME="LABEL_HEIGTH" -->">
+				</td></tr>
+				<th scope="row">
+					System dpi
+				</th><td>
+					<input id="systemDpi" type="text" name="systemDpi" size="5"
+					       value="<!-- TMPL_VAR NAME="SYSTEM_DPI" -->">
+				</td></tr>
+				<th scope="row">
+					Page Type
+				</th>	<td>
+					<select name="pageType" id="pageType" size="1">
+						<!-- TMPL_IF name="A4" -->
+							<option value="A4" selected>A4</option>
+				        <!-- TMPL_ELSE -->
+							<option value="A4">A4</option>
+						<!-- /TMPL_IF -->
+						<!-- TMPL_IF name="Letter" -->
+							<option value="Letter" selected>Letter</option>
+				        <!-- TMPL_ELSE -->
+							<option value="Letter">Letter</option>
+						<!-- /TMPL_IF -->
+						<!-- TMPL_IF name="Legal" -->
+							<option value="Legal" selected>Legal</option>
+				        <!-- TMPL_ELSE -->
+							<option value="Legal">Legal</option>
+						<!-- /TMPL_IF -->
+		            </select>
+				</td></tr>
+				<th scope="row">
+					Columns
+				</th>  <td>
+					<input id="columns" type="text" name="columns" size="5"
+					       value="<!-- TMPL_VAR NAME="COLUMNS" -->">
+				</td></tr>
+				<th scope="row">
+					Rows
+				</th>   <td>
+					<input id="rows" type="text" name="rows" size="5"
+					       value="<!-- TMPL_VAR NAME="ROWS" -->">
+				</td></tr>
+				<th scope="row">
+					Margin Bottom (Expressed in mm)
+				</th>   <td>
+					<input id="marginBottom" type="text" name="marginBottom" size="5"
+					       value="<!-- TMPL_VAR NAME="MARGIN_TOP" -->">
+				</td></tr>
+				<th scope="row">
+					Margin Left (Expressed in mm)
+				</th>   <td>
+					<input id="marginLeft" type="text" name="marginLeft" size="5"
+					       value="<!-- TMPL_VAR NAME="MARGIN_LEFT" -->">
+				</td></tr>
+			</table><input type="submit" value="Save Settings" />
+	</form>
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: koha-tmpl/intranet-tmpl/default/en/tools/tools-home.tmpl
===================================================================
RCS file: koha-tmpl/intranet-tmpl/default/en/tools/tools-home.tmpl
diff -N koha-tmpl/intranet-tmpl/default/en/tools/tools-home.tmpl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ koha-tmpl/intranet-tmpl/default/en/tools/tools-home.tmpl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,48 @@
+<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- System Administration<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
+
+<!-- TMPL_INCLUDE NAME="menus.inc" -->
+<!-- TMPL_INCLUDE NAME="menu-tools.inc" -->
+
+<h1>Koha tools</h1>
+
+<table>
+<caption>Various tools</caption>
+	<tr>
+		<th><a href="/cgi-bin/koha/z3950/zebraqueue_windows_start.pl">ZEBRA queue starter--for Windows</a></th>
+		<td> Starts Zebra queue if stopped or system restarted. ZEBRA queue is required for the system to update ZEBRA</td>
+	</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/barcodes.pl">Barcode generator</a></th>
+	<td>Generate your barcodes</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/holidays.pl">Holidays</a></th>
+	<td>Define holidays (days where the library is closed)</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/export.pl">Export</a></th>
+	<td>Export datas</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/import.pl">Import</a></th>
+	<td>Import datas in the reservoir</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/koha-news.pl">News</a></th>
+	<td>A basic news system for OPAC & librarian interfaces</td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/letter.pl">Letters</a></th>
+	<td>Define letters </td>
+</tr>
+<tr>
+	<th><a href="/cgi-bin/koha/tools/overduerules.pl">overdue rules</a></th>
+	<td>Rules for overdue books</td>
+</tr>
+<th><a href="/cgi-bin/koha/barcodes/cbarcodes.pl">Membership cards</a></th>
+		<td>create membership cards from member cardnumbers
+		</td>
+</table>
+
+
+<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->

Index: reviews/reviewswaiting.pl
===================================================================
RCS file: reviews/reviewswaiting.pl
diff -N reviews/reviewswaiting.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ reviews/reviewswaiting.pl	26 Mar 2007 02:19:26 -0000	1.3.2.2
@@ -0,0 +1,37 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use HTML::Template;
+use C4::Review;
+
+my $query = new CGI;
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "reviews/reviewswaiting.tmpl",
+        query           => $query,
+        type            => "intranet",
+        authnotrequired => 0,
+        flagsrequired   => { catalogue => 1 },
+        debug           => 1,
+    }
+);
+
+my $op       = $query->param('op');
+my $reviewid = $query->param('reviewid');
+
+if ( $op eq 'approve' ) {
+    approvereview($reviewid);
+}
+elsif ( $op eq 'delete' ) {
+    deletereview($reviewid);
+}
+
+my $reviews = getallreviews(0);
+$template->param( reviews => $reviews );
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/acqui-search-result.pl
===================================================================
RCS file: serials/acqui-search-result.pl
diff -N serials/acqui-search-result.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/acqui-search-result.pl	26 Mar 2007 02:19:26 -0000	1.7.2.2
@@ -0,0 +1,102 @@
+#!/usr/bin/perl
+
+#script to show suppliers and orders
+#written by chris at katipo.co.nz 23/2/2000
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: acqui-search-result.pl,v 1.7.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+acqui-search-result.pl
+
+=head1 DESCRIPTION
+ TODO
+ 
+=head1 PARAMETERS
+
+=over 4
+
+=item supplier
+
+=back
+
+=cut
+
+
+use strict;
+use C4::Auth;
+use C4::Biblio;
+use CGI;
+use C4::Interface::CGI::Output;
+use C4::Acquisition;
+use C4::Date;
+use C4::Bookseller;
+use C4::Acquisition;
+
+my $query=new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "serials/acqui-search-result.tmpl",
+                 query => $query,
+                 type => "intranet",
+                 authnotrequired => 0,
+                 flagsrequired => {acquisition => 1},
+                 debug => 1,
+                 });
+
+my $supplier=$query->param('supplier');
+my @suppliers = GetBookSeller($supplier);
+my $count = scalar @suppliers;
+
+#build result page
+my $toggle=0;
+my @loop_suppliers;
+for (my $i=0; $i<$count; $i++) {
+    my $orders = GetPendingOrders($suppliers[$i]->{'id'});
+    my $ordcount = scalar @$orders;
+    
+    my %line;
+    if ($toggle==0){
+        $line{even}=1;
+        $toggle=1;
+    } else {
+        $line{even}=0;
+        $toggle=0;
+    }
+    $line{aqbooksellerid} =$suppliers[$i]->{'id'};
+    $line{name} = $suppliers[$i]->{'name'};
+    $line{active} = $suppliers[$i]->{'active'};
+    my @loop_basket;
+    for (my $i2=0;$i2<$ordcount;$i2++){
+        my %inner_line;
+        $inner_line{basketno} =$orders->[$i2]->{'basketno'};
+        $inner_line{total} =$orders->[$i2]->{'count(*)'};
+        $inner_line{authorisedby} = $orders->[$i2]->{'authorisedby'};
+        $inner_line{creationdate} = format_date($orders->[$i2]->{'creationdate'});
+        $inner_line{closedate} = format_date($orders->[$i2]->{'closedate'});
+        push @loop_basket, \%inner_line;
+    }
+    $line{loop_basket} = \@loop_basket;
+    push @loop_suppliers, \%line;
+}
+$template->param(loop_suppliers => \@loop_suppliers,
+                        supplier => $supplier,
+                        count => $count);
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/acqui-search.pl
===================================================================
RCS file: serials/acqui-search.pl
diff -N serials/acqui-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/acqui-search.pl	26 Mar 2007 02:19:26 -0000	1.7.2.2
@@ -0,0 +1,97 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: acqui-search.pl,v 1.7.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+
+use C4::Bookfund;
+use C4::Acquisition;
+my $query = new CGI;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "serials/acqui-search.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {acquisition => 1},
+			     debug => 1,
+			     });
+
+
+
+
+# budget
+my $dbh = C4::Context->dbh;
+my $sthtemp = $dbh->prepare("Select flags, branchcode from borrowers where borrowernumber = ?");
+$sthtemp->execute($loggedinuser);
+my ($flags, $homebranch)=$sthtemp->fetchrow;
+my @results=GetBookFunds($homebranch);
+my $count = scalar(@results);
+
+my $classlist='';
+my $total=0;
+my $totspent=0;
+my $totcomtd=0;
+my $totavail=0;
+my @loop_budget = ();
+for (my $i=0;$i<$count;$i++){
+	my ($spent,$comtd)=GetBookFundBreakdown($results[$i]->{'bookfundid'});
+	my $avail=$results[$i]->{'budgetamount'}-($spent+$comtd);
+	my %line;
+	$line{bookfundname} = $results[$i]->{'bookfundname'};
+	$line{budgetamount} = $results[$i]->{'budgetamount'};
+	$line{spent} = sprintf  ("%.2f", $spent);
+	$line{comtd} = sprintf  ("%.2f",$comtd);
+	$line{avail}  = sprintf  ("%.2f",$avail);
+	push @loop_budget, \%line;
+	$total+=$results[$i]->{'budgetamount'};
+	$totspent+=$spent;
+	$totcomtd+=$comtd;
+	$totavail+=$avail;
+}
+#currencies
+my @rates=GetCurrencies();
+my $count = scalar @rates;
+
+my @loop_currency = ();
+for (my $i=0;$i<$count;$i++){
+	my %line;
+	$line{currency} = $rates[$i]->{'currency'};
+	$line{rate} = $rates[$i]->{'rate'};
+	push @loop_currency, \%line;
+}
+$template->param(classlist => $classlist,
+						type => 'intranet',
+						loop_budget => \@loop_budget,
+						loop_currency => \@loop_currency,
+						total => sprintf("%.2f",$total),
+						totspent => sprintf("%.2f",$totspent),
+						totcomtd => sprintf("%.2f",$totcomtd),
+						totavail => sprintf("%.2f",$totavail),
+						intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+						);
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/claims.pl
===================================================================
RCS file: serials/claims.pl
diff -N serials/claims.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/claims.pl	26 Mar 2007 02:19:26 -0000	1.3.2.2
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Serials;
+use C4::Acquisition;
+
+use C4::Interface::CGI::Output;
+use C4::Context;
+
+
+my $query = new CGI;
+
+my $serialid = $query->param('serialid');
+my $op = $query->param('op');
+my $claimletter = $query->param('claimletter');
+my $supplierid = $query->param('supplierid');
+my %supplierlist = GetSuppliersWithLateIssues;
+my @select_supplier;
+
+foreach my $supplierid (keys %supplierlist){
+        my ($count, @dummy) = GetMissingIssues($supplierid);
+        my $counting = $count;
+        $supplierlist{$supplierid} = $supplierlist{$supplierid}." ($counting)";
+	push @select_supplier, $supplierid
+}
+
+my @select_letter = (1,2,3,4);
+my %letters = (1=>'Claim Form 1',2=>'Claim Form 2',3=>'Claim Form 3',4=>'Claim Form 4');
+my ($count2, @missingissues) = GetMissingIssues($supplierid,$serialid);
+
+my $CGIsupplier=CGI::scrolling_list( -name     => 'supplierid',
+			-values   => \@select_supplier,
+			-default  => $supplierid,
+			-labels   => \%supplierlist,
+			-size     => 1,
+			-multiple => 0 );
+
+my $CGIletter=CGI::scrolling_list( -name     => 'claimletter',
+			-values   => \@select_letter,
+			-default  => $claimletter,
+			-labels   => \%letters,
+			-size     => 1,
+			-multiple => 0 );
+my ($singlesupplier, at supplierinfo);
+if($supplierid){
+   ($singlesupplier, at supplierinfo)=bookseller($supplierid);
+} else { # set up supplierid for the claim links out of main table if all suppliers is chosen
+   for(my $i=0; $i<@missingissues;$i++){
+       $missingissues[$i]->{'supplierid'} = getsupplierbyserialid($missingissues[$i]->{'serialid'});
+   }
+}
+
+
+my $preview=0;
+if($op eq 'preview'){
+    $preview = 1;
+}
+
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/claims.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+$template->param(
+	CGIsupplier => $CGIsupplier,
+    	CGIletter => $CGIletter,
+        preview => $preview,
+        missingissues => \@missingissues,
+        supplierid => $supplierid,
+        claimletter => $claimletter,
+        singlesupplier => $singlesupplier,
+        supplierloop => \@supplierinfo,
+	intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+	);
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/distributedto.pl
===================================================================
RCS file: serials/distributedto.pl
diff -N serials/distributedto.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/distributedto.pl	26 Mar 2007 02:19:26 -0000	1.5.2.2
@@ -0,0 +1,105 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: distributedto.pl,v 1.5.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+distributedto
+
+=head1 DESCRIPTION
+
+this script is launched as a popup. It allows to choose for who the subscription can be distributed.
+
+=head1 PARAMETERS
+
+=over 4
+
+=item searchfield
+to filter on the members.
+
+=item distributedto
+to know if there are already some members to in the distributed list
+
+=item subscriptionid
+to know what subscription this scrpit have to distribute.
+
+=item SaveList
+
+=back
+
+=cut
+
+
+use strict;
+use CGI;
+use C4::Date;
+use C4::Auth;
+use C4::Context;
+
+use C4::Interface::CGI::Output;
+use C4::Search;
+
+use C4::Serials;
+use C4::Members;
+
+my $input = new CGI;
+my $searchfield=$input->param('searchfield');
+defined $searchfield or $searchfield='';
+my $distributedto=$input->param('distributedto');
+my $subscriptionid = $input->param('subscriptionid');
+$searchfield=~ s/\,//g;
+my $SaveList=$input->param('SaveList');
+my $dbh = C4::Context->dbh;
+
+$distributedto = GetDistributedTo($subscriptionid) unless $distributedto;
+
+SetDistributedto($distributedto,$subscriptionid) if ($SaveList) ;
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "serials/distributedto.tmpl",
+                 query => $input,
+                 type => "intranet",
+                 authnotrequired => 0,
+                 flagsrequired => {cataloguing => 1},
+                 debug => 1,
+                 });
+
+my ($count,$results)=GetBorrowersFromSurname($searchfield) if $searchfield;
+my $toggle="0";
+my @loop_data =();
+for (my $i=0; $i < $count; $i++){
+    if ($i % 2){
+            $toggle=1;
+    } else {
+            $toggle=0;
+    }
+    my %row_data;
+    $row_data{toggle} = $toggle;
+    $row_data{firstname} = $results->[$i]{'firstname'};
+    $row_data{surname} = $results->[$i]{'surname'};
+    push(@loop_data, \%row_data);
+}
+$template->param(borlist => \@loop_data,
+                searchfield => $searchfield,
+                distributedto => $distributedto,
+                SaveList => $SaveList,
+                subscriptionid => $subscriptionid,
+                );
+output_html_with_http_headers $input, $cookie, $template->output;

Index: serials/lateissues-excel.pl
===================================================================
RCS file: serials/lateissues-excel.pl
diff -N serials/lateissues-excel.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/lateissues-excel.pl	26 Mar 2007 02:19:26 -0000	1.2.2.2
@@ -0,0 +1,119 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Serials;
+use C4::Acquisition;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Context;
+
+use Text::CSV_XS;
+
+
+
+
+my $csv = Text::CSV_XS->new(
+        {
+            'quote_char'  => '"',
+            'escape_char' => '"',
+            'sep_char'    => ',',
+            'binary'      => 1
+        }
+    );
+
+
+my $query = new CGI;
+my $supplierid = $query->param('supplierid');
+my @serialid = $query->param('serialid');
+my $op = $query->param('op');
+my $serialidcount = @serialid;
+
+my %supplierlist = GetSuppliersWithLateIssues;
+my @select_supplier;
+
+my @loop1;
+my ($count, @lateissues);
+if($op ne 'claims'){
+    ($count, @lateissues) = GetLateIssues($supplierid);
+    for (my $i=0;$i<@lateissues;$i++){
+        my @rows1 = ($lateissues[$i]->{'name'},          # lets build up a row
+            	     $lateissues[$i]->{'title'}, 
+                     $lateissues[$i]->{'serialseq'},
+                     $lateissues[$i]->{'planneddate'},
+                     );
+        push (@loop1, \@rows1);
+    }
+}
+my $totalcount2 = 0;
+my @loop2;
+my ($count2, @missingissues);
+for (my $k=0;$k<@serialid;$k++){
+    ($count2, @missingissues) = GetMissingIssues($supplierid, $serialid[$k]);
+
+    for (my $j=0;$j<@missingissues;$j++){
+	my @rows2 = ($missingissues[$j]->{'name'},          # lets build up a row
+	             $missingissues[$j]->{'title'}, 
+                     $missingissues[$j]->{'serialseq'},
+                     $missingissues[$j]->{'planneddate'},
+                     );
+        push (@loop2, \@rows2);
+    }
+    $totalcount2 = $totalcount2 + $count2;
+    # update claim date to let one know they have looked at this missing item
+    updateClaim($serialid[$k]);
+}
+
+my $heading ='';
+my $filename ='';
+if($supplierid){
+    if($missingissues[0]->{'name'}){ # if exists display supplier name in heading for neatness
+	# not necessarily needed as the name will appear in supplier column also
+        $heading = "FOR $missingissues[0]->{'name'}";
+	$filename = "_$missingissues[0]->{'name'}"; 
+    }
+}
+
+print $query->header(
+        -type       => 'application/vnd.ms-excel',
+        -attachment => "claims".$filename.".csv",
+    );
+
+if($op ne 'claims'){
+    print "LATE ISSUES ".$heading."\n\n";
+    print "SUPPLIER,TITLE,ISSUE NUMBER,LATE SINCE\n";
+
+    for my $row ( @loop1 ) {
+    
+        $csv->combine(@$row);
+        my $string = $csv->string;
+        print $string, "\n";
+    }
+
+    print ",,,,,,,\n\n";
+}
+if($serialidcount == 1){
+    print "MISSING ISSUE ".$heading."\n\n";
+} else {
+    print "MISSING ISSUES ".$heading."\n\n";
+}
+print "SUPPLIER,TITLE,ISSUE NUMBER,LATE SINCE\n";
+
+for my $row ( @loop2 ) {
+    
+        $csv->combine(@$row);
+        my $string = $csv->string;
+        print $string, "\n";
+    }
+
+print ",,,,,,,\n";
+print ",,,,,,,\n";
+if($op ne 'claims'){
+    print ",,Total Number Late, $count\n";
+}
+if($serialidcount == 1){
+
+} else {
+    print ",,Total Number Missing, $totalcount2\n";
+}

Index: serials/lateissues.pl
===================================================================
RCS file: serials/lateissues.pl
diff -N serials/lateissues.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/lateissues.pl	26 Mar 2007 02:19:26 -0000	1.11.2.2
@@ -0,0 +1,90 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: lateissues.pl,v 1.11.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+lateissues
+
+=head1 DESCRIPTION
+
+this script display late issue by types.
+
+=head1 PARAMETERS
+
+=over 4
+
+=item supplierid
+the id of the supplier this script has to search late issues.
+
+=back
+
+=cut
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Serials;
+use C4::Acquisition;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Bookseller;
+
+my $query = new CGI;
+# my $title = $query->param('title');
+# my $ISSN = $query->param('ISSN');
+# my @subscriptions = GetSubscriptions($title,$ISSN);
+
+my $supplierid = $query->param('supplierid');
+my %supplierlist = GetSuppliersWithLateIssues;
+my @select_supplier;
+push @select_supplier,"";
+foreach my $supplier (keys %supplierlist){
+    push @select_supplier, $supplier
+}
+my $CGIsupplier=CGI::scrolling_list(
+            -name     => 'supplierid',
+            -values   => \@select_supplier,
+            -default  => $supplierid,
+            -labels   => \%supplierlist,
+            -size     => 1,
+            -multiple => 0 );
+
+my ($count, at lateissues);
+($count, at lateissues) = GetLateIssues($supplierid) ;
+my @supplierinfo=GetBookSeller($supplierid) if $supplierid;
+
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/lateissues.tmpl",
+                query => $query,
+                type => "intranet",
+                authnotrequired => 0,
+                flagsrequired => {catalogue => 1},
+                debug => 1,
+                });
+
+$template->param(
+    CGIsupplier => $CGIsupplier,
+    lateissues => \@lateissues,
+    phone => $supplierinfo[0]->{phone},
+    booksellerfax => $supplierinfo[0]->{booksellerfax},
+    bookselleremail => $supplierinfo[0]->{bookselleremail},
+    );
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/member-search.pl
===================================================================
RCS file: serials/member-search.pl
diff -N serials/member-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/member-search.pl	26 Mar 2007 02:19:26 -0000	1.2.2.2
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+# Member Search.pl script used to search for members to add to a routing list
+use strict;
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+use C4::Acquisition;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Search;
+use C4::Serials;
+
+my $query = new CGI;
+my $subscriptionid = $query->param('subscriptionid');
+my $op = $query->param('op');
+my $searchstring = $query->param('member');
+my $dbh = C4::Context->dbh;
+
+my $env;    
+    
+    my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/member-search.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+
+if($searchstring){
+    my ($count, $members) = &BornameSearch($env, $searchstring, "surname", "advanced");
+    
+    $template->param(
+	subscriptionid => $subscriptionid,
+ 	    memberloop => $members,
+	        member => $searchstring,
+    );
+} else {
+    $template->param(
+	subscriptionid => $subscriptionid,
+    );
+}
+        output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/printlist.pl
===================================================================
RCS file: serials/printlist.pl
diff -N serials/printlist.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/printlist.pl	26 Mar 2007 02:19:26 -0000	1.4.2.2
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+# 
+# $Id: printlist.pl,v 1.4.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+printlist.pl
+
+=head1 DESCRIPTION
+
+this script print the list of members who have reserved the subscription given on input arg.
+
+=head1 PARAMETERS
+
+=over 4
+
+=item serialseq
+
+=item subscriptionid
+
+=back
+
+=cut
+
+
+use strict;
+require Exporter;
+use C4::Context;
+use CGI;
+use C4::Auth;
+use C4::Serials;
+use C4::Interface::CGI::Output;
+use C4::Koha;
+
+my $query=new CGI;
+
+my $serialseq=$query->param('serialseq');
+my $subscriptionid=$query->param('subscriptionid');
+my $subscription = GetSubscription($subscriptionid);
+$subscription->{'distributedto'} =~ s/\n/<br\/>/g;
+
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/printlist.tmpl",
+                query => $query,
+                type => "intranet",
+                authnotrequired => 0,
+                flagsrequired => {catalogue => 1},
+                debug => 1,
+                });
+$template->param(serialseq => $serialseq,
+                title => $subscription->{bibliotitle},
+                branchname => getbranchdetail(C4::Context->userenv->{'branch'})->{branchname},
+                branchaddress1 => getbranchdetail(C4::Context->userenv->{'branch'})->{address1},
+                branchaddress2 => getbranchdetail(C4::Context->userenv->{'branch'})->{address2},
+                branchaddress3 => getbranchdetail(C4::Context->userenv->{'branch'})->{address3},
+                branchphone => getbranchdetail(C4::Context->userenv->{'branch'})->{branchphone},
+                branchemail => getbranchdetail(C4::Context->userenv->{'branch'})->{branchemail},
+                distributedto => $subscription->{'distributedto'},
+                );
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+# Local Variables:
+# tab-width: 8
+# End:

Index: serials/reorder_members.pl
===================================================================
RCS file: serials/reorder_members.pl
diff -N serials/reorder_members.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/reorder_members.pl	26 Mar 2007 02:19:26 -0000	1.2.2.2
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+
+# Routing.pl script used to create a routing list for a serial subscription
+# In this instance it is in fact a setting up of a list of reserves for the item
+# where the hierarchical order can be changed on the fly and a routing list can be
+# printed out
+use strict;
+use CGI;
+
+use C4::Acquisition;
+use C4::Interface::CGI::Output;
+
+use C4::Serials;
+
+
+my $query = new CGI;
+my $subscriptionid = $query->param('subscriptionid');
+my $routingid = $query->param('routingid');
+my $rank = $query->param('rank');
+
+reorder_members($subscriptionid,$routingid,$rank);
+
+print $query->redirect("/cgi-bin/koha/serials/routing.pl?subscriptionid=$subscriptionid");
+

Index: serials/routing-preview.pl
===================================================================
RCS file: serials/routing-preview.pl
diff -N serials/routing-preview.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/routing-preview.pl	26 Mar 2007 02:19:26 -0000	1.2.2.2
@@ -0,0 +1,121 @@
+#!/usr/bin/perl
+
+# Routing Preview.pl script used to view a routing list after creation
+# lets one print out routing slip and create (in this instance) the heirarchy
+# of reserves for the serial
+use strict;
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+use C4::Output;
+use C4::Acquisition;
+use C4::Reserves2;
+use C4::Circulation::Circ2;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Search;
+use C4::Serials;
+
+my $query = new CGI;
+my $subscriptionid = $query->param('subscriptionid');
+my $issue = $query->param('issue');
+my $routingid;
+my $ok = $query->param('ok');
+my $edit = $query->param('edit');
+my $delete = $query->param('delete');
+my $dbh = C4::Context->dbh;
+
+if($delete){
+    delroutingmember($routingid,$subscriptionid);
+    my $sth = $dbh->prepare("UPDATE serial SET routingnotes = NULL WHERE subscriptionid = ?");
+    $sth->execute($subscriptionid);    
+    print $query->redirect("routing.pl?subscriptionid=$subscriptionid&op=new");    
+}
+
+if($edit){
+    print $query->redirect("routing.pl?subscriptionid=$subscriptionid");
+}
+    
+my ($routing, @routinglist) = getroutinglist($subscriptionid);
+my $subs = GetSubscription($subscriptionid);
+my ($count, at serials) = GetSerials($subscriptionid);
+my ($template, $loggedinuser, $cookie);
+
+if($ok){
+    my $env;
+    # get biblio information....
+    my $biblio = $subs->{'biblionumber'};
+    
+    # get existing reserves .....
+    my ($count,$reserves) = FindReserves($biblio);
+    my $totalcount = $count;
+    foreach my $res (@$reserves) {
+        if ($res->{'found'} eq 'W') {
+	    $count--;
+        }
+    }
+    my ($count2, at bibitems) = bibitems($biblio);
+    my @itemresults = ItemInfo($env, $subs->{'biblionumber'}, 'intra');    
+    my $branch = $itemresults[0]->{'holdingbranch'};
+    my $const = 'o';
+    my $notes;
+    my $title = $subs->{'bibliotitle'};
+    for(my $i=0;$i<$routing;$i++){
+	my $sth = $dbh->prepare("SELECT * FROM reserves WHERE biblionumber = ? AND borrowernumber = ? 
+                                 AND cancellationdate is NULL AND (found <> 'F' or found is NULL)");
+        $sth->execute($biblio,$routinglist[$i]->{'borrowernumber'});
+        my $data = $sth->fetchrow_hashref;
+#	warn Dumper($data);
+#       warn "$routinglist[$i]->{'borrowernumber'} is the same as $data->{'borrowernumber'}";
+	if($routinglist[$i]->{'borrowernumber'} == $data->{'borrowernumber'}){
+	    UpdateReserve($routinglist[$i]->{'ranking'},$biblio,$routinglist[$i]->{'borrowernumber'},$branch);
+        } else {
+            CreateReserve(\$env,$branch,$routinglist[$i]->{'borrowernumber'},$biblio,$const,\@bibitems,$routinglist[$i]->{'ranking'},$notes,$title);
+	}
+    }
+    
+    
+    ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/routing-preview-slip.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});    
+} else {
+    ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/routing-preview.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+}    
+
+# my $firstdate = "$serials[0]->{'serialseq'} ($serials[0]->{'planneddate'})";
+my @results;
+my $data;
+for(my $i=0;$i<$routing;$i++){
+    $data=borrdata('',$routinglist[$i]->{'borrowernumber'});
+    $data->{'location'}=$data->{'streetaddress'};
+    $data->{'name'}="$data->{'firstname'} $data->{'surname'}";
+    $data->{'routingid'}=$routinglist[$i]->{'routingid'};
+    $data->{'subscriptionid'}=$subscriptionid;
+    push(@results, $data);
+}
+
+my $routingnotes = $serials[0]->{'routingnotes'};
+$routingnotes =~ s/\n/\<br \/\>/g;
+  
+$template->param(
+    title => $subs->{'bibliotitle'},
+    issue => $issue,
+    subscriptionid => $subscriptionid,
+    memberloop => \@results,    
+    routingnotes => $routingnotes,
+    );
+
+        output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/routing.pl
===================================================================
RCS file: serials/routing.pl
diff -N serials/routing.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/routing.pl	26 Mar 2007 02:19:26 -0000	1.2.2.2
@@ -0,0 +1,122 @@
+#!/usr/bin/perl
+
+# Routing.pl script used to create a routing list for a serial subscription
+# In this instance it is in fact a setting up of a list of reserves for the item
+# where the hierarchical order can be changed on the fly and a routing list can be
+# printed out
+use strict;
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+use C4::Acquisition;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Search;
+use C4::Serials;
+
+my $query = new CGI;
+my $subscriptionid = $query->param('subscriptionid');
+my $serialseq = $query->param('serialseq');
+my $routingid = $query->param('routingid');
+my $bornum = $query->param('bornum');
+my $notes = $query->param('notes');
+my $op = $query->param('op');
+my $date_selected = $query->param('date_selected');
+my $dbh = C4::Context->dbh;
+
+if($op eq 'delete'){
+    delroutingmember($routingid,$subscriptionid);
+}
+
+if($op eq 'add'){
+    addroutingmember($bornum,$subscriptionid);
+}
+if($op eq 'save'){
+    my $sth = $dbh->prepare("UPDATE serial SET routingnotes = ? WHERE subscriptionid = ?");
+    $sth->execute($notes,$subscriptionid);
+    print $query->redirect("routing-preview.pl?subscriptionid=$subscriptionid&issue=$date_selected");
+}
+    
+my ($routing, @routinglist) = getroutinglist($subscriptionid);
+my $subs = GetSubscription($subscriptionid);
+my ($count, at serials) = old_getserials($subscriptionid);
+my ($serialdates) = GetLatestSerials($subscriptionid,$count);
+
+my @dates;
+my $i=0;
+foreach my $dateseq (@$serialdates) {
+        $dates[$i]->{'planneddate'} = $dateseq->{'planneddate'};
+        $dates[$i]->{'serialseq'} = $dateseq->{'serialseq'};
+        $dates[$i]->{'serialid'} = $dateseq->{'serialid'};
+        if($date_selected eq $dateseq->{'serialid'}){
+            $dates[$i]->{'selected'} = ' selected';
+        } else {
+            $dates[$i]->{'selected'} = '';
+        }
+        $i++;
+}
+
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/routing.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+# my $date;
+# if($serialseq){
+#    for(my $i = 0;$i<@serials; $i++){
+#	if($serials[$i]->{'serialseq'} eq $serialseq){
+#	    $date = $serials[$i]->{'planneddate'}
+#	}
+#    }
+# } else {
+#    $serialseq = $serials[0]->{'serialseq'};
+#    $date = $serials[0]->{'planneddate'};
+# }
+
+# my $issue = "$serialseq ($date)";
+  
+my @results;
+my $data;
+for(my $i=0;$i<$routing;$i++){
+    $data=borrdata('',$routinglist[$i]->{'borrowernumber'});
+    $data->{'location'}=$data->{'streetaddress'};
+    $data->{'name'}="$data->{'firstname'} $data->{'surname'}";
+    $data->{'routingid'}=$routinglist[$i]->{'routingid'};
+    $data->{'subscriptionid'}=$subscriptionid;
+    my $rankingbox = '<select name="itemrank" onchange="reorder_item('.$subscriptionid.','.$routinglist[$i]->{'routingid'}.',this.options[this.selectedIndex].value)">';
+    for(my $j=1; $j <= $routing; $j++) {
+	$rankingbox .= "<option ";
+	if($routinglist[$i]->{'ranking'} == $j){
+	    $rankingbox .= " selected='SELECTED'";
+	}
+	$rankingbox .= " value='$j'>$j</option>";
+    }
+    $rankingbox .= "</select>";
+    $data->{'routingbox'} = $rankingbox;
+    
+    push(@results, $data);
+}
+# warn Dumper(@results);
+# for adding routing list
+my $new;
+if ($op eq 'new') {
+    $new = 1;
+} else {
+# for modify routing list default
+    $new => 0;
+}
+
+$template->param(
+    title => $subs->{'bibliotitle'},
+    subscriptionid => $subscriptionid,
+    memberloop => \@results,    
+    op => $new,
+    dates => \@dates,
+    routingnotes => $serials[0]->{'routingnotes'},
+    );
+
+        output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/serial-issues.pl
===================================================================
RCS file: serials/serial-issues.pl
diff -N serials/serial-issues.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/serial-issues.pl	26 Mar 2007 02:19:26 -0000	1.6.2.2
@@ -0,0 +1,117 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: serial-issues.pl,v 1.6.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+serial-issue.pl
+
+=head1 DESCRIPTION
+
+this script give more information about a susbcription given on input arg.
+
+=head1 PARAMETERS
+
+=over 4
+
+=item selectview
+can be equal to "full" or not.
+
+=item biblionumber
+the biblionumber this script has to give more infos.
+
+=back
+
+
+=cut
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Koha;
+use C4::Date;
+use C4::Serials;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Context;
+
+
+my $query = new CGI;
+my $dbh = C4::Context->dbh;
+my $selectview = $query->param('selectview');
+$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview;
+
+my $sth;
+# my $id;
+my ($template, $loggedinuser, $cookie);
+my $biblionumber = $query->param('biblionumber');
+if ($selectview eq "full"){
+    my $subscriptions = GetFullSubscriptionsFromBiblionumber($biblionumber);
+
+    my $title = $subscriptions->[0]{bibliotitle};
+    my $yearmin=$subscriptions->[0]{year};
+    my $yearmax=$subscriptions->[scalar(@$subscriptions)-1]{year};
+
+    ($template, $loggedinuser, $cookie)
+     = get_template_and_user({template_name => "serials/serial-issues-full.tmpl",
+     query => $query,
+     type => "intranet",
+     authnotrequired => 1,
+     debug => 1,
+     });
+ 
+ # replace CR by <br> in librarian note
+ # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
+ 
+    $template->param(
+        biblionumber => $query->param('biblionumber'),
+        years => $subscriptions,
+        yearmin => $yearmin,
+        yearmax =>$yearmax,
+        bibliotitle => $title,
+        suggestion => C4::Context->preference("suggestion"),
+        virtualshelves => C4::Context->preference("virtualshelves"),
+    );
+
+} else {
+    my $subscriptions = GetSubscriptionsFromBiblionumber($biblionumber);
+    ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "serials/serial-issues.tmpl",
+        query => $query,
+        type => "intranet",
+        authnotrequired => 1,
+        debug => 1,
+     });
+
+ # replace CR by <br> in librarian note
+ # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
+
+    $template->param(
+        biblionumber => "".$query->param('biblionumber'),
+        subscription_LOOP => $subscriptions,
+        suggestion => "".C4::Context->preference("suggestion"),
+        virtualshelves => "".C4::Context->preference("virtualshelves"),
+    );
+}
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+		);
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/serials-home.pl
===================================================================
RCS file: serials/serials-home.pl
diff -N serials/serials-home.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/serials-home.pl	26 Mar 2007 02:19:26 -0000	1.9.2.2
@@ -0,0 +1,90 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: serials-home.pl,v 1.9.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+serials-home.pl
+
+=head1 DESCRIPTION
+
+this script is the main page for serials/
+
+=head1 PARAMETERS
+
+=over 4
+
+=item title
+
+=item ISSN
+
+=item biblionumber
+
+=back
+
+=cut
+
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Serials;
+use C4::Interface::CGI::Output;
+use C4::Context;
+
+my $query = new CGI;
+my $title = $query->param('title');
+my $ISSN = $query->param('ISSN');
+my $supplierid = $query->param('supplierid');
+my $routing = $query->param('routing');
+my $searched = $query->param('searched');
+my $biblionumber = $query->param('biblionumber');
+my $alt_links = 0;
+if(C4::Context->preference("RoutingSerials")){
+    $alt_links = 0;
+}
+my @subscriptions = GetSubscriptions($title,$ISSN,$biblionumber,$supplierid);
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/serials-home.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+# to toggle between create or edit routing list options
+if($routing){ 
+    for(my $i=0;$i<@subscriptions;$i++){
+	my $checkrouting = check_routing($subscriptions[$i]->{'subscriptionid'});
+	$subscriptions[$i]->{'routingedit'} = $checkrouting;
+	# warn "check $checkrouting";
+    }
+}
+
+$template->param(
+	subscriptions => \@subscriptions,
+	title => $title,
+	ISSN => $ISSN,
+        done_searched => $searched,
+        routing => $routing,
+        alt_links => $alt_links,
+	);
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/serials-receive.pl
===================================================================
RCS file: serials/serials-receive.pl
diff -N serials/serials-receive.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/serials-receive.pl	26 Mar 2007 02:19:26 -0000	1.4.2.2
@@ -0,0 +1,223 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: serials-receive.pl,v 1.4.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+serials-receive.pl
+
+=head1 Parameters
+
+=over 4
+
+=item op
+ op can be :
+    * modsubscriptionhistory :to modify the subscription history 
+    * serialchangestatus     :to modify the status of this subscription
+
+=item subscriptionid
+
+=item user
+
+=item histstartdate
+
+=item enddate
+
+=item receivedlist
+
+=item missinglist
+
+=item opacnote
+
+=item librariannote
+
+=item serialid
+
+=item serialseq
+
+=item planneddate
+
+=item notes
+
+=item status
+
+=back
+
+=cut
+
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Date;
+use C4::Biblio;
+use C4::Koha;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Serials;
+
+my $query = new CGI;
+my $op = $query->param('op');
+my $dbh = C4::Context->dbh;
+my $subscriptionid = $query->param('subscriptionid');
+my $histstartdate = format_date_in_iso($query->param('histstartdate'));
+my $enddate = format_date_in_iso($query->param('enddate'));
+my $receivedlist = $query->param('receivedlist');
+my $missinglist = $query->param('missinglist');
+my $opacnote = $query->param('opacnote');
+my $librariannote = $query->param('librariannote');
+my @serialids = $query->param('serialid');
+my @serialseqs = $query->param('serialseq');
+my @planneddates = $query->param('planneddate');
+my @publisheddates = $query->param('publisheddate');
+my @status = $query->param('status');
+my @notes = $query->param('notes');
+my @barcodes = $query->param('barcode');
+my @itemcallnumbers = $query->param('itemcallnumber');
+my @locations = $query->param('location');
+my @itemstatus = $query->param('itemstatus');
+my @holdingbranches = $query->param('holdingbranch');
+my $hassubscriptionexpired = HasSubscriptionExpired($subscriptionid);
+my $abouttoexpire = abouttoexpire($subscriptionid);
+my @itemnumbers=$query->param('itemnumber');
+my $subscription=GetSubscription($subscriptionid);
+
+my $auser = $subscription->{'librarian'}; # bob
+my $routing = check_routing($subscriptionid); # to see if routing list exists
+my $manualdate ='';
+my $manualissue ='';
+my $manualstatus =0;
+my $manualid ='';
+if ($op eq 'found'){
+    $manualdate = $query->param('planneddate');
+    $manualissue = $query->param('missingissue');
+    $manualstatus = 1;
+    my $sth = $dbh->prepare("select serialid from serial where subscriptionid = ? AND serialseq = ? AND planneddate = ?");
+    $sth->execute($subscriptionid,$manualissue,format_date_in_iso($manualdate));
+    $manualid = $sth->fetchrow;
+}
+if ($op eq 'modsubscriptionhistory') {
+	ModSubscriptionHistory($subscriptionid,$histstartdate,$enddate,$receivedlist,$missinglist,$opacnote,$librariannote);
+}
+
+# change status except, if subscription has expired, for the "waited" issue.
+if ($op eq 'serialchangestatus') {
+	my $sth = $dbh->prepare("select status from serial where serialid=?");
+	for (my $i=0;$i<=$#serialids;$i++) {
+		$sth->execute($serialids[$i]);
+		my $today=get_today();
+		my ($oldstatus) = $sth->fetchrow;
+		if ($serialids[$i]) {
+	 my $planneddate = ($planneddates[$i]?format_date_in_iso($planneddates[$i]):$today) if ($status[$i]==2);
+			ModSerialStatus($serialids[$i],$serialseqs[$i],format_date_in_iso($publisheddates[$i]),format_date_in_iso($planneddates[$i]),$status[$i],$notes[$i],$itemnumbers[$i]) unless ($hassubscriptionexpired && $oldstatus ==1 );
+			if (($status[$i]==2) && $itemnumbers[$i]){
+				my %info;
+				my $status2;
+			        my $sth2 = $dbh->prepare("UPDATE subscriptionhistory SET lastbranch = ? WHERE subscriptionid = ?");
+			        $sth2->execute($holdingbranches[$i],$subscriptionid);
+			        $sth2->finish;			    
+			        # remove from missing list if item being checked in is on it
+				    removeMissingIssue($serialseqs[$i],$subscriptionid);
+			}
+		} else {
+			# add a special issue
+			if ($serialseqs[$i]) {
+				NewIssue($serialseqs[$i],$subscriptionid,$subscription->{biblionumber},$status[$i],format_date_in_iso($publisheddates[$i]), format_date_in_iso($planneddates[$i]),$itemnumbers[$i]);
+			}
+			if (($status[$i]==2) &&  $itemnumbers[$i] && !$hassubscriptionexpired){
+				my %info;
+				my $status2;
+			        my $sth2 = $dbh->prepare("UPDATE subscriptionhistory SET lastbranch = ? WHERE subscriptionid = ?");
+			        $sth2->execute($holdingbranches[$i],$subscriptionid);
+			        $sth2->finish;
+			        # remove from missing list if item being checked in is on it
+			       
+				    removeMissingIssue($serialseqs[$i],$subscriptionid);
+			       
+			}
+
+		}
+	}
+
+}
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/serials-receive.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+my $subs = &GetSubscription($subscriptionid);
+my ($totalissues, at serialslist) = GetSerials($subscriptionid);
+my $count = @serialslist;
+for(my $i=0;$i<$count;$i++){
+    $serialslist[$i]->{'callnumber'} = $subscription->{'callnumber'};
+    my $temp = rand(10000000);
+    $serialslist[$i]->{'barcode'} = "TEMP" . sprintf("%.0f",$temp);
+}
+# use Data::Dumper;
+# warn Dumper(@serialslist);
+
+my $sth= C4::Serials::GetSubscriptionHistoryFromSubscriptionId();
+
+$sth->execute($subscriptionid);
+my $solhistory = $sth->fetchrow_hashref;
+
+my $subs = &GetSubscription($subscriptionid);
+my ($totalissues, at serialslist) = GetSerials($subscriptionid);
+
+if (C4::Context->preference("serialsadditems")){
+    $template->param(scriptaddserials=>"/cgi-bin/koha/cataloguing/additem.pl?biblionumber=  $serialslist[0]->{'biblionumber'}&fromserials=1&serialid=",
+				serialsadditems=>1	) ;
+}
+
+my $sth= C4::Serials::GetSubscriptionHistoryFromSubscriptionId();
+$sth->execute($subscriptionid);
+my $solhistory = $sth->fetchrow_hashref;
+
+    
+$template->param(
+                        user => $auser,
+			serialslist => \@serialslist,
+                        count => $count,
+			biblionumber => $subscription->{biblionumber},
+			histstartdate => format_date($solhistory->{'histstartdate'}),
+			enddate => format_date($solhistory->{'enddate'}),
+			receivedlist => $solhistory->{'receivedlist'},
+			missinglist => $solhistory->{'missinglist'},
+			opacnote => $solhistory->{'opacnote'},
+			librariannote => $solhistory->{'librariannote'},
+			subscriptionid => $subscriptionid,
+			bibliotitle => $subs->{bibliotitle},
+			biblionumber => $subs->{biblionumber},
+			hassubscriptionexpired =>$hassubscriptionexpired,
+			abouttoexpire =>$abouttoexpire,    
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+			intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+			IntranetNav => C4::Context->preference("IntranetNav"),
+                        routing => $routing,
+                        missingseq => $manualissue,
+                        frommissing => $manualstatus,
+                        missingdate => $manualdate,
+                        missingid => $manualid,
+		);
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/subscription-add.pl
===================================================================
RCS file: serials/subscription-add.pl
diff -N serials/subscription-add.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/subscription-add.pl	26 Mar 2007 02:19:26 -0000	1.10.2.2
@@ -0,0 +1,309 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2003 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: subscription-add.pl,v 1.10.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+subscription-add.pl
+
+=head1 DESCRIPTION
+
+this script add a subscription into the database.
+
+=head1 PARAMETERS
+
+=over 4
+
+=item op
+op use to know the operation to do on this template.
+ * mod : to modify an existing subscription
+ * addsubscription : to add a subscription
+
+Note that if op = mod or addsubscription there are a lot of other params.
+
+
+=back
+
+=cut
+
+
+use strict;
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+use C4::Serials;
+use C4::Bookfund;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use C4::Letters;
+use C4::Members;
+use Date::Calc qw(:all);
+my $query = new CGI;
+my $op = $query->param('op');
+my $dbh = C4::Context->dbh;
+my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
+    $publisheddate,$dow,$irregularity, $numberpattern, $numberlength, $weeklength, $monthlength, $sublength,
+    $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
+    $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
+    $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
+    $numberingmethod, $status, $biblionumber,
+    $title, $notes, $letter,$callnumber,$hemisphere);
+
+    my @budgets;
+my ($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/subscription-add.tmpl",
+                query => $query,
+                type => "intranet",
+                authnotrequired => 0,
+                flagsrequired => {catalogue => 1},
+                debug => 1,
+                });
+
+my $weekarrayjs='';
+my $count = 0;
+my $today=get_today();
+ my ($year,$month,$day)=split /-|\/|\.|:/,$today;
+  
+my $firstday = Day_of_Year($year,$month,$day);
+my $wkno = Week_of_Year($year,$month,$day);  
+my $weekno = $wkno;
+for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
+        $count = $i;
+        if($wkno > 52){$year++; $wkno=1;}
+        if($count>365){$count=$i-365;}    
+     my ($nyear,$nmonth,$nday)=Add_Delta_Days($year,1,1,$count-1);
+        $weekarrayjs .= "'Wk $wkno: ".format_date($nyear."-".$nmonth."-".$nday)."',";
+        $wkno++;    
+}
+chop($weekarrayjs);
+# warn $weekarrayjs;
+
+my $sub_on;
+my @subscription_types = (
+            'issues', 'weeks', 'months'
+        ); 
+my @sub_type_data;
+if ($op eq 'mod') {
+    my $subscriptionid = $query->param('subscriptionid');
+    my $subs = &GetSubscription($subscriptionid);
+    $auser = $subs->{'user'};
+    $librarian = $subs->{'librarian'};
+    $cost = $subs->{'cost'};
+    $aqbooksellerid = $subs->{'aqbooksellerid'};
+    $aqbooksellername = $subs->{'aqbooksellername'};
+    $bookfundid = $subs->{'bookfundid'};
+    $aqbudgetid = $subs->{'aqbudgetid'};
+    defined $aqbudgetid or $aqbudgetid='';
+    $startdate = $subs->{'startdate'};
+   $publisheddate = $subs->{'publisheddate'};
+    $periodicity = $subs->{'periodicity'};
+    $dow = $subs->{'dow'};
+        $irregularity = $subs->{'irregularity'};
+        $numberpattern = $subs->{'numberpattern'};
+    $numberlength = $subs->{'numberlength'};
+    $weeklength = $subs->{'weeklength'};
+    $monthlength = $subs->{'monthlength'};
+       if($monthlength > 0){
+	    $sublength = $monthlength;
+	    $sub_on = $subscription_types[2];
+	} elsif ($weeklength>0){
+	    $sublength = $weeklength;
+	    $sub_on = $subscription_types[1];
+	} else {
+	    $sublength = $numberlength;
+	    $sub_on = $subscription_types[0];
+	}
+        
+
+        while (@subscription_types) {
+           my $sub_type = shift @subscription_types;
+           my %row = ( 'name' => $sub_type );
+           if ( $sub_on eq $sub_type ) {
+	     $row{'selected'} = ' selected';
+           } else {
+	     $row{'selected'} = '';
+           }
+           push( @sub_type_data, \%row );
+        }
+    $add1 = $subs->{'add1'};
+    $every1 = $subs->{'every1'};
+    $whenmorethan1 = $subs->{'whenmorethan1'};
+    $setto1 = $subs->{'setto1'};
+    $lastvalue1 = $subs->{'lastvalue1'};
+    $innerloop1 = $subs->{'innerloop1'};
+    $add2 = $subs->{'add2'};
+    $every2 = $subs->{'every2'};
+    $whenmorethan2 = $subs->{'whenmorethan2'};
+    $setto2 = $subs->{'setto2'};
+    $lastvalue2 = $subs->{'lastvalue2'};
+    $innerloop2 = $subs->{'innerloop2'};
+    $add3 = $subs->{'add3'};
+    $every3 = $subs->{'every3'};
+    $whenmorethan3 = $subs->{'whenmorethan3'};
+    $setto3 = $subs->{'setto3'};
+    $lastvalue3 = $subs->{'lastvalue3'};
+    $innerloop3 = $subs->{'innerloop3'};
+    $numberingmethod = $subs->{'numberingmethod'};
+    $status = $subs->{status};
+    $biblionumber = $subs->{'biblionumber'};
+    $title = $subs->{'title'},
+           $callnumber = $subs->{'callnumber'};
+           $hemisphere = $subs->{'hemisphere'};
+    $notes = $subs->{'notes'};
+    $letter = $subs->{'letter'};
+    defined $letter or $letter='';
+    $template->param(
+        $op => 1,
+        user => $auser,
+        librarian => $librarian,
+        aqbooksellerid => $aqbooksellerid,
+        aqbooksellername => $aqbooksellername,
+        cost => $cost,
+        aqbudgetid => $aqbudgetid,
+        bookfundid => $bookfundid,
+        startdate => format_date($startdate),    
+         publisheddate => format_date($publisheddate),    
+        periodicity => $periodicity,
+        numberpattern=>$numberpattern,
+        dow => $dow,
+        numberlength => $numberlength,
+        weeklength => $weeklength,
+        monthlength => $monthlength,
+	sublength=>$sublength,
+        add1 => $add1,
+        every1 => $every1,
+        whenmorethan1 => $whenmorethan1,
+        setto1 => $setto1,
+        lastvalue1 => $lastvalue1,
+        innerloop1 => $innerloop1,
+        add2 => $add2,
+        every2 => $every2,
+        whenmorethan2 => $whenmorethan2,
+        setto2 => $setto2,
+        lastvalue2 => $lastvalue2,
+        innerloop2 => $innerloop2,
+        add3 => $add3,
+        every3 => $every3,
+        whenmorethan3 => $whenmorethan3,
+        setto3 => $setto3,
+        lastvalue3 => $lastvalue3,
+        innerloop3 => $innerloop3,
+        numberingmethod => $numberingmethod,
+        status => $status,
+        biblionumber => $biblionumber,
+        title => $title,
+               callnumber => $callnumber,
+        notes => $notes,
+        letter => $letter,
+        subscriptionid => $subscriptionid,
+        weekarrayjs => $weekarrayjs,
+	        weekno => $weekno,
+	        hemisphere => $hemisphere,
+        "periodicity$periodicity" => 1,
+        "dow$dow" => 1,
+        "numberpattern$numberpattern" => 1,
+        );
+}
+
+my @letterlist = GetLetterList('serial');
+for (my $i=0;$i<=$#letterlist;$i++) {
+    $letterlist[$i]->{'selected'} =1 if $letterlist[$i]->{'code'} eq $letter;
+}
+$template->param(letters => \@letterlist);
+
+if ($op eq 'addsubscription') {
+  my @irregular = $query->param('irregular');
+        my $irregular_count = @irregular;
+        for(my $i =0;$i<$irregular_count;$i++){
+            $irregularity .=$irregular[$i]."|";
+        }
+        $irregularity =~ s/\|$//;
+        
+    my $auser = $query->param('user');
+    my $aqbooksellerid = $query->param('aqbooksellerid');
+    my $cost = $query->param('cost');
+    my $aqbudgetid = $query->param('aqbudgetid');
+    my $startdate = $query->param('startdate');
+     my $publisheddate = $query->param('publisheddate');
+    my $callnumber=$query->param('callnumber');	  
+    my $periodicity = $query->param('periodicity');
+    my $dow = $query->param('dow');
+	my $numberlength = 0;
+	my $weeklength = 0;
+	my $monthlength = 0;
+        my $numberpattern = $query->param('numbering_pattern');
+        my $sublength = $query->param('sublength');
+        my $subtype = $query->param('subtype');
+        if ($subtype eq 'months'){
+	    $monthlength = $sublength;
+	} elsif ($subtype eq 'weeks'){
+	    $weeklength = $sublength;
+	} else {
+	    $numberlength = $sublength;
+	}
+
+
+	my $add1 = $query->param('add1');
+	my $every1 = $query->param('every1');
+	my $whenmorethan1 = $query->param('whenmorethan1');
+	my $setto1 = $query->param('setto1');
+	my $lastvalue1 = $query->param('lastvalue1');
+	my $add2 = $query->param('add2');
+	my $every2 = $query->param('every2');
+	my $whenmorethan2 = $query->param('whenmorethan2');
+	my $setto2 = $query->param('setto2');
+	my $lastvalue2 = $query->param('lastvalue2');
+	my $add3 = $query->param('add3');
+	my $every3 = $query->param('every3');
+	my $whenmorethan3 = $query->param('whenmorethan3');
+	my $setto3 = $query->param('setto3');
+	my $lastvalue3 = $query->param('lastvalue3');
+	my $numberingmethod = $query->param('numberingmethod');
+	my $status = 1;
+    my $biblionumber = $query->param('biblionumber');
+    my $notes = $query->param('notes');
+    my $letter = $query->param('letter');
+            my $hemisphere = $query->param('hemisphere') || 1;
+
+    my $subscriptionid = NewSubscription($auser,$aqbooksellerid,$cost,$aqbudgetid,$biblionumber,
+                    $startdate,$periodicity,$dow,$numberlength,$weeklength,$monthlength,
+                    $add1,$every1,$whenmorethan1,$setto1,$lastvalue1,
+                    $add2,$every2,$whenmorethan2,$setto2,$lastvalue2,
+                    $add3,$every3,$whenmorethan3,$setto3,$lastvalue3,
+                    $numberingmethod, $status, $notes, $letter,$irregularity,$hemisphere,$callnumber,$numberpattern,$publisheddate    );
+    print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
+} else {
+     while (@subscription_types) {
+           my $sub_type = shift @subscription_types;
+           my %row = ( 'name' => $sub_type );
+           if ( $sub_on eq $sub_type ) {
+	     $row{'selected'} = ' selected';
+           } else {
+	     $row{'selected'} = '';
+           }
+           push( @sub_type_data, \%row );
+        }    
+    $template->param(subtype => \@sub_type_data,
+ 	         weekarrayjs => $weekarrayjs,
+	         weekno => $weekno,
+	);
+    output_html_with_http_headers $query, $cookie, $template->output;
+}

Index: serials/subscription-bib-search.pl
===================================================================
RCS file: serials/subscription-bib-search.pl
diff -N serials/subscription-bib-search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/subscription-bib-search.pl	26 Mar 2007 02:19:26 -0000	1.5.2.2
@@ -0,0 +1,172 @@
+#!/usr/bin/perl
+# WARNING: 4-character tab stops here
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Context;
+use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Acquisition;
+use C4::Koha; # XXX subfield_is_koha_internal_p
+
+
+# Creates a scrolling list with the associated default value.
+# Using more than one scrolling list in a CGI assigns the same default value to all the
+# scrolling lists on the page !?!? That's why this function was written.
+
+my $query=new CGI;
+my $type=$query->param('type');
+my $op = $query->param('op');
+my $dbh = C4::Context->dbh;
+
+my $startfrom=$query->param('startfrom');
+$startfrom=0 if(!defined $startfrom);
+my ($template, $loggedinuser, $cookie);
+my $resultsperpage;
+
+if ($op eq "do_search") {
+	my @kohafield = $query->param('kohafield');
+	my @and_or = $query->param('and_or');
+	my @relation = $query->param('relation');
+	my @value = $query->param('value');
+	my $order=$query->param('order');
+	$resultsperpage= $query->param('resultsperpage');
+	$resultsperpage = 9 if(!defined $resultsperpage);
+	# builds tag and subfield arrays
+	
+	my ($total,$facets, at results) = ZEBRAsearch_kohafields(\@kohafield,\@value,\@relation,$order,\@and_or,1,"",$startfrom,$resultsperpage,"intranet");
+ 										
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "serials/result.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {borrowers => 1},
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+	# multi page display gestion
+	my $displaynext=0;
+	my $displayprev=$startfrom;
+	if(($total - (($startfrom+1)*($resultsperpage))) > 0 ){
+		$displaynext = 1;
+	}
+
+	my @field_data = ();
+
+
+	for(my $i = 0 ; $i <= $#value ; $i++)
+	{
+		push @field_data, { term => "kohafield", val=>$kohafield[$i] };
+		push @field_data, { term => "and_or", val=>$and_or[$i] };
+		push @field_data, { term => "relation", val=>$relation[$i] };
+		push @field_data, { term => "value", val=>$value[$i] };
+	}
+
+	my @numbers = ();
+
+	if ($total>$resultsperpage)
+	{
+		for (my $i=1; $i<$total/$resultsperpage+1; $i++)
+		{
+			if ($i<16)
+			{
+	    		my $highlight=0;
+	    		($startfrom==($i-1)) && ($highlight=1);
+	    		push @numbers, { number => $i,
+					highlight => $highlight ,
+					searchdata=> \@field_data,
+					startfrom => ($i-1)};
+			}
+    	}
+	}
+
+	my $from = $startfrom*$resultsperpage+1;
+	my $to;
+
+ 	if($total < (($startfrom+1)*$resultsperpage))
+	{
+		$to = $total;
+	} else {
+		$to = (($startfrom+1)*$resultsperpage);
+	}
+	$template->param(result => \@results,
+							startfrom=> $startfrom,
+							displaynext=> $displaynext,
+							displayprev=> $displayprev,
+							resultsperpage => $resultsperpage,
+							startfromnext => $startfrom+1,
+							startfromprev => $startfrom-1,
+							searchdata=>\@field_data,
+							total=>$total,
+							from=>$from,
+							to=>$to,
+							numbers=>\@numbers,
+							);
+} else {
+	($template, $loggedinuser, $cookie)
+		= get_template_and_user({template_name => "serials/subscription-bib-search.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+	my $sth=$dbh->prepare("Select itemtype,description from itemtypes order by description");
+	$sth->execute;
+	my  @itemtype;
+	my %itemtypes;
+	push @itemtype, "";
+	$itemtypes{''} = "";
+	while (my ($value,$lib) = $sth->fetchrow_array) {
+		push @itemtype, $value;
+		$itemtypes{$value}=$lib;
+	}
+
+	my $CGIitemtype=CGI::scrolling_list( -name     => 'value',
+				-values   => \@itemtype,
+ 				-labels   => \%itemtypes,
+				-size     => 1,
+	 			-tabindex=>'',
+				-multiple => 0 );
+	$sth->finish;
+
+	$template->param(
+			CGIitemtype => $CGIitemtype,
+			);
+}
+
+
+# Print the page
+$template->param(intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+		);
+output_html_with_http_headers $query, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: serials/subscription-detail.pl
===================================================================
RCS file: serials/subscription-detail.pl
diff -N serials/subscription-detail.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/subscription-detail.pl	26 Mar 2007 02:19:26 -0000	1.5.2.2
@@ -0,0 +1,129 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Koha;
+use C4::Date;
+use C4::Serials;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Context;
+use DateTime;
+use Date::Calc qw(:all);
+my $query = new CGI;
+my $op = $query->param('op');
+my $dbh = C4::Context->dbh;
+my $sth;
+# my $id;
+my ($template, $loggedinuser, $cookie, $subs);
+my ($subscriptionid,$auser,$librarian,$cost,$aqbooksellerid, $aqbooksellername,$aqbudgetid, $bookfundid, $startdate, $periodicity,
+	$publisheddate, $dow, $irregularity, $sublength, $subtype, $numberpattern, $numberlength, $weeklength, $monthlength,
+	$add1,$every1,$whenmorethan1,$setto1,$lastvalue1,$innerloop1,
+	$add2,$every2,$whenmorethan2,$setto2,$lastvalue2,$innerloop2,
+	$add3,$every3,$whenmorethan3,$setto3,$lastvalue3,$innerloop3,
+	$numberingmethod, $status, $biblionumber, $bibliotitle, $callnumber, $notes, $hemisphere);
+
+$subscriptionid = $query->param('subscriptionid');
+
+
+if ($op eq 'del') {
+$biblionumber = $query->param('biblionumber');
+	&DelSubscription($subscriptionid,$biblionumber);
+print	$query->redirect("/cgi-bin/koha/serials/serials-home.pl");
+#	exit;
+
+}
+my $subs = &GetSubscription($subscriptionid);
+my ($routing, @routinglist) = getroutinglist($subscriptionid);
+my ($totalissues, at serialslist) = GetSerials($subscriptionid);
+$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new subscription (only 1 issue)
+# the subscription must be deletable if there is NO issues for a reason or another (should not happend, but...)
+
+($template, $loggedinuser, $cookie)
+= get_template_and_user({template_name => "serials/subscription-detail.tmpl",
+				query => $query,
+				type => "intranet",
+				authnotrequired => 0,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+my ($user, $cookie, $sessionID, $flags)
+	= checkauth($query, 0, {catalogue => 1}, "intranet");
+
+my $weekarrayjs='';
+my $count = 0;
+my $today=get_today();
+ my ($year,$month,$day)=split /-|\/|\.|:/,$today;
+  
+my $firstday = Day_of_Year($year,$month,$day);
+my $wkno = Week_of_Year($year,$month,$day);  
+my $weekno = $wkno;
+for(my $i=$firstday;$i<($firstday+365);$i=$i+7){
+        $count = $i;
+        if($wkno > 52){$year++; $wkno=1;}
+        if($count>365){$count=$i-365;}    
+     my ($nyear,$nmonth,$nday)=Add_Delta_Days($year,1,1,$count-1);
+        $weekarrayjs .= "'Wk $wkno: ".format_date($nyear."-".$nmonth."-".$nday)."',";
+        $wkno++;    
+}
+chop($weekarrayjs);
+
+$template->param(
+        routing => $routing,
+	user => $subs->{auser},
+	librarian => $subs->{librarian},
+	aqbooksellerid => $subs->{aqbooksellerid},
+	aqbooksellername => $subs->{aqbooksellername},
+	cost => $subs->{cost},
+	aqbudgetid => $subs->{aqbudgetid},
+	bookfundid => $subs->{bookfundid},
+	startdate => format_date($subs->{startdate}),
+	publisheddate => format_date($subs->{publisheddate}),    
+	periodicity => $subs->{periodicity},
+	dow => $subs->{dow},
+        irregularity => $subs->{irregularity},
+	numberlength => $subs->{numberlength},
+	weeklength => $subs->{weeklength},
+	monthlength => $subs->{monthlength},
+        numberpattern => $subs->{numberpattern},
+	add1 => $subs->{add1},
+	every1 => $subs->{every1},
+	whenmorethan1 => $subs->{whenmorethan1},
+	innerloop1 => $subs->{innerloop1},
+	setto1 => $subs->{setto1},
+	lastvalue1 => $subs->{lastvalue1},
+	add2 => $subs->{add2},
+	every2 => $subs->{every2},
+	whenmorethan2 => $subs->{whenmorethan2},
+	setto2 => $subs->{setto2},
+	lastvalue2 => $subs->{lastvalue2},
+	innerloop2 => $subs->{innerloop2},
+	add3 => $subs->{add3},
+	every3 => $subs->{every3},
+	whenmorethan3 => $subs->{whenmorethan3},
+	setto3 => $subs->{setto3},
+	lastvalue3 => $subs->{lastvalue3},
+	innerloop3 => $subs->{innerloop3},
+        weekarrayjs => $weekarrayjs,
+	numberingmethod => $subs->{numberingmethod},
+	status => $subs->{status},
+	biblionumber => $subs->{biblionumber},
+	bibliotitle => $subs->{bibliotitle},
+        callnumber => $subs->{callnumber},
+	notes => $subs->{notes},
+	subscriptionid => $subs->{subscriptionid},
+	serialslist => \@serialslist,
+	totalissues => $totalissues,
+        hemisphere => $hemisphere,
+	);
+$template->param(
+			"periodicity$subs->{periodicity}" => 1,
+			"arrival$subs->{dow}" => 1,
+                        "numberpattern$subs->{numberpattern}" => 1,
+			intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+			intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), 
+			);
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: serials/subscription-renew.pl
===================================================================
RCS file: serials/subscription-renew.pl
diff -N serials/subscription-renew.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/subscription-renew.pl	26 Mar 2007 02:19:26 -0000	1.6.2.2
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+# WARNING: 4-character tab stops here
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: subscription-renew.pl,v 1.6.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+subscription-renew.pl
+
+=head1 DESCRIPTION
+
+this script renew an existing subscription.
+
+=head1 Parameters
+
+=over 4
+
+=item op
+op use to know the operation to do on this template.
+ * renew : to renew the subscription.
+
+Note that if op = modsubscription there are a lot of other parameters.
+
+=item subscriptionid
+Id of the subscription this script has to renew
+
+=back
+
+=cut
+
+
+use strict;
+require Exporter;
+use CGI;
+use C4::Koha;
+use C4::Auth;
+use C4::Date;
+use C4::Context;
+use C4::Search;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Serials;
+
+my $query = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $op = $query->param('op');
+my $subscriptionid = $query->param('subscriptionid');
+my $done = 0; # for after form has been submitted
+my ($template, $loggedinuser, $cookie)
+        = get_template_and_user({template_name => "serials/subscription-renew.tmpl",
+                query => $query,
+                type => "intranet",
+                authnotrequired => 0,
+                flagsrequired => {catalogue => 1},
+                debug => 1,
+                });
+if ($op eq "renew") {
+    ReNewSubscription($subscriptionid,$loggedinuser,$query->param('startdate'),$query->param('numberlength'),$query->param('weeklength'),$query->param('monthlength'),$query->param('note'));
+    $done = 1;
+}
+
+my $subscription= GetSubscription($subscriptionid);
+
+$template->param(startdate => format_date(GetSubscriptionExpirationDate($subscriptionid)),
+                numberlength => $subscription->{numberlength},
+                weeklength => $subscription->{weeklength},
+                monthlength => $subscription->{monthlength},
+                subscriptionid => $subscriptionid,
+                bibliotitle => $subscription->{bibliotitle},
+                $op => 1,
+                done => $done,
+                intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+                intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+                IntranetNav => C4::Context->preference("IntranetNav"),
+            );
+
+# Print the page
+output_html_with_http_headers $query, $cookie, $template->output;
+
+# Local Variables:
+# tab-width: 4
+# End:

Index: serials/viewalerts.pl
===================================================================
RCS file: serials/viewalerts.pl
diff -N serials/viewalerts.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ serials/viewalerts.pl	26 Mar 2007 02:19:26 -0000	1.4.2.2
@@ -0,0 +1,60 @@
+#!/usr/bin/perl
+
+# $Id: viewalerts.pl,v 1.4.2.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use C4::Context;
+
+use CGI;
+use C4::Interface::CGI::Output;
+
+use C4::Koha;
+use C4::Letters;
+use C4::Serials;
+
+my $dbh = C4::Context->dbh;
+
+my $input = new CGI;
+my $print = $input->param('print');
+
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => 'serials/viewalerts.tmpl',
+                 query => $input,
+                 type => "intranet",
+                 authnotrequired => 0,
+                 flagsrequired => {catalogue => 1},
+                 debug => 1,
+                 });
+
+my $subscriptionid=$input->param('subscriptionid');
+
+my $borrowers = getalert('','issue',$subscriptionid);
+my $subscription = GetSubscription($subscriptionid);
+
+foreach (@$borrowers) {
+    $_->{name} = findrelatedto('borrower',$_->{borrowernumber});
+}
+$template->param(alertloop => $borrowers,
+                bibliotitle => $subscription->{bibliotitle},
+                subscriptionid => $subscriptionid);
+
+output_html_with_http_headers $input, $cookie, $template->output;

Index: sms/sms.pl
===================================================================
RCS file: sms/sms.pl
diff -N sms/sms.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sms/sms.pl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::SMS;
+use C4::Interface::CGI::Output;
+use C4::Auth;
+my ($res,$ua);
+my %commands;
+my $query = new CGI;
+my $message=$query->param('message');
+my $phone=$query->param('phone');
+my $operation=$query->param('operation');
+my $result;
+my $errorcode;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "sms/sms-home.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {circulate => 1},
+			     debug => 1,
+			     });
+if ($operation eq"sendsms"){
+ $phone=parse_phone($phone);
+  if ($phone>0){
+##write to a queue and exit
+my $me=C4::Context->userenv;
+my $card=$me->{cardnumber};
+	 $result=write_sms($card,$message,$phone);
+
+  }else{
+  $errorcode=-1104;
+ }
+}
+my $error=error_codes($errorcode);
+$template->param(error=>$error);
+output_html_with_http_headers $query, $cookie, $template->output;
+
+
+
+
+

Index: sms/sms_listen.pl
===================================================================
RCS file: sms/sms_listen.pl
diff -N sms/sms_listen.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sms/sms_listen.pl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,131 @@
+#!/usr/bin/perl
+
+use strict;
+use C4::SMS;
+use C4::Auth;
+use C4::Context;
+use C4::Members;
+use C4::Circulation::Circ2;
+my ($res,$ua);
+my %commands;
+my $message;
+my $phone;
+my $result;
+my $errorcode;
+my $smsid;
+my $wait=600;## 10 mn. wait between sms checking
+my $dbh=C4::Context->dbh;
+
+STARTAGAIN:
+($res,$ua)=get_sms_auth();
+AGAIN:
+$errorcode=0;
+	if ($res->{pRetCode}==200){
+  	 $result=read_sms($ua,$res->{pSessionId});
+	$errorcode=$result->{pErrCode};
+print "connected\n";
+	}else{
+	kill_sms($ua,$res->{pSessionId});
+	warn (error_codes($res->{pErrCode}),$res->{pErrcode}) ;
+#	sleep $wait;
+	goto FINISH;
+
+	}
+if ($errorcode && $errorcode !=-9005){
+kill_sms($ua,$res->{pSessionId});
+warn error_codes($errorcode) ;
+# sleep $wait;
+goto FINISH;
+
+}elsif ($errorcode ==-9005){
+print "no more messages to read\n";
+goto WAITING;
+}
+#Parse the message to a useful hash
+my @action=parse_message( $result->{pContent});
+## Log the request in our database;
+ $smsid=write_sms($action[1], $result->{pContent},$result->{pMsisdn});
+print "message logged\n";
+##Now do the service required
+if (uc($action[0]) eq "RN"){
+print "dealing request\n";
+my ($ok,$cardnumber)=C4::Auth::checkpw($dbh,$action[1],$action[2]);
+    if($ok){
+	my $item=getiteminformation(undef,0,$action[3]);
+	   if ($item){
+		my $borrower=getmember($cardnumber);
+		my $status=renewstatus(undef,$borrower->{borrowernumber},$item->{itemnumber});
+		if ($status==1){
+		my $date=renewbook(undef,$borrower->{borrowernumber},$item->{itemnumber});
+		$message="Uzatildi :Renewed ".$item->{barcode}." : ".$date;
+		my $send=send_message($result,$message,$smsid);
+		}elsif($status==2){
+		 $message="Cok erken- yenilenmedi! :Too early-not renewed:".$item->{barcode};
+	   	my $send=send_message($result,$message,$smsid);
+		}elsif($status==3){
+		 $message="Uzatamazsiniz GERI getiriniz! :No more renewals RETURN the item:".$item->{barcode};
+	   	my $send=send_message($result,$message,$smsid);
+		}elsif($status==4){
+		 $message="Ayirtildi GERI getiriniz! :Reserved RETURN the item:".$item->{barcode};
+	   	my $send=send_message($result,$message,$smsid);
+		}elsif($status==0){
+		 $message="Uzatilamaz! :Can not renew:".$item->{barcode};
+	   	my $send=send_message($result,$message,$smsid);
+		}
+	    }else{
+	   $message="Yanlis barkot! :Wrong barcode!";
+	   my $send=send_message($result,$message,$smsid);
+	  }#wrong barcode
+    }else{
+	$message="Yanlis kullanici/sifre! :Wrong username/password!";
+	my $send=send_message($result,$message,$smsid);
+    }##wrong user/pass
+}else{
+## reply about error
+$message="Yanlis mesaj formati! :Wrong message! :
+		 RN usercardno password barcode";
+my $send=send_message($result,$message,$smsid);
+}### wrong service
+
+goto AGAIN;
+
+
+
+
+WAITING:
+##Now send the messages waiting in queue
+my $smssth=$dbh->prepare("SELECT smsid,user_phone,message from sms_messages where date_replied like '0000-00-00%' ");
+$smssth->execute();
+my @phones;
+while (my $data=$smssth->fetchrow_hashref){
+push @phones,$data;
+}
+$smssth->finish;
+
+foreach my $user(@phones){
+print "replying $user->{user_phone}";
+my $send=send_sms($ua,$user->{user_phone},$user->{message},$res->{pSessionId});
+my $reply="--failed\n";
+	if ($send->{pRetCode}==200){
+$reply= "--replied\n";
+	mod_sms($user->{smsid},"Sent");
+	}
+print $reply;
+}
+$dbh->disconnect;
+
+
+sub send_message{
+my ($mes,$message,$smsid)=@_;
+my $send=send_sms($ua,$mes->{pMsisdn},$message,$res->{pSessionId});
+	if ($send->{pRetCode}==200){
+	mod_sms($smsid,$message);
+	}else{
+	my $error=error_codes($send->{pErrCode});
+	mod_sms($smsid,"Not replied error:".$error);
+	}
+return $send;
+}
+FINISH:
+1;
+__END__
\ No newline at end of file

Index: sms/sms_listen_windows_start.pl
===================================================================
RCS file: sms/sms_listen_windows_start.pl
diff -N sms/sms_listen_windows_start.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sms/sms_listen_windows_start.pl	26 Mar 2007 02:19:26 -0000	1.1.2.1
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+# script that starts the zebraquee
+#  Written by TG on 01/08/2006
+use strict;
+
+use Win32::Process;
+use Win32;
+use C4::Context;
+use CGI;
+my $input=new CGI;
+my $fileplace=C4::Context->config('intranetdir');
+my $fullpath=$fileplace."/cgi-bin/sms";
+my $ZebraObj;
+ my $pid=Win32::Process::Create($ZebraObj,	"C:/usr/bin/perl.exe",'perl sms_listen.pl',	0, DETACHED_PROCESS,$fullpath)  ;
+
+print $input->redirect("/cgi-bin/koha/mainpage.pl?pid=$pid");

Index: suggestion/acceptorreject.pl
===================================================================
RCS file: suggestion/acceptorreject.pl
diff -N suggestion/acceptorreject.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ suggestion/acceptorreject.pl	26 Mar 2007 02:19:26 -0000	1.4.4.2
@@ -0,0 +1,126 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: acceptorreject.pl,v 1.4.4.2 2007/03/26 02:19:26 tgarip1957 Exp $
+
+=head1 NAME
+
+acceptorreject.pl
+
+=head1 DESCRIPTION
+
+this script modify the status of a subscription to ACCEPTED or to REJECTED
+
+=head1 PARAMETERS
+
+=over 4
+
+=item title
+
+=item author
+
+=item note
+
+=item copyrightdate
+
+=item publishercode
+
+=item volumedesc
+
+=item publicationyear
+
+=item place
+
+=item isbn
+
+=item status
+
+=item suggestedbyme
+
+=item op
+op can be :
+ * aorr_confirm : to confirm accept or reject
+ * delete_confirm : to confirm the deletion
+
+=back
+
+
+=cut
+
+
+use strict;
+require Exporter;
+use CGI;
+use C4::Auth;       # get_template_and_user
+use C4::Interface::CGI::Output;
+use C4::Suggestions;
+
+my $input = new CGI;
+my $title = $input->param('title');
+my $author = $input->param('author');
+my $note = $input->param('note');
+my $copyrightdate =$input->param('copyrightdate');
+my $publishercode = $input->param('publishercode');
+my $volumedesc = $input->param('volumedesc');
+my $publicationyear = $input->param('publicationyear');
+my $place = $input->param('place');
+my $isbn = $input->param('isbn');
+my $status = $input->param('status');
+my $suggestedbyme = $input->param('suggestedbyme');
+my $op = $input->param('op');
+$op = 'else' unless $op;
+
+my $dbh = C4::Context->dbh;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "suggestion/acceptorreject.tmpl",
+			    query           => $input,
+        			type            => "intranet",
+       			 authnotrequired => 0,
+       			 flagsrequired   => { acquisition => 1 },
+       			debug           => 1,
+  			  });
+if ($op eq "aorr_confirm") {
+	my @suggestionlist = $input->param("aorr");
+	foreach my $suggestion (@suggestionlist) {
+		if ($suggestion =~ /(A|R)(.*)/) {
+			my ($newstatus,$suggestionid) = ($1,$2);
+			$newstatus="REJECTED" if $newstatus eq "R";
+			$newstatus="ACCEPTED" if $newstatus eq "A";
+			ModStatus($suggestionid,$newstatus,$loggedinuser,'',$input);
+		}
+	}
+	$op="else";
+}
+
+if ($op eq "delete_confirm") {
+	my @delete_field = $input->param("delete_field");
+	foreach my $delete_field (@delete_field) {
+		&DelSuggestion($loggedinuser,$delete_field);
+	}
+	$op='else';
+}
+
+my $suggestions_loop= &SearchSuggestion("","","","",'ASKED',"");
+$template->param(suggestions_loop => $suggestions_loop,
+		"op_$op" => 1,
+		intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
+		intranetstylesheet => C4::Context->preference("intranetstylesheet"),
+		IntranetNav => C4::Context->preference("IntranetNav"),
+);
+output_html_with_http_headers $input, $cookie, $template->output;

Index: tools/exceptionHolidays.pl
===================================================================
RCS file: tools/exceptionHolidays.pl
diff -N tools/exceptionHolidays.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/exceptionHolidays.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+
+use C4::Auth;
+
+use C4::Interface::CGI::Output;
+use C4::Calendar::Calendar;
+
+my $input = new CGI;
+my $dbh = C4::Context->dbh();
+
+my $branchcode = $input->param('showBranchName');
+my $weekday = $input->param('showWeekday');
+my $day = $input->param('showDay');
+my $month = $input->param('showMonth');
+my $year = $input->param('showYear');
+my $title = $input->param('showTitle');
+my $description = $input->param('showDescription');
+
+my $calendar = C4::Calendar::Calendar->new(branchcode => $branchcode);
+
+if ($input->param('showOperation') eq 'exception') {
+	$calendar->insert_exception_holiday(day => $day,
+										month => $month,
+									    year => $year,
+						                title => $title,
+						                description => $description);
+} elsif ($input->param('showOperation') eq 'delete') {
+	$calendar->delete_holiday(weekday => $weekday,
+	                          day => $day,
+  	                          month => $month,
+				              year => $year);
+}
+print $input->redirect("/cgi-bin/koha/tools/holidays.pl?branch=$branchcode");

Index: tools/export.pl
===================================================================
RCS file: tools/export.pl
diff -N tools/export.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/export.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+use strict;
+
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use CGI;
+use C4::Auth;
+use MARC::Record;
+use MARC::File::XML;
+my $query = new CGI;
+my $op=$query->param("op");
+if ($op eq "export") {
+	print $query->header('Content-Type: text/marc');
+	my $start_bib = $query->param("start_bib");
+	my $end_bib = $query->param("end_bib");
+	my $dbh=C4::Context->dbh;
+	my $sth;
+	if ($start_bib && $end_bib) {
+		$sth=$dbh->prepare("select marcxml from biblio where biblionumber >=? and biblionumber <=? order by biblionumber");
+		$sth->execute($start_bib,$end_bib);
+	} elsif ($start_bib ) {
+		$sth=$dbh->prepare("select marcxml from biblio where biblionumber >=?  order by biblionumber");
+		$sth->execute($start_bib);
+	}else {
+		$sth=$dbh->prepare("select marcxml from biblio order by biblionumber");
+		$sth->execute();
+	}
+	while (my ($marc) = $sth->fetchrow) {
+my $record=MARC::Record->new_from_xml($marc,"UTF-8");
+	
+		print $record->as_usmarc;;
+	
+	}
+} else {
+	my ($template, $loggedinuser, $cookie)
+	= get_template_and_user({template_name => "tools/marc.tmpl",
+					query => $query,
+					type => "intranet",
+					authnotrequired => 0,
+					flagsrequired => {parameters => 1, management => 1, tools => 1},
+					debug => 1,
+					});
+	output_html_with_http_headers $query, $cookie, $template->output;
+}
+

Index: tools/fines2.pl
===================================================================
RCS file: tools/fines2.pl
diff -N tools/fines2.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/fines2.pl	26 Mar 2007 02:19:27 -0000	1.1.2.1
@@ -0,0 +1,135 @@
+#!/usr/bin/perl
+
+#  This script loops through each overdue item, determines the fine,
+#  and updates the total amount of fines due by each user.  It relies on
+#  the existence of /tmp/fines, which is created by ???
+# Doesnt really rely on it, it relys on being able to write to /tmp/
+# It creates the fines file
+#
+#  This script is meant to be run nightly out of cron.
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+# $Id: fines2.pl,v 1.1.2.1 2007/03/26 02:19:27 tgarip1957 Exp $
+
+use C4::Context;
+use C4::Search;
+use C4::Circulation::Circ2;
+use C4::Circulation::Fines;
+use C4::Accounts2;
+use C4::Date;
+use C4::Biblio;
+
+#
+my ($numOverdueItems,$data)=Getoverdues();
+print $numOverdueItems if $DEBUG;
+my $overdueItemsCounted=0 if $DEBUG;
+
+# FIXME - There's got to be a better way to figure out what day
+# today is.
+
+
+my $date=get_today();
+
+print $date if $DEBUG;
+
+my $bornum;
+
+# FIXME
+# $total isn't used anywhere else in the file,
+# can we delete it?
+#
+my $total=0;
+
+
+for (my $i=0;$i<$numOverdueItems;$i++){
+  my @dates=split('-',$data->[$i]->{'date_due'});
+  my $date2=$data->[$i]->{'date_due'};
+  my $due=format_date($date2);
+  my $borrower=BorType($data->[$i]->{'borrowernumber'});
+  if ($date2 lt $date){
+    $overdueItemsCounted++ if $DEBUG;
+my $difference;
+eval {
+   $difference=DATE_diff($date,$date2);
+};
+if ($@){
+print "$data->[$i]->{itemnumber} faulty:";
+}
+#print "$date,$date2,$difference\n";
+    my ($amount,$type,$printout)=
+	CalcFine($data->[$i]->{'itemnumber'},
+		 $borrower->{'categorycode'},
+		 $difference) if $difference>0;
+  
+    if ($amount > 0){
+      UpdateFine($data->[$i]->{'itemnumber'},$data->[$i]->{'borrowernumber'},$amount,$type,$due);
+
+#print "$data->[$i]->{'borrowernumber'},$amount,$printout\n";
+       if ($borrower->{'categorycode'} eq 'C'){ 
+	 my $dbh = C4::Context->dbh;
+	 my $sth=$dbh->prepare("Select * from borrowers where borrowernumber=?");
+	 $sth->execute($borrower->{'guarantor'});
+	 my $tdata=$sth->fetchrow_hashref;
+	 $sth->finish;
+	 $borrower->{'phone'}=$tdata->{'phone'};
+       }
+#       print "$printout\t$borrower->{'cardnumber'}\t$borrower->{'categorycode'}\t$borrower->{'firstname'}\t$borrower->{'surname'}\t$data->[$i]->{'date_due'}\t$type\t$difference\t$borrower->{'emailaddress'}\t$borrower->{'phone'}\t$borrower->{'streetaddress'}\t$borrower->{'city'}\t$amount\n";
+    } 
+
+
+    if ($printout eq "Final"){ # FIXME
+	                    # this should be a separate function
+                            #
+      my $borrower=BorType($data->[$i]->{'borrowernumber'});
+      if ($borrower->{'cardnumber'} ne ''){
+        my $cost=ReplacementCost($data->[$i]->{'itemnumber'});
+	 $cost=C4::Context->preference('replacementcost') unless $cost;
+	my $dbh = C4::Context->dbh;
+	my $env;
+	my $accountno=getnextacctno($env,$data->[$i]->{'borrowernumber'},$dbh);
+	
+	 my $item=getiteminformation("",$data->[$i]->{'itemnumber'});
+	
+	if ($item->{'itemlost'} ne '1' && $item->{'itemoverdue'} ne '1' ){
+	  my $sth=$dbh->prepare("Insert into accountlines
+	  (borrowernumber,itemnumber,accountno,date,amount,
+	  description,accounttype,amountoutstanding) values
+	  (?,?,?,now(),?,?,'L',?)");
+	  $sth->execute($data->[$i]->{'borrowernumber'},$data->[$i]->{'itemnumber'},
+	  $accountno,$cost,"Replacement  fee  $item->{'title'} $due",$cost);
+	  $sth->finish;
+	 XMLmoditemonefield($dbh,$item->{'biblionumber'},$item->{'itemnumber'},"itemoverdue","1");
+	}	
+      }
+    }
+
+  }
+}
+
+ if ($DEBUG) {
+   print <<EOM
+
+Number of Overdue Items counted $overdueItemsCounted
+Number of Overdue Items reported $numOverdueItems
+
+EOM
+ }
+
+close FILE;
+

Index: tools/fines_windows_start.pl
===================================================================
RCS file: tools/fines_windows_start.pl
diff -N tools/fines_windows_start.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/fines_windows_start.pl	26 Mar 2007 02:19:27 -0000	1.1.2.1
@@ -0,0 +1,16 @@
+#!/usr/bin/perl
+
+#  Written by TG on 01/08/2006
+use strict;
+
+use Win32::Process;
+use Win32;
+use C4::Context;
+use CGI;
+my $input=new CGI;
+my $fileplace=C4::Context->config('intranetdir');
+my $fullpath=$fileplace."/cgi-bin/tools";
+my $ZebraObj;
+ my $pid=Win32::Process::Create($ZebraObj,	"C:/perl/bin/perl.exe",'perl fines2.pl',	0, DETACHED_PROCESS,$fullpath)  ;
+
+print $input->redirect("/cgi-bin/koha/mainpage.pl?pid=$pid");

Index: tools/holidays.pl
===================================================================
RCS file: tools/holidays.pl
diff -N tools/holidays.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/holidays.pl	26 Mar 2007 02:19:27 -0000	1.3.4.2
@@ -0,0 +1,100 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+
+use C4::Auth;
+
+use C4::Interface::CGI::Output;
+
+use C4::Calendar::Calendar;
+
+my $input = new CGI;
+my $branch = $input->param('branch');
+$branch=C4::Context->preference('defaultBranch') unless $branch;
+my $dbh = C4::Context->dbh();
+
+# Set all the branches.
+my $branches = $dbh->prepare("select branchcode, branchname from branches");
+$branches->execute;
+# It creates a list of branches
+my %list;
+while (my ($branchcode, $branchname) = $branches->fetchrow) {
+	$list{$branchcode} = $branchname;
+}
+my @listValues = keys(%list);
+if (!defined($branch)) {
+	$branch =$listValues[4];
+}
+my $branchesList = CGI::scrolling_list(-name => 'branch', -id=>'branch',
+                           		       -values => \@listValues,
+			                           -labels => \%list,
+			                           -size => 1,
+					 -default => [$branch],
+			                           -multiple => 0,
+					 -onChange => "changeBranch()");
+
+$branches->finish;
+
+# Get all the holidays
+my $calendar = C4::Calendar::Calendar->new(branchcode => $branch);
+my $week_days_holidays = $calendar->get_week_days_holidays();
+my @week_days;
+foreach my $weekday (keys %$week_days_holidays) {
+	my %week_day;
+	%week_day = (KEY => $weekday,
+		         TITLE => $week_days_holidays->{$weekday}{title},
+		         DESCRIPTION => $week_days_holidays->{$weekday}{description});
+	push @week_days, \%week_day;
+}
+
+my $day_month_holidays = $calendar->get_day_month_holidays();
+my @day_month_holidays;
+foreach my $monthDay (keys %$day_month_holidays) {
+	my %day_month;
+	%day_month = (KEY => $monthDay,
+		          TITLE => $day_month_holidays->{$monthDay}{title},
+		          DESCRIPTION => $day_month_holidays->{$monthDay}{description});
+	push @day_month_holidays, \%day_month;
+}
+
+my $exception_holidays = $calendar->get_exception_holidays();
+my @exception_holidays;
+foreach my $yearMonthDay (keys %$exception_holidays) {
+	my %exception_holiday;
+	%exception_holiday = (KEY => $yearMonthDay,
+		                  TITLE => $exception_holidays->{$yearMonthDay}{title},
+		                  DESCRIPTION => $exception_holidays->{$yearMonthDay}{description});
+	push @exception_holidays, \%exception_holiday;
+}
+
+my $single_holidays = $calendar->get_single_holidays();
+my @holidays;
+foreach my $yearMonthDay (keys %$single_holidays) {
+	my %holiday;
+	%holiday = (KEY => $yearMonthDay,
+		        TITLE => $single_holidays->{$yearMonthDay}{title},
+		        DESCRIPTION => $single_holidays->{$yearMonthDay}{description});
+	push @holidays, \%holiday;
+}
+
+# Get the template to use
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "tools/holidays.tmpl",
+			                 type => "intranet",
+			                 query => $input,
+			                 authnotrequired => 0,
+			                 flagsrequired => {parameters => 1},
+					         debug => 1,
+			               });
+
+# Replace the template values with the real ones
+$template->param(BRANCHES => $branchesList);
+$template->param(WEEK_DAYS_LOOP => \@week_days);
+$template->param(HOLIDAYS_LOOP => \@holidays);
+$template->param(EXCEPTION_HOLIDAYS_LOOP => \@exception_holidays);
+$template->param(DAY_MONTH_HOLIDAYS_LOOP => \@day_month_holidays);
+$template->param(branch => $branch);
+
+# Shows the template with the real values replaced
+output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: tools/import.pl
===================================================================
RCS file: tools/import.pl
diff -N tools/import.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/import.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+# $Id: import.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Script for handling import of MARC data into Koha db
+#   and Z39.50 lookups
+
+# Koha library project  www.koha.org
+
+# Licensed under the GPL
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+
+# standard or CPAN modules used
+use CGI;
+
+# Koha modules used
+use C4::Context;
+use C4::Interface::CGI::Output;
+use C4::Auth;
+use C4::Breeding;
+
+#------------------
+# Constants
+
+
+
+# HTML colors for alternating lines
+my $lc1='#dddddd';
+my $lc2='#ddaaaa';
+
+#-------------
+#-------------
+# Initialize
+
+my $userid=$ENV{'REMOTE_USER'};
+
+my $input = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $uploadmarc=$input->param('uploadmarc');
+my $overwrite_biblio = $input->param('overwrite_biblio');
+my $filename = $input->param('filename');
+my $syntax = $input->param('syntax');
+my ($template, $loggedinuser, $cookie)
+	= get_template_and_user({template_name => "tools/import.tmpl",
+					query => $input,
+					type => "intranet",
+					authnotrequired => 0,
+					flagsrequired => {parameters => 1, management => 1, tools => 1},
+					debug => 1,
+					});
+
+$template->param(SCRIPT_NAME => $ENV{'SCRIPT_NAME'},
+						uploadmarc => $uploadmarc);
+if ($uploadmarc && length($uploadmarc)>0) {
+	my $marcrecord='';
+	while (<$uploadmarc>) {
+		$marcrecord.=$_;
+	}
+	my ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported) = ImportBreeding($marcrecord,$overwrite_biblio,$filename,$syntax,"");
+
+	$template->param(imported => $imported,
+							alreadyindb => $alreadyindb,
+							alreadyinfarm => $alreadyinfarm,
+							notmarcrecord => $notmarcrecord,
+							total => $imported+$alreadyindb+$alreadyinfarm+$notmarcrecord,
+							);
+
+}
+
+output_html_with_http_headers $input, $cookie, $template->output;
+my $menu;
+my $file;
+
+
+#---------------
+# log cleared, as marcimport is (almost) rewritten from scratch.
+# $Log: import.pl,v $
+# Revision 1.3.2.2  2007/03/26 02:19:27  tgarip1957
+# Recommiting everything
+#
+# Revision 1.3  2006/09/27 21:19:22  tgarip1957
+# Finalized XML version for intranet
+#
+# Revision 1.2.4.1  2005/04/07 10:10:52  tipaul
+# copying processz3950queue from 2.0 branch. The 2.2 version misses an important fix
+#

Index: tools/koha-news.pl
===================================================================
RCS file: tools/koha-news.pl
diff -N tools/koha-news.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/koha-news.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,98 @@
+#!/usr/bin/perl
+
+# Script to manage the opac news.
+# written 11/04
+# Castañeda, Carlos Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina
+# Modified to include news to KOHA intranet - tgarip at neu.edu.tr NEU library -Cyprus
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+
+use C4::Auth;
+use C4::Koha;
+use C4::Context;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::NewsChannels;
+
+
+my $cgi = new CGI;
+
+my $id		= $cgi->param('id');
+my $title	= $cgi->param('title');
+my $new		= $cgi->param('new');
+my $lang	= $cgi->param('lang');
+my $new_detail = get_opac_new($id);
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "tools/koha-news.tmpl",
+			     query => $cgi,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {management => 1},
+			     debug => 1,
+			     });
+
+# get lang list
+my @lang_list;
+
+foreach my $language (getalllanguages()) {
+	push @lang_list, { language => $language,
+						selected => ($new_detail->{lang} eq $language?1:0),
+					};
+}
+$template->param(lang_list => \@lang_list);
+
+my $op = $cgi->param('op');
+
+if ($op eq 'add_form') {
+	$template->param(add_form => 1);
+	if ($id) {
+		$template->param(op => 'edit');
+		$template->param($new_detail);
+		$template->param(id => $new_detail->{'idnew'});
+	} else {
+		$template->param(op => 'add');
+	}
+	
+} elsif ($op eq 'add') {
+
+	add_opac_new($title, $new, $lang);
+#	print $cgi->redirect('/cgi-bin/koha/tools/koha-news.pl');
+
+} elsif ($op eq 'edit') {
+
+	upd_opac_new($id, $title, $new, $lang);
+#	print $cgi->redirect('/cgi-bin/koha/tools/koha-news.pl');
+
+} elsif ($op eq 'del') {
+	my @ids = $cgi->param('ids');
+	del_opac_new(join ",", @ids);
+#	print $cgi->redirect('/cgi-bin/koha/tools/koha-news.pl');
+
+} 
+
+	my ($opac_news_count, $opac_news) = &get_opac_news(undef, $lang);
+	$template->param($lang => 1);
+	$template->param(opac_news => $opac_news);
+	$template->param(opac_news_count => $opac_news_count);
+
+
+
+output_html_with_http_headers $cgi, $cookie, $template->output;

Index: tools/letter.pl
===================================================================
RCS file: tools/letter.pl
diff -N tools/letter.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/letter.pl	26 Mar 2007 02:19:27 -0000	1.1.4.2
@@ -0,0 +1,229 @@
+#!/usr/bin/perl
+
+#script to administer the aqbudget table
+#written 20/02/2002 by paul.poulain at free.fr
+# This software is placed under the gnu General Public License, v2 (http://www.gnu.org/licenses/gpl.html)
+
+# ALGO :
+# this script use an $op to know what to do.
+# if $op is empty or none of the above values,
+#	- the default screen is build (with all records, or filtered datas).
+#	- the   user can clic on add, modify or delete record.
+# if $op=add_form
+#	- if primkey exists, this is a modification,so we read the $primkey record
+#	- builds the add/modify form
+# if $op=add_validate
+#	- the user has just send datas, so we create/modify the record
+# if $op=delete_form
+#	- we show the record having primkey=$primkey and ask for deletion validation form
+# if $op=delete_confirm
+#	- we delete the record having primkey=$primkey
+
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Date;
+use C4::Auth;
+use C4::Context;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Search;
+use HTML::Template;
+
+sub StringSearch  {
+	my ($env,$searchstring,$type)=@_;
+	my $dbh = C4::Context->dbh;
+	$searchstring=~ s/\'/\\\'/g;
+	my @data=split(' ',$searchstring);
+	my $count=@data;
+	my $sth=$dbh->prepare("Select * from letter where (code like ?) order by module,code");
+	$sth->execute("$data[0]%");
+	my @results;
+	my $cnt=0;
+	while (my $data=$sth->fetchrow_hashref){
+	push(@results,$data);
+	$cnt ++;
+	}
+	#  $sth->execute;
+	$sth->finish;
+	return ($cnt,\@results);
+}
+
+my $input = new CGI;
+my $searchfield=$input->param('searchfield');
+my $offset=$input->param('offset');
+my $script_name="/cgi-bin/koha/tools/letter.pl";
+my $code=$input->param('code');
+my $module = $input->param('module');
+my $pagesize=20;
+my $op = $input->param('op');
+$searchfield=~ s/\,//g;
+my $dbh = C4::Context->dbh;
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "tools/letter.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {tools => 1},
+			     debug => 1,
+			     });
+
+if ($op) {
+$template->param(script_name => $script_name,
+						$op              => 1); # we show only the TMPL_VAR names $op
+} else {
+$template->param(script_name => $script_name,
+						else              => 1); # we show only the TMPL_VAR names $op
+}
+
+$template->param(action => $script_name);
+################## ADD_FORM ##################################
+# called by default. Used to create form to add or  modify a record
+if ($op eq 'add_form') {
+	#---- if primkey exists, it's a modify action, so read values to modify...
+	my $letter;
+	if ($code) {
+		my $sth=$dbh->prepare("select * from letter where module=? and code=?");
+		$sth->execute($module,$code);
+		$letter=$sth->fetchrow_hashref;
+		$sth->finish;
+	}
+	# build field list
+	my @SQLfieldname;
+	my %line = ('value' => "LibrarianFirstname", 'text' => 'LibrarianFirstname');
+	push @SQLfieldname, \%line;
+	my %line = ('value' => "LibrarianSurname", 'text' => 'LibrarianSurname');
+	push @SQLfieldname, \%line;
+	my %line = ('value' => "LibrarianEmailaddress", 'text' => 'LibrarianEmailaddress');
+	push @SQLfieldname, \%line;
+	my $sth2=$dbh->prepare("SHOW COLUMNS from branches");
+	$sth2->execute;
+	my %line = ('value' => "", 'text' => '---BRANCHES---');
+	push @SQLfieldname, \%line;
+	while ((my $field) = $sth2->fetchrow_array) {
+		my %line = ('value' => "branches.".$field, 'text' => "branches.".$field);
+		push @SQLfieldname, \%line;
+	}
+	my $sth2=$dbh->prepare("SHOW COLUMNS from biblio");
+	$sth2->execute;
+	my %line = ('value' => "", 'text' => '---BIBLIO---');
+
+	push @SQLfieldname, \%line;
+	while ((my $field) = $sth2->fetchrow_array) {
+		# note : %line is redefined, otherwise \%line contains the same value for every entry of the list
+		my %line = ('value' => "biblio.".$field, 'text' => "biblio.".$field);
+		push @SQLfieldname, \%line;
+	}
+	my $sth2=$dbh->prepare("SHOW COLUMNS from biblioitems");
+	$sth2->execute;
+	my %line = ('value' => "", 'text' => '---BIBLIOITEMS---');
+	push @SQLfieldname, \%line;
+	while ((my $field) = $sth2->fetchrow_array) {
+		my %line = ('value' => "biblioitems.".$field, 'text' => "biblioitems.".$field);
+		push @SQLfieldname, \%line;
+	}
+	my %line = ('value' => "", 'text' => '---ITEMS---');
+	push @SQLfieldname, \%line;
+	my %line = ('value' => "items.content", 'text' => 'items.content');
+	push @SQLfieldname, \%line;
+	
+	my $sth2=$dbh->prepare("SHOW COLUMNS from borrowers");
+	$sth2->execute;
+	my %line = ('value' => "", 'text' => '---BORROWERS---');
+	push @SQLfieldname, \%line;
+	while ((my $field) = $sth2->fetchrow_array) {
+		my %line = ('value' => "borrowers.".$field, 'text' => "borrowers.".$field);
+		push @SQLfieldname, \%line;
+	}
+	if ($code) {
+	    $template->param(modify => 1);
+	    $template->param(code => $letter->{code});
+	} else {
+	    $template->param(adding => 1);
+	}
+	$template->param(name => $letter->{name},title => $letter->{title},
+					content => $letter->{content},
+					$letter->{module} => 1,
+					SQLfieldname => \@SQLfieldname,);
+													# END $OP eq ADD_FORM
+################## ADD_VALIDATE ##################################
+# called by add_form, used to insert/modify data in DB
+} elsif ($op eq 'add_validate') {
+	my $dbh = C4::Context->dbh;
+	my $sth=$dbh->prepare("replace letter (module,code,name,title,content) values (?,?,?,?,?)");
+	$sth->execute($input->param('module'),$input->param('code'),$input->param('name'),$input->param('title'),$input->param('content'));
+	$sth->finish;
+	 print $input->redirect("letter.pl");
+	 exit;
+# END $OP eq ADD_VALIDATE
+################## DELETE_CONFIRM ##################################
+# called by default form, used to confirm deletion of data in DB
+} elsif ($op eq 'delete_confirm') {
+	my $dbh = C4::Context->dbh;
+	my $sth=$dbh->prepare("select * from letter where code=?");
+	$sth->execute($code);
+	my $data=$sth->fetchrow_hashref;
+	$sth->finish;
+	$template->param(module => $data->{module});
+	$template->param(code => $code);
+	$template->param(name => $data->{'name'});
+	$template->param(content => $data->{'content'});
+													# END $OP eq DELETE_CONFIRM
+################## DELETE_CONFIRMED ##################################
+# called by delete_confirm, used to effectively confirm deletion of data in DB
+} elsif ($op eq 'delete_confirmed') {
+	my $dbh = C4::Context->dbh;
+	my $code=uc($input->param('code'));
+	my $module=$input->param('module');
+	my $sth=$dbh->prepare("delete from letter where module=? and code=?");
+	$sth->execute($module,$code);
+	$sth->finish;
+	 print $input->redirect("letter.pl");
+	 return;
+													# END $OP eq DELETE_CONFIRMED
+################## DEFAULT ##################################
+} else { # DEFAULT
+	if  ($searchfield ne '') {
+	        $template->param(search => 1);
+		$template->param(searchfield => $searchfield);
+	}
+	my $env;
+	my ($count,$results)=StringSearch($env,$searchfield,'web');
+	my $toggle="white";
+	my @loop_data =();
+	for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
+	  	if ($toggle eq 'white'){
+	    		$toggle="#ffffcc";
+	  	} else {
+	    		$toggle="white";
+	  	}
+	   my %row_data;
+	   $row_data{toggle} = $toggle;
+	   $row_data{module} = $results->[$i]{'module'};
+	   $row_data{code} = $results->[$i]{'code'};
+	   $row_data{name} = $results->[$i]{'name'};
+	   push(@loop_data, \%row_data);
+	}
+	$template->param(letter => \@loop_data);
+} #---- END $OP eq DEFAULT
+
+output_html_with_http_headers $input, $cookie, $template->output;
+

Index: tools/newHolidays.pl
===================================================================
RCS file: tools/newHolidays.pl
diff -N tools/newHolidays.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/newHolidays.pl	26 Mar 2007 02:19:27 -0000	1.2.4.2
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+
+use C4::Auth;
+use C4::Output;
+use C4::Interface::CGI::Output;
+use C4::Calendar::Calendar;
+
+my $input = new CGI;
+my $dbh = C4::Context->dbh();
+
+my $branchcode = $input->param('newBranchName');
+my $weekday = $input->param('newWeekday');
+my $day = $input->param('newDay');
+my $month = $input->param('newMonth');
+my $year = $input->param('newYear');
+my $title = $input->param('newTitle');
+my $description = $input->param('newDescription');
+
+my $calendar = C4::Calendar::Calendar->new(branchcode => $branchcode);
+
+if ($input->param('newOperation') eq 'weekday') {
+	$calendar->insert_week_day_holiday(weekday => $weekday,
+							           title => $title,
+							           description => $description);
+} elsif ($input->param('newOperation') eq 'repeatable') {
+	$calendar->insert_day_month_holiday(day => $day,
+	                                    month => $month,
+							            title => $title,
+							            description => $description);
+} elsif ($input->param('newOperation') eq 'holiday') {
+	$calendar->insert_single_holiday(day => $day,
+	                                 month => $month,
+						             year => $year,
+						             title => $title,
+						             description => $description);
+
+}
+print $input->redirect("/cgi-bin/koha/tools/holidays.pl?branch=$branchcode");
\ No newline at end of file

Index: tools/overduerules.pl
===================================================================
RCS file: tools/overduerules.pl
diff -N tools/overduerules.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/overduerules.pl	26 Mar 2007 02:19:27 -0000	1.4.2.2
@@ -0,0 +1,202 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+use C4::Context;
+use C4::Auth;
+use C4::Koha;
+use C4::Interface::CGI::Output;
+
+
+my $input = new CGI;
+my $dbh = C4::Context->dbh;
+
+my $type=$input->param('type');
+my $branch = $input->param('branch');
+$branch="" unless $branch;
+my $op = $input->param('op');
+
+# my $flagsrequired;
+# $flagsrequired->{circulation}=1;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "tools/overduerules.tmpl",
+                             query => $input,
+                             type => "intranet",
+                             authnotrequired => 0,
+ 			     flagsrequired => {parameters => 1, tools => 1},
+			      debug => 1,
+                             });
+my $err=0;
+
+# save the values entered into tables
+my %temphash;
+if ($op eq 'save') {
+	my @names=$input->param();
+	my $sth_search = $dbh->prepare("select count(*) as total from overduerules where branchcode=? and categorycode=?");
+
+	my $sth_insert = $dbh->prepare("insert into overduerules (branchcode,categorycode, delay1,letter1,debarred1, delay2,letter2,debarred2, delay3,letter3,debarred3) values (?,?,?,?,?,?,?,?,?,?,?)");
+	my $sth_update=$dbh->prepare("Update overduerules set delay1=?, letter1=?, debarred1=?, delay2=?, letter2=?, debarred2=?, delay3=?, letter3=?, debarred3=? where branchcode=? and categorycode=?");
+	my $sth_delete=$dbh->prepare("delete from overduerules where branchcode=? and categorycode=?");
+	foreach my $key (@names){
+		# ISSUES
+		if ($key =~ /(.*)([1-3])-(.*)/) {
+			my $type = $1; # data type
+			my $num = $2; # From 1 to 3
+			my $bor = $3; # borrower category
+			$temphash{$bor}->{"$type$num"}=$input->param("$key") if (($input->param("$key") ne "") or ($input->param("$key")>0));
+		}
+	}
+	foreach my $bor (keys %temphash){
+		# Do some Checking here : delay1 < delay2 <delay3 all of them being numbers
+		# Raise error if not true
+		if ($temphash{$bor}->{delay1}=~/[^0-9]/ and $temphash{$bor}->{delay1} ne ""){
+			$template->param("ERROR"=>1,"ERRORDELAY"=>"delay1","BORERR"=>$bor);
+			$err=1;
+		} elsif ($temphash{$bor}->{delay2}=~/[^0-9]/ and $temphash{$bor}->{delay2} ne ""){
+			$template->param("ERROR"=>1,"ERRORDELAY"=>"delay2","BORERR"=>$bor);
+			$err=1;
+		} elsif ($temphash{$bor}->{delay3}=~/[^0-9]/ and $temphash{$bor}->{delay3} ne ""){
+			$template->param("ERROR"=>1,"ERRORDELAY"=>"delay3","BORERR"=>$bor);
+			$err=1;
+		}elsif ($temphash{$bor}->{delay3} and ($temphash{$bor}->{delay3}<=$temphash{$bor}->{delay2}
+			or $temphash{$bor}->{delay3}<=$temphash{$bor}->{delay1})
+			or $temphash{$bor}->{delay2} and ($temphash{$bor}->{delay2}<=$temphash{$bor}->{delay1})){
+				$template->param("ERROR"=>1,"ERRORORDER"=>1,"BORERR"=>$bor);
+				$err=1;
+		}
+		unless ($err){
+			if (($temphash{$bor}->{delay1} and ($temphash{$bor}->{"letter1"} or $temphash{$bor}->{"debarred1"}))
+				or ($temphash{$bor}->{delay2} and ($temphash{$bor}->{"letter2"} or $temphash{$bor}->{"debarred2"}))
+				or ($temphash{$bor}->{delay3} and ($temphash{$bor}->{"letter3"} or $temphash{$bor}->{"debarred3"}))) {
+				$sth_search->execute($branch,$bor);
+				my $res = $sth_search->fetchrow_hashref();
+				if ($res->{'total'}>0) {
+					$sth_update->execute(
+						($temphash{$bor}->{"delay1"}?$temphash{$bor}->{"delay1"}:0),
+						($temphash{$bor}->{"letter1"}?$temphash{$bor}->{"letter1"}:""),
+						($temphash{$bor}->{"debarred1"}?$temphash{$bor}->{"debarred1"}:0),
+						($temphash{$bor}->{"delay2"}?$temphash{$bor}->{"delay2"}:0),
+						($temphash{$bor}->{"letter2"}?$temphash{$bor}->{"letter2"}:""),
+						($temphash{$bor}->{"debarred2"}?$temphash{$bor}->{"debarred2"}:0),
+						($temphash{$bor}->{"delay3"}?$temphash{$bor}->{"delay3"}:0),
+						($temphash{$bor}->{"letter3"}?$temphash{$bor}->{"letter3"}:""),
+						($temphash{$bor}->{"debarred3"}?$temphash{$bor}->{"debarred3"}:0),
+						$branch ,$bor
+						);
+				} else {
+					$sth_insert->execute($branch,$bor,
+						($temphash{$bor}->{"delay1"}?$temphash{$bor}->{"delay1"}:0),
+						($temphash{$bor}->{"letter1"}?$temphash{$bor}->{"letter1"}:""),
+						($temphash{$bor}->{"debarred1"}?$temphash{$bor}->{"debarred1"}:0),
+						($temphash{$bor}->{"delay2"}?$temphash{$bor}->{"delay2"}:0),
+						($temphash{$bor}->{"letter2"}?$temphash{$bor}->{"letter2"}:""),
+						($temphash{$bor}->{"debarred2"}?$temphash{$bor}->{"debarred2"}:0),
+						($temphash{$bor}->{"delay3"}?$temphash{$bor}->{"delay3"}:0),
+						($temphash{$bor}->{"letter3"}?$temphash{$bor}->{"letter3"}:""),
+						($temphash{$bor}->{"debarred3"}?$temphash{$bor}->{"debarred3"}:0)
+						);
+				}
+			}
+		}
+	}
+	unless ($err) {$template->param(datasaved=>1);}
+}
+my $branches = GetBranches;
+my @branchloop;
+foreach my $thisbranch (keys %$branches) {
+	my $selected = 1 if $thisbranch eq $branch;
+	my %row =(value => $thisbranch,
+				selected => $selected,
+				branchname => $branches->{$thisbranch}->{'branchname'},
+			);
+	push @branchloop, \%row;
+}
+
+my ($countletters,$letters) = getletters("circulation");
+
+my $sth=$dbh->prepare("Select description,categorycode from categories where overduenoticerequired>0 order by description");
+$sth->execute;
+my @line_loop;
+my $toggle= 1;
+# my $i=0;
+while (my $data=$sth->fetchrow_hashref){
+	if ( $toggle eq 1 ) {
+		$toggle = 0;
+	} else {
+		$toggle = 1;
+	}
+	my %row = ( overduename => $data->{'categorycode'},
+				toggle => $toggle,
+				line => $data->{'description'}
+				);
+	if (%temphash){
+		for (my $i=1;$i<=3;$i++){
+			$row{"delay$i"}=$temphash{$data->{'categorycode'}}->{"delay$i"};
+			$row{"debarred$i"}=$temphash{$data->{'categorycode'}}->{"debarred$i"};
+			if ($countletters){
+				my @letterloop;
+				foreach my $thisletter (keys %$letters) {
+					my $selected = 1 if $thisletter eq $temphash{$data->{'categorycode'}}->{"letter$i"};
+					my %letterrow =(value => $thisletter,
+								selected => $selected,
+								lettername => $letters->{$thisletter},
+							);
+					push @letterloop, \%letterrow;
+				}
+				$row{"letterloop$i"}=\@letterloop;
+			} else {
+				$row{"noletter"}=1;
+				$row{"letter$i"}=$temphash{$data->{'categorycode'}}->{"letter$i"};
+			}
+		}
+	} else {
+	#getting values from table
+		my $sth2=$dbh->prepare("SELECT * from overduerules WHERE branchcode=? and categorycode=?");
+		$sth2->execute($branch,$data->{'categorycode'});
+		my $dat=$sth2->fetchrow_hashref;
+		for (my $i=1;$i<=3;$i++){
+			if ($countletters){
+				my @letterloop;
+				foreach my $thisletter (keys %$letters) {
+					my $selected = 1 if $thisletter eq $dat->{"letter$i"};
+					my %letterrow =(value => $thisletter,
+								selected => $selected,
+								lettername => $letters->{$thisletter},
+							);
+					push @letterloop, \%letterrow;
+				}
+				$row{"letterloop$i"}=\@letterloop;
+			} else {
+				$row{"noletter"}=1;
+				if ($dat->{"letter$i"}){$row{"letter$i"}=$dat->{"letter$i"};}
+			}
+			if ($dat->{"delay$i"}){$row{"delay$i"}=$dat->{"delay$i"};}
+			if ($dat->{"debarred$i"}){$row{"debarred$i"}=$dat->{"debarred$i"};}
+		}
+		$sth2->finish;
+	}
+	push @line_loop,\%row;
+}
+$sth->finish;
+
+$template->param(table=> \@line_loop,
+						branchloop => \@branchloop,
+						branch => $branch);
+output_html_with_http_headers $input, $cookie, $template->output;

Index: tools/pdfViewer.pl
===================================================================
RCS file: tools/pdfViewer.pl
diff -N tools/pdfViewer.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/pdfViewer.pl	26 Mar 2007 02:19:27 -0000	1.1.4.2
@@ -0,0 +1,40 @@
+#!/usr/bin/perl
+
+# script to show a PDF file.
+# written 07/04
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+#    Castañeda Sebastian - seba3c at yahoo.com.ar - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+require Exporter;
+
+use strict;
+use C4::Context;
+use CGI;
+
+# This script take a pdf filename as a parameter and output it to the browser.
+my $cgi = new CGI;
+my $filename = "barcodes.pdf";
+my $tmpFileName = $cgi->param('tmpFileName');
+print "Content-Disposition: attachment; filename = $filename\n\n";
+print $cgi->header(-type => 'application/pdf'),
+      $cgi->start_html(-title=>"Codify to PDF");
+open fh, "<$tmpFileName";
+while (<fh>) {
+ print;
+}
+print $cgi->end_html();

Index: tools/printerConfig.pl
===================================================================
RCS file: tools/printerConfig.pl
diff -N tools/printerConfig.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/printerConfig.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,115 @@
+#!/usr/bin/perl
+
+# script to set the labels configuration for the printer process.
+# written 07/04
+# by Veleda Matias - matias_veleda at hotmail.com - Physics Library UNLP Argentina and
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+require Exporter;
+
+use strict;
+
+use CGI;
+use C4::Context;
+use C4::Output;
+use C4::Auth;
+use PDF::API2;
+use PDF::API2::Page;
+use PDF::API2::PDF::Utils;
+use C4::Interface::CGI::Output;
+
+# This function returns the path to deal with the correct files, considering
+# templates set and language.
+sub getPath {
+	my $type = shift @_;
+	my $templatesSet = C4::Context->preference('template');
+	my $lang = C4::Context->preference('opaclanguages');
+	if ($type eq "intranet") {
+		return "$ENV{'DOCUMENT_ROOT'}/intranet-tmpl/$templatesSet/$lang";
+	} else {
+		return "$ENV{'DOCUMENT_ROOT'}/opac-tmpl/$templatesSet/$lang";
+	}
+}
+
+# Load a configuration file.
+sub loadConfFromFile {
+  my $fileName = shift @_;
+	my %keyValues;
+	open FILE, "<$fileName";
+	while (<FILE>) {
+		chomp;
+		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
+			$keyValues{$1} = $2;
+		}
+	}
+	close FILE;
+	return %keyValues;
+}
+
+# Save settings to a configuration file.
+sub saveConfToFile {
+	my $fileName = shift @_;
+	my %keyValues = %{shift @_};
+	my $i;
+	open FILE, ">$fileName";			
+	my $i;
+	foreach $i (keys(%keyValues)) {
+    print FILE $i." = ".$keyValues{$i}."\n";
+	}
+	close FILE;
+}
+
+# Creates a CGI object and take his parameters
+my $input = new CGI;
+
+if ($input->param('saveSettings')) {
+	my $labelConf = &getPath("intranet")."/includes/labelConfig/itemsLabelConfig.conf";
+	my %newConfiguration = (pageType => $input->param('pageType'), 	
+							columns => $input->param('columns'), 		
+							rows => $input->param('rows'), 	
+							systemDpi => $input->param('systemDpi'), 	
+							labelWidth => $input->param('labelWidth'), 	
+							labelHeigth => $input->param('labelHeigth'),	
+							marginBottom => $input->param('marginBottom'), 	
+							marginLeft => $input->param('marginLeft')); 	
+	saveConfToFile($labelConf, \%newConfiguration);
+	print $input->redirect('/cgi-bin/koha/barcodes/barcodes.pl')
+}
+
+# Get the template to use
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "tools/printerConfig.tmpl",
+			                 type => "intranet",
+			                 query => $input,
+			                 authnotrequired => 0,
+			                 flagsrequired => {parameters => 1},
+					         debug => 1,
+			               });
+
+my $filenameConf = &getPath("intranet")."/includes/labelConfig/itemsLabelConfig.conf";
+my %labelConfig = &loadConfFromFile($filenameConf);
+
+$template->param(COLUMNS => $labelConfig{'columns'});
+$template->param(ROWS => $labelConfig{'rows'});
+$template->param(SYSTEM_DPI => $labelConfig{'systemDpi'});
+$template->param(LABEL_WIDTH => $labelConfig{'labelWidth'});
+$template->param(LABEL_HEIGTH => $labelConfig{'labelHeigth'});
+$template->param(MARGIN_TOP => $labelConfig{'marginBottom'});
+$template->param(MARGIN_LEFT => $labelConfig{'marginLeft'});
+$template->param(SCRIPT_NAME => '/cgi-bin/koha/tools/printerConfig.pl');
+$template->param("$labelConfig{'pageType'}" => 1);
+output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file

Index: tools/tools-home.pl
===================================================================
RCS file: tools/tools-home.pl
diff -N tools/tools-home.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tools/tools-home.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+use strict;
+use CGI;
+use C4::Auth;
+use C4::Interface::CGI::Output;
+
+
+my $query = new CGI;
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "tools/tools-home.tmpl",
+			     query => $query,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {tools => 1},
+			     debug => 1,
+			     });
+
+output_html_with_http_headers $query, $cookie, $template->output;

Index: value_builder/marc21_008_holdings.pl
===================================================================
RCS file: value_builder/marc21_008_holdings.pl
diff -N value_builder/marc21_008_holdings.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_008_holdings.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,127 @@
+#!/usr/bin/perl
+
+# $Id: marc21_008_holdings.pl,v 1.2.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+# find today's date
+my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); 
+
+$year +=1900; $mon +=1;
+my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday);
+
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+
+    for (i=0 ; i<document.f.field_value.length ; i++) {
+        if (document.f.tag[i].value == '008') {
+            if (!document.f.field_value[i].value) {
+                document.f.field_value[i].value = '$dateentered' + '0p####8###4001ab###0000000';
+            }
+        }
+    }
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_008_holdings.pl&index=\"+i+\"&result=\"+defaultvalue,\"008\",'width=400,height=600,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_008_holdings.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+
+	$result = '$dateentered' + '0p####8###4001ab###0000000' unless $result;
+	my $f1 = substr($result,0,6);
+	my $f6 = substr($result,6,1);
+	my $f7 = substr($result,7,1);
+	my $f8 = substr($result,8,4);
+	my $f12 = substr($result,12,1);
+	my $f1321 = substr($result,13,9);
+	my $f2224 = substr($result,22,3);
+	my $f2531 = substr($result,25);
+	
+if (!$f1){
+	$f1=$dateentered;
+}	
+
+
+	$template->param(				index => $index,
+							f1 => $f1,
+							f6 => $f6,
+							"f6$f6" => $f6,
+							f7 => $f7,
+							"f7$f7"=>$f7,
+							f8 => $f8,
+							"f8$f8"=>$f8,
+							f12 => $f12,
+							"f12$f12"=>$f12,
+							f1321 => $f1321,
+							
+							f2224 => $f2224,
+                                                       				 f2531 => $f2531,
+                                                       				 );
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/marc21_field_003.pl
===================================================================
RCS file: value_builder/marc21_field_003.pl
diff -N value_builder/marc21_field_003.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_field_003.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,88 @@
+#!/usr/bin/perl
+
+# $Id: marc21_field_003.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use C4::Auth;
+use C4::Context;
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+=head1
+
+plugin_javascript : the javascript function called when the user enters the subfield.
+contain 3 javascript functions :
+* one called when the field is entered (OnFocus). Named FocusXXX
+* one called when the field is leaved (onBlur). Named BlurXXX
+* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
+
+returns :
+* XXX
+* a variable containing the 3 scripts.
+the 3 scripts are inserted after the <input> in the html code
+
+=cut
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "003".(int(rand(100000))+1);
+
+# find today's date
+my $org = C4::Context->preference('MARCOrgCode');
+my $res  = "
+<script>
+function Blur$function_name(index) {
+//need this?
+}
+
+function Focus$function_name(subfield_managed) {
+	for (i=0 ; i<document.f.field_value.length ; i++) {
+                if (document.f.tag[i].value == '003') {
+                        document.f.field_value[i].value = '$org';
+                }
+        }
+return 0;
+}
+
+function Clic$function_name(subfield_managed) {
+}
+</script>
+";
+return ($function_name,$res);
+}
+
+=head1
+
+plugin : the true value_builded. The screen that is open in the popup window.
+
+=cut
+
+sub plugin {
+my ($input) = @_;
+return "";
+}
+
+1;

Index: value_builder/marc21_field_005.pl
===================================================================
RCS file: value_builder/marc21_field_005.pl
diff -N value_builder/marc21_field_005.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_field_005.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,104 @@
+#!/usr/bin/perl
+
+# $Id: marc21_field_005.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use C4::Auth;
+use C4::Context;
+use C4::Interface::CGI::Output;
+use CGI;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+=head1
+
+plugin_javascript : the javascript function called when the user enters the subfield.
+contain 3 javascript functions :
+* one called when the field is entered (OnFocus). Named FocusXXX
+* one called when the field is leaved (onBlur). Named BlurXXX
+* one called when the ... link is clicked (<a href="javascript:function">) named ClicXXX
+
+returns :
+* XXX
+* a variable containing the 3 scripts.
+the 3 scripts are inserted after the <input> in the html code
+
+=cut
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "005".(int(rand(100000))+1);
+
+# find today's date
+my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
+	$year += 1900;
+	$mon += 1;
+	my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
+		$year,$mon,$mday,$hour,$min,$sec);
+
+
+
+my $res  = "
+<script>
+function Blur$function_name(subfield_managed) {
+for (i=0 ; i<document.f.field_value.length ; i++) {
+               if (document.f.tag[i].value == '005') {
+                        document.f.field_value[i].value = '$timestamp';
+               }
+        }
+return 0;
+}
+
+function Focus$function_name(subfield_managed) {
+	for (i=0 ; i<document.f.field_value.length ; i++) {
+               if (document.f.tag[i].value == '005') {
+                        document.f.field_value[i].value = '$timestamp';
+               }
+        }
+return 0;
+}
+
+function Clic$function_name(subfield_managed) {
+
+}
+</script>
+";
+return ($function_name,$res);
+}
+
+=head1
+
+plugin : the true value_builded. The screen that is open in the popup window.
+
+=cut
+
+sub plugin {
+my ($input) = @_;
+return "";
+}
+
+1;

Index: value_builder/marc21_field_006.pl
===================================================================
RCS file: value_builder/marc21_field_006.pl
diff -N value_builder/marc21_field_006.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_field_006.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,124 @@
+#!/usr/bin/perl
+
+# $Id: marc21_field_006.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_field_006.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_field_006.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+	$result = "a|||||r|||| 00| 0 " unless $result;
+#	$result = "a     r     00  0 " unless $result;
+	my $f0 = substr($result,0,1);
+	my $f014 = substr($result,1,4);
+	my $f5 = substr($result,5,1);
+	my $f6 = substr($result,6,1);
+	my $f710 = substr($result,7,4);
+	my $f11 = substr($result,11,1);
+	my $f12 = substr($result,12,1);
+	my $f13 = substr($result,13,1);
+	my $f14 = substr($result,14,1);
+	my $f15 = substr($result,15,1);
+	my $f16 = substr($result,16,1);
+	my $f17 = substr($result,17,1);
+
+	$template->param(				index => $index,
+							f0 => $f0,
+							"f0$f0" => $f0,
+							f014 => $f014,
+							"f014$f014" => $f014,
+							f5 => $f5,
+							"f5$f5" => $f5,
+							f6 => $f6,
+							"f6$f6" => $f6,
+							f710 => $f710,
+							"f710$f710" => $f710,
+							f11 => $f11,
+                                                        "f11$f11" => $f11,
+							f12 => $f12,
+							"f12$f12" => $f12,
+							f13 => $f13,
+                                                        "f13$f13" => $f13,
+							f14 => $f14,
+                                                        "f14$f14" => $f14,
+							f15 => $f15,
+                                                        "f15$f15" => $f15,
+							f16 => $f16,
+                                                        "f16$f16" => $f16,
+							f17 => $f17,
+							"f17$f17" => $f17,
+					);
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/marc21_field_007.pl
===================================================================
RCS file: value_builder/marc21_field_007.pl
diff -N value_builder/marc21_field_007.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_field_007.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,93 @@
+#!/usr/bin/perl
+
+# $Id: marc21_field_007.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_field_007.pl&index=\"+i+\"&result=\"+defaultvalue,\"unimarc field 100\",'width=1000,height=600,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_field_007.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+	$result = "ta" unless $result;
+	my $f0 = substr($result,0,1);
+	my $f1 = substr($result,1,4);
+
+	$template->param(				index => $index,
+							f0 => $f0,
+							"f0$f0" => $f0,
+							f1 => $f1,
+                                                        "f1$f1" => $f1,
+					);
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/marc21_field_008.pl
===================================================================
RCS file: value_builder/marc21_field_008.pl
diff -N value_builder/marc21_field_008.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_field_008.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,151 @@
+#!/usr/bin/perl
+
+# $Id: marc21_field_008.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+# find today's date
+my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); 
+
+$year +=1900; $mon +=1;
+my $dateentered = substr($year,2,2).sprintf ("%0.2d", $mon).sprintf ("%0.2d",$mday);
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+    for (i=0 ; i<document.f.field_value.length ; i++) {
+        if (document.f.tag[i].value == '008') {
+            if (!document.f.field_value[i].value) {
+                document.f.field_value[i].value = '$dateentered' + 's        xxu||||| |||| 00| 0 ||| d';
+            }
+        }
+    }
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_field_008.pl&index=\"+i+\"&result=\"+defaultvalue,\"008\",'width=400,height=600,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_field_008.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+#	$result = "      t        xxu           00  0 eng d" unless $result;
+	$result = "$dateentered"."t        xxu||||| |||| 00| 0 ||| d" unless $result;
+	my $f1 = substr($result,0,6);
+	my $f6 = substr($result,6,1);
+	my $f710 = substr($result,7,4);
+	my $f1114 = substr($result,11,4);
+	my $f1517 = substr($result,15,3);
+	my $f1821 = substr($result,18,4);
+	my $f22 = substr($result,22,1);
+	my $f23 = substr($result,23,1);
+	my $f2427 = substr($result,24,4);
+	my $f28 = substr($result,28,1);
+	my $f29 = substr($result,29,1);
+	my $f30 = substr($result,30,1);
+	my $f31 = substr($result,31,1);
+	my $f33 = substr($result,33,1);
+	my $f34 = substr($result,34,1);
+	my $f3537 = substr($result,35,3);
+	my $f38 = substr($result,38,1);
+	my $f39 = substr($result,39,1);
+
+if (!$f1){
+	$f1=$dateentered
+}
+
+	$template->param(				index => $index,
+							f1 => $f1,
+							f6 => $f6,
+							"f6$f6" => $f6,
+							f710 => $f710,
+							f1114 => $f1114,
+							f1517 => $f1517,
+							f1821 => $f1821,
+							f22 => $f22,
+							"f22$f22" => $f22,
+							f23 => $f23,
+                                                        "f23$f23" => $f23,
+							f2427 => $f2427,
+							"f24$f2427" => $f2427,
+							f28 => $f28,
+                                                        "f28$f28" => $f28,
+							f29 => $f29,
+                                                        "f29$f29" => $f29,
+							f30 => $f30,
+                                                        "f230$f30" => $f30,
+							f31 => $f31,
+                                                        "f31$f31" => $f31,
+							f33 => $f33,
+                                                        "f33$f33" => $f33,
+							f34 => $f34,
+                                                        "f34$f34" => $f34,
+							f3537 => $f3537,
+							f38 => $f38,
+							"f38$f38" => $f38,
+							f39 => $f39,
+							"f39$f39" => $f39,
+					);
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/marc21_leader.pl
===================================================================
RCS file: value_builder/marc21_leader.pl
diff -N value_builder/marc21_leader.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_leader.pl	26 Mar 2007 02:19:27 -0000	1.6.2.2
@@ -0,0 +1,111 @@
+#!/usr/bin/perl
+
+# $Id: marc21_leader.pl,v 1.6.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+    for (i=0 ; i<document.f.field_value.length ; i++) {
+		if (document.f.tag[i].value == '000') {
+			if (!document.f.field_value[i].value) {
+				document.f.field_value[i].value = '     naa a22     7ar4500';
+			}
+		}
+	}
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_leader.pl&index=\"+i+\"&result=\"+defaultvalue,\"\",'width=400,height=400,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_leader.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+	$result = "     naa a22     7ar4500" unless $result;
+	my $f5 = substr($result,5,1);
+	my $f6 = substr($result,6,1);
+	my $f7 = substr($result,7,1);
+	my $f8 = substr($result,8,1);
+	my $f9 = substr($result,9,1);
+	my $f17 = substr($result,17,1);
+	my $f18 = substr($result,18,1);
+	my $f19 = substr($result,19,1);
+	my $f2023 = substr($result,20,4);
+	$template->param(index => $index,
+							"f5$f5" => 1,
+							"f6$f6" => 1,
+							"f7$f7" => 1,
+							"f8$f8" => 1,
+							"f9$f9" => 1,
+							"f17$f17" => 1,
+							"f18$f18" => 1,
+							"f19$f19" => 1,
+							"f2023" => $f2023,
+					);
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/marc21_leader_authorities.pl
===================================================================
RCS file: value_builder/marc21_leader_authorities.pl
diff -N value_builder/marc21_leader_authorities.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_leader_authorities.pl	26 Mar 2007 02:19:27 -0000	1.3.2.2
@@ -0,0 +1,109 @@
+#!/usr/bin/perl
+
+# $Id: marc21_leader_authorities.pl,v 1.3.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+    for (i=0 ; i<document.f.field_value.length ; i++) {
+		if (document.f.tag[i].value == '000') {
+			if (!document.f.field_value[i].value) {
+				document.f.field_value[i].value = '     nz||a22     o||4500';
+			}
+		}
+	}
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_leader_authorities.pl&index=\"+i+\"&result=\"+defaultvalue,\"\",'width=400,height=400,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_leader_authorities.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+	$result = "     nz||a22     o||4500" unless $result;
+	my $f5 = substr($result,5,1);
+	my $f6 = substr($result,6,1);
+	
+	
+	my $f9 = substr($result,9,1);
+	my $f17 = substr($result,17,1);
+	
+	
+	$template->param(index => $index,
+							"f5$f5" => 1,
+							"f6$f6" => 1,
+							
+							"f9$f9" => 1,
+							"f17$f17" => 1,
+							
+							
+							
+					);
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/marc21_leader_holdings.pl
===================================================================
RCS file: value_builder/marc21_leader_holdings.pl
diff -N value_builder/marc21_leader_holdings.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/marc21_leader_holdings.pl	26 Mar 2007 02:19:27 -0000	1.2.2.2
@@ -0,0 +1,109 @@
+#!/usr/bin/perl
+
+# $Id: marc21_leader_holdings.pl,v 1.2.2.2 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use C4::Auth;
+use CGI;
+use C4::Context;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "100".(int(rand(100000))+1);
+my $res="
+<script>
+function Focus$function_name(subfield_managed) {
+    for (i=0 ; i<document.f.field_value.length ; i++) {
+		if (document.f.tag[i].value == '000') {
+			if (!document.f.field_value[i].value) {
+				document.f.field_value[i].value = '     nx||a22     1i|4500';
+			}
+		}
+	}
+return 1;
+}
+
+function Blur$function_name(subfield_managed) {
+	return 1;
+}
+
+function Clic$function_name(i) {
+	defaultvalue=document.forms['f'].field_value[i].value;
+	newin=window.open(\"../plugin_launcher.pl?plugin_name=marc21_leader_holdings.pl&index=\"+i+\"&result=\"+defaultvalue,\"\",'width=400,height=400,toolbar=false,scrollbars=yes');
+
+}
+</script>
+";
+
+return ($function_name,$res);
+}
+sub plugin {
+my ($input) = @_;
+	my %env;
+
+#	my $input = new CGI;
+	my $index= $input->param('index');
+	my $result= $input->param('result');
+
+
+	my $dbh = C4::Context->dbh;
+
+my ($template, $loggedinuser, $cookie)
+    = get_template_and_user({template_name => "value_builder/marc21_leader_holdings.tmpl",
+			     query => $input,
+			     type => "intranet",
+			     authnotrequired => 0,
+			     flagsrequired => {editcatalogue => 1},
+			     debug => 1,
+			     });
+	$result = "     nx||a22     1i|4500" unless $result;
+	my $f5 = substr($result,5,1);
+	my $f6 = substr($result,6,1);
+	
+	
+	my $f9 = substr($result,9,1);
+	my $f17 = substr($result,17,1);
+	my $f18 = substr($result,18,1);
+	
+	$template->param(index => $index,
+							"f5$f5" => 1,
+							"f6$f6" => 1,
+							
+							"f9$f9" => 1,
+							"f17$f17" => 1,
+							"f18$f18" => 1,
+							
+							
+					);
+	print $input->header(-cookie => $cookie),$template->output;
+}
+
+1;

Index: value_builder/usmarc_field_952d.pl
===================================================================
RCS file: value_builder/usmarc_field_952d.pl
diff -N value_builder/usmarc_field_952d.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ value_builder/usmarc_field_952d.pl	26 Mar 2007 02:19:27 -0000	1.1.2.1
@@ -0,0 +1,92 @@
+#!/usr/bin/perl
+
+# $Id: usmarc_field_952d.pl,v 1.1.2.1 2007/03/26 02:19:27 tgarip1957 Exp $
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+
+use C4::Auth;
+use C4::Context;
+use C4::Date;
+use CGI;
+
+
+=head1
+
+plugin_parameters : other parameters added when the plugin is called by 
+the dopop function
+
+=cut
+sub plugin_parameters {
+my ($dbh,$record,$tagslib,$i,$tabloop) = @_;
+return "";
+}
+
+=head1
+
+plugin_javascript : the javascript function called when the user enters 
+the subfield. contain 3 javascript functions :
+* one called when the field is entered (OnFocus). Named FocusXXX
+* one called when the field is leaved (onBlur). Named BlurXXX
+* one called when the ... link is clicked (<a 
+href="javascript:function">) named ClicXXX
+
+returns :
+* XXX
+* a variable containing the 3 scripts.
+the 3 scripts are inserted after the <input> in the html code
+
+=cut
+sub plugin_javascript {
+my ($dbh,$record,$tagslib,$field_number,$tabloop) = @_;
+my $function_name= "952v".(int(rand(100000))+1);
+
+# find today's date
+
+my $date =get_today();
+my $res  = "
+<script>
+function Blur$function_name(index) {
+//need this?
+}
+
+function Focus$function_name(subfield_managed) {
+	for (i=0 ; i<document.f.field_value.length ; i++) {
+                if (document.f.tag[i].value == '952' && document.f.subfield[i].value == 'd') {
+                        document.f.field_value[i].value = '$date';
+                }
+        }
+return 0;
+}
+
+function Clic$function_name(subfield_managed) {
+}
+</script>
+";
+return ($function_name,$res);
+}
+
+=head1
+
+plugin : the true value_builded. The screen that is open in the popup 
+window.
+
+=cut
+
+sub plugin {
+my ($input) = @_;
+return "";
+}
+
+1;

Index: z3950/search.pl
===================================================================
RCS file: z3950/search.pl
diff -N z3950/search.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ z3950/search.pl	26 Mar 2007 02:19:27 -0000	1.8.2.2
@@ -0,0 +1,224 @@
+#!/usr/bin/perl
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
+use strict;
+use CGI;
+
+use C4::Auth;
+use C4::Interface::CGI::Output;
+use C4::Biblio;
+use C4::Context;
+use C4::Breeding;
+use MARC::File::USMARC;
+use MARC::File::XML;
+use ZOOM;
+use Encode;;
+
+my $input = new CGI;
+my $dbh = C4::Context->dbh;
+my $error = $input->param('error');
+my $oldbiblionumber=$input->param('oldbiblionumber');
+$oldbiblionumber=0 unless $oldbiblionumber;
+my $title = $input->param('title');
+my $author = $input->param('author');
+my $isbn = $input->param('isbn');
+my $issn = $input->param('issn');
+my $random = $input->param('random');
+my $op=$input->param('op');
+my $noconnection;
+my $numberpending;
+my $attr='';
+my $term;
+my $host;
+my $server;
+my $database;
+my $port;
+my $marcdata;
+my @encoding;
+my @results;
+my $count;
+my $toggle;
+my $record;
+my $oldbiblio;
+my $dbh = C4::Context->dbh;
+my $errmsg;
+my @serverloop=();
+my @serverhost;
+my @breeding_loop = ();
+
+unless ($random) { # this var is not useful anymore just kept to keep rel2_2 compatibility
+$random =rand(1000000000);
+}
+
+
+my ($template, $loggedinuser, $cookie)= get_template_and_user({template_name => "z3950/searchresult.tmpl",
+				query => $input,
+				type => "intranet",
+				authnotrequired => 1,
+				flagsrequired => {catalogue => 1},
+				debug => 1,
+				});
+
+if ($op ne "do_search"){
+
+my $sth=$dbh->prepare("select id,name,checked from z3950servers  order by host");
+$sth->execute();
+while ($server=$sth->fetchrow_hashref) {
+my %temploop;
+$temploop{server}=$server->{name};
+$temploop{id}=$server->{id};
+$temploop{checked}=$server->{checked};
+push (@serverloop, \%temploop);
+}
+
+$template->param(isbn=>$isbn, issn=>$issn,title=>$title,author=>$author,
+						serverloop => \@serverloop,
+						opsearch => "search",
+						oldbiblionumber => $oldbiblionumber,
+						);
+output_html_with_http_headers $input, $cookie, $template->output;
+
+}else{
+
+my @id=$input->param('id');
+my @oConnection;
+my @oResult;
+my $s=0;
+							if ($isbn ne "/" || $issn ne "/") {
+								$attr='1=7';
+							$term=$isbn if ($isbn ne"/");
+							$term=$issn if ($issn ne"/");
+							} elsif ($title ne"/") {
+								$attr='1=4 @attr 4=1  ';
+							$term=$title;
+							} elsif ($author ne "/") {
+								$attr='1=1003';
+							$term=$author;
+							} 
+
+							
+my $query="\@attr $attr \"$term\"";	
+			
+  foreach my $servid ( @id){
+  my $sth=$dbh->prepare("select * from z3950servers where id=?");
+  $sth->execute($servid);
+
+    while ($server=$sth->fetchrow_hashref) {
+	my $noconnection=0;
+	#$numberpending=1;
+							
+	my $option1=new ZOOM::Options();
+	$option1->option(async=>1);
+	$option1->option('elementSetName', 'F');
+	$option1->option('databaseName',$server->{db})  ;
+	$option1->option('user',$server->{userid})  ;
+	$option1->option('password',$server->{password})  ;
+	$option1->option('preferredRecordSyntax', $server->{syntax});
+	 $oConnection[$s]=create ZOOM::Connection($option1);
+	$oConnection[$s]->connect($server->{host}, $server->{port});
+	$serverhost[$s]=$server->{name};
+	$encoding[$s]=$server->{syntax};
+	$s++;
+    }## while fetch
+
+  }# foreach
+my $nremaining = $s;
+my $firstresult=1;
+ for (my $z=0 ;$z<$s;$z++){
+$oResult[$z] = $oConnection[$z]->search_pqf($query);
+
+}
+AGAIN:
+ my $k;
+my $event;
+  while (($k = ZOOM::event(\@oConnection)) != 0) {
+	$event = $oConnection[$k-1]->last_event();
+# warn ("connection ", $k-1, ": event $event (", ZOOM::event_str($event), ")\n");
+	last if $event == ZOOM::Event::ZEND;
+   }
+if ($k != 0) {
+	$k--;
+#warn $serverhost[$k];
+	 my($error, $errmsg, $addinfo, $diagset) = $oConnection[$k]->error_x();
+   	if ($error) {
+
+#	warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n";
+	goto MAYBE_AGAIN;
+  	}
+	
+	my $numresults=$oResult[$k]->size() ;								
+ 									
+	my $i;
+	my $result='';
+ @breeding_loop = ();
+
+   if ($numresults>0){
+       for ($i=0; $i<(($numresults<5) ? ($numresults) : (5)) ; $i++) {
+			my $rec=$oResult[$k]->record($i); 										
+			my $marcrecord;
+			$marcdata = $rec->raw();											
+			$marcrecord = MARC::File::USMARC::decode($marcdata);
+			
+			my $marcxml=$marcrecord->as_xml_record($marcrecord);
+			$marcxml=Encode::encode('utf8',$marcxml);
+			#$marcxml=Encode::decode('utf8',$marcxml);
+			my $xmlhash=XML_xml2hash_onerecord($marcxml);						
+		my $oldbiblio = XMLmarc2koha_onerecord($dbh,$xmlhash,'biblios');
+				$oldbiblio->{isbn} =~ s/ |-|\.//g,
+			$oldbiblio->{issn} =~ s/ |-|\.//g,
+			
+my ($notmarcrecord,$alreadyindb,$alreadyinfarm,$imported,$bid)=ImportBreeding($marcdata,1,$serverhost[$k],$encoding[$k],$random);
+			my %row_data;
+	if ($i % 2) {
+		$toggle="#ffffcc";
+	} else {
+		$toggle="white";
+	}
+	$row_data{toggle} = $toggle;
+	$row_data{server} = $serverhost[$k];
+	$row_data{isbn} = $oldbiblio->{isbn};
+
+	$row_data{title} =$oldbiblio->{title};
+	$row_data{author} = $oldbiblio->{author};
+	$row_data{id} = $bid;
+	$row_data{oldbiblionumber}=$oldbiblionumber;
+	push (@breeding_loop, \%row_data);
+
+
+         }# upto 5 results
+     }#$numresults
+}# if $k !=0
+
+
+$numberpending=$nremaining-1;
+				$template->param(breeding_loop => \@breeding_loop,server=>$serverhost[$k],
+						numberpending => $numberpending,
+						);
+output_html_with_http_headers $input, "", $template->output if $firstresult==1;
+
+print  $template->output  if $firstresult !=1;
+$firstresult++;
+
+MAYBE_AGAIN:
+if (--$nremaining > 0) {
+    goto AGAIN;
+}
+$template->param(	numberpending => "No",);
+print  $template->output;
+} ## if op=search

Index: z3950/zebraqueue_start.pl
===================================================================
RCS file: z3950/zebraqueue_start.pl
diff -N z3950/zebraqueue_start.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ z3950/zebraqueue_start.pl	26 Mar 2007 02:19:27 -0000	1.1.2.2
@@ -0,0 +1,62 @@
+#!/usr/bin/perl
+# script that starts the zebraquee
+#  Written by TG on 01/08/2006
+use strict;
+
+
+use C4::Context;
+use C4::Biblio;
+use C4::AuthoritiesMarc;
+use XML::Simple;
+
+### ZEBRA SERVER UPDATER
+my $dbh=C4::Context->dbh;
+AGAIN:
+my $readsth=$dbh->prepare("select id,biblio_auth_number,operation,server from zebraqueue");
+my $delsth=$dbh->prepare("delete from zebraqueue where id =?");
+
+my $wait=C4::Context->preference('zebrawait');
+ $wait=120 unless $wait;
+my ($id,$biblionumber,$operation,$server,$marcxml);
+$readsth->execute;
+while (($id,$biblionumber,$operation,$server)=$readsth->fetchrow){
+if (!$biblionumber){
+$delsth->execute($id);
+next;
+}
+if ($server eq "biblioserver"){
+	($marcxml) =ZEBRA_readyXML($dbh,$biblionumber);
+	}elsif($server eq "authorityserver"){
+	$marcxml =C4::AuthoritiesMarc::XMLgetauthority($dbh,$biblionumber);
+	} 
+
+eval {
+my $hashed=XMLin($marcxml);
+}; ### is it a proper xml? broken xml may crash ZEBRA- slow but safe
+
+if ($@){
+warn $@;
+## Broken XML-- Should not reach here-- but if it does -lets protect ZEBRA
+$delsth->execute($id);
+next;
+}
+my $ok;
+eval{
+ $ok=ZEBRAopserver($marcxml,$operation,$server,$biblionumber);
+};
+ ## If a delete operation delete the SQL DB as well
+	if ($operation eq "recordDelete"  ){
+		if ($server eq "biblioserver"){
+		ZEBRAdelbiblio($dbh,$biblionumber);
+		}elsif ($server eq "authorityserver"){
+		ZEBRAdelauthority($dbh,$biblionumber);
+		}
+	}
+$delsth->execute($id) if ($ok==1|| $operation eq "recordDelete" );
+
+}
+ZEBRAopcommit($server);
+$delsth->finish;
+$readsth->finish;
+sleep $wait;
+goto AGAIN;
\ No newline at end of file

Index: z3950/zebraqueue_windows_start.pl
===================================================================
RCS file: z3950/zebraqueue_windows_start.pl
diff -N z3950/zebraqueue_windows_start.pl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ z3950/zebraqueue_windows_start.pl	26 Mar 2007 02:19:27 -0000	1.1.2.2
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+# script that starts the zebraquee
+#  Written by TG on 01/08/2006
+use strict;
+
+use Win32::Process;
+use Win32;
+use C4::Context;
+use CGI;
+my $input=new CGI;
+my $pid;
+my $fileplace=C4::Context->config('intranetdir');
+my $fullpath=$fileplace."/cgi-bin/z3950";
+open(IN,"<" ,"C:/etc/zebra.pid") or goto NEW;
+while (<IN>){
+ $pid=$_;
+my $exitcode;
+Win32::Process::KillProcess($pid, $exitcode);
+}
+close(IN);
+
+NEW:
+my $ZebraObj;
+ my $ret=Win32::Process::Create($ZebraObj,	"C:/usr/bin/perl.exe",'perl zebraqueue_start.pl',	0, DETACHED_PROCESS,$fullpath)  ;
+$pid=$ZebraObj->GetProcessID();
+
+open(OUT,">" ,"C:/etc/zebra.pid");
+print OUT $pid;
+close(OUT);
+print $input->redirect("/cgi-bin/koha/mainpage.pl?pid=$pid");
+1;
+

Index: intranet/modules/C4/Barcodes/BarcodeConfig.pm
===================================================================
RCS file: intranet/modules/C4/Barcodes/BarcodeConfig.pm
diff -N intranet/modules/C4/Barcodes/BarcodeConfig.pm
--- intranet/modules/C4/Barcodes/BarcodeConfig.pm	25 Mar 2007 23:46:15 -0000	1.1.2.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,238 +0,0 @@
-package C4::Barcodes::BarcodeConfig;
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-require Exporter;
-use vars qw($VERSION @EXPORT);
-use C4::Context;
-use C4::Date;
-use PDF::API2;
-use PDF::API2::Page;
-use PDF::API2::Util;
-use Time::localtime; 
-use CGI;
-use C4::Barcodes::PrinterConfig;
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
-
-=head1 SYNOPSIS
-
-	use C4::Barcodes::BarcodeConfig;
-
-=head1 DESCRIPTION
-
-This package is used to deal with labels in a pdf file. Giving some parameters,
-this package contains several functions to handle every label considering the 
-environment of the pdf file.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at EXPORT = qw(&barcodesGenerator);
-
-
-
-
-sub barcodesGenerator {
-	my ($from, $to, $rangeType, $individualCodes,$text_under_label,$label,%labelConfig) = @_;
-	my $error;
-	my $dbh = C4::Context->dbh;
-$dbh->do('SET NAMES latin5');
-	# Create the query to database
-	# Assigns a temporary filename for the pdf file
-	my $tmpFileName = &assingFilename($from, $to);
-#	my $tmpFileName2 ="/uploaded-files/tmp-pdf/".$tmpFileName;
-# Set the temp directory for pdf´s files
-	my $htdocs = C4::Context->config('intranetdir');
- my $upload_dir = $htdocs."/htdocs/uploaded-files/tmp-pdf/";
-		$ENV{'TEMP'} = $upload_dir;
-my $tmpFileName2 = $ENV{'TEMP'}.$tmpFileName;
-		# Creates a PDF object
-		my $pdf = PDF::API2->new(-file => $tmpFileName2);
-	if ($rangeType eq 'continuous2') {
-		
-		
-		# Set the positions where barcodes are going to be placed
-		# Creates a font object
-		my $tr = $pdf->corefont('Helvetica-Bold',-encode=>"iso-8859-9");
-		# Barcode position
-		my ($page, $gfx, $text);
-		for (my $code=$from; $code<=$to; $code++) {
-		my $random2 = int(rand(10000000));
-		my $newcode=substr($code,0,3).substr($random2,0,4).substr($code,3,3);
-			# Generetase checksum
-			my $codeC = $newcode;
-			# Generate the corresponde barcode to $code
-			my $barcode = $pdf->xo_2of5int(-font => $tr,	# The font object to use
-										-type => 'ean128',	# Standard of codification
-										-code => $codeC, # Text to codify
-										-extn	=> '012345',	# Barcode extension (if it is aplicable)
-										-umzn => 10,		# Top limit of the finished bar
-										-lmzn => 10,		# Bottom limit of the finished bar
-										-zone => 15,		# Bars size
-										-quzn => 0,		# Space destinated for legend
-										-ofwt => 0.01,	# Bars width
-										-fnsz => 8,		# Font size
-										-text => ''
-										);
-			
-			(my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'},$label,$pdf, $page,$gfx,$text,$tr,$labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'});		
-			# Assigns a barcodes to $gfx
-			$gfx->formimage($barcode, $x-$barcode->width/2, $y-$barcode->height /2, (72/$labelConfig{'systemDpi'}));
-			# Assigns the additional information to the barcode (Legend)
-			$text->translate($x - 50, $y - 24);
-			if ($text_under_label) {
-				$text->text($text_under_label);
-			}
-		}
-		# Writes the objects added in $gfx to $page
-		$pdf->finishobjects($page,$gfx, $text);
-		# Save changes to the PDF
-		$pdf->saveas;
-		# Close the conection with the PDF file
-		$pdf->end;
-		
-			
-	} else {
-		my $rangeCondition;
-		if ($individualCodes ne "") {
-			$rangeCondition = "AND (I.barcode IN " . $individualCodes . ")";
-		} else {
-			$rangeCondition =  "AND (I.barcode >= " . $from . " AND I.barcode <="  . $to . " )";
-		}
-			
-		my $query = "SELECT  I.barcode AS Codigo,B.* FROM biblio B, items I WHERE (I.biblionumber = B.biblionumber ) " .$rangeCondition. " AND (I.barcode <> 'FALTA') ORDER BY Codigo";
-		
-		# Prepare the query
-		my $sth = $dbh->prepare($query);
-		# Executes the query
-		$sth->execute;
-		if ($sth->rows) { # There are inventary codes
-			# Set the temp directory for pdf´s files
-				
-			
-			# Set the positions where barcodes are going to be placed
-			# Creates a font object
-			my $tr = $pdf->corefont('Helvetica-Bold',-encode=>"iso-8859-9");
-			# Barcode position
-			my ($page, $gfx, $text);
-			while (my ($code,$title,$author) = $sth->fetchrow_array) {
-				# Generetase checksum
-#				$code = $code);
-				# Generate the corresponde barcode to $code
-				my $barcode = $pdf->xo_2of5int(-font => $tr,	# The font object to use
-											-type => 'ean128',	# Standard of codification
-											-code => $code, # Text to codify
-											-extn	=> '012345',	# Barcode extension (if it is aplicable)
-											-umzn => 10,		# Top limit of the finished bar
-											-lmzn => 10,		# Bottom limit of the finished bar
-											-zone => 15,		# Bars size
-											-quzn => 0,		# Space destinated for legend
-											-ofwt => 0.01,	# Bars width
-											-fnsz => 8,		# Font size
-											-text => ''
-											);
-				
-			(my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'},$label,$pdf, $page,$gfx,$text,$tr,$labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'});		
-		
-				# Assigns a barcodes to $gfx
-			$gfx->formimage($barcode, $x-$barcode->width/2, $y-$barcode->height /2, (72/$labelConfig{'systemDpi'}));
-			
-				# Assigns the additional information to the barcode (Legend)
-				$text->translate($x - 50, $y - 24);
-				if ($text_under_label) {
-					$text->text($text_under_label);
-				} 
-			}
-			# Writes the objects added in $gfx to $page
-			$pdf->finishobjects($page,$gfx, $text);
-			# Save changes to the PDF
-			$pdf->saveas;
-			# Close the conection with the PDF file
-			$pdf->end;
-
-		} else {
-			# Rollback and shows the error legend
-		$error=1
-
-		}
-	$sth->finish;
-	}
-return ($tmpFileName,$error);
-}
-
-# Assigns a temporary name to the PDF file
-sub assingFilename {
-my $cgi=CGI->new;
-	my ($from, $to) = @_;
-	my $ip = $cgi->remote_addr();
-	my $random = int(rand(1000000));
-    my $timeObj = localtime();
-	my ($day, $month, $year, $hour, $min, $sec) = ($timeObj->mday,
-												   $timeObj->mon + 1,
-												   $timeObj->year + 1900,
-  												   $timeObj->hour,
-												   $timeObj->min,
-												   $timeObj->sec);
-	my $tmpFileName = $random.'-'.$min.'-'.$sec.'.pdf';
-	return $tmpFileName;
-}
-
-  sub calculateDigit {
-    my $code = shift @_;
-    my $sum = 0;
-	  my $odd_parity = 1;
-    my $i;
-    for ($i = length($code) - 1; $i >= 0; $i--){
-	   if ( $odd_parity ) {
-		  $sum = $sum + ( 3 * substr($code, $i, 1) );
-     } else {
-			$sum = $sum + substr($code, $i, 1); }
-		  $odd_parity = !$odd_parity;
-	   }
-    my $check_digit = 10 - ($sum%10);
-	if ($check_digit==10) {
-		$check_digit=0;
-	}
-	  return $code.$check_digit;
-  }
-# Generate the checksum from an inventary code
-sub checksum {
-  my $currentCode = shift @_;
-  $currentCode = &calculateDigit($currentCode);
-  return $currentCode;
-}
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-TG tgarip at neu.edu.tr
-
-=cut
\ No newline at end of file

Index: intranet/modules/C4/Barcodes/MemberCardConfig.pm
===================================================================
RCS file: intranet/modules/C4/Barcodes/MemberCardConfig.pm
diff -N intranet/modules/C4/Barcodes/MemberCardConfig.pm
--- intranet/modules/C4/Barcodes/MemberCardConfig.pm	25 Mar 2007 23:46:15 -0000	1.1.2.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,269 +0,0 @@
-package C4::Barcodes::MemberCardConfig;
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-require Exporter;
-use vars qw($VERSION @EXPORT);
-use C4::Context;
-use C4::Accounts2;
-use C4::Date;
-use PDF::API2;
-use PDF::API2::Page;
-use PDF::API2::Util;
-use C4::Members;
-use Time::localtime; 
-use CGI;
-use C4::Barcodes::PrinterConfig;
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
-
-=head1 SYNOPSIS
-
-	use C4::Barcodes::MemberCardConfig;
-
-=head1 DESCRIPTION
-
-This package is used to deal with labels in a pdf file. Giving some parameters,
-this package contains several functions to handle every label considering the 
-environment of the pdf file.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at EXPORT = qw(&barcodesGenerator);
-
-
-
-sub barcodesGenerator {
-	my ($from, $to, $rangeType, $individualCodes,$text_under_label,$label,%labelConfig) = @_;
-	my $error;
-	my $dbh = C4::Context->dbh;
-	$dbh->do('SET NAMES latin5');##PDF fonts only have iso8859 set
-	# Create the query to database
-	# Assigns a temporary filename for the pdf file
-	my $tmpFileName = &assingFilename($from, $to);
-#	my $tmpFileName2 ="/uploaded-files/tmp-pdf/".$tmpFileName;
-# Set the temp directory for pdf´s files
-	my $htdocs = C4::Context->config('intranetdir');
- my $upload_dir = $htdocs."/koha-tmpl/uploaded-files/tmp-pdf/";
-		$ENV{'TEMP'} = $upload_dir;
-my $tmpFileName2 = $ENV{'TEMP'}.$tmpFileName;
-		# Creates a PDF object
-
-		my $pdf = PDF::API2->new(-file => $tmpFileName2);
-	
-	
-		my $rangeCondition;
-		if ($individualCodes ne "") {
-			$rangeCondition = " (I.cardnumber IN " . $individualCodes . ")";
-		} else {
-			$rangeCondition =  " (I.cardnumber >= " . $from . " AND I.cardnumber <="  . $to . " )";
-		}
-			
-		my $query = "SELECT  I.cardnumber , I.surname,I.firstname,I.streetaddress,I.city,I.expiry,C.description,I.borrowernumber,I.categorycode FROM borrowers I ,categories C WHERE I.categorycode=C.categorycode AND " .$rangeCondition. "  ORDER BY I.cardnumber";
-		# Prepare the query
-		my $sth = $dbh->prepare($query);
-		# Executes the query
-		$sth->execute;
-		if ($sth->rows) { # There are inventary codes
-			# Set the temp directory for pdf´s files
-				
-			
-			# Set the positions where barcodes are going to be placed
-			# Creates a font object
-			my  $tr = $pdf->corefont('Verdana-Bold' , -encode=>"iso-8859-9");
-			# Barcode position
-			my ($page, $gfx, $text);
-			while (my ($code,$sname,$fname,$address,$city,$expiry,$desc,$borrnum,$cat) = $sth->fetchrow_array) {
-#$sname=~s/\xfe/þ/g;
-#$fname=~s/\xfe/þ/g;
-#get picture
-my $picture;
- my $htdocs = C4::Context->config('opacdir');
-$picture =$htdocs. "/htdocs/uploaded-files/users-photo/".$code.".jpg";
- if (-e $picture)
-{ 
-
-#   $picture= "http://library.neu.edu.tr/uploaded-files/users-photo/".$code.".jpg";
- }else{
-$picture = $htdocs. "/htdocs/uploaded-files/users-photo/nophoto.jpg";
- 
-}
-
-my $fee=C4::Context->preference('cardfee');
-if (($fee > 0)&& $cat eq "A") {
-
-    my $nextacctno = C4::Accounts2::getnextacctno("",$borrnum,$dbh);
-    my $usth = $dbh->prepare("insert into accountlines
-    (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
-						          values
-    (?,?,now(),?,?,'N',?)");
-    $usth->execute($borrnum,$nextacctno,$fee,'Card Charge -'. $code,$fee);
-    $usth->finish;
-  }
-my $img2=$pdf->image_jpeg($htdocs. "/htdocs/uploaded-files/users-photo/emptycard2.JPG");
-my $img=$pdf->image_jpeg($picture);
-
-
-				# Generetase checksum
-#				$code = $code;
-				# Generate the corresponde barcode to $code
-				my $barcode = $pdf->xo_3of9(-font => $tr,	# The font object to use
-											-type => 'ean128',	# Standard of codification
-											-code => $code, # Text to codify
-											-extn	=> '012345',	# Barcode extension (if it is aplicable)
-											-umzn => 8,		# Top limit of the finished bar
-											-lmzn => 8,		# Bottom limit of the finished bar
-											-zone => 7,		# Bars size
-											-quzn => 1,		# Space destinated for legend
-											-ofwt => 0.01,	# Bars width
-											-fnsz => 7,		# Font size
-											-text => ''
-											);
-
-			
-( my $x, my $y, $pdf, $page, $gfx, $text, $tr, $label) = C4::Barcodes::PrinterConfig::getLabelPosition($labelConfig{'marginLeft'}, $labelConfig{'labelWidth'}, $labelConfig{'columns'}, $labelConfig{'pageType'},$label,$pdf, $page,$gfx,$text,$tr,$labelConfig{'marginBottom'}, $labelConfig{'labelHeigth'}, $labelConfig{'rows'});		
-	
-my $top    = $y  + ((($labelConfig{'labelHeigth'} * 72)/25.4) / 2);
-my $bottom = $y  - ((($labelConfig{'labelHeigth'} * 72)/25.4) / 2);
-
-my $left   = $x  - ((($labelConfig{'labelWidth'} * 72)/25.4) / 2);
-my $right  = $x  + ((($labelConfig{'labelWidth'} * 72)/25.4) / 2);
-#Draws the barcode and the logo.
-my $barcode_height = $barcode->height();
-my $barcode_width = $barcode->width();
-my $back_width=$img2->width();
-my $back_height=$img2->height();
-$gfx->image($img2, $left, $bottom,244,153);
-$gfx->formimage($barcode, $left+5, $bottom +13, 1);
-my $img_width = 50;
-my $img_height=65;
-$gfx->image($img, 
-            $right-($img_width)-20, 
-			$bottom+($barcode_height)+20,
-			 $img_width,$img_height
-			);
-   
-#Draws the legend.
-
-$text->font($tr, 8);
-$text->translate($left+($barcode_width)+8, $bottom + ($barcode_height)+2);
-my $date=format_date($expiry);
-$text->text("Expires: ".$date);
-$text->font($tr, 10);
-$text->translate($x-54 , $bottom+($barcode_height)+18);
-$text->text($code);
-
-#Parses the three lines and put them into the PDF.
-my $yoffset = ($barcode_height/2);
-
-
-#$text->font($tr, 10);
-	
-  $text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
-$text->text($fname.' '.$sname);
-
-  $yoffset = $yoffset + 10;
-
-$text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
-  $yoffset = $yoffset + 10;
-	 $text->text($desc);
-  $text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
-  $text->text($address);
-  $yoffset = $yoffset + 10;
-
-	
-  $text->translate($left+10, ($y + ($barcode_height)) - $yoffset);
-   $text->text($city);	
- 			}
-			# Writes the objects added in $gfx to $page
-			$pdf->finishobjects($page,$gfx, $text);
-			# Save changes to the PDF
-			$pdf->saveas;
-			# Close the conection with the PDF file
-			$pdf->end;
-		} else {
-			# Rollback and shows the error legend
-
-		$error=1;
-
-		}
-	$sth->finish;
-return ($tmpFileName,$error);
-}
-
-# Assigns a temporary name to the PDF file
-sub assingFilename {
-my $cgi=CGI->new;
-	my ($from, $to) = @_;
-	my $ip = $cgi->remote_addr();
-	my $random = int(rand(1000000));
-    my $timeObj = localtime();
-	my ($day, $month, $year, $hour, $min, $sec) = ($timeObj->mday,
-												   $timeObj->mon + 1,
-												   $timeObj->year + 1900,
-  												   $timeObj->hour,
-												   $timeObj->min,
-												   $timeObj->sec);
-	my $tmpFileName = $random.'-'.$min.'-'.$sec.'.pdf';
-	return $tmpFileName;
-}
-
-  sub calculateDigit {
-    my $code = shift @_;
-    my $sum = 0;
-	  my $odd_parity = 1;
-    my $i;
-    for ($i = length($code) - 1; $i >= 0; $i--){
-	   if ( $odd_parity ) {
-		  $sum = $sum + ( 3 * substr($code, $i, 1) );
-     } else {
-			$sum = $sum + substr($code, $i, 1); }
-		  $odd_parity = !$odd_parity;
-	   }
-    my $check_digit = 10 - ($sum%10);
-	if ($check_digit==10) {
-		$check_digit=0;
-	}
-	  return $code.$check_digit;
-  }
-# Generate the checksum from an inventary code
-sub checksum {
-  my $currentCode = shift @_;
-  $currentCode = &calculateDigit($currentCode);
-  return $currentCode;
-}
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-TG tgarip at neu.edu.tr
-
-=cut
\ No newline at end of file

Index: intranet/modules/C4/Barcodes/PrinterConfig.pm
===================================================================
RCS file: intranet/modules/C4/Barcodes/PrinterConfig.pm
diff -N intranet/modules/C4/Barcodes/PrinterConfig.pm
--- intranet/modules/C4/Barcodes/PrinterConfig.pm	25 Mar 2007 23:46:15 -0000	1.1.2.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,245 +0,0 @@
-package C4::Barcodes::PrinterConfig;
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-require Exporter;
-use vars qw($VERSION @EXPORT);
-use C4::Context;
-use PDF::API2;
-use PDF::API2::Page;
-# set the version for version checking
-$VERSION = 1.01;
-
-=head1 NAME
-
-C4::Barcodes::PrinterConfig - Koha module dealing with labels in a PDF.
-
-=head1 SYNOPSIS
-
-	use C4::Barcodes::PrinterConfig;
-
-=head1 DESCRIPTION
-
-This package is used to deal with labels in a pdf file. Giving some parameters,
-this package contains several functions to handle every label considering the 
-environment of the pdf file.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at EXPORT = qw(&labelsPage &getLabelPosition &setPositionsForX &setPositionsForY &saveConfToFile &loadConfFromFile);
-
-
-#my @positionsForY; # Takes all the Y positions of the pdf file.
- # Test if the label passed as a parameter is the first label to be printed into the pdf file.
-
-=item setPositionsForX
-
-	C4::Barcodes::PrinterConfig::setPositionsForX($marginLeft, $labelWidth, $columns, $pageType);
-
-Calculate and stores all the X positions across the pdf page.
-
-C<$marginLeft> Indicates how much left margin do you want in your page type.
-
-C<$labelWidth> Indicates the width of the label that you are going to use.
-
-C<$columns> Indicates how many columns do you want in your page type.
-
-C<$pageType> Page type to print (eg: a4, legal, etc).
-
-=cut
-#'
-sub setPositionsForX {
-	my ($marginLeft, $labelWidth, $columns, $pageType) = @_;
-#my @positionsForX; # Takes all the X positions of the pdf file.
-	my $defaultDpi = 72/25.4; # By default we know 25.4 mm -> 1 inch -> 72 dots per inch
-	my $whereToStart = ($marginLeft + ($labelWidth/2));
-	my $firstLabel = $whereToStart*$defaultDpi;
-	my $spaceBetweenLabels = $labelWidth*$defaultDpi;
-	my @positions;
-	for (my $i = 0; $i < $columns ; $i++) {
-		push @positions, ($firstLabel+($spaceBetweenLabels*$i));
-	}
-	my @positionsForX = @positions;
-	return @positions;
-}
-
-=item setPositionsForY
-
-	C4::Barcodes::PrinterConfig::setPositionsForY($marginBottom, $labelHeigth, $rows, $pageType);
-
-Calculate and stores all tha Y positions across the pdf page.
-
-C<$marginBottom> Indicates how much bottom margin do you want in your page type.
-
-C<$labelHeigth> Indicates the height of the label that you are going to use.
-
-C<$rows> Indicates how many rows do you want in your page type.
-
-C<$pageType> Page type to print (eg: a4, legal, etc).
-
-=cut
-#'
-sub setPositionsForY {
-	my ($marginBottom, $labelHeigth, $rows, $pageType) = @_;
-	my $defaultDpi = 72/25.4; # By default we know 25.4 mm -> 1 inch -> 72 dots per inch
-	my $whereToStart = ($marginBottom + ($labelHeigth/2));
-	my $firstLabel = $whereToStart*$defaultDpi;
-	my $spaceBetweenLabels = $labelHeigth*$defaultDpi;
-	my @positions;
-	for (my $i = 0; $i < $rows; $i++) {
-		unshift @positions, ($firstLabel+($spaceBetweenLabels*$i));
-	}
-	my @positionsForY = @positions;
-	return @positions;
-}
-
-=item getLabelPosition
-
-	(my $x, my $y, $pdfObject, $pageObject, $gfxObject, $textObject, $coreObject, $labelPosition) = 
-					C4::Barcodes::PrinterConfig::getLabelPosition($labelPosition, 
-																  $pdfObject, 
-																  $page,
-																  $gfx,
-																  $text,
-																  $fontObject,
-																  $pageType);	
-
-Return the (x,y) position of the label that you are going to print considering the environment.
-
-C<$labelPosition> Indicates which label positions do you want to place by x and y coordinates.
-
-C<$pdfObject> The PDF object in use.
-
-C<$page> The page in use.
-
-C<$gfx> The gfx resource to handle with barcodes objects.
-
-C<$text> The text resource to handle with text.
-
-C<$fontObject> The font object
-
-C<$pageType> Page type to print (eg: a4, legal, etc).
-
-=cut
-#'
-sub getLabelPosition {
-	my ($marginLeft, $labelWidth, $columns, $pageType,$labelNum, $pdf, $page, $gfxObject, $textObject, $fontObject, $marginBottom, $labelHeigth, $rows) = @_;
-	my @positionsForX =setPositionsForX($marginLeft, $labelWidth, $columns, $pageType) ;
-	my  @positionsForY =setPositionsForY($marginBottom, $labelHeigth, $rows, $pageType);
-	my $indexX = $labelNum % @positionsForX;
-	my $indexY = int($labelNum / @positionsForX);
-	# Calculates the next label position and return that label number
-	my $nextIndexX = $labelNum % @positionsForX;
-	my $nextIndexY = $labelNum % @positionsForY;
-	if ($labelNum== 0) {
-          $page = $pdf->page;
-          $page->mediabox($pageType);
-          $gfxObject = $page->gfx;
-          $textObject = $page->text;
-          $textObject->font($fontObject, 7);
-	}
-	$labelNum = $labelNum + 1;	
-	if ($labelNum == (@positionsForX*@positionsForY)) {
-		$labelNum = 0;
-	}
-	return ($positionsForX[$indexX], $positionsForY[$indexY], $pdf, $page, $gfxObject, $textObject, $fontObject, $labelNum);
-}
-
-=item labelsPage
-
-	my @labelTable = C4::Barcodes::PrinterConfig::labelsPage($rows, $columns);
-
-This function will help you to build the labels panel, where you can choose
-wich label position do you want to start the printer process.
-
-C<$rows> Indicates how many rows do you want in your page type.
-
-C<$columns> Indicates how many rows do you want in your page type.
-
-=cut
-#'
-sub labelsPage{
-	my ($rows, $columns) = @_;
-	my @pageType;
-	my $tagname = 0;
-	my $labelname = 1;
-	my $check;
-	for (my $i = 1; $i <= $rows; $i++) {
-		my @column;
-		for (my $j = 1; $j <= $columns; $j++) {
-			my %cell;
-			if ($tagname == 0) {
-				$check = 'checked';
-			} else {
-				$check = '';
-			}		
-			%cell = (check => $check,
-					 tagname => $tagname,
-			         labelname => $labelname);
-			$tagname = $tagname + 1;	
-			$labelname = $labelname + 1;	
-			push @column, \%cell;
-		}
-		my %columns = (columns => \@column);
-		push @pageType, \%columns;
-	}
-	return @pageType;
-}
-
-# Load a configuration file. Before use this function, check if that file exists.
-sub loadConfFromFile {
-  my $fileName = shift @_;
-	my %keyValues;
-	open FILE, "<$fileName";
-	while (<FILE>) {
-		chomp;
-		if (/\s*([\w_]*)\s*=\s*([\[\]\<\>\w_\s:@,\.-]*)\s*/) {
-			$keyValues{$1} = $2;
-		}
-	}
-	close FILE;
-	return %keyValues;
-}
-
-# Save settings to a configuration file. It delete previous configuration settings.
-sub saveConfToFile {
-	my $fileName = shift @_;
-	my %keyValues = %{shift @_};
-	my $i;
-	open FILE, ">$fileName";			
-	my $i;
-	foreach $i (keys(%keyValues)) {
-    print FILE $i." = ".$keyValues{$i}."\n";
-	}
-	close FILE;
-}
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Physics Library UNLP <matias_veleda at hotmail.com>
-
-=cut
\ No newline at end of file

Index: intranet/modules/C4/Calendar/Calendar.pm
===================================================================
RCS file: intranet/modules/C4/Calendar/Calendar.pm
diff -N intranet/modules/C4/Calendar/Calendar.pm
--- intranet/modules/C4/Calendar/Calendar.pm	25 Mar 2007 23:46:15 -0000	1.1.2.4
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,563 +0,0 @@
-package C4::Calendar::Calendar;
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-require Exporter;
-use vars qw($VERSION @EXPORT);
-
-use C4::Context;
-use Date::Calc qw(Add_Delta_Days Day_of_Week);
-
-# set the version for version checking
-$VERSION = 1.01;
-
-=head1 NAME
-
-C4::Calendar::Calendar - Koha module dealing with holidays.
-
-=head1 SYNOPSIS
-
-	use C4::Calendar::Calendar;
-
-=head1 DESCRIPTION
-
-This package is used to deal with holidays. Through this package, you can set all kind of holidays for the library.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at EXPORT = qw(&new 
-             &change_branchcode 
-			 &get_week_days_holidays 
-			 &get_day_month_holidays 
-             &get_exception_holidays 
-			 &get_single_holidays 
-			 &insert_week_day_holiday 
-			 &insert_day_month_holiday 
-			 &insert_single_holiday 
-			 &insert_exception_holiday
-			 &delete_holiday 
-			 &isHoliday 
-			 &addDate
-			 &daysBetween);
-
-=item new
-
-	$calendar = C4::Calendar::Calendar->new(branchcode => $branchcode);
-
-C<$branchcode> Is the branch code wich you want to use calendar.
-
-=cut
-
-sub new {
-	my $classname = shift @_;
-	my %options = @_;
-
-	my %hash;
-	my $self = bless(\%hash, $classname);
-
-	foreach my $optionName (keys %options) {
-		$self->{lc($optionName)} = $options{$optionName};
-	}
-
-	$self->_init;
-
-	return $self;
-}
-
-sub _init {
-	my $self = shift @_;
-
-	my $dbh = C4::Context->dbh();
-	my $week_days_sql = $dbh->prepare("select weekday, title, description from repeatable_holidays where ('$self->{branchcode}' = branchcode) and (NOT(ISNULL(weekday)))");
-	$week_days_sql->execute;
-	my %week_days_holidays;
-	while (my ($weekday, $title, $description) = $week_days_sql->fetchrow) {
-		$week_days_holidays{$weekday}{title} = $title;
-		$week_days_holidays{$weekday}{description} = $description;
-	}
-	$week_days_sql->finish;
-	$self->{'week_days_holidays'} = \%week_days_holidays;
-
-	my $day_month_sql = $dbh->prepare("select day, month, title, description from repeatable_holidays where ('$self->{branchcode}' = branchcode) and ISNULL(weekday)");
-	$day_month_sql->execute;
-	my %day_month_holidays;
-	while (my ($day, $month, $title, $description) = $day_month_sql->fetchrow) {
-		$day_month_holidays{"$month/$day"}{title} = $title;
-		$day_month_holidays{"$month/$day"}{description} = $description;
-	}
-	$day_month_sql->finish;
-	$self->{'day_month_holidays'} = \%day_month_holidays;
-
-	my $exception_holidays_sql = $dbh->prepare("select day, month, year, title, description from special_holidays where ('$self->{branchcode}' = branchcode) and (isexception = 1)");
-	$exception_holidays_sql->execute;
-	my %exception_holidays;
-	while (my ($day, $month, $year, $title, $description) = $exception_holidays_sql->fetchrow) {
-		$exception_holidays{"$year/$month/$day"}{title} = $title;
-		$exception_holidays{"$year/$month/$day"}{description} = $description;
-	}
-	$exception_holidays_sql->finish;
-	$self->{'exception_holidays'} = \%exception_holidays;
-
-	my $holidays_sql = $dbh->prepare("select day, month, year, title, description from special_holidays where ('$self->{branchcode}' = branchcode) and (isexception = 0)");
-	$holidays_sql->execute;
-	my %single_holidays;
-	while (my ($day, $month, $year, $title, $description) = $holidays_sql->fetchrow) {
-		$single_holidays{"$year/$month/$day"}{title} = $title;
-		$single_holidays{"$year/$month/$day"}{description} = $description;
-	}
-	$holidays_sql->finish;
-	$self->{'single_holidays'} = \%single_holidays;
-}
-
-=item change_branchcode
-
-	$calendar->change_branchcode(branchcode => $branchcode)
-
-Change the calendar branch code. This means to change the holidays structure.
-
-C<$branchcode> Is the branch code wich you want to use calendar.
-
-=cut
-
-sub change_branchcode {
-	my ($self, $branchcode) = @_;
-	my %options = @_;
-
-	foreach my $optionName (keys %options) {
-		$self->{lc($optionName)} = $options{$optionName};
-	}
-	$self->_init;
-
-	return $self;
-}
-
-=item get_week_days_holidays
-
-	$week_days_holidays = $calendar->get_week_days_holidays();
-
-Returns a hash reference to week days holidays.
-
-=cut
-
-sub get_week_days_holidays {
-	my $self = shift @_;
-	my $week_days_holidays = $self->{'week_days_holidays'};
-	return $week_days_holidays;
-}
-
-=item get_day_month_holidays
-	
-	$day_month_holidays = $calendar->get_day_month_holidays();
-
-Returns a hash reference to day month holidays.
-
-=cut
-
-sub get_day_month_holidays {
-	my $self = shift @_;
-	my $day_month_holidays = $self->{'day_month_holidays'};
-	return $day_month_holidays;
-}
-
-=item get_exception_holidays
-	
-	$exception_holidays = $calendar->exception_holidays();
-
-Returns a hash reference to exception holidays. This kind of days are those
-which stands for a holiday, but you wanted to make an exception for this particular
-date.
-
-=cut
-
-sub get_exception_holidays {
-	my $self = shift @_;
-	my $exception_holidays = $self->{'exception_holidays'};
-	return $exception_holidays;
-}
-
-=item get_single_holidays
-	
-	$single_holidays = $calendar->get_single_holidays();
-
-Returns a hash reference to single holidays. This kind of holidays are those which
-happend just one time.
-
-=cut
-
-sub get_single_holidays {
-	my $self = shift @_;
-	my $single_holidays = $self->{'single_holidays'};
-	return $single_holidays;
-}
-
-=item insert_week_day_holiday
-
-	insert_week_day_holiday(weekday => $weekday,
-							title => $title,
-							description => $description);
-
-Inserts a new week day for $self->{branchcode}.
-
-C<$day> Is the week day to make holiday.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_week_day_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', '$self->{branchcode}', $options{weekday}, NULL, NULL, '$options{title}', '$options{description}')");
-	$insertHoliday->execute;
-	$insertHoliday->finish;
-
-	$self->{'week_days_holidays'}->{$options{weekday}}{title} = $options{title};
-	$self->{'week_days_holidays'}->{$options{weekday}}{description} = $options{description};
-	return $self;
-}
-
-=item insert_day_month_holiday
-
-	insert_day_month_holiday(day => $day,
-	                         month => $month,
-							 title => $title,
-							 description => $description);
-
-Inserts a new day month holiday for $self->{branchcode}.
-
-C<$day> Is the day month to make the date to insert.
-
-C<$month> Is month to make the date to insert.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_day_month_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $insertHoliday = $dbh->prepare("insert into repeatable_holidays (id,branchcode,weekday,day,month,title,description) values ('', '$self->{branchcode}', NULL, $options{day}, $options{month}, '$options{title}', '$options{description}')");
-	$insertHoliday->execute;
-	$insertHoliday->finish;
-
-	$self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{title} = $options{title};
-	$self->{'day_month_holidays'}->{"$options{month}/$options{day}"}{description} = $options{description};
-	return $self;
-}
-
-=item insert_single_holiday
-
-	insert_single_holiday(day => $day,
-	                      month => $month,
-						  year => $year,
-						  title => $title,
-						  description => $description);
-
-Inserts a new single holiday for $self->{branchcode}.
-
-C<$day> Is the day month to make the date to insert.
-
-C<$month> Is month to make the date to insert.
-
-C<$year> Is year to make the date to insert.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_single_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $isexception = 0;
-	my $insertHoliday = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', '$self->{branchcode}', $options{day}, $options{month}, $options{year}, $isexception, '$options{title}', '$options{description}')");
-	$insertHoliday->execute;
-	$insertHoliday->finish;
-
-	$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title};
-	$self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
-	return $self;
-}
-
-=item insert_exception_holiday
-
-	insert_exception_holiday(day => $day,
-	                         month => $month,
-						     year => $year,
-						     title => $title,
-						     description => $description);
-
-Inserts a new exception holiday for $self->{branchcode}.
-
-C<$day> Is the day month to make the date to insert.
-
-C<$month> Is month to make the date to insert.
-
-C<$year> Is year to make the date to insert.
-
-C<$title> Is the title to store for the holiday formed by $year/$month/$day.
-
-C<$description> Is the description to store for the holiday formed by $year/$month/$day.
-
-=cut
-
-sub insert_exception_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	my $dbh = C4::Context->dbh();
-	my $isexception = 1;
-	my $insertException = $dbh->prepare("insert into special_holidays (id,branchcode,day,month,year,isexception,title,description) values ('', '$self->{branchcode}', $options{day}, $options{month}, $options{year}, $isexception, '$options{title}', '$options{description}')");
-	$insertException->execute;
-	$insertException->finish;
-
-	$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{title} = $options{title};
-	$self->{'exceptions_holidays'}->{"$options{year}/$options{month}/$options{day}"}{description} = $options{description};
-	return $self;
-}
-
-=item delete_holiday
-
-	delete_holiday(weekday => $weekday
-	               day => $day,
-	               month => $month,
-				   year => $year);
-
-Delete a holiday for $self->{branchcode}.
-
-C<$weekday> Is the week day to delete.
-
-C<$day> Is the day month to make the date to delete.
-
-C<$month> Is month to make the date to delete.
-
-C<$year> Is year to make the date to delete.
-
-=cut
-
-sub delete_holiday {
-	my $self = shift @_;
-	my %options = @_;
-
-	# Verify what kind of holiday that day is. For example, if it is
-	# a repeatable holiday, this should check if there are some exception
-	# for that holiday rule. Otherwise, if it is a regular holiday, it´s 
-	# ok just deleting it.
-
-	my $dbh = C4::Context->dbh();
-	my $isSingleHoliday = $dbh->prepare("select id from special_holidays where (branchcode = '$self->{branchcode}') and (day = $options{day}) and (month = $options{month}) and (year = $options{year})");
-	$isSingleHoliday->execute;
-	if ($isSingleHoliday->rows) {
-		my $id = $isSingleHoliday->fetchrow;
-		$isSingleHoliday->finish; # Close the last query
-
-		my $deleteHoliday = $dbh->prepare("delete from special_holidays where (id = $id)");
-		$deleteHoliday->execute;
-		$deleteHoliday->finish; # Close the last query
-		delete($self->{'single_holidays'}->{"$options{year}/$options{month}/$options{day}"});
-	} else {	
-		$isSingleHoliday->finish; # Close the last query
-
-		my $isWeekdayHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') and (weekday = $options{weekday})");
-		$isWeekdayHoliday->execute;
-		if ($isWeekdayHoliday->rows) {
-			my $id = $isWeekdayHoliday->fetchrow;
-			$isWeekdayHoliday->finish; # Close the last query
-
-			my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (WEEKDAY(CONCAT(special_holidays.year,'-',special_holidays.month,'-',special_holidays.day)) = $options{weekday}) and (branchcode = '$self->{branchcode}')");
-			$updateExceptions->execute;
-			$updateExceptions->finish; # Close the last query
-
-			my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
-			$deleteHoliday->execute;
-			$deleteHoliday->finish;
-			delete($self->{'week_days_holidays'}->{$options{weekday}});
-		} else {
-			$isWeekdayHoliday->finish; # Close the last query
-
-			my $isDayMonthHoliday = $dbh->prepare("select id from repeatable_holidays where (branchcode = '$self->{branchcode}') (day = $options{day}) and (month = $options{month})");
-			$isDayMonthHoliday->execute;
-			if ($isDayMonthHoliday->rows) {
-				my $id = $isDayMonthHoliday->fetchrow;
-				$isDayMonthHoliday->finish;
-				my $updateExceptions = $dbh->prepare("update special_holidays set isexception = 0 where (special_holidays.branchcode = '$self->{branchcode}') and (special_holidays.day = $options{day}) and (special_holidays.month = $options{month})");
-				$updateExceptions->execute;
-				$updateExceptions->finish; # Close the last query
-
-				my $deleteHoliday = $dbh->prepare("delete from repeatable_holidays where (id = $id)");
-				$deleteHoliday->execute;
-				$deleteHoliday->finish; # Close the last query
-				$isDayMonthHoliday->finish; # Close the last query
-				delete($self->{'day_month_holidays'}->{"$options{month}/$options{day}"});
-			}
-		}
-	}	
-	return $self;
-}
-
-=item isHoliday
-	
-	$isHoliday = isHoliday($day, $month $year);
-
-
-C<$day> Is the day to check wether if is a holiday or not.
-
-C<$month> Is the month to check wether its a holiday or not.
-
-C<$year> Is the year to check wether if its a holiday or not.
-
-=cut
-
-sub isHoliday {
-	my ($self, $day, $month, $year) = @_;
-
-	my $weekday = Day_of_Week( $year,$month, $day);	
-	my $weekDays = $self->get_week_days_holidays();
-	my $dayMonths = $self->get_day_month_holidays();
-	my $exceptions = $self->get_exception_holidays();
-	my $singles = $self->get_single_holidays();
-
-	if (defined($exceptions->{"$year/$month/$day"})) {
-		return 0;
-	} else {		
-		if ((exists($weekDays->{$weekday})) || 
-			(exists($dayMonths->{"$month/$day"})) || 
-			(exists($singles->{"$year/$month/$day"}))) {			
-			return 1;
-		} else {
-			return 0;
-		}
-	}
-
-}
-
-=item addDate
-
-	my ($day, $month, $year) = $calendar->addDate($day, $month, $year, $offset)
-
-C<$day> Is the starting day of the interval.
-
-C<$month> Is the starting month of the interval.
-
-C<$year> Is the starting year of the interval.
-
-C<$offset> Is the number of days that this function has to count from $date.
-
-=cut
-
-sub addDate {
-	my ($self, $day, $month, $year, $offset) = @_;
-	if ($offset < 0) { # In case $offset is negative
-		$offset = $offset*(-1);
-	}
-
-	my $daysMode = C4::Context->preference('useDaysMode');
-	if ($daysMode eq 'normal') {
-		($year, $month, $day) = Add_Delta_Days($year, $month, $day, ($offset - 1));
-	} else {
-		while ($offset > 0) {								
-			if (!($self->isHoliday($day, $month, $year))) {
-				$offset = $offset - 1;					
-			}				
-			if ($offset > 0) {
-				($year, $month, $day) = Add_Delta_Days($year, $month, $day, 1);
-			}				
-		}
-	}
-	return($day, $month, $year);	
-}
-
-=item daysBetween
-
-	my $daysBetween = $calendar->daysBetween($dayFrom, $monthFrom, $yearFrom,
-	                                         $dayTo, $monthTo, $yearTo)
-
-C<$dayFrom> Is the starting day of the interval.
-
-C<$monthFrom> Is the starting month of the interval.
-
-C<$yearFrom> Is the starting year of the interval.
-
-C<$dayTo> Is the ending day of the interval.
-
-C<$monthTo> Is the ending month of the interval.
-
-C<$yearTo> Is the ending year of the interval.
-
-=cut
-
-sub daysBetween {
-	my ($self, $dayFrom, $monthFrom, $yearFrom, $dayTo, $monthTo, $yearTo) = @_;
-	 
-	my $daysMode = C4::Context->preference('useDaysMode');
-	my $count = 1;
-	my $continue = 1;
-	if ($daysMode eq 'normal') {
-		while ($continue) {
-			if (($yearFrom != $yearTo) || ($monthFrom != $monthTo) || ($dayFrom != $dayTo)) {
-				($yearFrom, $monthFrom, $dayFrom) = Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, 1);
-				$count++;
-			} else {
-				$continue = 0;	
-			}
-		}		
-	} else {
-		while ($continue) {
-			if (($yearFrom != $yearTo) || ($monthFrom != $monthTo) || ($dayFrom != $dayTo)) {
-				if (!($self->isHoliday($dayFrom, $monthFrom, $yearFrom))) {
-					$count++;
-				}	
-				($yearFrom, $monthFrom, $dayFrom) = Add_Delta_Days($yearFrom, $monthFrom, $dayFrom, 1);				
-			} else {
-				$continue = 0;	
-			}
-		}		
-	}
-	return($count);	
-}
-
-
-
-
-
-
-1;
-
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Physics Library UNLP <matias_veleda at hotmail.com>
-Modified by Tumer Garip NEU Grand Library --No more Date::Manip
-=cut
\ No newline at end of file

Index: intranet/modules/C4/Circulation/Circ2.pm
===================================================================
RCS file: intranet/modules/C4/Circulation/Circ2.pm
diff -N intranet/modules/C4/Circulation/Circ2.pm
--- intranet/modules/C4/Circulation/Circ2.pm	25 Mar 2007 23:46:15 -0000	1.1.2.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,1996 +0,0 @@
-package C4::Circulation::Circ2;
-
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-require Exporter;
-
-use C4::Context;
-use C4::Stats;
-use C4::Reserves2;
-use C4::Koha;
-use C4::Accounts2;
-use C4::Biblio;
-use C4::Calendar::Calendar;
-use C4::Search;
-use C4::Members;
-use C4::Date;
-
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.1.2.3 $' =~ /\d+/g; shift(@v).".".join( "_", map { sprintf "%03d", $_ } @v ); };
-
-=head1 NAME
-
-C4::Circulation::Circ2 - Koha circulation module
-
-=head1 SYNOPSIS
-
-  use C4::Circulation::Circ2;
-
-=head1 DESCRIPTION
-
-The functions in this module deal with circulation, issues, and
-returns, as well as general information about the library.
-Also deals with stocktaking.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	&currentissues 
-	&getissues 
-	&getiteminformation 
-	&renewstatus 
-	&renewbook
-	&canbookbeissued 
-	&issuebook 
-	&returnbook 
-	&find_reserves 
-	&transferbook 
-	&decode
-
-	&listitemsforinventory 
-	&itemseen 
-	&itemseenbarcode
-	&fixdate 
-	&itemissues 
-
-	 &get_current_return_date_of
-                &get_transfert_infos
-		&checktransferts
-		&GetReservesForBranch
-		&GetReservesToBranch
-		&GetTransfersFromBib
-		&getBranchIp);
-
-# &getbranches &getprinters &getbranch &getprinter => moved to C4::Koha.pm
-=item itemissues
-
-  @issues = &itemissues($biblionumber, $biblio);
-
-Looks up information about who has borrowed the bookZ<>(s) with the
-given biblionumber.
-
-C<$biblio> is ignored.
-
-C<&itemissues> returns an array of references-to-hash. The keys
-include the fields from the C<items> table in the Koha database.
-Additional keys include:
-
-=over 4
-
-=item C<date_due>
-
-If the item is currently on loan, this gives the due date.
-
-If the item is not on loan, then this is either "Available" or
-"Cancelled", if the item has been withdrawn.
-
-=item C<card>
-
-If the item is currently on loan, this gives the card number of the
-patron who currently has the item.
-
-=item C<timestamp0>, C<timestamp1>, C<timestamp2>
-
-These give the timestamp for the last three times the item was
-borrowed.
-
-=item C<card0>, C<card1>, C<card2>
-
-The card number of the last three patrons who borrowed this item.
-
-=item C<borrower0>, C<borrower1>, C<borrower2>
-
-The borrower number of the last three patrons who borrowed this item.
-
-=back
-
-=cut
-#'
-sub itemissues {
-    my ($dbh,$data, $itemnumber)=@_;
-    
-      
-    my $i     = 0;
-    my @results;
-
-
-        # Find out who currently has this item.
-        # FIXME - Wouldn't it be better to do this as a left join of
-        # some sort? Currently, this code assumes that if
-        # fetchrow_hashref() fails, then the book is on the shelf.
-        # fetchrow_hashref() can fail for any number of reasons (e.g.,
-        # database server crash), not just because no items match the
-        # search criteria.
-        my $sth2   = $dbh->prepare("select * from issues,borrowers
-where itemnumber = ?
-and returndate is NULL
-and issues.borrowernumber = borrowers.borrowernumber");
-
-        $sth2->execute($itemnumber);
-        if (my $data2 = $sth2->fetchrow_hashref) {
-
-  	$data->{'date_due'}=$data2->{'date_due'};
-	$data->{'datelastborrowed'} = $data2->{'issue_date'};
-            $data->{'card'}     = $data2->{'cardnumber'};
-	    $data->{'borrower'}     = $data2->{'borrowernumber'};
-	$data->{issues}++;
-        } 
-
-        $sth2->finish;
-	 my $sth2   = $dbh->prepare("select * from reserveissue,borrowers
-where itemnumber = ?
-and rettime is NULL
-and reserveissue.borrowernumber = borrowers.borrowernumber");
-
-        $sth2->execute($itemnumber);
-        if (my $data2 = $sth2->fetchrow_hashref) {
-
-  	$data->{'date_due'}=$data2->{'duetime'};
-	$data->{'datelastborrowed'} = $data2->{'restime'};
-            $data->{'card'}     = $data2->{'cardnumber'};
-	    $data->{'borrower'}     = $data2->{'borrowernumber'};
-	$data->{issues}++;
-        } 
-
-        $sth2->finish;
-        # Find the last 2 people who borrowed this item.
-        $sth2 = $dbh->prepare("select * from issues, borrowers
-						where itemnumber = ?
-									and issues.borrowernumber = borrowers.borrowernumber
-									and returndate is not NULL
-									order by returndate desc,timestamp desc limit 2") ;
-        $sth2->execute($itemnumber) ;
-my $i2=0;
-          while (my $data2  = $sth2->fetchrow_hashref) {
-                $data->{"timestamp$i2"} = $data2->{'timestamp'};
-                $data->{"card$i2"}      = $data2->{'cardnumber'};
-                $data->{"borrower$i2"}  = $data2->{'borrowernumber'};
-$data->{'datelastborrowed'} = $data2->{'issue_date'} unless $data->{'datelastborrowed'};
-	$i2++;
-            } # while
-
-        $sth2->finish;
-    return($data);
-}
-
-
-
-=head2 itemseen
-
-&itemseen($dbh,$itemnum)
-Mark item as seen. Is called when an item is issued, returned or manually marked during inventory/stocktaking
-C<$itemnum> is the item number
-
-=cut
-
-sub itemseen {
-	my ($dbh,$itemnumber) = @_;
-my $sth=$dbh->prepare("select biblionumber from items where itemnumber=?");
-	$sth->execute($itemnumber);
-my ($biblionumber)=$sth->fetchrow; 
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',"0",1);
-# find today's date
-my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-	$year += 1900;
-	$mon += 1;
-	my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'datelastseen', $timestamp);	
-}
-sub itemseenbarcode {
-	my ($dbh,$barcode) = @_;
-my $sth=$dbh->prepare("select biblionumber,itemnumber from items where barcode=$barcode");
-	$sth->execute();
-my ($biblionumber,$itemnumber)=$sth->fetchrow; 
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'itemlost',"0",1);
-my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-	$year += 1900;
-	$mon += 1;
-my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",$year,$mon,$mday,$hour,$min,$sec);
-XMLmoditemonefield($dbh,$biblionumber,$itemnumber,'datelastseen', $timestamp);	
-}
-
-
-
-
-
-=head2 decode
-
-=over 4
-
-=head3 $str = &decode($chunk);
-
-=over 4
-
-Decodes a segment of a string emitted by a CueCat barcode scanner and
-returns it.
-
-=back
-
-=back
-
-=cut
-
-# FIXME - At least, I'm pretty sure this is for decoding CueCat stuff.
-sub decode {
-	my ($encoded) = @_;
-	my $seq = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-';
-	my @s = map { index($seq,$_); } split(//,$encoded);
-	my $l = ($#s+1) % 4;
-	if ($l)
-	{
-		if ($l == 1)
-		{
-			print "Error!";
-			return;
-		}
-		$l = 4-$l;
-		$#s += $l;
-	}
-	my $r = '';
-	while ($#s >= 0)
-	{
-		my $n = (($s[0] << 6 | $s[1]) << 6 | $s[2]) << 6 | $s[3];
-		$r .=chr(($n >> 16) ^ 67) .
-		chr(($n >> 8 & 255) ^ 67) .
-		chr(($n & 255) ^ 67);
-		@s = @s[4..$#s];
-	}
-	$r = substr($r,0,length($r)-$l);
-	return $r;
-}
-
-=head2 getiteminformation
-
-=over 4
-
-$item = &getiteminformation($env, $itemnumber, $barcode);
-
-Looks up information about an item, given either its item number or
-its barcode. If C<$itemnumber> is a nonzero value, it is used;
-otherwise, C<$barcode> is used.
-
-C<$env> is effectively ignored, but should be a reference-to-hash.
-
-C<$item> is a reference-to-hash whose keys are fields from the biblio,
-items, and biblioitems tables of the Koha database. It may also
-contain the following keys:
-
-=head3 date_due
-
-=over 4
-
-The due date on this item, if it has been borrowed and not returned
-yet. The date is in YYYY-MM-DD format.
-
-=back
-
-=head3 notforloan
-
-=over 4
-
-True if the item may not be borrowed.
-
-=back
-
-=back
-
-=cut
-
-
-sub getiteminformation {
-# returns a hash of item information together with biblio given either the itemnumber or the barcode
-	my ($env, $itemnumber, $barcode) = @_;
-	my $dbh=C4::Context->dbh;
-	my ($itemrecord)=XMLgetitem($dbh,$itemnumber,$barcode);
-	return undef unless $itemrecord; ## This is to prevent a system crash if barcode does not exist	
-	 my $itemhash=XML_xml2hash_onerecord($itemrecord);	
-	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemhash,"holdings");
-##Now get full biblio details from MARC
-	if ($iteminformation) {
-my ($record)=XMLgetbiblio($dbh,$iteminformation->{'biblionumber'});
-	my $recordhash=XML_xml2hash_onerecord($record);
-my $biblio=XMLmarc2koha_onerecord($dbh,$recordhash,"biblios");
-		foreach my $field (keys %$biblio){
-		$iteminformation->{$field}=$biblio->{$field};
-		} 
-	$iteminformation->{'date_due'}="" if $iteminformation->{'date_due'} eq "0000-00-00";
-	($iteminformation->{'dewey'} == 0) && ($iteminformation->{'dewey'}='');	
-	}
-	return($iteminformation);
-}
-
-=head2 transferbook
-
-=over 4
-
-($dotransfer, $messages, $iteminformation) = &transferbook($newbranch, $barcode, $ignore_reserves);
-
-Transfers an item to a new branch. If the item is currently on loan, it is automatically returned before the actual transfer.
-
-C<$newbranch> is the code for the branch to which the item should be transferred.
-
-C<$barcode> is the barcode of the item to be transferred.
-
-If C<$ignore_reserves> is true, C<&transferbook> ignores reserves.
-Otherwise, if an item is reserved, the transfer fails.
-
-Returns three values:
-
-=head3 $dotransfer 
-
-is true if the transfer was successful.
-
-=head3 $messages
- 
-is a reference-to-hash which may have any of the following keys:
-
-=over 4
-
-C<BadBarcode>
-
-There is no item in the catalog with the given barcode. The value is C<$barcode>.
-
-C<IsPermanent>
-
-The item's home branch is permanent. This doesn't prevent the item from being transferred, though. The value is the code of the item's home branch.
-
-C<DestinationEqualsHolding>
-
-The item is already at the branch to which it is being transferred. The transfer is nonetheless considered to have failed. The value should be ignored.
-
-C<WasReturned>
-
-The item was on loan, and C<&transferbook> automatically returned it before transferring it. The value is the borrower number of the patron who had the item.
-
-C<ResFound>
-
-The item was reserved. The value is a reference-to-hash whose keys are fields from the reserves table of the Koha database, and C<biblioitemnumber>. It also has the key C<ResFound>, whose value is either C<Waiting> or C<Reserved>.
-
-C<WasTransferred>
-
-The item was eligible to be transferred. Barring problems communicating with the database, the transfer should indeed have succeeded. The value should be ignored.
-
-=back
-
-=back
-
-=back
-
-=cut
-
-##This routine is reverted to origional state
-##This routine is used when a book physically arrives at a branch due to user returning it there
-## so record the fact that holdingbranch is changed.
-sub transferbook {
-# transfer book code....
-	my ($tbr, $barcode, $ignoreRs,$user) = @_;
-	my $messages;
-	my %env;
-	my $dbh=C4::Context->dbh;
-	my $dotransfer = 1;
-	my $branches = GetBranches();
-
-	my $iteminformation = getiteminformation(\%env, 0, $barcode);
-	# bad barcode..
-	if (not $iteminformation) {
-		$messages->{'BadBarcode'} = $barcode;
-		$dotransfer = 0;
-	}
-	# get branches of book...
-	my $hbr = $iteminformation->{'homebranch'};
-	my $fbr = $iteminformation->{'holdingbranch'};
-	# if is permanent...
-	if ($hbr && $branches->{$hbr}->{'PE'}) {
-		$messages->{'IsPermanent'} = $hbr;
-	}
-	
-	# check if it is still issued to someone, return it...
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower) {
-		returnbook($barcode, $fbr);
-		$messages->{'WasReturned'} = $currentborrower;
-	}
-	# find reserves.....
-	# FIXME - Don't call &CheckReserves unless $ignoreRs is true.
-	# That'll save a database query.
-	my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'});
-	if ($resfound and not $ignoreRs) {
-		$resrec->{'ResFound'} = $resfound;
-		$messages->{'ResFound'} = $resrec;
-		$dotransfer = 0;
-	}
-	#actually do the transfer....
-	if ($dotransfer) {
-		dotransfer($iteminformation->{'itemnumber'}, $fbr, $tbr,$user);
-		$messages->{'WasTransfered'} = 1;
-	}
-	return ($dotransfer, $messages, $iteminformation);
-}
-
-# Not exported
-
-sub dotransfer {
-## The book has arrived at this branch because it has been returned there
-## So we update the fact the book is in that branch not that we want to send the book to that branch
-
-	my ($itm, $fbr, $tbr,$user) = @_;
-	my $dbh = C4::Context->dbh;
-	unless ($fbr eq $tbr){
-	#new entry in branchtransfers....
-	my $sth=$dbh->prepare("INSERT INTO branchtransfers (itemnumber, frombranch, datearrived, tobranch,comments) VALUES (?, ?, now(), ?,?)");
-	$sth->execute($itm, $fbr,  $tbr,$user);
-	#update holdingbranch in items .....
-	&domarctransfer($dbh,$itm,$tbr);
-	}	
-	return;
-}
-
-sub domarctransfer{
-my ($dbh,$itemnumber,$holdingbranch) = @_; 
-$itemnumber=~s /\'//g;
-XMLmoditemonefield($dbh,undef,$itemnumber,'holdingbranch',$holdingbranch,1);
-	
-}
-
-=head2 canbookbeissued
-
-Check if a book can be issued.
-
-my ($issuingimpossible,$needsconfirmation) = canbookbeissued($env,$borrower,$barcode,$year,$month,$day);
-
-=over 4
-
-C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
-
-C<$borrower> hash with borrower informations (from getpatroninformation)
-
-C<$barcode> is the bar code of the book being issued.
-
-C<$year> C<$month> C<$day> contains the date of the return (in case it's forced by "stickyduedate".
-
-=back
-
-Returns :
-
-=over 4
-
-C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
-Possible values are :
-
-=head3 INVALID_DATE 
-
-sticky due date is invalid
-
-=head3 GNA
-
-borrower gone with no address
-
-=head3 CARD_LOST
- 
-borrower declared it's card lost
-
-=head3 DEBARRED
-
-borrower debarred
-
-=head3 UNKNOWN_BARCODE
-
-barcode unknown
-
-=head3 NOT_FOR_LOAN
-
-item is not for loan
-
-=head3 WTHDRAWN
-
-item withdrawn.
-
-=head3 RESTRICTED
-
-item is restricted (set by ??)
-
-=back
-
-C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
-Possible values are :
-
-=head3 DEBT
-
-borrower has debts.
-
-=head3 RENEW_ISSUE
-
-renewing, not issuing
-
-=head3 ISSUED_TO_ANOTHER
-
-issued to someone else.
-
-=head3 RESERVED
-
-reserved for someone else.
-
-=head3 INVALID_DATE
-
-sticky due date is invalid
-
-=head3 TOO_MANY
-
-if the borrower borrows to much things
-
-=cut
-
-# check if a book can be issued.
-# returns an array with errors if any
-
-
-
-
-
-
-
-
-
-
-
-sub TooMany ($$){
-	my $borrower = shift;
-	my $iteminformation = shift;
-	my $cat_borrower = $borrower->{'categorycode'};
-	my $branch_borrower = $borrower->{'branchcode'};
-	my $dbh = C4::Context->dbh;
-	my $type = $iteminformation->{'ctype'};
-my	$sth = $dbh->prepare('select * from issuingrules where categorycode = ? and itemtype = ? and branchcode = ?');
-	my $sth2 = $dbh->prepare("select COUNT(*) from issues i,  items it where i.borrowernumber = ? and i.returndate is null and i.itemnumber = it.itemnumber and it.ctype=? ");
-	my $sth3 = $dbh->prepare('select COUNT(*) from issues where borrowernumber = ? and returndate is null');
-	my $alreadyissued;
-
-	# check the 3 parameters
-	#print "content-type: text/plain \n\n";
-	#print "$cat_borrower, $type, $branch_borrower";
-	$sth->execute($cat_borrower, $type, $branch_borrower);
-	my $result = $sth->fetchrow_hashref;
-	if (defined($result->{maxissueqty})) {
-	#	print "content-type: text/plain \n\n";
-	#print "$cat_borrower, $type, $branch_borrower";
-		$sth2->execute($borrower->{'borrowernumber'}, $type);
-		my $alreadyissued = $sth2->fetchrow;	
-	#	print "***" . $alreadyissued;
-	#print "----". $result->{'maxissueqty'};
-	  if ($result->{'maxissueqty'} <= $alreadyissued) {
-			return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	  }
-	}
-# check for itemtype=*
-	$sth->execute($cat_borrower, "*", $branch_borrower);
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {
-		$sth3->execute($borrower->{'borrowernumber'});
-		my ($alreadyissued) = $sth3->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-#		warn "HERE : $alreadyissued / ($result->{maxissueqty} for $borrower->{'borrowernumber'}";
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-	# check for branch=*
-	$sth->execute($cat_borrower, $type, "");
-	 $result = $sth->fetchrow_hashref;
-	if (defined($result->{maxissueqty})) {
-		$sth2->execute($borrower->{'borrowernumber'}, $type);
-		my $alreadyissued = $sth2->fetchrow;
-	  if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-	        return;
-	     }
-	}
-
-	
-
-	#check for borrowertype=*
-	$sth->execute("*", $type, $branch_borrower);
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
-		my $alreadyissued = $sth2->fetchrow;
-	    if ($result->{'maxissueqty'} <= $alreadyissued){	    
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	    } else {
-		return;
-	    }
-	}
-
-	#check for borrowertype=*;itemtype=*
-	$sth->execute("*", "*", $branch_borrower);
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth3->execute($borrower->{'borrowernumber'});
-		my $alreadyissued = $sth3->fetchrow;
-	    if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	    } else {
-		return;
-	    }
-	}
-
-	$sth->execute("*", $type, "");
-	$result = $sth->fetchrow_hashref;
-	if (defined($result->{maxissueqty}) && $result->{maxissueqty}>=0) {
-		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
-		my $alreadyissued = $sth2->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-
-	$sth->execute($cat_borrower, "*", "");
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth2->execute($borrower->{'borrowernumber'}, "%$type%");
-		my $alreadyissued = $sth2->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-
-	$sth->execute("*", "*", "");
-	$result = $sth->fetchrow_hashref;
-        if (defined($result->{maxissueqty})) {    
-		$sth3->execute($borrower->{'borrowernumber'});
-		my $alreadyissued = $sth3->fetchrow;
-	     if ($result->{'maxissueqty'} <= $alreadyissued){
-		return ("$type  $alreadyissued / max:".($result->{'maxissueqty'}+0));
-	     } else {
-		return;
-	     }
-	}
-	return;
-}
-
-
-
-
-sub canbookbeissued {
-	my ($env,$borrower,$barcode,$year,$month,$day,$inprocess) = @_;
-	my %needsconfirmation; # filled with problems that needs confirmations
-	my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE
-	my $iteminformation = getiteminformation($env, 0, $barcode);
-	my $dbh = C4::Context->dbh;
-#
-# DUE DATE is OK ?
-#
-	my ($duedate, $invalidduedate) = fixdate($year, $month, $day);
-	$issuingimpossible{INVALID_DATE} = 1 if ($invalidduedate);
-
-#
-# BORROWER STATUS
-#
-	if ($borrower->{flags}->{GNA}) {
-		$issuingimpossible{GNA} = 1;
-	}
-	if ($borrower->{flags}->{'LOST'}) {
-		$issuingimpossible{CARD_LOST} = 1;
-	}
-	if ($borrower->{flags}->{'DBARRED'}) {
-		$issuingimpossible{DEBARRED} = 1;
-	}
-	my $today=C4::Date::get_today();
-	if (DATE_diff($borrower->{expiry},$today)<0) {
-		$issuingimpossible{EXPIRED} = 1;
-	}
-#
-# BORROWER STATUS
-#
-
-# DEBTS
-	my $amount = C4::Accounts2::checkaccount($env,$borrower->{'borrowernumber'}, $dbh,$duedate);
-        if(C4::Context->preference("IssuingInProcess")){
-	    my $amountlimit = C4::Context->preference("noissuescharge");
-	    	if ($amount > $amountlimit && !$inprocess) {
-			$issuingimpossible{DEBT} = sprintf("%.2f",$amount);
-	    	} elsif ($amount <= $amountlimit && !$inprocess) {
-			$needsconfirmation{DEBT} = sprintf("%.2f",$amount);
-	    	}
-        } else {
-	   		 if ($amount >0) {
-			$needsconfirmation{DEBT} = $amount;
-	    	}
-		}
-
-
-#
-# JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS
-#
-	my $toomany = TooMany($borrower, $iteminformation);
-	$needsconfirmation{TOO_MANY} =  $toomany if $toomany;
-	$issuingimpossible{TOO_MANY} = $toomany if $toomany;
-#
-# ITEM CHECKING
-#
-	unless ($iteminformation->{barcode}) {
-		$issuingimpossible{UNKNOWN_BARCODE} = 1;
-	}
-	if ($iteminformation->{'notforloan'} > 0) {
-		$issuingimpossible{NOT_FOR_LOAN} = 1;
-	}
-	if ($iteminformation->{'ctype'} eq 'REF') {
-		$issuingimpossible{NOT_FOR_LOAN} = 1;
-	}
-	if ($iteminformation->{'wthdrawn'} == 1) {
-		$issuingimpossible{WTHDRAWN} = 1;
-	}
-	if ($iteminformation->{'restricted'} == 1) {
-		$issuingimpossible{RESTRICTED} = 1;
-	}
-	if ($iteminformation->{'shelf'} eq 'Res') {
-		$issuingimpossible{IN_RESERVE} = 1;
-	}
-if (C4::Context->preference("IndependentBranches")){
-		my $userenv = C4::Context->userenv;
-		if ($userenv->{flags} != 1){
-			$issuingimpossible{NOTSAMEBRANCH} = 1 if ($iteminformation->{'holdingbranch'} ne $userenv->{branch} ) ;
-		}
-	}
-
-#
-# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
-#
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower eq $borrower->{'borrowernumber'}) {
-# Already issued to current borrower. Ask whether the loan should
-# be renewed.
-		my ($renewstatus) = renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-		if ($renewstatus == 0) { # no more renewals allowed
-			$issuingimpossible{NO_MORE_RENEWALS} = 1;
-		} else {
-			if (C4::Context->preference("strictrenewals")){
-			###if this is set do not allow automatic renewals
-			##the new renew script will do same strict checks as issues and return error codes
-			$needsconfirmation{RENEW_ISSUE} = 1;
-			}	
-			
-		}
-	} elsif ($currentborrower) {
-# issued to someone else
-		my $currborinfo = C4::Members::getpatroninformation(0,$currentborrower);
-#		warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
-		$needsconfirmation{ISSUED_TO_ANOTHER} = "$currborinfo->{'reservedate'} : $currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
-	}
-	my $returningborrower=currentreturningborrower($iteminformation->{'itemnumber'});
-##Book cannot be reissued if returned within last 24 hrs
-	if ($returningborrower->{borrowernumber}==$borrower->{borrowernumber}){
-			$needsconfirmation{hr_LIMIT} = "$returningborrower->{'firstname'} $returningborrower->{'surname'} ($returningborrower->{'cardnumber'}) returned the book on: $returningborrower->{timestamp}";
-	}
-# See if the item is on RESERVE
-	my ($restype, $res) = CheckReserves($iteminformation->{'itemnumber'});
-	if ($restype) {
-		my $resbor = $res->{'borrowernumber'};
-		my ($resborrower, $flags)=C4::Members::getpatroninformation($env, $resbor,0);
-		my $branches = GetBranches();
-			my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-		if ($resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting") {
-			# The item is on reserve and waiting, but has been
-			# reserved by some other patron.
-			
-			
-			$needsconfirmation{RESERVE_WAITING} = "$resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'}, $branchname)";
-		#	CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-		} elsif ($restype eq "Reserved") {
-			# The item is on reserve for someone else.
-			
-			$needsconfirmation{RESERVED} = "$res->{'reservedate'} : $resborrower->{'firstname'} $resborrower->{'surname'} ($resborrower->{'cardnumber'})";
-		}
-	}
-        	if(C4::Context->preference("LibraryName") eq "Horowhenua Library Trust"){
-	   			 if ($borrower->{'categorycode'} eq 'W'){
-		        my %issuingimpossible;
-		        	return(\%issuingimpossible,\%needsconfirmation);
-	    		}
-	    	}
-	      
-	return(\%issuingimpossible,\%needsconfirmation);
-}
-
-=head2 issuebook
-
-Issue a book. Does no check, they are done in canbookbeissued. If we reach this sub, it means the user confirmed if needed.
-
-&issuebook($env,$borrower,$barcode,$date)
-
-=over 4
-
-C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
-
-C<$borrower> hash with borrower informations (from getpatroninformation)
-
-C<$barcode> is the bar code of the book being issued.
-
-C<$date> contains the max date of return. calculated if empty.
-
-=cut
-
-#
-# issuing book. We already have checked it can be issued, so, just issue it !
-#
-sub issuebook {
-### fix me STOP using koha hashes, change so that XML hash is used
-	my ($env,$borrower,$barcode,$date,$cancelreserve) = @_;
-	my $dbh = C4::Context->dbh;
-	my $itemrecord=XMLgetitemhash($dbh,"",$barcode);
-	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-              $iteminformation->{'itemtype'}=MARCfind_itemtype($dbh,$iteminformation->{biblionumber});
-	my $bibliorecord=XMLgetbibliohash($dbh,$iteminformation->{biblionumber});
-	
-	my $error;
-#
-# check if we just renew the issue.
-#
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower eq $borrower->{'borrowernumber'}) {
-		my ($charge,$itemtype) = calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-		if ($charge > 0) {
-			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
-			$iteminformation->{'charge'} = $charge;
-		}
-		&UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
-			if (C4::Context->preference("strictrenewals")){
-		 	$error=renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-		 	renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}) if ($error>1);
-		 	}else{
-		 renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-			}
-	} else {
-#
-# NOT a renewal
-#
-		if ($currentborrower ne '') {
-			# This book is currently on loan, but not to the person
-			# who wants to borrow it now. mark it returned before issuing to the new borrower
-			returnbook($iteminformation->{'barcode'}, $env->{'branchcode'});
-#warn "return : ".$borrower->{borrowernumber}." / I : ".$iteminformation->{'itemnumber'};
-
-		}
-		# See if the item is on reserve.
-		my ($restype, $res) = CheckReserves($iteminformation->{'itemnumber'});
-#warn "$restype,$res";
-		if ($restype) {
-			my $resbor = $res->{'borrowernumber'};
-			my ($resborrower, $flags)=C4::Members::getpatroninformation($env, $resbor,0);
-				my $branches = GetBranches();
-				my $branchname = $branches->{$res->{'branchcode'}}->{'branchname'};
-			if ($resbor eq $borrower->{'borrowernumber'}) {
-				# The item is on reserve to the current patron
-				FillReserve($res);
-#				warn "FillReserve";
-			} elsif ($restype eq "Waiting") {
-#				warn "Waiting";
-				# The item is on reserve and waiting, but has been
-				# reserved by some other patron.
-				
-                 			if ($cancelreserve){
-    				    CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-                 			 } else {
-				    # set waiting reserve to first in reserve queue as book isn't waiting now
-				    UpdateReserve(1, $res->{'biblionumber'}, $res->{'borrowernumber'}, $res->{'branchcode'});
-				}
-			} elsif ($restype eq "Reserved") {
-#warn "Reserved";
-				# The item is on reserve for someone else.
-				
-				if ($cancelreserve) {
-					# cancel reserves on this item
-					CancelReserve(0, $res->{'itemnumber'}, $res->{'borrowernumber'});
-					# also cancel reserve on biblio related to this item
-				#	my $st_Fbiblio = $dbh->prepare("select biblionumber from items where itemnumber=?");
-				#	$st_Fbiblio->execute($res->{'itemnumber'});
-				#	my $biblionumber = $st_Fbiblio->fetchrow;
-#					CancelReserve($iteminformation->{'biblionumber'},0,$res->{'borrowernumber'});
-#					warn "CancelReserve $res->{'itemnumber'}, $res->{'borrowernumber'}";
-				} else {
-					my $tobrcd = ReserveWaiting($res->{'itemnumber'}, $res->{'borrowernumber'});
-					transferbook($tobrcd,$barcode, 1);
-#					warn "transferbook";
-				}
-			}
-		}
-		
-		my $sth=$dbh->prepare("insert into issues (borrowernumber, itemnumber, date_due, branchcode,issue_date) values (?,?,?,?,NOW())");
-		my $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'ctype'},$borrower->{'branchcode'});
-		my $dateduef=get_today();
-		my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
-		my ($yeardue, $monthdue, $daydue) = split /-/, $dateduef;
-		($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
-		$dateduef = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
-#warn $dateduef;
-		if ($date) {
-			$dateduef=$date;
-		}
-		# if ReturnBeforeExpiry ON the datedue can't be after borrower expirydate
-		if (C4::Context->preference('ReturnBeforeExpiry') && $dateduef gt $borrower->{expiry}) {
-			$dateduef=$borrower->{expiry};
-		}
-		$sth->execute($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}, $dateduef, $env->{'branchcode'});
-		$sth->finish;
-		$iteminformation->{'issues'}++;
-##Record in MARC the new data ,date_due as due date,issue count and the borrowernumber
-		$itemrecord=XML_writeline($itemrecord, "issues", $iteminformation->{'issues'},"holdings");
-		$itemrecord=XML_writeline($itemrecord, "date_due", $dateduef,"holdings");
-		$itemrecord=XML_writeline($itemrecord, "borrowernumber", $borrower->{'borrowernumber'},"holdings");
-		$itemrecord=XML_writeline($itemrecord, "itemlost", "0","holdings");
-		$itemrecord=XML_writeline($itemrecord, "onloan", "1","holdings");
-##Transfer book to this issuing branch
-		$itemrecord=XML_writeline($itemrecord, "holdingbranch", $env->{'branchcode'},"holdings");
-##Update totalissues of bibliorecord if exist
-   my $totalissue=XML_readline_onerecord($bibliorecord,"totalissue","biblios");
-$totalissue=scalar($totalissue);
-	$totalissue++;
-my $extras=length($totalissue);
-	for (1..(6-$extras)){
-	$totalissue="0".$totalissue;
-	}
-
-	$bibliorecord=XML_writeline($bibliorecord,"totalissue",$totalissue,"biblios");
-	my $frameworkcode=MARCfind_frameworkcode($dbh,$iteminformation->{'biblionumber'});
-		 C4::Biblio::OLDmodbiblio($dbh,$bibliorecord,$iteminformation->{'biblionumber'},$frameworkcode);
-###
-		# find today's date as timestamp
-		my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-		$year += 1900;
-		$mon += 1;
-		my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-		$itemrecord=XML_writeline($itemrecord, "datelastseen", $timestamp,"holdings");
-		##Now update the zebradb
-		NEWmoditem($dbh,$itemrecord,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'});
-		# If it costs to borrow this book, charge it to the patron's account.
-		my ($charge,$itemtype)=calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-		if ($charge > 0) {
-			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
-			$iteminformation->{'charge'}=$charge;
-		}
-		# Record the fact that this book was issued in SQL
-		&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
-	}
-return($error);
-}
-
-=head2 getLoanLength
-
-Get loan length for an itemtype, a borrower type and a branch
-
-my $loanlength = &getLoanLength($borrowertype,$itemtype,branchcode)
-
-=cut
-
-sub getLoanLength {
-	my ($borrowertype,$itemtype,$branchcode) = @_;
-	my $dbh = C4::Context->dbh;
-	my $sth = $dbh->prepare("select issuelength from issuingrules where categorycode=? and itemtype=? and branchcode=?");
-	# try to find issuelength & return the 1st available.
-	# check with borrowertype, itemtype and branchcode, then without one of those parameters
-	$sth->execute($borrowertype,$itemtype,$branchcode);
-	my $loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength);
-	
-	$sth->execute($borrowertype,$itemtype,"");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute($borrowertype,"*",$branchcode);
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*",$itemtype,$branchcode);
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute($borrowertype,"*","");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*","*",$branchcode);
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*",$itemtype,"");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	$sth->execute("*","*","");
-	$loanlength = $sth->fetchrow_hashref;
-	return $loanlength->{issuelength} if defined($loanlength) && $loanlength->{issuelength} ne 'NULL';
-
-	# if no rule is set => 21 days (hardcoded)
-	return 21;
-}
-=head2 returnbook
-
-  ($doreturn, $messages, $iteminformation, $borrower) =
-	  &returnbook($barcode, $branch);
-
-Returns a book.
-
-C<$barcode> is the bar code of the book being returned. C<$branch> is
-the code of the branch where the book is being returned.
-
-C<&returnbook> returns a list of four items:
-
-C<$doreturn> is true iff the return succeeded.
-
-C<$messages> is a reference-to-hash giving the reason for failure:
-
-=over 4
-
-=item C<BadBarcode>
-
-No item with this barcode exists. The value is C<$barcode>.
-
-=item C<NotIssued>
-
-The book is not currently on loan. The value is C<$barcode>.
-
-=item C<IsPermanent>
-
-The book's home branch is a permanent collection. If you have borrowed
-this book, you are not allowed to return it. The value is the code for
-the book's home branch.
-
-=item C<wthdrawn>
-
-This book has been withdrawn/cancelled. The value should be ignored.
-
-=item C<ResFound>
-
-The item was reserved. The value is a reference-to-hash whose keys are
-fields from the reserves table of the Koha database, and
-C<biblioitemnumber>. It also has the key C<ResFound>, whose value is
-either C<Waiting>, C<Reserved>, or 0.
-
-=back
-
-C<$borrower> is a reference-to-hash, giving information about the
-patron who last borrowed the book.
-
-=cut
-
-# FIXME - This API is bogus. There's no need to return $borrower and
-# $iteminformation; the caller can ask about those separately, if it
-# cares (it'd be inefficient to make two database calls instead of
-# one, but &getpatroninformation and &getiteminformation can be
-# memoized if this is an issue).
-#
-# The ($doreturn, $messages) tuple is redundant: if the return
-# succeeded, that's all the caller needs to know. So &returnbook can
-# return 1 and 0 on success and failure, and set
-# $C4::Circulation::Circ2::errmsg to indicate the error. Or it can
-# return undef for success, and an error message on error (though this
-# is more C-ish than Perl-ish).
-
-sub returnbook {
-	my ($barcode, $branch) = @_;
-	my %env;
-	my $messages;
-	my $dbh = C4::Context->dbh;
-	my $doreturn = 1;
-	die '$branch not defined' unless defined $branch; # just in case (bug 170)
-	# get information on item
-	my $itemrecord=XMLgetitemhash($dbh,"",$barcode);
-	if (not $itemrecord) {
-		$messages->{'BadBarcode'} = $barcode;
-		$doreturn = 0;
-	return ($doreturn, $messages, undef, undef);
-	}
-	my $iteminformation=XMLmarc2koha_onerecord($dbh,$itemrecord,"holdings");
-              $iteminformation->{'itemtype'}=MARCfind_itemtype($dbh,$iteminformation->{biblionumber});
-	
-	# find the borrower
-	my ($currentborrower) = currentborrower($iteminformation->{'itemnumber'});
-	if ((not $currentborrower) && $doreturn) {
-		$messages->{'NotIssued'} = $barcode;
-		$doreturn = 0;
-	}
-	# check if the book is in a permanent collection....
-	my $hbr = $iteminformation->{'homebranch'};
-	my $branches = GetBranches();
-	if ($branches->{$hbr}->{'PE'}) {
-		$messages->{'IsPermanent'} = $hbr;
-	}
-	# check that the book has been cancelled
-	if ($iteminformation->{'wthdrawn'}) {
-		$messages->{'wthdrawn'} = 1;
-	#	$doreturn = 0;
-	}
-	# update issues, thereby returning book (should push this out into another subroutine
-	my ($borrower) = C4::Members::getpatroninformation(\%env, $currentborrower, 0);
-	if ($doreturn) {
-		my $sth = $dbh->prepare("update issues set returndate = now() where (itemnumber = ?) and (returndate is null)");
-		$sth->execute( $iteminformation->{'itemnumber'});
-		$messages->{'WasReturned'} = 1; # FIXME is the "= 1" right?
-	
-		$sth->finish;
-	}
-	$itemrecord=XML_writeline($itemrecord, "date_due", "","holdings");
-	$itemrecord=XML_writeline($itemrecord, "onloan", "0","holdings");
-	$itemrecord=XML_writeline($itemrecord, "borrowernumber", "","holdings");
-	
-	my ($transfered, $mess, $item) = transferbook($branch, $barcode, 1);
-	my ($sec,$min,$hour,$mday,$mon,$year) = localtime();
-		$year += 1900;
-		$mon += 1;
-		my $timestamp = sprintf("%4d%02d%02d%02d%02d%02d.0",
-		$year,$mon,$mday,$hour,$min,$sec);
-		$itemrecord=XML_writeline($itemrecord, "datelastseen", $timestamp,"holdings");
-		
-		
-	# transfer book to the current branch
-	
-	if ($transfered) {
-		$messages->{'WasTransfered'} = 1; # FIXME is the "= 1" right?
-	}
-	# fix up the accounts.....
-	if ($iteminformation->{'itemlost'}) {
-		fixaccountforlostandreturned($iteminformation, $borrower);
-		$messages->{'WasLost'} = 1; # FIXME is the "= 1" right?
-		$itemrecord=XML_writeline($itemrecord, "itemlost", "","holdings");
-	}
-####WARNING-- FIXME#########	
-### The following new script is commented out
-## 	I did not understand what it is supposed to do.
-## If a book is returned at one branch it is automatically recorded being in that branch by
-## transferbook script. This scrip tries to find out whether it was sent thre
-## Well whether sent or not it is physically there and transferbook records this fact in MARCrecord as well
-## If this script is trying to do something else it should be uncommented and also add support for updating MARC record --TG
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# 	check if we have a transfer for this document
-#	my $checktransfer = checktransferts($iteminformation->{'itemnumber'});
-# 	if we have a return, we update the line of transfers with the datearrived
-#	if ($checktransfer){
-#		my $sth = $dbh->prepare("update branchtransfers set datearrived = now() where itemnumber= ? AND datearrived IS NULL");
-#		$sth->execute($iteminformation->{'itemnumber'});
-#		$sth->finish;
-# 		now we check if there is a reservation with the validate of transfer if we have one, we can 		set it with the status 'W'
-#		my $updateWaiting = SetWaitingStatus($iteminformation->{'itemnumber'});
-#	}
-#	if we don't have a transfer on run, we check if the document is not in his homebranch and there is not a reservation, we transfer this one to his home branch directly if system preference Automaticreturn is turn on .
-#	else {
-#		my $checkreserves = CheckReserves($iteminformation->{'itemnumber'});
-#		if (($iteminformation->{'homebranch'} ne $iteminformation->{'holdingbranch'}) and (not $checkreserves) and (C4::Context->preference("AutomaticItemReturn") == 1)){
-#				my $automatictransfer = dotransfer($iteminformation->{'itemnumber'},$iteminformation->{'holdingbranch'},$iteminformation->{'homebranch'});
-#				$messages->{'WasTransfered'} = 1;
-#		}
-#	}
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
-	# fix up the overdues in accounts...
-	fixoverduesonreturn($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-	$itemrecord=XML_writeline($itemrecord, "itemoverdue", "","holdings");
-	# find reserves.....
-	my ($resfound, $resrec) = CheckReserves($iteminformation->{'itemnumber'});
-	if ($resfound) {
-	#	my $tobrcd = ReserveWaiting($resrec->{'itemnumber'}, $resrec->{'borrowernumber'});
-		$resrec->{'ResFound'} = $resfound;
-		$messages->{'ResFound'} = $resrec;
-	}
-	##Now update the zebradb
-		NEWmoditem($dbh,$itemrecord,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'});
-	# update stats?
-	# Record the fact that this book was returned.
-	UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
-	return ($doreturn, $messages, $iteminformation, $borrower);
-}
-
-=head2 fixaccountforlostandreturned
-
-	&fixaccountforlostandreturned($iteminfo,$borrower);
-
-Calculates the charge for a book lost and returned (Not exported & used only once)
-
-C<$iteminfo> is a hashref to iteminfo. Only {itemnumber} is used.
-
-C<$borrower> is a hashref to borrower. Only {borrowernumber is used.
-
-=cut
-
-sub fixaccountforlostandreturned {
-	my ($iteminfo, $borrower) = @_;
-	my %env;
-	my $dbh = C4::Context->dbh;
-	my $itm = $iteminfo->{'itemnumber'};
-	# check for charge made for lost book
-	my $sth = $dbh->prepare("select * from accountlines where (itemnumber = ?) and (accounttype='L' or accounttype='Rep') order by date desc");
-	$sth->execute($itm);
-	if (my $data = $sth->fetchrow_hashref) {
-	# writeoff this amount
-		my $offset;
-		my $amount = $data->{'amount'};
-		my $acctno = $data->{'accountno'};
-		my $amountleft;
-		if ($data->{'amountoutstanding'} == $amount) {
-		$offset = $data->{'amount'};
-		$amountleft = 0;
-		} else {
-		$offset = $amount - $data->{'amountoutstanding'};
-		$amountleft = $data->{'amountoutstanding'} - $amount;
-		}
-		my $usth = $dbh->prepare("update accountlines set accounttype = 'LR',amountoutstanding='0'
-			where (borrowernumber = ?)
-			and (itemnumber = ?) and (accountno = ?) ");
-		$usth->execute($data->{'borrowernumber'},$itm,$acctno);
-		$usth->finish;
-	#check if any credit is left if so writeoff other accounts
-		my $nextaccntno = getnextacctno(\%env,$data->{'borrowernumber'},$dbh);
-		if ($amountleft < 0){
-		$amountleft*=-1;
-		}
-		if ($amountleft > 0){
-		my $msth = $dbh->prepare("select * from accountlines where (borrowernumber = ?)
-							and (amountoutstanding >0) order by date");
-		$msth->execute($data->{'borrowernumber'});
-	# offset transactions
-		my $newamtos;
-		my $accdata;
-		while (($accdata=$msth->fetchrow_hashref) and ($amountleft>0)){
-			if ($accdata->{'amountoutstanding'} < $amountleft) {
-			$newamtos = 0;
-			$amountleft -= $accdata->{'amountoutstanding'};
-			}  else {
-			$newamtos = $accdata->{'amountoutstanding'} - $amountleft;
-			$amountleft = 0;
-			}
-			my $thisacct = $accdata->{'accountno'};
-			my $usth = $dbh->prepare("update accountlines set amountoutstanding= ?
-					where (borrowernumber = ?)
-					and (accountno=?)");
-			$usth->execute($newamtos,$data->{'borrowernumber'},'$thisacct');
-			$usth->finish;
-			$usth = $dbh->prepare("insert into accountoffsets
-				(borrowernumber, accountno, offsetaccount,  offsetamount)
-				values
-				(?,?,?,?)");
-			$usth->execute($data->{'borrowernumber'},$accdata->{'accountno'},$nextaccntno,$newamtos);
-			$usth->finish;
-		}
-		$msth->finish;
-		}
-		if ($amountleft > 0){
-			$amountleft*=-1;
-		}
-		my $desc="Book Returned ".$iteminfo->{'barcode'};
-		$usth = $dbh->prepare("insert into accountlines
-			(borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding)
-			values (?,?,now(),?,?,'CR',?)");
-		$usth->execute($data->{'borrowernumber'},$nextaccntno,0-$amount,$desc,$amountleft);
-		$usth->finish;
-		$usth = $dbh->prepare("insert into accountoffsets
-			(borrowernumber, accountno, offsetaccount,  offsetamount)
-			values (?,?,?,?)");
-		$usth->execute($borrower->{'borrowernumber'},$data->{'accountno'},$nextaccntno,$offset);
-		$usth->finish;
-#		$usth = $dbh->prepare("update items set paidfor='' where itemnumber=?");
-#		$usth->execute($itm);
-#		$usth->finish;
-	}
-	$sth->finish;
-	return;
-}
-
-=head2 fixoverdueonreturn
-
-	&fixoverdueonreturn($brn,$itm);
-
-??
-
-C<$brn> borrowernumber
-
-C<$itm> itemnumber
-
-=cut
-
-sub fixoverduesonreturn {
-	my ($brn, $itm) = @_;
-	my $dbh = C4::Context->dbh;
-	# check for overdue fine
-	my $sth = $dbh->prepare("select * from accountlines where (borrowernumber = ?) and (itemnumber = ?) and (accounttype='FU' or accounttype='O')");
-	$sth->execute($brn,$itm);
-	# alter fine to show that the book has been returned
-	if (my $data = $sth->fetchrow_hashref) {
-		my $usth=$dbh->prepare("update accountlines set accounttype='F' where (borrowernumber = ?) and (itemnumber = ?) and (accountno = ?)");
-		$usth->execute($brn,$itm,$data->{'accountno'});
-		$usth->finish();
-	}
-	$sth->finish();
-	return;
-}
-
-
-
-
-
-# Not exported
-sub checkoverdues {
-# From Main.pm, modified to return a list of overdueitems, in addition to a count
-  #checks whether a borrower has overdue items
-	my ($env, $bornum, $dbh)=@_;
-	my $today=get_today();
-	my @overdueitems;
-	my $count = 0;
-	my $sth = $dbh->prepare("SELECT issues.* , i.biblionumber as biblionumber,b.* FROM issues, items i,biblio b
-			WHERE  i.itemnumber=issues.itemnumber
-				AND i.biblionumber=b.biblionumber
-				AND issues.borrowernumber  = ?
-				AND issues.returndate is NULL
-				AND issues.date_due < ?");
-	$sth->execute($bornum,$today);
-	while (my $data = $sth->fetchrow_hashref) {
-	
-	push (@overdueitems, $data);
-	$count++;
-	}
-	$sth->finish;
-	return ($count, \@overdueitems);
-}
-
-# Not exported
-sub currentborrower {
-# Original subroutine for Circ2.pm
-	my ($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-	
-	my $sth=$dbh->prepare("select borrowers.borrowernumber from
-	issues,borrowers where issues.itemnumber=? and
-	issues.borrowernumber=borrowers.borrowernumber and issues.returndate is
-	NULL");
-	$sth->execute($itemnumber);
-	my ($borrower) = $sth->fetchrow;
-	return($borrower);
-}
-# Not exported
-sub currentreturningborrower {
-# Original subroutine for Circ2.pm
-	my ($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-	
-	my $sth=$dbh->prepare("select * from
-	issues,borrowers where issues.itemnumber=? and
-	issues.borrowernumber=borrowers.borrowernumber and issues.returndate=CURRENT_DATE and ( HOUR(TIMEDIFF(CURRENT_TIMESTAMP,timestamp))<24)");
-	$sth->execute($itemnumber);
-	my ($borrower) = $sth->fetchrow_hashref;
-	return($borrower);
-}
-# FIXME - Not exported, but used in 'updateitem.pl' anyway.
-sub checkreserve_to_delete {
-# Check for reserves for biblio
-	my ($env,$dbh,$itemnum)=@_;
-	my $resbor = "";
-	my $sth = $dbh->prepare("select * from reserves,items
-	where (items.itemnumber = ?)
-	and (reserves.cancellationdate is NULL)
-	and (items.biblionumber = reserves.biblionumber)
-	and ((reserves.found = 'W')
-	or (reserves.found is null))
-	order by priority");
-	$sth->execute($itemnum);
-	my $resrec;
-	my $data=$sth->fetchrow_hashref;
-	while ($data && $resbor eq '') {
-	$resrec=$data;
-	my $const = $data->{'constrainttype'};
-	if ($const eq "a") {
-	$resbor = $data->{'borrowernumber'};
-	} else {
-	my $found = 0;
-	my $csth = $dbh->prepare("select * from reserveconstraints,items
-		where (borrowernumber=?)
-		and reservedate=?
-		and reserveconstraints.biblionumber=?
-		and (items.itemnumber=? )");
-	$csth->execute($data->{'borrowernumber'},$data->{'biblionumber'},$data->{'reservedate'},$itemnum);
-	if (my $cdata=$csth->fetchrow_hashref) {$found = 1;}
-	if ($const eq 'o') {
-		if ($found eq 1) {$resbor = $data->{'borrowernumber'};}
-	} else {
-		if ($found eq 0) {$resbor = $data->{'borrowernumber'};}
-	}
-	$csth->finish();
-	}
-	$data=$sth->fetchrow_hashref;
-	}
-	$sth->finish;
-	return ($resbor,$resrec);
-}
-
-=head2 currentissues
-
-  $issues = &currentissues($env, $borrower);
-
-Returns a list of books currently on loan to a patron.
-
-If C<$env-E<gt>{todaysissues}> is set and true, C<&currentissues> only
-returns information about books issued today. If
-C<$env-E<gt>{nottodaysissues}> is set and true, C<&currentissues> only
-returns information about books issued before today. If both are
-specified, C<$env-E<gt>{todaysissues}> is ignored. If neither is
-specified, C<&currentissues> returns all of the patron's issues.
-
-C<$borrower->{borrowernumber}> is the borrower number of the patron
-whose issues we want to list.
-
-C<&currentissues> returns a PHP-style array: C<$issues> is a
-reference-to-hash whose keys are integers in the range 1...I<n>, where
-I<n> is the number of items on issue (either today or before today).
-C<$issues-E<gt>{I<n>}> is a reference-to-hash whose keys are all of
-the fields of the biblio, biblioitems, items, and issues fields of the
-Koha database for that particular item.
-
-=cut
-
-#'
-sub currentissues {
-# New subroutine for Circ2.pm
-	my ($env, $borrower) = @_;
-	my $dbh = C4::Context->dbh;
-	my %currentissues;
-	my $counter=1;
-	my $borrowernumber = $borrower->{'borrowernumber'};
-	my $crit='';
-
-	# Figure out whether to get the books issued today, or earlier.
-	# FIXME - $env->{todaysissues} and $env->{nottodaysissues} can
-	# both be specified, but are mutually-exclusive. This is bogus.
-	# Make this a flag. Or better yet, return everything in (reverse)
-	# chronological order and let the caller figure out which books
-	# were issued today.
-	my $today=get_today();
-	if ($env->{'todaysissues'}) {
-		
-		$crit=" and issues.timestamp like '$today%' ";
-	}
-	if ($env->{'nottodaysissues'}) {
-		
-		$crit=" and !(issues.timestamp like '$today%') ";
-	}
-
-	# FIXME - Does the caller really need every single field from all
-	# four tables?
-	my $sth=$dbh->prepare("select * from issues,items where
-	borrowernumber=? and issues.itemnumber=items.itemnumber and
-	 returndate is null
-	$crit order by issues.date_due");
-	$sth->execute($borrowernumber);
-	while (my $data = $sth->fetchrow_hashref) {
-
-		
-		if ($data->{'date_due'} lt $today) {
-			$data->{'overdue'}=1;
-		}
-		my $itemnumber=$data->{'itemnumber'};
-		# FIXME - Consecutive integers as hash keys? You have GOT to
-		# be kidding me! Use an array, fercrissakes!
-		$currentissues{$counter}=$data;
-		$counter++;
-	}
-	$sth->finish;
-	return(\%currentissues);
-}
-
-=head2 getissues
-
-  $issues = &getissues($borrowernumber);
-
-Returns the set of books currently on loan to a patron.
-
-C<$borrowernumber> is the patron's borrower number.
-
-C<&getissues> returns a PHP-style array: C<$issues> is a
-reference-to-hash whose keys are integers in the range 0..I<n>-1,
-where I<n> is the number of books the patron currently has on loan.
-
-The values of C<$issues> are references-to-hash whose keys are
-selected fields from the issues, items, biblio, and biblioitems tables
-of the Koha database.
-
-=cut
-#'
-sub getissues {
-	my ($borrower) = @_;
-	my $dbh = C4::Context->dbh;
-	my $borrowernumber = $borrower->{'borrowernumber'};
-	my %currentissues;
-	my $bibliodata;
-	my @results;
-	my $todaysdate=get_today();
-	my $counter = 0;
-	my $select = "SELECT *
-			FROM issues,items,biblio
-			WHERE issues.borrowernumber  = ?
-			AND issues.itemnumber      = items.itemnumber
-			AND items.biblionumber      = biblio.biblionumber
-			AND issues.returndate      IS NULL
-			ORDER BY issues.date_due";
-	#    print $select;
-	my $sth=$dbh->prepare($select);
-	$sth->execute($borrowernumber);
-	while (my $data = $sth->fetchrow_hashref) { 	
-		if ($data->{'date_due'}  lt $todaysdate) {
-			$data->{'overdue'} = 1;
-		}
-		$currentissues{$counter} = $data;
-		$counter++;
-	}
-	$sth->finish;
-	
-	return(\%currentissues);
-}
-
-# Not exported
-sub checkwaiting {
-# check for reserves waiting
-	my ($env,$dbh,$bornum)=@_;
-	my @itemswaiting;
-	my $sth = $dbh->prepare("select * from reserves where (borrowernumber = ?) and (reserves.found='W') and cancellationdate is NULL");
-	$sth->execute($bornum);
-	my $cnt=0;
-	if (my $data=$sth->fetchrow_hashref) {
-		$itemswaiting[$cnt] =$data;
-		$cnt ++
-	}
-	$sth->finish;
-	return ($cnt,\@itemswaiting);
-}
-
-=head2 renewstatus
-
-  $ok = &renewstatus($env, $dbh, $borrowernumber, $itemnumber);
-
-Find out whether a borrowed item may be renewed.
-
-C<$env> is ignored.
-
-C<$dbh> is a DBI handle to the Koha database.
-
-C<$borrowernumber> is the borrower number of the patron who currently
-has the item on loan.
-
-C<$itemnumber> is the number of the item to renew.
-
-C<$renewstatus> returns a true value iff the item may be renewed. The
-item must currently be on loan to the specified borrower; renewals
-must be allowed for the item's type; and the borrower must not have
-already renewed the loan.
-
-=cut
-
-sub renewstatus {
-	# check renewal status
-	##If system preference "strictrenewals" is used This script will try to return $renewok=2 or $renewok=3 as error messages
-	## 
-	my ($env,$bornum,$itemnumber)=@_;
-	my $dbh=C4::Context->dbh;
-	my $renews = 1;
-	my $resfound;
-	my $resrec;
-	my $renewokay=0; ##
-	# Look in the issues table for this item, lent to this borrower,
-	# and not yet returned.
-my $borrower=C4::Members::getpatroninformation($dbh,$bornum,undef);
-	
-	# FIXME - I think this function could be redone to use only one SQL call.
-  my $data1=getiteminformation($dbh,$itemnumber);
-	if ($data1 ) {
-		# Found a matching item
-		##privileged get renewal whatever the case may be
-			if ($borrower->{'categorycode'} eq 'P'){
-			$renewokay = 1;
-			return $renewokay;
-			}
-		
-	##Find renewals of this item
-	my $rsth=$dbh->prepare("Select renewals from issues where itemnumber=? and borrowernumber=? and returndate is null");
-	$rsth->execute($data1->{itemnumber},$borrower->{borrowernumber});
-	$data1->{'renewals'}=$rsth->fetchrow;
-	$rsth->finish;
-		# See if this item may be renewed. 
-		my $sth2 = $dbh->prepare("select renewalsallowed from itemtypes	where itemtypes.itemtype=?");
-		$sth2->execute($data1->{ctype});
-		if (my $data2=$sth2->fetchrow_hashref) {
-		$renews = $data2->{'renewalsallowed'};
-		}
-		if ($renews > $data1->{'renewals'}) {
-			$renewokay= 1;
-		}else{
-			if (C4::Context->preference("strictrenewals")){
-			$renewokay=3 ;
-			}
-		}
-		$sth2->finish;
-		 ($resfound, $resrec) = CheckReserves($itemnumber);
-		if ($resfound) {
-			if (C4::Context->preference("strictrenewals")){
-			$renewokay=4;
-			}else{
-			       $renewokay = 0;
-         			 }
-		}
-		 ($resfound, $resrec) = CheckReserves($itemnumber);
-               		 if ($resfound) {
-              		 	 if (C4::Context->preference("strictrenewals")){
-						$renewokay=4;
-				}else{
-			   	   		 $renewokay = 0;
-          				  }
-			}
-     if (C4::Context->preference("strictrenewals")){
-	### A new system pref "allowRenewalsBefore" prevents the renewal before a set amount of days left before expiry
-	## Try to find whether book can be renewed at this date
-	my $loanlength;
-
-	my $allowRenewalsBefore = C4::Context->preference("allowRenewalsBefore");
-	my $today=C4::Date::get_today();
-
-	# Find the issues record for this book### 
-	my $sth=$dbh->prepare("select SUBDATE(date_due, $allowRenewalsBefore)  from issues where itemnumber=? and returndate is null");
-	$sth->execute($itemnumber);
-	my $startdate=$sth->fetchrow;
-	$sth->finish;
-	my $difference = DATE_diff($today,$startdate);
-	if  ($difference < 0) {
-	$renewokay=2 ;
-	}
-     }##strictrenewals	
-	}##item found
-#	$sth1->finish;
-
-	return($renewokay);
-}
-
-=head2 renewbook
-
-  &renewbook($env, $borrowernumber, $itemnumber, $datedue);
-
-Renews a loan.
-
-C<$env-E<gt>{branchcode}> is the code of the branch where the
-renewal is taking place.
-
-C<$env-E<gt>{usercode}> is the value to log in C<statistics.usercode>
-in the Koha database.
-
-C<$borrowernumber> is the borrower number of the patron who currently
-has the item.
-
-C<$itemnumber> is the number of the item to renew.
-
-C<$datedue> can be used to set the due date. If C<$datedue> is the
-empty string, C<&renewbook> will calculate the due date automatically
-from the book's item type. If you wish to set the due date manually,
-C<$datedue> should be in the form YYYY-MM-DD.
-
-=cut
-
-sub renewbook {
-	my ($env,$bornum,$itemnumber,$datedue)=@_;
-	# mark book as renewed
-
-	my $loanlength;
-my $dbh=C4::Context->dbh;
-my $sth;
-my  $iteminformation = getiteminformation($env, $itemnumber,0);
-		
-
-
-if ($datedue eq "" ) {
-
-		my  $borrower = C4::Members::getpatroninformation($env,$bornum,0);
-		 $loanlength = getLoanLength($borrower->{'categorycode'},$iteminformation->{'ctype'},$borrower->{'branchcode'});
-	
-		my $datedue=get_today();
-		my $calendar = C4::Calendar::Calendar->new(branchcode => $borrower->{'branchcode'});
-		my ($yeardue, $monthdue, $daydue) = split /-/, $datedue;
-		($daydue, $monthdue, $yeardue) = $calendar->addDate($daydue, $monthdue, $yeardue, $loanlength);
-		$datedue = "$yeardue-".sprintf ("%0.2d", $monthdue)."-". sprintf("%0.2d",$daydue);
-		
-	# Update the issues record to have the new due date, and a new count
-	# of how many times it has been renewed.
-	
-	$sth=$dbh->prepare("update issues set date_due = ?, renewals = renewals+1
-		where borrowernumber=? and itemnumber=? and returndate is null");
-	$sth->execute($datedue,$bornum,$itemnumber);
-	$sth->finish;
-
-	## Update items and marc record with new date -T.G
-	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due',$datedue);
-		
-	# Log the renewal
-	UpdateStats($env,$env->{'branchcode'},'renew','','',$itemnumber,$iteminformation->{'ctype'},$bornum);
-
-	# Charge a new rental fee, if applicable?
-	my ($charge,$type)=calc_charges($env, $itemnumber, $bornum);
-	if ($charge > 0){
-		my $accountno=getnextacctno($env,$bornum,$dbh);
-		$sth=$dbh->prepare("Insert into accountlines (borrowernumber,accountno,date,amount,description,accounttype,amountoutstanding,itemnumber)
-							values (?,?,now(),?,?,?,?,?)");
-		$sth->execute($bornum,$accountno,$charge,"Renewal of Rental Item $iteminformation->{'title'} $iteminformation->{'barcode'}",'Rent',$charge,$itemnumber);
-		$sth->finish;
-	#     print $account;
-	}# end of rental charge
-		
-	return format_date($datedue);
-	}
-
- 
-	
-}
-
-
-
-
-
-
-
-
-=item find_reserves
-
-  ($status, $record) = &find_reserves($itemnumber);
-
-Looks up an item in the reserves.
-
-C<$itemnumber> is the itemnumber to look up.
-
-C<$status> is true iff the search was successful.
-
-C<$record> is a reference-to-hash describing the reserve. Its keys are
-the fields from the reserves table of the Koha database.
-
-=cut
-#'
-# FIXME - This API is bogus: just return the record, or undef if none
-# was found.
-
-sub find_reserves {
-    my ($itemnumber) = @_;
-    my $dbh = C4::Context->dbh;
-    my ($itemdata) = getiteminformation("", $itemnumber,0);
-    my $sth = $dbh->prepare("select * from reserves where ((found = 'W') or (found is null)) and biblionumber = ? and cancellationdate is NULL order by priority, reservedate");
-    $sth->execute($itemdata->{'biblionumber'});
-    my $resfound = 0;
-    my $resrec;
-    my $lastrec;
-
-    # FIXME - I'm not really sure what's going on here, but since we
-    # only want one result, wouldn't it be possible (and far more
-    # efficient) to do something clever in SQL that only returns one
-    # set of values?
-while ($resrec = $sth->fetchrow_hashref) {
-	$lastrec = $resrec;
-      if ($resrec->{'found'} eq "W") {
-	    if ($resrec->{'itemnumber'} eq $itemnumber) {
-		$resfound = 1;
-	    }
-        } else {
-	    # FIXME - Use 'elsif' to avoid unnecessary indentation.
-	    if ($resrec->{'constrainttype'} eq "a") {
-		$resfound = 1;	
-	    } else {
-			my $consth = $dbh->prepare("select * from reserveconstraints where borrowernumber = ? and reservedate = ? and biblionumber = ? ");
-			$consth->execute($resrec->{'borrowernumber'},$resrec->{'reservedate'},$resrec->{'biblionumber'});
-			if (my $conrec = $consth->fetchrow_hashref) {
-				if ($resrec->{'constrainttype'} eq "o") {
-				$resfound = 1;
-				
-				}
-			}
-		$consth->finish;
-		}
-	}
-	if ($resfound) {
-	    my $updsth = $dbh->prepare("update reserves set found = 'W', itemnumber = ? where borrowernumber = ? and reservedate = ? and biblionumber = ?");
-	    $updsth->execute($itemnumber,$resrec->{'borrowernumber'},$resrec->{'reservedate'},$resrec->{'biblionumber'});
-	    $updsth->finish;
-	    last;
-	}
-    }
-    $sth->finish;
-    return ($resfound,$lastrec);
-}
-
-sub fixdate {
-    my ($year, $month, $day) = @_;
-    my $invalidduedate;
-    my $date;
-    if (($year eq 0) && ($month eq 0) && ($year eq 0)) {
-#	$env{'datedue'}='';
-    } else {
-	if (($year eq 0) || ($month eq 0) || ($year eq 0)) {
-	    $invalidduedate=1;
-	} else {
-	    if (($day>30) && (($month==4) || ($month==6) || ($month==9) || ($month==11))) {
-		$invalidduedate = 1;
-	    } elsif (($day > 29) && ($month == 2)) {
-		$invalidduedate=1;
-	    } elsif (($month == 2) && ($day > 28) && (($year%4) && ((!($year%100) || ($year%400))))) {
-		$invalidduedate=1;
-	    } else {
-		$date="$year-$month-$day";
-	    }
-	}
-    }
-    return ($date, $invalidduedate);
-}
-
-sub get_current_return_date_of {
-    my (@itemnumbers) = @_;
-
-    my $query = '
-SELECT date_due,
-       itemnumber
-  FROM issues
-  WHERE itemnumber IN ('.join(',', @itemnumbers).') AND returndate IS NULL
-';
-    return get_infos_of($query, 'itemnumber', 'date_due');
-}
-
-sub get_transfert_infos {
-    my ($itemnumber) = @_;
-
-    my $dbh = C4::Context->dbh;
-
-    my $query = '
-SELECT datesent,
-       frombranch,
-       tobranch
-  FROM branchtransfers
-  WHERE itemnumber = ?
-    AND datearrived IS NULL
-';
-    my $sth = $dbh->prepare($query);
-    $sth->execute($itemnumber);
-
-    my @row = $sth->fetchrow_array();
-
-    $sth->finish;
-
-    return @row;
-}
-
-
-sub DeleteTransfer {
-	my($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("DELETE FROM branchtransfers
-	where itemnumber=?
-	AND datearrived is null ");
-	$sth->execute($itemnumber);
-	$sth->finish;
-}
-
-sub GetTransfersFromBib {
-	my($frombranch,$tobranch) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT itemnumber,datesent,frombranch FROM
-	 branchtransfers 
-	where frombranch=?
-	AND tobranch=? 
-	AND datearrived is null ");
-	$sth->execute($frombranch,$tobranch);
-	my @gettransfers;
-	my $i=0;
-	while (my $data=$sth->fetchrow_hashref){
-		$gettransfers[$i]=$data;
-		$i++;
-    	}
-    	$sth->finish;
-    	return(@gettransfers);	
-}
-
-sub GetReservesToBranch {
-	my($frombranch,$default) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT borrowernumber,reservedate,itemnumber,timestamp FROM
-	 reserves 
-	where priority='0' AND cancellationdate is null  
-	AND branchcode=?
-	AND branchcode!=?
-	AND found is null ");
-	$sth->execute($frombranch,$default);
-	my @transreserv;
-	my $i=0;
-	while (my $data=$sth->fetchrow_hashref){
-		$transreserv[$i]=$data;
-		$i++;
-    	}
-    	$sth->finish;
-    	return(@transreserv);	
-}
-
-sub GetReservesForBranch {
-	my($frombranch) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT borrowernumber,reservedate,itemnumber,waitingdate FROM
-	 reserves 
-	where priority='0' AND cancellationdate is null 
-	AND found='W' 
-	AND branchcode=? order by reservedate");
-	$sth->execute($frombranch);
-	my @transreserv;
-	my $i=0;
-	while (my $data=$sth->fetchrow_hashref){
-		$transreserv[$i]=$data;
-		$i++;
-    	}
-    	$sth->finish;
-    	return(@transreserv);	
-}
-
-sub checktransferts{
-	my($itemnumber) = @_;
-	my $dbh = C4::Context->dbh;
-    	my $sth=$dbh->prepare("SELECT datesent,frombranch,tobranch FROM branchtransfers
-        WHERE itemnumber = ? AND datearrived IS NULL");
-	$sth->execute($itemnumber);
-	my @tranferts = $sth->fetchrow_array;
-	$sth->finish;
-
-	return (@tranferts);
-}
-
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: intranet/modules/C4/Circulation/Circ3.pm
===================================================================
RCS file: intranet/modules/C4/Circulation/Circ3.pm
diff -N intranet/modules/C4/Circulation/Circ3.pm
--- intranet/modules/C4/Circulation/Circ3.pm	25 Mar 2007 23:46:15 -0000	1.1.2.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,583 +0,0 @@
-# -*- tab-width: 8 -*-
-# Please use 8-character tabs for this file (indents are every 4 characters)
-
-package C4::Circulation::Circ3;
-
-# $Id: Circ3.pm,v 1.1.2.3 2007/03/25 23:46:15 tgarip1957 Exp $
-
-#package to deal with reserve section Returns
-#
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-# use warnings;
-require Exporter;
-
-use C4::Context;
-use C4::Stats;
-use C4::Reserves2;
-use C4::Koha;
-use C4::Accounts2;
-use C4::Date;
-use C4::Biblio;
-use C4::Search;
-use C4::Circulation::Circ2;
-use C4::Members;
-use C4::Circulation::Fines;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Circulation::Circ3 - Koha circulation module for NEU RESERVE section
-
-=head1 SYNOPSIS
-
-  use C4::Circulation::Circ3;
-
-=head1 DESCRIPTION
-
-The functions in this module deal with circulation, issues, and
-returns, as well as general information about the library.
-Also deals with stocktaking.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(
-	 &getissuesr  
-	&canbookbeissuedr &issuebookr &returnbookr 
-	);
-
-
-=head2 canbookbeissued
-
-Check if a book can be issued.
-
-my ($issuingimpossible,$needsconfirmation) = canbookbeissuedr($env,$borrower,$barcode,$year,$month,$day);
-
-=over 4
-
-C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
-
-C<$borrower> hash with borrower informations (from getpatroninformation)
-
-C<$barcode> is the bar code of the book being issued.
-
-C<$year> C<$month> C<$day> contains the date of the return (in case it's forced by "stickyduedate".
-
-=back
-
-Returns :
-
-=over 4
-
-C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
-Possible values are :
-
-=head3 INVALID_DATE 
-
-sticky due date is invalid
-
-=head3 GNA
-
-borrower gone with no address
-
-=head3 CARD_LOST
- 
-borrower declared it's card lost
-
-=head3 DEBARRED
-
-borrower debarred
-
-=head3 UNKNOWN_BARCODE
-
-barcode unknown
-
-=head3 NOT_FOR_LOAN
-
-item is not for loan
-
-=head3 WTHDRAWN
-
-item withdrawn.
-
-=head3 RESTRICTED
-
-item is restricted (set by ??)
-
-=back
-
-C<$issuingimpossible> a reference to a hash. It contains reasons why issuing is impossible.
-Possible values are :
-
-=head3 DEBT
-
-borrower has debts.
-
-=head3 RENEW_ISSUE
-
-renewing, not issuing
-
-=head3 ISSUED_TO_ANOTHER
-
-issued to someone else.
-
-=head3 RESERVED
-
-reserved for someone else.
-
-=head3 INVALID_DATE
-
-sticky due date is invalid
-
-=head3 TOO_MANY
-
-if the borrower borrows to much things
-
-=cut
-
-# check if a book can be issued.
-# returns an array with errors if any
-
-
-
-sub canbookbeissuedr {
-	my ($env,$borrower,$barcode,$year,$month,$day,$renew) = @_;
-	my %needsconfirmation; # filled with problems that needs confirmations
-	my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE
-	my $iteminformation = C4::Circulation::Circ2::getiteminformation($env, 0, $barcode);
-	my $dbh = C4::Context->dbh;
-#
-# DUE DATE is OK ?
-#
-#	my ($duedate, $invalidduedate) = fixdate($year, $month, $day);
-#	$issuingimpossible{INVALID_DATE} = 1 if ($invalidduedate);
-my $duedate;
-#
-# BORROWER STATUS
-#
-	if ($borrower->{flags}->{GNA}) {
-		$issuingimpossible{GNA} = 1;
-	}
-	if ($borrower->{flags}->{'LOST'}) {
-		$issuingimpossible{CARD_LOST} = 1;
-	}
-	if ($borrower->{flags}->{'DBARRED'}) {
-		$issuingimpossible{DEBARRED} = 1;
-	}
-	my $today=get_today();
-	if (DATE_diff($borrower->{expiry},$today)<0) {
-		$issuingimpossible{EXPIRED} = 1;
-	}
-#
-# BORROWER STATUS
-#
-
-# DEBTS
-	my $amount = C4::Accounts2::checkaccount($env,$borrower->{'borrowernumber'}, $dbh,$duedate);
-	if ($amount >0) {
-		$needsconfirmation{DEBT} = $amount;
-	}
-
-
-#
-# JB34 CHECKS IF BORROWERS DONT HAVE ISSUE TOO MANY BOOKS
-#
-	my $sth2 = $dbh->prepare("select COUNT(*) from reserveissue i where i.borrowernumber = ? and i.rettime is null ");
-	$sth2->execute($borrower->{'borrowernumber'});
-	my $toomany=$sth2->fetchrow;
-	$needsconfirmation{TOO_MANY} =  $toomany if $toomany;
-
-#
-# ITEM CHECKING
-#
-	unless ($iteminformation->{barcode}) {
-		$issuingimpossible{UNKNOWN_BARCODE} = 1;
-	}
-	if (uc($iteminformation->{'shelf'}) ne 'RES') {
-		$issuingimpossible{NOT_INRESERVE} = 1;
-	}
-	if ($iteminformation->{'ctype'} eq 'REF') {
-		$issuingimpossible{NOT_FOR_LOAN} = 1;
-	}
-	if ($iteminformation->{'wthdrawn'} == 1) {
-		$issuingimpossible{WTHDRAWN} = 1;
-	}
-	if ($iteminformation->{'restricted'} == 1) {
-		$issuingimpossible{RESTRICTED} = 1;
-	}
-	if (C4::Context->preference("IndependentBranches")){
-		my $userenv = C4::Context->userenv;
-		if (($userenv)&&($userenv->{flags} != 1)){
-			$issuingimpossible{NOTSAMEBRANCH} = 1 if ($iteminformation->{'holdingbranch'} ne $userenv->{branch} ) ;
-		}
-	}
-
-
-
-#
-# CHECK IF BOOK ALREADY ISSUED TO THIS BORROWER
-#
-	my ($currentborrower) = currentresborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower eq $borrower->{'borrowernumber'}) {
-# Already issued to current borrower. Ask whether the loan should
-# be renewed.
-#		my ($renewstatus) = renewstatus($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-#		if ($renewstatus == 0) { # no more renewals allowed
-			$issuingimpossible{NO_MORE_RENEWALS} = 1;
-#		} else {
-#warn "renew:$renew";
-#		if (!$renew){	$needsconfirmation{RENEW_ISSUE} = 1;
-#				}
-			
-#		}
-	} elsif ($currentborrower) {
-# issued to someone else
-		my $currborinfo = C4::Members::getpatroninformation(0,$currentborrower);
-#		warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
-		$needsconfirmation{ISSUED_TO_ANOTHER} = "$currborinfo->{'reservedate'} : $currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})";
-	}
-
-	return(\%issuingimpossible,\%needsconfirmation);
-}
-
-=head2 issuebook
-
-Issue a book. Does no check, they are done in canbookbeissued. If we reach this sub, it means the user confirmed if needed.
-
-&issuebookr($env,$borrower,$barcode,$date)
-
-=over 4
-
-C<$env> Environment variable. Should be empty usually, but used by other subs. Next code cleaning could drop it.
-
-C<$borrower> hash with borrower informations (from getpatroninformation)
-
-C<$barcode> is the bar code of the book being issued.
-
-C<$date> contains the max date of return. calculated if empty.
-
-=cut
-
-#
-# issuing book. We already have checked it can be issued, so, just issue it !
-#
-sub issuebookr {
-	my ($env,$borrower,$barcode,$cancelreserve) = @_;
-	my $dbh = C4::Context->dbh;
-
-
-	my $iteminformation = getiteminformation($env, 0, $barcode);
-	my $bibliorecord=XMLgetbibliohash($dbh,$iteminformation->{biblionumber});
-	
-#
-# check if we just renew the issue.
-#
-	my ($currentborrower) = currentresborrower($iteminformation->{'itemnumber'});
-	if ($currentborrower eq $borrower->{'borrowernumber'}) {
-		my ($charge,$itemtype) = calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-		if ($charge > 0) {
-			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
-			$iteminformation->{'charge'} = $charge;
-		}
-		&UpdateStats($env,$env->{'branchcode'},'renew',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
-		renewbook($env, $borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'});
-	} else {
-#
-# NOT a renewal
-#
-		if ($currentborrower ne '') {
-			# This book is currently on loan, but not to the person
-			# who wants to borrow it now. mark it returned before issuing to the new borrower
-			returnbookr($iteminformation->{'barcode'}, $env->{'branchcode'});
-		}
-
-		# Record in the database the fact that the book was issued.
-		my $sth=$dbh->prepare("insert into reserveissue (borrowernumber, itemnumber, duetime,restime) values (?,?,?,now())");
-		my $loanlength = C4::Context->preference('Reserveperiod');
-		my $datedue=time+($loanlength)*3600+900;
-		my @datearr = localtime($datedue);
-		my $dateduef = (1900+$datearr[5])."-".sprintf ("%0.2d",$datearr[4]+1)."-".sprintf ("%0.2d",$datearr[3])." ".sprintf ("%0.2d",$datearr[2]).":".sprintf ("%0.2d",$datearr[1]).":".sprintf ("%0.2d",$datearr[0]);
-#		if ($date) {
-#			$dateduef=$date;
-#		}
-		$sth->execute($borrower->{'borrowernumber'}, $iteminformation->{'itemnumber'}, $dateduef);
-		$sth->finish;
-##Update totalissues of bibliorecord if exist
-   my $totalissue=XML_readline_onerecord($bibliorecord,"totalissue","biblios");
-$totalissue=scalar($totalissue);
-	$totalissue++;
-my $extras=length($totalissue);
-	for (1..(6-$extras)){
-	$totalissue="0".$totalissue;
-	}
-	$bibliorecord=XML_writeline($bibliorecord,"totalissue",$totalissue,"biblios");
-	my $frameworkcode=MARCfind_frameworkcode($dbh,$iteminformation->{'biblionumber'});
-		 C4::Biblio::OLDmodbiblio($dbh,$bibliorecord,$iteminformation->{'biblionumber'},$frameworkcode);
-###
-
-		$iteminformation->{'issues'}++;
-		&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due',$dateduef,1);
-		&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'issues',$iteminformation->{'issues'},1);
-		&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'onloan','1',1);
-
-		&itemseen($dbh,$iteminformation->{'itemnumber'});
-		# If it costs to borrow this book, charge it to the patron's account.
-		my ($charge,$itemtype)=calc_charges($env, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'});
-		if ($charge > 0) {
-			createcharge($env, $dbh, $iteminformation->{'itemnumber'}, $borrower->{'borrowernumber'}, $charge);
-			$iteminformation->{'charge'}=$charge;
-		}
-		# Record the fact that this book was issued.
-		&UpdateStats($env,$env->{'branchcode'},'issue',$charge,'',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
-	}
-}
-
-=head2 getLoanLength
-
-Get loan length for an itemtype, a borrower type and a branch
-
-my $loanlength = &getLoanLength($borrowertype,$itemtype,branchcode)
-
-=cut
-
-=head2 returnbook
-
-  ($doreturn, $messages, $iteminformation, $borrower) =
-	  &returnbookr($barcode, $branch);
-
-Returns a book.
-
-C<$barcode> is the bar code of the book being returned. C<$branch> is
-the code of the branch where the book is being returned.
-
-C<&returnbook> returns a list of four items:
-
-C<$doreturn> is true iff the return succeeded.
-
-C<$messages> is a reference-to-hash giving the reason for failure:
-
-=over 4
-
-=item C<BadBarcode>
-
-No item with this barcode exists. The value is C<$barcode>.
-
-=item C<NotIssued>
-
-The book is not currently on loan. The value is C<$barcode>.
-
-=item C<IsPermanent>
-
-The book's home branch is a permanent collection. If you have borrowed
-this book, you are not allowed to return it. The value is the code for
-the book's home branch.
-
-=item C<wthdrawn>
-
-This book has been withdrawn/cancelled. The value should be ignored.
-
-=item C<ResFound>
-
-The item was reserved. The value is a reference-to-hash whose keys are
-fields from the reserves table of the Koha database, and
-C<biblioitemnumber>. It also has the key C<ResFound>, whose value is
-either C<Waiting>, C<Reserved>, or 0.
-
-=back
-
-C<$borrower> is a reference-to-hash, giving information about the
-patron who last borrowed the book.
-
-=cut
-
-# FIXME - This API is bogus. There's no need to return $borrower and
-# $iteminformation; the caller can ask about those separately, if it
-# cares (it'd be inefficient to make two database calls instead of
-# one, but &getpatroninformation and &getiteminformation can be
-# memoized if this is an issue).
-#
-# The ($doreturn, $messages) tuple is redundant: if the return
-# succeeded, that's all the caller needs to know. So &returnbook can
-# return 1 and 0 on success and failure, and set
-# $C4::Circulation::Circ2::errmsg to indicate the error. Or it can
-# return undef for success, and an error message on error (though this
-# is more C-ish than Perl-ish).
-
-sub returnbookr {
-	my ($barcode, $branch) = @_;
-	my %env;
-	my $messages;
-	my $dbh = C4::Context->dbh;
-	my $doreturn = 1;
-	die '$branch not defined' unless defined $branch; # just in case (bug 170)
-	# get information on item
-	my ($iteminformation) = getiteminformation(\%env, 0, $barcode);
-	if (not $iteminformation) {
-		$messages->{'BadBarcode'} = $barcode;
-		$doreturn = 0;
-	}
-	# find the borrower
-	my ($currentborrower) = currentresborrower($iteminformation->{'itemnumber'});
-
-	if ((not $currentborrower) && $doreturn) {
-		$messages->{'NotIssued'} = $barcode;
-		$doreturn = 0;
-	}
-my ($od,$issue,$fines,$resfine)=borrdata3(\%env,$currentborrower);
-if ($resfine>0){
- UpdateFine($iteminformation->{'itemnumber'},$currentborrower,$resfine,'RES',$iteminformation->{'duetime'});
-}
-	# check if the book is in a permanent collection....
-	my $hbr = $iteminformation->{'homebranch'};
-	my $branches = GetBranches();
-	if ($branches->{$hbr}->{'PE'}) {
-		$messages->{'IsPermanent'} = $hbr;
-	}
-	# check that the book has been cancelled
-	if ($iteminformation->{'wthdrawn'}) {
-		$messages->{'wthdrawn'} = 1;
-		$doreturn = 0;
-	}
-	# update issues, thereby returning book (should push this out into another subroutine
-	my ($borrower) = C4::Members::getpatroninformation(\%env, $currentborrower, 0);
-	if ($doreturn) {
-		my $sth = $dbh->prepare("update reserveissue set rettime = now() where (borrowernumber = ?) and (itemnumber = ?) and (rettime is null)");
-		$sth->execute( $currentborrower, $iteminformation->{'itemnumber'});
-		$messages->{'WasReturned'} = 1; # FIXME is the "= 1" right?
-	
-	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'date_due','',1);
-	&XMLmoditemonefield($dbh,$iteminformation->{'biblionumber'},$iteminformation->{'itemnumber'},'onloan','0',1);
-	}
-	my ($transfered, $mess, $item) = transferbook($branch, $barcode, 1);
-	itemseen($dbh,$iteminformation->{'itemnumber'});
-#	($borrower) = getpatroninformation(\%env, $currentborrower, 0);
-	# transfer book to the current branch
-	
-	if ($transfered) {
-		$messages->{'WasTransfered'} = 1; # FIXME is the "= 1" right?
-	}
-	# fix up the accounts.....
-	if ($iteminformation->{'itemlost'}) {
-#		fixaccountforlostandreturned($iteminformation, $currentborrower);
-		$messages->{'WasLost'} = 1; # FIXME is the "= 1" right?
-	}
-	# fix up the overdues in accounts...
-	fixoverduesonreturnres($currentborrower, $iteminformation->{'itemnumber'});
-	# find reserves.....
-	# update stats?
-	# Record the fact that this book was returned.
-	UpdateStats(\%env, $branch ,'return','0','',$iteminformation->{'itemnumber'},$iteminformation->{'ctype'},$borrower->{'borrowernumber'});
-	return ($doreturn, $messages, $iteminformation, $borrower);
-}
-sub fixoverduesonreturnres {
-	my ($brn, $itm) = @_;
-	my $dbh = C4::Context->dbh;
-	# check for overdue fine
-	my $sth = $dbh->prepare("select * from accountlines where (borrowernumber = ?) and (itemnumber = ?) and (accounttype='FU' or accounttype='O')");
-	$sth->execute($brn,$itm);
-	# alter fine to show that the book has been returned
-	if (my $data = $sth->fetchrow_hashref) {
-		my $usth=$dbh->prepare("update accountlines set accounttype='F' where (borrowernumber = ?) and (itemnumber = ?) and (accountno = ?)");
-		$usth->execute($brn,$itm,$data->{'accountno'});
-		$usth->finish();
-	}
-	$sth->finish();
-	return;
-}
-# Not exported
-sub currentresborrower {
-
-	my ($itemnumber) = @_;
-
-	my $dbh = C4::Context->dbh;
-	my $sth=$dbh->prepare("select borrowernumber from reserveissue where itemnumber=? and rettime is NULL");
-	$sth->execute($itemnumber);
-	my ($borrower) = $sth->fetchrow;
-	return($borrower);
-}
-=head2 getissues
-
-  $issues = &getissuesr($borrowernumber);
-
-Returns the set of books currently on loan to a patron.
-
-C<$borrowernumber> is the patron's borrower number.
-
-C<&getissues> returns a PHP-style array: C<$issues> is a
-reference-to-hash whose keys are integers in the range 0..I<n>-1,
-where I<n> is the number of books the patron currently has on loan.
-
-The values of C<$issues> are references-to-hash whose keys are
-selected fields from the issues, items, biblio, and biblioitems tables
-of the Koha database.
-
-=cut
-#'
-sub getissuesr {
-# New subroutine for Circ3.pm
-	my ($borrower) = @_;
-	my $dbh = C4::Context->dbh;
-	my $borrowernumber = $borrower->{'borrowernumber'};
-	my %currentissues;
-	my $select = "SELECT *,
-				timediff(now(),  reserveissue.duetime  ) as elapsed
-			
-			FROM reserveissue,items,biblio
-			WHERE reserveissue.borrowernumber  = ?
-			AND items.biblionumber=biblio.biblionumber
-			AND reserveissue.itemnumber      = items.itemnumber
-			AND reserveissue.rettime      IS NULL
-			";
-	#    print $select;
-	my $sth=$dbh->prepare($select);
-	$sth->execute($borrowernumber);
-	my $counter = 0;
-	while (my $data = $sth->fetchrow_hashref) {
-		if ($data->{'elapsed'}>0) {
-			$data->{'overdue'} = 1;
-		}
-		$currentissues{$counter} = $data;
-		$counter++;
-	}
-	$sth->finish;
-	return(\%currentissues);
-}
-
-
-
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut

Index: intranet/modules/C4/Circulation/Fines.pm
===================================================================
RCS file: intranet/modules/C4/Circulation/Fines.pm
diff -N intranet/modules/C4/Circulation/Fines.pm
--- intranet/modules/C4/Circulation/Fines.pm	25 Mar 2007 23:46:15 -0000	1.1.2.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,294 +0,0 @@
-package C4::Circulation::Fines;
-
-# $Id: Fines.pm,v 1.1.2.3 2007/03/25 23:46:15 tgarip1957 Exp $
-
-# Copyright 2000-2002 Katipo Communications
-#
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use strict;
-require Exporter;
-
-use C4::Context;
-use C4::Biblio;
-use vars qw($VERSION @ISA @EXPORT);
-
-# set the version for version checking
-$VERSION = 0.01;
-
-=head1 NAME
-
-C4::Circulation::Fines - Koha module dealing with fines
-
-=head1 SYNOPSIS
-
-  use C4::Circulation::Fines;
-
-=head1 DESCRIPTION
-
-This module contains several functions for dealing with fines for
-overdue items. It is primarily used by the 'misc/fines2.pl' script.
-
-=head1 FUNCTIONS
-
-=over 2
-
-=cut
-
- at ISA = qw(Exporter);
- at EXPORT = qw(&Getoverdues &CalcFine &BorType &UpdateFine &ReplacementCost);
-
-=item Getoverdues
-
-  ($count, $overdues) = &Getoverdues();
-
-Returns the list of all overdue books.
-
-C<$count> is the number of elements in C<@{$overdues}>.
-
-C<$overdues> is a reference-to-array. Each element is a
-reference-to-hash whose keys are the fields of the issues table in the
-Koha database.
-
-=cut
-#'
-sub Getoverdues{
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from issues where date_due < now() and returndate is  NULL order by borrowernumber");
-  $sth->execute;
-  # FIXME - Use push @results
-  my $i=0;
-  my @results;
-  while (my $data=$sth->fetchrow_hashref){
-  push  @results,$data;
-    $i++;
-  }
-  $sth->finish;
-  return($i,\@results);
-}
-
-=item CalcFine
-
-  ($amount, $chargename, $message) =
-	&CalcFine($itemnumber, $borrowercode, $days_overdue);
-
-Calculates the fine for a book.
-
-The issuingrules table in the Koha database is a fine matrix, listing
-the penalties for each type of patron for each type of item and each branch (e.g., the
-standard fine for books might be $0.50, but $1.50 for DVDs, or staff
-members might get a longer grace period between the first and second
-reminders that a book is overdue).
-
-
-
-C<$itemnumber> is the book's item number.
-
-C<$borrowercode> is the borrower code of the patron who currently has
-the book.
-
-C<$days_overdue> is the number of days elapsed since the book's due
-date.
-
-C<&CalcFine> returns a list of three values:
-
-C<$amount> is the fine owed by the patron (see above).
-
-C<$chargename> is the chargename field from the applicable record in
-the issuingrules table, whatever that is.
-
-C<$message> is a text message, either "First Notice", "Second Notice",
-or "Final Notice".
-
-=cut
-#'
-sub CalcFine {
-  my ($itemnumber,$bortype,$difference)=@_;
-  my $dbh = C4::Context->dbh;
-  # Look up the issuingrules record for this book's item type and the
-  # given borrwer type.
- 
-
-  my $sth=$dbh->prepare("Select * from items,itemtypes,issuingrules where items.itemnumber=?
- and  items.ctype=itemtypes.itemtype and
-  issuingrules.itemtype=itemtypes.itemtype and
-  issuingrules.categorycode=? ");
-#  print $query;
-  $sth->execute($itemnumber,$bortype);
-  my $data=$sth->fetchrow_hashref;
-	# FIXME - Error-checking: the item might be lost, or there
-	# might not be an entry in 'issuingrules' for this item type
-	# or borrower type.
-  $sth->finish;
-  my $amount=0;
-  my $printout;
-
-  if ($difference <= $data->{chargeperiod} && $difference>$data->{firstremind}){
-    # Yes. Set the fine as listed.
-$amount=$data->{'fine'}* $difference;
-  }elsif($difference > $data->{chargeperiod}){
-$difference=$data->{chargeperiod};
-$amount=$data->{'fine'}* $difference;
-  $printout="Final";
-}
-
-  # Is it time to send the account to a collection agency?
-  # FIXME -This $data->{'accountsent'} is not seemed to be set in the DB
-  
-  return($amount,$data->{'chargename'},$printout);
-}
-
-=item UpdateFine
-
-  &UpdateFine($itemnumber, $borrowernumber, $amount, $type, $description);
-
-(Note: the following is mostly conjecture and guesswork.)
-
-Updates the fine owed on an overdue book.
-
-C<$itemnumber> is the book's item number.
-
-C<$borrowernumber> is the borrower number of the patron who currently
-has the book on loan.
-
-C<$amount> is the current amount owed by the patron.
-
-C<$type> will be used in the description of the fine.
-
-C<$description> is a string that must be present in the description of
-the fine. I think this is expected to be a date in DD/MM/YYYY format.
-
-C<&UpdateFine> looks up the amount currently owed on the given item
-and sets it to C<$amount>, creating, if necessary, a new entry in the
-accountlines table of the Koha database.
-
-=cut
-#'
-# FIXME - This API doesn't look right: why should the caller have to
-# specify both the item number and the borrower number? A book can't
-# be on loan to two different people, so the item number should be
-# sufficient.
-sub UpdateFine {
-  my ($itemnum,$bornum,$amount,$type,$due)=@_;
-  my $dbh = C4::Context->dbh;
-  # FIXME - What exactly is this query supposed to do? It looks up an
-  # entry in accountlines that matches the given item and borrower
-  # numbers, where the description contains $due, and where the
-  # account type has one of several values, but what does this _mean_?
-  # Does it look up existing fines for this item?
-  # FIXME - What are these various account types? ("FU", "O", "F", "M")
-
-  my $sth=$dbh->prepare("Select * from accountlines where itemnumber=? and
-  borrowernumber=? and (accounttype='FU' or accounttype='O' or
-  accounttype='F' or accounttype='M') ");
-  $sth->execute($itemnum,$bornum);
-
-  if (my $data=$sth->fetchrow_hashref){
-    # I think this if-clause deals with the case where we're updating
-    # an existing fine.
-#    print "in accounts ...";
-    if ($data->{'amount'} != $amount){
-
-#     print "updating";
-      my $diff=$amount - $data->{'amount'};
-      my $out=$data->{'amountoutstanding'}+$diff;
-      my $sth2=$dbh->prepare("update accountlines set date=now(), amount=?,
-      amountoutstanding=?,accounttype='FU' where
-      accountid=?");
-      $sth2->execute($amount,$out,$data->{'accountid'});
-      $sth2->finish;
-   } else {
- #     print "no update needed $data->{'amount'} \n";
-    }
-  } else {
-    # I think this else-clause deals with the case where we're adding
-    # a new fine.
-    my $sth4=$dbh->prepare("select title from biblio ,items where items.itemnumber=?
-    and biblio.biblionumber=items.biblionumber");
-    $sth4->execute($itemnum);
-    my $title=$sth4->fetchrow;
-    $sth4->finish;
- #   print "not in account";
-    my $sth3=$dbh->prepare("Select max(accountno) from accountlines");
-    $sth3->execute;
-    # FIXME - Make $accountno a scalar.
-    my $accountno=$sth3->fetchrow;
-    $sth3->finish;
-    $accountno++;
-    my $sth2=$dbh->prepare("Insert into accountlines
-    (borrowernumber,itemnumber,date,amount,
-    description,accounttype,amountoutstanding,accountno) values
-    (?,?,now(),?,?,'FU',?,?)");
-    $sth2->execute($bornum,$itemnum,$amount,"$type $title $due",$amount,$accountno);
-    $sth2->finish;
-  }
-  $sth->finish;
-}
-
-
-
-=item BorType
-
-  $borrower = &BorType($borrowernumber);
-
-Looks up a patron by borrower number.
-
-C<$borrower> is a reference-to-hash whose keys are all of the fields
-from the borrowers and categories tables of the Koha database. Thus,
-C<$borrower> contains all information about both the borrower and
-category he or she belongs to.
-
-=cut
-#'
-sub BorType {
-  my ($borrowernumber)=@_;
-  my $dbh = C4::Context->dbh;
-  my $sth=$dbh->prepare("Select * from borrowers,categories where
-  borrowernumber=? and
-borrowers.categorycode=categories.categorycode");
-  $sth->execute($borrowernumber);
-  my $data=$sth->fetchrow_hashref;
-  $sth->finish;
-  return($data);
-}
-
-=item ReplacementCost
-
-  $cost = &ReplacementCost($itemnumber);
-
-Returns the replacement cost of the item with the given item number.
-
-=cut
-#'
-sub ReplacementCost{
-  my ($itemnumber)=@_;
-  my $dbh = C4::Context->dbh;
-  my ($itemrecord)=XMLgetitem($dbh,$itemnumber);
-$itemrecord=XML_xml2hash_onerecord($itemrecord);
- my $replacementprice=XML_readline_onerecord($itemrecord,"replacementprice","holdings"); 
-  return($replacementprice);
-}
-
-1;
-__END__
-
-=back
-
-=head1 AUTHOR
-
-Koha Developement team <info at koha.org>
-
-=cut





More information about the Koha-cvs mailing list