aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/captcha_gd.php
blob: 96e39af85bbfea31bc5f95595ab9dd9ec8c65782 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
1
-rw-r--r--perl-install/share/po/pt.po531
1 files changed, 33 insertions, 498 deletions
diff --git a/perl-install/share/po/pt.po b/perl-install/share/po/pt.po
index 353c6abd7..f7bee531b 100644
--- a/perl-install/share/po/pt.po
+++ b/perl-install/share/po/pt.po
@@ -1,31 +1,29 @@
-# translation of pt.po to Português
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
#
-# Copyright (C) 2000 Mandriva
-# Copyright (C) 2011 Mageia
-#
-# Fernando Moreira <fmoreira@netc.pt>, 1999.
-# Jorge Costa <Jorgercosta@netc.pt>, 2001.
-# José JORGE <jose.jorge@oreka.com>, 2002,2003.
-# Jose Jorge <jjorge@free.fr>, 2003, 2004, 2005.
-# Jose Carlos D. S. Saraiva <jose.d.s.saraiva@clix.pt>, 2004.
-# Zé <ze@mandriva.org>, 2004, 2005, 2006, 2007, 2008, 2010, 2011.
-# Zé <ze@mageia.org>, 2011, 2012.
-# Pedro <simplew8@gmail.com>, 2012.
-msgid ""
-msgstr ""
-"Project-Id-Version: pt\n"
-"Report-Msgid-Bugs-To: \n"
+# Translators:
+# Fernando Moreira <fmoreira@netc.pt>, 1999
+# Jorge Costa <Jorgercosta@netc.pt>, 2001
+# Jose Carlos D. S. Saraiva <jose.d.s.saraiva@clix.pt>, 2004
+# zecas <jjorge@free.fr>, 2003-2005
+# José JORGE <jose.jorge@oreka.com>, 2002-2003
+# alfalb_mansil, 2014
+# Pedro <simplew8@gmail.com>, 2012
+# Zé <ze@mageia.org>, 2011-2012
+# Zé <ze@mandriva.org>, 2004-2008,2010-2011
+msgid ""
+msgstr ""
+"Project-Id-Version: Mageia\n"
"POT-Creation-Date: 2015-05-13 20:35+0200\n"
-"PO-Revision-Date: 2012-07-02 03:07+0100\n"
-"Last-Translator: Pedro <simplew8@gmail.com>\n"
-"Language-Team: Portuguese <>\n"
+"PO-Revision-Date: 2015-05-26 19:12+0000\n"
+"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
+"Language-Team: Portuguese (http://www.transifex.com/projects/p/mageia/"
+"language/pt/)\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 1.5\n"
+"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Poedit-Language: Portuguese\n"
#: any.pm:258 any.pm:925 diskdrake/interactive.pm:642
#: diskdrake/interactive.pm:866 diskdrake/interactive.pm:928
@@ -1025,10 +1023,6 @@ msgstr "Nome de Utilizador do Administrador de Domínio"
msgid "Domain Admin Password"
msgstr "Senha do Administrador de Domínio"
-# NOTE: this message will be displayed at boot time; that is
-# only the ascii charset will be available on most machines
-# so use only 7bit for this message (and do transliteration or
-# leave it in English, as it is the best for your language)
#. -PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit)
#: bootloader.pm:1112
#, c-format
@@ -1051,9 +1045,9 @@ msgid "LILO with text menu"
msgstr "LILO com menu textual"
#: bootloader.pm:1278
-#, fuzzy, c-format
+#, c-format
msgid "GRUB2 with graphical menu"
-msgstr "GRUB com menu gráfico"
+msgstr ""
#: bootloader.pm:1279
#, c-format
@@ -2748,9 +2742,9 @@ msgid "You cannot use ReiserFS for partitions smaller than 32MB"
msgstr "Não pode usar ReiserFS em partições menores que 32MB"
#: fs/type.pm:371
-#, fuzzy, c-format
+#, c-format
msgid "You cannot use btrfs for partitions smaller than 256MB"
-msgstr "Não pode usar JFS para partições menores que 16MB"
+msgstr ""
#: fsedit.pm:25
#, c-format
@@ -3330,7 +3324,7 @@ msgstr "Escolher um controlador arbitrário"
#. -PO: keep the double empty lines between sections, this is formatted a la LaTeX
#: harddrake/sound.pm:261
-#, fuzzy, c-format
+#, c-format
msgid ""
"If you really think that you know which driver is the right one for your "
"card\n"
@@ -3338,10 +3332,6 @@ msgid ""
"\n"
"The current driver for your \"%s\" sound card is \"%s\" "
msgstr ""
-"Se realmente sabe qual é o controlador apropriado para a sua placa,\n"
-"escolha um da seguinte lista.\n"
-"\n"
-"O controlador atual para a sua placa de som \"%s\" é \"%s\" "
#: harddrake/v4l.pm:12
#, c-format
@@ -4760,7 +4750,7 @@ msgstr ""
#: messages.pm:11
#, c-format
msgid "_: You can warn about unofficial translation here"
-msgstr ""
+msgstr " "
#: messages.pm:18
#, c-format
@@ -4924,7 +4914,7 @@ msgid "3. The GPL License and Related Licenses"
msgstr "3. A licença GPL e as Licenças Relacionadas"
#: messages.pm:70
-#, fuzzy, c-format
+#, c-format
msgid ""
"The Software Products consist of components created by different persons or "
"entities.\n"
@@ -4939,18 +4929,6 @@ msgid ""
"Documentation written \n"
"by Mageia is governed by \"%s\" License."
msgstr ""
-"Os Produtos de 'Software' consistem em elementos criados por pessoas ou "
-"identidades.\n"
-"A maior parte destas licenças permitem o uso, duplicação, adaptação ou "
-"redistribuição dos componentes que cobrem.\n"
-"Por favor leia com atenção os termos e condições do acordo de licença para "
-"cada componente\n"
-"antes do uso dos mesmos. Qualquer questão acerca de uma componente deve ser "
-"endereçada ao\n"
-"licenciador ou distribuidor da componente e não à Mageia. Os programas "
-"desenvolvidos pela Mageia são governados pela licença GPL.\n"
-"A documentação escrita pela Mageia é governada por uma licença específica.\n"
-"Por favor veja a documentação para mais detalhes."
#: messages.pm:79
#, c-format
@@ -5196,9 +5174,9 @@ msgstr ""
"Deseja tentar novamente com outros parâmetros?"
#: mygtk2.pm:1229 mygtk3.pm:1283
-#, fuzzy, c-format
+#, c-format
msgid "Are you sure you want to quit?"
-msgstr "Tem certeza que deseja apagar este ponto de montagem?"
+msgstr ""
#: mygtk2.pm:1570 mygtk2.pm:1571 mygtk3.pm:1650 mygtk3.pm:1651
#, c-format
@@ -6116,9 +6094,9 @@ msgid "Avahi is a ZeroConf daemon which implements an mDNS stack"
msgstr "O avahi é um serviço ZeroConf que implementa uma pilha mDNS"
#: services.pm:26
-#, fuzzy, c-format
+#, c-format
msgid "An NTP client/server"
-msgstr "Servidor NTP"
+msgstr ""
#: services.pm:27
#, c-format
@@ -6549,9 +6527,9 @@ msgid "Packet filtering firewall"
msgstr "'Firewall' de filtragem de pacotes"
#: services.pm:114
-#, fuzzy, c-format
+#, c-format
msgid "Packet filtering firewall for IPv6"
-msgstr "'Firewall' de filtragem de pacotes"
+msgstr ""
#: services.pm:115
#, c-format
@@ -7046,446 +7024,3 @@ msgstr ""
#, c-format
msgid "Installation failed"
msgstr "Instalação falhada"
-
-#~ msgid ""
-#~ "Information on configuring your system is available in the post\n"
-#~ "install chapter of the Official Mageia User's Guide."
-#~ msgstr ""
-#~ "A informação acerca de como configurar o seu sistema está disponível no\n"
-#~ "capítulo pós-instalação do Guia Oficial do Utilizador Mageia."
-
-#~ msgid ""
-#~ "You may need to change your Open Firmware boot-device to\n"
-#~ " enable the bootloader. If you do not see the bootloader prompt at\n"
-#~ " reboot, hold down Command-Option-O-F at reboot and enter:\n"
-#~ " setenv boot-device %s,\\\\:tbxi\n"
-#~ " Then type: shut-down\n"
-#~ "At your next boot you should see the bootloader prompt."
-#~ msgstr ""
-#~ "Pode precisar de mudar 'firmware' de código livre do seu dispositivo\n"
-#~ " de arranque para ativar o carregador de arranque. Se não vê\n"
-#~ " a linha de comandos do carregador de arranque ao reiniciar,\n"
-#~ " prima em Comando-Opção-O-F ao reiniciar e digite:\n"
-#~ " setenv boot-device %s,\\\\:tbxi\n"
-#~ " Depois digite: shutdown\n"
-#~ "No próximo arranque deve ver a linha de comandos do carregador de "
-#~ "arranque."
-
-#~ msgid "Init Message"
-#~ msgstr "Mensagem Init"
-
-#~ msgid "Open Firmware Delay"
-#~ msgstr "Atraso do 'firmware' de código livre"
-
-#~ msgid "Kernel Boot Timeout"
-#~ msgstr "Tempo de espera no arranque do kernel"
-
-#~ msgid "Enable CD Boot?"
-#~ msgstr "Ativar arranque de CD?"
-
-#~ msgid "Enable OF Boot?"
-#~ msgstr "Ativar do arranque?"
-
-#~ msgid "Default OS?"
-#~ msgstr "Sistema Operativo predefinido?"
-
-#~ msgid "NoVideo"
-#~ msgstr "Sem Vídeo"
-
-#~ msgid "Other OS (SunOS...)"
-#~ msgstr "Outro SO (SunOS...)"
-
-#~ msgid "Other OS (MacOS...)"
-#~ msgstr "Outro SO (MacOS...)"
-
-#~ msgid "Yaboot"
-#~ msgstr "Yaboot"
-
-#~ msgid "SILO"
-#~ msgstr "SILO"
-
-#~ msgid "SunOS"
-#~ msgstr "SunOS"
-
-#~ msgid "HFS"
-#~ msgstr "HFS"
-
-#~ msgid ""
-#~ "Here you can select an alternative driver (either OSS or ALSA) for your "
-#~ "sound card (%s)."
-#~ msgstr ""
-#~ "Aqui pode selecionar um controlador alternativo (seja OSS ou ALSA) para a "
-#~ "sua placa de som (%s)."
-
-#~ msgid "Extended partition not supported on this platform"
-#~ msgstr "A partição extendida não é suportada nesta plataforma"
-
-#~ msgid "Clean /tmp at each boot"
-#~ msgstr "Limpar /tmp a cada arranque"
-
-#~ msgid ""
-#~ "The old \"%s\" driver is blacklisted.\n"
-#~ "\n"
-#~ "It has been reported to oops the kernel on unloading.\n"
-#~ "\n"
-#~ "The new \"%s\" driver will only be used on next bootstrap."
-#~ msgstr ""
-#~ "O antigo controlador \"%s\" está na lista negra.\n"
-#~ "\n"
-#~ "Foi indicado que provoca erros no kernel ao descarregar.\n"
-#~ "\n"
-#~ "O novo controlador \"%s\" será apenas usado no próximo arranque."
-
-#~ msgid "No open source driver"
-#~ msgstr "Nenhum controlador de código livre"
-
-#~ msgid ""
-#~ "There's no free driver for your sound card (%s), but there's a "
-#~ "proprietary driver at \"%s\"."
-#~ msgstr ""
-#~ "Não existe nenhum controlador livre para a sua placa de som (%s), mas "
-#~ "existe um controlador proprietário em \"%s\"."
-
-#~ msgid "command %s missing"
-#~ msgstr "comando %s em falta"
-
-#~ msgid ""
-#~ "The classic bug sound tester is to run the following commands:\n"
-#~ "\n"
-#~ "\n"
-#~ "- \"lspcidrake -v | fgrep -i AUDIO\" will tell you which driver your card "
-#~ "uses\n"
-#~ "by default\n"
-#~ "\n"
-#~ "- \"grep sound-slot /etc/modprobe.conf\" will tell you what driver it\n"
-#~ "currently uses\n"
-#~ "\n"
-#~ "- \"/sbin/lsmod\" will enable you to check if its module (driver) is\n"
-#~ "loaded or not\n"
-#~ "\n"
-#~ "- \"/sbin/chkconfig --list sound\" and \"/sbin/chkconfig --list alsa\" "
-#~ "will\n"
-#~ "tell you if sound and alsa services are configured to be run on\n"
-#~ "initlevel 3\n"
-#~ "\n"
-#~ "- \"aumix -q\" will tell you if the sound volume is muted or not\n"
-#~ "\n"
-#~ "- \"/sbin/fuser -v /dev/dsp\" will tell which program uses the sound "
-#~ "card.\n"
-#~ msgstr ""
-#~ "O teste clássico a fazer em caso de problemas de som é:\n"
-#~ "\n"
-#~ "\n"
-#~ "- \"lspcidrake -v | fgrep -i AUDIO\" diz-lhe que controlador a sua placa "
-#~ "usa\n"
-#~ "por omissão\n"
-#~ "\n"
-#~ "- \"grep sound-slot /etc/modprobe.conf\" diz-lhe que controlador\n"
-#~ "actualmente usa\n"
-#~ "\n"
-#~ "- \"/sbin/lsmod\" permite-lhe verificar se o seu módulo controlador)\n"
-#~ "está carregado ou não\n"
-#~ "\n"
-#~ "- \"/sbin/chkconfig --list sound\" e \"/sbin/chkconfig --list alsa\" diz-"
-#~ "lhe\n"
-#~ "se os serviços sound e alsa estão configurados para ser lançados no\n"
-#~ "initlevel 3\n"
-#~ "\n"
-#~ "- \"aumix -q\" diz-lhe se o volume de som está 'mudo' ou não\n"
-#~ "\n"
-#~ "- \"/sbin/fuser -v /dev/dsp\" diz-lhe que programa a placa de som usa.\n"
-
-#~ msgid ""
-#~ "Launch packet filtering for Linux kernel 2.2 series, to set\n"
-#~ "up a firewall to protect your machine from network attacks."
-#~ msgstr ""
-#~ "Lança um filtro de pacotes para o Linux kernel 2.2, para definir\n"
-#~ "uma 'firewall' para proteger a sua máquina de ataques da rede."
-
-#~ msgid "File sharing"
-#~ msgstr "Partilha de ficheiros"
-
-#~ msgid "Enable 5.1 sound with Pulse Audio"
-#~ msgstr "Activar som 5.1 com PulseAudio"
-
-#~ msgid "Enable user switching for audio applications"
-#~ msgstr "Activar mudança de utilizador para aplicações áudio"
-
-#~ msgid ""
-#~ "You agree not to (i) sell, export, re-export, transfer, divert, disclose "
-#~ "technical data, or \n"
-#~ "dispose of, any Software to any person, entity, or destination prohibited "
-#~ "by US export laws \n"
-#~ "or regulations including, without limitation, Cuba, Iran, North Korea, "
-#~ "Sudan and Syria; or \n"
-#~ "(ii) use any Software for any use prohibited by the laws or regulations "
-#~ "of the United States.\n"
-#~ "\n"
-#~ "U.S. GOVERNMENT RESTRICTED RIGHTS. \n"
-#~ "\n"
-#~ "The Software Products and any accompanying documentation are and shall be "
-#~ "deemed to be \n"
-#~ "\"commercial computer software\" and \"commercial computer software "
-#~ "documentation,\" respectively, \n"
-#~ "as defined in DFAR 252.227-7013 and as described in FAR 12.212. Any use, "
-#~ "modification, reproduction, \n"
-#~ "release, performance, display or disclosure of the Software and any "
-#~ "accompanying documentation \n"
-#~ "by the United States Government shall be governed solely by the terms of "
-#~ "this Agreement and any \n"
-#~ "other applicable licence agreements and shall be prohibited except to the "
-#~ "extent expressly permitted \n"
-#~ "by the terms of this Agreement."
-#~ msgstr ""
-#~ "Concorda em (i) não vender, exportar, re-exportar, transferir, revelar "
-#~ "dados técnicos,\n"
-#~ "ou expor, qualquer programa a qualquer pessoa, entidade, ou destino "
-#~ "proibido pelas\n"
-#~ "de exportação dos EUA ou regulamentações incluídas, sem limitações, Cuba, "
-#~ "Irão,\n"
-#~ "Coreia do Norte, Sudão e Síria, ou (ii) uso de qualquer programa para "
-#~ "qualquer uso\n"
-#~ "proibido pelas leis e regulamentações dos Estados Unidos.\n"
-#~ "\n"
-#~ "DIREITOS RESTRITOS DO GOVERNO DOS ESTADOS UNIDOS\n"
-#~ "\n"
-#~ "Os Produtos de Programas e qualquer documentação incluída são e serão "
-#~ "julgados como\n"
-#~ "\"programas comerciais de computador\" e \"documentação dos programas "
-#~ "comerciais de\n"
-#~ "computador\" respectivamente, como definido no DFAR 252.227-7013 e como "
-#~ "descrito\n"
-#~ "no FAR 12.212. Qualquer uso, modificação, reprodução, lançamento, "
-#~ "desempenho,\n"
-#~ "apresentação ou revelação dos Programas e qualquer documentação incluída "
-#~ "pelo Governo\n"
-#~ "dos Estados Unidos será governada unicamente pelos termos deste Acordo e "
-#~ "qualquer\n"
-#~ "outro acordo de licença aplicável será proibido excepto para a à extensão "
-#~ "expressamente\n"
-#~ "permitida pelos termos deste Acordo."
-
-#~ msgid ""
-#~ "Most of these components, but excluding the applications and software "
-#~ "provided by Google Inc. or \n"
-#~ "its subsidiaries (\"Google Software\"), are governed under the terms and "
-#~ "conditions of the GNU \n"
-#~ "General Public Licence, hereafter called \"GPL\", or of similar licenses."
-#~ msgstr ""
-#~ "A maioria destes componentes, excluindo as aplicações e programas "
-#~ "fornecidos pelo Google Inc.\n"
-#~ "ou os seus subsidiários (\"Google Software\"), são governados sob os "
-#~ "termos e condições GNU\n"
-#~ "Licença Publica Geral, também chamada \"GPL\", ou licenças similares."
-
-#~ msgid ""
-#~ "Most of these components are governed under the terms and conditions of "
-#~ "the GNU \n"
-#~ "General Public Licence, hereafter called \"GPL\", or of similar licenses."
-#~ msgstr ""
-#~ "A maioria destes componentes são governados sob os termos e condições "
-#~ "GNU\n"
-#~ "General Public Licence, também conhecida como \"GPL\", ou de licenças "
-#~ "similares."
-
-#~ msgid ""
-#~ "6. Additional provisions applicable to those Software Products provided "
-#~ "by Google Inc. (\"Google Software\")\n"
-#~ "\n"
-#~ "(a) You acknowledge that Google or third parties own all rights, title "
-#~ "and interest in and to the Google \n"
-#~ "Software, portions thereof, or software provided through or in "
-#~ "conjunction with the Google Software, including\n"
-#~ "without limitation all Intellectual Property Rights. \"Intellectual "
-#~ "Property Rights\" means any and all rights \n"
-#~ "existing from time to time under patent law, copyright law, trade secret "
-#~ "law, trademark law, unfair competition \n"
-#~ "law, database rights and any and all other proprietary rights, and any "
-#~ "and all applications, renewals, extensions \n"
-#~ "and restorations thereof, now or hereafter in force and effect worldwide. "
-#~ "You agree not to modify, adapt, \n"
-#~ "translate, prepare derivative works from, decompile, reverse engineer, "
-#~ "disassemble or otherwise attempt to derive \n"
-#~ "source code from Google Software. You also agree to not remove, obscure, "
-#~ "or alter Google's or any third party's \n"
-#~ "copyright notice, trademarks, or other proprietary rights notices affixed "
-#~ "to or contained within or accessed in \n"
-#~ "conjunction with or through the Google Software. \n"
-#~ "\n"
-#~ "(b) The Google Software is made available to you for your personal, non-"
-#~ "commercial use only.\n"
-#~ "You may not use the Google Software in any manner that could damage, "
-#~ "disable, overburden, or impair Google's \n"
-#~ "search services (e.g., you may not use the Google Software in an "
-#~ "automated manner), nor may you use Google \n"
-#~ "Software in any manner that could interfere with any other party's use "
-#~ "and enjoyment of Google's search services\n"
-#~ "or the services and products of the third party licensors of the Google "
-#~ "Software.\n"
-#~ "\n"
-#~ "(c) Some of the Google Software is designed to be used in conjunction "
-#~ "with Google's search and other services.\n"
-#~ "Accordingly, your use of such Google Software is also defined by Google's "
-#~ "Terms of Service located at \n"
-#~ "http://www.google.com/terms_of_service.html and Google's Toolbar Privacy "
-#~ "Policy located at \n"
-#~ "http://www.google.com/support/toolbar/bin/static.py?page=privacy.html.\n"
-#~ "\n"
-#~ "(d) Google Inc. and each of its subsidiaries and affiliates are third "
-#~ "party beneficiaries of this contract \n"
-#~ "and may enforce its terms."
-#~ msgstr ""
-#~ "6. Provisões adicionais aplicáveis àqueles Produtos de Software "
-#~ "fornecidos pela Google Inc. (\"Google Software\")\n"
-#~ "\n"
-#~ "(a) Reconhece que o Google ou partes terceiras possuem todos os "
-#~ "direitos, título e interesse em e para\n"
-#~ "o Google Software, partes dos mesmos, ou programas fornecidos por meio ou "
-#~ "em conjunto com o Google\n"
-#~ "Software, incluindo todos os Direitos de Propriedade Intelectual sem "
-#~ "qualquer limitação. Os \"Direitos\n"
-#~ "de Propriedade Intelectual\" significam qualquer ou todos os direitos "
-#~ "existentes de tempos a tempos\n"
-#~ "sob a lei de patentes, direito de marcas, concorrência desleal, direitos "
-#~ "de base de dados e quaisquer\n"
-#~ "outros direitos de propriedade e quaisquer aplicações, renovações, "
-#~ "extensões e restaurações, agora\n"
-#~ "ou mais tarde em vigor e com efeito todo o mundo. Concorda em não "
-#~ "modificar,adaptar, traduzir,\n"
-#~ "preparar trabalhos derivados, descompilar, fazer engenharia reversa, "
-#~ "desmontar nem tentar derivar\n"
-#~ "o código fonte do software Google. Concorda também em não remover, "
-#~ "adulterar ou alterar o Google\n"
-#~ "ou qualquer aviso de direitos de autor, marcas comerciais ou outros "
-#~ "avisos de direitos de propriedade\n"
-#~ "afixadas ou contidas ou acedidas em conjunto com ou através do software "
-#~ "Google.\n"
-#~ "\n"
-#~ "(b) O software Google é-lhe disponibilizado para o seu uso pessoal, "
-#~ "apenas uso não-comercial.\n"
-#~ "Não pode usar o software Google em qualquer forma que possa danificar, "
-#~ "incapacitar, ou danificar \n"
-#~ "os serviços de pesquisa Google (por exemplo, não pode usar o software "
-#~ "Google de uma maneira automatizada),\n"
-#~ "nem poderá usar o Google Software de qualquer maneira que possa "
-#~ "interferir no uso de alguma outra\n"
-#~ "parte e fruição dos serviços de pesquisa Google ou os serviços e produtos "
-#~ "de licenciadores terceiros do\n"
-#~ "Google Software.\n"
-#~ "\n"
-#~ "(c) Alguns dos programas Google são projectados para serem usados em "
-#~ "conjunto com a pesquisa do\n"
-#~ "Google e outros serviços. Desta forma, o uso de tais programas do Google "
-#~ "também é definido pelos\n"
-#~ "Termos de Serviço do Google localizado na barra de ferramentas Google\n"
-#~ "http://www.google.com/terms_of_service.html e a Política de Privacidade "
-#~ "localizada em\n"
-#~ "http://www.google.com/support/toolbar/bin/static.py?page=privacy.html.\n"
-#~ "\n"
-#~ "(d) O Google Inc. e cada uma das suas subsidiárias e afiliadas são "
-#~ "beneficiários terceiros deste\n"
-#~ "contrato e podem fazer valer os seus termos."
-
-#~ msgid ""
-#~ "To ensure data integrity after resizing the partition(s),\n"
-#~ "filesystem checks will be run on your next boot into Microsoft Windows®"
-#~ msgstr ""
-#~ "Para assegurar a integridade dos dados após redimensionar\n"
-#~ "a(s) partição(ões), as verificações do sistema de ficheiros serão\n"
-#~ "executadas na próxima vez que arrancar o Microsoft Windows®"
-
-#~ msgid "Restrict command line options"
-#~ msgstr "Restringir opções da linha de comando"
-
-#~ msgid "restrict"
-#~ msgstr "restringir"
-
-#~ msgid ""
-#~ "Option ``Restrict command line options'' is of no use without a password"
-#~ msgstr ""
-#~ "A opção ``Restringir opções da linha de comando'' não tem qualquer uso "
-#~ "sem uma senha"
-
-#~ msgid "Use an encrypted filesystem"
-#~ msgstr "Usar sistema de ficheiros encriptado"
-
-#~ msgid "Use the Microsoft Windows® partition for loopback"
-#~ msgstr "Usar a partição Microsoft Windows® para loopback"
-
-#~ msgid "Which partition do you want to use for Linux4Win?"
-#~ msgstr "Que partição deseja usar para o Linux4Win?"
-
-#~ msgid "Choose the sizes"
-#~ msgstr "Escolha os tamanhos"
-
-#~ msgid "Root partition size in MB: "
-#~ msgstr "Tamanho da partição de raiz em MB: "
-
-#~ msgid "Swap partition size in MB: "
-#~ msgstr "Tamanho da partição swap em MB: "
-
-#~ msgid ""
-#~ "There is no FAT partition to use as loopback (or not enough space left)"
-#~ msgstr ""
-#~ "Não há partições FAT para usar como loopback (ou não tem espaço "
-#~ "suficiente)"
-
-#~ msgid ""
-#~ "The FAT resizer is unable to handle your partition, \n"
-#~ "the following error occurred: %s"
-#~ msgstr ""
-#~ "O redimensionador FAT não consegue redimensionar a sua partição, \n"
-#~ "ocorreu o seguinte erro: %s"
-
-#~ msgid "Automatic routing from ALSA to PulseAudio"
-#~ msgstr "Roteamento automático ALSA para PulseAudio"
-
-#~ msgid "Please log out and then use Ctrl-Alt-BackSpace"
-#~ msgstr "Por favor saia desta sessão e depois use Ctrl-Alt-BackSpace"
-
-#~ msgid "Welcome To Crackers"
-#~ msgstr "Bem-vindo ao Crackers"
-
-#~ msgid "Poor"
-#~ msgstr "Baixo"
-
-#~ msgid "High"
-#~ msgstr "Elevado"
-
-#~ msgid "Higher"
-#~ msgstr "Superior"
-
-#~ msgid "Paranoid"
-#~ msgstr "Paranóico"
-
-#~ msgid ""
-#~ "This level is to be used with care. It makes your system more easy to "
-#~ "use,\n"
-#~ "but very sensitive. It must not be used for a machine connected to "
-#~ "others\n"
-#~ "or to the Internet. There is no password access."
-#~ msgstr ""
-#~ "Este nível é para ser usado com cuidado. Torna seu sistema mais fácil \n"
-#~ "de usar, mas muito sensível Não deve ser usado para uma máquina \n"
-#~ "conectada a outras ou à Internet. Não existe acesso por senha."
-
-#~ msgid ""
-#~ "Passwords are now enabled, but use as a networked computer is still not "
-#~ "recommended."
-#~ msgstr ""
-#~ "As senhas agora estão activas, mas o uso como computador de rede ainda "
-#~ "não é recomendado."
-
-#~ msgid ""
-#~ "There are already some restrictions, and more automatic checks are run "
-#~ "every night."
-#~ msgstr ""
-#~ "Já há algumas restrições, e mais controlos automáticos são executados "
-#~ "todas as noites."
-
-#~ msgid ""
-#~ "This is similar to the previous level, but the system is entirely closed "
-#~ "and security features are at their maximum."
-#~ msgstr ""
-#~ "Este é similar ao nível anterior, mas o sistema está completamente "
-#~ "fechado e as características de segurança estão no máximo."
> 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640
<?php
/**
*
* @package VC
* @version $Id$
* @copyright (c) 2006 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* Original Author - Xore (Robert Hetzler)
* With contributions from Neothermic
*
* @package VC
*/
class captcha
{
	var $width = 360;
	var $height = 96;


