Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile.php	(revision 18188)
@@ -5,15 +5,33 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
  * @since      File available since Release 0.1
@@ -21,16 +39,6 @@
 
 require_once dirname(__FILE__) . '/../../PEAR.php';
-
-// {{{ constants
-
-/**
- * Constants for error handling.
- */
-define('NET_USERAGENT_MOBILE_OK',               1);
-define('NET_USERAGENT_MOBILE_ERROR',           -1);
-define('NET_USERAGENT_MOBILE_ERROR_NOMATCH',   -2);
-define('NET_USERAGENT_MOBILE_ERROR_NOT_FOUND', -3);
-
-// }}}
+require_once dirname(__FILE__) . '/Mobile/Error.php';
+
 // {{{ GLOBALS
 
@@ -38,7 +46,7 @@
  * globals for fallback on no match
  *
- * @global boolean $GLOBALS['_NET_USERAGENT_MOBILE_FALLBACK_ON_NOMATCH']
+ * @global boolean $GLOBALS['NET_USERAGENT_MOBILE_FallbackOnNomatch']
  */
-$GLOBALS['_NET_USERAGENT_MOBILE_FALLBACK_ON_NOMATCH'] = false;
+$GLOBALS['NET_USERAGENT_MOBILE_FallbackOnNomatch'] = false;
 
 // }}}
@@ -48,11 +56,8 @@
  * HTTP mobile user agent string parser
  *