	/**
	* Create the image containing $code with a seed of $seed
	*/
	function execute($code, $seed)
	{
		global $config;
		
		mt_srand($seed);

		// Create image
		$img = imagecreatetruecolor($this->width, $this->height);

		// Generate colours
		$colour = new colour_manager($img, array(
			'random'	=> true,
			'min_value'	=> 60,
		), 'hsv');

		$scheme = $colour->colour_scheme('background', false);
		$scheme = $colour->mono_range($scheme, 10, false);
		shuffle($scheme);

		$bg_colours = array_splice($scheme, mt_rand(6, 12));

		// Generate code characters
		$characters = $sizes = $bounding_boxes = $noise = array();
		$width_avail = $this->width - 15;
		$code_len = strlen($code);
		$captcha_bitmaps = $this->captcha_bitmaps();

		for ($i = 0; $i < $code_len; ++$i)
		{
			$characters[$i] = new char_cube3d($captcha_bitmaps, $code[$i]);

			list($min, $max) = $characters[$i]->range();
			$sizes[$i] = mt_rand($min, $max);

			$box = $characters[$i]->dimensions($sizes[$i]);
			$width_avail -= ($box[2] - $box[0]);
			$bounding_boxes[$i] = $box;
		}

 
		// Redistribute leftover x-space
		$offset = array();
		for ($i = 0; $i < $code_len; ++$i)
		{
			$denom = ($code_len - $i);
			$denom = max(1.3, $denom);
			$offset[$i] = mt_rand(0, (1.5 * $width_avail) / $denom);
			$width_avail -= $offset[$i];
		}

		if ($config['captcha_gd_x_grid'])
		{
			$grid = (int) $config['captcha_gd_x_grid'];
			for ($y = 0; $y < $this->height; $y += mt_rand($grid - 2, $grid + 2))
			{
				$current_colour = $scheme[array_rand($scheme)];
				imageline($img, mt_rand(0,4), mt_rand($y - 3, $y), mt_rand($this->width - 5, $this->width), mt_rand($y - 3, $y), $current_colour);
			}
		}

		if ($config['captcha_gd_y_grid'])
		{
			$grid = (int) $config['captcha_gd_y_grid'];
			for ($x = 0; $x < $this->width; $x += mt_rand($grid - 2, $grid + 2))
			{
				$current_colour = $scheme[array_rand($scheme)];
				imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
			}
		}
		if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
		{
			$this->wave($img);
		}
		
		
		if ($config['captcha_gd_3d_noise'])
		{
			$xoffset = mt_rand(0,9);
			$noise_bitmaps = $this->captcha_noise_bg_bitmaps();
			for ($i = 0; $i < $code_len; ++$i)
			{
				$noise[$i] = new char_cube3d($noise_bitmaps, mt_rand(1, count($noise_bitmaps['data'])));

				list($min, $max) = $noise[$i]->range();
				//$box = $noise[$i]->dimensions($sizes[$i]);
			}
			$xoffset = 0;
			for ($i = 0; $i < $code_len; ++$i)
			{
				$dimm = $bounding_boxes[$i];
				$xoffset += ($offset[$i] - $dimm[0]);
				$yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
	 
				$noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
				$xoffset += $dimm[2];
			}
		}
		$xoffset = 5;
		for ($i = 0; $i < $code_len; ++$i)
		{
			$dimm = $bounding_boxes[$i];
			$xoffset += ($offset[$i] - $dimm[0]);
			$yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);

			$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
			$xoffset += $dimm[2];
		}
		if ($config['captcha_gd_wave'])
		{
			$this->wave($img);
		}
		if ($config['captcha_gd_foreground_noise'])
		{
			$this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
		}
		// Send image
		header('Content-Type: image/png');
		header('Cache-control: no-cache, no-store');
		imagepng($img);
		imagedestroy($img);
	}

	/**
	* Sinus
	*/
	function wave($img)
	{
		global $config;
		
		$period_x = mt_rand(12,18);
		$period_y = mt_rand(7,14);
		$amp_x = mt_rand(5,10);
		$amp_y = mt_rand(2,4); 
		$socket = mt_rand(0,100);
		
		$dampen_x = mt_rand($this->width/5, $this->width/2);
		$dampen_y = mt_rand($this->height/5, $this->height/2);
		$direction_x = (mt_rand (0, 1));
		$direction_y = (mt_rand (0, 1));

		for ($i = 0; $i < $this->width; $i++)
		{
			$dir = ($direction_x) ? $i : ($this->width - $i);
			imagecopy($img, $img, $i-1, sin($socket+ $i/($period_x + $dir/$dampen_x)) * $amp_x, $i, 0, 1, $this->height);
		}
		$socket = mt_rand(0,100);
		for ($i = 0; $i < $this->height; $i++)
		{
			$dir = ($direction_y) ? $i : ($this->height - $i);
			imagecopy($img, $img ,sin($socket + $i/($period_y + ($dir)/$dampen_y)) * $amp_y, $i-1, 0, $i, $this->width, 1);
		}
		return $img;
	}
	
	/**
	* Noise line
	*/
	function noise_line($img, $min_x, $min_y, $max_x, $max_y, $bg, $font, $non_font)
	{
		imagesetthickness($img, 2);

		$x1 = $min_x;
		$x2 = $max_x;
		$y1 = $min_y;
		$y2 = $min_y;

		do
		{
			$line = array_merge(
				array_fill(0, mt_rand(30, 60), $non_font[array_rand($non_font)]),
				array_fill(0, mt_rand(30, 60), $bg)
			);

			imagesetstyle($img, $line);
			imageline($img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);

			$y1 += mt_rand(12, 35);
			$y2 += mt_rand(12, 35);
		}
		while ($y1 < $max_y && $y2 < $max_y);

		$x1 = $min_x;
		$x2 = $min_x;
		$y1 = $min_y;
		$y2 = $max_y;

		do
		{
			$line = array_merge(
				array_fill(0, mt_rand(30, 60), $non_font[array_rand($non_font)]),
				array_fill(0, mt_rand(30, 60), $bg)
			);

			imagesetstyle($img, $line);
			imageline($img, $x1, $y1, $x2, $y2, IMG_COLOR_STYLED);

			$x1 += mt_rand(20, 35);
			$x2 += mt_rand(20, 35);
		}
		while ($x1 < $max_x && $x2 < $max_x);
		imagesetthickness($img, 1);
	}


	function captcha_noise_bg_bitmaps()
	{		
		return array(
			'width'		=> 15,
			'height'	=> 5,
			'data'		=> array(

			1 => array(
				array(1,0,0,0,1,0,0,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,1,0,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,1,0,0,0,0,0,0,1,0,0),
				array(1,0,0,0,0,0,1,0,0,0,0,1,0,0,0),
			),
			2 => array(
				array(1,1,mt_rand(0,1),1,0,1,1,1,1,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,1,1,0,1,1,1),
			),
			3 => array(
				array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,1,0,0,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,1),
			),
			4 => array(
				array(1,0,1,0,1,0,0,1,1,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
			),
			5 => array(
				array(1,1,1,1,0,0,0,1,1,1,0,0,1,0,1),
				array(0,0,0,0,0,0,0,1,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(1,0,1,0,0,0,0,0,0,0,0,0,0,0,0),
			),
			6 => array(
				array(mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),mt_rand(0,1),0,mt_rand(0,1),mt_rand(0,1),mt_rand(0,1)),
				array(0,0,0,0,0,0,0,mt_rand(0,1),0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(mt_rand(0,1),0,mt_rand(0,1),0,0,0,0,0,0,0,0,0,0,0,0),
			),
			7 => array(
				array(0,0,0,0,0,0,0,0,0,0,1,1,0,1,1),
				array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
				array(0,0,1,1,0,0,0,1,0,0,0,0,0,0,0),
				array(0,1,0,0,0,1,0,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0,0,0,0,0,0,0),
			),
		));
	}
	
	/**
	* Return bitmaps
	*/
	function captcha_bitmaps()
	{
		global $config;
		
		$chars = array(
			'A'	=>	array(
						array(
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,1,1,1,1,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,1,1,0,1,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,1,1,1,1,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,0,0,0,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,1,0,0,0,1,1,0),
							array(1,1,0,0,0,0,0,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,1,1),
							array(0,0,0,0,0,1,1,1,1),
							array(0,0,0,1,1,1,0,0,1),
							array(0,1,1,1,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,0,0,0,0,1,1,1),
							array(0,1,1,1,1,1,1,0,1),
						),
					),
		'B'	=>		array(
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
						),
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
						),
						array(
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,1,1,1,1,0,0),
						),
					),
		'C'	=>		array(
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,1,1,1,1,1,0,1),
							array(0,1,0,0,0,0,0,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,1),
							array(0,0,1,1,1,1,1,0,1),
						),
					),
		'D'	=>		array(
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
						),
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,1,1,1,1,1,0,1),
							array(0,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,1,0,0,0,1,1,1),
							array(0,0,1,1,1,1,1,0,1),
						),
					),
		'E'	=>		array(
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,1,1,1,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,1,0,0,0,1,1,0),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,0,0,0,0,0,1,1),
							array(0,1,1,1,1,1,1,1,0),
						),
					),
		'F'	=>		array(
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
						),
						array(
							array(0,1,1,1,1,1,1,1,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,0,0,0),
						),
						array(
							array(0,0,0,1,1,0,0,0,0),
							array(0,0,1,1,0,0,0,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(1,1,1,1,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
						),
					),
		'G'	=>		array(
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,1,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,1,1,1,1,1,0,1),
							array(0,1,0,0,0,0,0,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,1,1,1,1,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,1),
							array(0,0,1,1,1,1,1,0,1),
						),
						array(
							array(0,0,1,1,1,1,1,0,1),
							array(0,1,1,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,1,0,0,0,0,0,1),
							array(0,0,1,1,1,1,1,1,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,1,1),
							array(1,1,1,1,1,1,1,1,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
						),
					),
		'H'	=>		array(
						array(
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
						),
						array(
							array(1,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,1,1,1,1,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,0,0,0,1,1,1),
						),
						array(
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,1,1,1,0,0,0),
							array(1,1,1,1,0,1,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
						),
					),
		'I'	=>		array(
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(0,0,0,1,1,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,1,1,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,1,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,1,1,0,0,0),
						),
					),
		'J'	=>		array(
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(0,1,0,0,1,0,0,0,0),
							array(0,0,1,1,0,0,0,0,0),
						),
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,1,0,0,1,0,0,0,0),
							array(1,0,1,1,0,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(0,1,0,0,1,0,0,0,0),
							array(0,0,1,1,0,0,0,0,0),
						),
					),
		'K'	=>		array(
						array(    // New 'K', supplied by NeoThermic
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,1,0,0,0,0),
							array(1,0,0,1,0,0,0,0,0),
							array(1,0,1,0,0,0,0,0,0),
							array(1,1,0,0,0,0,0,0,0),
							array(1,0,1,0,0,0,0,0,0),
							array(1,0,0,1,0,0,0,0,0),
							array(1,0,0,0,1,0,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
						),
						array(
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,1,0,0),
							array(0,1,0,0,0,1,0,0,0),
							array(0,1,0,0,1,0,0,0,0),
							array(0,1,0,1,0,0,0,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,1,0,1,0,0,0,0,0),
							array(0,1,0,0,1,0,0,0,0),
							array(0,1,0,0,0,1,0,0,0),
							array(0,1,0,0,0,0,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,0,0,0,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,1,0,0,0),
							array(0,1,0,0,1,0,0,0,0),
							array(0,1,0,1,0,0,0,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,1,0,1,0,0,0,0,0),
							array(0,1,0,0,1,0,0,0,0),
							array(0,1,0,0,0,1,0,0,0),
							array(0,1,0,0,0,0,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
						),
					),
		'L'	=>		array(
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,1),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,0,1,1,1,0,0,0,0),
						),
					),
		'M'	=>		array(
						array(
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,0,1,0,0,0,1,0,1),
							array(1,0,1,0,0,0,1,0,1),
							array(1,0,1,0,0,0,1,0,1),
							array(1,0,0,1,0,1,0,0,1),
							array(1,0,0,1,0,1,0,0,1),
							array(1,0,0,1,0,1,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,1,0,1,0,1,0,1,0),
							array(0,1,0,1,0,1,0,1,0),
							array(0,1,0,1,0,1,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,0,0,0,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,1,1,0,1,1,1,0),
							array(1,1,0,1,1,1,0,1,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
						),
					),
		'N'	=>		array(
						array(
							array(1,1,0,0,0,0,0,0,1),
							array(1,1,0,0,0,0,0,0,1),
							array(1,0,1,0,0,0,0,0,1),
							array(1,0,1,0,0,0,0,0,1),
							array(1,0,0,1,0,0,0,0,1),
							array(1,0,0,1,0,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,0,1,0,0,1),
							array(1,0,0,0,0,1,0,0,1),
							array(1,0,0,0,0,0,1,0,1),
							array(1,0,0,0,0,0,1,0,1),
							array(1,0,0,0,0,0,0,1,1),
							array(1,0,0,0,0,0,0,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,0,0,0,0,1,0),
							array(0,1,1,0,0,0,0,1,0),
							array(0,1,1,0,0,0,0,1,0),
							array(0,1,0,1,0,0,0,1,0),
							array(0,1,0,1,0,0,0,1,0),
							array(0,1,0,1,0,0,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,0,1,1,0,1,0),
							array(0,1,0,0,0,1,0,1,0),
							array(0,1,0,0,0,1,1,1,0),
							array(0,1,0,0,0,0,1,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,0,0,0,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(1,0,1,1,1,1,0,0,0),
							array(1,1,1,0,0,1,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
						),
					),
		'O'	=>		array(
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,1,1,1,1,0,0,0),
							array(1,1,1,0,0,1,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,1,0,0,0,1,1,0,0),
							array(0,1,1,1,1,1,0,0,0),
						),
					),
		'P'	=>		array(
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
						),
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,1,1,0,0,0,0,0),
							array(1,1,0,1,1,0,0,0,0),
							array(1,0,0,0,1,0,0,0,0),
							array(1,0,0,0,1,0,0,0,0),
							array(1,0,0,1,1,0,0,0,0),
							array(1,1,1,1,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
						),
					),
		'Q'	=>		array(
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,1,0,0,1),
							array(1,0,0,0,0,0,1,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,1),
						),
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,1,0,0,1,1,0,1,1),
							array(0,1,1,1,1,1,1,1,0),
							array(0,0,0,0,0,0,1,1,0),
							array(0,0,0,0,0,0,0,1,1),
							array(0,0,0,0,0,0,0,0,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,1,1,1,1),
							array(0,0,0,0,1,1,0,0,1),
							array(0,0,0,0,1,0,0,0,1),
							array(0,0,0,0,1,0,0,0,1),
							array(0,0,0,0,1,1,0,1,1),
							array(0,0,0,0,0,1,1,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
						),
					),
		'R'	=>		array(
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
							array(1,1,1,0,0,0,0,0,0),
							array(1,0,0,1,0,0,0,0,0),
							array(1,0,0,0,1,0,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,0,1,0,0),
							array(1,0,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
						),
						array(
							array(1,1,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,1,1,1,1,0,0),
							array(0,1,1,0,0,0,0,0,0),
							array(0,1,1,1,0,0,0,0,0),
							array(0,1,0,1,1,0,0,0,0),
							array(0,1,0,0,1,1,0,0,0),
							array(0,1,0,0,0,1,1,0,0),
							array(0,1,0,0,0,0,1,1,0),
							array(1,1,1,0,0,0,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,0,0,0,0),
							array(1,1,0,0,1,1,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
						),
					),
		'S'	=>		array(
						array(
							array(0,0,1,1,1,1,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,0,1,1,1,1,1,0,0),
							array(0,0,0,0,0,0,0,1,0),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,1,1,1,1,1,0,1),
							array(0,1,0,0,0,0,0,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(0,0,1,1,1,1,1,0,0),
							array(0,0,0,0,0,0,0,1,0),
							array(0,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,0,0,0,0,0,1,0),
							array(1,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,1,1,1,0,0,0,0),
							array(1,0,0,0,0,1,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,0,0,0,0,0,0,0),
							array(0,1,1,1,1,0,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(1,0,0,0,1,1,0,0,0),
							array(0,1,1,1,1,0,0,0,0),
						),
					),
		'T'	=>		array(
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
						),
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,1,0,0,0,1),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,1,1,0,0,0),
						),
						array(
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,1,1,1,1,1,1,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,1,0,0,0),
							array(0,0,0,0,0,1,1,1,0),
						),
					),
		'U'	=>		array(
						array(
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,0,1,1,1,1,1,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,1,0,0,0,0,0,1),
							array(0,0,1,0,0,0,0,0,1),
							array(0,0,1,0,0,0,0,0,1),
							array(0,0,1,0,0,0,0,0,1),
							array(0,0,1,0,0,0,0,0,1),
							array(0,0,1,0,0,0,0,1,1),
							array(0,0,1,1,0,0,1,1,1),
							array(0,0,0,1,1,1,1,0,1),
						),
					),
		'V'	=>		array(
						array(
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
						),
					),
		'W'	=>		array(
						array(
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,0,1,0,0,0,1),
							array(1,0,0,1,0,1,0,0,1),
							array(1,0,0,1,0,1,0,0,1),
							array(1,0,0,1,0,1,0,0,1),
							array(1,0,1,0,0,0,1,0,1),
							array(1,0,1,0,0,0,1,0,1),
							array(1,0,1,0,0,0,1,0,1),
							array(1,1,0,0,0,0,0,1,1),
							array(1,1,0,0,0,0,0,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,1,1,1,0,1,0),
							array(0,1,0,1,0,1,0,1,0),
							array(0,1,1,1,0,1,1,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,0,0,0,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,0,1,0,0,1,0),
							array(0,1,0,1,1,1,0,1,0),
							array(0,1,0,1,0,1,0,1,0),
							array(0,1,1,1,0,1,1,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,0,0,0,0,0,0,0),
						),
					),
		'X'	=>		array(
						array(
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,1,0,0,0,0,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,1,0,0,0,0,1,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(1,1,1,0,0,0,1,1,1),
							array(0,0,0,0,0,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,0,1,1,0,1,1,0,0),
							array(0,0,0,1,1,1,0,0,0),
							array(0,0,0,1,1,1,0,0,0),
							array(0,0,1,1,0,1,1,0,0),
							array(0,1,1,0,0,0,1,1,0),
							array(0,0,0,0,0,0,0,0,0),
						),
					),
		'Y'	=>		array(
						array(
							array(1,0,0,0,0,0,0,0,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(1,1,1,0,0,0,1,1,1),
							array(0,1,0,0,0,0,0,1,0),
							array(0,1,0,0,0,0,0,1,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,1,0,0,0,1,0,0),
							array(0,0,0,1,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,1,1,0,0,0),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,1,0,0,0,0,1),
							array(0,0,0,1,1,0,0,0,1),
							array(0,0,0,0,1,0,0,1,1),
							array(0,0,0,0,1,1,0,1,0),
							array(0,0,0,0,0,1,1,1,0),
							array(0,0,0,0,0,0,1,0,0),
							array(0,0,0,0,0,1,1,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,1,1,0,0,0),
							array(0,0,1,1,1,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
						),
					),
		'Z'	=>		array(
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(1,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,1,0),
							array(0,0,0,0,0,0,1,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,1,0,0,0,0),
							array(0,0,0,1,0,0,0,0,0),
							array(0,0,0,1,0,0,0,0,0),
							array(0,0,1,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,1),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(1,1,1,1,1,1,1,1,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,0,1),
							array(0,0,0,0,0,0,0,1,0),
							array(0,0,0,0,0,0,1,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,0,0,0,1,0,0,0),
							array(0,0,1,1,1,1,1,0,0),
							array(0,0,0,1,0,0,0,0,0),
							array(0,0,0,1,0,0,0,0,0),
							array(0,0,1,0,0,0,0,0,0),
							array(0,1,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,0,0,0,0,0,0,0,0),
							array(1,1,1,1,1,1,1,1,1),
						),
						array(
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,0,0,0,0,0,0,0,0),
							array(0,1,1,1,1,1,1,1,0),
							array(0,0,0,0,0,1,1,0,0),
							array(0,0,0,0,1,1,0,0,0),
							array(0,0,0,1,1,0,0,0,0),
							array(0,0,1,1,0,0,0,0,0),
							array(0,0,1,0,0,0,0,0,0),
							array(0,1,1,1,1,1,1,1,0),
						),
					),
				);
		return array(
			'width'		=> 9,
			'height'	=> 15,
			'data'		=> array(

			'A' =>	$chars['A'][mt_rand(0, min(count($chars['A']), $config['captcha_gd_fonts']) -1)],
			'B' =>	$chars['B'][mt_rand(0, min(count($chars['B']), $config['captcha_gd_fonts']) -1)],
			'C' =>	$chars['C'][mt_rand(0, min(count($chars['C']), $config['captcha_gd_fonts']) -1)],
			'D' =>	$chars['D'][mt_rand(0, min(count($chars['D']), $config['captcha_gd_fonts']) -1)],
			'E' =>	$chars['E'][mt_rand(0, min(count($chars['E']), $config['captcha_gd_fonts']) -1)],
			'F' =>	$chars['F'][mt_rand(0, min(count($chars['F']), $config['captcha_gd_fonts']) -1)],
			'G' =>	$chars['G'][mt_rand(0, min(count($chars['G']), $config['captcha_gd_fonts']) -1)],
			'H' =>	$chars['H'][mt_rand(0, min(count($chars['H']), $config['captcha_gd_fonts']) -1)],
			'I' =>	$chars['I'][mt_rand(0, min(count($chars['I']), $config['captcha_gd_fonts']) -1)],
			'J' =>	$chars['J'][mt_rand(0, min(count($chars['J']), $config['captcha_gd_fonts']) -1)],
			'K' =>	$chars['K'][mt_rand(0, min(count($chars['K']), $config['captcha_gd_fonts']) -1)],
			'L' =>	$chars['L'][mt_rand(0, min(count($chars['L']), $config['captcha_gd_fonts']) -1)],
			'M' =>	$chars['M'][mt_rand(0, min(count($chars['M']), $config['captcha_gd_fonts']) -1)],  
			'N' =>	$chars['N'][mt_rand(0, min(count($chars['N']), $config['captcha_gd_fonts']) -1)],
			'O' =>	$chars['O'][mt_rand(0, min(count($chars['O']), $config['captcha_gd_fonts']) -1)],
			'P' =>	$chars['P'][mt_rand(0, min(count($chars['P']), $config['captcha_gd_fonts']) -1)],
			'Q' =>	$chars['Q'][mt_rand(0, min(count($chars['Q']), $config['captcha_gd_fonts']) -1)],
			'R' =>	$chars['R'][mt_rand(0, min(count($chars['R']), $config['captcha_gd_fonts']) -1)],
			'S' =>	$chars['S'][mt_rand(0, min(count($chars['S']), $config['captcha_gd_fonts']) -1)],
			'T' =>	$chars['T'][mt_rand(0, min(count($chars['T']), $config['captcha_gd_fonts']) -1)],
			'U' =>	$chars['U'][mt_rand(0, min(count($chars['U']), $config['captcha_gd_fonts']) -1)],
			'V' =>	$chars['V'][mt_rand(0, min(count($chars['V']), $config['captcha_gd_fonts']) -1)],
			'W' =>	$chars['W'][mt_rand(0, min(count($chars['W']), $config['captcha_gd_fonts']) -1)],
			'X' =>	$chars['X'][mt_rand(0, min(count($chars['X']), $config['captcha_gd_fonts']) -1)],
			'Y' =>	$chars['Y'][mt_rand(0, min(count($chars['Y']), $config['captcha_gd_fonts']) -1)],
			'Z' =>	$chars['Z'][mt_rand(0, min(count($chars['Z']), $config['captcha_gd_fonts']) -1)],

			'1' => array(
				array(0,0,0,1,1,0,0,0,0),
				array(0,0,1,0,1,0,0,0,0),
				array(0,1,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,1,1,1,1,1,1,1,0),
			),
			'2' => array(    // New '2' supplied by Anon
				array(0,0,0,1,1,1,0,0,0),
				array(0,0,1,0,0,0,1,0,0),
				array(0,1,0,0,0,0,1,1,0),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,1,1),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,1,0,0),
				array(0,0,0,0,0,1,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,1,0,0,0,0,0),
				array(0,0,1,0,0,0,0,0,0),
				array(0,1,0,0,0,0,0,0,0),
				array(1,1,1,1,1,1,1,1,1),
				array(0,0,0,0,0,0,0,0,0),
			),
			'3' => array(
				array(0,0,1,1,1,1,1,0,0),
				array(0,1,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,1,1,0,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(0,1,0,0,0,0,0,1,0),
				array(0,0,1,1,1,1,1,0,0),
			),
			'4' => array(
				array(0,0,0,0,0,0,1,1,0),
				array(0,0,0,0,0,1,0,1,0),
				array(0,0,0,0,1,0,0,1,0),
				array(0,0,0,1,0,0,0,1,0),
				array(0,0,1,0,0,0,0,1,0),
				array(0,1,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,1,0),
				array(1,1,1,1,1,1,1,1,1),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,1,0),
			),
			'5' => array(
				array(1,1,1,1,1,1,1,1,1),
				array(1,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0),
				array(0,1,0,0,0,0,0,0,0),
				array(0,0,1,1,1,1,1,0,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(0,1,0,0,0,0,0,1,0),
				array(0,0,1,1,1,1,1,0,0),
			),
			'6' => array(
				array(0,0,1,1,1,1,1,0,0),
				array(0,1,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0),
				array(1,0,0,1,1,1,1,0,0),
				array(1,0,1,0,0,0,0,1,0),
				array(1,1,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(0,1,0,0,0,0,0,1,0),
				array(0,0,1,1,1,1,1,0,0),
			),
			'7' => array(
				array(1,1,1,1,1,1,1,1,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,0,1,0),
				array(0,0,0,0,0,0,1,0,0),
				array(0,0,0,0,0,1,0,0,0),
				array(0,0,0,0,0,1,0,0,0),
				array(0,0,0,0,1,0,0,0,0),
				array(0,0,0,1,0,0,0,0,0),
				array(0,0,0,1,0,0,0,0,0),
				array(0,0,1,0,0,0,0,0,0),
				array(0,1,0,0,0,0,0,0,0),
				array(0,1,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0),
				array(1,0,0,0,0,0,0,0,0),
			),
			'8' => array(
				array(0,0,1,1,1,1,1,0,0),
				array(0,1,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(0,1,0,0,0,0,0,1,0),
				array(0,0,1,1,1,1,1,0,0),
				array(0,1,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(0,1,0,0,0,0,0,1,0),
				array(0,0,1,1,1,1,1,0,0),
			),
			'9' => array(
				array(0,0,1,1,1,1,1,0,0),
				array(0,1,0,0,0,0,0,1,0),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,1,1),
				array(0,1,0,0,0,0,1,0,1),
				array(0,0,1,1,1,1,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(0,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(1,0,0,0,0,0,0,0,1),
				array(0,1,0,0,0,0,0,1,0),
				array(0,0,1,1,1,1,1,0,0),
			),
			)
		);
	}
}

/**
* @package VC
*/
class char_cube3d
{
	var $bitmap;
	var $bitmap_width;
	var $bitmap_height;

	var $basis_matrix = array(array(1, 0, 0), array(0, 1, 0), array(0, 0, 1));
	var $abs_x = array(1, 0);
	var $abs_y = array(0, 1);
	var $x = 0;
	var $y = 1;
	var $z = 2;
	var $letter = '';

	/**
	*/
	function char_cube3d(&$bitmaps, $letter)
	{
		$this->bitmap			= $bitmaps['data'][$letter];
		$this->bitmap_width		= $bitmaps['width'];
		$this->bitmap_height	= $bitmaps['height'];

		$this->basis_matrix[0][0] = mt_rand(-600, 600);
		$this->basis_matrix[0][1] = mt_rand(-600, 600);
		$this->basis_matrix[0][2] = (mt_rand(0, 1) * 2000) - 1000;
		$this->basis_matrix[1][0] = mt_rand(-1000, 1000);
		$this->basis_matrix[1][1] = mt_rand(-1000, 1000);
		$this->basis_matrix[1][2] = mt_rand(-1000, 1000);

		$this->normalize($this->basis_matrix[0]);
		$this->normalize($this->basis_matrix[1]);
		$this->basis_matrix[2] = $this->cross_product($this->basis_matrix[0], $this->basis_matrix[1]);
		$this->normalize($this->basis_matrix[2]);

		// $this->basis_matrix[1] might not be (probably isn't) orthogonal to $basis_matrix[0]
		$this->basis_matrix[1] = $this->cross_product($this->basis_matrix[0], $this->basis_matrix[2]);
		$this->normalize($this->basis_matrix[1]);

		// Make sure our cube is facing into the canvas (assuming +z == in)
		for ($i = 0; $i < 3; ++$i)
		{
			if ($this->basis_matrix[$i][2] < 0)
			{
				$this->basis_matrix[$i][0] *= -1;
				$this->basis_matrix[$i][1] *= -1;
				$this->basis_matrix[$i][2] *= -1;
			}
		}

		// Force our "z" basis vector to be the one with greatest absolute z value
		$this->x = 0;
		$this->y = 1;
		$this->z = 2;

		// Swap "y" with "z"
		if ($this->basis_matrix[1][2] > $this->basis_matrix[2][2])
		{
			$this->z = 1;
			$this->y = 2;
		}

		// Swap "x" with "z"
		if ($this->basis_matrix[0][2] > $this->basis_matrix[$this->z][2])
		{
			$this->x = $this->z;
			$this->z = 0;
		}

		// Still need to determine which of $x,$y are which.
		// wrong orientation if y's y-component is less than it's x-component
		// likewise if x's x-component is less than it's y-component
		// if they disagree, go with the one with the greater weight difference.
		// rotate if positive
		$weight = (abs($this->basis_matrix[$this->x][1]) - abs($this->basis_matrix[$this->x][0])) + (abs($this->basis_matrix[$this->y][0]) - abs($this->basis_matrix[$this->y][1]));

		// Swap "x" with "y"
		if ($weight > 0)
		{
			list($this->x, $this->y) = array($this->y, $this->x);
		}

		$this->abs_x = array($this->basis_matrix[$this->x][0], $this->basis_matrix[$this->x][1]);
		$this->abs_y = array($this->basis_matrix[$this->y][0], $this->basis_matrix[$this->y][1]);

		if ($this->abs_x[0] < 0)
		{
			$this->abs_x[0] *= -1;
			$this->abs_x[1] *= -1;
		}

		if ($this->abs_y[1] > 0)
		{
			$this->abs_y[0] *= -1;
			$this->abs_y[1] *= -1;
		}

		$this->letter = $letter;
	}

	/**
	* Draw a character
	*/
	function drawchar($scale, $xoff, $yoff, $img, $background, $colours)
	{
		$width	= $this->bitmap_width;
		$height	= $this->bitmap_height;
		$bitmap	= $this->bitmap;

		$colour1 = $colours[array_rand($colours)];
		$colour2 = $colours[array_rand($colours)];

		$swapx = ($this->basis_matrix[$this->x][0] > 0);
		$swapy = ($this->basis_matrix[$this->y][1] < 0);

		for ($y = 0; $y < $height; ++$y)
		{
			for ($x = 0; $x < $width; ++$x)
			{
				$xp = ($swapx) ? ($width - $x - 1) : $x;
				$yp = ($swapy) ? ($height - $y - 1) : $y;

				if ($bitmap[$height - $yp - 1][$xp])
				{
					$dx = $this->scale($this->abs_x, ($xp - ($swapx ? ($width / 2) : ($width / 2) - 1)) * $scale);
					$dy = $this->scale($this->abs_y, ($yp - ($swapy ? ($height / 2) : ($height / 2) - 1)) * $scale);
					$xo = $xoff + $dx[0] + $dy[0];
					$yo = $yoff + $dx[1] + $dy[1];

					$origin = array(0, 0, 0);
					$xvec = $this->scale($this->basis_matrix[$this->x], $scale);
					$yvec = $this->scale($this->basis_matrix[$this->y], $scale);
					$face_corner = $this->sum2($xvec, $yvec);

					$zvec = $this->scale($this->basis_matrix[$this->z], $scale);
					$x_corner = $this->sum2($xvec, $zvec);
					$y_corner = $this->sum2($yvec, $zvec);

					imagefilledpolygon($img, $this->gen_poly($xo, $yo, $origin, $xvec, $x_corner,$zvec), 4, $colour1);
					imagefilledpolygon($img, $this->gen_poly($xo, $yo, $origin, $yvec, $y_corner,$zvec), 4, $colour2);

					$face = $this->gen_poly($xo, $yo, $origin, $xvec, $face_corner, $yvec);

					imagefilledpolygon($img, $face, 4, $background);
					imagepolygon($img, $face, 4, $colour1);
				}
			}
		}
	}

	/*
	* return a roughly acceptable range of sizes for rendering with this texttype
	*/
	function range()
	{
		return array(3, 4);
	}

	/**
	* Vector length
	*/
	function vectorlen($vector)
	{
		return sqrt(pow($vector[0], 2) + pow($vector[1], 2) + pow($vector[2], 2));
	}

	/**
	* Normalize
	*/
	function normalize(&$vector, $length = 1)
	{
		$length = (( $length < 1) ? 1 : $length);
		$length /= $this->vectorlen($vector);
		$vector[0] *= $length;
		$vector[1] *= $length;
		$vector[2] *= $length;
	}

	/**
	*/
	function cross_product($vector1, $vector2)
	{
		$retval = array(0, 0, 0);
		$retval[0] =  (($vector1[1] * $vector2[2]) - ($vector1[2] * $vector2[1]));
		$retval[1] = -(($vector1[0] * $vector2[2]) - ($vector1[2] * $vector2[0]));
		$retval[2] =  (($vector1[0] * $vector2[1]) - ($vector1[1] * $vector2[0]));

		return $retval;
	}

	/**
	*/
	function sum($vector1, $vector2)
	{
		return array($vector1[0] + $vector2[0], $vector1[1] + $vector2[1], $vector1[2] + $vector2[2]);
	}

	/**
	*/
	function sum2($vector1, $vector2)
	{
		return array($vector1[0] + $vector2[0], $vector1[1] + $vector2[1]);
	}

	/**
	*/
	function scale($vector, $length)
	{
		if (sizeof($vector) == 2)
		{
			return array($vector[0] * $length, $vector[1] * $length);
		}

		return array($vector[0] * $length, $vector[1] * $length, $vector[2] * $length);
	}

	/**
	*/
	function gen_poly($xoff, $yoff, &$vec1, &$vec2, &$vec3, &$vec4)
	{
		$poly = array();
		$poly[0] = $xoff + $vec1[0];
		$poly[1] = $yoff + $vec1[1];
		$poly[2] = $xoff + $vec2[0];
		$poly[3] = $yoff + $vec2[1];
		$poly[4] = $xoff + $vec3[0];
		$poly[5] = $yoff + $vec3[1];
		$poly[6] = $xoff + $vec4[0];
		$poly[7] = $yoff + $vec4[1];

		return $poly;
	}

	/**
	* dimensions
	*/
	function dimensions($size)
	{
		$xn = $this->scale($this->basis_matrix[$this->x], -($this->bitmap_width / 2) * $size);
		$xp = $this->scale($this->basis_matrix[$this->x], ($this->bitmap_width / 2) * $size);
		$yn = $this->scale($this->basis_matrix[$this->y], -($this->bitmap_height / 2) * $size);
		$yp = $this->scale($this->basis_matrix[$this->y], ($this->bitmap_height / 2) * $size);

		$p = array();
		$p[0] = $this->sum2($xn, $yn);
		$p[1] = $this->sum2($xp, $yn);
		$p[2] = $this->sum2($xp, $yp);
		$p[3] = $this->sum2($xn, $yp);

		$min_x = $max_x = $p[0][0];
		$min_y = $max_y = $p[0][1];

		for ($i = 1; $i < 4; ++$i)
		{
			$min_x = ($min_x > $p[$i][0]) ? $p[$i][0] : $min_x;
			$min_y = ($min_y > $p[$i][1]) ? $p[$i][1] : $min_y;
			$max_x = ($max_x < $p[$i][0]) ? $p[$i][0] : $max_x;
			$max_y = ($max_y < $p[$i][1]) ? $p[$i][1] : $max_y;
		}

		return array($min_x, $min_y, $max_x, $max_y);
	}
}

/**
* @package VC
*/
class colour_manager
{
	var $img;
	var $mode;
	var $colours;
	var $named_colours;

	/**
	* Create the colour manager, link it to the image resource
	*/
	function colour_manager($img, $background = false, $mode = 'ahsv')
	{
		$this->img = $img;
		$this->mode = $mode;
		$this->colours = array();
		$this->named_colours = array();

		if ($background !== false)
		{
			$bg = $this->allocate_named('background', $background);
			imagefill($this->img, 0, 0, $bg);
		}
	}

	/**
	* Lookup a named colour resource
	*/
	function get_resource($named_colour)
	{
		if (isset($this->named_colours[$named_colour]))
		{
			return $this->named_colours[$named_colour];
		}

		if (isset($this->named_rgb[$named_colour]))
		{
			return $this->allocate_named($named_colour, $this->named_rgb[$named_colour], 'rgb');
		}

		return false;
	}

	/**
	* Assign a name to a colour resource
	*/
	function name_colour($name, $resource)
	{
		$this->named_colours[$name] = $resource;
	}

	/**
	* names and allocates a colour resource
	*/
	function allocate_named($name, $colour, $mode = false)
	{
		$resource = $this->allocate($colour, $mode);

		if ($resource !== false)
		{
			$this->name_colour($name, $resource);
		}
		return $resource;
	}

	/**
	* allocates a specified colour into the image
	*/
	function allocate($colour, $mode = false)
	{
		if ($mode === false)
		{
			$mode = $this->mode;
		}
		
		if (!is_array($colour))
		{
			if (isset($this->named_rgb[$colour]))
			{
				return $this->allocate_named($colour, $this->named_rgb[$colour], 'rgb');
			}

			if (!is_int($colour))
			{
				return false;
			}

			$mode = 'rgb';
			$colour = array(255 & ($colour >> 16), 255 & ($colour >>  8), 255 & $colour);
		}

		if (isset($colour['mode']))
		{
			$mode = $colour['mode'];
			unset($colour['mode']);
		}

		if (isset($colour['random']))
		{
			unset($colour['random']);
			// everything else is params
			return $this->random_colour($colour, $mode);
		}

		$rgb		= colour_manager::model_convert($colour, $mode, 'rgb');
		$store		= ($this->mode == 'rgb') ? $rgb : colour_manager::model_convert($colour, $mode, $this->mode);
		$resource	= imagecolorallocate($this->img, $rgb[0], $rgb[1], $rgb[2]);
		$this->colours[$resource] = $store;

		return $resource;
	}

	/**
	* randomly generates a colour, with optional params
	*/
	function random_colour($params = array(), $mode = false)
	{
		if ($mode === false)
		{
			$mode = $this->mode;
		}

		switch ($mode)
		{
			case 'rgb':
				// @TODO random rgb generation. do we intend to do this, or is it just too tedious?
			break;

			case 'ahsv':
			case 'hsv':
			default:

				$default_params = array(
					'hue_bias'			=> false,	// degree / 'r'/'g'/'b'/'c'/'m'/'y'   /'o'
					'hue_range'			=> false,	// if hue bias, then difference range +/- from bias
					'min_saturation'	=> 30,		// 0 - 100
					'max_saturation'	=> 80,		// 0 - 100
					'min_value'			=> 30,		// 0 - 100
					'max_value'			=> 80,		// 0 - 100
				);

				$alt = ($mode == 'ahsv') ? true : false;
				$params = array_merge($default_params, $params);

				$min_hue		= 0;
				$max_hue		= 359;
				$min_saturation	= max(0, $params['min_saturation']);
				$max_saturation	= min(100, $params['max_saturation']);
				$min_value		= max(0, $params['min_value']);
				$max_value		= min(100, $params['max_value']);

				if ($params['hue_bias'] !== false)
				{
					if (is_numeric($params['hue_bias']))
					{
						$h = intval($params['hue_bias']) % 360;
					}
					else
					{
						switch ($params['hue_bias'])
						{
							case 'o':
								$h = $alt ?  60 :  30;
							break;

							case 'y':
								$h = $alt ? 120 :  60;
							break;

							case 'g':
								$h = $alt ? 180 : 120;
							break;

							case 'c':
								$h = $alt ? 210 : 180;
							break;

							case 'b':
								$h = 240;
							break;

							case 'm':
								$h = 300;
							break;

							case 'r':
							default:
								$h = 0;
							break;
						}
					}

					$min_hue = $h + 360;
					$max_hue = $h + 360;

					if ($params['hue_range'])
					{
						$min_hue -= min(180, $params['hue_range']);
						$max_hue += min(180, $params['hue_range']);
					}
				}

				$h = mt_rand($min_hue, $max_hue);
				$s = mt_rand($min_saturation, $max_saturation);
				$v = mt_rand($min_value, $max_value);

				return $this->allocate(array($h, $s, $v), $mode);

			break;
		}
	}

	/**
	*/
	function colour_scheme($resource, $include_original = true)
	{
		$mode = 'hsv';

		if (($pre = $this->get_resource($resource)) !== false)
		{
			$resource = $pre;
		}

		$colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);
		$results = ($include_original) ? array($resource) : array();
		$colour2 = $colour3 = $colour4 = $colour;
		$colour2[0] += 150;
		$colour3[0] += 180;
		$colour4[0] += 210;


		$results[] = $this->allocate($colour2, $mode);
		$results[] = $this->allocate($colour3, $mode);
		$results[] = $this->allocate($colour4, $mode);

		return $results;
	}

	/**
	*/
	function mono_range($resource, $count = 5, $include_original = true)
	{
		if (is_array($resource))
		{
			$results = array();
			for ($i = 0, $size = sizeof($resource); $i < $size; ++$i)
			{
				$results = array_merge($results, $this->mono_range($resource[$i], $count, $include_original));
			}
			return $results;
		}

		$mode = (in_array($this->mode, array('hsv', 'ahsv'), true) ? $this->mode : 'ahsv');
		if (($pre = $this->get_resource($resource)) !== false)
		{
			$resource = $pre;
		}

		$colour = colour_manager::model_convert($this->colours[$resource], $this->mode, $mode);

		$results = array();
		if ($include_original)
		{
			$results[] = $resource;
			$count--;
		}

		// This is a hard problem. I chicken out and try to maintain readability at the cost of less randomness.
		
		while ($count > 0)
		{
			$colour[1] = ($colour[1] + mt_rand(40,60)) % 99;
			$colour[2] = ($colour[2] + mt_rand(40,60));
			$results[] = $this->allocate($colour, $mode);
			$count--;
		}
		return $results;
	}

	/**
	* Convert from one colour model to another
	*/
	function model_convert($colour, $from_model, $to_model)
	{
		if ($from_model == $to_model)
		{
			return $colour;
		}

		switch ($to_model)
		{
			case 'hsv':

				switch ($from_model)
				{
					case 'ahsv':
						return colour_manager::ah2h($colour);
					break;

					case 'rgb':
						return colour_manager::rgb2hsv($colour);
					break;
				}
			break;

			case 'ahsv':

				switch ($from_model)
				{
					case 'hsv':
						return colour_manager::h2ah($colour);
					break;

					case 'rgb':
						return colour_manager::h2ah(colour_manager::rgb2hsv($colour));
					break;
				}
			break;

			case 'rgb':
				switch ($from_model)
				{
					case 'hsv':
						return colour_manager::hsv2rgb($colour);
					break;

					case 'ahsv':
						return colour_manager::hsv2rgb(colour_manager::ah2h($colour));
					break;
				}
			break;
		}
		return false;
	}

	/**
	* Slightly altered from wikipedia's algorithm
	*/
	function hsv2rgb($hsv)
	{
		colour_manager::normalize_hue($hsv[0]);

		$h = $hsv[0];
		$s = min(1, max(0, $hsv[1] / 100));
		$v = min(1, max(0, $hsv[2] / 100));

		// calculate hue sector
		$hi = floor($hsv[0] / 60);

		// calculate opposite colour
		$p = $v * (1 - $s);

		// calculate distance between hex vertices
		$f = ($h / 60) - $hi;

		// coming in or going out?
		if (!($hi & 1))
		{
			$f = 1 - $f;
		}

		// calculate adjacent colour
		$q = $v * (1 - ($f * $s));

		switch ($hi)
		{
			case 0:
				$rgb = array($v, $q, $p);
			break;

			case 1:
				$rgb = array($q, $v, $p);
			break;

			case 2:
				$rgb = array($p, $v, $q);
			break;

			case 3:
				$rgb = array($p, $q, $v);
			break;

			case 4:
				$rgb = array($q, $p, $v);
			break;

			case 5:
				$rgb = array($v, $p, $q);
			break;

			default:
				return array(0, 0, 0);
			break;
		}

		return array(255 * $rgb[0], 255 * $rgb[1], 255 * $rgb[2]);
	}

	/**
	* (more than) Slightly altered from wikipedia's algorithm
	*/
	function rgb2hsv($rgb)
	{
		$r = min(255, max(0, $rgb[0]));
		$g = min(255, max(0, $rgb[1]));
		$b = min(255, max(0, $rgb[2]));
		$max = max($r, $g, $b);
		$min = min($r, $g, $b);

		$v = $max / 255;
		$s = (!$max) ? 0 : 1 - ($min / $max);

		// if max - min is 0, we want hue to be 0 anyway.
		$h = $max - $min;

		if ($h)
		{
			switch ($max)
			{
				case $g:
					$h = 120 + (60 * ($b - $r) / $h);
				break;

				case $b:
					$h = 240 + (60 * ($r - $g) / $h);
				break;

				case $r:
					$h = 360 + (60 * ($g - $b) / $h);
				break;
			}
		}
		colour_manager::normalize_hue($h);

		return array($h, $s * 100, $v * 100);
	}

	/**
	*/
	function normalize_hue(&$hue)
	{
		$hue %= 360;

		if ($hue < 0)
		{
			$hue += 360;
		}
	}

	/**
	* Alternate hue to hue
	*/
	function ah2h($ahue)
	{
		if (is_array($ahue))
		{
			$ahue[0] = colour_manager::ah2h($ahue[0]);
			return $ahue;
		}
		colour_manager::normalize_hue($ahue);

		// blue through red is already ok
		if ($ahue >= 240)
		{
			return $ahue;
		}

		// ahue green is at 180
		if ($ahue >= 180)
		{
			// return (240 - (2 * (240 - $ahue)));
			return (2 * $ahue) - 240; // equivalent
		}

		// ahue yellow is at 120   (RYB rather than RGB)
		if ($ahue >= 120)
		{
			return $ahue - 60;
		}

		return $ahue / 2;
	}

	/**
	* hue to Alternate hue
	*/
	function h2ah($hue)
	{
		if (is_array($hue))
		{
			$hue[0] = colour_manager::h2ah($hue[0]);
			return $hue;
		}
		colour_manager::normalize_hue($hue);

		// blue through red is already ok
		if ($hue >= 240)
		{
			return $hue;
		}
		else if ($hue <= 60)
		{
			return $hue * 2;
		}
		else if ($hue <= 120)
		{
			return $hue + 60;
		}
		else
		{
			return ($hue + 240) / 2;
		}
	}
}

?>