- * Net_UserAgent_Mobile parses HTTP_USER_AGENT strings of (mainly Japanese)
- * mobile HTTP user agents. It'll be useful in page dispatching by user
- * agents.
+ * Net_UserAgent_Mobile parses HTTP_USER_AGENT strings of (mainly Japanese) mobile
+ * HTTP user agents. It'll be useful in page dispatching by user agents.
  * This package was ported from Perl's HTTP::MobileAgent.
  * See {@link http://search.cpan.org/search?mode=module&query=HTTP-MobileAgent}
- * The author of the HTTP::MobileAgent module is Tatsuhiko Miyagawa
- * <miyagawa@bulknews.net>
  *
  * SYNOPSIS:
@@ -68,7 +73,7 @@
  *     // it's NTT DoCoMo i-mode
  *     // see what's available in Net_UserAgent_Mobile_DoCoMo
- * } elseif ($agent->isVodafone()) {
- *     // it's Vodafone(J-PHONE)
- *     // see what's available in Net_UserAgent_Mobile_Vodafone
+ * } elseif ($agent->isSoftBank()) {
+ *     // it's SoftBank
+ *     // see what's available in Net_UserAgent_Mobile_SoftBank
  * } elseif ($agent->isEZweb()) {
  *     // it's KDDI/EZWeb
@@ -87,8 +92,8 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @since      Class available since Release 0.1
  */
@@ -126,11 +131,12 @@
      *
      * @param string $userAgent User-Agent string
-     * @return mixed a newly created Net_UserAgent_Mobile object, or a PEAR
-     *     error object on error
+     * @return Net_UserAgent_Mobile_Common a newly created or an existing
+     *     Net_UserAgent_Mobile_Common object
+     * @throws Net_UserAgent_Mobile_Error
      */
     function &factory($userAgent = null)
     {
         if (is_null($userAgent)) {
-            $userAgent = $_SERVER['HTTP_USER_AGENT'];
+            $userAgent = @$_SERVER['HTTP_USER_AGENT'];
         }
 
@@ -151,5 +157,4 @@
 
         if (!class_exists($class)) {
-        	
             $file = dirname(__FILE__) . "/Mobile/{$driver}.php";
             if (!include_once $file) {
@@ -163,8 +168,10 @@
         }
 
-        $instance = &new $class($userAgent);
-        $error = &$instance->isError();
+        PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
+        $instance = new $class($userAgent);
+        PEAR::staticPopErrorHandling();
+        $error = &$instance->getError();
         if (Net_UserAgent_Mobile::isError($error)) {
-            if ($GLOBALS['_NET_USERAGENT_MOBILE_FALLBACK_ON_NOMATCH']
+            if ($GLOBALS['NET_USERAGENT_MOBILE_FallbackOnNomatch']
                 && $error->getCode() == NET_USERAGENT_MOBILE_ERROR_NOMATCH
                 ) {
@@ -173,5 +180,5 @@
             }
 
-            $instance = &$error;
+            return PEAR::raiseError($error);
         }
 
@@ -183,11 +190,11 @@
 
     /**
-     * creates a new {@link Net_UserAgent_Mobile_Common} subclass instance or
-     * returns a instance from existent ones
+     * creates a new {@link Net_UserAgent_Mobile_Common} subclass instance or returns
+     * a instance from existent ones
      *
      * @param string $userAgent User-Agent string
-     * @return mixed a newly created or a existent Net_UserAgent_Mobile
-     *     object, or a PEAR error object on error
-     * @see Net_UserAgent_Mobile::factory()
+     * @return Net_UserAgent_Mobile_Common a newly created or an existing
+     *     Net_UserAgent_Mobile_Common object
+     * @throws Net_UserAgent_Mobile_Error
      */
     function &singleton($userAgent = null)
@@ -200,5 +207,5 @@
 
         if (is_null($userAgent)) {
-            $userAgent = $_SERVER['HTTP_USER_AGENT'];
+            $userAgent = @$_SERVER['HTTP_USER_AGENT'];
         }
 
@@ -214,6 +221,5 @@
 
     /**
-     * tell whether a result code from a Net_UserAgent_Mobile method
-     * is an error
+     * tell whether a result code from a Net_UserAgent_Mobile method is an error
      *
      * @param integer $value result code
@@ -222,5 +228,7 @@
     function isError($value)
     {
-        return is_a($value, 'Net_UserAgent_Mobile_Error');
+        return is_object($value)
+            && (strtolower(get_class($value)) == strtolower('Net_UserAgent_Mobile_Error')
+                || is_subclass_of($value, 'Net_UserAgent_Mobile_Error'));
     }
 
@@ -232,6 +240,5 @@
      *
      * @param integer $value error code
-     * @return string error message, or false if the error code was not
-     *     recognized
+     * @return string error message, or null if the error code was not recognized
      */
     function errorMessage($value)
@@ -260,6 +267,5 @@
 
     /**
-     * Checks whether or not the user agent is mobile by a given user agent
-     * string.
+     * Checks whether or not the user agent is mobile by a given user agent string.
      *
      * @param string $userAgent
@@ -286,6 +292,5 @@
 
     /**
-     * Checks whether or not the user agent is DoCoMo by a given user agent
-     * string.
+     * Checks whether or not the user agent is DoCoMo by a given user agent string.
      *
      * @param string $userAgent
@@ -296,5 +301,5 @@
     {
         if (is_null($userAgent)) {
-            $userAgent = $_SERVER['HTTP_USER_AGENT'];
+            $userAgent = @$_SERVER['HTTP_USER_AGENT'];
         }
 
@@ -310,6 +315,5 @@
 
     /**
-     * Checks whether or not the user agent is EZweb by a given user agent
-     * string.
+     * Checks whether or not the user agent is EZweb by a given user agent string.
      *
      * @param string $userAgent
@@ -320,5 +324,5 @@
     {
         if (is_null($userAgent)) {
-            $userAgent = $_SERVER['HTTP_USER_AGENT'];
+            $userAgent = @$_SERVER['HTTP_USER_AGENT'];
         }
 
@@ -336,6 +340,5 @@
 
     /**
-     * Checks whether or not the user agent is SoftBank by a given user agent
-     * string.
+     * Checks whether or not the user agent is SoftBank by a given user agent string.
      *
      * @param string $userAgent
@@ -346,5 +349,5 @@
     {
         if (is_null($userAgent)) {
-            $userAgent = $_SERVER['HTTP_USER_AGENT'];
+            $userAgent = @$_SERVER['HTTP_USER_AGENT'];
         }
 
@@ -374,6 +377,5 @@
 
     /**
-     * Checks whether or not the user agent is Willcom by a given user agent
-     * string.
+     * Checks whether or not the user agent is Willcom by a given user agent string.
      *
      * @param string $userAgent
@@ -384,5 +386,5 @@
     {
         if (is_null($userAgent)) {
-            $userAgent = $_SERVER['HTTP_USER_AGENT'];
+            $userAgent = @$_SERVER['HTTP_USER_AGENT'];
         }
 
@@ -392,84 +394,4 @@
 
         return false;
-    }
-
-    /**#@-*/
-
-    /**#@+
-     * @access private
-     */
-
-    /**#@-*/
-
-    // }}}
-}
-
-// }}}
-// {{{ Net_UserAgent_Mobile_Error
-
-/**
- * Net_UserAgent_Mobile_Error implements a class for reporting user
- * agent error messages
- *
- * @category   Networking
- * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2007 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
- * @since      Class available since Release 0.1
- */
-class Net_UserAgent_Mobile_Error extends PEAR_Error
-{
-
-    // {{{ properties
-
-    /**#@+
-     * @access public
-     */
-
-    /**#@-*/
-
-    /**#@+
-     * @access private
-     */
-
-    /**#@-*/
-
-    /**#@+
-     * @access public
-     */
-
-    // }}}
-    // {{{ constructor
-
-    /**
-     * constructor
-     *
-     * @param mixed   $code     Net_UserAgent_Mobile error code, or string
-     *     with error message.
-     * @param integer $mode     what 'error mode' to operate in
-     * @param integer $level    what error level to use for $mode and
-     *     PEAR_ERROR_TRIGGER
-     * @param mixed   $userinfo additional user/debug info
-     * @access public
-     */
-    function Net_UserAgent_Mobile_Error($code = NET_USERAGENT_MOBILE_ERROR,
-                                        $mode = PEAR_ERROR_RETURN,
-                                        $level = E_USER_NOTICE,
-                                        $userinfo = null
-                                        )
-    {
-        if (is_int($code)) {
-            $this->PEAR_Error('Net_UserAgent_Mobile Error: ' .
-                              Net_UserAgent_Mobile::errorMessage($code),
-                              $code, $mode, $level, $userinfo
-                              );
-        } else {
-            $this->PEAR_Error("Net_UserAgent_Mobile Error: $code",
-                              NET_USERAGENT_MOBILE_ERROR, $mode, $level,
-                              $userinfo
-                              );
-        }
     }
 
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMo.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMo.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMo.php	(revision 18188)
@@ -5,18 +5,36 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
  * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/useragent/index.html
- * @see        Net_UserAgent_Mobile_Common
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/browser/browser2/useragent/index.html
  * @since      File available since Release 0.1
  */
@@ -24,5 +42,5 @@
 require_once dirname(__FILE__) . '/Common.php';
 require_once dirname(__FILE__) . '/Display.php';
-require_once dirname(__FILE__) . '/DoCoMoDisplayMap.php';
+require_once dirname(__FILE__) . '/../Mobile.php';
 
 // {{{ Net_UserAgent_Mobile_DoCoMo
@@ -31,7 +49,6 @@
  * NTT DoCoMo implementation
  *
- * Net_UserAgent_Mobile_DoCoMo is a subclass of
- * {@link Net_UserAgent_Mobile_Common}, which implements NTT docomo i-mode
- * user agents.
+ * Net_UserAgent_Mobile_DoCoMo is a subclass of {@link Net_UserAgent_Mobile_Common},
+ * which implements NTT docomo i-mode user agents.
  *
  * SYNOPSIS:
@@ -74,10 +91,10 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/useragent/index.html
- * @see        Net_UserAgent_Mobile_Common
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/browser/browser2/useragent/index.html
  * @since      Class available since Release 0.1
  */
@@ -145,4 +162,394 @@
     var $_displayBytes;
 
+    /**
+     * The model names which have GPS capability.
+     *
+     * @var array
+     * @since Property available since Release 1.0.0RC1
+     */
+    var $_gpsModels = array('F884i',
+                            'F801i',
+                            'F905iBiz',
+                            'SO905iCS',
+                            'N905iBiz',
+                            'N905imyu',
+                            'SO905i',
+                            'F905i',
+                            'P905i',
+                            'N905i',
+                            'D905i',
+                            'SH905i',
+                            'P904i',
+                            'D904i',
+                            'F904i',
+                            'N904i',
+                            'SH904i',
+                            'F883iESS',
+                            'F883iES',
+                            'F903iBSC',
+                            'SO903i',
+                            'F903i',
+                            'D903i',
+                            'N903i',
+                            'P903i',
+                            'SH903i',
+                            'SA800i',
+                            'SA702i',
+                            'SA700iS',
+                            'F505iGPS',
+                            'F661i',
+                            'F884iES',
+                            'N906iL',
+                            'P906i',
+                            'SO906i',
+                            'SH906i',
+                            'N906imyu',
+                            'F906i',
+                            'N906i',
+                            'F01A',
+                            'F03A',
+                            'F06A',
+                            'F05A',
+                            'P01A',
+                            'P02A',
+                            'SH01A',
+                            'SH02A',
+                            'SH03A',
+                            'SH04A',
+                            'N01A',
+                            'N02A',
+                            'P07A3',
+                            'N06A3',
+                            'N08A3',
+                            'P08A3',
+                            'P09A3',
+                            'N09A3',
+                            'F09A3',
+                            'SH05A3',
+                            'SH06A3',
+                            'SH07A3'
+                            );
+
+    /**
+     * The HTML versions which maps models to HTML versions.
+     *
+     * @var array
+     * @since Property available since Release 1.0.0RC1
+     */
+    var $_htmlVersions = array(
+        'D501i' => '1.0',
+        'F501i' => '1.0',
+        'N501i' => '1.0',
+        'P501i' => '1.0',
+        'D502i' => '2.0',
+        'F502i' => '2.0',
+        'N502i' => '2.0',
+        'P502i' => '2.0',
+        'NM502i' => '2.0',
+        'SO502i' => '2.0',
+        'F502it' => '2.0',
+        'N502it' => '2.0',
+        'SO502iWM' => '2.0',
+        'SH821i' => '2.0',
+        'N821i' => '2.0',
+        'P821i' => '2.0',
+        'D209i' => '2.0',
+        'ER209i' => '2.0',
+        'F209i' => '2.0',
+        'KO209i' => '2.0',
+        'N209i' => '2.0',
+        'P209i' => '2.0',
+        'P209iS' => '2.0',
+        'R209i' => '2.0',
+        'P651ps' => '2.0',
+        'R691i' => '2.0',
+        'F210i' => '2.0',
+        'N210i' => '2.0',
+        'P210i' => '2.0',
+        'KO210i' => '2.0',
+        'F671i' => '2.0',
+        'D210i' => '3.0',
+        'SO210i' => '3.0',
+        'F503i' => '3.0',
+        'F503iS' => '3.0',
+        'P503i' => '3.0',
+        'P503iS' => '3.0',
+        'N503i' => '3.0',
+        'N503iS' => '3.0',
+        'SO503i' => '3.0',
+        'SO503iS' => '3.0',
+        'D503i' => '3.0',
+        'D503iS' => '3.0',
+        'F211i' => '3.0',
+        'D211i' => '3.0',
+        'N211i' => '3.0',
+        'N211iS' => '3.0',
+        'P211i' => '3.0',
+        'P211iS' => '3.0',
+        'SO211i' => '3.0',
+        'R211i' => '3.0',
+        'SH251i' => '3.0',
+        'SH251iS' => '3.0',
+        'R692i' => '3.0',
+        'N2001' => '3.0',
+        'N2002' => '3.0',
+        'P2002' => '3.0',
+        'D2101V' => '3.0',
+        'P2101V' => '3.0',
+        'SH2101V' => '3.0',
+        'T2101V' => '3.0',
+        'D504i' => '4.0',
+        'F504i' => '4.0',
+        'F504iS' => '4.0',
+        'N504i' => '4.0',
+        'N504iS' => '4.0',
+        'SO504i' => '4.0',
+        'P504i' => '4.0',
+        'P504iS' => '4.0',
+        'D251i' => '4.0',
+        'D251iS' => '4.0',
+        'F251i' => '4.0',
+        'N251i' => '4.0',
+        'N251iS' => '4.0',
+        'P251iS' => '4.0',
+        'F671iS' => '4.0',
+        'F212i' => '4.0',
+        'SO212i' => '4.0',
+        'F661i' => '4.0',
+        'F672i' => '4.0',
+        'SO213i' => '4.0',
+        'SO213iS' => '4.0',
+        'SO213iWR' => '4.0',
+        'F2051' => '4.0',
+        'N2051' => '4.0',
+        'P2102V' => '4.0',
+        'F2102V' => '4.0',
+        'N2102V' => '4.0',
+        'N2701' => '4.0',
+        'NM850iG' => '4.0',
+        'NM705i' => '4.0',
+        'NM706i' => '4.0',
+        'D505i' => '5.0',
+        'SO505i' => '5.0',
+        'SH505i' => '5.0',
+        'N505i' => '5.0',
+        'F505i' => '5.0',
+        'P505i' => '5.0',
+        'D505iS' => '5.0',
+        'P505iS' => '5.0',
+        'N505iS' => '5.0',
+        'SO505iS' => '5.0',
+        'SH505iS' => '5.0',
+        'F505iGPS' => '5.0',
+        'D252i' => '5.0',
+        'SH252i' => '5.0',
+        'P252i' => '5.0',
+        'N252i' => '5.0',
+        'P252iS' => '5.0',
+        'D506i' => '5.0',
+        'F506i' => '5.0',
+        'N506i' => '5.0',
+        'P506iC' => '5.0',
+        'SH506iC' => '5.0',
+        'SO506iC' => '5.0',
+        'N506iS' => '5.0',
+        'SO506i' => '5.0',
+        'SO506iS' => '5.0',
+        'N506iS2' => '5.0',
+        'D253i' => '5.0',
+        'N253i' => '5.0',
+        'P253i' => '5.0',
+        'D253iWM' => '5.0',
+        'P253iS' => '5.0',
+        'P213i' => '5.0',
+        'F900i' => '5.0',
+        'N900i' => '5.0',
+        'P900i' => '5.0',
+        'SH900i' => '5.0',
+        'F900iT' => '5.0',
+        'P900iV' => '5.0',
+        'N900iS' => '5.0',
+        'D900i' => '5.0',
+        'F900iC' => '5.0',
+        'N900iL' => '5.0',
+        'N900iG' => '5.0',
+        'F880iES' => '5.0',
+        'SH901iC' => '5.0',
+        'F901iC' => '5.0',
+        'N901iC' => '5.0',
+        'D901i' => '5.0',
+        'P901i' => '5.0',
+        'SH901iS' => '5.0',
+        'F901iS' => '5.0',
+        'D901iS' => '5.0',
+        'P901iS' => '5.0',
+        'N901iS' => '5.0',
+        'P901iTV' => '5.0',
+        'F700i' => '5.0',
+        'SH700i' => '5.0',
+        'N700i' => '5.0',
+        'P700i' => '5.0',
+        'F700iS' => '5.0',
+        'SH700iS' => '5.0',
+        'SA700iS' => '5.0',
+        'SH851i' => '5.0',
+        'P851i' => '5.0',
+        'F881iES' => '5.0',
+        'D701i' => '5.0',
+        'N701i' => '5.0',
+        'P701iD' => '5.0',
+        'D701iWM' => '5.0',
+        'N701iECO' => '5.0',
+        'SA800i' => '5.0',
+        'L600i' => '5.0',
+        'N600i' => '5.0',
+        'L601i' => '5.0',
+        'M702iS' => '5.0',
+        'M702iG' => '5.0',
+        'L602i' => '5.0',
+        'F902i' => '6.0',
+        'D902i' => '6.0',
+        'N902i' => '6.0',
+        'P902i' => '6.0',
+        'SH902i' => '6.0',
+        'SO902i' => '6.0',
+        'SH902iS' => '6.0',
+        'P902iS' => '6.0',
+        'N902iS' => '6.0',
+        'D902iS' => '6.0',
+        'F902iS' => '6.0',
+        'SO902iWP+' => '6.0',
+        'SH902iSL' => '6.0',
+        'N902iX' => '6.0',
+        'N902iL' => '6.0',
+        'P702i' => '6.0',
+        'N702iD' => '6.0',
+        'F702iD' => '6.0',
+        'SH702iD' => '6.0',
+        'D702i' => '6.0',
+        'SO702i' => '6.0',
+        'D702iBCL' => '6.0',
+        'SA702i' => '6.0',
+        'SH702iS' => '6.0',
+        'N702iS' => '6.0',
+        'P702iD' => '6.0',
+        'D702iF' => '6.0',
+        'D851iWM' => '6.0',
+        'F882iES' => '6.0',
+        'N601i' => '6.0',
+        'D800iDS' => '6.0',
+        'P703imyu' => '6.0',
+        'F883i' => '6.0',
+        'F883iS' => '6.0',
+        'P704imyu' => '6.0',
+        'L704i' => '6.0',
+        'L705i' => '6.0',
+        'L705iX' => '6.0',
+        'L852i' => '6.0',
+        'L706ie' => '6.0',
+        'L01A' => '6.0',
+        'L03A' => '6.0',
+        'SH903i' => '7.0',
+        'P903i' => '7.0',
+        'N903i' => '7.0',
+        'D903i' => '7.0',
+        'F903i' => '7.0',
+        'SO903i' => '7.0',
+        'D903iTV' => '7.0',
+        'F903iX' => '7.0',
+        'P903iTV' => '7.0',
+        'SH903iTV' => '7.0',
+        'F903iBSC' => '7.0',
+        'P903iX' => '7.0',
+        'SO903iTV' => '7.0',
+        'N703iD' => '7.0',
+        'F703i' => '7.0',
+        'P703i' => '7.0',
+        'D703i' => '7.0',
+        'SH703i' => '7.0',
+        'N703imyu' => '7.0',
+        'SO703i' => '7.0',
+        'SH904i' => '7.0',
+        'N904i' => '7.0',
+        'F904i' => '7.0',
+        'D904i' => '7.0',
+        'P904i' => '7.0',
+        'SO704i' => '7.0',
+        'F704i' => '7.0',
+        'N704imyu' => '7.0',
+        'SH704i' => '7.0',
+        'D704i' => '7.0',
+        'P704i' => '7.0',
+        'F883iES' => '7.0',
+        'F883iESS' => '7.0',
+        'F801i' => '7.0',
+        'F705i' => '7.0',
+        'D705i' => '7.0',
+        'D705imyu' => '7.0',
+        'SH705i' => '7.0',
+        'SH705i2' => '7.0',
+        'SH706ie' => '7.0',
+        'F05A' => '7.0',
+        'SH905i' => '7.1',
+        'D905i' => '7.1',
+        'N905i' => '7.1',
+        'P905i' => '7.1',
+        'F905i' => '7.1',
+        'SO905i' => '7.1',
+        'N905imyu' => '7.1',
+        'N905iBiz' => '7.1',
+        'SH905iTV' => '7.1',
+        'SO905iCS' => '7.1',
+        'F905iBiz' => '7.1',
+        'P905iTV' => '7.1',
+        'P705i' => '7.1',
+        'N705i' => '7.1',
+        'N705imyu' => '7.1',
+        'P705imyu' => '7.1',
+        'SO705i' => '7.1',
+        'P705iCL' => '7.1',
+        'F884i' => '7.1',
+        'F884iES' => '7.1',
+        'N906iL' => '7.1',
+        'N706i' => '7.1',
+        'SO706i' => '7.1',
+        'P706imyu' => '7.1',
+        'N706ie' => '7.1',
+        'N706i2' => '7.1',
+        'N03A' => '7.1',
+        'N05A' => '7.1',
+        'F07A' => '7.1',
+        'P906i' => '7.2',
+        'SO906i' => '7.2',
+        'SH906i' => '7.2',
+        'N906imyu' => '7.2',
+        'F906i' => '7.2',
+        'N906i' => '7.2',
+        'SH906iTV' => '7.2',
+        'F706i' => '7.2',
+        'SH706i' => '7.2',
+        'P706ie' => '7.2',
+        'SH706iw' => '7.2',
+        'F01A' => '7.2',
+        'F02A' => '7.2',
+        'F03A' => '7.2',
+        'F04A' => '7.2',
+        'F06A' => '7.2',
+        'P01A' => '7.2',
+        'P02A' => '7.2',
+        'P03A' => '7.2',
+        'P04A' => '7.2',
+        'P05A' => '7.2',
+        'P06A' => '7.2',
+        'SH01A' => '7.2',
+        'SH02A' => '7.2',
+        'SH03A' => '7.2',
+        'SH04A' => '7.2',
+        'N01A' => '7.2',
+        'N02A' => '7.2',
+        'N04A' => '7.2',
+        'P10A' => '7.2',
+                               );
+
     /**#@-*/
 
@@ -171,5 +578,5 @@
      *
      * @param string $userAgent User-Agent string
-     * @return mixed void, or a PEAR error object on error
+     * @throws Net_UserAgent_Mobile_Error
      */
     function parse($userAgent)
@@ -188,5 +595,5 @@
             // DoCoMo/2.0 N2001(c10;ser0123456789abcde;icc01234567890123456789)
             $this->_isFOMA = true;
-            list($this->name, $this->version) = explode('/', $main);
+            @list($this->name, $this->version) = explode('/', $main);
             $result = $this->_parseFOMA($foma_or_comment);
         } else {
@@ -207,18 +614,18 @@
      * create a new {@link Net_UserAgent_Mobile_Display} class instance
      *
-     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
-     *     object
-     * @see Net_UserAgent_Mobile_Display
-     * @see Net_UserAgent_Mobile_DoCoMoDisplayMap::get()
+     * @return Net_UserAgent_Mobile_Display
      */
     function makeDisplay()
     {
-        $display = Net_UserAgent_Mobile_DoCoMoDisplayMap::get($this->getModel());
+        include_once dirname(__FILE__) . '/DoCoMo/ScreenInfo.php';
+
+        $screenInfo = &Net_UserAgent_Mobile_DoCoMo_ScreenInfo::singleton();
+        $display = $screenInfo->get($this->getModel());
         if (!is_null($this->_displayBytes)) {
-            list($widthBytes, $heightBytes) =
-                explode('*', $this->_displayBytes);
+            @list($widthBytes, $heightBytes) = explode('*', $this->_displayBytes);
             $display['width_bytes']  = $widthBytes;
             $display['height_bytes'] = $heightBytes;
         }
+
         return new Net_UserAgent_Mobile_Display($display);
     }
@@ -228,5 +635,5 @@
 
     /**
-     * returns supported HTML version like '3.0'. retuns null if unknown.
+     * Gets the HTML version like '3.0'. Returns null if unknown.
      *
      * @return string
@@ -234,25 +641,5 @@
     function getHTMLVersion()
     {
-        static $htmlVersionMap;
-        if (!isset($htmlVersionMap)) {
-            $htmlVersionMap = array(
-                                    '[DFNP]501i' => '1.0',
-                                    '502i|821i|209i|651|691i|(F|N|P|KO)210i|^F671i$' => '2.0',
-                                    '(D210i|SO210i)|503i|211i|SH251i|692i|200[12]|2101V' => '3.0',
-                                    '504i|251i|^F671iS$|212i|2051|2102V|661i|2701|672i|SO213i|850i' => '4.0',
-                                    'eggy|P751v' => '3.2',
-                                    '505i|252i|900i|506i|880i|253i|P213i|901i|700i|^(SH|P)851i|701i|881i|^SA800i$|600i|^L601i$|^M702i(S|G)$|^L602i$' => '5.0',
-                                    '902i|702i|851i|882i|^N601i$|^D800iDS$|^P703imyu$|^P704imyu$|^L70[45]i$|^F883i$' => '6.0',
-                                    '903i|703i|904i|704i|883i|801i|^[FD]705i' => '7.0',
-                                    '905i|705i' => '7.1'
-                                    );
-        }
-
-        foreach ($htmlVersionMap as $key => $value) {
-            if (preg_match("/$key/", $this->_rawModel)) {
-                return $value;
-            }
-        }
-        return null;
+        return @$this->_htmlVersions[ $this->getModel() ];
     }
 
@@ -271,9 +658,5 @@
         }
 
-        static $defaultCacheSize;
-        if (!isset($defaultCacheSize)) {
-            $defaultCacheSize = 5;
-        }
-        return $defaultCacheSize;
+        return 5;
     }
 
@@ -288,5 +671,5 @@
     function getSeries()
     {
-        if ($this->isFOMA() && preg_match('/(\d{4})/', $this->_rawModel)) {
+        if (preg_match('/(\d{4})/', $this->_rawModel)) {
             return 'FOMA';
         }
@@ -299,6 +682,4 @@
             return '651';
         }
-
-        return null;
     }
 
@@ -316,6 +697,4 @@
             return $matches[1];
         }
-
-        return null;
     }
 
@@ -412,13 +791,11 @@
 
     /**
+     * Returns whether a user agent is a GPS model or not.
+     *
      * @return boolean
      */ 
     function isGPS()
     {
-        static $gpsModels;
-        if (!isset($gpsModels)) {
-            $gpsModels = array('F661i', 'F505iGPS');
-        }
-        return in_array($this->_rawModel, $gpsModels);
+        return in_array($this->_rawModel, $this->_gpsModels);
     }
 
@@ -447,4 +824,34 @@
     {
         return 'DoCoMo';
+    }
+
+    // }}}
+    // {{{ getUID()
+
+    /**
+     * Gets the UID of a subscriber.
+     *
+     * @return string
+     * @since Method available since Release 1.0.0RC1
+     */
+    function getUID()
+    {
+        if (array_key_exists('HTTP_X_DCMGUID', $_SERVER)) {
+            return $_SERVER['HTTP_X_DCMGUID'];
+        }
+    }
+
+    // }}}
+    // {{{ getBrowserVersion()
+
+    /**
+     * Gets the i-mode browser version.
+     *
+     * @return string
+     * @since Method available since Release 1.0.0RC3
+     */
+    function getBrowserVersion()
+    {
+        return $this->getCacheSize() == 500 ? '2.0' : '1.0';
     }
 
@@ -462,5 +869,5 @@
      *
      * @param string $main main part of HTTP_USER_AGENT string
-     * @return mixed void, or a PEAR error object on error
+     * @throws Net_UserAgent_Mobile_Error
      */ 
     function _parseMain($main)
@@ -509,5 +916,5 @@
      *
      * @param string $foma main part of HTTP_USER_AGENT string
-     * @return mixed void, or a PEAR error object on error
+     * @throws Net_UserAgent_Mobile_Error
      */ 
     function _parseFOMA($foma)
@@ -522,8 +929,14 @@
         }
 
-        if (preg_match('/^[^(\s]+\s?\((.*?)\)$/', $foma, $matches)) {
+        if (preg_match('/^[^(\s]+\s?\(([^)]+)\)(?:\(([^)]+)\))?$/', $foma, $matches)) {
             if (preg_match('/^compatible/', $matches[1])) { // The user-agent is DoCoMo compatible.
                 $this->_comment = $matches[1];
                 return;
+            }
+
+            if (count($matches) == 3) {
+                if (preg_match('/^compatible/', $matches[2])) { // The user-agent is DoCoMo compatible.
+                    $this->_comment = $matches[2];
+                }
             }
 
@@ -538,5 +951,5 @@
                     continue;
                 }
-                if (preg_match('/^(T[CDBJ])$/', $value, $matches)) {
+                if (preg_match('/^([A-Z]+)$/', $value, $matches)) {
                     $this->_status = $matches[1];
                     continue;
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/NonMobile.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/NonMobile.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/NonMobile.php	(revision 18188)
@@ -5,17 +5,34 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
- * @see        Net_UserAgent_Mobile_Common
  * @since      File available since Release 0.1.0
  */
@@ -30,6 +47,6 @@
  *
  * Net_UserAgent_Mobile_NonMobile is a subclass of
- * {@link Net_UserAgent_Mobile_Common}, which implements non-mobile or
- * unimplemented user agents.
+ * {@link Net_UserAgent_Mobile_Common}, which implements non-mobile or unimplemented
+ * user agents.
  *
  * SYNOPSIS:
@@ -43,9 +60,8 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
- * @see        Net_UserAgent_Mobile_Common
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @since      Class available since Release 0.1.0
  */
@@ -103,7 +119,5 @@
      * create a new {@link Net_UserAgent_Mobile_Display} class instance
      *
-     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
-     *     object
-     * @see Net_UserAgent_Mobile_Display
+     * @return Net_UserAgent_Mobile_Display
      */
     function makeDisplay()
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Display.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Display.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Display.php	(revision 18188)
@@ -5,15 +5,33 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2007 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
  * @since      File available since Release 0.1
@@ -49,6 +67,6 @@
  *
  * USING EXTERNAL MAP FILE:
- * If the environment variable DOCOMO_MAP exists, the specified XML data will
- * be used for DoCoMo display information.
+ * If the environment variable DOCOMO_MAP exists, the specified XML data will be used
+ * for DoCoMo display information.
  *
  * ex) Please add the following code.
@@ -57,8 +75,8 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2007 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @since      Class available since Release 0.1
  */
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Willcom.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Willcom.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Willcom.php	(revision 18188)
@@ -5,15 +5,33 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
  * @link       http://www.willcom-inc.com/ja/service/contents_service/club_air_edge/for_phone/homepage/index.html
@@ -29,7 +47,6 @@
  * AirH"PHONE implementation
  *
- * Net_UserAgent_Mobile_Willcom is a subclass of
- * {@link Net_UserAgent_Mobile_Common}, which implements Willcom's user
- * agents.
+ * Net_UserAgent_Mobile_Willcom is a subclass of {@link Net_UserAgent_Mobile_Common},
+ * which implements Willcom's user agents.
  *
  * SYNOPSIS:
@@ -51,10 +68,9 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @link       http://www.willcom-inc.com/ja/service/contents_service/club_air_edge/for_phone/homepage/index.html
- * @see        Net_UserAgent_Mobile_Common
  * @since      Class available since Release 0.5
  */
@@ -154,7 +170,5 @@
      * create a new {@link Net_UserAgent_Mobile_Display} class instance
      *
-     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
-     *     object
-     * @see Net_UserAgent_Mobile_Display
+     * @return Net_UserAgent_Mobile_Display
      */
     function makeDisplay()
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/SoftBank.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/SoftBank.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/SoftBank.php	(revision 18188)
@@ -5,16 +5,35 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
+ * @link       http://creation.mb.softbank.jp/
  * @since      File available since Release 0.20.0
  */
@@ -22,4 +41,5 @@
 require_once dirname(__FILE__) . '/Common.php';
 require_once dirname(__FILE__) . '/Display.php';
+require_once dirname(__FILE__) . '/../Mobile.php';
 
 // {{{ Net_UserAgent_Mobile_SoftBank
@@ -28,6 +48,6 @@
  * SoftBank implementation
  *
- * Net_UserAgent_Mobile_SoftBank is a subclass of
- * {@link Net_UserAgent_Mobile_Common}, which implements SoftBank user agents.
+ * Net_UserAgent_Mobile_SoftBank is a subclass of {@link Net_UserAgent_Mobile_Common},
+ * which implements SoftBank user agents.
  *
  * SYNOPSIS:
@@ -59,11 +79,9 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
- * @link       http://developers.vodafone.jp/dp/tool_dl/web/useragent.php
- * @link       http://developers.vodafone.jp/dp/tool_dl/web/position.php
- * @see        Net_UserAgent_Mobile_Common
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
+ * @link       http://creation.mb.softbank.jp/
  * @since      Class available since Release 0.20.0
  */
@@ -93,5 +111,5 @@
      * @var string
      */
-    var $_serialNumber = null;
+    var $_serialNumber;
 
     /**
@@ -105,5 +123,5 @@
      * @var string
      */
-    var $_vendorVersion = null;
+    var $_vendorVersion;
 
     /**
@@ -164,5 +182,5 @@
      *
      * @param string $userAgent User-Agent string
-     * @return mixed void, or a PEAR error object on error
+     * @throws Net_UserAgent_Mobile_Error
      */
     function parse($userAgent)
@@ -208,12 +226,9 @@
      * create a new {@link Net_UserAgent_Mobile_Display} class instance
      *
-     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
-     *     object
-     * @see Net_UserAgent_Mobile_Display
+     * @return Net_UserAgent_Mobile_Display
      */
     function makeDisplay() 
     {
-        @list($width, $height) =
-            explode('*', $this->getHeader('X-JPHONE-DISPLAY'));
+        @list($width, $height) = explode('*', $this->getHeader('X-JPHONE-DISPLAY'));
         $color = false;
         $depth = 0;
@@ -223,6 +238,6 @@
             $depth = $matches[2];
         }
-        return new Net_UserAgent_Mobile_Display(array(
-                                                      'width'  => $width,
+
+        return new Net_UserAgent_Mobile_Display(array('width'  => $width,
                                                       'height' => $height,
                                                       'depth'  => $depth,
@@ -248,6 +263,6 @@
 
     /**
-     * return terminal unique serial number. returns null if user forbids to
-     * send his/her serial number.
+     * return terminal unique serial number. returns null if user forbids to send
+     * his/her serial number.
      *
      * @return string
@@ -419,4 +434,20 @@
     }
 
+    // }}}
+    // {{{ getUID()
+
+    /**
+     * Gets the UID of a subscriber.
+     *
+     * @return string
+     * @since Method available since Release 1.0.0RC1
+     */
+    function getUID()
+    {
+        if (array_key_exists('HTTP_X_JPHONE_UID', $_SERVER)) {
+            return $_SERVER['HTTP_X_JPHONE_UID'];
+        }
+    }
+
     /**#@-*/
 
@@ -432,9 +463,8 @@
      *
      * @param array $agent parts of the User-Agent string
-     * @return mixed void, or a PEAR error object on error
-     */
-    function _parseVodafone(&$agent)
-    {
-        $count = count($agent);
+     * @throws Net_UserAgent_Mobile_Error
+     */
+    function _parseVodafone($agent)
+    {
         $this->_packetCompliant = true;
 
@@ -448,4 +478,5 @@
                 return $this->noMatch();
             }
+
             $this->_serialNumber = $matches[1];
         }
@@ -458,6 +489,6 @@
         $this->_vendorVersion = $matches[2];
 
-        for ($i = 2; $i < $count; ++$i) {
-            list($key, $value) = explode('/', $agent[$i]);
+        for ($i = 2, $count = count($agent); $i < $count; ++$i) {
+            @list($key, $value) = explode('/', $agent[$i]);
             $this->_javaInfo[$key] = $value;
         }
@@ -471,7 +502,7 @@
      *
      * @param array $agent parts of the User-Agent string
-     * @return mixed void, or a PEAR error object on error
-     */
-    function _parseJphone(&$agent)
+     * @throws Net_UserAgent_Mobile_Error
+     */
+    function _parseJphone($agent)
     {
         $count = count($agent);
@@ -482,17 +513,17 @@
             // J-PHONE/4.0/J-SH51/SNJSHA3029293 SH/0001aa Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0
             $this->_packetCompliant = true;
-            @list($this->name, $this->version, $this->_rawModel,
-                  $serialNumber) = explode('/', $agent[0]);
+            @list($this->name, $this->version, $this->_rawModel, $serialNumber) =
+                explode('/', $agent[0]);
             if ($serialNumber) {
                 if (!preg_match('!^SN(.+)!', $serialNumber, $matches)) {
                     return $this->noMatch();
                 }
+
                 $this->_serialNumber = $matches[1];
             }
 
-            list($this->_vendor, $this->_vendorVersion) =
-                explode('/', $agent[1]);
+            @list($this->_vendor, $this->_vendorVersion) = explode('/', $agent[1]);
             for ($i = 2; $i < $count; ++$i) {
-                list($key, $value) = explode('/', $agent[$i]);
+                @list($key, $value) = explode('/', $agent[$i]);
                 $this->_javaInfo[$key] = $value;
             }
@@ -500,10 +531,11 @@
 
             // J-PHONE/2.0/J-DN02
-            @list($this->name, $this->version, $this->_rawModel,
-                  $serialNumber) = explode('/', $agent[0]);
+            @list($this->name, $this->version, $this->_rawModel, $serialNumber) =
+                explode('/', $agent[0]);
             if ($serialNumber) {
                 if (!preg_match('!^SN(.+)!', $serialNumber, $matches)) {
                     return $this->noMatch();
                 }
+
                 $this->_serialNumber = $matches[1];
             }
@@ -526,18 +558,16 @@
      *
      * @param array $agent parts of the User-Agent string
-     * @return mixed void, or a PEAR error object on error
-     */
-    function _parseMotorola(&$agent)
-    {
-        $count = count($agent);
+     */
+    function _parseMotorola($agent)
+    {
         $this->_packetCompliant = true;
         $this->_vendor = 'MOT';
 
         // MOT-V980/80.2F.2E. MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1
-        list($this->_rawModel, $this->_vendorVersion) = explode('/', $agent[0]);
+        @list($this->_rawModel, $this->_vendorVersion) = explode('/', $agent[0]);
         $this->_model = substr(strrchr($this->_rawModel, '-'), 1);
 
-        for ($i = 2; $i < $count; ++$i) {
-            list($key, $value) = explode('/', $agent[$i]);
+        for ($i = 2, $count = count($agent); $i < $count; ++$i) {
+            @list($key, $value) = explode('/', $agent[$i]);
             $this->_javaInfo[$key] = $value;
         }
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Common.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Common.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Common.php	(revision 18188)
@@ -5,20 +5,39 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
  * @since      File available since Release 0.1
  */
 
-require_once dirname(__FILE__) . '/../Mobile.php';
+require_once dirname(__FILE__) . '/Error.php';
+require_once dirname(__FILE__) . '/../../../PEAR.php';
 
 // {{{ Net_UserAgent_Mobile_Common
@@ -32,11 +51,11 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @since      Class available since Release 0.1
  */
-class Net_UserAgent_Mobile_Common extends PEAR
+class Net_UserAgent_Mobile_Common
 {
 
@@ -72,6 +91,5 @@
 
     /**
-     * {@link Net_UserAgent_Mobile_Error} object for error handling in the
-     *     constructor
+     * {@link Net_UserAgent_Mobile_Error} object for error handling in the constructor
      * @var object
      **/
@@ -117,28 +135,27 @@
     function Net_UserAgent_Mobile_Common($userAgent)
     {
-        parent::PEAR('Net_UserAgent_Mobile_Error');
+        $this->_userAgent = $userAgent;
 
         $result = $this->parse($userAgent);
-        if (Net_UserAgent_Mobile::isError($result)) {
-            $this->isError($result);
+        if (PEAR::isError($result)) {
+            $this->_error = &$result;
         }
-
-        $this->_userAgent = $userAgent;
-    }
-
-    // }}}
-    // {{{ isError
-
-    /**
-     * Returns/set an error when the instance couldn't initialize properly
-     *
-     * @param object {@link Net_UserAgent_Mobile_Error} object when setting
-     *     an error
-     * @return object {@link Net_UserAgent_Mobile_Error} object
-     */
-    function &isError($error = null)
-    {
-        if ($error !== null) {
-            $this->_error = &$error;
+    }
+
+    // }}}
+    // {{{ getError
+
+    /**
+     * Gets a Net_UserAgent_Mobile_Error object.
+     *
+     * @param object {@link Net_UserAgent_Mobile_Error} object when setting an error
+     * @return Net_UserAgent_Mobile_Error
+     * @since Method available since Release 1.0.0RC2
+     */
+    function &getError()
+    {
+        if (is_null($this->_error)) {
+            $return = null;
+            return $return;
         }
 
@@ -147,44 +164,4 @@
 
     // }}}
-    // {{{ raiseError()
-
-    /**
-     * This method is used to communicate an error and invoke error
-     * callbacks etc. Basically a wrapper for PEAR::raiseError without
-     * the message string.
-     *
-     * @param mixed $code integer error code, or a PEAR error object (all
-     *     other parameters are ignored if this parameter is an object
-     * @param int $mode error mode, see PEAR_Error docs
-     * @param mixed $options If error mode is PEAR_ERROR_TRIGGER, this is the
-     *     error level (E_USER_NOTICE etc). If error mode is
-     *     PEAR_ERROR_CALLBACK, this is the callback function, either as a
-     *     function name, or as an array of an object and method name. For
-     *     other error modes this parameter is ignored.
-     * @param string $userinfo Extra debug information. Defaults to the last
-     *     query and native error code.
-     * @return object a PEAR error object
-     * @see PEAR_Error
-     */
-    function &raiseError($code = NET_USERAGENT_MOBILE_ERROR, $mode = null,
-                         $options = null, $userinfo = null
-                         )
-    {
-
-        // The error is yet a Net_UserAgent_Mobile error object
-        if (is_object($code)) {
-            $error = &PEAR::raiseError($code, null, null, null, null, null,
-                                       true
-                                       );
-            return $error;
-        }
-
-        $error = &PEAR::raiseError(null, $code, $mode, $options, $userinfo,
-                                   'Net_UserAgent_Mobile_Error', true
-                                   );
-        return $error;
-    }
-
-    // }}}
     // {{{ getUserAgent()
 
@@ -232,13 +209,12 @@
      * returns {@link Net_UserAgent_Mobile_Disply} object
      *
-     * @return object a {@link Net_UserAgent_Mobile_Display} object, or a
-     *     PEAR error object on error
-     * @see Net_UserAgent_Mobile_Display
+     * @return Net_UserAgent_Mobile_Display
      */
     function getDisplay()
     {
-        if (!is_object($this->_display)) {
+        if (is_null($this->_display)) {
             $this->_display = $this->makeDisplay();
         }
+
         return $this->_display;
     }
@@ -263,12 +239,15 @@
      * generates a warning message for new variants
      *
-     * @return object a PEAR error object
+     * @throws Net_UserAgent_Mobile_Error
      */
     function noMatch()
     {
-        return $this->raiseError(NET_USERAGENT_MOBILE_ERROR_NOMATCH, null,
-                                 null, $this->getUserAgent() .
-                                 ': might be new variants. Please contact the author of Net_UserAgent_Mobile!'
-                                 );
+        return PEAR::raiseError($this->getUserAgent() . ': might be new variants. Please contact the author of Net_UserAgent_Mobile!',
+                                NET_USERAGENT_MOBILE_ERROR_NOMATCH,
+                                null,
+                                null,
+                                null,
+                                'Net_UserAgent_Mobile_Error'
+                                );
     }
 
@@ -291,10 +270,8 @@
      * implemented in subclasses)
      *
+     * @return Net_UserAgent_Mobile_Display
      * @abstract
      */
-    function makeDisplay()
-    {
-        die();
-    }
+    function makeDisplay() {}
 
     // }}}
@@ -500,4 +477,15 @@
         return $this->_rawModel;
     }
+
+    // }}}
+    // {{{ getUID()
+
+    /**
+     * Gets the UID of a subscriber.
+     *
+     * @return string
+     * @since Method available since Release 1.0.0RC1
+     */
+    function getUID() {}
 
     /**#@-*/
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Error.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Error.php	(revision 18188)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/Error.php	(revision 18188)
@@ -0,0 +1,80 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * Copyright (c) 2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    CVS: $Id: Error.php,v 1.1 2009/05/26 08:48:16 kuboa Exp $
+ * @since      File available since Release 1.0.0RC3
+ */
+
+require_once dirname(__FILE__) . '/../../../PEAR.php';
+
+// {{{ constants
+
+/**
+ * Constants for error handling.
+ */
+define('NET_USERAGENT_MOBILE_OK',               1);
+define('NET_USERAGENT_MOBILE_ERROR',           -1);
+define('NET_USERAGENT_MOBILE_ERROR_NOMATCH',   -2);
+define('NET_USERAGENT_MOBILE_ERROR_NOT_FOUND', -3);
+
+// }}}
+// {{{ Net_UserAgent_Mobile_Error
+
+/**
+ * Net_UserAgent_Mobile_Error implements a class for reporting user agent error
+ * messages
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
+ * @since      Class available since Release 0.1
+ */
+class Net_UserAgent_Mobile_Error extends PEAR_Error {}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMo/ScreenInfo.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMo/ScreenInfo.php	(revision 18188)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMo/ScreenInfo.php	(revision 18188)
@@ -0,0 +1,2184 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+
+/**
+ * PHP versions 4 and 5
+ *
+ * Copyright (c) 2008-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2008-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    CVS: $Id: ScreenInfo.php,v 1.2 2009/06/23 08:06:58 kuboa Exp $
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
+ * @since      File available since Release 1.0.0RC1
+ */
+
+// {{{ GLOBALS
+
+$GLOBALS['NET_USERAGENT_MOBILE_DoCoMo_ScreenInfo_Instance'] = null;
+
+// }}}
+// {{{ Net_UserAgent_Mobile_DoCoMo_ScreenInfo
+
+/**
+ * The screen information class for DoCoMo.
+ *
+ * @category   Networking
+ * @package    Net_UserAgent_Mobile
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2008-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
+ * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
+ * @since      Class available since Release 1.0.0RC1
+ */
+class Net_UserAgent_Mobile_DoCoMo_ScreenInfo
+{
+
+    // {{{ properties
+
+    /**#@+
+     * @access public
+     */
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    var $_data = array(
+
+                       // i-mode compliant HTML 1.0
+                       'D501I' => array(
+                                        'width'  => 96,
+                                        'height' => 72,
+                                        'depth'  => 2,
+                                        'color'  => 0
+                                        ),
+                       'F501I' => array(
+                                        'width'  => 112,
+                                        'height' => 84,
+                                        'depth'  => 2,
+                                        'color'  => 0
+                                        ),
+                       'N501I' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 2,
+                                        'color'  => 0
+                                        ),
+                       'P501I' => array(
+                                        'width'  => 96,
+                                        'height' => 120,
+                                        'depth'  => 2,
+                                        'color'  => 0
+                                        ),
+
+                       // i-mode compliant HTML 2.0
+                       'D502I' => array(
+                                        'width'  => 96,
+                                        'height' => 90,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'F502I' => array(
+                                        'width'  => 96,
+                                        'height' => 91,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'N502I' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'P502I' => array(
+                                        'width'  => 96,
+                                        'height' => 117,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'NM502I' => array(
+                                         'width'  => 111,
+                                         'height' => 106,
+                                         'depth'  => 2,
+                                         'color'  => 0
+                                         ),
+                       'SO502I' => array(
+                                         'width'  => 120,
+                                         'height' => 120,
+                                         'depth'  => 4,
+                                         'color'  => 0
+                                         ),
+                       'F502IT' => array(
+                                         'width'  => 96,
+                                         'height' => 91,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'N502IT' => array(
+                                         'width'  => 118,
+                                         'height' => 128,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'SO502IWM' => array(
+                                           'width'  => 120,
+                                           'height' => 113,
+                                           'depth'  => 256,
+                                           'color'  => 1
+                                           ),
+                       'SH821I' => array(
+                                         'width'  => 96,
+                                         'height' => 78,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'N821I' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'P821I' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'D209I' => array(
+                                        'width'  => 96,
+                                        'height' => 90,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'ER209I' => array(
+                                         'width'  => 120,
+                                         'height' => 72,
+                                         'depth'  => 2,
+                                         'color'  => 0
+                                         ),
+                       'F209I' => array(
+                                        'width'  => 96,
+                                        'height' => 91,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'KO209I' => array(
+                                         'width'  => 96,
+                                         'height' => 96,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'N209I' => array(
+                                        'width'  => 108,
+                                        'height' => 82,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'P209I' => array(
+                                        'width'  => 96,
+                                        'height' => 87,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'P209IS' => array(
+                                         'width'  => 96,
+                                         'height' => 87,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'R209I' => array(
+                                        'width'  => 96,
+                                        'height' => 72,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'P651PS' => array(
+                                         'width'  => 96,
+                                         'height' => 87,
+                                         'depth'  => 4,
+                                         'color'  => 0
+                                         ),
+                       'R691I' => array(
+                                        'width'  => 96,
+                                        'height' => 72,
+                                        'depth'  => 4,
+                                        'color'  => 0
+                                        ),
+                       'F671I' => array(
+                                        'width'  => 120,
+                                        'height' => 126,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'F210I' => array(
+                                        'width'  => 96,
+                                        'height' => 113,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'N210I' => array(
+                                        'width'  => 118,
+                                        'height' => 113,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'P210I' => array(
+                                        'width'  => 96,
+                                        'height' => 91,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'KO210I' => array(
+                                         'width'  => 96,
+                                         'height' => 96,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+
+                       // i-mode compliant HTML 3.0
+                       'F503I' => array(
+                                        'width'  => 120,
+                                        'height' => 130,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'F503IS' => array(
+                                         'width'  => 120,
+                                         'height' => 130,
+                                         'depth'  => 4096,
+                                         'color'  => 1
+                                         ),
+                       'P503I' => array(
+                                        'width'  => 120,
+                                        'height' => 130,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'P503IS' => array(
+                                         'width'  => 120,
+                                         'height' => 130,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'N503I' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'N503IS' => array(
+                                         'width'  => 118,
+                                         'height' => 128,
+                                         'depth'  => 4096,
+                                         'color'  => 1
+                                         ),
+                       'SO503I' => array(
+                                         'width'  => 120,
+                                         'height' => 113,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SO503IS' => array(
+                                          'width'  => 120,
+                                          'height' => 113,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'D503I' => array(
+                                        'width'  => 132,
+                                        'height' => 126,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'D503IS' => array(
+                                         'width'  => 132,
+                                         'height' => 126,
+                                         'depth'  => 4096,
+                                         'color'  => 1
+                                         ),
+                       'D210I' => array(
+                                        'width'  => 96,
+                                        'height' => 91,
+                                        'depth'  => 256,
+                                        'color'  => 1
+                                        ),
+                       'SO210I' => array(
+                                         'width'  => 120,
+                                         'height' => 113,
+                                         'depth'  => 256,
+                                         'color'  => 1
+                                         ),
+                       'F211I' => array(
+                                        'width'  => 96,
+                                        'height' => 113,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'D211I' => array(
+                                        'width'  => 100,
+                                        'height' => 91,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'N211I' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'N211IS' => array(
+                                         'width'  => 118,
+                                         'height' => 128,
+                                         'depth'  => 4096,
+                                         'color'  => 1
+                                         ),
+                       'P211I' => array(
+                                        'width'  => 120,
+                                        'height' => 130,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P211IS' => array(
+                                         'width'  => 120,
+                                         'height' => 130,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SO211I' => array(
+                                         'width'  => 120,
+                                         'height' => 112,
+                                         'depth'  => 4096,
+                                         'color'  => 1
+                                         ),
+                       'R211I' => array(
+                                        'width'  => 96,
+                                        'height' => 98,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'SH251I' => array(
+                                         'width'  => 120,
+                                         'height' => 130,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SH251IS' => array(
+                                          'width'  => 176,
+                                          'height' => 187,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'R692I' => array(
+                                        'width'  => 96,
+                                        'height' => 98,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+
+                       // i-mode compliant HTML 3.0
+                       // (FOMA 2001/2002/2101V)
+                       'N2001' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 4096,
+                                        'color'  => 1
+                                        ),
+                       'N2002' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P2002' => array(
+                                        'width'  => 118,
+                                        'height' => 128,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'D2101V' => array(
+                                         'width'  => 120,
+                                         'height' => 130,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P2101V' => array(
+                                         'width'  => 163,
+                                         'height' => 182,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH2101V' => array(
+                                          'width'  => 800,
+                                          'height' => 600,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'T2101V' => array(
+                                         'width'  => 176,
+                                         'height' => 144,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+
+                       // i-mode compliant HTML 4.0
+                       'D504I' => array(
+                                        'width'  => 132,
+                                        'height' => 144,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F504I' => array(
+                                        'width'  => 132,
+                                        'height' => 136,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F504IS' => array(
+                                         'width'  => 132,
+                                         'height' => 136,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'N504I' => array(
+                                        'width'  => 160,
+                                        'height' => 180,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N504IS' => array(
+                                         'width'  => 160,
+                                         'height' => 180,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SO504I' => array(
+                                         'width'  => 120,
+                                         'height' => 112,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'P504I' => array(
+                                        'width'  => 132,
+                                        'height' => 144,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P504IS' => array(
+                                         'width'  => 132,
+                                         'height' => 144,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'D251I' => array(
+                                        'width'  => 132,
+                                        'height' => 144,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D251IS' => array(
+                                         'width'  => 132,
+                                         'height' => 144,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F251I' => array(
+                                        'width'  => 132,
+                                        'height' => 140,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N251I' => array(
+                                        'width'  => 132,
+                                        'height' => 140,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N251IS' => array(
+                                         'width'  => 132,
+                                         'height' => 140,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'P251IS' => array(
+                                         'width'  => 132,
+                                         'height' => 144,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'F671IS' => array(
+                                         'width'  => 160,
+                                         'height' => 120,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'F212I' => array(
+                                        'width'  => 132,
+                                        'height' => 136,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'SO212I' => array(
+                                         'width'  => 120,
+                                         'height' => 112,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'F661I' => array(
+                                        'width'  => 132,
+                                        'height' => 136,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F672I' => array(
+                                        'width'  => 160,
+                                        'height' => 120,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'SO213I' => array(
+                                         'width'  => 120,
+                                         'height' => 112,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SO213IS' => array(
+                                          'width'  => 120,
+                                          'height' => 112,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'SO213IWR' => array(
+                                           'width'  => 120,
+                                           'height' => 112,
+                                           'depth'  => 65536,
+                                           'color'  => 1
+                                           ),
+
+                       // i-mode compliant HTML 4.0
+                       // (FOMA 2051/2102V/2701 etc.)
+                       'F2051' => array(
+                                        'width'  => 176,
+                                        'height' => 182,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N2051' => array(
+                                        'width'  => 176,
+                                        'height' => 198,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P2102V' => array(
+                                         'width'  => 176,
+                                         'height' => 198,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P2102V' => array(
+                                         'width'  => 176,
+                                         'height' => 198,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F2102V' => array(
+                                         'width'  => 176,
+                                         'height' => 182,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'N2102V' => array(
+                                         'width'  => 176,
+                                         'height' => 198,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'N2701' => array(
+                                        'width'  => 176,
+                                        'height' => 198,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'NM850IG' => array(
+                                          'width'  => 176,
+                                          'height' => 144,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'NM705I' => array(
+                                         'width'  => 231,
+                                         'height' => 235,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'NM706I' => array(
+                                         'width'  => 231,
+                                         'height' => 235,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+
+                       // i-mode compliant HTML 5.0 (505i etc.)
+                       'D505I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SO505I' => array(
+                                         'width'  => 256,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH505I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N505I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F505I' => array(
+                                        'width'  => 240,
+                                        'height' => 268,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P505I' => array(
+                                        'width'  => 240,
+                                        'height' => 266,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'D505IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P505IS' => array(
+                                         'width'  => 240,
+                                         'height' => 266,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'N505IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SO505IS' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'SH505IS' => array(
+                                          'width'  => 240,
+                                          'height' => 252,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F505IGPS' => array(
+                                           'width'  => 240,
+                                           'height' => 268,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'D252I' => array(
+                                        'width'  => 176,
+                                        'height' => 198,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH252I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P252I' => array(
+                                        'width'  => 132,
+                                        'height' => 144,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N252I' => array(
+                                        'width'  => 132,
+                                        'height' => 140,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P252IS' => array(
+                                         'width'  => 132,
+                                         'height' => 144,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'D506I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F506I' => array(
+                                        'width'  => 240,
+                                        'height' => 268,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N506I' => array(
+                                        'width'  => 240,
+                                        'height' => 295,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P506IC' => array(
+                                         'width'  => 240,
+                                         'height' => 266,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SH506IC' => array(
+                                          'width'  => 240,
+                                          'height' => 252,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'SO506IC' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'N506IS' => array(
+                                         'width'  => 240,
+                                         'height' => 295,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SO506I' => array(
+                                         'width'  => 240,
+                                         'height' => 256,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SO506IS' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'N506IS2' => array(
+                                          'width'  => 240,
+                                          'height' => 295,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'P506ICII' => array(
+                                           'width'  => 240,
+                                           'height' => 266,
+                                           'depth'  => 65536,
+                                           'color'  => 1
+                                           ),
+                       'D253I' => array(
+                                        'width'  => 176,
+                                        'height' => 198,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N253I' => array(
+                                        'width'  => 160,
+                                        'height' => 180,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P253I' => array(
+                                        'width'  => 132,
+                                        'height' => 144,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'D253IWM' => array(
+                                          'width'  => 220,
+                                          'height' => 144,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'P253IS' => array(
+                                         'width'  => 132,
+                                         'height' => 144,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'P213I' => array(
+                                        'width'  => 132,
+                                        'height' => 144,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+
+                       // i-mode compliant HTML 5.0
+                       // (FOMA 900i etc.)
+                       'F900I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N900I' => array(
+                                        'width'  => 240,
+                                        'height' => 269,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P900I' => array(
+                                        'width'  => 240,
+                                        'height' => 266,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'SH900I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F900IT' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P900IV' => array(
+                                         'width'  => 240,
+                                         'height' => 266,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N900IS' => array(
+                                         'width'  => 240,
+                                         'height' => 269,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'D900I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F900IC' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F880IES' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'N900IL' => array(
+                                         'width'  => 240,
+                                         'height' => 269,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'N900IG' => array(
+                                         'width'  => 240,
+                                         'height' => 269,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SH901IC' => array(
+                                          'width'  => 240,
+                                          'height' => 252,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F901IC' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N901IC' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'D901I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P901I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F700I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH700I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N700I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P700I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F700IS' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH700IS' => array(
+                                          'width'  => 240,
+                                          'height' => 252,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'SA700IS' => array(
+                                          'width'  => 240,
+                                          'height' => 252,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+
+                       'SH901IS' => array(
+                                          'width'  => 240,
+                                          'height' => 252,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F901IS' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'D901IS' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P901IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'N901IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'P901ITV' => array(
+                                          'width'  => 240,
+                                          'height' => 270,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'SH851I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P851I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F881IES' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'D701I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N701I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'P701ID' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'D701IWM' => array(
+                                          'width'  => 230,
+                                          'height' => 240,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'N701IECO' => array(
+                                           'width'  => 240,
+                                           'height' => 270,
+                                           'depth'  => 65536,
+                                           'color'  => 1
+                                           ),
+                       'SA800I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'L600I' => array(
+                                        'width'  => 170,
+                                        'height' => 189,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'N600I' => array(
+                                        'width'  => 176,
+                                        'height' => 180,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'L601I' => array(
+                                        'width'  => 170,
+                                        'height' => 189,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'M702IS' => array(
+                                         'width'  => 240,
+                                         'height' => 267,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'M702IG' => array(
+                                         'width'  => 240,
+                                         'height' => 267,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'L602I' => array(
+                                        'width'  => 170,
+                                        'height' => 189,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+
+                       // i-mode compliant HTML 6.0
+                       // (FOMA 902i etc.)
+                       'F902I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D902I' => array(
+                                        'width'  => 230,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N902I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P902I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH902I' => array(
+                                         'width'  => 240,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SO902I' => array(
+                                         'width'  => 240,
+                                         'height' => 256,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH902IS' => array(
+                                          'width'  => 240,
+                                          'height' => 240,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'P902IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N902IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'D902IS' => array(
+                                         'width'  => 230,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F902IS' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SO902IWP+' => array(
+                                            'width'  => 240,
+                                            'height' => 256,
+                                            'depth'  => 262144,
+                                            'color'  => 1
+                                            ),
+                       'SH902ISL' => array(
+                                           'width'  => 240,
+                                           'height' => 240,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'N902IX' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N902IL' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P702I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N702ID' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'F702ID' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH702ID' => array(
+                                          'width'  => 240,
+                                          'height' => 240,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'D702I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SO702I' => array(
+                                         'width'  => 240,
+                                         'height' => 256,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'D702IBCL' => array(
+                                           'width'  => 230,
+                                           'height' => 240,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'SA702I' => array(
+                                         'width'  => 240,
+                                         'height' => 252,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'SH702IS' => array(
+                                          'width'  => 240,
+                                          'height' => 240,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'N702IS' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'P702ID' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'D702IF' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'D851IWM' => array(
+                                          'width'  => 230,
+                                          'height' => 320,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F882IES' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'N601I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'D800IDS' => array(
+                                          'width'  => 230,
+                                          'height' => 240,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'P703IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 270,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'F883I' => array(
+                                        'width'  => 240,
+                                        'height' => 256,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F883IS' => array(
+                                         'width'  => 240,
+                                         'height' => 256,
+                                         'depth'  => 65536,
+                                         'color'  => 1
+                                         ),
+                       'P704IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 270,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'L704I' => array(
+                                        'width'  => 240,
+                                        'height' => 280,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'L705I' => array(
+                                        'width'  => 240,
+                                        'height' => 280,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'L705IX' => array(
+                                         'width'  => 240,
+                                         'height' => 280,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'L852I' => array(
+                                        'width'  => 240,
+                                        'height' => 298,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'L706IE' => array(
+                                         'width'  => 240,
+                                         'height' => 280,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'L01A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'L03A' => array(
+                                       'width'  => 240,
+                                       'height' => 280,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+
+                       // i-mode compliant HTML 7.0
+                       // (FOMA 903i etc.)
+                       'SH903I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P903I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N903I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D903I' => array(
+                                        'width'  => 230,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F903I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SO903I' => array(
+                                         'width'  => 240,
+                                         'height' => 368,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'D903ITV' => array(
+                                          'width'  => 230,
+                                          'height' => 320,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F903IX' => array(
+                                         'width'  => 230,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P903ITV' => array(
+                                          'width'  => 240,
+                                          'height' => 350,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'SH903ITV' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'F903IBSC' => array(
+                                           'width'  => 230,
+                                           'height' => 240,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'P903IX' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SO903ITV' => array(
+                                           'width'  => 240,
+                                           'height' => 368,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'N703ID' => array(
+                                         'width'  => 240,
+                                         'height' => 270,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F703I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P703I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D703I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH703I' => array(
+                                         'width'  => 240,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH703I' => array(
+                                         'width'  => 240,
+                                         'height' => 240,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N703IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 270,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'SO703I' => array(
+                                         'width'  => 240,
+                                         'height' => 368,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P904I' => array(
+                                        'width'  => 240,
+                                        'height' => 350,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D904I' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F904I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N904I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH904I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P704I' => array(
+                                        'width'  => 240,
+                                        'height' => 270,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D704I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH704I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N704IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 270,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'F704I' => array(
+                                        'width'  => 230,
+                                        'height' => 240,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SO704I' => array(
+                                         'width'  => 240,
+                                         'height' => 368,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'F883IES' => array(
+                                          'width'  => 240,
+                                          'height' => 256,
+                                          'depth'  => 65536,
+                                          'color'  => 1
+                                          ),
+                       'F883IESS' => array(
+                                           'width'  => 240,
+                                           'height' => 256,
+                                           'depth'  => 65536,
+                                           'color'  => 1
+                                           ),
+                       'F801I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 65536,
+                                        'color'  => 1
+                                        ),
+                       'F705I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D705I' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'D705IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 240,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'SH705I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH705I2' => array(
+                                          'width'  => 240,
+                                          'height' => 320,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'SH706IE' => array(
+                                          'width'  => 240,
+                                          'height' => 320,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F05A' => array(
+                                       'width'  => 240,
+                                       'height' => 352,
+                                       'depth'  => 65536,
+                                       'color'  => 1
+                                       ),
+ 
+                       // i-mode compliant HTML 7.1
+                       // (FOMA 905i etc.)
+                       'SH905I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'D905I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N905I' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P905I' => array(
+                                        'width'  => 240,
+                                        'height' => 350,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F905I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'SO905I' => array(
+                                         'width'  => 240,
+                                         'height' => 368,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'N905IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'N905IBIZ' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'SH905ITV' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 16777216,
+                                           'color'  => 1
+                                           ),
+                       'SO905ICS' => array(
+                                           'width'  => 240,
+                                           'height' => 368,
+                                           'depth'  => 16777216,
+                                           'color'  => 1
+                                           ),
+                       'F905IBIZ' => array(
+                                           'width'  => 240,
+                                           'height' => 352,
+                                           'depth'  => 16777216,
+                                           'color'  => 1
+                                           ),
+                       'P905ITV' => array(
+                                          'width'  => 240,
+                                          'height' => 350,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'P705I' => array(
+                                        'width'  => 240,
+                                        'height' => 350,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N705I' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N705IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'P705IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 350,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'SO705I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P705ICL' => array(
+                                          'width'  => 240,
+                                          'height' => 350,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'F884I' => array(
+                                        'width'  => 240,
+                                        'height' => 364,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F884IES' => array(
+                                          'width'  => 240,
+                                          'height' => 282,
+                                          'depth'  => 262144,
+                                          'color'  => 1
+                                          ),
+                       'N906IL' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N706I' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SO706I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'P706IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 350,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'N706IE' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N706I2' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'N03A' => array(
+                                       'width'  => 240,
+                                       'height' => 320,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'N05A' => array(
+                                       'width'  => 240,
+                                       'height' => 320,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'F07A' => array(
+                                       'width'  => 240,
+                                       'height' => 256,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+
+                       // i-mode compliant HTML 7.2
+                       // (FOMA 906i etc.)
+                       'P906I' => array(
+                                        'width'  => 240,
+                                        'height' => 350,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SO906I' => array(
+                                         'width'  => 240,
+                                         'height' => 368,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'SH906I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'N906IMYU' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 262144,
+                                           'color'  => 1
+                                           ),
+                       'F906I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'N906I' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH906ITV' => array(
+                                           'width'  => 240,
+                                           'height' => 320,
+                                           'depth'  => 16777216,
+                                           'color'  => 1
+                                           ),
+                       'F706I' => array(
+                                        'width'  => 240,
+                                        'height' => 352,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'SH706I' => array(
+                                         'width'  => 240,
+                                         'height' => 320,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'P706IE' => array(
+                                         'width'  => 240,
+                                         'height' => 350,
+                                         'depth'  => 262144,
+                                         'color'  => 1
+                                         ),
+                       'SH706IW' => array(
+                                          'width'  => 240,
+                                          'height' => 320,
+                                          'depth'  => 16777216,
+                                          'color'  => 1
+                                          ),
+                       'F01A' => array(
+                                       'width'  => 240,
+                                       'height' => 352,
+                                       'depth'  => 16777216,
+                                       'color'  => 1
+                                       ),
+                       'F02A' => array(
+                                       'width'  => 240,
+                                       'height' => 352,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'F03A' => array(
+                                       'width'  => 240,
+                                       'height' => 352,
+                                       'depth'  => 16777216,
+                                       'color'  => 1
+                                       ),
+                       'F04A' => array(
+                                       'width'  => 240,
+                                       'height' => 352,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'F06A' => array(
+                                       'width'  => 240,
+                                       'height' => 352,
+                                       'depth'  => 16777216,
+                                       'color'  => 1
+                                       ), 
+                       'P01A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'P02A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'P03A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'P04A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'P05A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'P06A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'P10A' => array(
+                                       'width'  => 240,
+                                       'height' => 350,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'SH01A' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'SH02A' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'SH03A' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'SH04A' => array(
+                                        'width'  => 240,
+                                        'height' => 320,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'N01A' => array(
+                                       'width'  => 240,
+                                       'height' => 320,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'N02A' => array(
+                                       'width'  => 240,
+                                       'height' => 320,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+                       'N04A' => array(
+                                       'width'  => 240,
+                                       'height' => 320,
+                                       'depth'  => 262144,
+                                       'color'  => 1
+                                       ),
+
+                       // i-mode browser 2.0
+                       'P07A3' => array(
+                                        'width'  => 480,
+                                        'height' => 662,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P08A3' => array(
+                                        'width'  => 480,
+                                        'height' => 662,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'P09A3' => array(
+                                        'width'  => 480,
+                                        'height' => 662,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N06A3' => array(
+                                        'width'  => 480,
+                                        'height' => 640,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N08A3' => array(
+                                        'width'  => 480,
+                                        'height' => 640,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'N09A3' => array(
+                                        'width'  => 480,
+                                        'height' => 640,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F08A3' => array(
+                                        'width'  => 480,
+                                        'height' => 648,
+                                        'depth'  => 262144,
+                                        'color'  => 1
+                                        ),
+                       'F09A3' => array(
+                                        'width'  => 480,
+                                        'height' => 648,
+                                        'depth'  => 16777216,
+                                        'color'  => 1
+                                        ),
+                       'SH05A3' => array(
+                                         'width'  => 480,
+                                         'height' => 592,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'SH06A3' => array(
+                                         'width'  => 480,
+                                         'height' => 592,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         ),
+                       'SH07A3' => array(
+                                         'width'  => 480,
+                                         'height' => 592,
+                                         'depth'  => 16777216,
+                                         'color'  => 1
+                                         )
+                       );
+
+    /**#@-*/
+
+    /**#@+
+     * @access public
+     */
+
+    // }}}
+    // {{{ singleton()
+
+    /**
+     * Returns the Net_UserAgent_Mobile_DoCoMo_Screen instance if it exists. If it
+     * not exists, a new instance of Net_UserAgent_Mobile_DoCoMo_Screen will be
+     * created and returned.
+     *
+     * @return Net_UserAgent_Mobile_DoCoMo_ScreenInfo
+     * @static
+     */
+    function &singleton()
+    {
+        if (@is_null($GLOBALS['NET_USERAGENT_MOBILE_DoCoMo_ScreenInfo_Instance'])) {
+            $GLOBALS['NET_USERAGENT_MOBILE_DoCoMo_ScreenInfo_Instance'] = &new Net_UserAgent_Mobile_DoCoMo_ScreenInfo();
+        }
+
+        return $GLOBALS['NET_USERAGENT_MOBILE_DoCoMo_ScreenInfo_Instance'];
+    }
+
+    // }}}
+    // {{{ get()
+
+    /**
+     * Gets the screen information of a given model.
+     *
+     * @param string $model
+     * @return array
+     */
+    function get($model)
+    {
+        return $this->_data[ strtoupper($model) ];
+    }
+
+    /**#@-*/
+
+    /**#@+
+     * @access private
+     */
+
+    // }}}
+    // {{{ constructor
+
+    /**
+     * Creates the screen information by a given XML file if DOCOMO_MAP environment
+     * variable exists.
+     */
+    function Net_UserAgent_Mobile_DoCoMo_ScreenInfo()
+    {
+        if (!array_key_exists('DOCOMO_MAP', $_SERVER)) {
+            return;
+        }
+
+        // using the specified XML data
+        do {
+            if (!function_exists('xml_parser_create')
+                || !is_readable($_SERVER['DOCOMO_MAP'])
+                ) {
+                break;
+            }
+
+            $xml = file_get_contents($_SERVER['DOCOMO_MAP']);
+            if ($xml === false) {
+                break;
+            }
+
+            $parser = xml_parser_create();
+            if ($parser === false) {
+                break;
+            }
+
+            xml_parse_into_struct($parser, $xml, $values, $indexes);
+            if (!xml_parser_free($parser)) {
+                break;
+            }
+
+            if (array_key_exists('OPT', $indexes)) {
+                unset($indexes['OPT']);
+            }
+
+            $data = array();
+            foreach ($indexes as $modelName => $modelIndexes) {
+                $data[$modelName] = array();
+                foreach ($values[ $modelIndexes[0] ]['attributes']
+                         as $attributeName => $attributeValue
+                         ) {
+                    $data[$modelName][ strtolower($attributeName) ] = $attributeValue;
+                }
+            }
+
+            $this->_data = $data;
+        } while (false);
+    }
+
+    /**#@-*/
+
+    // }}}
+}
+
+// }}}
+
+/*
+ * Local Variables:
+ * mode: php
+ * coding: iso-8859-1
+ * tab-width: 4
+ * c-basic-offset: 4
+ * c-hanging-comment-ender-p: nil
+ * indent-tabs-mode: nil
+ * End:
+ */
Index: /branches/comu-ver2/data/module/Net/UserAgent/Mobile/EZweb.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/EZweb.php	(revision 17140)
+++ /branches/comu-ver2/data/module/Net/UserAgent/Mobile/EZweb.php	(revision 18188)
@@ -5,19 +5,36 @@
  * PHP versions 4 and 5
  *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
+ * Copyright (c) 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
  *
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
  * @version    CVS: $Id$
  * @link       http://www.au.kddi.com/ezfactory/tec/spec/4_4.html
  * @link       http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html
- * @see        Net_UserAgent_Mobile_Common
  * @since      File available since Release 0.1.0
  */
@@ -31,7 +48,6 @@
  * EZweb implementation
  *
- * Net_UserAgent_Mobile_EZweb is a subclass of
- * {@link Net_UserAgent_Mobile_Common}, which implements EZweb (WAP1.0/2.0)
- * user agents.
+ * Net_UserAgent_Mobile_EZweb is a subclass of {@link Net_UserAgent_Mobile_Common},
+ * which implements EZweb (WAP1.0/2.0) user agents.
  *
  * SYNOPSIS:
@@ -58,11 +74,10 @@
  * @category   Networking
  * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
+ * @author     KUBO Atsuhiro <kubo@iteman.jp>
+ * @copyright  2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
+ * @license    http://www.opensource.org/licenses/bsd-license.php  New BSD License
+ * @version    Release: 1.0.0
  * @link       http://www.au.kddi.com/ezfactory/tec/spec/4_4.html
  * @link       http://www.au.kddi.com/ezfactory/tec/spec/new_win/ezkishu.html
- * @see        Net_UserAgent_Mobile_Common
  * @since      Class available since Release 0.1.0
  */
@@ -157,7 +172,7 @@
             // KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
             $this->_xhtmlCompliant = true;
-            list($this->_rawModel, $browser, $opt, $this->_serverName) =
+            @list($this->_rawModel, $browser, $opt, $this->_serverName) =
                 explode(' ', $matches[1], 4);
-            list($this->name, $version) = explode('/', $browser);
+            @list($this->name, $version) = explode('/', $browser);
             $this->version = "$version $opt";
         } else {
@@ -166,10 +181,8 @@
             @list($browser, $this->_serverName, $comment) =
                 explode(' ', $userAgent, 3);
-            list($this->name, $software) = explode('/', $browser);
-            list($this->version, $this->_rawModel) =
-                explode('-', $software);
+            @list($this->name, $software) = explode('/', $browser);
+            @list($this->version, $this->_rawModel) = explode('-', $software);
             if ($comment) {
-                $this->_comment =
-                    preg_replace('/^\((.*)\)$/', '$1', $comment);
+                $this->_comment = preg_replace('/^\((.*)\)$/', '$1', $comment);
             }
         }
@@ -182,7 +195,5 @@
      * create a new {@link Net_UserAgent_Mobile_Display} class instance
      *
-     * @return object a newly created {@link Net_UserAgent_Mobile_Display}
-     *     object
-     * @see Net_UserAgent_Mobile_Display
+     * @return Net_UserAgent_Mobile_Display
      */
     function makeDisplay()
@@ -190,15 +201,11 @@
         @list($width, $height) =
             explode(',', $this->getHeader('X-UP-DEVCAP-SCREENPIXELS'));
-        $screenDepth =
-            explode(',', $this->getHeader('X-UP-DEVCAP-SCREENDEPTH'));
+        $screenDepth = explode(',', $this->getHeader('X-UP-DEVCAP-SCREENDEPTH'));
         $depth = $screenDepth[0] ? pow(2, (integer)$screenDepth[0]) : 0;
-        $color =
-            $this->getHeader('X-UP-DEVCAP-ISCOLOR') === '1' ? true : false;
-        return new Net_UserAgent_Mobile_Display(array(
-                                                      'width'  => $width,
+        $color = $this->getHeader('X-UP-DEVCAP-ISCOLOR') === '1' ? true : false;
+        return new Net_UserAgent_Mobile_Display(array('width'  => $width,
                                                       'height' => $height,
                                                       'color'  => $color,
-                                                      'depth'  => $depth
-                                                      )
+                                                      'depth'  => $depth)
                                                 );
     }
@@ -293,4 +300,20 @@
     {
         return substr($this->_rawModel, 2, 1) == 3 ? true : false;
+    }
+
+    // }}}
+    // {{{ getUID()
+
+    /**
+     * Gets the UID of a subscriber.
+     *
+     * @return string
+     * @since Method available since Release 1.0.0RC1
+     */
+    function getUID()
+    {
+        if (array_key_exists('HTTP_X_UP_SUBNO', $_SERVER)) {
+            return $_SERVER['HTTP_X_UP_SUBNO'];
+        }
     }
 
Index: anches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMoDisplayMap.php
===================================================================
--- /branches/comu-ver2/data/module/Net/UserAgent/Mobile/DoCoMoDisplayMap.php	(revision 17140)
+++ 	(revision )
@@ -1,1689 +1,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-
-/**
- * PHP versions 4 and 5
- *
- * LICENSE: This source file is subject to version 3.0 of the PHP license
- * that is available through the world-wide-web at the following URI:
- * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
- * the PHP License and are unable to obtain it through the web, please
- * send a note to license@php.net so we can mail you a copy immediately.
- *
- * @category   Networking
- * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    CVS: $Id$
- * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
- * @see        Net_UserAgent_Mobile_Display
- * @since      File available since Release 0.1
- */
-
-// {{{ Net_UserAgent_Mobile_DoCoMoDisplayMap
-
-/**
- * Display information mapping for DoCoMo.
- *
- * @category   Networking
- * @package    Net_UserAgent_Mobile
- * @author     KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @copyright  2003-2008 KUBO Atsuhiro <iteman@users.sourceforge.net>
- * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
- * @version    Release: 0.31.0
- * @link       http://www.nttdocomo.co.jp/service/imode/make/content/spec/screen_area/index.html
- * @see        Net_UserAgent_Mobile_Display
- * @since      Class available since Release 0.1
- */
-class Net_UserAgent_Mobile_DoCoMoDisplayMap
-{
-
-    // {{{ properties
-
-    /**#@+
-     * @access public
-     */
-
-    /**#@-*/
-
-    /**#@+
-     * @access private
-     */
-
-    /**#@-*/
-
-    /**#@+
-     * @access public
-     */
-
-    // }}}
-    // {{{ get()
-
-    /**
-     * Returns the display information of the model.
-     *
-     * @param string $model the name of the model
-     * @return array
-     * @static
-     */
-    function get($model)
-    {
-        static $displayMap;
-        if (!isset($displayMap)) {
-            if (isset($_SERVER['DOCOMO_MAP'])) {
-
-                // using the specified XML data
-                while (true) {
-                    if (!function_exists('xml_parser_create')
-                        || !is_readable($_SERVER['DOCOMO_MAP'])
-                        ) {
-                        break;
-                    }
-                    $xml = file_get_contents($_SERVER['DOCOMO_MAP']);
-                    $parser = xml_parser_create();
-                    if ($parser === false) {
-                        break;
-                    }
-                    xml_parse_into_struct($parser, $xml, $values, $indexes);
-                    if (!xml_parser_free($parser)) {
-                        break;
-                    }
-                    if (isset($indexes['OPT'])) {
-                        unset($indexes['OPT']);
-                    }
-                    foreach ($indexes as $modelName => $modelIndexes) {
-                        $displayMap[$modelName] = array();
-                        foreach ($values[ $modelIndexes[0] ]['attributes'] as $attributeName => $attributeValue) {
-                            $displayMap[$modelName][ strtolower($attributeName) ] = $attributeValue;
-                        }
-                    }
-                    break;
-                }
-            }
-
-            if (!isset($displayMap)) {
-                $displayMap = array(
-
-                                    // i-mode compliant HTML 1.0
-                                    'D501I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 72,
-                                                     'depth'  => 2,
-                                                     'color'  => 0
-                                                     ),
-                                    'F501I' => array(
-                                                     'width'  => 112,
-                                                     'height' => 84,
-                                                     'depth'  => 2,
-                                                     'color'  => 0
-                                                     ),
-                                    'N501I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 2,
-                                                     'color'  => 0
-                                                     ),
-                                    'P501I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 120,
-                                                     'depth'  => 2,
-                                                     'color'  => 0
-                                                     ),
-
-                                    // i-mode compliant HTML 2.0
-                                    'D502I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 90,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'F502I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 91,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'N502I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'P502I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 117,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'NM502I' => array(
-                                                      'width'  => 111,
-                                                      'height' => 106,
-                                                      'depth'  => 2,
-                                                      'color'  => 0
-                                                      ),
-                                    'SO502I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 120,
-                                                      'depth'  => 4,
-                                                      'color'  => 0
-                                                      ),
-                                    'F502IT' => array(
-                                                      'width'  => 96,
-                                                      'height' => 91,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'N502IT' => array(
-                                                      'width'  => 118,
-                                                      'height' => 128,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO502IWM' => array(
-                                                        'width'  => 120,
-                                                        'height' => 113,
-                                                        'depth'  => 256,
-                                                        'color'  => 1
-                                                        ),
-                                    'SH821I' => array(
-                                                      'width'  => 96,
-                                                      'height' => 78,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'N821I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'P821I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'D209I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 90,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'ER209I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 72,
-                                                      'depth'  => 2,
-                                                      'color'  => 0
-                                                      ),
-                                    'F209I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 91,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'KO209I' => array(
-                                                      'width'  => 96,
-                                                      'height' => 96,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'N209I' => array(
-                                                     'width'  => 108,
-                                                     'height' => 82,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'P209I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 87,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'P209IS' => array(
-                                                      'width'  => 96,
-                                                      'height' => 87,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'R209I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 72,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'P651PS' => array(
-                                                      'width'  => 96,
-                                                      'height' => 87,
-                                                      'depth'  => 4,
-                                                      'color'  => 0
-                                                      ),
-                                    'R691I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 72,
-                                                     'depth'  => 4,
-                                                     'color'  => 0
-                                                     ),
-                                    'F671I' => array(
-                                                     'width'  => 120,
-                                                     'height' => 126,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'F210I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 113,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'N210I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 113,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'P210I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 91,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'KO210I' => array(
-                                                      'width'  => 96,
-                                                      'height' => 96,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-
-                                    // i-mode compliant HTML 3.0
-                                    'F503I' => array(
-                                                     'width'  => 120,
-                                                     'height' => 130,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'F503IS' => array(
-                                                      'width'  => 120,
-                                                      'height' => 130,
-                                                      'depth'  => 4096,
-                                                      'color'  => 1
-                                                      ),
-                                    'P503I' => array(
-                                                     'width'  => 120,
-                                                     'height' => 130,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'P503IS' => array(
-                                                      'width'  => 120,
-                                                      'height' => 130,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'N503I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'N503IS' => array(
-                                                      'width'  => 118,
-                                                      'height' => 128,
-                                                      'depth'  => 4096,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO503I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 113,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO503IS' => array(
-                                                       'width'  => 120,
-                                                       'height' => 113,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'D503I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 126,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'D503IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 126,
-                                                      'depth'  => 4096,
-                                                      'color'  => 1
-                                                      ),
-                                    'D210I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 91,
-                                                     'depth'  => 256,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO210I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 113,
-                                                      'depth'  => 256,
-                                                      'color'  => 1
-                                                      ),
-                                    'F211I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 113,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'D211I' => array(
-                                                     'width'  => 100,
-                                                     'height' => 91,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'N211I' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'N211IS' => array(
-                                                      'width'  => 118,
-                                                      'height' => 128,
-                                                      'depth'  => 4096,
-                                                      'color'  => 1
-                                                      ),
-                                    'P211I' => array(
-                                                     'width'  => 120,
-                                                     'height' => 130,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P211IS' => array(
-                                                      'width'  => 120,
-                                                      'height' => 130,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO211I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 112,
-                                                      'depth'  => 4096,
-                                                      'color'  => 1
-                                                      ),
-                                    'R211I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 98,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH251I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 130,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH251IS' => array(
-                                                       'width'  => 176,
-                                                       'height' => 187,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'R692I' => array(
-                                                     'width'  => 96,
-                                                     'height' => 98,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-
-                                    // i-mode compliant HTML 3.0
-                                    // (FOMA 2001/2002/2101V)
-                                    'N2001' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 4096,
-                                                     'color'  => 1
-                                                     ),
-                                    'N2002' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P2002' => array(
-                                                     'width'  => 118,
-                                                     'height' => 128,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'D2101V' => array(
-                                                      'width'  => 120,
-                                                      'height' => 130,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P2101V' => array(
-                                                      'width'  => 163,
-                                                      'height' => 182,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH2101V' => array(
-                                                       'width'  => 800,
-                                                       'height' => 600,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'T2101V' => array(
-                                                      'width'  => 176,
-                                                      'height' => 144,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-
-                                    // i-mode compliant HTML 4.0
-                                    'D504I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 144,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F504I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 136,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'F504IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 136,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'N504I' => array(
-                                                     'width'  => 160,
-                                                     'height' => 180,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N504IS' => array(
-                                                      'width'  => 160,
-                                                      'height' => 180,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO504I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 112,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'P504I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 144,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P504IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 144,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'D251I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 144,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D251IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 144,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F251I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 140,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N251I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 140,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N251IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 140,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'P251IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 144,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'F671IS' => array(
-                                                      'width'  => 160,
-                                                      'height' => 120,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'F212I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 136,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO212I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 112,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'F661I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 136,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'F672I' => array(
-                                                     'width'  => 160,
-                                                     'height' => 120,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO213I' => array(
-                                                      'width'  => 120,
-                                                      'height' => 112,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO213IS' => array(
-                                                       'width'  => 120,
-                                                       'height' => 112,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'SO213IWR' => array(
-                                                        'width'  => 120,
-                                                        'height' => 112,
-                                                        'depth'  => 65536,
-                                                        'color'  => 1
-                                                        ),
-
-                                    // i-mode compliant HTML 4.0
-                                    // (FOMA 2051/2102V/2701 etc.)
-                                    'F2051' => array(
-                                                     'width'  => 176,
-                                                     'height' => 182,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N2051' => array(
-                                                     'width'  => 176,
-                                                     'height' => 198,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P2102V' => array(
-                                                      'width'  => 176,
-                                                      'height' => 198,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P2102V' => array(
-                                                      'width'  => 176,
-                                                      'height' => 198,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F2102V' => array(
-                                                      'width'  => 176,
-                                                      'height' => 182,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'N2102V' => array(
-                                                      'width'  => 176,
-                                                      'height' => 198,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'N2701' => array(
-                                                     'width'  => 176,
-                                                     'height' => 198,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'NM850IG' => array(
-                                                       'width'  => 176,
-                                                       'height' => 144,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-
-                                    // i-mode compliant HTML 5.0 (505i etc.)
-                                    'D505I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO505I' => array(
-                                                      'width'  => 256,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH505I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N505I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F505I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 268,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'P505I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 266,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'D505IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P505IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 266,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'N505IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO505IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'SH505IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 252,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'F505IGPS' => array(
-                                                        'width'  => 240,
-                                                        'height' => 268,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'D252I' => array(
-                                                     'width'  => 176,
-                                                     'height' => 198,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH252I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P252I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 144,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N252I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 140,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P252IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 144,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'D506I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F506I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 268,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N506I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 295,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'P506IC' => array(
-                                                      'width'  => 240,
-                                                      'height' => 266,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH506IC' => array(
-                                                       'width'  => 240,
-                                                       'height' => 252,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'SO506IC' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'N506IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 295,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO506I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 256,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO506IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'N506IS2' => array(
-                                                       'width'  => 240,
-                                                       'height' => 295,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'P506ICII' => array(
-                                                        'width'  => 240,
-                                                        'height' => 266,
-                                                        'depth'  => 65536,
-                                                        'color'  => 1
-                                                        ),
-                                    'D253I' => array(
-                                                     'width'  => 176,
-                                                     'height' => 198,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N253I' => array(
-                                                     'width'  => 160,
-                                                     'height' => 180,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P253I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 144,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'D253IWM' => array(
-                                                       'width'  => 220,
-                                                       'height' => 144,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'P253IS' => array(
-                                                      'width'  => 132,
-                                                      'height' => 144,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'P213I' => array(
-                                                     'width'  => 132,
-                                                     'height' => 144,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-
-                                    // i-mode compliant HTML 5.0
-                                    // (FOMA 900i etc.)
-                                    'F900I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N900I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 269,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P900I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 266,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH900I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F900IT' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P900IV' => array(
-                                                      'width'  => 240,
-                                                      'height' => 266,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N900IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 269,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'D900I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F900IC' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F880IES' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'N900IL' => array(
-                                                      'width'  => 240,
-                                                      'height' => 269,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'N900IG' => array(
-                                                      'width'  => 240,
-                                                      'height' => 269,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH901IC' => array(
-                                                       'width'  => 240,
-                                                       'height' => 252,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'F901IC' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N901IC' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'D901I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'P901I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'F700I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH700I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N700I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P700I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'F700IS' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH700IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 252,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'SA700IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 252,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-
-                                    'SH901IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 252,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'F901IS' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'D901IS' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P901IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'N901IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'P901ITV' => array(
-                                                       'width'  => 240,
-                                                       'height' => 270,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'SH851I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P851I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'F881IES' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'D701I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N701I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P701ID' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'D701IWM' => array(
-                                                       'width'  => 230,
-                                                       'height' => 240,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'N701IECO' => array(
-                                                        'width'  => 240,
-                                                        'height' => 270,
-                                                        'depth'  => 65536,
-                                                        'color'  => 1
-                                                        ),
-                                    'SA800I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'L600I' => array(
-                                                     'width'  => 170,
-                                                     'height' => 189,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'N600I' => array(
-                                                     'width'  => 176,
-                                                     'height' => 180,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'L601I' => array(
-                                                     'width'  => 170,
-                                                     'height' => 189,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'M702IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 267,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'M702IG' => array(
-                                                      'width'  => 240,
-                                                      'height' => 267,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'L602I' => array(
-                                                      'width'  => 170,
-                                                      'height' => 189,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-
-                                    // i-mode compliant HTML 6.0
-                                    // (FOMA 902i etc.)
-                                    'F902I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D902I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 320,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N902I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'P902I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH902I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO902I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 256,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH902IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 240,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'P902IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N902IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'D902IS' => array(
-                                                      'width'  => 230,
-                                                      'height' => 320,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F902IS' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO902IWP+' => array(
-                                                         'width'  => 240,
-                                                         'height' => 256,
-                                                         'depth'  => 262144,
-                                                         'color'  => 1
-                                                         ),
-                                    'SH902ISL' => array(
-                                                        'width'  => 240,
-                                                        'height' => 240,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'N902IX' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N902IL' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P702I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N702ID' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'F702ID' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH702ID' => array(
-                                                       'width'  => 240,
-                                                       'height' => 240,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'D702I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO702I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 256,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'D702IBCL' => array(
-                                                        'width'  => 230,
-                                                        'height' => 240,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'SA702I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 252,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH702IS' => array(
-                                                       'width'  => 240,
-                                                       'height' => 240,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'N702IS' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 65536,
-                                                      'color'  => 1
-                                                      ),
-                                    'P702ID' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'D702IF' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'D851IWM' => array(
-                                                       'width'  => 230,
-                                                       'height' => 320,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'F882IES' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'N601I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'D800IDS' => array(
-                                                       'width'  => 230,
-                                                       'height' => 240,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'P703IMYU' => array(
-                                                        'width'  => 240,
-                                                        'height' => 270,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'F883I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 256,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'P704IMYU' => array(
-                                                        'width'  => 240,
-                                                        'height' => 270,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'L704I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 280,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'L705I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 280,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-
-                                    // i-mode compliant HTML 7.0
-                                    // (FOMA 903i etc.)
-                                    'SH903I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 320,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P903I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N903I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D903I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 320,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F903I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO903I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 368,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'D903ITV' => array(
-                                                       'width'  => 230,
-                                                       'height' => 320,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'F903IX' => array(
-                                                      'width'  => 230,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P903ITV' => array(
-                                                       'width'  => 240,
-                                                       'height' => 350,
-                                                       'depth'  => 262144,
-                                                       'color'  => 1
-                                                       ),
-                                    'SH903ITV' => array(
-                                                        'width'  => 240,
-                                                        'height' => 320,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'F903IBSC' => array(
-                                                        'width'  => 230,
-                                                        'height' => 240,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'P903IX' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SO903ITV' => array(
-                                                        'width'  => 240,
-                                                        'height' => 368,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'N703ID' => array(
-                                                      'width'  => 240,
-                                                      'height' => 270,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F703I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'P703I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D703I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH703I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'SH703I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 240,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N703IMYU' => array(
-                                                        'width'  => 240,
-                                                        'height' => 270,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'SO703I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 368,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P904I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 350,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D904I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 320,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F904I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 352,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N904I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 352,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH904I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 320,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'P704I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 270,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D704I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SH704I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 320,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'N704IMYU' => array(
-                                                        'width'  => 240,
-                                                        'height' => 270,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'F704I' => array(
-                                                     'width'  => 230,
-                                                     'height' => 240,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO704I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 368,
-                                                      'depth'  => 262144,
-                                                      'color'  => 1
-                                                      ),
-                                    'F883IES' => array(
-                                                       'width'  => 240,
-                                                       'height' => 256,
-                                                       'depth'  => 65536,
-                                                       'color'  => 1
-                                                       ),
-                                    'F801I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 352,
-                                                     'depth'  => 65536,
-                                                     'color'  => 1
-                                                     ),
-                                    'F705I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 352,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D705I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 320,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'D705IMYU' => array(
-                                                        'width'  => 240,
-                                                        'height' => 240,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
- 
-                                    // i-mode compliant HTML 7.1
-                                    // (FOMA 905i etc.)
-                                    'SH905I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 320,
-                                                      'depth'  => 16777216,
-                                                      'color'  => 1
-                                                      ),
-                                    'D905I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 352,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N905I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 320,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'P905I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 350,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'F905I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 352,
-                                                     'depth'  => 16777216,
-                                                     'color'  => 1
-                                                     ),
-                                    'SO905I' => array(
-                                                      'width'  => 240,
-                                                      'height' => 368,
-                                                      'depth'  => 16777216,
-                                                      'color'  => 1
-                                                      ),
-                                    'N905IMYU' => array(
-                                                        'width'  => 240,
-                                                        'height' => 320,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'N905IBIZ' => array(
-                                                        'width'  => 240,
-                                                        'height' => 320,
-                                                        'depth'  => 262144,
-                                                        'color'  => 1
-                                                        ),
-                                    'SH905ITV' => array(
-                                                        'width'  => 240,
-                                                        'height' => 320,
-                                                        'depth'  => 16777216,
-                                                        'color'  => 1
-                                                        ),
-                                    'P705I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 350,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     ),
-                                    'N705I' => array(
-                                                     'width'  => 240,
-                                                     'height' => 320,
-                                                     'depth'  => 262144,
-                                                     'color'  => 1
-                                                     )
-                                    );
-            }
-        }
-
-        return @$displayMap[ strtoupper($model) ];
-    }
-
-    /**#@-*/
-
-    /**#@+
-     * @access private
-     */
-
-    /**#@-*/
-
-    // }}}
-}
-
-// }}}
-
-/*
- * Local Variables:
- * mode: php
- * coding: iso-8859-1
- * tab-width: 4
- * c-basic-offset: 4
- * c-hanging-comment-ender-p: nil
- * indent-tabs-mode: nil
- * End:
- */
