[Swift-commit] r4936 - in wwwdev: . about apps case_studies cookbook cookbook/figures css docs downloads images images/orbit images/rotator inc js links main papers support usage usage/charts_library usage/resources usage/resources/button_rollover usage/resources/chart_in_swf usage/resources/cursor usage/resources/full_screen usage/resources/preview_scroll usage/resources/scroll

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Wed Aug 3 08:48:47 CDT 2011


Author: davidk
Date: 2011-08-03 08:48:41 -0500 (Wed, 03 Aug 2011)
New Revision: 4936

Added:
   wwwdev/inc/rotator.php
   wwwdev/usage/
   wwwdev/usage/AC_RunActiveContent.js
   wwwdev/usage/GeoLiteCity.dat
   wwwdev/usage/charts.swf
   wwwdev/usage/charts_library/
   wwwdev/usage/charts_library/ar3d.swf
   wwwdev/usage/charts_library/arno.swf
   wwwdev/usage/charts_library/ars3.swf
   wwwdev/usage/charts_library/arst.swf
   wwwdev/usage/charts_library/brfl.swf
   wwwdev/usage/charts_library/brno.swf
   wwwdev/usage/charts_library/brst.swf
   wwwdev/usage/charts_library/buno.swf
   wwwdev/usage/charts_library/cl3d.swf
   wwwdev/usage/charts_library/clfl.swf
   wwwdev/usage/charts_library/clim.swf
   wwwdev/usage/charts_library/clno.swf
   wwwdev/usage/charts_library/clp3.swf
   wwwdev/usage/charts_library/cls3.swf
   wwwdev/usage/charts_library/clst.swf
   wwwdev/usage/charts_library/cnno.swf
   wwwdev/usage/charts_library/dollar.jpg
   wwwdev/usage/charts_library/dono.swf
   wwwdev/usage/charts_library/lnno.swf
   wwwdev/usage/charts_library/mxno.swf
   wwwdev/usage/charts_library/pi3d.swf
   wwwdev/usage/charts_library/pie.jpg
   wwwdev/usage/charts_library/piim.swf
   wwwdev/usage/charts_library/pino.swf
   wwwdev/usage/charts_library/pono.swf
   wwwdev/usage/charts_library/scno.swf
   wwwdev/usage/geoip.inc
   wwwdev/usage/geoipcity.inc
   wwwdev/usage/geoipregionvars.php
   wwwdev/usage/locations.php
   wwwdev/usage/resources/
   wwwdev/usage/resources/button_rollover/
   wwwdev/usage/resources/button_rollover/button_rollover.fla
   wwwdev/usage/resources/button_rollover/button_rollover.swf
   wwwdev/usage/resources/chart_in_swf/
   wwwdev/usage/resources/chart_in_swf/chart_in_swf.fla
   wwwdev/usage/resources/cursor/
   wwwdev/usage/resources/cursor/cursor.fla
   wwwdev/usage/resources/cursor/cursor.swf
   wwwdev/usage/resources/full_screen/
   wwwdev/usage/resources/full_screen/full_screen.fla
   wwwdev/usage/resources/full_screen/full_screen.swf
   wwwdev/usage/resources/preview_scroll/
   wwwdev/usage/resources/preview_scroll/black.fla
   wwwdev/usage/resources/preview_scroll/black.swf
   wwwdev/usage/resources/preview_scroll/preview_handle_1.fla
   wwwdev/usage/resources/preview_scroll/preview_handle_1.swf
   wwwdev/usage/resources/preview_scroll/preview_handle_2.fla
   wwwdev/usage/resources/preview_scroll/preview_handle_2.swf
   wwwdev/usage/resources/scroll/
   wwwdev/usage/resources/scroll/button_1_idle.jpg
   wwwdev/usage/resources/scroll/button_1_over.jpg
   wwwdev/usage/resources/scroll/button_1_press.jpg
   wwwdev/usage/resources/scroll/button_2_idle.jpg
   wwwdev/usage/resources/scroll/button_2_over.jpg
   wwwdev/usage/resources/scroll/button_2_press.jpg
   wwwdev/usage/resources/scroll/button_all_idle.jpg
   wwwdev/usage/resources/scroll/button_all_over.jpg
   wwwdev/usage/resources/scroll/button_all_press.jpg
   wwwdev/usage/resources/scroll/slider_L.gif
   wwwdev/usage/resources/scroll/slider_R.gif
   wwwdev/usage/resources/scroll/slider_bg.gif
   wwwdev/usage/resources/scroll/slider_handle.gif
   wwwdev/usage/resources/scroll/slider_handle_L.gif
   wwwdev/usage/resources/scroll/slider_handle_R.gif
   wwwdev/usage/resources/scroll/slider_over_L.gif
   wwwdev/usage/resources/scroll/slider_over_R.gif
   wwwdev/usage/update_data.php
   wwwdev/usage/usage.php
Removed:
   wwwdev/about/_notes/
   wwwdev/apps/_notes/
   wwwdev/case_studies/_notes/
   wwwdev/cookbook/_notes/
   wwwdev/cookbook/figures/_notes/
   wwwdev/css/_notes/
   wwwdev/docs/_notes/
   wwwdev/downloads/_notes/
   wwwdev/images/_notes/
   wwwdev/images/orbit/_notes/
   wwwdev/images/rotator/_notes/
   wwwdev/inc/_notes/
   wwwdev/js/_notes/
   wwwdev/links/_notes/
   wwwdev/main/_notes/
   wwwdev/main/rotator.php
   wwwdev/papers/_notes/
   wwwdev/support/_notes/
Modified:
   wwwdev/docs/tracking_policy.php
   wwwdev/main/index.php
Log:
Initial outline of usage stat collection guidelines
Usage stat scripts
Fixed a problem on the main page with paths
Duplicate banner issue fixed
Remove dreamweaver _notes directories



Modified: wwwdev/docs/tracking_policy.php
===================================================================
--- wwwdev/docs/tracking_policy.php	2011-08-03 05:27:08 UTC (rev 4935)
+++ wwwdev/docs/tracking_policy.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -1,7 +1,103 @@
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
+<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1" />
+<title></title>
 </head>
+<link href="../css/960_12_col.css" rel="stylesheet" type="text/css" />
+<link href="../css/reset.css" rel="stylesheet" type="text/css" />
+<link href="../css/style3.css" rel="stylesheet" type="text/css" />
+<link href="../css/orbit-1.2.3.css" rel="stylesheet" type="text/css">
+<?php require('../inc/header2.php') ?>
+<br><br>
 <body>
-Tracking policy
+
+<style>
+#usagelist { list-style: circle inside none; }
+</style>
+<div style="width:700px; margin-left:350px;">
+
+<h1>Usage Statistics Collection by Swift</h1>
+<br>
+Beginning with Swift 0.9.1, Swift has the capability to send usage statistics back to the Swift development team.
+<br><br>
+<ul id="usagelist">
+  <li><a href="#whyarewedoingthis">Why are we doing this?</a></li>
+  <li><a href="#optout">Opt-out</a></li>
+  <li><a href="#whatissent">What is sent?</a></li>
+  <li><a href="#howisthedatasent">How is the data sent?</a></li>
+  <li><a href="#whenisthedatasent">When is it sent?</a></li>
+  <li><a href="#whatwillitbeusedfor">What will the data be used for?</a></li>
+  <li><a href="#feedback">Feedback</a>    </li>
+</ul>
+
+<h2><a name="whyarewedoingthis"></a>Why are we doing this?</h2>  
+The Swift development team receives support from government funding agencies. In
+  a time of funding scarcity, these agencies must be able to demonstrate that
+  the scientific community is benefiting from their investment. To this end,
+  we want to provide generic usage data about such things as the following: 
+<br><br>
+<UL id="usagelist">
+  <LI>How many people use Swift   
+  <LI>Average job length 
+  <LI>Swift exit codes</LI>
+</UL>
+To this end, we have added support to Swift that will allow installations
+to send us generic usage statistics. By participating in this project, you help
+our funders to justify continuing their support for the software on which you
+rely. The data sent is as generic as possible (see <a href=#whatissent>What is Sent?</a> below).
+<br><br>
+<h2><a name="optout"></a>Opt-out</h2> 
+We are using opt-out rather than opt-in. The reason is that we <it>need</it> this
+data - it is a requirement for funding. We're
+sure our fellow users would be willing to help show that Swift works
+and is in use. Realistically, however, we know that if it requires any additional
+effort to set up usage statistic reporting, it would drastically reduce the number
+of users that would actually report the data. To be effective, we need to require
+zero additional effort.<br><br>
+By not opting out, and allowing these statistics to be reported back, you
+are explicitly supporting the further development of Swift.
+<br><br>
+If you must opt out of usage reporting, set "SWIFT_USAGE_STATS=0" in your environment.   
+<br><br>
+<h2><a name="whatissent" id="whatissent"></a>What is sent?</h2> 
+<ul id="usagelist">
+    <li>Anonymized user ID</li>
+    <li>Anonymized Swift script ID</li>
+    <li>Swift script length</li>
+    <li>Swift exit code</li>
+    <li>IP address </li>
+    <li>Hostname</li>
+</ul>
+
+<h2><a name="howisthedatasent"></a>How is the data sent?</h2>The data is sent via UDP. While this may cause us to lose some data, it drastically reduces the possibility that the usage statistics reporting can adversely affect the operation of the software.
+<br><br>
+<h2><a name="whenisthedatasent"></a>When is the data sent?</h2>Once when Swift starts a script, and once when the script is completed. 
+
+<br><br>
+<h2><a name="whatwillitbeusedfor"></a>What will the data be used for?</h2> 
+
+The data will be used for answering questions such as:<br><br>
+<ul id="usagelist">
+  <li>How many unique users are using Swift?</li>
+  <li>To determine patterns of usage - is activity increasing or decreasing?</li>
+</ul>
+We will also try and mine the data to answer operational questions such as:<br><br>
+<ul id="usagelist">
+  <li> What percentage
+            of the jobs run complete successfully? </li>
+
+  <li>Of the ones that fail, what is the most common fault code returned?</li>
+</ul>
+<h2><a name="feedback"></a>Feedback</h2>
+Please send us your feedback at <a href="mailto:swift-devel at ci.uchicago.edu">swift-devel at ci.uchicago.edu</a>.
+Feedback from our user communities will be useful in determining our path forward
+with this in the future. We do ask that if you have concerns or objections, please
+be specific in your feedback. For example: "Our site has a policy against sending
+such data" is good information for us to know in the future.  A link to such
+a policy would be even better.
+<br><br>
+<!--end div of content-->
+</div>
 </body>
 </html>

Copied: wwwdev/inc/rotator.php (from rev 4935, wwwdev/main/rotator.php)
===================================================================
--- wwwdev/inc/rotator.php	                        (rev 0)
+++ wwwdev/inc/rotator.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,23 @@
+<!-- =======================================
+
+THE ACTUAL ORBIT SLIDER CONTENT 
+
+======================================= -->
+		<div id="featured"> 
+			<a href="#">
+			<img src="../images/rotator/2011_08_neuroscience.jpg" />
+			</a>
+			<img src="../images/rotator/bg_rotator2.jpg" data-caption="#htmlCaption" />
+			<img src="../images/rotator/bg_rotator3.jpg"  />
+		</div>
+		<!--
+		<div class="content" style="">
+				<h1>Orbit does content now.</h1>
+				<h3>Highlight me...I'm text.</h3>
+			</div>
+		-->
+		<!-- Captions for Orbit -->
+		<span class="orbit-caption" id="htmlCaption"><strong>I'm A  Caption:</strong> I can have <a href="#">links</a>, <em>style</em> or anything that is valid markup :)</span>
+		
+		
+		<img src="../images/rotator_shadow.png" width="674" height="10" />

Modified: wwwdev/main/index.php
===================================================================
--- wwwdev/main/index.php	2011-08-03 05:27:08 UTC (rev 4935)
+++ wwwdev/main/index.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -134,4 +134,4 @@
 pageTracker._trackPageview();
 } catch(err) {}</script>
 </body>
-</html>
\ No newline at end of file
+</html>

Deleted: wwwdev/main/rotator.php
===================================================================
--- wwwdev/main/rotator.php	2011-08-03 05:27:08 UTC (rev 4935)
+++ wwwdev/main/rotator.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -1,85 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<title>Swift - Move Me</title>
-<link href="../css/960_12_col.css" rel="stylesheet" type="text/css" />
-<link href="../css/reset.css" rel="stylesheet" type="text/css" />
-<link href="../css/style3.css" rel="stylesheet" type="text/css" />
-<link href="../css/orbit-1.2.3.css" rel="stylesheet" type="text/css">
-<script type="text/javascript" src="../js/jquery-1.5.1.min.js"></script>
-<script type="text/javascript" src="../js/jquery.orbit-1.2.3.min.js"></script>
-<!--[if IE]>
-			     <style type="text/css">
-			         .timer { display: none !important; }
-			         div.caption { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);zoom: 1; }
-			    </style>
-			<![endif]-->
-<script type="text/javascript" src="http://use.typekit.com/dbf2lqy.js"></script>
-<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
-<!-- Run the plugin -->
-		<script type="text/javascript">
-			$(window).load(function() {
-				$('#featured').orbit({
-					bullets: true,
-					});
-			});
-		</script>
-</head>
-
-<body>
-<div class="container_12">
-	<!-- header -->
-	<?php require('../inc/header2.php') ?>
-	<!-- end header -->
-<div class="grid_12 page-header">				
-	<h1>Rotator Set-Up</h1>	
-</div>
-<div class="clear"></div>
-<!-- end .grid_12 -->
-
- <div class="grid_9">
-	<div class="container">
-	
-<!-- =======================================
-
-THE ACTUAL ORBIT SLIDER CONTENT 
-
-======================================= -->
-		<div id="featured"> 
-			<a href="#">
-			<img src="../images/rotator/2011_08_neuroscience.jpg" />
-			</a>
-			<img src="../images/rotator/bg_rotator2.jpg" data-caption="#htmlCaption" />
-			<img src="../images/rotator/bg_rotator3.jpg"  />
-		</div>
-		<!--
-		<div class="content" style="">
-				<h1>Orbit does content now.</h1>
-				<h3>Highlight me...I'm text.</h3>
-			</div>
-		-->
-		<!-- Captions for Orbit -->
-		<span class="orbit-caption" id="htmlCaption"><strong>I'm A  Caption:</strong> I can have <a href="#">links</a>, <em>style</em> or anything that is valid markup :)</span>
-		
-		
-		<img src="../images/rotator_shadow.png" width="674" height="10" />
-		</div>
-	</div>
-  <!-- end .grid_9 -->
-  <div class="grid_3">
-  	<h3>Right Header</h3>
-    <p>Right column content.</p>
-    <p> </p>
-  </div>
-  <!-- end .grid_3 -->
-  
-  <div class="clear"></div>
-				
-  </div>
-<!-- end .container_12 -->
-<!-- footer -->
-<?php require('../inc/footer2.php') ?> 
-<!-- end footer -->
-</body>
-</html>

Added: wwwdev/usage/AC_RunActiveContent.js
===================================================================
--- wwwdev/usage/AC_RunActiveContent.js	                        (rev 0)
+++ wwwdev/usage/AC_RunActiveContent.js	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,292 @@
+//v1.7
+// Flash Player Version Detection
+// Detect Client Browser type
+// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
+var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
+var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
+var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
+
+function ControlVersion()
+{
+	var version;
+	var axo;
+	var e;
+
+	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
+
+	try {
+		// version will be set for 7.X or greater players
+		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
+		version = axo.GetVariable("$version");
+	} catch (e) {
+	}
+
+	if (!version)
+	{
+		try {
+			// version will be set for 6.X players only
+			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+			
+			// installed player is some revision of 6.0
+			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
+			// so we have to be careful. 
+			
+			// default to the first public version
+			version = "WIN 6,0,21,0";
+
+			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
+			axo.AllowScriptAccess = "always";
+
+			// safe to call for 6.0r47 or greater
+			version = axo.GetVariable("$version");
+
+		} catch (e) {
+		}
+	}
+
+	if (!version)
+	{
+		try {
+			// version will be set for 4.X or 5.X player
+			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
+			version = axo.GetVariable("$version");
+		} catch (e) {
+		}
+	}
+
+	if (!version)
+	{
+		try {
+			// version will be set for 3.X player
+			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
+			version = "WIN 3,0,18,0";
+		} catch (e) {
+		}
+	}
+
+	if (!version)
+	{
+		try {
+			// version will be set for 2.X player
+			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
+			version = "WIN 2,0,0,11";
+		} catch (e) {
+			version = -1;
+		}
+	}
+	
+	return version;
+}
+
+// JavaScript helper required to detect Flash Player PlugIn version information
+function GetSwfVer(){
+	// NS/Opera version >= 3 check for Flash plugin in plugin array
+	var flashVer = -1;
+	
+	if (navigator.plugins != null && navigator.plugins.length > 0) {
+		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
+			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
+			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
+			var descArray = flashDescription.split(" ");
+			var tempArrayMajor = descArray[2].split(".");			
+			var versionMajor = tempArrayMajor[0];
+			var versionMinor = tempArrayMajor[1];
+			var versionRevision = descArray[3];
+			if (versionRevision == "") {
+				versionRevision = descArray[4];
+			}
+			if (versionRevision[0] == "d") {
+				versionRevision = versionRevision.substring(1);
+			} else if (versionRevision[0] == "r") {
+				versionRevision = versionRevision.substring(1);
+				if (versionRevision.indexOf("d") > 0) {
+					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
+				}
+			}
+			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
+		}
+	}
+	// MSN/WebTV 2.6 supports Flash 4
+	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
+	// WebTV 2.5 supports Flash 3
+	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
+	// older WebTV supports Flash 2
+	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
+	else if ( isIE && isWin && !isOpera ) {
+		flashVer = ControlVersion();
+	}	
+	return flashVer;
+}
+
+// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
+function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
+{
+	versionStr = GetSwfVer();
+	if (versionStr == -1 ) {
+		return false;
+	} else if (versionStr != 0) {
+		if(isIE && isWin && !isOpera) {
+			// Given "WIN 2,0,0,11"
+			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
+			tempString        = tempArray[1];			// "2,0,0,11"
+			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
+		} else {
+			versionArray      = versionStr.split(".");
+		}
+		var versionMajor      = versionArray[0];
+		var versionMinor      = versionArray[1];
+		var versionRevision   = versionArray[2];
+
+        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
+		if (versionMajor > parseFloat(reqMajorVer)) {
+			return true;
+		} else if (versionMajor == parseFloat(reqMajorVer)) {
+			if (versionMinor > parseFloat(reqMinorVer))
+				return true;
+			else if (versionMinor == parseFloat(reqMinorVer)) {
+				if (versionRevision >= parseFloat(reqRevision))
+					return true;
+			}
+		}
+		return false;
+	}
+}
+
+function AC_AddExtension(src, ext)
+{
+  if (src.indexOf('?') != -1)
+    return src.replace(/\?/, ext+'?'); 
+  else
+    return src + ext;
+}
+
+function AC_Generateobj(objAttrs, params, embedAttrs) 
+{ 
+  var str = '';
+  if (isIE && isWin && !isOpera)
+  {
+    str += '<object ';
+    for (var i in objAttrs)
+    {
+      str += i + '="' + objAttrs[i] + '" ';
+    }
+    str += '>';
+    for (var i in params)
+    {
+      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
+    }
+    str += '</object>';
+  }
+  else
+  {
+    str += '<embed ';
+    for (var i in embedAttrs)
+    {
+      str += i + '="' + embedAttrs[i] + '" ';
+    }
+    str += '> </embed>';
+  }
+
+  document.write(str);
+}
+
+function AC_FL_RunContent(){
+  var ret = 
+    AC_GetArgs
+    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
+     , "application/x-shockwave-flash"
+    );
+  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
+}
+
+function AC_SW_RunContent(){
+  var ret = 
+    AC_GetArgs
+    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
+     , null
+    );
+  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
+}
+
+function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
+  var ret = new Object();
+  ret.embedAttrs = new Object();
+  ret.params = new Object();
+  ret.objAttrs = new Object();
+  for (var i=0; i < args.length; i=i+2){
+    var currArg = args[i].toLowerCase();    
+
+    switch (currArg){	
+      case "classid":
+        break;
+      case "pluginspage":
+        ret.embedAttrs[args[i]] = args[i+1];
+        break;
+      case "src":
+      case "movie":	
+        args[i+1] = AC_AddExtension(args[i+1], ext);
+        ret.embedAttrs["src"] = args[i+1];
+        ret.params[srcParamName] = args[i+1];
+        break;
+      case "onafterupdate":
+      case "onbeforeupdate":
+      case "onblur":
+      case "oncellchange":
+      case "onclick":
+      case "ondblclick":
+      case "ondrag":
+      case "ondragend":
+      case "ondragenter":
+      case "ondragleave":
+      case "ondragover":
+      case "ondrop":
+      case "onfinish":
+      case "onfocus":
+      case "onhelp":
+      case "onmousedown":
+      case "onmouseup":
+      case "onmouseover":
+      case "onmousemove":
+      case "onmouseout":
+      case "onkeypress":
+      case "onkeydown":
+      case "onkeyup":
+      case "onload":
+      case "onlosecapture":
+      case "onpropertychange":
+      case "onreadystatechange":
+      case "onrowsdelete":
+      case "onrowenter":
+      case "onrowexit":
+      case "onrowsinserted":
+      case "onstart":
+      case "onscroll":
+      case "onbeforeeditfocus":
+      case "onactivate":
+      case "onbeforedeactivate":
+      case "ondeactivate":
+      case "type":
+      case "codebase":
+      case "id":
+        ret.objAttrs[args[i]] = args[i+1];
+        break;
+      case "width":
+      case "height":
+      case "align":
+      case "vspace": 
+      case "hspace":
+      case "class":
+      case "title":
+      case "accesskey":
+      case "name":
+      case "tabindex":
+        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
+        break;
+      default:
+        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
+    }
+  }
+  ret.objAttrs["classid"] = classid;
+  if (mimeType) ret.embedAttrs["type"] = mimeType;
+  return ret;
+}


Property changes on: wwwdev/usage/AC_RunActiveContent.js
___________________________________________________________________
Added: svn:executable
   + *

Added: wwwdev/usage/GeoLiteCity.dat
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/GeoLiteCity.dat
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/ar3d.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/ar3d.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/arno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/arno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/ars3.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/ars3.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/arst.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/arst.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/brfl.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/brfl.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/brno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/brno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/brst.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/brst.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/buno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/buno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/cl3d.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/cl3d.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/clfl.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/clfl.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/clim.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/clim.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/clno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/clno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/clp3.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/clp3.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/cls3.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/cls3.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/clst.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/clst.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/cnno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/cnno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/dollar.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/dollar.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/dono.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/dono.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/lnno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/lnno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/mxno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/mxno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/pi3d.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/pi3d.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/pie.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/pie.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/piim.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/piim.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/pino.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/pino.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/pono.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/pono.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/charts_library/scno.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/charts_library/scno.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/geoip.inc
===================================================================
--- wwwdev/usage/geoip.inc	                        (rev 0)
+++ wwwdev/usage/geoip.inc	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,727 @@
+<?php
+
+/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
+/* geoip.inc
+ *
+ * Copyright (C) 2007 MaxMind LLC
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+define("GEOIP_COUNTRY_BEGIN", 16776960);
+define("GEOIP_STATE_BEGIN_REV0", 16700000);
+define("GEOIP_STATE_BEGIN_REV1", 16000000);
+define("GEOIP_STANDARD", 0);
+define("GEOIP_MEMORY_CACHE", 1);
+define("GEOIP_SHARED_MEMORY", 2);
+define("STRUCTURE_INFO_MAX_SIZE", 20);
+define("DATABASE_INFO_MAX_SIZE", 100);
+define("GEOIP_COUNTRY_EDITION", 106);
+define("GEOIP_PROXY_EDITION", 8);
+define("GEOIP_ASNUM_EDITION", 9);
+define("GEOIP_NETSPEED_EDITION", 10);
+define("GEOIP_REGION_EDITION_REV0", 112);
+define("GEOIP_REGION_EDITION_REV1", 3);
+define("GEOIP_CITY_EDITION_REV0", 111);
+define("GEOIP_CITY_EDITION_REV1", 2);
+define("GEOIP_ORG_EDITION", 110);
+define("GEOIP_ISP_EDITION", 4);
+define("SEGMENT_RECORD_LENGTH", 3);
+define("STANDARD_RECORD_LENGTH", 3);
+define("ORG_RECORD_LENGTH", 4);
+define("MAX_RECORD_LENGTH", 4);
+define("MAX_ORG_RECORD_LENGTH", 300);
+define("GEOIP_SHM_KEY", 0x4f415401);
+define("US_OFFSET", 1);
+define("CANADA_OFFSET", 677);
+define("WORLD_OFFSET", 1353);
+define("FIPS_RANGE", 360);
+define("GEOIP_UNKNOWN_SPEED", 0);
+define("GEOIP_DIALUP_SPEED", 1);
+define("GEOIP_CABLEDSL_SPEED", 2);
+define("GEOIP_CORPORATE_SPEED", 3);
+define("GEOIP_DOMAIN_EDITION", 11);
+define("GEOIP_COUNTRY_EDITION_V6", 12);
+define("GEOIP_LOCATIONA_EDITION", 13);
+define("GEOIP_ACCURACYRADIUS_EDITION", 14);
+define("GEOIP_CITYCOMBINED_EDITION", 15);
+define("GEOIP_CITY_EDITION_REV1_V6", 30);
+define("GEOIP_CITY_EDITION_REV0_V6",31);
+define("GEOIP_NETSPEED_EDITION_REV1",32);
+define("GEOIP_NETSPEED_EDITION_REV1_V6",33);
+define("GEOIP_USERTYPE_EDITION",28);
+define("GEOIP_USERTYPE_EDITION_V6",29);
+define("GEOIP_ASNUM_EDITION_V6",21);
+define("GEOIP_ISP_EDITION_V6",22);
+define("GEOIP_ORG_EDITION_V6",23);
+define("GEOIP_DOMAIN_EDITION_V6",24);
+
+define("CITYCOMBINED_FIXED_RECORD", 7 );
+
+class GeoIP {
+    var $flags;
+    var $filehandle;
+    var $memory_buffer;
+    var $databaseType;
+    var $databaseSegments;
+    var $record_length;
+    var $shmid;
+    var $GEOIP_COUNTRY_CODE_TO_NUMBER = array(
+"" => 0, "AP" => 1, "EU" => 2, "AD" => 3, "AE" => 4, "AF" => 5, 
+"AG" => 6, "AI" => 7, "AL" => 8, "AM" => 9, "AN" => 10, "AO" => 11, 
+"AQ" => 12, "AR" => 13, "AS" => 14, "AT" => 15, "AU" => 16, "AW" => 17, 
+"AZ" => 18, "BA" => 19, "BB" => 20, "BD" => 21, "BE" => 22, "BF" => 23, 
+"BG" => 24, "BH" => 25, "BI" => 26, "BJ" => 27, "BM" => 28, "BN" => 29, 
+"BO" => 30, "BR" => 31, "BS" => 32, "BT" => 33, "BV" => 34, "BW" => 35, 
+"BY" => 36, "BZ" => 37, "CA" => 38, "CC" => 39, "CD" => 40, "CF" => 41, 
+"CG" => 42, "CH" => 43, "CI" => 44, "CK" => 45, "CL" => 46, "CM" => 47, 
+"CN" => 48, "CO" => 49, "CR" => 50, "CU" => 51, "CV" => 52, "CX" => 53, 
+"CY" => 54, "CZ" => 55, "DE" => 56, "DJ" => 57, "DK" => 58, "DM" => 59, 
+"DO" => 60, "DZ" => 61, "EC" => 62, "EE" => 63, "EG" => 64, "EH" => 65, 
+"ER" => 66, "ES" => 67, "ET" => 68, "FI" => 69, "FJ" => 70, "FK" => 71, 
+"FM" => 72, "FO" => 73, "FR" => 74, "FX" => 75, "GA" => 76, "GB" => 77,
+"GD" => 78, "GE" => 79, "GF" => 80, "GH" => 81, "GI" => 82, "GL" => 83, 
+"GM" => 84, "GN" => 85, "GP" => 86, "GQ" => 87, "GR" => 88, "GS" => 89, 
+"GT" => 90, "GU" => 91, "GW" => 92, "GY" => 93, "HK" => 94, "HM" => 95, 
+"HN" => 96, "HR" => 97, "HT" => 98, "HU" => 99, "ID" => 100, "IE" => 101, 
+"IL" => 102, "IN" => 103, "IO" => 104, "IQ" => 105, "IR" => 106, "IS" => 107, 
+"IT" => 108, "JM" => 109, "JO" => 110, "JP" => 111, "KE" => 112, "KG" => 113, 
+"KH" => 114, "KI" => 115, "KM" => 116, "KN" => 117, "KP" => 118, "KR" => 119, 
+"KW" => 120, "KY" => 121, "KZ" => 122, "LA" => 123, "LB" => 124, "LC" => 125, 
+"LI" => 126, "LK" => 127, "LR" => 128, "LS" => 129, "LT" => 130, "LU" => 131, 
+"LV" => 132, "LY" => 133, "MA" => 134, "MC" => 135, "MD" => 136, "MG" => 137, 
+"MH" => 138, "MK" => 139, "ML" => 140, "MM" => 141, "MN" => 142, "MO" => 143, 
+"MP" => 144, "MQ" => 145, "MR" => 146, "MS" => 147, "MT" => 148, "MU" => 149, 
+"MV" => 150, "MW" => 151, "MX" => 152, "MY" => 153, "MZ" => 154, "NA" => 155,
+"NC" => 156, "NE" => 157, "NF" => 158, "NG" => 159, "NI" => 160, "NL" => 161, 
+"NO" => 162, "NP" => 163, "NR" => 164, "NU" => 165, "NZ" => 166, "OM" => 167, 
+"PA" => 168, "PE" => 169, "PF" => 170, "PG" => 171, "PH" => 172, "PK" => 173, 
+"PL" => 174, "PM" => 175, "PN" => 176, "PR" => 177, "PS" => 178, "PT" => 179, 
+"PW" => 180, "PY" => 181, "QA" => 182, "RE" => 183, "RO" => 184, "RU" => 185, 
+"RW" => 186, "SA" => 187, "SB" => 188, "SC" => 189, "SD" => 190, "SE" => 191, 
+"SG" => 192, "SH" => 193, "SI" => 194, "SJ" => 195, "SK" => 196, "SL" => 197, 
+"SM" => 198, "SN" => 199, "SO" => 200, "SR" => 201, "ST" => 202, "SV" => 203, 
+"SY" => 204, "SZ" => 205, "TC" => 206, "TD" => 207, "TF" => 208, "TG" => 209, 
+"TH" => 210, "TJ" => 211, "TK" => 212, "TM" => 213, "TN" => 214, "TO" => 215, 
+"TL" => 216, "TR" => 217, "TT" => 218, "TV" => 219, "TW" => 220, "TZ" => 221, 
+"UA" => 222, "UG" => 223, "UM" => 224, "US" => 225, "UY" => 226, "UZ" => 227, 
+"VA" => 228, "VC" => 229, "VE" => 230, "VG" => 231, "VI" => 232, "VN" => 233,
+"VU" => 234, "WF" => 235, "WS" => 236, "YE" => 237, "YT" => 238, "RS" => 239, 
+"ZA" => 240, "ZM" => 241, "ME" => 242, "ZW" => 243, "A1" => 244, "A2" => 245, 
+"O1" => 246, "AX" => 247, "GG" => 248, "IM" => 249, "JE" => 250, "BL" => 251,
+"MF" => 252
+);
+    var $GEOIP_COUNTRY_CODES = array(
+"", "AP", "EU", "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AN", "AO", "AQ",
+"AR", "AS", "AT", "AU", "AW", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH",
+"BI", "BJ", "BM", "BN", "BO", "BR", "BS", "BT", "BV", "BW", "BY", "BZ", "CA",
+"CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU",
+"CV", "CX", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG",
+"EH", "ER", "ES", "ET", "FI", "FJ", "FK", "FM", "FO", "FR", "FX", "GA", "GB",
+"GD", "GE", "GF", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GS", "GT",
+"GU", "GW", "GY", "HK", "HM", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IN",
+"IO", "IQ", "IR", "IS", "IT", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM",
+"KN", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS",
+"LT", "LU", "LV", "LY", "MA", "MC", "MD", "MG", "MH", "MK", "ML", "MM", "MN",
+"MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA",
+"NC", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA",
+"PE", "PF", "PG", "PH", "PK", "PL", "PM", "PN", "PR", "PS", "PT", "PW", "PY",
+"QA", "RE", "RO", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SH", "SI",
+"SJ", "SK", "SL", "SM", "SN", "SO", "SR", "ST", "SV", "SY", "SZ", "TC", "TD",
+"TF", "TG", "TH", "TJ", "TK", "TM", "TN", "TO", "TL", "TR", "TT", "TV", "TW",
+"TZ", "UA", "UG", "UM", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VI", "VN",
+"VU", "WF", "WS", "YE", "YT", "RS", "ZA", "ZM", "ME", "ZW", "A1", "A2", "O1",
+"AX", "GG", "IM", "JE", "BL", "MF"
+);
+    var $GEOIP_COUNTRY_CODES3 = array(
+"","AP","EU","AND","ARE","AFG","ATG","AIA","ALB","ARM","ANT","AGO","ATA","ARG",
+"ASM","AUT","AUS","ABW","AZE","BIH","BRB","BGD","BEL","BFA","BGR","BHR","BDI",
+"BEN","BMU","BRN","BOL","BRA","BHS","BTN","BVT","BWA","BLR","BLZ","CAN","CCK",
+"COD","CAF","COG","CHE","CIV","COK","CHL","CMR","CHN","COL","CRI","CUB","CPV",
+"CXR","CYP","CZE","DEU","DJI","DNK","DMA","DOM","DZA","ECU","EST","EGY","ESH",
+"ERI","ESP","ETH","FIN","FJI","FLK","FSM","FRO","FRA","FX","GAB","GBR","GRD",
+"GEO","GUF","GHA","GIB","GRL","GMB","GIN","GLP","GNQ","GRC","SGS","GTM","GUM",
+"GNB","GUY","HKG","HMD","HND","HRV","HTI","HUN","IDN","IRL","ISR","IND","IOT",
+"IRQ","IRN","ISL","ITA","JAM","JOR","JPN","KEN","KGZ","KHM","KIR","COM","KNA",
+"PRK","KOR","KWT","CYM","KAZ","LAO","LBN","LCA","LIE","LKA","LBR","LSO","LTU",
+"LUX","LVA","LBY","MAR","MCO","MDA","MDG","MHL","MKD","MLI","MMR","MNG","MAC",
+"MNP","MTQ","MRT","MSR","MLT","MUS","MDV","MWI","MEX","MYS","MOZ","NAM","NCL",
+"NER","NFK","NGA","NIC","NLD","NOR","NPL","NRU","NIU","NZL","OMN","PAN","PER",
+"PYF","PNG","PHL","PAK","POL","SPM","PCN","PRI","PSE","PRT","PLW","PRY","QAT",
+"REU","ROU","RUS","RWA","SAU","SLB","SYC","SDN","SWE","SGP","SHN","SVN","SJM",
+"SVK","SLE","SMR","SEN","SOM","SUR","STP","SLV","SYR","SWZ","TCA","TCD","ATF",
+"TGO","THA","TJK","TKL","TKM","TUN","TON","TLS","TUR","TTO","TUV","TWN","TZA",
+"UKR","UGA","UMI","USA","URY","UZB","VAT","VCT","VEN","VGB","VIR","VNM","VUT",
+"WLF","WSM","YEM","MYT","SRB","ZAF","ZMB","MNE","ZWE","A1","A2","O1",
+"ALA","GGY","IMN","JEY","BLM","MAF"
+    );
+    var $GEOIP_COUNTRY_NAMES = array(
+"", "Asia/Pacific Region", "Europe", "Andorra", "United Arab Emirates",
+"Afghanistan", "Antigua and Barbuda", "Anguilla", "Albania", "Armenia",
+"Netherlands Antilles", "Angola", "Antarctica", "Argentina", "American Samoa",
+"Austria", "Australia", "Aruba", "Azerbaijan", "Bosnia and Herzegovina",
+"Barbados", "Bangladesh", "Belgium", "Burkina Faso", "Bulgaria", "Bahrain",
+"Burundi", "Benin", "Bermuda", "Brunei Darussalam", "Bolivia", "Brazil",
+"Bahamas", "Bhutan", "Bouvet Island", "Botswana", "Belarus", "Belize",
+"Canada", "Cocos (Keeling) Islands", "Congo, The Democratic Republic of the",
+"Central African Republic", "Congo", "Switzerland", "Cote D'Ivoire", "Cook Islands",
+"Chile", "Cameroon", "China", "Colombia", "Costa Rica", "Cuba", "Cape Verde",
+"Christmas Island", "Cyprus", "Czech Republic", "Germany", "Djibouti",
+"Denmark", "Dominica", "Dominican Republic", "Algeria", "Ecuador", "Estonia",
+"Egypt", "Western Sahara", "Eritrea", "Spain", "Ethiopia", "Finland", "Fiji",
+"Falkland Islands (Malvinas)", "Micronesia, Federated States of", "Faroe Islands",
+"France", "France, Metropolitan", "Gabon", "United Kingdom",
+"Grenada", "Georgia", "French Guiana", "Ghana", "Gibraltar", "Greenland",
+"Gambia", "Guinea", "Guadeloupe", "Equatorial Guinea", "Greece", "South Georgia and the South Sandwich Islands",
+"Guatemala", "Guam", "Guinea-Bissau",
+"Guyana", "Hong Kong", "Heard Island and McDonald Islands", "Honduras",
+"Croatia", "Haiti", "Hungary", "Indonesia", "Ireland", "Israel", "India",
+"British Indian Ocean Territory", "Iraq", "Iran, Islamic Republic of",
+"Iceland", "Italy", "Jamaica", "Jordan", "Japan", "Kenya", "Kyrgyzstan",
+"Cambodia", "Kiribati", "Comoros", "Saint Kitts and Nevis", "Korea, Democratic People's Republic of",
+"Korea, Republic of", "Kuwait", "Cayman Islands",
+"Kazakhstan", "Lao People's Democratic Republic", "Lebanon", "Saint Lucia",
+"Liechtenstein", "Sri Lanka", "Liberia", "Lesotho", "Lithuania", "Luxembourg",
+"Latvia", "Libyan Arab Jamahiriya", "Morocco", "Monaco", "Moldova, Republic of",
+"Madagascar", "Marshall Islands", "Macedonia",
+"Mali", "Myanmar", "Mongolia", "Macau", "Northern Mariana Islands",
+"Martinique", "Mauritania", "Montserrat", "Malta", "Mauritius", "Maldives",
+"Malawi", "Mexico", "Malaysia", "Mozambique", "Namibia", "New Caledonia",
+"Niger", "Norfolk Island", "Nigeria", "Nicaragua", "Netherlands", "Norway",
+"Nepal", "Nauru", "Niue", "New Zealand", "Oman", "Panama", "Peru", "French Polynesia",
+"Papua New Guinea", "Philippines", "Pakistan", "Poland", "Saint Pierre and Miquelon",
+"Pitcairn Islands", "Puerto Rico", "Palestinian Territory",
+"Portugal", "Palau", "Paraguay", "Qatar", "Reunion", "Romania",
+"Russian Federation", "Rwanda", "Saudi Arabia", "Solomon Islands",
+"Seychelles", "Sudan", "Sweden", "Singapore", "Saint Helena", "Slovenia",
+"Svalbard and Jan Mayen", "Slovakia", "Sierra Leone", "San Marino", "Senegal",
+"Somalia", "Suriname", "Sao Tome and Principe", "El Salvador", "Syrian Arab Republic",
+"Swaziland", "Turks and Caicos Islands", "Chad", "French Southern Territories",
+"Togo", "Thailand", "Tajikistan", "Tokelau", "Turkmenistan",
+"Tunisia", "Tonga", "Timor-Leste", "Turkey", "Trinidad and Tobago", "Tuvalu",
+"Taiwan", "Tanzania, United Republic of", "Ukraine",
+"Uganda", "United States Minor Outlying Islands", "United States", "Uruguay",
+"Uzbekistan", "Holy See (Vatican City State)", "Saint Vincent and the Grenadines",
+"Venezuela", "Virgin Islands, British", "Virgin Islands, U.S.",
+"Vietnam", "Vanuatu", "Wallis and Futuna", "Samoa", "Yemen", "Mayotte",
+"Serbia", "South Africa", "Zambia", "Montenegro", "Zimbabwe",
+"Anonymous Proxy","Satellite Provider","Other",
+"Aland Islands","Guernsey","Isle of Man","Jersey","Saint Barthelemy","Saint Martin"
+);
+
+    var $GEOIP_CONTINENT_CODES = array(
+  "--", "AS", "EU", "EU", "AS", "AS", "NA", "NA", "EU", "AS", 
+  "NA", "AF", "AN", "SA", "OC", "EU", "OC", "NA", "AS", "EU", 
+  "NA", "AS", "EU", "AF", "EU", "AS", "AF", "AF", "NA", "AS", 
+  "SA", "SA", "NA", "AS", "AN", "AF", "EU", "NA", "NA", "AS", 
+  "AF", "AF", "AF", "EU", "AF", "OC", "SA", "AF", "AS", "SA", 
+  "NA", "NA", "AF", "AS", "AS", "EU", "EU", "AF", "EU", "NA", 
+  "NA", "AF", "SA", "EU", "AF", "AF", "AF", "EU", "AF", "EU", 
+  "OC", "SA", "OC", "EU", "EU", "EU", "AF", "EU", "NA", "AS", 
+  "SA", "AF", "EU", "NA", "AF", "AF", "NA", "AF", "EU", "AN", 
+  "NA", "OC", "AF", "SA", "AS", "AN", "NA", "EU", "NA", "EU", 
+  "AS", "EU", "AS", "AS", "AS", "AS", "AS", "EU", "EU", "NA", 
+  "AS", "AS", "AF", "AS", "AS", "OC", "AF", "NA", "AS", "AS", 
+  "AS", "NA", "AS", "AS", "AS", "NA", "EU", "AS", "AF", "AF", 
+  "EU", "EU", "EU", "AF", "AF", "EU", "EU", "AF", "OC", "EU", 
+  "AF", "AS", "AS", "AS", "OC", "NA", "AF", "NA", "EU", "AF", 
+  "AS", "AF", "NA", "AS", "AF", "AF", "OC", "AF", "OC", "AF", 
+  "NA", "EU", "EU", "AS", "OC", "OC", "OC", "AS", "NA", "SA", 
+  "OC", "OC", "AS", "AS", "EU", "NA", "OC", "NA", "AS", "EU", 
+  "OC", "SA", "AS", "AF", "EU", "EU", "AF", "AS", "OC", "AF", 
+  "AF", "EU", "AS", "AF", "EU", "EU", "EU", "AF", "EU", "AF", 
+  "AF", "SA", "AF", "NA", "AS", "AF", "NA", "AF", "AN", "AF", 
+  "AS", "AS", "OC", "AS", "AF", "OC", "AS", "EU", "NA", "OC", 
+  "AS", "AF", "EU", "AF", "OC", "NA", "SA", "AS", "EU", "NA", 
+  "SA", "NA", "NA", "AS", "OC", "OC", "OC", "AS", "AF", "EU", 
+  "AF", "AF", "EU", "AF", "--", "--", "--", "EU", "EU", "EU", 
+  "EU", "NA", "NA"
+);
+    
+}
+function geoip_load_shared_mem ($file) {
+
+  $fp = fopen($file, "rb");
+  if (!$fp) {
+    print "error opening $file: $php_errormsg\n";
+    exit;
+  }
+  $s_array = fstat($fp);
+  $size = $s_array['size'];
+  if ($shmid = @shmop_open (GEOIP_SHM_KEY, "w", 0, 0)) {
+    shmop_delete ($shmid);
+    shmop_close ($shmid);
+  }
+  $shmid = shmop_open (GEOIP_SHM_KEY, "c", 0644, $size);
+  shmop_write ($shmid, fread($fp, $size), 0);
+  shmop_close ($shmid);
+}
+
+function _setup_segments($gi){
+  $gi->databaseType = GEOIP_COUNTRY_EDITION;
+  $gi->record_length = STANDARD_RECORD_LENGTH;
+  if ($gi->flags & GEOIP_SHARED_MEMORY) {
+    $offset = @shmop_size ($gi->shmid) - 3;
+    for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) {
+        $delim = @shmop_read ($gi->shmid, $offset, 3);
+        $offset += 3;
+        if ($delim == (chr(255).chr(255).chr(255))) {
+            $gi->databaseType = ord(@shmop_read ($gi->shmid, $offset, 1));
+            $offset++;
+
+            if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){
+                $gi->databaseSegments = GEOIP_STATE_BEGIN_REV0;
+            } else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1){
+                $gi->databaseSegments = GEOIP_STATE_BEGIN_REV1;
+	    } else if (($gi->databaseType == GEOIP_CITY_EDITION_REV0)||
+                     ($gi->databaseType == GEOIP_CITY_EDITION_REV1) 
+                    || ($gi->databaseType == GEOIP_ORG_EDITION)
+                    || ($gi->databaseType == GEOIP_ORG_EDITION_V6)
+                    || ($gi->databaseType == GEOIP_DOMAIN_EDITION)
+                    || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6)
+		    || ($gi->databaseType == GEOIP_ISP_EDITION)
+		    || ($gi->databaseType == GEOIP_ISP_EDITION_V6)
+      		    || ($gi->databaseType == GEOIP_USERTYPE_EDITION)
+		    || ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6)
+		    || ($gi->databaseType == GEOIP_LOCATIONA_EDITION)
+		    || ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION)
+		    || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6)
+		    || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6)
+                    || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1)                    
+                    || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6)                    
+		    || ($gi->databaseType == GEOIP_ASNUM_EDITION)
+		    || ($gi->databaseType == GEOIP_ASNUM_EDITION_V6)){
+                $gi->databaseSegments = 0;
+                $buf = @shmop_read ($gi->shmid, $offset, SEGMENT_RECORD_LENGTH);
+                for ($j = 0;$j < SEGMENT_RECORD_LENGTH;$j++){
+                    $gi->databaseSegments += (ord($buf[$j]) << ($j * 8));
+                }
+	            if (($gi->databaseType == GEOIP_ORG_EDITION)
+	                || ($gi->databaseType == GEOIP_ORG_EDITION_V6)
+                        || ($gi->databaseType == GEOIP_DOMAIN_EDITION)
+                        || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6)
+			|| ($gi->databaseType == GEOIP_ISP_EDITION)
+			|| ($gi->databaseType == GEOIP_ISP_EDITION_V6)) {
+	                $gi->record_length = ORG_RECORD_LENGTH;
+                }
+            }
+            break;
+        } else {
+            $offset -= 4;
+        }
+    }
+    if (($gi->databaseType == GEOIP_COUNTRY_EDITION)||
+        ($gi->databaseType == GEOIP_COUNTRY_EDITION_V6)||
+        ($gi->databaseType == GEOIP_PROXY_EDITION)||
+        ($gi->databaseType == GEOIP_NETSPEED_EDITION)){
+        $gi->databaseSegments = GEOIP_COUNTRY_BEGIN;
+    }
+  } else {
+    $filepos = ftell($gi->filehandle);
+    fseek($gi->filehandle, -3, SEEK_END);
+    for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) {
+        $delim = fread($gi->filehandle,3);
+        if ($delim == (chr(255).chr(255).chr(255))){
+        $gi->databaseType = ord(fread($gi->filehandle,1));
+        if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){
+            $gi->databaseSegments = GEOIP_STATE_BEGIN_REV0;
+        }
+        else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1){
+	    $gi->databaseSegments = GEOIP_STATE_BEGIN_REV1;
+                }  else if (($gi->databaseType == GEOIP_CITY_EDITION_REV0)
+                    || ($gi->databaseType == GEOIP_CITY_EDITION_REV1)
+                    || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6)
+                    || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6)
+                    || ($gi->databaseType == GEOIP_ORG_EDITION) 
+                    || ($gi->databaseType == GEOIP_DOMAIN_EDITION)
+		    || ($gi->databaseType == GEOIP_ISP_EDITION)
+                    || ($gi->databaseType == GEOIP_ORG_EDITION_V6) 
+                    || ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6)
+		    || ($gi->databaseType == GEOIP_ISP_EDITION_V6)
+		    || ($gi->databaseType == GEOIP_LOCATIONA_EDITION)
+		    || ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION)
+                    || ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6)
+		    || ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6)
+                    || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1)                    
+                    || ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6)                    
+    		    || ($gi->databaseType == GEOIP_USERTYPE_EDITION)
+		    || ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6)	
+                    || ($gi->databaseType == GEOIP_ASNUM_EDITION)
+                    || ($gi->databaseType == GEOIP_ASNUM_EDITION_V6)){
+            $gi->databaseSegments = 0;
+            $buf = fread($gi->filehandle,SEGMENT_RECORD_LENGTH);
+            for ($j = 0;$j < SEGMENT_RECORD_LENGTH;$j++){
+            $gi->databaseSegments += (ord($buf[$j]) << ($j * 8));
+            }
+	    if (   ( $gi->databaseType == GEOIP_ORG_EDITION )
+                || ( $gi->databaseType == GEOIP_DOMAIN_EDITION )
+                || ( $gi->databaseType == GEOIP_ISP_EDITION ) 
+                || ( $gi->databaseType == GEOIP_ORG_EDITION_V6 )
+                || ( $gi->databaseType == GEOIP_DOMAIN_EDITION_V6 )
+                || ( $gi->databaseType == GEOIP_ISP_EDITION_V6 )) {
+	    $gi->record_length = ORG_RECORD_LENGTH;
+            }
+        }
+        break;
+        } else {
+        fseek($gi->filehandle, -4, SEEK_CUR);
+        }
+    }
+    if (($gi->databaseType == GEOIP_COUNTRY_EDITION)||
+        ($gi->databaseType == GEOIP_COUNTRY_EDITION_V6)||
+        ($gi->databaseType == GEOIP_PROXY_EDITION)||
+        ($gi->databaseType == GEOIP_NETSPEED_EDITION)){
+         $gi->databaseSegments = GEOIP_COUNTRY_BEGIN;
+    }
+    fseek($gi->filehandle,$filepos,SEEK_SET);
+  }
+  return $gi;
+}
+
+function geoip_open($filename, $flags) {
+  $gi = new GeoIP;
+  $gi->flags = $flags;
+  if ($gi->flags & GEOIP_SHARED_MEMORY) {
+    $gi->shmid = @shmop_open (GEOIP_SHM_KEY, "a", 0, 0);
+    } else {
+    $gi->filehandle = fopen($filename,"rb") or die( "Can not open $filename\n" );
+    if ($gi->flags & GEOIP_MEMORY_CACHE) {
+        $s_array = fstat($gi->filehandle);
+        $gi->memory_buffer = fread($gi->filehandle, $s_array['size']);
+    }
+  }
+
+  $gi = _setup_segments($gi);
+  return $gi;
+}
+
+function geoip_close($gi) {
+  if ($gi->flags & GEOIP_SHARED_MEMORY) {
+    return true;
+  }
+
+  return fclose($gi->filehandle);
+}
+
+function geoip_country_id_by_name_v6($gi, $name) {
+  $rec = dns_get_record($name, DNS_AAAA);
+  if ( !$rec ) {
+    return false;
+  }
+  $addr = $rec[0]["ipv6"];
+  if (!$addr || $addr == $name) {
+    return false;
+  }
+  return geoip_country_id_by_addr_v6($gi, $addr);
+}
+
+function geoip_country_id_by_name($gi, $name) {
+  $addr = gethostbyname($name);
+  if (!$addr || $addr == $name) {
+    return false;
+  }
+  return geoip_country_id_by_addr($gi, $addr);
+}
+
+function geoip_country_code_by_name_v6($gi, $name) {
+  $country_id = geoip_country_id_by_name_v6($gi,$name);
+  if ($country_id !== false) {
+        return $gi->GEOIP_COUNTRY_CODES[$country_id];
+  }
+  return false;
+}
+
+function geoip_country_code_by_name($gi, $name) {
+  $country_id = geoip_country_id_by_name($gi,$name);
+  if ($country_id !== false) {
+        return $gi->GEOIP_COUNTRY_CODES[$country_id];
+  }
+  return false;
+}
+
+function geoip_country_name_by_name_v6($gi, $name) {
+  $country_id = geoip_country_id_by_name_v6($gi,$name);
+  if ($country_id !== false) {
+        return $gi->GEOIP_COUNTRY_NAMES[$country_id];
+  }
+  return false;
+}
+
+function geoip_country_name_by_name($gi, $name) {
+  $country_id = geoip_country_id_by_name($gi,$name);
+  if ($country_id !== false) {
+        return $gi->GEOIP_COUNTRY_NAMES[$country_id];
+  }
+  return false;
+}
+
+function geoip_country_id_by_addr_v6($gi, $addr) {
+  $ipnum = inet_pton($addr);
+  return _geoip_seek_country_v6($gi, $ipnum) - GEOIP_COUNTRY_BEGIN;
+}
+
+function geoip_country_id_by_addr($gi, $addr) {
+  $ipnum = ip2long($addr);
+  return _geoip_seek_country($gi, $ipnum) - GEOIP_COUNTRY_BEGIN;
+}
+
+function geoip_country_code_by_addr_v6($gi, $addr) {
+    $country_id = geoip_country_id_by_addr_v6($gi,$addr);
+    if ($country_id !== false) {
+      return $gi->GEOIP_COUNTRY_CODES[$country_id];
+    }
+  return false;
+}
+
+function geoip_country_code_by_addr($gi, $addr) {
+  if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) {
+    $record = geoip_record_by_addr($gi,$addr);
+    if ( $record !== false ) {
+      return $record->country_code;
+    }
+  } else {
+    $country_id = geoip_country_id_by_addr($gi,$addr);
+    if ($country_id !== false) {
+      return $gi->GEOIP_COUNTRY_CODES[$country_id];
+    }
+  }
+  return false;
+}
+
+function geoip_country_name_by_addr_v6($gi, $addr) {
+    $country_id = geoip_country_id_by_addr_v6($gi,$addr);
+    if ($country_id !== false) {
+      return $gi->GEOIP_COUNTRY_NAMES[$country_id];
+    }
+  return false;
+}
+
+function geoip_country_name_by_addr($gi, $addr) {
+  if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) {
+    $record = geoip_record_by_addr($gi,$addr);
+    return $record->country_name;
+  } else {
+    $country_id = geoip_country_id_by_addr($gi,$addr);
+    if ($country_id !== false) {
+      return $gi->GEOIP_COUNTRY_NAMES[$country_id];
+    }
+  }
+  return false;
+}
+
+function _geoip_seek_country_v6($gi, $ipnum) {
+
+  # arrays from unpack start with offset 1
+  # yet another php mystery. array_merge work around 
+  # this broken behaviour
+  $v6vec = array_merge(unpack( "C16", $ipnum));
+
+  $offset = 0;
+  for ($depth = 127; $depth >= 0; --$depth) {
+    if ($gi->flags & GEOIP_MEMORY_CACHE) {
+      // workaround php's broken substr, strpos, etc handling with
+      // mbstring.func_overload and mbstring.internal_encoding
+      $enc = mb_internal_encoding();
+       mb_internal_encoding('ISO-8859-1'); 
+
+      $buf = substr($gi->memory_buffer,
+                            2 * $gi->record_length * $offset,
+                            2 * $gi->record_length);
+
+      mb_internal_encoding($enc);
+    } elseif ($gi->flags & GEOIP_SHARED_MEMORY) {
+      $buf = @shmop_read ($gi->shmid, 
+                            2 * $gi->record_length * $offset,
+                            2 * $gi->record_length );
+        } else {
+      fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) == 0
+        or die("fseek failed");
+      $buf = fread($gi->filehandle, 2 * $gi->record_length);
+    }
+    $x = array(0,0);
+    for ($i = 0; $i < 2; ++$i) {
+      for ($j = 0; $j < $gi->record_length; ++$j) {
+        $x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8);
+      }
+    }
+
+    $bnum = 127 - $depth;
+    $idx = $bnum >> 3;
+    $b_mask = 1 << ( $bnum & 7 ^ 7 );
+    if (($v6vec[$idx] & $b_mask) > 0) {
+      if ($x[1] >= $gi->databaseSegments) {
+        return $x[1];
+      }
+      $offset = $x[1];
+    } else {
+      if ($x[0] >= $gi->databaseSegments) {
+        return $x[0];
+      }
+      $offset = $x[0];
+    }
+  }
+  trigger_error("error traversing database - perhaps it is corrupt?", E_USER_ERROR);
+  return false;
+}
+
+function _geoip_seek_country($gi, $ipnum) {
+  $offset = 0;
+  for ($depth = 31; $depth >= 0; --$depth) {
+    if ($gi->flags & GEOIP_MEMORY_CACHE) {
+      // workaround php's broken substr, strpos, etc handling with
+      // mbstring.func_overload and mbstring.internal_encoding
+      $enc = mb_internal_encoding();
+       mb_internal_encoding('ISO-8859-1'); 
+
+      $buf = substr($gi->memory_buffer,
+                            2 * $gi->record_length * $offset,
+                            2 * $gi->record_length);
+
+      mb_internal_encoding($enc);
+    } elseif ($gi->flags & GEOIP_SHARED_MEMORY) {
+      $buf = @shmop_read ($gi->shmid, 
+                            2 * $gi->record_length * $offset,
+                            2 * $gi->record_length );
+        } else {
+      fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) == 0
+        or die("fseek failed");
+      $buf = fread($gi->filehandle, 2 * $gi->record_length);
+    }
+    $x = array(0,0);
+    for ($i = 0; $i < 2; ++$i) {
+      for ($j = 0; $j < $gi->record_length; ++$j) {
+        $x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8);
+      }
+    }
+    if ($ipnum & (1 << $depth)) {
+      if ($x[1] >= $gi->databaseSegments) {
+        return $x[1];
+      }
+      $offset = $x[1];
+        } else {
+      if ($x[0] >= $gi->databaseSegments) {
+        return $x[0];
+      }
+      $offset = $x[0];
+    }
+  }
+  trigger_error("error traversing database - perhaps it is corrupt?", E_USER_ERROR);
+  return false;
+}
+
+function _common_get_org($gi, $seek_org){
+  $record_pointer = $seek_org + (2 * $gi->record_length - 1) * $gi->databaseSegments;
+  if ($gi->flags & GEOIP_SHARED_MEMORY) {
+    $org_buf = @shmop_read ($gi->shmid, $record_pointer, MAX_ORG_RECORD_LENGTH);
+    } else {
+    fseek($gi->filehandle, $record_pointer, SEEK_SET);
+    $org_buf = fread($gi->filehandle,MAX_ORG_RECORD_LENGTH);
+  }
+  // workaround php's broken substr, strpos, etc handling with
+  // mbstring.func_overload and mbstring.internal_encoding
+  $enc = mb_internal_encoding();
+  mb_internal_encoding('ISO-8859-1'); 
+  $org_buf = substr($org_buf, 0, strpos($org_buf, "\0"));
+  mb_internal_encoding($enc);
+  return $org_buf;
+}
+
+function _get_org_v6($gi,$ipnum){
+  $seek_org = _geoip_seek_country_v6($gi,$ipnum);
+  if ($seek_org == $gi->databaseSegments) {
+    return NULL;
+  }
+  return _common_get_org($gi, $seek_org);
+}
+
+function _get_org($gi,$ipnum){
+  $seek_org = _geoip_seek_country($gi,$ipnum);
+  if ($seek_org == $gi->databaseSegments) {
+    return NULL;
+  }
+  return _common_get_org($gi, $seek_org);
+}
+
+
+
+function geoip_name_by_addr_v6 ($gi,$addr) {
+  if ($addr == NULL) {
+    return 0;
+  }
+  $ipnum = inet_pton($addr);
+  return _get_org_v6($gi, $ipnum);
+}
+
+function geoip_name_by_addr ($gi,$addr) {
+  if ($addr == NULL) {
+    return 0;
+  }
+  $ipnum = ip2long($addr);
+  return _get_org($gi, $ipnum);
+}
+
+function geoip_org_by_addr ($gi,$addr) {
+  return geoip_name_by_addr($gi, $addr);
+}
+
+function _get_region($gi,$ipnum){
+  if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){
+    $seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV0;
+    if ($seek_region >= 1000){
+      $country_code = "US";
+      $region = chr(($seek_region - 1000)/26 + 65) . chr(($seek_region - 1000)%26 + 65);
+    } else {
+            $country_code = $gi->GEOIP_COUNTRY_CODES[$seek_region];
+      $region = "";
+    }
+  return array ($country_code,$region);
+    }  else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1) {
+    $seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV1;
+    //print $seek_region;
+    if ($seek_region < US_OFFSET){
+      $country_code = "";
+      $region = "";  
+        } else if ($seek_region < CANADA_OFFSET) {
+      $country_code = "US";
+      $region = chr(($seek_region - US_OFFSET)/26 + 65) . chr(($seek_region - US_OFFSET)%26 + 65);
+        } else if ($seek_region < WORLD_OFFSET) {
+      $country_code = "CA";
+      $region = chr(($seek_region - CANADA_OFFSET)/26 + 65) . chr(($seek_region - CANADA_OFFSET)%26 + 65);
+    } else {
+            $country_code = $gi->GEOIP_COUNTRY_CODES[($seek_region - WORLD_OFFSET) / FIPS_RANGE];
+      $region = "";
+    }
+  return array ($country_code,$region);
+  }
+}
+
+function geoip_region_by_addr ($gi,$addr) {
+  if ($addr == NULL) {
+    return 0;
+  }
+  $ipnum = ip2long($addr);
+  return _get_region($gi, $ipnum);
+}
+
+function getdnsattributes ($l,$ip){
+  $r = new Net_DNS_Resolver();
+  $r->nameservers = array("ws1.maxmind.com");
+  $p = $r->search($l."." . $ip .".s.maxmind.com","TXT","IN");
+  $str = is_object($p->answer[0])?$p->answer[0]->string():'';
+  $str = substr( $str, 1, -1 );
+  return $str;
+}
+
+?>

Added: wwwdev/usage/geoipcity.inc
===================================================================
--- wwwdev/usage/geoipcity.inc	                        (rev 0)
+++ wwwdev/usage/geoipcity.inc	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,237 @@
+<?php
+
+/* geoipcity.inc
+ *
+ * Copyright (C) 2004 Maxmind LLC
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ */
+
+/*
+ * Changelog:
+ *
+ * 2005-01-13   Andrew Hill, Awarez Ltd. (http://www.awarez.net)
+ *              Formatted file according to PEAR library standards.
+ *              Changed inclusion of geoip.inc file to require_once, so that
+ *                  this library can be used in the same script as geoip.inc.
+ */
+
+define("FULL_RECORD_LENGTH",50);
+
+require_once 'geoip.inc';
+require_once 'geoipregionvars.php';
+
+class geoiprecord {
+  var $country_code;
+  var $country_code3;
+  var $country_name;
+  var $region;
+  var $city;
+  var $postal_code;
+  var $latitude;
+  var $longitude;
+  var $area_code;
+  var $dma_code;   # metro and dma code are the same. use metro_code
+  var $metro_code;
+  var $continent_code;
+}
+
+class geoipdnsrecord {
+  var $country_code;
+  var $country_code3;
+  var $country_name;
+  var $region;
+  var $regionname;
+  var $city;
+  var $postal_code;
+  var $latitude;
+  var $longitude;
+  var $areacode;
+  var $dmacode;
+  var $isp;
+  var $org;
+  var $metrocode;
+}
+
+function getrecordwithdnsservice($str){
+  $record = new geoipdnsrecord;
+  $keyvalue = explode(";",$str);
+  foreach ($keyvalue as $keyvalue2){
+    list($key,$value) = explode("=",$keyvalue2);
+    if ($key == "co"){
+      $record->country_code = $value;
+    }
+    if ($key == "ci"){
+      $record->city = $value;
+    }
+    if ($key == "re"){
+      $record->region = $value;
+    }
+    if ($key == "ac"){
+      $record->areacode = $value;
+    }
+    if ($key == "dm" || $key == "me" ){
+      $record->dmacode   = $value;
+      $record->metrocode = $value;
+    }
+    if ($key == "is"){
+      $record->isp = $value;
+    }
+    if ($key == "or"){
+      $record->org = $value;
+    }
+    if ($key == "zi"){
+      $record->postal_code = $value;
+    }
+    if ($key == "la"){
+      $record->latitude = $value;
+    }
+    if ($key == "lo"){
+      $record->longitude = $value;
+    }
+  }
+  $number = $GLOBALS['GEOIP_COUNTRY_CODE_TO_NUMBER'][$record->country_code];
+  $record->country_code3 = $GLOBALS['GEOIP_COUNTRY_CODES3'][$number];
+  $record->country_name = $GLOBALS['GEOIP_COUNTRY_NAMES'][$number];
+  if ($record->region != "") {
+    if (($record->country_code == "US") || ($record->country_code == "CA")){
+      $record->regionname = $GLOBALS['ISO'][$record->country_code][$record->region];
+    } else {
+      $record->regionname = $GLOBALS['FIPS'][$record->country_code][$record->region];
+    }
+  }
+  return $record;
+}
+
+
+function _get_record_v6($gi,$ipnum){
+  $seek_country = _geoip_seek_country_v6($gi,$ipnum);
+  if ($seek_country == $gi->databaseSegments) {
+    return NULL;
+  }
+  return _common_get_record($gi, $seek_country);
+}
+
+function _common_get_record($gi, $seek_country){
+  // workaround php's broken substr, strpos, etc handling with
+  // mbstring.func_overload and mbstring.internal_encoding
+  $enc = mb_internal_encoding();
+  mb_internal_encoding('ISO-8859-1'); 
+
+  $record_pointer = $seek_country + (2 * $gi->record_length - 1) * $gi->databaseSegments;
+  
+  if ($gi->flags & GEOIP_MEMORY_CACHE) {
+    $record_buf = substr($gi->memory_buffer,$record_pointer,FULL_RECORD_LENGTH);
+  } elseif ($gi->flags & GEOIP_SHARED_MEMORY){
+    $record_buf = @shmop_read($gi->shmid,$record_pointer,FULL_RECORD_LENGTH);
+  } else {
+    fseek($gi->filehandle, $record_pointer, SEEK_SET);
+    $record_buf = fread($gi->filehandle,FULL_RECORD_LENGTH);
+  }
+  $record = new geoiprecord;
+  $record_buf_pos = 0;
+  $char = ord(substr($record_buf,$record_buf_pos,1));
+    $record->country_code = $gi->GEOIP_COUNTRY_CODES[$char];
+    $record->country_code3 = $gi->GEOIP_COUNTRY_CODES3[$char];
+    $record->country_name = $gi->GEOIP_COUNTRY_NAMES[$char];
+  $record->continent_code = $gi->GEOIP_CONTINENT_CODES[$char];
+  $record_buf_pos++;
+  $str_length = 0;
+    // Get region
+  $char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
+  while ($char != 0){
+    $str_length++;
+    $char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
+  }
+  if ($str_length > 0){
+    $record->region = substr($record_buf,$record_buf_pos,$str_length);
+  }
+  $record_buf_pos += $str_length + 1;
+  $str_length = 0;
+    // Get city
+  $char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
+  while ($char != 0){
+    $str_length++;
+    $char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
+  }
+  if ($str_length > 0){
+    $record->city = substr($record_buf,$record_buf_pos,$str_length);
+  }
+  $record_buf_pos += $str_length + 1;
+  $str_length = 0;
+    // Get postal code
+  $char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
+  while ($char != 0){
+    $str_length++;
+    $char = ord(substr($record_buf,$record_buf_pos+$str_length,1));
+  }
+  if ($str_length > 0){
+    $record->postal_code = substr($record_buf,$record_buf_pos,$str_length);
+  }
+  $record_buf_pos += $str_length + 1;
+  $str_length = 0;
+    // Get latitude and longitude
+  $latitude = 0;
+  $longitude = 0;
+  for ($j = 0;$j < 3; ++$j){
+    $char = ord(substr($record_buf,$record_buf_pos++,1));
+    $latitude += ($char << ($j * 8));
+  }
+  $record->latitude = ($latitude/10000) - 180;
+  for ($j = 0;$j < 3; ++$j){
+    $char = ord(substr($record_buf,$record_buf_pos++,1));
+    $longitude += ($char << ($j * 8));
+  }
+  $record->longitude = ($longitude/10000) - 180;
+  if (GEOIP_CITY_EDITION_REV1 == $gi->databaseType){
+    $metroarea_combo = 0;
+    if ($record->country_code == "US"){
+      for ($j = 0;$j < 3;++$j){
+        $char = ord(substr($record_buf,$record_buf_pos++,1));
+        $metroarea_combo += ($char << ($j * 8));
+      }
+      $record->metro_code = $record->dma_code = floor($metroarea_combo/1000);
+      $record->area_code = $metroarea_combo%1000;
+    }
+  }
+  mb_internal_encoding($enc);
+  return $record;
+}
+
+function GeoIP_record_by_addr_v6 ($gi,$addr){
+  if ($addr == NULL){
+     return 0;
+  }
+  $ipnum = inet_pton($addr);
+  return _get_record_v6($gi, $ipnum);
+}
+
+function _get_record($gi,$ipnum){
+  $seek_country = _geoip_seek_country($gi,$ipnum);
+  if ($seek_country == $gi->databaseSegments) {
+    return NULL;
+  }
+  return _common_get_record($gi, $seek_country);
+}
+
+function GeoIP_record_by_addr ($gi,$addr){
+  if ($addr == NULL){
+     return 0;
+  }
+  $ipnum = ip2long($addr);
+  return _get_record($gi, $ipnum);
+}
+
+?>

Added: wwwdev/usage/geoipregionvars.php
===================================================================
--- wwwdev/usage/geoipregionvars.php	                        (rev 0)
+++ wwwdev/usage/geoipregionvars.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,4191 @@
+<?php
+# Copyright 2010 Maxmind LLC All Rights Reserved
+$GEOIP_REGION_NAME = array(
+"AD" => array(
+  "02" => "Canillo",
+  "03" => "Encamp",
+  "04" => "La Massana",
+  "05" => "Ordino",
+  "06" => "Sant Julia de Loria",
+  "07" => "Andorra la Vella",
+  "08" => "Escaldes-Engordany"),
+"AE" => array(
+  "01" => "Abu Dhabi",
+  "02" => "Ajman",
+  "03" => "Dubai",
+  "04" => "Fujairah",
+  "05" => "Ras Al Khaimah",
+  "06" => "Sharjah",
+  "07" => "Umm Al Quwain"),
+"AF" => array(
+  "01" => "Badakhshan",
+  "02" => "Badghis",
+  "03" => "Baghlan",
+  "05" => "Bamian",
+  "06" => "Farah",
+  "07" => "Faryab",
+  "08" => "Ghazni",
+  "09" => "Ghowr",
+  "10" => "Helmand",
+  "11" => "Herat",
+  "13" => "Kabol",
+  "14" => "Kapisa",
+  "17" => "Lowgar",
+  "18" => "Nangarhar",
+  "19" => "Nimruz",
+  "23" => "Kandahar",
+  "24" => "Kondoz",
+  "26" => "Takhar",
+  "27" => "Vardak",
+  "28" => "Zabol",
+  "29" => "Paktika",
+  "30" => "Balkh",
+  "31" => "Jowzjan",
+  "32" => "Samangan",
+  "33" => "Sar-e Pol",
+  "34" => "Konar",
+  "35" => "Laghman",
+  "36" => "Paktia",
+  "37" => "Khowst",
+  "38" => "Nurestan",
+  "39" => "Oruzgan",
+  "40" => "Parvan",
+  "41" => "Daykondi",
+  "42" => "Panjshir"),
+"AG" => array(
+  "01" => "Barbuda",
+  "03" => "Saint George",
+  "04" => "Saint John",
+  "05" => "Saint Mary",
+  "06" => "Saint Paul",
+  "07" => "Saint Peter",
+  "08" => "Saint Philip",
+  "09" => "Redonda"),
+"AL" => array(
+  "40" => "Berat",
+  "41" => "Diber",
+  "42" => "Durres",
+  "43" => "Elbasan",
+  "44" => "Fier",
+  "45" => "Gjirokaster",
+  "46" => "Korce",
+  "47" => "Kukes",
+  "48" => "Lezhe",
+  "49" => "Shkoder",
+  "50" => "Tirane",
+  "51" => "Vlore"),
+"AM" => array(
+  "01" => "Aragatsotn",
+  "02" => "Ararat",
+  "03" => "Armavir",
+  "04" => "Geghark'unik'",
+  "05" => "Kotayk'",
+  "06" => "Lorri",
+  "07" => "Shirak",
+  "08" => "Syunik'",
+  "09" => "Tavush",
+  "10" => "Vayots' Dzor",
+  "11" => "Yerevan"),
+"AO" => array(
+  "01" => "Benguela",
+  "02" => "Bie",
+  "03" => "Cabinda",
+  "04" => "Cuando Cubango",
+  "05" => "Cuanza Norte",
+  "06" => "Cuanza Sul",
+  "07" => "Cunene",
+  "08" => "Huambo",
+  "09" => "Huila",
+  "12" => "Malanje",
+  "13" => "Namibe",
+  "14" => "Moxico",
+  "15" => "Uige",
+  "16" => "Zaire",
+  "17" => "Lunda Norte",
+  "18" => "Lunda Sul",
+  "19" => "Bengo",
+  "20" => "Luanda"),
+"AR" => array(
+  "01" => "Buenos Aires",
+  "02" => "Catamarca",
+  "03" => "Chaco",
+  "04" => "Chubut",
+  "05" => "Cordoba",
+  "06" => "Corrientes",
+  "07" => "Distrito Federal",
+  "08" => "Entre Rios",
+  "09" => "Formosa",
+  "10" => "Jujuy",
+  "11" => "La Pampa",
+  "12" => "La Rioja",
+  "13" => "Mendoza",
+  "14" => "Misiones",
+  "15" => "Neuquen",
+  "16" => "Rio Negro",
+  "17" => "Salta",
+  "18" => "San Juan",
+  "19" => "San Luis",
+  "20" => "Santa Cruz",
+  "21" => "Santa Fe",
+  "22" => "Santiago del Estero",
+  "23" => "Tierra del Fuego",
+  "24" => "Tucuman"),
+"AT" => array(
+  "01" => "Burgenland",
+  "02" => "Karnten",
+  "03" => "Niederosterreich",
+  "04" => "Oberosterreich",
+  "05" => "Salzburg",
+  "06" => "Steiermark",
+  "07" => "Tirol",
+  "08" => "Vorarlberg",
+  "09" => "Wien"),
+"AU" => array(
+  "01" => "Australian Capital Territory",
+  "02" => "New South Wales",
+  "03" => "Northern Territory",
+  "04" => "Queensland",
+  "05" => "South Australia",
+  "06" => "Tasmania",
+  "07" => "Victoria",
+  "08" => "Western Australia"),
+"AZ" => array(
+  "01" => "Abseron",
+  "02" => "Agcabadi",
+  "03" => "Agdam",
+  "04" => "Agdas",
+  "05" => "Agstafa",
+  "06" => "Agsu",
+  "07" => "Ali Bayramli",
+  "08" => "Astara",
+  "09" => "Baki",
+  "10" => "Balakan",
+  "11" => "Barda",
+  "12" => "Beylaqan",
+  "13" => "Bilasuvar",
+  "14" => "Cabrayil",
+  "15" => "Calilabad",
+  "16" => "Daskasan",
+  "17" => "Davaci",
+  "18" => "Fuzuli",
+  "19" => "Gadabay",
+  "20" => "Ganca",
+  "21" => "Goranboy",
+  "22" => "Goycay",
+  "23" => "Haciqabul",
+  "24" => "Imisli",
+  "25" => "Ismayilli",
+  "26" => "Kalbacar",
+  "27" => "Kurdamir",
+  "28" => "Lacin",
+  "29" => "Lankaran",
+  "30" => "Lankaran",
+  "31" => "Lerik",
+  "32" => "Masalli",
+  "33" => "Mingacevir",
+  "34" => "Naftalan",
+  "35" => "Naxcivan",
+  "36" => "Neftcala",
+  "37" => "Oguz",
+  "38" => "Qabala",
+  "39" => "Qax",
+  "40" => "Qazax",
+  "41" => "Qobustan",
+  "42" => "Quba",
+  "43" => "Qubadli",
+  "44" => "Qusar",
+  "45" => "Saatli",
+  "46" => "Sabirabad",
+  "47" => "Saki",
+  "48" => "Saki",
+  "49" => "Salyan",
+  "50" => "Samaxi",
+  "51" => "Samkir",
+  "52" => "Samux",
+  "53" => "Siyazan",
+  "54" => "Sumqayit",
+  "55" => "Susa",
+  "56" => "Susa",
+  "57" => "Tartar",
+  "58" => "Tovuz",
+  "59" => "Ucar",
+  "60" => "Xacmaz",
+  "61" => "Xankandi",
+  "62" => "Xanlar",
+  "63" => "Xizi",
+  "64" => "Xocali",
+  "65" => "Xocavand",
+  "66" => "Yardimli",
+  "67" => "Yevlax",
+  "68" => "Yevlax",
+  "69" => "Zangilan",
+  "70" => "Zaqatala",
+  "71" => "Zardab"),
+"BA" => array(
+  "01" => "Federation of Bosnia and Herzegovina",
+  "02" => "Republika Srpska"),
+"BB" => array(
+  "01" => "Christ Church",
+  "02" => "Saint Andrew",
+  "03" => "Saint George",
+  "04" => "Saint James",
+  "05" => "Saint John",
+  "06" => "Saint Joseph",
+  "07" => "Saint Lucy",
+  "08" => "Saint Michael",
+  "09" => "Saint Peter",
+  "10" => "Saint Philip",
+  "11" => "Saint Thomas"),
+"BD" => array(
+  "81" => "Dhaka",
+  "82" => "Khulna",
+  "83" => "Rajshahi",
+  "84" => "Chittagong",
+  "85" => "Barisal",
+  "86" => "Sylhet"),
+"BE" => array(
+  "01" => "Antwerpen",
+  "03" => "Hainaut",
+  "04" => "Liege",
+  "05" => "Limburg",
+  "06" => "Luxembourg",
+  "07" => "Namur",
+  "08" => "Oost-Vlaanderen",
+  "09" => "West-Vlaanderen",
+  "10" => "Brabant Wallon",
+  "11" => "Brussels Hoofdstedelijk Gewest",
+  "12" => "Vlaams-Brabant"),
+"BF" => array(
+  "15" => "Bam",
+  "19" => "Boulkiemde",
+  "20" => "Ganzourgou",
+  "21" => "Gnagna",
+  "28" => "Kouritenga",
+  "33" => "Oudalan",
+  "34" => "Passore",
+  "36" => "Sanguie",
+  "40" => "Soum",
+  "42" => "Tapoa",
+  "44" => "Zoundweogo",
+  "45" => "Bale",
+  "46" => "Banwa",
+  "47" => "Bazega",
+  "48" => "Bougouriba",
+  "49" => "Boulgou",
+  "50" => "Gourma",
+  "51" => "Houet",
+  "52" => "Ioba",
+  "53" => "Kadiogo",
+  "54" => "Kenedougou",
+  "55" => "Komoe",
+  "56" => "Komondjari",
+  "57" => "Kompienga",
+  "58" => "Kossi",
+  "59" => "Koulpelogo",
+  "60" => "Kourweogo",
+  "61" => "Leraba",
+  "62" => "Loroum",
+  "63" => "Mouhoun",
+  "64" => "Namentenga",
+  "65" => "Naouri",
+  "66" => "Nayala",
+  "67" => "Noumbiel",
+  "68" => "Oubritenga",
+  "69" => "Poni",
+  "70" => "Sanmatenga",
+  "71" => "Seno",
+  "72" => "Sissili",
+  "73" => "Sourou",
+  "74" => "Tuy",
+  "75" => "Yagha",
+  "76" => "Yatenga",
+  "77" => "Ziro",
+  "78" => "Zondoma"),
+"BG" => array(
+  "33" => "Mikhaylovgrad",
+  "38" => "Blagoevgrad",
+  "39" => "Burgas",
+  "40" => "Dobrich",
+  "41" => "Gabrovo",
+  "42" => "Grad Sofiya",
+  "43" => "Khaskovo",
+  "44" => "Kurdzhali",
+  "45" => "Kyustendil",
+  "46" => "Lovech",
+  "47" => "Montana",
+  "48" => "Pazardzhik",
+  "49" => "Pernik",
+  "50" => "Pleven",
+  "51" => "Plovdiv",
+  "52" => "Razgrad",
+  "53" => "Ruse",
+  "54" => "Shumen",
+  "55" => "Silistra",
+  "56" => "Sliven",
+  "57" => "Smolyan",
+  "58" => "Sofiya",
+  "59" => "Stara Zagora",
+  "60" => "Turgovishte",
+  "61" => "Varna",
+  "62" => "Veliko Turnovo",
+  "63" => "Vidin",
+  "64" => "Vratsa",
+  "65" => "Yambol"),
+"BH" => array(
+  "01" => "Al Hadd",
+  "02" => "Al Manamah",
+  "05" => "Jidd Hafs",
+  "06" => "Sitrah",
+  "08" => "Al Mintaqah al Gharbiyah",
+  "09" => "Mintaqat Juzur Hawar",
+  "10" => "Al Mintaqah ash Shamaliyah",
+  "11" => "Al Mintaqah al Wusta",
+  "12" => "Madinat",
+  "13" => "Ar Rifa",
+  "14" => "Madinat Hamad",
+  "15" => "Al Muharraq",
+  "16" => "Al Asimah",
+  "17" => "Al Janubiyah",
+  "18" => "Ash Shamaliyah",
+  "19" => "Al Wusta"),
+"BI" => array(
+  "02" => "Bujumbura",
+  "09" => "Bubanza",
+  "10" => "Bururi",
+  "11" => "Cankuzo",
+  "12" => "Cibitoke",
+  "13" => "Gitega",
+  "14" => "Karuzi",
+  "15" => "Kayanza",
+  "16" => "Kirundo",
+  "17" => "Makamba",
+  "18" => "Muyinga",
+  "19" => "Ngozi",
+  "20" => "Rutana",
+  "21" => "Ruyigi",
+  "22" => "Muramvya",
+  "23" => "Mwaro"),
+"BJ" => array(
+  "07" => "Alibori",
+  "08" => "Atakora",
+  "09" => "Atlanyique",
+  "10" => "Borgou",
+  "11" => "Collines",
+  "12" => "Kouffo",
+  "13" => "Donga",
+  "14" => "Littoral",
+  "15" => "Mono",
+  "16" => "Oueme",
+  "17" => "Plateau",
+  "18" => "Zou"),
+"BM" => array(
+  "01" => "Devonshire",
+  "02" => "Hamilton",
+  "03" => "Hamilton",
+  "04" => "Paget",
+  "05" => "Pembroke",
+  "06" => "Saint George",
+  "07" => "Saint George's",
+  "08" => "Sandys",
+  "09" => "Smiths",
+  "10" => "Southampton",
+  "11" => "Warwick"),
+"BN" => array(
+  "07" => "Alibori",
+  "08" => "Belait",
+  "09" => "Brunei and Muara",
+  "10" => "Temburong",
+  "11" => "Collines",
+  "12" => "Kouffo",
+  "13" => "Donga",
+  "14" => "Littoral",
+  "15" => "Tutong",
+  "16" => "Oueme",
+  "17" => "Plateau",
+  "18" => "Zou"),
+"BO" => array(
+  "01" => "Chuquisaca",
+  "02" => "Cochabamba",
+  "03" => "El Beni",
+  "04" => "La Paz",
+  "05" => "Oruro",
+  "06" => "Pando",
+  "07" => "Potosi",
+  "08" => "Santa Cruz",
+  "09" => "Tarija"),
+"BR" => array(
+  "01" => "Acre",
+  "02" => "Alagoas",
+  "03" => "Amapa",
+  "04" => "Amazonas",
+  "05" => "Bahia",
+  "06" => "Ceara",
+  "07" => "Distrito Federal",
+  "08" => "Espirito Santo",
+  "11" => "Mato Grosso do Sul",
+  "13" => "Maranhao",
+  "14" => "Mato Grosso",
+  "15" => "Minas Gerais",
+  "16" => "Para",
+  "17" => "Paraiba",
+  "18" => "Parana",
+  "20" => "Piaui",
+  "21" => "Rio de Janeiro",
+  "22" => "Rio Grande do Norte",
+  "23" => "Rio Grande do Sul",
+  "24" => "Rondonia",
+  "25" => "Roraima",
+  "26" => "Santa Catarina",
+  "27" => "Sao Paulo",
+  "28" => "Sergipe",
+  "29" => "Goias",
+  "30" => "Pernambuco",
+  "31" => "Tocantins"),
+"BS" => array(
+  "05" => "Bimini",
+  "06" => "Cat Island",
+  "10" => "Exuma",
+  "13" => "Inagua",
+  "15" => "Long Island",
+  "16" => "Mayaguana",
+  "18" => "Ragged Island",
+  "22" => "Harbour Island",
+  "23" => "New Providence",
+  "24" => "Acklins and Crooked Islands",
+  "25" => "Freeport",
+  "26" => "Fresh Creek",
+  "27" => "Governor's Harbour",
+  "28" => "Green Turtle Cay",
+  "29" => "High Rock",
+  "30" => "Kemps Bay",
+  "31" => "Marsh Harbour",
+  "32" => "Nichollstown and Berry Islands",
+  "33" => "Rock Sound",
+  "34" => "Sandy Point",
+  "35" => "San Salvador and Rum Cay"),
+"BT" => array(
+  "05" => "Bumthang",
+  "06" => "Chhukha",
+  "07" => "Chirang",
+  "08" => "Daga",
+  "09" => "Geylegphug",
+  "10" => "Ha",
+  "11" => "Lhuntshi",
+  "12" => "Mongar",
+  "13" => "Paro",
+  "14" => "Pemagatsel",
+  "15" => "Punakha",
+  "16" => "Samchi",
+  "17" => "Samdrup",
+  "18" => "Shemgang",
+  "19" => "Tashigang",
+  "20" => "Thimphu",
+  "21" => "Tongsa",
+  "22" => "Wangdi Phodrang"),
+"BW" => array(
+  "01" => "Central",
+  "03" => "Ghanzi",
+  "04" => "Kgalagadi",
+  "05" => "Kgatleng",
+  "06" => "Kweneng",
+  "08" => "North-East",
+  "09" => "South-East",
+  "10" => "Southern",
+  "11" => "North-West"),
+"BY" => array(
+  "01" => "Brestskaya Voblasts'",
+  "02" => "Homyel'skaya Voblasts'",
+  "03" => "Hrodzyenskaya Voblasts'",
+  "04" => "Minsk",
+  "05" => "Minskaya Voblasts'",
+  "06" => "Mahilyowskaya Voblasts'",
+  "07" => "Vitsyebskaya Voblasts'"),
+"BZ" => array(
+  "01" => "Belize",
+  "02" => "Cayo",
+  "03" => "Corozal",
+  "04" => "Orange Walk",
+  "05" => "Stann Creek",
+  "06" => "Toledo"),
+"CA" => array(
+  "AB" => "Alberta",
+  "BC" => "British Columbia",
+  "MB" => "Manitoba",
+  "NB" => "New Brunswick",
+  "NL" => "Newfoundland",
+  "NS" => "Nova Scotia",
+  "NT" => "Northwest Territories",
+  "NU" => "Nunavut",
+  "ON" => "Ontario",
+  "PE" => "Prince Edward Island",
+  "QC" => "Quebec",
+  "SK" => "Saskatchewan",
+  "YT" => "Yukon Territory"),
+"CD" => array(
+  "01" => "Bandundu",
+  "02" => "Equateur",
+  "04" => "Kasai-Oriental",
+  "05" => "Katanga",
+  "06" => "Kinshasa",
+  "08" => "Bas-Congo",
+  "09" => "Orientale",
+  "10" => "Maniema",
+  "11" => "Nord-Kivu",
+  "12" => "Sud-Kivu"),
+"CF" => array(
+  "01" => "Bamingui-Bangoran",
+  "02" => "Basse-Kotto",
+  "03" => "Haute-Kotto",
+  "04" => "Mambere-Kadei",
+  "05" => "Haut-Mbomou",
+  "06" => "Kemo",
+  "07" => "Lobaye",
+  "08" => "Mbomou",
+  "09" => "Nana-Mambere",
+  "11" => "Ouaka",
+  "12" => "Ouham",
+  "13" => "Ouham-Pende",
+  "14" => "Cuvette-Ouest",
+  "15" => "Nana-Grebizi",
+  "16" => "Sangha-Mbaere",
+  "17" => "Ombella-Mpoko",
+  "18" => "Bangui"),
+"CG" => array(
+  "01" => "Bouenza",
+  "04" => "Kouilou",
+  "05" => "Lekoumou",
+  "06" => "Likouala",
+  "07" => "Niari",
+  "08" => "Plateaux",
+  "10" => "Sangha",
+  "11" => "Pool",
+  "12" => "Brazzaville",
+  "13" => "Cuvette",
+  "14" => "Cuvette-Ouest"),
+"CH" => array(
+  "01" => "Aargau",
+  "02" => "Ausser-Rhoden",
+  "03" => "Basel-Landschaft",
+  "04" => "Basel-Stadt",
+  "05" => "Bern",
+  "06" => "Fribourg",
+  "07" => "Geneve",
+  "08" => "Glarus",
+  "09" => "Graubunden",
+  "10" => "Inner-Rhoden",
+  "11" => "Luzern",
+  "12" => "Neuchatel",
+  "13" => "Nidwalden",
+  "14" => "Obwalden",
+  "15" => "Sankt Gallen",
+  "16" => "Schaffhausen",
+  "17" => "Schwyz",
+  "18" => "Solothurn",
+  "19" => "Thurgau",
+  "20" => "Ticino",
+  "21" => "Uri",
+  "22" => "Valais",
+  "23" => "Vaud",
+  "24" => "Zug",
+  "25" => "Zurich",
+  "26" => "Jura"),
+"CI" => array(
+  "74" => "Agneby",
+  "75" => "Bafing",
+  "76" => "Bas-Sassandra",
+  "77" => "Denguele",
+  "78" => "Dix-Huit Montagnes",
+  "79" => "Fromager",
+  "80" => "Haut-Sassandra",
+  "81" => "Lacs",
+  "82" => "Lagunes",
+  "83" => "Marahoue",
+  "84" => "Moyen-Cavally",
+  "85" => "Moyen-Comoe",
+  "86" => "N'zi-Comoe",
+  "87" => "Savanes",
+  "88" => "Sud-Bandama",
+  "89" => "Sud-Comoe",
+  "90" => "Vallee du Bandama",
+  "91" => "Worodougou",
+  "92" => "Zanzan"),
+"CL" => array(
+  "01" => "Valparaiso",
+  "02" => "Aisen del General Carlos Ibanez del Campo",
+  "03" => "Antofagasta",
+  "04" => "Araucania",
+  "05" => "Atacama",
+  "06" => "Bio-Bio",
+  "07" => "Coquimbo",
+  "08" => "Libertador General Bernardo O'Higgins",
+  "09" => "Los Lagos",
+  "10" => "Magallanes y de la Antartica Chilena",
+  "11" => "Maule",
+  "12" => "Region Metropolitana",
+  "13" => "Tarapaca",
+  "14" => "Los Lagos",
+  "15" => "Tarapaca",
+  "16" => "Arica y Parinacota",
+  "17" => "Los Rios"),
+"CM" => array(
+  "04" => "Est",
+  "05" => "Littoral",
+  "07" => "Nord-Ouest",
+  "08" => "Ouest",
+  "09" => "Sud-Ouest",
+  "10" => "Adamaoua",
+  "11" => "Centre",
+  "12" => "Extreme-Nord",
+  "13" => "Nord",
+  "14" => "Sud"),
+"CN" => array(
+  "01" => "Anhui",
+  "02" => "Zhejiang",
+  "03" => "Jiangxi",
+  "04" => "Jiangsu",
+  "05" => "Jilin",
+  "06" => "Qinghai",
+  "07" => "Fujian",
+  "08" => "Heilongjiang",
+  "09" => "Henan",
+  "10" => "Hebei",
+  "11" => "Hunan",
+  "12" => "Hubei",
+  "13" => "Xinjiang",
+  "14" => "Xizang",
+  "15" => "Gansu",
+  "16" => "Guangxi",
+  "18" => "Guizhou",
+  "19" => "Liaoning",
+  "20" => "Nei Mongol",
+  "21" => "Ningxia",
+  "22" => "Beijing",
+  "23" => "Shanghai",
+  "24" => "Shanxi",
+  "25" => "Shandong",
+  "26" => "Shaanxi",
+  "28" => "Tianjin",
+  "29" => "Yunnan",
+  "30" => "Guangdong",
+  "31" => "Hainan",
+  "32" => "Sichuan",
+  "33" => "Chongqing"),
+"CO" => array(
+  "01" => "Amazonas",
+  "02" => "Antioquia",
+  "03" => "Arauca",
+  "04" => "Atlantico",
+  "05" => "Bolivar Department",
+  "06" => "Boyaca Department",
+  "07" => "Caldas Department",
+  "08" => "Caqueta",
+  "09" => "Cauca",
+  "10" => "Cesar",
+  "11" => "Choco",
+  "12" => "Cordoba",
+  "14" => "Guaviare",
+  "15" => "Guainia",
+  "16" => "Huila",
+  "17" => "La Guajira",
+  "18" => "Magdalena Department",
+  "19" => "Meta",
+  "20" => "Narino",
+  "21" => "Norte de Santander",
+  "22" => "Putumayo",
+  "23" => "Quindio",
+  "24" => "Risaralda",
+  "25" => "San Andres y Providencia",
+  "26" => "Santander",
+  "27" => "Sucre",
+  "28" => "Tolima",
+  "29" => "Valle del Cauca",
+  "30" => "Vaupes",
+  "31" => "Vichada",
+  "32" => "Casanare",
+  "33" => "Cundinamarca",
+  "34" => "Distrito Especial",
+  "35" => "Bolivar",
+  "36" => "Boyaca",
+  "37" => "Caldas",
+  "38" => "Magdalena"),
+"CR" => array(
+  "01" => "Alajuela",
+  "02" => "Cartago",
+  "03" => "Guanacaste",
+  "04" => "Heredia",
+  "06" => "Limon",
+  "07" => "Puntarenas",
+  "08" => "San Jose"),
+"CU" => array(
+  "01" => "Pinar del Rio",
+  "02" => "Ciudad de la Habana",
+  "03" => "Matanzas",
+  "04" => "Isla de la Juventud",
+  "05" => "Camaguey",
+  "07" => "Ciego de Avila",
+  "08" => "Cienfuegos",
+  "09" => "Granma",
+  "10" => "Guantanamo",
+  "11" => "La Habana",
+  "12" => "Holguin",
+  "13" => "Las Tunas",
+  "14" => "Sancti Spiritus",
+  "15" => "Santiago de Cuba",
+  "16" => "Villa Clara"),
+"CV" => array(
+  "01" => "Boa Vista",
+  "02" => "Brava",
+  "04" => "Maio",
+  "05" => "Paul",
+  "07" => "Ribeira Grande",
+  "08" => "Sal",
+  "10" => "Sao Nicolau",
+  "11" => "Sao Vicente",
+  "13" => "Mosteiros",
+  "14" => "Praia",
+  "15" => "Santa Catarina",
+  "16" => "Santa Cruz",
+  "17" => "Sao Domingos",
+  "18" => "Sao Filipe",
+  "19" => "Sao Miguel",
+  "20" => "Tarrafal"),
+"CY" => array(
+  "01" => "Famagusta",
+  "02" => "Kyrenia",
+  "03" => "Larnaca",
+  "04" => "Nicosia",
+  "05" => "Limassol",
+  "06" => "Paphos"),
+"CZ" => array(
+  "52" => "Hlavni mesto Praha",
+  "78" => "Jihomoravsky kraj",
+  "79" => "Jihocesky kraj",
+  "80" => "Vysocina",
+  "81" => "Karlovarsky kraj",
+  "82" => "Kralovehradecky kraj",
+  "83" => "Liberecky kraj",
+  "84" => "Olomoucky kraj",
+  "85" => "Moravskoslezsky kraj",
+  "86" => "Pardubicky kraj",
+  "87" => "Plzensky kraj",
+  "88" => "Stredocesky kraj",
+  "89" => "Ustecky kraj",
+  "90" => "Zlinsky kraj"),
+"DE" => array(
+  "01" => "Baden-Wurttemberg",
+  "02" => "Bayern",
+  "03" => "Bremen",
+  "04" => "Hamburg",
+  "05" => "Hessen",
+  "06" => "Niedersachsen",
+  "07" => "Nordrhein-Westfalen",
+  "08" => "Rheinland-Pfalz",
+  "09" => "Saarland",
+  "10" => "Schleswig-Holstein",
+  "11" => "Brandenburg",
+  "12" => "Mecklenburg-Vorpommern",
+  "13" => "Sachsen",
+  "14" => "Sachsen-Anhalt",
+  "15" => "Thuringen",
+  "16" => "Berlin"),
+"DJ" => array(
+  "01" => "Ali Sabieh",
+  "04" => "Obock",
+  "05" => "Tadjoura",
+  "06" => "Dikhil",
+  "07" => "Djibouti",
+  "08" => "Arta"),
+"DK" => array(
+  "17" => "Hovedstaden",
+  "18" => "Midtjylland",
+  "19" => "Nordjylland",
+  "20" => "Sjelland",
+  "21" => "Syddanmark"),
+"DM" => array(
+  "02" => "Saint Andrew",
+  "03" => "Saint David",
+  "04" => "Saint George",
+  "05" => "Saint John",
+  "06" => "Saint Joseph",
+  "07" => "Saint Luke",
+  "08" => "Saint Mark",
+  "09" => "Saint Patrick",
+  "10" => "Saint Paul",
+  "11" => "Saint Peter"),
+"DO" => array(
+  "01" => "Azua",
+  "02" => "Baoruco",
+  "03" => "Barahona",
+  "04" => "Dajabon",
+  "05" => "Distrito Nacional",
+  "06" => "Duarte",
+  "08" => "Espaillat",
+  "09" => "Independencia",
+  "10" => "La Altagracia",
+  "11" => "Elias Pina",
+  "12" => "La Romana",
+  "14" => "Maria Trinidad Sanchez",
+  "15" => "Monte Cristi",
+  "16" => "Pedernales",
+  "17" => "Peravia",
+  "18" => "Puerto Plata",
+  "19" => "Salcedo",
+  "20" => "Samana",
+  "21" => "Sanchez Ramirez",
+  "23" => "San Juan",
+  "24" => "San Pedro De Macoris",
+  "25" => "Santiago",
+  "26" => "Santiago Rodriguez",
+  "27" => "Valverde",
+  "28" => "El Seibo",
+  "29" => "Hato Mayor",
+  "30" => "La Vega",
+  "31" => "Monsenor Nouel",
+  "32" => "Monte Plata",
+  "33" => "San Cristobal",
+  "34" => "Distrito Nacional",
+  "35" => "Peravia",
+  "36" => "San Jose de Ocoa",
+  "37" => "Santo Domingo"),
+"DZ" => array(
+  "01" => "Alger",
+  "03" => "Batna",
+  "04" => "Constantine",
+  "06" => "Medea",
+  "07" => "Mostaganem",
+  "09" => "Oran",
+  "10" => "Saida",
+  "12" => "Setif",
+  "13" => "Tiaret",
+  "14" => "Tizi Ouzou",
+  "15" => "Tlemcen",
+  "18" => "Bejaia",
+  "19" => "Biskra",
+  "20" => "Blida",
+  "21" => "Bouira",
+  "22" => "Djelfa",
+  "23" => "Guelma",
+  "24" => "Jijel",
+  "25" => "Laghouat",
+  "26" => "Mascara",
+  "27" => "M'sila",
+  "29" => "Oum el Bouaghi",
+  "30" => "Sidi Bel Abbes",
+  "31" => "Skikda",
+  "33" => "Tebessa",
+  "34" => "Adrar",
+  "35" => "Ain Defla",
+  "36" => "Ain Temouchent",
+  "37" => "Annaba",
+  "38" => "Bechar",
+  "39" => "Bordj Bou Arreridj",
+  "40" => "Boumerdes",
+  "41" => "Chlef",
+  "42" => "El Bayadh",
+  "43" => "El Oued",
+  "44" => "El Tarf",
+  "45" => "Ghardaia",
+  "46" => "Illizi",
+  "47" => "Khenchela",
+  "48" => "Mila",
+  "49" => "Naama",
+  "50" => "Ouargla",
+  "51" => "Relizane",
+  "52" => "Souk Ahras",
+  "53" => "Tamanghasset",
+  "54" => "Tindouf",
+  "55" => "Tipaza",
+  "56" => "Tissemsilt"),
+"EC" => array(
+  "01" => "Galapagos",
+  "02" => "Azuay",
+  "03" => "Bolivar",
+  "04" => "Canar",
+  "05" => "Carchi",
+  "06" => "Chimborazo",
+  "07" => "Cotopaxi",
+  "08" => "El Oro",
+  "09" => "Esmeraldas",
+  "10" => "Guayas",
+  "11" => "Imbabura",
+  "12" => "Loja",
+  "13" => "Los Rios",
+  "14" => "Manabi",
+  "15" => "Morona-Santiago",
+  "17" => "Pastaza",
+  "18" => "Pichincha",
+  "19" => "Tungurahua",
+  "20" => "Zamora-Chinchipe",
+  "22" => "Sucumbios",
+  "23" => "Napo",
+  "24" => "Orellana"),
+"EE" => array(
+  "01" => "Harjumaa",
+  "02" => "Hiiumaa",
+  "03" => "Ida-Virumaa",
+  "04" => "Jarvamaa",
+  "05" => "Jogevamaa",
+  "06" => "Kohtla-Jarve",
+  "07" => "Laanemaa",
+  "08" => "Laane-Virumaa",
+  "09" => "Narva",
+  "10" => "Parnu",
+  "11" => "Parnumaa",
+  "12" => "Polvamaa",
+  "13" => "Raplamaa",
+  "14" => "Saaremaa",
+  "15" => "Sillamae",
+  "16" => "Tallinn",
+  "17" => "Tartu",
+  "18" => "Tartumaa",
+  "19" => "Valgamaa",
+  "20" => "Viljandimaa",
+  "21" => "Vorumaa"),
+"EG" => array(
+  "01" => "Ad Daqahliyah",
+  "02" => "Al Bahr al Ahmar",
+  "03" => "Al Buhayrah",
+  "04" => "Al Fayyum",
+  "05" => "Al Gharbiyah",
+  "06" => "Al Iskandariyah",
+  "07" => "Al Isma'iliyah",
+  "08" => "Al Jizah",
+  "09" => "Al Minufiyah",
+  "10" => "Al Minya",
+  "11" => "Al Qahirah",
+  "12" => "Al Qalyubiyah",
+  "13" => "Al Wadi al Jadid",
+  "14" => "Ash Sharqiyah",
+  "15" => "As Suways",
+  "16" => "Aswan",
+  "17" => "Asyut",
+  "18" => "Bani Suwayf",
+  "19" => "Bur Sa'id",
+  "20" => "Dumyat",
+  "21" => "Kafr ash Shaykh",
+  "22" => "Matruh",
+  "23" => "Qina",
+  "24" => "Suhaj",
+  "26" => "Janub Sina'",
+  "27" => "Shamal Sina'"),
+"ER" => array(
+  "01" => "Anseba",
+  "02" => "Debub",
+  "03" => "Debubawi K'eyih Bahri",
+  "04" => "Gash Barka",
+  "05" => "Ma'akel",
+  "06" => "Semenawi K'eyih Bahri"),
+"ES" => array(
+  "07" => "Islas Baleares",
+  "27" => "La Rioja",
+  "29" => "Madrid",
+  "31" => "Murcia",
+  "32" => "Navarra",
+  "34" => "Asturias",
+  "39" => "Cantabria",
+  "51" => "Andalucia",
+  "52" => "Aragon",
+  "53" => "Canarias",
+  "54" => "Castilla-La Mancha",
+  "55" => "Castilla y Leon",
+  "56" => "Catalonia",
+  "57" => "Extremadura",
+  "58" => "Galicia",
+  "59" => "Pais Vasco",
+  "60" => "Comunidad Valenciana"),
+"ET" => array(
+  "44" => "Adis Abeba",
+  "45" => "Afar",
+  "46" => "Amara",
+  "47" => "Binshangul Gumuz",
+  "48" => "Dire Dawa",
+  "49" => "Gambela Hizboch",
+  "50" => "Hareri Hizb",
+  "51" => "Oromiya",
+  "52" => "Sumale",
+  "53" => "Tigray",
+  "54" => "YeDebub Biheroch Bihereseboch na Hizboch"),
+"FI" => array(
+  "01" => "Aland",
+  "06" => "Lapland",
+  "08" => "Oulu",
+  "13" => "Southern Finland",
+  "14" => "Eastern Finland",
+  "15" => "Western Finland"),
+"FJ" => array(
+  "01" => "Central",
+  "02" => "Eastern",
+  "03" => "Northern",
+  "04" => "Rotuma",
+  "05" => "Western"),
+"FM" => array(
+  "01" => "Kosrae",
+  "02" => "Pohnpei",
+  "03" => "Chuuk",
+  "04" => "Yap"),
+"FR" => array(
+  "97" => "Aquitaine",
+  "98" => "Auvergne",
+  "99" => "Basse-Normandie",
+  "A1" => "Bourgogne",
+  "A2" => "Bretagne",
+  "A3" => "Centre",
+  "A4" => "Champagne-Ardenne",
+  "A5" => "Corse",
+  "A6" => "Franche-Comte",
+  "A7" => "Haute-Normandie",
+  "A8" => "Ile-de-France",
+  "A9" => "Languedoc-Roussillon",
+  "B1" => "Limousin",
+  "B2" => "Lorraine",
+  "B3" => "Midi-Pyrenees",
+  "B4" => "Nord-Pas-de-Calais",
+  "B5" => "Pays de la Loire",
+  "B6" => "Picardie",
+  "B7" => "Poitou-Charentes",
+  "B8" => "Provence-Alpes-Cote d'Azur",
+  "B9" => "Rhone-Alpes",
+  "C1" => "Alsace"),
+"GA" => array(
+  "01" => "Estuaire",
+  "02" => "Haut-Ogooue",
+  "03" => "Moyen-Ogooue",
+  "04" => "Ngounie",
+  "05" => "Nyanga",
+  "06" => "Ogooue-Ivindo",
+  "07" => "Ogooue-Lolo",
+  "08" => "Ogooue-Maritime",
+  "09" => "Woleu-Ntem"),
+"GB" => array(
+  "A1" => "Barking and Dagenham",
+  "A2" => "Barnet",
+  "A3" => "Barnsley",
+  "A4" => "Bath and North East Somerset",
+  "A5" => "Bedfordshire",
+  "A6" => "Bexley",
+  "A7" => "Birmingham",
+  "A8" => "Blackburn with Darwen",
+  "A9" => "Blackpool",
+  "B1" => "Bolton",
+  "B2" => "Bournemouth",
+  "B3" => "Bracknell Forest",
+  "B4" => "Bradford",
+  "B5" => "Brent",
+  "B6" => "Brighton and Hove",
+  "B7" => "Bristol, City of",
+  "B8" => "Bromley",
+  "B9" => "Buckinghamshire",
+  "C1" => "Bury",
+  "C2" => "Calderdale",
+  "C3" => "Cambridgeshire",
+  "C4" => "Camden",
+  "C5" => "Cheshire",
+  "C6" => "Cornwall",
+  "C7" => "Coventry",
+  "C8" => "Croydon",
+  "C9" => "Cumbria",
+  "D1" => "Darlington",
+  "D2" => "Derby",
+  "D3" => "Derbyshire",
+  "D4" => "Devon",
+  "D5" => "Doncaster",
+  "D6" => "Dorset",
+  "D7" => "Dudley",
+  "D8" => "Durham",
+  "D9" => "Ealing",
+  "E1" => "East Riding of Yorkshire",
+  "E2" => "East Sussex",
+  "E3" => "Enfield",
+  "E4" => "Essex",
+  "E5" => "Gateshead",
+  "E6" => "Gloucestershire",
+  "E7" => "Greenwich",
+  "E8" => "Hackney",
+  "E9" => "Halton",
+  "F1" => "Hammersmith and Fulham",
+  "F2" => "Hampshire",
+  "F3" => "Haringey",
+  "F4" => "Harrow",
+  "F5" => "Hartlepool",
+  "F6" => "Havering",
+  "F7" => "Herefordshire",
+  "F8" => "Hertford",
+  "F9" => "Hillingdon",
+  "G1" => "Hounslow",
+  "G2" => "Isle of Wight",
+  "G3" => "Islington",
+  "G4" => "Kensington and Chelsea",
+  "G5" => "Kent",
+  "G6" => "Kingston upon Hull, City of",
+  "G7" => "Kingston upon Thames",
+  "G8" => "Kirklees",
+  "G9" => "Knowsley",
+  "H1" => "Lambeth",
+  "H2" => "Lancashire",
+  "H3" => "Leeds",
+  "H4" => "Leicester",
+  "H5" => "Leicestershire",
+  "H6" => "Lewisham",
+  "H7" => "Lincolnshire",
+  "H8" => "Liverpool",
+  "H9" => "London, City of",
+  "I1" => "Luton",
+  "I2" => "Manchester",
+  "I3" => "Medway",
+  "I4" => "Merton",
+  "I5" => "Middlesbrough",
+  "I6" => "Milton Keynes",
+  "I7" => "Newcastle upon Tyne",
+  "I8" => "Newham",
+  "I9" => "Norfolk",
+  "J1" => "Northamptonshire",
+  "J2" => "North East Lincolnshire",
+  "J3" => "North Lincolnshire",
+  "J4" => "North Somerset",
+  "J5" => "North Tyneside",
+  "J6" => "Northumberland",
+  "J7" => "North Yorkshire",
+  "J8" => "Nottingham",
+  "J9" => "Nottinghamshire",
+  "K1" => "Oldham",
+  "K2" => "Oxfordshire",
+  "K3" => "Peterborough",
+  "K4" => "Plymouth",
+  "K5" => "Poole",
+  "K6" => "Portsmouth",
+  "K7" => "Reading",
+  "K8" => "Redbridge",
+  "K9" => "Redcar and Cleveland",
+  "L1" => "Richmond upon Thames",
+  "L2" => "Rochdale",
+  "L3" => "Rotherham",
+  "L4" => "Rutland",
+  "L5" => "Salford",
+  "L6" => "Shropshire",
+  "L7" => "Sandwell",
+  "L8" => "Sefton",
+  "L9" => "Sheffield",
+  "M1" => "Slough",
+  "M2" => "Solihull",
+  "M3" => "Somerset",
+  "M4" => "Southampton",
+  "M5" => "Southend-on-Sea",
+  "M6" => "South Gloucestershire",
+  "M7" => "South Tyneside",
+  "M8" => "Southwark",
+  "M9" => "Staffordshire",
+  "N1" => "St. Helens",
+  "N2" => "Stockport",
+  "N3" => "Stockton-on-Tees",
+  "N4" => "Stoke-on-Trent",
+  "N5" => "Suffolk",
+  "N6" => "Sunderland",
+  "N7" => "Surrey",
+  "N8" => "Sutton",
+  "N9" => "Swindon",
+  "O1" => "Tameside",
+  "O2" => "Telford and Wrekin",
+  "O3" => "Thurrock",
+  "O4" => "Torbay",
+  "O5" => "Tower Hamlets",
+  "O6" => "Trafford",
+  "O7" => "Wakefield",
+  "O8" => "Walsall",
+  "O9" => "Waltham Forest",
+  "P1" => "Wandsworth",
+  "P2" => "Warrington",
+  "P3" => "Warwickshire",
+  "P4" => "West Berkshire",
+  "P5" => "Westminster",
+  "P6" => "West Sussex",
+  "P7" => "Wigan",
+  "P8" => "Wiltshire",
+  "P9" => "Windsor and Maidenhead",
+  "Q1" => "Wirral",
+  "Q2" => "Wokingham",
+  "Q3" => "Wolverhampton",
+  "Q4" => "Worcestershire",
+  "Q5" => "York",
+  "Q6" => "Antrim",
+  "Q7" => "Ards",
+  "Q8" => "Armagh",
+  "Q9" => "Ballymena",
+  "R1" => "Ballymoney",
+  "R2" => "Banbridge",
+  "R3" => "Belfast",
+  "R4" => "Carrickfergus",
+  "R5" => "Castlereagh",
+  "R6" => "Coleraine",
+  "R7" => "Cookstown",
+  "R8" => "Craigavon",
+  "R9" => "Down",
+  "S1" => "Dungannon",
+  "S2" => "Fermanagh",
+  "S3" => "Larne",
+  "S4" => "Limavady",
+  "S5" => "Lisburn",
+  "S6" => "Derry",
+  "S7" => "Magherafelt",
+  "S8" => "Moyle",
+  "S9" => "Newry and Mourne",
+  "T1" => "Newtownabbey",
+  "T2" => "North Down",
+  "T3" => "Omagh",
+  "T4" => "Strabane",
+  "T5" => "Aberdeen City",
+  "T6" => "Aberdeenshire",
+  "T7" => "Angus",
+  "T8" => "Argyll and Bute",
+  "T9" => "Scottish Borders, The",
+  "U1" => "Clackmannanshire",
+  "U2" => "Dumfries and Galloway",
+  "U3" => "Dundee City",
+  "U4" => "East Ayrshire",
+  "U5" => "East Dunbartonshire",
+  "U6" => "East Lothian",
+  "U7" => "East Renfrewshire",
+  "U8" => "Edinburgh, City of",
+  "U9" => "Falkirk",
+  "V1" => "Fife",
+  "V2" => "Glasgow City",
+  "V3" => "Highland",
+  "V4" => "Inverclyde",
+  "V5" => "Midlothian",
+  "V6" => "Moray",
+  "V7" => "North Ayrshire",
+  "V8" => "North Lanarkshire",
+  "V9" => "Orkney",
+  "W1" => "Perth and Kinross",
+  "W2" => "Renfrewshire",
+  "W3" => "Shetland Islands",
+  "W4" => "South Ayrshire",
+  "W5" => "South Lanarkshire",
+  "W6" => "Stirling",
+  "W7" => "West Dunbartonshire",
+  "W8" => "Eilean Siar",
+  "W9" => "West Lothian",
+  "X1" => "Isle of Anglesey",
+  "X2" => "Blaenau Gwent",
+  "X3" => "Bridgend",
+  "X4" => "Caerphilly",
+  "X5" => "Cardiff",
+  "X6" => "Ceredigion",
+  "X7" => "Carmarthenshire",
+  "X8" => "Conwy",
+  "X9" => "Denbighshire",
+  "Y1" => "Flintshire",
+  "Y2" => "Gwynedd",
+  "Y3" => "Merthyr Tydfil",
+  "Y4" => "Monmouthshire",
+  "Y5" => "Neath Port Talbot",
+  "Y6" => "Newport",
+  "Y7" => "Pembrokeshire",
+  "Y8" => "Powys",
+  "Y9" => "Rhondda Cynon Taff",
+  "Z1" => "Swansea",
+  "Z2" => "Torfaen",
+  "Z3" => "Vale of Glamorgan, The",
+  "Z4" => "Wrexham"),
+"GD" => array(
+  "01" => "Saint Andrew",
+  "02" => "Saint David",
+  "03" => "Saint George",
+  "04" => "Saint John",
+  "05" => "Saint Mark",
+  "06" => "Saint Patrick"),
+"GE" => array(
+  "01" => "Abashis Raioni",
+  "02" => "Abkhazia",
+  "03" => "Adigenis Raioni",
+  "04" => "Ajaria",
+  "05" => "Akhalgoris Raioni",
+  "06" => "Akhalk'alak'is Raioni",
+  "07" => "Akhalts'ikhis Raioni",
+  "08" => "Akhmetis Raioni",
+  "09" => "Ambrolauris Raioni",
+  "10" => "Aspindzis Raioni",
+  "11" => "Baghdat'is Raioni",
+  "12" => "Bolnisis Raioni",
+  "13" => "Borjomis Raioni",
+  "14" => "Chiat'ura",
+  "15" => "Ch'khorotsqus Raioni",
+  "16" => "Ch'okhatauris Raioni",
+  "17" => "Dedop'listsqaros Raioni",
+  "18" => "Dmanisis Raioni",
+  "19" => "Dushet'is Raioni",
+  "20" => "Gardabanis Raioni",
+  "21" => "Gori",
+  "22" => "Goris Raioni",
+  "23" => "Gurjaanis Raioni",
+  "24" => "Javis Raioni",
+  "25" => "K'arelis Raioni",
+  "26" => "Kaspis Raioni",
+  "27" => "Kharagaulis Raioni",
+  "28" => "Khashuris Raioni",
+  "29" => "Khobis Raioni",
+  "30" => "Khonis Raioni",
+  "31" => "K'ut'aisi",
+  "32" => "Lagodekhis Raioni",
+  "33" => "Lanch'khut'is Raioni",
+  "34" => "Lentekhis Raioni",
+  "35" => "Marneulis Raioni",
+  "36" => "Martvilis Raioni",
+  "37" => "Mestiis Raioni",
+  "38" => "Mts'khet'is Raioni",
+  "39" => "Ninotsmindis Raioni",
+  "40" => "Onis Raioni",
+  "41" => "Ozurget'is Raioni",
+  "42" => "P'ot'i",
+  "43" => "Qazbegis Raioni",
+  "44" => "Qvarlis Raioni",
+  "45" => "Rust'avi",
+  "46" => "Sach'kheris Raioni",
+  "47" => "Sagarejos Raioni",
+  "48" => "Samtrediis Raioni",
+  "49" => "Senakis Raioni",
+  "50" => "Sighnaghis Raioni",
+  "51" => "T'bilisi",
+  "52" => "T'elavis Raioni",
+  "53" => "T'erjolis Raioni",
+  "54" => "T'et'ritsqaros Raioni",
+  "55" => "T'ianet'is Raioni",
+  "56" => "Tqibuli",
+  "57" => "Ts'ageris Raioni",
+  "58" => "Tsalenjikhis Raioni",
+  "59" => "Tsalkis Raioni",
+  "60" => "Tsqaltubo",
+  "61" => "Vanis Raioni",
+  "62" => "Zestap'onis Raioni",
+  "63" => "Zugdidi",
+  "64" => "Zugdidis Raioni"),
+"GH" => array(
+  "01" => "Greater Accra",
+  "02" => "Ashanti",
+  "03" => "Brong-Ahafo",
+  "04" => "Central",
+  "05" => "Eastern",
+  "06" => "Northern",
+  "08" => "Volta",
+  "09" => "Western",
+  "10" => "Upper East",
+  "11" => "Upper West"),
+"GL" => array(
+  "01" => "Nordgronland",
+  "02" => "Ostgronland",
+  "03" => "Vestgronland"),
+"GM" => array(
+  "01" => "Banjul",
+  "02" => "Lower River",
+  "03" => "Central River",
+  "04" => "Upper River",
+  "05" => "Western",
+  "07" => "North Bank"),
+"GN" => array(
+  "01" => "Beyla",
+  "02" => "Boffa",
+  "03" => "Boke",
+  "04" => "Conakry",
+  "05" => "Dabola",
+  "06" => "Dalaba",
+  "07" => "Dinguiraye",
+  "09" => "Faranah",
+  "10" => "Forecariah",
+  "11" => "Fria",
+  "12" => "Gaoual",
+  "13" => "Gueckedou",
+  "15" => "Kerouane",
+  "16" => "Kindia",
+  "17" => "Kissidougou",
+  "18" => "Koundara",
+  "19" => "Kouroussa",
+  "21" => "Macenta",
+  "22" => "Mali",
+  "23" => "Mamou",
+  "25" => "Pita",
+  "27" => "Telimele",
+  "28" => "Tougue",
+  "29" => "Yomou",
+  "30" => "Coyah",
+  "31" => "Dubreka",
+  "32" => "Kankan",
+  "33" => "Koubia",
+  "34" => "Labe",
+  "35" => "Lelouma",
+  "36" => "Lola",
+  "37" => "Mandiana",
+  "38" => "Nzerekore",
+  "39" => "Siguiri"),
+"GQ" => array(
+  "03" => "Annobon",
+  "04" => "Bioko Norte",
+  "05" => "Bioko Sur",
+  "06" => "Centro Sur",
+  "07" => "Kie-Ntem",
+  "08" => "Litoral",
+  "09" => "Wele-Nzas"),
+"GR" => array(
+  "01" => "Evros",
+  "02" => "Rodhopi",
+  "03" => "Xanthi",
+  "04" => "Drama",
+  "05" => "Serrai",
+  "06" => "Kilkis",
+  "07" => "Pella",
+  "08" => "Florina",
+  "09" => "Kastoria",
+  "10" => "Grevena",
+  "11" => "Kozani",
+  "12" => "Imathia",
+  "13" => "Thessaloniki",
+  "14" => "Kavala",
+  "15" => "Khalkidhiki",
+  "16" => "Pieria",
+  "17" => "Ioannina",
+  "18" => "Thesprotia",
+  "19" => "Preveza",
+  "20" => "Arta",
+  "21" => "Larisa",
+  "22" => "Trikala",
+  "23" => "Kardhitsa",
+  "24" => "Magnisia",
+  "25" => "Kerkira",
+  "26" => "Levkas",
+  "27" => "Kefallinia",
+  "28" => "Zakinthos",
+  "29" => "Fthiotis",
+  "30" => "Evritania",
+  "31" => "Aitolia kai Akarnania",
+  "32" => "Fokis",
+  "33" => "Voiotia",
+  "34" => "Evvoia",
+  "35" => "Attiki",
+  "36" => "Argolis",
+  "37" => "Korinthia",
+  "38" => "Akhaia",
+  "39" => "Ilia",
+  "40" => "Messinia",
+  "41" => "Arkadhia",
+  "42" => "Lakonia",
+  "43" => "Khania",
+  "44" => "Rethimni",
+  "45" => "Iraklion",
+  "46" => "Lasithi",
+  "47" => "Dhodhekanisos",
+  "48" => "Samos",
+  "49" => "Kikladhes",
+  "50" => "Khios",
+  "51" => "Lesvos"),
+"GT" => array(
+  "01" => "Alta Verapaz",
+  "02" => "Baja Verapaz",
+  "03" => "Chimaltenango",
+  "04" => "Chiquimula",
+  "05" => "El Progreso",
+  "06" => "Escuintla",
+  "07" => "Guatemala",
+  "08" => "Huehuetenango",
+  "09" => "Izabal",
+  "10" => "Jalapa",
+  "11" => "Jutiapa",
+  "12" => "Peten",
+  "13" => "Quetzaltenango",
+  "14" => "Quiche",
+  "15" => "Retalhuleu",
+  "16" => "Sacatepequez",
+  "17" => "San Marcos",
+  "18" => "Santa Rosa",
+  "19" => "Solola",
+  "20" => "Suchitepequez",
+  "21" => "Totonicapan",
+  "22" => "Zacapa"),
+"GW" => array(
+  "01" => "Bafata",
+  "02" => "Quinara",
+  "04" => "Oio",
+  "05" => "Bolama",
+  "06" => "Cacheu",
+  "07" => "Tombali",
+  "10" => "Gabu",
+  "11" => "Bissau",
+  "12" => "Biombo"),
+"GY" => array(
+  "10" => "Barima-Waini",
+  "11" => "Cuyuni-Mazaruni",
+  "12" => "Demerara-Mahaica",
+  "13" => "East Berbice-Corentyne",
+  "14" => "Essequibo Islands-West Demerara",
+  "15" => "Mahaica-Berbice",
+  "16" => "Pomeroon-Supenaam",
+  "17" => "Potaro-Siparuni",
+  "18" => "Upper Demerara-Berbice",
+  "19" => "Upper Takutu-Upper Essequibo"),
+"HN" => array(
+  "01" => "Atlantida",
+  "02" => "Choluteca",
+  "03" => "Colon",
+  "04" => "Comayagua",
+  "05" => "Copan",
+  "06" => "Cortes",
+  "07" => "El Paraiso",
+  "08" => "Francisco Morazan",
+  "09" => "Gracias a Dios",
+  "10" => "Intibuca",
+  "11" => "Islas de la Bahia",
+  "12" => "La Paz",
+  "13" => "Lempira",
+  "14" => "Ocotepeque",
+  "15" => "Olancho",
+  "16" => "Santa Barbara",
+  "17" => "Valle",
+  "18" => "Yoro"),
+"HR" => array(
+  "01" => "Bjelovarsko-Bilogorska",
+  "02" => "Brodsko-Posavska",
+  "03" => "Dubrovacko-Neretvanska",
+  "04" => "Istarska",
+  "05" => "Karlovacka",
+  "06" => "Koprivnicko-Krizevacka",
+  "07" => "Krapinsko-Zagorska",
+  "08" => "Licko-Senjska",
+  "09" => "Medimurska",
+  "10" => "Osjecko-Baranjska",
+  "11" => "Pozesko-Slavonska",
+  "12" => "Primorsko-Goranska",
+  "13" => "Sibensko-Kninska",
+  "14" => "Sisacko-Moslavacka",
+  "15" => "Splitsko-Dalmatinska",
+  "16" => "Varazdinska",
+  "17" => "Viroviticko-Podravska",
+  "18" => "Vukovarsko-Srijemska",
+  "19" => "Zadarska",
+  "20" => "Zagrebacka",
+  "21" => "Grad Zagreb"),
+"HT" => array(
+  "03" => "Nord-Ouest",
+  "06" => "Artibonite",
+  "07" => "Centre",
+  "09" => "Nord",
+  "10" => "Nord-Est",
+  "11" => "Ouest",
+  "12" => "Sud",
+  "13" => "Sud-Est",
+  "14" => "Grand' Anse",
+  "15" => "Nippes"),
+"HU" => array(
+  "01" => "Bacs-Kiskun",
+  "02" => "Baranya",
+  "03" => "Bekes",
+  "04" => "Borsod-Abauj-Zemplen",
+  "05" => "Budapest",
+  "06" => "Csongrad",
+  "07" => "Debrecen",
+  "08" => "Fejer",
+  "09" => "Gyor-Moson-Sopron",
+  "10" => "Hajdu-Bihar",
+  "11" => "Heves",
+  "12" => "Komarom-Esztergom",
+  "13" => "Miskolc",
+  "14" => "Nograd",
+  "15" => "Pecs",
+  "16" => "Pest",
+  "17" => "Somogy",
+  "18" => "Szabolcs-Szatmar-Bereg",
+  "19" => "Szeged",
+  "20" => "Jasz-Nagykun-Szolnok",
+  "21" => "Tolna",
+  "22" => "Vas",
+  "23" => "Veszprem",
+  "24" => "Zala",
+  "25" => "Gyor",
+  "26" => "Bekescsaba",
+  "27" => "Dunaujvaros",
+  "28" => "Eger",
+  "29" => "Hodmezovasarhely",
+  "30" => "Kaposvar",
+  "31" => "Kecskemet",
+  "32" => "Nagykanizsa",
+  "33" => "Nyiregyhaza",
+  "34" => "Sopron",
+  "35" => "Szekesfehervar",
+  "36" => "Szolnok",
+  "37" => "Szombathely",
+  "38" => "Tatabanya",
+  "39" => "Veszprem",
+  "40" => "Zalaegerszeg",
+  "41" => "Salgotarjan",
+  "42" => "Szekszard",
+  "43" => "Erd"),
+"ID" => array(
+  "01" => "Aceh",
+  "02" => "Bali",
+  "03" => "Bengkulu",
+  "04" => "Jakarta Raya",
+  "05" => "Jambi",
+  "06" => "Jawa Barat",
+  "07" => "Jawa Tengah",
+  "08" => "Jawa Timur",
+  "09" => "Papua",
+  "10" => "Yogyakarta",
+  "11" => "Kalimantan Barat",
+  "12" => "Kalimantan Selatan",
+  "13" => "Kalimantan Tengah",
+  "14" => "Kalimantan Timur",
+  "15" => "Lampung",
+  "16" => "Maluku",
+  "17" => "Nusa Tenggara Barat",
+  "18" => "Nusa Tenggara Timur",
+  "19" => "Riau",
+  "20" => "Sulawesi Selatan",
+  "21" => "Sulawesi Tengah",
+  "22" => "Sulawesi Tenggara",
+  "23" => "Sulawesi Utara",
+  "24" => "Sumatera Barat",
+  "25" => "Sumatera Selatan",
+  "26" => "Sumatera Utara",
+  "28" => "Maluku",
+  "29" => "Maluku Utara",
+  "30" => "Jawa Barat",
+  "31" => "Sulawesi Utara",
+  "32" => "Sumatera Selatan",
+  "33" => "Banten",
+  "34" => "Gorontalo",
+  "35" => "Kepulauan Bangka Belitung",
+  "36" => "Papua",
+  "37" => "Riau",
+  "38" => "Sulawesi Selatan",
+  "39" => "Irian Jaya Barat",
+  "40" => "Kepulauan Riau",
+  "41" => "Sulawesi Barat"),
+"IE" => array(
+  "01" => "Carlow",
+  "02" => "Cavan",
+  "03" => "Clare",
+  "04" => "Cork",
+  "06" => "Donegal",
+  "07" => "Dublin",
+  "10" => "Galway",
+  "11" => "Kerry",
+  "12" => "Kildare",
+  "13" => "Kilkenny",
+  "14" => "Leitrim",
+  "15" => "Laois",
+  "16" => "Limerick",
+  "18" => "Longford",
+  "19" => "Louth",
+  "20" => "Mayo",
+  "21" => "Meath",
+  "22" => "Monaghan",
+  "23" => "Offaly",
+  "24" => "Roscommon",
+  "25" => "Sligo",
+  "26" => "Tipperary",
+  "27" => "Waterford",
+  "29" => "Westmeath",
+  "30" => "Wexford",
+  "31" => "Wicklow"),
+"IL" => array(
+  "01" => "HaDarom",
+  "02" => "HaMerkaz",
+  "03" => "HaZafon",
+  "04" => "Hefa",
+  "05" => "Tel Aviv",
+  "06" => "Yerushalayim"),
+"IN" => array(
+  "01" => "Andaman and Nicobar Islands",
+  "02" => "Andhra Pradesh",
+  "03" => "Assam",
+  "05" => "Chandigarh",
+  "06" => "Dadra and Nagar Haveli",
+  "07" => "Delhi",
+  "09" => "Gujarat",
+  "10" => "Haryana",
+  "11" => "Himachal Pradesh",
+  "12" => "Jammu and Kashmir",
+  "13" => "Kerala",
+  "14" => "Lakshadweep",
+  "16" => "Maharashtra",
+  "17" => "Manipur",
+  "18" => "Meghalaya",
+  "19" => "Karnataka",
+  "20" => "Nagaland",
+  "21" => "Orissa",
+  "22" => "Puducherry",
+  "23" => "Punjab",
+  "24" => "Rajasthan",
+  "25" => "Tamil Nadu",
+  "26" => "Tripura",
+  "28" => "West Bengal",
+  "29" => "Sikkim",
+  "30" => "Arunachal Pradesh",
+  "31" => "Mizoram",
+  "32" => "Daman and Diu",
+  "33" => "Goa",
+  "34" => "Bihar",
+  "35" => "Madhya Pradesh",
+  "36" => "Uttar Pradesh",
+  "37" => "Chhattisgarh",
+  "38" => "Jharkhand",
+  "39" => "Uttarakhand"),
+"IQ" => array(
+  "01" => "Al Anbar",
+  "02" => "Al Basrah",
+  "03" => "Al Muthanna",
+  "04" => "Al Qadisiyah",
+  "05" => "As Sulaymaniyah",
+  "06" => "Babil",
+  "07" => "Baghdad",
+  "08" => "Dahuk",
+  "09" => "Dhi Qar",
+  "10" => "Diyala",
+  "11" => "Arbil",
+  "12" => "Karbala'",
+  "13" => "At Ta'mim",
+  "14" => "Maysan",
+  "15" => "Ninawa",
+  "16" => "Wasit",
+  "17" => "An Najaf",
+  "18" => "Salah ad Din"),
+"IR" => array(
+  "01" => "Azarbayjan-e Bakhtari",
+  "03" => "Chahar Mahall va Bakhtiari",
+  "04" => "Sistan va Baluchestan",
+  "05" => "Kohkiluyeh va Buyer Ahmadi",
+  "07" => "Fars",
+  "08" => "Gilan",
+  "09" => "Hamadan",
+  "10" => "Ilam",
+  "11" => "Hormozgan",
+  "12" => "Kerman",
+  "13" => "Bakhtaran",
+  "15" => "Khuzestan",
+  "16" => "Kordestan",
+  "17" => "Mazandaran",
+  "18" => "Semnan Province",
+  "19" => "Markazi",
+  "21" => "Zanjan",
+  "22" => "Bushehr",
+  "23" => "Lorestan",
+  "24" => "Markazi",
+  "25" => "Semnan",
+  "26" => "Tehran",
+  "27" => "Zanjan",
+  "28" => "Esfahan",
+  "29" => "Kerman",
+  "30" => "Khorasan",
+  "31" => "Yazd",
+  "32" => "Ardabil",
+  "33" => "East Azarbaijan",
+  "34" => "Markazi",
+  "35" => "Mazandaran",
+  "36" => "Zanjan",
+  "37" => "Golestan",
+  "38" => "Qazvin",
+  "39" => "Qom",
+  "40" => "Yazd",
+  "41" => "Khorasan-e Janubi",
+  "42" => "Khorasan-e Razavi",
+  "43" => "Khorasan-e Shemali"),
+"IS" => array(
+  "03" => "Arnessysla",
+  "05" => "Austur-Hunavatnssysla",
+  "06" => "Austur-Skaftafellssysla",
+  "07" => "Borgarfjardarsysla",
+  "09" => "Eyjafjardarsysla",
+  "10" => "Gullbringusysla",
+  "15" => "Kjosarsysla",
+  "17" => "Myrasysla",
+  "20" => "Nordur-Mulasysla",
+  "21" => "Nordur-Tingeyjarsysla",
+  "23" => "Rangarvallasysla",
+  "28" => "Skagafjardarsysla",
+  "29" => "Snafellsnes- og Hnappadalssysla",
+  "30" => "Strandasysla",
+  "31" => "Sudur-Mulasysla",
+  "32" => "Sudur-Tingeyjarsysla",
+  "34" => "Vestur-Bardastrandarsysla",
+  "35" => "Vestur-Hunavatnssysla",
+  "36" => "Vestur-Isafjardarsysla",
+  "37" => "Vestur-Skaftafellssysla",
+  "40" => "Norourland Eystra",
+  "41" => "Norourland Vestra",
+  "42" => "Suourland",
+  "43" => "Suournes",
+  "44" => "Vestfiroir",
+  "45" => "Vesturland"),
+"IT" => array(
+  "01" => "Abruzzi",
+  "02" => "Basilicata",
+  "03" => "Calabria",
+  "04" => "Campania",
+  "05" => "Emilia-Romagna",
+  "06" => "Friuli-Venezia Giulia",
+  "07" => "Lazio",
+  "08" => "Liguria",
+  "09" => "Lombardia",
+  "10" => "Marche",
+  "11" => "Molise",
+  "12" => "Piemonte",
+  "13" => "Puglia",
+  "14" => "Sardegna",
+  "15" => "Sicilia",
+  "16" => "Toscana",
+  "17" => "Trentino-Alto Adige",
+  "18" => "Umbria",
+  "19" => "Valle d'Aosta",
+  "20" => "Veneto"),
+"JM" => array(
+  "01" => "Clarendon",
+  "02" => "Hanover",
+  "04" => "Manchester",
+  "07" => "Portland",
+  "08" => "Saint Andrew",
+  "09" => "Saint Ann",
+  "10" => "Saint Catherine",
+  "11" => "Saint Elizabeth",
+  "12" => "Saint James",
+  "13" => "Saint Mary",
+  "14" => "Saint Thomas",
+  "15" => "Trelawny",
+  "16" => "Westmoreland",
+  "17" => "Kingston"),
+"JO" => array(
+  "02" => "Al Balqa'",
+  "07" => "Ma",
+  "09" => "Al Karak",
+  "10" => "Al Mafraq",
+  "11" => "Amman Governorate",
+  "12" => "At Tafilah",
+  "13" => "Az Zarqa",
+  "14" => "Irbid",
+  "16" => "Amman"),
+"JP" => array(
+  "01" => "Aichi",
+  "02" => "Akita",
+  "03" => "Aomori",
+  "04" => "Chiba",
+  "05" => "Ehime",
+  "06" => "Fukui",
+  "07" => "Fukuoka",
+  "08" => "Fukushima",
+  "09" => "Gifu",
+  "10" => "Gumma",
+  "11" => "Hiroshima",
+  "12" => "Hokkaido",
+  "13" => "Hyogo",
+  "14" => "Ibaraki",
+  "15" => "Ishikawa",
+  "16" => "Iwate",
+  "17" => "Kagawa",
+  "18" => "Kagoshima",
+  "19" => "Kanagawa",
+  "20" => "Kochi",
+  "21" => "Kumamoto",
+  "22" => "Kyoto",
+  "23" => "Mie",
+  "24" => "Miyagi",
+  "25" => "Miyazaki",
+  "26" => "Nagano",
+  "27" => "Nagasaki",
+  "28" => "Nara",
+  "29" => "Niigata",
+  "30" => "Oita",
+  "31" => "Okayama",
+  "32" => "Osaka",
+  "33" => "Saga",
+  "34" => "Saitama",
+  "35" => "Shiga",
+  "36" => "Shimane",
+  "37" => "Shizuoka",
+  "38" => "Tochigi",
+  "39" => "Tokushima",
+  "40" => "Tokyo",
+  "41" => "Tottori",
+  "42" => "Toyama",
+  "43" => "Wakayama",
+  "44" => "Yamagata",
+  "45" => "Yamaguchi",
+  "46" => "Yamanashi",
+  "47" => "Okinawa"),
+"KE" => array(
+  "01" => "Central",
+  "02" => "Coast",
+  "03" => "Eastern",
+  "05" => "Nairobi Area",
+  "06" => "North-Eastern",
+  "07" => "Nyanza",
+  "08" => "Rift Valley",
+  "09" => "Western"),
+"KG" => array(
+  "01" => "Bishkek",
+  "02" => "Chuy",
+  "03" => "Jalal-Abad",
+  "04" => "Naryn",
+  "05" => "Osh",
+  "06" => "Talas",
+  "07" => "Ysyk-Kol",
+  "08" => "Osh",
+  "09" => "Batken"),
+"KH" => array(
+  "01" => "Batdambang",
+  "02" => "Kampong Cham",
+  "03" => "Kampong Chhnang",
+  "04" => "Kampong Speu",
+  "05" => "Kampong Thum",
+  "06" => "Kampot",
+  "07" => "Kandal",
+  "08" => "Koh Kong",
+  "09" => "Kracheh",
+  "10" => "Mondulkiri",
+  "11" => "Phnum Penh",
+  "12" => "Pursat",
+  "13" => "Preah Vihear",
+  "14" => "Prey Veng",
+  "15" => "Ratanakiri Kiri",
+  "16" => "Siem Reap",
+  "17" => "Stung Treng",
+  "18" => "Svay Rieng",
+  "19" => "Takeo",
+  "25" => "Banteay Meanchey",
+  "29" => "Batdambang",
+  "30" => "Pailin"),
+"KI" => array(
+  "01" => "Gilbert Islands",
+  "02" => "Line Islands",
+  "03" => "Phoenix Islands"),
+"KM" => array(
+  "01" => "Anjouan",
+  "02" => "Grande Comore",
+  "03" => "Moheli"),
+"KN" => array(
+  "01" => "Christ Church Nichola Town",
+  "02" => "Saint Anne Sandy Point",
+  "03" => "Saint George Basseterre",
+  "04" => "Saint George Gingerland",
+  "05" => "Saint James Windward",
+  "06" => "Saint John Capisterre",
+  "07" => "Saint John Figtree",
+  "08" => "Saint Mary Cayon",
+  "09" => "Saint Paul Capisterre",
+  "10" => "Saint Paul Charlestown",
+  "11" => "Saint Peter Basseterre",
+  "12" => "Saint Thomas Lowland",
+  "13" => "Saint Thomas Middle Island",
+  "15" => "Trinity Palmetto Point"),
+"KP" => array(
+  "01" => "Chagang-do",
+  "03" => "Hamgyong-namdo",
+  "06" => "Hwanghae-namdo",
+  "07" => "Hwanghae-bukto",
+  "08" => "Kaesong-si",
+  "09" => "Kangwon-do",
+  "11" => "P'yongan-bukto",
+  "12" => "P'yongyang-si",
+  "13" => "Yanggang-do",
+  "14" => "Namp'o-si",
+  "15" => "P'yongan-namdo",
+  "17" => "Hamgyong-bukto",
+  "18" => "Najin Sonbong-si"),
+"KR" => array(
+  "01" => "Cheju-do",
+  "03" => "Cholla-bukto",
+  "05" => "Ch'ungch'ong-bukto",
+  "06" => "Kangwon-do",
+  "10" => "Pusan-jikhalsi",
+  "11" => "Seoul-t'ukpyolsi",
+  "12" => "Inch'on-jikhalsi",
+  "13" => "Kyonggi-do",
+  "14" => "Kyongsang-bukto",
+  "15" => "Taegu-jikhalsi",
+  "16" => "Cholla-namdo",
+  "17" => "Ch'ungch'ong-namdo",
+  "18" => "Kwangju-jikhalsi",
+  "19" => "Taejon-jikhalsi",
+  "20" => "Kyongsang-namdo",
+  "21" => "Ulsan-gwangyoksi"),
+"KW" => array(
+  "01" => "Al Ahmadi",
+  "02" => "Al Kuwayt",
+  "05" => "Al Jahra",
+  "07" => "Al Farwaniyah",
+  "08" => "Hawalli",
+  "09" => "Mubarak al Kabir"),
+"KY" => array(
+  "01" => "Creek",
+  "02" => "Eastern",
+  "03" => "Midland",
+  "04" => "South Town",
+  "05" => "Spot Bay",
+  "06" => "Stake Bay",
+  "07" => "West End",
+  "08" => "Western"),
+"KZ" => array(
+  "01" => "Almaty",
+  "02" => "Almaty City",
+  "03" => "Aqmola",
+  "04" => "Aqtobe",
+  "05" => "Astana",
+  "06" => "Atyrau",
+  "07" => "West Kazakhstan",
+  "08" => "Bayqonyr",
+  "09" => "Mangghystau",
+  "10" => "South Kazakhstan",
+  "11" => "Pavlodar",
+  "12" => "Qaraghandy",
+  "13" => "Qostanay",
+  "14" => "Qyzylorda",
+  "15" => "East Kazakhstan",
+  "16" => "North Kazakhstan",
+  "17" => "Zhambyl"),
+"LA" => array(
+  "01" => "Attapu",
+  "02" => "Champasak",
+  "03" => "Houaphan",
+  "04" => "Khammouan",
+  "05" => "Louang Namtha",
+  "07" => "Oudomxai",
+  "08" => "Phongsali",
+  "09" => "Saravan",
+  "10" => "Savannakhet",
+  "11" => "Vientiane",
+  "13" => "Xaignabouri",
+  "14" => "Xiangkhoang",
+  "17" => "Louangphrabang"),
+"LB" => array(
+  "01" => "Beqaa",
+  "02" => "Al Janub",
+  "03" => "Liban-Nord",
+  "04" => "Beyrouth",
+  "05" => "Mont-Liban",
+  "06" => "Liban-Sud",
+  "07" => "Nabatiye",
+  "08" => "Beqaa",
+  "09" => "Liban-Nord",
+  "10" => "Aakk,r",
+  "11" => "Baalbek-Hermel"),
+"LC" => array(
+  "01" => "Anse-la-Raye",
+  "02" => "Dauphin",
+  "03" => "Castries",
+  "04" => "Choiseul",
+  "05" => "Dennery",
+  "06" => "Gros-Islet",
+  "07" => "Laborie",
+  "08" => "Micoud",
+  "09" => "Soufriere",
+  "10" => "Vieux-Fort",
+  "11" => "Praslin"),
+"LI" => array(
+  "01" => "Balzers",
+  "02" => "Eschen",
+  "03" => "Gamprin",
+  "04" => "Mauren",
+  "05" => "Planken",
+  "06" => "Ruggell",
+  "07" => "Schaan",
+  "08" => "Schellenberg",
+  "09" => "Triesen",
+  "10" => "Triesenberg",
+  "11" => "Vaduz",
+  "21" => "Gbarpolu",
+  "22" => "River Gee"),
+"LK" => array(
+  "01" => "Amparai",
+  "02" => "Anuradhapura",
+  "03" => "Badulla",
+  "04" => "Batticaloa",
+  "06" => "Galle",
+  "07" => "Hambantota",
+  "09" => "Kalutara",
+  "10" => "Kandy",
+  "11" => "Kegalla",
+  "12" => "Kurunegala",
+  "14" => "Matale",
+  "15" => "Matara",
+  "16" => "Moneragala",
+  "17" => "Nuwara Eliya",
+  "18" => "Polonnaruwa",
+  "19" => "Puttalam",
+  "20" => "Ratnapura",
+  "21" => "Trincomalee",
+  "23" => "Colombo",
+  "24" => "Gampaha",
+  "25" => "Jaffna",
+  "26" => "Mannar",
+  "27" => "Mullaittivu",
+  "28" => "Vavuniya",
+  "29" => "Central",
+  "30" => "North Central",
+  "31" => "Northern",
+  "32" => "North Western",
+  "33" => "Sabaragamuwa",
+  "34" => "Southern",
+  "35" => "Uva",
+  "36" => "Western"),
+"LR" => array(
+  "01" => "Bong",
+  "04" => "Grand Cape Mount",
+  "05" => "Lofa",
+  "06" => "Maryland",
+  "07" => "Monrovia",
+  "09" => "Nimba",
+  "10" => "Sino",
+  "11" => "Grand Bassa",
+  "12" => "Grand Cape Mount",
+  "13" => "Maryland",
+  "14" => "Montserrado",
+  "17" => "Margibi",
+  "18" => "River Cess",
+  "19" => "Grand Gedeh",
+  "20" => "Lofa",
+  "21" => "Gbarpolu",
+  "22" => "River Gee"),
+"LS" => array(
+  "10" => "Berea",
+  "11" => "Butha-Buthe",
+  "12" => "Leribe",
+  "13" => "Mafeteng",
+  "14" => "Maseru",
+  "15" => "Mohales Hoek",
+  "16" => "Mokhotlong",
+  "17" => "Qachas Nek",
+  "18" => "Quthing",
+  "19" => "Thaba-Tseka"),
+"LT" => array(
+  "56" => "Alytaus Apskritis",
+  "57" => "Kauno Apskritis",
+  "58" => "Klaipedos Apskritis",
+  "59" => "Marijampoles Apskritis",
+  "60" => "Panevezio Apskritis",
+  "61" => "Siauliu Apskritis",
+  "62" => "Taurages Apskritis",
+  "63" => "Telsiu Apskritis",
+  "64" => "Utenos Apskritis",
+  "65" => "Vilniaus Apskritis"),
+"LU" => array(
+  "01" => "Diekirch",
+  "02" => "Grevenmacher",
+  "03" => "Luxembourg"),
+"LV" => array(
+  "01" => "Aizkraukles",
+  "02" => "Aluksnes",
+  "03" => "Balvu",
+  "04" => "Bauskas",
+  "05" => "Cesu",
+  "06" => "Daugavpils",
+  "07" => "Daugavpils",
+  "08" => "Dobeles",
+  "09" => "Gulbenes",
+  "10" => "Jekabpils",
+  "11" => "Jelgava",
+  "12" => "Jelgavas",
+  "13" => "Jurmala",
+  "14" => "Kraslavas",
+  "15" => "Kuldigas",
+  "16" => "Liepaja",
+  "17" => "Liepajas",
+  "18" => "Limbazu",
+  "19" => "Ludzas",
+  "20" => "Madonas",
+  "21" => "Ogres",
+  "22" => "Preilu",
+  "23" => "Rezekne",
+  "24" => "Rezeknes",
+  "25" => "Riga",
+  "26" => "Rigas",
+  "27" => "Saldus",
+  "28" => "Talsu",
+  "29" => "Tukuma",
+  "30" => "Valkas",
+  "31" => "Valmieras",
+  "32" => "Ventspils",
+  "33" => "Ventspils"),
+"LY" => array(
+  "03" => "Al Aziziyah",
+  "05" => "Al Jufrah",
+  "08" => "Al Kufrah",
+  "13" => "Ash Shati'",
+  "30" => "Murzuq",
+  "34" => "Sabha",
+  "41" => "Tarhunah",
+  "42" => "Tubruq",
+  "45" => "Zlitan",
+  "47" => "Ajdabiya",
+  "48" => "Al Fatih",
+  "49" => "Al Jabal al Akhdar",
+  "50" => "Al Khums",
+  "51" => "An Nuqat al Khams",
+  "52" => "Awbari",
+  "53" => "Az Zawiyah",
+  "54" => "Banghazi",
+  "55" => "Darnah",
+  "56" => "Ghadamis",
+  "57" => "Gharyan",
+  "58" => "Misratah",
+  "59" => "Sawfajjin",
+  "60" => "Surt",
+  "61" => "Tarabulus",
+  "62" => "Yafran"),
+"MA" => array(
+  "45" => "Grand Casablanca",
+  "46" => "Fes-Boulemane",
+  "47" => "Marrakech-Tensift-Al Haouz",
+  "48" => "Meknes-Tafilalet",
+  "49" => "Rabat-Sale-Zemmour-Zaer",
+  "50" => "Chaouia-Ouardigha",
+  "51" => "Doukkala-Abda",
+  "52" => "Gharb-Chrarda-Beni Hssen",
+  "53" => "Guelmim-Es Smara",
+  "54" => "Oriental",
+  "55" => "Souss-Massa-Dr,a",
+  "56" => "Tadla-Azilal",
+  "57" => "Tanger-Tetouan",
+  "58" => "Taza-Al Hoceima-Taounate",
+  "59" => "La,youne-Boujdour-Sakia El Hamra"),
+"MC" => array(
+  "01" => "La Condamine",
+  "02" => "Monaco",
+  "03" => "Monte-Carlo"),
+"MD" => array(
+  "51" => "Gagauzia",
+  "57" => "Chisinau",
+  "58" => "Stinga Nistrului",
+  "59" => "Anenii Noi",
+  "60" => "Balti",
+  "61" => "Basarabeasca",
+  "62" => "Bender",
+  "63" => "Briceni",
+  "64" => "Cahul",
+  "65" => "Cantemir",
+  "66" => "Calarasi",
+  "67" => "Causeni",
+  "68" => "Cimislia",
+  "69" => "Criuleni",
+  "70" => "Donduseni",
+  "71" => "Drochia",
+  "72" => "Dubasari",
+  "73" => "Edinet",
+  "74" => "Falesti",
+  "75" => "Floresti",
+  "76" => "Glodeni",
+  "77" => "Hincesti",
+  "78" => "Ialoveni",
+  "79" => "Leova",
+  "80" => "Nisporeni",
+  "81" => "Ocnita",
+  "83" => "Rezina",
+  "84" => "Riscani",
+  "85" => "Singerei",
+  "86" => "Soldanesti",
+  "87" => "Soroca",
+  "88" => "Stefan-Voda",
+  "89" => "Straseni",
+  "90" => "Taraclia",
+  "91" => "Telenesti",
+  "92" => "Ungheni"),
+"MG" => array(
+  "01" => "Antsiranana",
+  "02" => "Fianarantsoa",
+  "03" => "Mahajanga",
+  "04" => "Toamasina",
+  "05" => "Antananarivo",
+  "06" => "Toliara"),
+"MK" => array(
+  "01" => "Aracinovo",
+  "02" => "Bac",
+  "03" => "Belcista",
+  "04" => "Berovo",
+  "05" => "Bistrica",
+  "06" => "Bitola",
+  "07" => "Blatec",
+  "08" => "Bogdanci",
+  "09" => "Bogomila",
+  "10" => "Bogovinje",
+  "11" => "Bosilovo",
+  "12" => "Brvenica",
+  "13" => "Cair",
+  "14" => "Capari",
+  "15" => "Caska",
+  "16" => "Cegrane",
+  "17" => "Centar",
+  "18" => "Centar Zupa",
+  "19" => "Cesinovo",
+  "20" => "Cucer-Sandevo",
+  "21" => "Debar",
+  "22" => "Delcevo",
+  "23" => "Delogozdi",
+  "24" => "Demir Hisar",
+  "25" => "Demir Kapija",
+  "26" => "Dobrusevo",
+  "27" => "Dolna Banjica",
+  "28" => "Dolneni",
+  "29" => "Dorce Petrov",
+  "30" => "Drugovo",
+  "31" => "Dzepciste",
+  "32" => "Gazi Baba",
+  "33" => "Gevgelija",
+  "34" => "Gostivar",
+  "35" => "Gradsko",
+  "36" => "Ilinden",
+  "37" => "Izvor",
+  "38" => "Jegunovce",
+  "39" => "Kamenjane",
+  "40" => "Karbinci",
+  "41" => "Karpos",
+  "42" => "Kavadarci",
+  "43" => "Kicevo",
+  "44" => "Kisela Voda",
+  "45" => "Klecevce",
+  "46" => "Kocani",
+  "47" => "Konce",
+  "48" => "Kondovo",
+  "49" => "Konopiste",
+  "50" => "Kosel",
+  "51" => "Kratovo",
+  "52" => "Kriva Palanka",
+  "53" => "Krivogastani",
+  "54" => "Krusevo",
+  "55" => "Kuklis",
+  "56" => "Kukurecani",
+  "57" => "Kumanovo",
+  "58" => "Labunista",
+  "59" => "Lipkovo",
+  "60" => "Lozovo",
+  "61" => "Lukovo",
+  "62" => "Makedonska Kamenica",
+  "63" => "Makedonski Brod",
+  "64" => "Mavrovi Anovi",
+  "65" => "Meseista",
+  "66" => "Miravci",
+  "67" => "Mogila",
+  "68" => "Murtino",
+  "69" => "Negotino",
+  "70" => "Negotino-Polosko",
+  "71" => "Novaci",
+  "72" => "Novo Selo",
+  "73" => "Oblesevo",
+  "74" => "Ohrid",
+  "75" => "Orasac",
+  "76" => "Orizari",
+  "77" => "Oslomej",
+  "78" => "Pehcevo",
+  "79" => "Petrovec",
+  "80" => "Plasnica",
+  "81" => "Podares",
+  "82" => "Prilep",
+  "83" => "Probistip",
+  "84" => "Radovis",
+  "85" => "Rankovce",
+  "86" => "Resen",
+  "87" => "Rosoman",
+  "88" => "Rostusa",
+  "89" => "Samokov",
+  "90" => "Saraj",
+  "91" => "Sipkovica",
+  "92" => "Sopiste",
+  "93" => "Sopotnica",
+  "94" => "Srbinovo",
+  "95" => "Staravina",
+  "96" => "Star Dojran",
+  "97" => "Staro Nagoricane",
+  "98" => "Stip",
+  "99" => "Struga",
+  "A1" => "Strumica",
+  "A2" => "Studenicani",
+  "A3" => "Suto Orizari",
+  "A4" => "Sveti Nikole",
+  "A5" => "Tearce",
+  "A6" => "Tetovo",
+  "A7" => "Topolcani",
+  "A8" => "Valandovo",
+  "A9" => "Vasilevo",
+  "B1" => "Veles",
+  "B2" => "Velesta",
+  "B3" => "Vevcani",
+  "B4" => "Vinica",
+  "B5" => "Vitoliste",
+  "B6" => "Vranestica",
+  "B7" => "Vrapciste",
+  "B8" => "Vratnica",
+  "B9" => "Vrutok",
+  "C1" => "Zajas",
+  "C2" => "Zelenikovo",
+  "C3" => "Zelino",
+  "C4" => "Zitose",
+  "C5" => "Zletovo",
+  "C6" => "Zrnovci"),
+"ML" => array(
+  "01" => "Bamako",
+  "03" => "Kayes",
+  "04" => "Mopti",
+  "05" => "Segou",
+  "06" => "Sikasso",
+  "07" => "Koulikoro",
+  "08" => "Tombouctou",
+  "09" => "Gao",
+  "10" => "Kidal"),
+"MM" => array(
+  "01" => "Rakhine State",
+  "02" => "Chin State",
+  "03" => "Irrawaddy",
+  "04" => "Kachin State",
+  "05" => "Karan State",
+  "06" => "Kayah State",
+  "07" => "Magwe",
+  "08" => "Mandalay",
+  "09" => "Pegu",
+  "10" => "Sagaing",
+  "11" => "Shan State",
+  "12" => "Tenasserim",
+  "13" => "Mon State",
+  "14" => "Rangoon",
+  "17" => "Yangon"),
+"MN" => array(
+  "01" => "Arhangay",
+  "02" => "Bayanhongor",
+  "03" => "Bayan-Olgiy",
+  "05" => "Darhan",
+  "06" => "Dornod",
+  "07" => "Dornogovi",
+  "08" => "Dundgovi",
+  "09" => "Dzavhan",
+  "10" => "Govi-Altay",
+  "11" => "Hentiy",
+  "12" => "Hovd",
+  "13" => "Hovsgol",
+  "14" => "Omnogovi",
+  "15" => "Ovorhangay",
+  "16" => "Selenge",
+  "17" => "Suhbaatar",
+  "18" => "Tov",
+  "19" => "Uvs",
+  "20" => "Ulaanbaatar",
+  "21" => "Bulgan",
+  "22" => "Erdenet",
+  "23" => "Darhan-Uul",
+  "24" => "Govisumber",
+  "25" => "Orhon"),
+"MO" => array(
+  "01" => "Ilhas",
+  "02" => "Macau"),
+"MR" => array(
+  "01" => "Hodh Ech Chargui",
+  "02" => "Hodh El Gharbi",
+  "03" => "Assaba",
+  "04" => "Gorgol",
+  "05" => "Brakna",
+  "06" => "Trarza",
+  "07" => "Adrar",
+  "08" => "Dakhlet Nouadhibou",
+  "09" => "Tagant",
+  "10" => "Guidimaka",
+  "11" => "Tiris Zemmour",
+  "12" => "Inchiri"),
+"MS" => array(
+  "01" => "Saint Anthony",
+  "02" => "Saint Georges",
+  "03" => "Saint Peter"),
+"MU" => array(
+  "12" => "Black River",
+  "13" => "Flacq",
+  "14" => "Grand Port",
+  "15" => "Moka",
+  "16" => "Pamplemousses",
+  "17" => "Plaines Wilhems",
+  "18" => "Port Louis",
+  "19" => "Riviere du Rempart",
+  "20" => "Savanne",
+  "21" => "Agalega Islands",
+  "22" => "Cargados Carajos",
+  "23" => "Rodrigues"),
+"MV" => array(
+  "01" => "Seenu",
+  "05" => "Laamu",
+  "30" => "Alifu",
+  "31" => "Baa",
+  "32" => "Dhaalu",
+  "33" => "Faafu ",
+  "34" => "Gaafu Alifu",
+  "35" => "Gaafu Dhaalu",
+  "36" => "Haa Alifu",
+  "37" => "Haa Dhaalu",
+  "38" => "Kaafu",
+  "39" => "Lhaviyani",
+  "40" => "Maale",
+  "41" => "Meemu",
+  "42" => "Gnaviyani",
+  "43" => "Noonu",
+  "44" => "Raa",
+  "45" => "Shaviyani",
+  "46" => "Thaa",
+  "47" => "Vaavu"),
+"MW" => array(
+  "02" => "Chikwawa",
+  "03" => "Chiradzulu",
+  "04" => "Chitipa",
+  "05" => "Thyolo",
+  "06" => "Dedza",
+  "07" => "Dowa",
+  "08" => "Karonga",
+  "09" => "Kasungu",
+  "11" => "Lilongwe",
+  "12" => "Mangochi",
+  "13" => "Mchinji",
+  "15" => "Mzimba",
+  "16" => "Ntcheu",
+  "17" => "Nkhata Bay",
+  "18" => "Nkhotakota",
+  "19" => "Nsanje",
+  "20" => "Ntchisi",
+  "21" => "Rumphi",
+  "22" => "Salima",
+  "23" => "Zomba",
+  "24" => "Blantyre",
+  "25" => "Mwanza",
+  "26" => "Balaka",
+  "27" => "Likoma",
+  "28" => "Machinga",
+  "29" => "Mulanje",
+  "30" => "Phalombe"),
+"MX" => array(
+  "01" => "Aguascalientes",
+  "02" => "Baja California",
+  "03" => "Baja California Sur",
+  "04" => "Campeche",
+  "05" => "Chiapas",
+  "06" => "Chihuahua",
+  "07" => "Coahuila de Zaragoza",
+  "08" => "Colima",
+  "09" => "Distrito Federal",
+  "10" => "Durango",
+  "11" => "Guanajuato",
+  "12" => "Guerrero",
+  "13" => "Hidalgo",
+  "14" => "Jalisco",
+  "15" => "Mexico",
+  "16" => "Michoacan de Ocampo",
+  "17" => "Morelos",
+  "18" => "Nayarit",
+  "19" => "Nuevo Leon",
+  "20" => "Oaxaca",
+  "21" => "Puebla",
+  "22" => "Queretaro de Arteaga",
+  "23" => "Quintana Roo",
+  "24" => "San Luis Potosi",
+  "25" => "Sinaloa",
+  "26" => "Sonora",
+  "27" => "Tabasco",
+  "28" => "Tamaulipas",
+  "29" => "Tlaxcala",
+  "30" => "Veracruz-Llave",
+  "31" => "Yucatan",
+  "32" => "Zacatecas"),
+"MY" => array(
+  "01" => "Johor",
+  "02" => "Kedah",
+  "03" => "Kelantan",
+  "04" => "Melaka",
+  "05" => "Negeri Sembilan",
+  "06" => "Pahang",
+  "07" => "Perak",
+  "08" => "Perlis",
+  "09" => "Pulau Pinang",
+  "11" => "Sarawak",
+  "12" => "Selangor",
+  "13" => "Terengganu",
+  "14" => "Kuala Lumpur",
+  "15" => "Labuan",
+  "16" => "Sabah",
+  "17" => "Putrajaya"),
+"MZ" => array(
+  "01" => "Cabo Delgado",
+  "02" => "Gaza",
+  "03" => "Inhambane",
+  "04" => "Maputo",
+  "05" => "Sofala",
+  "06" => "Nampula",
+  "07" => "Niassa",
+  "08" => "Tete",
+  "09" => "Zambezia",
+  "10" => "Manica",
+  "11" => "Maputo"),
+"NA" => array(
+  "01" => "Bethanien",
+  "02" => "Caprivi Oos",
+  "03" => "Boesmanland",
+  "04" => "Gobabis",
+  "05" => "Grootfontein",
+  "06" => "Kaokoland",
+  "07" => "Karibib",
+  "08" => "Keetmanshoop",
+  "09" => "Luderitz",
+  "10" => "Maltahohe",
+  "11" => "Okahandja",
+  "12" => "Omaruru",
+  "13" => "Otjiwarongo",
+  "14" => "Outjo",
+  "15" => "Owambo",
+  "16" => "Rehoboth",
+  "17" => "Swakopmund",
+  "18" => "Tsumeb",
+  "20" => "Karasburg",
+  "21" => "Windhoek",
+  "22" => "Damaraland",
+  "23" => "Hereroland Oos",
+  "24" => "Hereroland Wes",
+  "25" => "Kavango",
+  "26" => "Mariental",
+  "27" => "Namaland",
+  "28" => "Caprivi",
+  "29" => "Erongo",
+  "30" => "Hardap",
+  "31" => "Karas",
+  "32" => "Kunene",
+  "33" => "Ohangwena",
+  "34" => "Okavango",
+  "35" => "Omaheke",
+  "36" => "Omusati",
+  "37" => "Oshana",
+  "38" => "Oshikoto",
+  "39" => "Otjozondjupa"),
+"NE" => array(
+  "01" => "Agadez",
+  "02" => "Diffa",
+  "03" => "Dosso",
+  "04" => "Maradi",
+  "05" => "Niamey",
+  "06" => "Tahoua",
+  "07" => "Zinder",
+  "08" => "Niamey"),
+"NG" => array(
+  "05" => "Lagos",
+  "11" => "Federal Capital Territory",
+  "16" => "Ogun",
+  "21" => "Akwa Ibom",
+  "22" => "Cross River",
+  "23" => "Kaduna",
+  "24" => "Katsina",
+  "25" => "Anambra",
+  "26" => "Benue",
+  "27" => "Borno",
+  "28" => "Imo",
+  "29" => "Kano",
+  "30" => "Kwara",
+  "31" => "Niger",
+  "32" => "Oyo",
+  "35" => "Adamawa",
+  "36" => "Delta",
+  "37" => "Edo",
+  "39" => "Jigawa",
+  "40" => "Kebbi",
+  "41" => "Kogi",
+  "42" => "Osun",
+  "43" => "Taraba",
+  "44" => "Yobe",
+  "45" => "Abia",
+  "46" => "Bauchi",
+  "47" => "Enugu",
+  "48" => "Ondo",
+  "49" => "Plateau",
+  "50" => "Rivers",
+  "51" => "Sokoto",
+  "52" => "Bayelsa",
+  "53" => "Ebonyi",
+  "54" => "Ekiti",
+  "55" => "Gombe",
+  "56" => "Nassarawa",
+  "57" => "Zamfara"),
+"NI" => array(
+  "01" => "Boaco",
+  "02" => "Carazo",
+  "03" => "Chinandega",
+  "04" => "Chontales",
+  "05" => "Esteli",
+  "06" => "Granada",
+  "07" => "Jinotega",
+  "08" => "Leon",
+  "09" => "Madriz",
+  "10" => "Managua",
+  "11" => "Masaya",
+  "12" => "Matagalpa",
+  "13" => "Nueva Segovia",
+  "14" => "Rio San Juan",
+  "15" => "Rivas",
+  "16" => "Zelaya",
+  "17" => "Autonoma Atlantico Norte",
+  "18" => "Region Autonoma Atlantico Sur"),
+"NL" => array(
+  "01" => "Drenthe",
+  "02" => "Friesland",
+  "03" => "Gelderland",
+  "04" => "Groningen",
+  "05" => "Limburg",
+  "06" => "Noord-Brabant",
+  "07" => "Noord-Holland",
+  "08" => "Overijssel",
+  "09" => "Utrecht",
+  "10" => "Zeeland",
+  "11" => "Zuid-Holland",
+  "15" => "Overijssel",
+  "16" => "Flevoland"),
+"NO" => array(
+  "01" => "Akershus",
+  "02" => "Aust-Agder",
+  "04" => "Buskerud",
+  "05" => "Finnmark",
+  "06" => "Hedmark",
+  "07" => "Hordaland",
+  "08" => "More og Romsdal",
+  "09" => "Nordland",
+  "10" => "Nord-Trondelag",
+  "11" => "Oppland",
+  "12" => "Oslo",
+  "13" => "Ostfold",
+  "14" => "Rogaland",
+  "15" => "Sogn og Fjordane",
+  "16" => "Sor-Trondelag",
+  "17" => "Telemark",
+  "18" => "Troms",
+  "19" => "Vest-Agder",
+  "20" => "Vestfold"),
+"NP" => array(
+  "01" => "Bagmati",
+  "02" => "Bheri",
+  "03" => "Dhawalagiri",
+  "04" => "Gandaki",
+  "05" => "Janakpur",
+  "06" => "Karnali",
+  "07" => "Kosi",
+  "08" => "Lumbini",
+  "09" => "Mahakali",
+  "10" => "Mechi",
+  "11" => "Narayani",
+  "12" => "Rapti",
+  "13" => "Sagarmatha",
+  "14" => "Seti"),
+"NR" => array(
+  "01" => "Aiwo",
+  "02" => "Anabar",
+  "03" => "Anetan",
+  "04" => "Anibare",
+  "05" => "Baiti",
+  "06" => "Boe",
+  "07" => "Buada",
+  "08" => "Denigomodu",
+  "09" => "Ewa",
+  "10" => "Ijuw",
+  "11" => "Meneng",
+  "12" => "Nibok",
+  "13" => "Uaboe",
+  "14" => "Yaren"),
+"NZ" => array(
+  "10" => "Chatham Islands",
+  "E7" => "Auckland",
+  "E8" => "Bay of Plenty",
+  "E9" => "Canterbury",
+  "F1" => "Gisborne",
+  "F2" => "Hawke's Bay",
+  "F3" => "Manawatu-Wanganui",
+  "F4" => "Marlborough",
+  "F5" => "Nelson",
+  "F6" => "Northland",
+  "F7" => "Otago",
+  "F8" => "Southland",
+  "F9" => "Taranaki",
+  "G1" => "Waikato",
+  "G2" => "Wellington",
+  "G3" => "West Coast"),
+"OM" => array(
+  "01" => "Ad Dakhiliyah",
+  "02" => "Al Batinah",
+  "03" => "Al Wusta",
+  "04" => "Ash Sharqiyah",
+  "05" => "Az Zahirah",
+  "06" => "Masqat",
+  "07" => "Musandam",
+  "08" => "Zufar"),
+"PA" => array(
+  "01" => "Bocas del Toro",
+  "02" => "Chiriqui",
+  "03" => "Cocle",
+  "04" => "Colon",
+  "05" => "Darien",
+  "06" => "Herrera",
+  "07" => "Los Santos",
+  "08" => "Panama",
+  "09" => "San Blas",
+  "10" => "Veraguas"),
+"PE" => array(
+  "01" => "Amazonas",
+  "02" => "Ancash",
+  "03" => "Apurimac",
+  "04" => "Arequipa",
+  "05" => "Ayacucho",
+  "06" => "Cajamarca",
+  "07" => "Callao",
+  "08" => "Cusco",
+  "09" => "Huancavelica",
+  "10" => "Huanuco",
+  "11" => "Ica",
+  "12" => "Junin",
+  "13" => "La Libertad",
+  "14" => "Lambayeque",
+  "15" => "Lima",
+  "16" => "Loreto",
+  "17" => "Madre de Dios",
+  "18" => "Moquegua",
+  "19" => "Pasco",
+  "20" => "Piura",
+  "21" => "Puno",
+  "22" => "San Martin",
+  "23" => "Tacna",
+  "24" => "Tumbes",
+  "25" => "Ucayali"),
+"PG" => array(
+  "01" => "Central",
+  "02" => "Gulf",
+  "03" => "Milne Bay",
+  "04" => "Northern",
+  "05" => "Southern Highlands",
+  "06" => "Western",
+  "07" => "North Solomons",
+  "08" => "Chimbu",
+  "09" => "Eastern Highlands",
+  "10" => "East New Britain",
+  "11" => "East Sepik",
+  "12" => "Madang",
+  "13" => "Manus",
+  "14" => "Morobe",
+  "15" => "New Ireland",
+  "16" => "Western Highlands",
+  "17" => "West New Britain",
+  "18" => "Sandaun",
+  "19" => "Enga",
+  "20" => "National Capital"),
+"PH" => array(
+  "01" => "Abra",
+  "02" => "Agusan del Norte",
+  "03" => "Agusan del Sur",
+  "04" => "Aklan",
+  "05" => "Albay",
+  "06" => "Antique",
+  "07" => "Bataan",
+  "08" => "Batanes",
+  "09" => "Batangas",
+  "10" => "Benguet",
+  "11" => "Bohol",
+  "12" => "Bukidnon",
+  "13" => "Bulacan",
+  "14" => "Cagayan",
+  "15" => "Camarines Norte",
+  "16" => "Camarines Sur",
+  "17" => "Camiguin",
+  "18" => "Capiz",
+  "19" => "Catanduanes",
+  "20" => "Cavite",
+  "21" => "Cebu",
+  "22" => "Basilan",
+  "23" => "Eastern Samar",
+  "24" => "Davao",
+  "25" => "Davao del Sur",
+  "26" => "Davao Oriental",
+  "27" => "Ifugao",
+  "28" => "Ilocos Norte",
+  "29" => "Ilocos Sur",
+  "30" => "Iloilo",
+  "31" => "Isabela",
+  "32" => "Kalinga-Apayao",
+  "33" => "Laguna",
+  "34" => "Lanao del Norte",
+  "35" => "Lanao del Sur",
+  "36" => "La Union",
+  "37" => "Leyte",
+  "38" => "Marinduque",
+  "39" => "Masbate",
+  "40" => "Mindoro Occidental",
+  "41" => "Mindoro Oriental",
+  "42" => "Misamis Occidental",
+  "43" => "Misamis Oriental",
+  "44" => "Mountain",
+  "45" => "Negros Occidental",
+  "46" => "Negros Oriental",
+  "47" => "Nueva Ecija",
+  "48" => "Nueva Vizcaya",
+  "49" => "Palawan",
+  "50" => "Pampanga",
+  "51" => "Pangasinan",
+  "53" => "Rizal",
+  "54" => "Romblon",
+  "55" => "Samar",
+  "56" => "Maguindanao",
+  "57" => "North Cotabato",
+  "58" => "Sorsogon",
+  "59" => "Southern Leyte",
+  "60" => "Sulu",
+  "61" => "Surigao del Norte",
+  "62" => "Surigao del Sur",
+  "63" => "Tarlac",
+  "64" => "Zambales",
+  "65" => "Zamboanga del Norte",
+  "66" => "Zamboanga del Sur",
+  "67" => "Northern Samar",
+  "68" => "Quirino",
+  "69" => "Siquijor",
+  "70" => "South Cotabato",
+  "71" => "Sultan Kudarat",
+  "72" => "Tawitawi",
+  "A1" => "Angeles",
+  "A2" => "Bacolod",
+  "A3" => "Bago",
+  "A4" => "Baguio",
+  "A5" => "Bais",
+  "A6" => "Basilan City",
+  "A7" => "Batangas City",
+  "A8" => "Butuan",
+  "A9" => "Cabanatuan",
+  "B1" => "Cadiz",
+  "B2" => "Cagayan de Oro",
+  "B3" => "Calbayog",
+  "B4" => "Caloocan",
+  "B5" => "Canlaon",
+  "B6" => "Cavite City",
+  "B7" => "Cebu City",
+  "B8" => "Cotabato",
+  "B9" => "Dagupan",
+  "C1" => "Danao",
+  "C2" => "Dapitan",
+  "C3" => "Davao City",
+  "C4" => "Dipolog",
+  "C5" => "Dumaguete",
+  "C6" => "General Santos",
+  "C7" => "Gingoog",
+  "C8" => "Iligan",
+  "C9" => "Iloilo City",
+  "D1" => "Iriga",
+  "D2" => "La Carlota",
+  "D3" => "Laoag",
+  "D4" => "Lapu-Lapu",
+  "D5" => "Legaspi",
+  "D6" => "Lipa",
+  "D7" => "Lucena",
+  "D8" => "Mandaue",
+  "D9" => "Manila",
+  "E1" => "Marawi",
+  "E2" => "Naga",
+  "E3" => "Olongapo",
+  "E4" => "Ormoc",
+  "E5" => "Oroquieta",
+  "E6" => "Ozamis",
+  "E7" => "Pagadian",
+  "E8" => "Palayan",
+  "E9" => "Pasay",
+  "F1" => "Puerto Princesa",
+  "F2" => "Quezon City",
+  "F3" => "Roxas",
+  "F4" => "San Carlos",
+  "F5" => "San Carlos",
+  "F6" => "San Jose",
+  "F7" => "San Pablo",
+  "F8" => "Silay",
+  "F9" => "Surigao",
+  "G1" => "Tacloban",
+  "G2" => "Tagaytay",
+  "G3" => "Tagbilaran",
+  "G4" => "Tangub",
+  "G5" => "Toledo",
+  "G6" => "Trece Martires",
+  "G7" => "Zamboanga",
+  "G8" => "Aurora",
+  "H2" => "Quezon",
+  "H3" => "Negros Occidental"),
+"PK" => array(
+  "01" => "Federally Administered Tribal Areas",
+  "02" => "Balochistan",
+  "03" => "North-West Frontier",
+  "04" => "Punjab",
+  "05" => "Sindh",
+  "06" => "Azad Kashmir",
+  "07" => "Northern Areas",
+  "08" => "Islamabad"),
+"PL" => array(
+  "72" => "Dolnoslaskie",
+  "73" => "Kujawsko-Pomorskie",
+  "74" => "Lodzkie",
+  "75" => "Lubelskie",
+  "76" => "Lubuskie",
+  "77" => "Malopolskie",
+  "78" => "Mazowieckie",
+  "79" => "Opolskie",
+  "80" => "Podkarpackie",
+  "81" => "Podlaskie",
+  "82" => "Pomorskie",
+  "83" => "Slaskie",
+  "84" => "Swietokrzyskie",
+  "85" => "Warminsko-Mazurskie",
+  "86" => "Wielkopolskie",
+  "87" => "Zachodniopomorskie"),
+"PS" => array(
+  "GZ" => "Gaza",
+  "WE" => "West Bank"),
+"PT" => array(
+  "02" => "Aveiro",
+  "03" => "Beja",
+  "04" => "Braga",
+  "05" => "Braganca",
+  "06" => "Castelo Branco",
+  "07" => "Coimbra",
+  "08" => "Evora",
+  "09" => "Faro",
+  "10" => "Madeira",
+  "11" => "Guarda",
+  "13" => "Leiria",
+  "14" => "Lisboa",
+  "16" => "Portalegre",
+  "17" => "Porto",
+  "18" => "Santarem",
+  "19" => "Setubal",
+  "20" => "Viana do Castelo",
+  "21" => "Vila Real",
+  "22" => "Viseu",
+  "23" => "Azores"),
+"PY" => array(
+  "01" => "Alto Parana",
+  "02" => "Amambay",
+  "03" => "Boqueron",
+  "04" => "Caaguazu",
+  "05" => "Caazapa",
+  "06" => "Central",
+  "07" => "Concepcion",
+  "08" => "Cordillera",
+  "10" => "Guaira",
+  "11" => "Itapua",
+  "12" => "Misiones",
+  "13" => "Neembucu",
+  "15" => "Paraguari",
+  "16" => "Presidente Hayes",
+  "17" => "San Pedro",
+  "19" => "Canindeyu",
+  "20" => "Chaco",
+  "21" => "Nueva Asuncion",
+  "23" => "Alto Paraguay"),
+"QA" => array(
+  "01" => "Ad Dawhah",
+  "02" => "Al Ghuwariyah",
+  "03" => "Al Jumaliyah",
+  "04" => "Al Khawr",
+  "05" => "Al Wakrah Municipality",
+  "06" => "Ar Rayyan",
+  "08" => "Madinat ach Shamal",
+  "09" => "Umm Salal",
+  "10" => "Al Wakrah",
+  "11" => "Jariyan al Batnah",
+  "12" => "Umm Sa'id"),
+"RO" => array(
+  "01" => "Alba",
+  "02" => "Arad",
+  "03" => "Arges",
+  "04" => "Bacau",
+  "05" => "Bihor",
+  "06" => "Bistrita-Nasaud",
+  "07" => "Botosani",
+  "08" => "Braila",
+  "09" => "Brasov",
+  "10" => "Bucuresti",
+  "11" => "Buzau",
+  "12" => "Caras-Severin",
+  "13" => "Cluj",
+  "14" => "Constanta",
+  "15" => "Covasna",
+  "16" => "Dambovita",
+  "17" => "Dolj",
+  "18" => "Galati",
+  "19" => "Gorj",
+  "20" => "Harghita",
+  "21" => "Hunedoara",
+  "22" => "Ialomita",
+  "23" => "Iasi",
+  "25" => "Maramures",
+  "26" => "Mehedinti",
+  "27" => "Mures",
+  "28" => "Neamt",
+  "29" => "Olt",
+  "30" => "Prahova",
+  "31" => "Salaj",
+  "32" => "Satu Mare",
+  "33" => "Sibiu",
+  "34" => "Suceava",
+  "35" => "Teleorman",
+  "36" => "Timis",
+  "37" => "Tulcea",
+  "38" => "Vaslui",
+  "39" => "Valcea",
+  "40" => "Vrancea",
+  "41" => "Calarasi",
+  "42" => "Giurgiu",
+  "43" => "Ilfov"),
+"RS" => array(
+  "01" => "Kosovo",
+  "02" => "Vojvodina"),
+"RU" => array(
+  "01" => "Adygeya, Republic of",
+  "02" => "Aginsky Buryatsky AO",
+  "03" => "Gorno-Altay",
+  "04" => "Altaisky krai",
+  "05" => "Amur",
+  "06" => "Arkhangel'sk",
+  "07" => "Astrakhan'",
+  "08" => "Bashkortostan",
+  "09" => "Belgorod",
+  "10" => "Bryansk",
+  "11" => "Buryat",
+  "12" => "Chechnya",
+  "13" => "Chelyabinsk",
+  "14" => "Chita",
+  "15" => "Chukot",
+  "16" => "Chuvashia",
+  "17" => "Dagestan",
+  "18" => "Evenk",
+  "19" => "Ingush",
+  "20" => "Irkutsk",
+  "21" => "Ivanovo",
+  "22" => "Kabardin-Balkar",
+  "23" => "Kaliningrad",
+  "24" => "Kalmyk",
+  "25" => "Kaluga",
+  "26" => "Kamchatka",
+  "27" => "Karachay-Cherkess",
+  "28" => "Karelia",
+  "29" => "Kemerovo",
+  "30" => "Khabarovsk",
+  "31" => "Khakass",
+  "32" => "Khanty-Mansiy",
+  "33" => "Kirov",
+  "34" => "Komi",
+  "35" => "Komi-Permyak",
+  "36" => "Koryak",
+  "37" => "Kostroma",
+  "38" => "Krasnodar",
+  "39" => "Krasnoyarsk",
+  "40" => "Kurgan",
+  "41" => "Kursk",
+  "42" => "Leningrad",
+  "43" => "Lipetsk",
+  "44" => "Magadan",
+  "45" => "Mariy-El",
+  "46" => "Mordovia",
+  "47" => "Moskva",
+  "48" => "Moscow City",
+  "49" => "Murmansk",
+  "50" => "Nenets",
+  "51" => "Nizhegorod",
+  "52" => "Novgorod",
+  "53" => "Novosibirsk",
+  "54" => "Omsk",
+  "55" => "Orenburg",
+  "56" => "Orel",
+  "57" => "Penza",
+  "58" => "Perm'",
+  "59" => "Primor'ye",
+  "60" => "Pskov",
+  "61" => "Rostov",
+  "62" => "Ryazan'",
+  "63" => "Sakha",
+  "64" => "Sakhalin",
+  "65" => "Samara",
+  "66" => "Saint Petersburg City",
+  "67" => "Saratov",
+  "68" => "North Ossetia",
+  "69" => "Smolensk",
+  "70" => "Stavropol'",
+  "71" => "Sverdlovsk",
+  "72" => "Tambovskaya oblast",
+  "73" => "Tatarstan",
+  "74" => "Taymyr",
+  "75" => "Tomsk",
+  "76" => "Tula",
+  "77" => "Tver'",
+  "78" => "Tyumen'",
+  "79" => "Tuva",
+  "80" => "Udmurt",
+  "81" => "Ul'yanovsk",
+  "82" => "Ust-Orda Buryat",
+  "83" => "Vladimir",
+  "84" => "Volgograd",
+  "85" => "Vologda",
+  "86" => "Voronezh",
+  "87" => "Yamal-Nenets",
+  "88" => "Yaroslavl'",
+  "89" => "Yevrey",
+  "90" => "Permskiy Kray",
+  "91" => "Krasnoyarskiy Kray",
+  "CI" => "Chechnya Republic"),
+"RW" => array(
+  "01" => "Butare",
+  "06" => "Gitarama",
+  "07" => "Kibungo",
+  "09" => "Kigali",
+  "11" => "Est",
+  "12" => "Kigali",
+  "13" => "Nord",
+  "14" => "Ouest",
+  "15" => "Sud"),
+"SA" => array(
+  "02" => "Al Bahah",
+  "03" => "Al Jawf",
+  "05" => "Al Madinah",
+  "06" => "Ash Sharqiyah",
+  "08" => "Al Qasim",
+  "09" => "Al Qurayyat",
+  "10" => "Ar Riyad",
+  "13" => "Ha'il",
+  "14" => "Makkah",
+  "15" => "Al Hudud ash Shamaliyah",
+  "16" => "Najran",
+  "17" => "Jizan",
+  "19" => "Tabuk",
+  "20" => "Al Jawf"),
+"SB" => array(
+  "03" => "Malaita",
+  "06" => "Guadalcanal",
+  "07" => "Isabel",
+  "08" => "Makira",
+  "09" => "Temotu",
+  "10" => "Central",
+  "11" => "Western",
+  "12" => "Choiseul",
+  "13" => "Rennell and Bellona"),
+"SC" => array(
+  "01" => "Anse aux Pins",
+  "02" => "Anse Boileau",
+  "03" => "Anse Etoile",
+  "04" => "Anse Louis",
+  "05" => "Anse Royale",
+  "06" => "Baie Lazare",
+  "07" => "Baie Sainte Anne",
+  "08" => "Beau Vallon",
+  "09" => "Bel Air",
+  "10" => "Bel Ombre",
+  "11" => "Cascade",
+  "12" => "Glacis",
+  "13" => "Grand' Anse",
+  "14" => "Grand' Anse",
+  "15" => "La Digue",
+  "16" => "La Riviere Anglaise",
+  "17" => "Mont Buxton",
+  "18" => "Mont Fleuri",
+  "19" => "Plaisance",
+  "20" => "Pointe La Rue",
+  "21" => "Port Glaud",
+  "22" => "Saint Louis",
+  "23" => "Takamaka"),
+"SD" => array(
+  "27" => "Al Wusta",
+  "28" => "Al Istiwa'iyah",
+  "29" => "Al Khartum",
+  "30" => "Ash Shamaliyah",
+  "31" => "Ash Sharqiyah",
+  "32" => "Bahr al Ghazal",
+  "33" => "Darfur",
+  "34" => "Kurdufan",
+  "35" => "Upper Nile",
+  "40" => "Al Wahadah State",
+  "44" => "Central Equatoria State"),
+"SE" => array(
+  "02" => "Blekinge Lan",
+  "03" => "Gavleborgs Lan",
+  "05" => "Gotlands Lan",
+  "06" => "Hallands Lan",
+  "07" => "Jamtlands Lan",
+  "08" => "Jonkopings Lan",
+  "09" => "Kalmar Lan",
+  "10" => "Dalarnas Lan",
+  "12" => "Kronobergs Lan",
+  "14" => "Norrbottens Lan",
+  "15" => "Orebro Lan",
+  "16" => "Ostergotlands Lan",
+  "18" => "Sodermanlands Lan",
+  "21" => "Uppsala Lan",
+  "22" => "Varmlands Lan",
+  "23" => "Vasterbottens Lan",
+  "24" => "Vasternorrlands Lan",
+  "25" => "Vastmanlands Lan",
+  "26" => "Stockholms Lan",
+  "27" => "Skane Lan",
+  "28" => "Vastra Gotaland"),
+"SH" => array(
+  "01" => "Ascension",
+  "02" => "Saint Helena",
+  "03" => "Tristan da Cunha"),
+"SI" => array(
+  "01" => "Ajdovscina",
+  "02" => "Beltinci",
+  "03" => "Bled",
+  "04" => "Bohinj",
+  "05" => "Borovnica",
+  "06" => "Bovec",
+  "07" => "Brda",
+  "08" => "Brezice",
+  "09" => "Brezovica",
+  "11" => "Celje",
+  "12" => "Cerklje na Gorenjskem",
+  "13" => "Cerknica",
+  "14" => "Cerkno",
+  "15" => "Crensovci",
+  "16" => "Crna na Koroskem",
+  "17" => "Crnomelj",
+  "19" => "Divaca",
+  "20" => "Dobrepolje",
+  "22" => "Dol pri Ljubljani",
+  "24" => "Dornava",
+  "25" => "Dravograd",
+  "26" => "Duplek",
+  "27" => "Gorenja Vas-Poljane",
+  "28" => "Gorisnica",
+  "29" => "Gornja Radgona",
+  "30" => "Gornji Grad",
+  "31" => "Gornji Petrovci",
+  "32" => "Grosuplje",
+  "34" => "Hrastnik",
+  "35" => "Hrpelje-Kozina",
+  "36" => "Idrija",
+  "37" => "Ig",
+  "38" => "Ilirska Bistrica",
+  "39" => "Ivancna Gorica",
+  "40" => "Izola-Isola",
+  "42" => "Jursinci",
+  "44" => "Kanal",
+  "45" => "Kidricevo",
+  "46" => "Kobarid",
+  "47" => "Kobilje",
+  "49" => "Komen",
+  "50" => "Koper-Capodistria",
+  "51" => "Kozje",
+  "52" => "Kranj",
+  "53" => "Kranjska Gora",
+  "54" => "Krsko",
+  "55" => "Kungota",
+  "57" => "Lasko",
+  "61" => "Ljubljana",
+  "62" => "Ljubno",
+  "64" => "Logatec",
+  "66" => "Loski Potok",
+  "68" => "Lukovica",
+  "71" => "Medvode",
+  "72" => "Menges",
+  "73" => "Metlika",
+  "74" => "Mezica",
+  "76" => "Mislinja",
+  "77" => "Moravce",
+  "78" => "Moravske Toplice",
+  "79" => "Mozirje",
+  "80" => "Murska Sobota",
+  "81" => "Muta",
+  "82" => "Naklo",
+  "83" => "Nazarje",
+  "84" => "Nova Gorica",
+  "86" => "Odranci",
+  "87" => "Ormoz",
+  "88" => "Osilnica",
+  "89" => "Pesnica",
+  "91" => "Pivka",
+  "92" => "Podcetrtek",
+  "94" => "Postojna",
+  "97" => "Puconci",
+  "98" => "Racam",
+  "99" => "Radece",
+  "A1" => "Radenci",
+  "A2" => "Radlje ob Dravi",
+  "A3" => "Radovljica",
+  "A6" => "Rogasovci",
+  "A7" => "Rogaska Slatina",
+  "A8" => "Rogatec",
+  "B1" => "Semic",
+  "B2" => "Sencur",
+  "B3" => "Sentilj",
+  "B4" => "Sentjernej",
+  "B6" => "Sevnica",
+  "B7" => "Sezana",
+  "B8" => "Skocjan",
+  "B9" => "Skofja Loka",
+  "C1" => "Skofljica",
+  "C2" => "Slovenj Gradec",
+  "C4" => "Slovenske Konjice",
+  "C5" => "Smarje pri Jelsah",
+  "C6" => "Smartno ob Paki",
+  "C7" => "Sostanj",
+  "C8" => "Starse",
+  "C9" => "Store",
+  "D1" => "Sveti Jurij",
+  "D2" => "Tolmin",
+  "D3" => "Trbovlje",
+  "D4" => "Trebnje",
+  "D5" => "Trzic",
+  "D6" => "Turnisce",
+  "D7" => "Velenje",
+  "D8" => "Velike Lasce",
+  "E1" => "Vipava",
+  "E2" => "Vitanje",
+  "E3" => "Vodice",
+  "E5" => "Vrhnika",
+  "E6" => "Vuzenica",
+  "E7" => "Zagorje ob Savi",
+  "E9" => "Zavrc",
+  "F1" => "Zelezniki",
+  "F2" => "Ziri",
+  "F3" => "Zrece",
+  "G4" => "Dobrova-Horjul-Polhov Gradec",
+  "G7" => "Domzale",
+  "H4" => "Jesenice",
+  "H6" => "Kamnik",
+  "H7" => "Kocevje",
+  "I2" => "Kuzma",
+  "I3" => "Lenart",
+  "I5" => "Litija",
+  "I6" => "Ljutomer",
+  "I7" => "Loska Dolina",
+  "I9" => "Luce",
+  "J1" => "Majsperk",
+  "J2" => "Maribor",
+  "J5" => "Miren-Kostanjevica",
+  "J7" => "Novo Mesto",
+  "J9" => "Piran",
+  "K5" => "Preddvor",
+  "K7" => "Ptuj",
+  "L1" => "Ribnica",
+  "L3" => "Ruse",
+  "L7" => "Sentjur pri Celju",
+  "L8" => "Slovenska Bistrica",
+  "N2" => "Videm",
+  "N3" => "Vojnik",
+  "N5" => "Zalec"),
+"SK" => array(
+  "01" => "Banska Bystrica",
+  "02" => "Bratislava",
+  "03" => "Kosice",
+  "04" => "Nitra",
+  "05" => "Presov",
+  "06" => "Trencin",
+  "07" => "Trnava",
+  "08" => "Zilina"),
+"SL" => array(
+  "01" => "Eastern",
+  "02" => "Northern",
+  "03" => "Southern",
+  "04" => "Western Area"),
+"SM" => array(
+  "01" => "Acquaviva",
+  "02" => "Chiesanuova",
+  "03" => "Domagnano",
+  "04" => "Faetano",
+  "05" => "Fiorentino",
+  "06" => "Borgo Maggiore",
+  "07" => "San Marino",
+  "08" => "Monte Giardino",
+  "09" => "Serravalle"),
+"SN" => array(
+  "01" => "Dakar",
+  "03" => "Diourbel",
+  "05" => "Tambacounda",
+  "07" => "Thies",
+  "09" => "Fatick",
+  "10" => "Kaolack",
+  "11" => "Kolda",
+  "12" => "Ziguinchor",
+  "13" => "Louga",
+  "14" => "Saint-Louis",
+  "15" => "Matam"),
+"SO" => array(
+  "01" => "Bakool",
+  "02" => "Banaadir",
+  "03" => "Bari",
+  "04" => "Bay",
+  "05" => "Galguduud",
+  "06" => "Gedo",
+  "07" => "Hiiraan",
+  "08" => "Jubbada Dhexe",
+  "09" => "Jubbada Hoose",
+  "10" => "Mudug",
+  "11" => "Nugaal",
+  "12" => "Sanaag",
+  "13" => "Shabeellaha Dhexe",
+  "14" => "Shabeellaha Hoose",
+  "16" => "Woqooyi Galbeed",
+  "18" => "Nugaal",
+  "19" => "Togdheer",
+  "20" => "Woqooyi Galbeed",
+  "21" => "Awdal",
+  "22" => "Sool"),
+"SR" => array(
+  "10" => "Brokopondo",
+  "11" => "Commewijne",
+  "12" => "Coronie",
+  "13" => "Marowijne",
+  "14" => "Nickerie",
+  "15" => "Para",
+  "16" => "Paramaribo",
+  "17" => "Saramacca",
+  "18" => "Sipaliwini",
+  "19" => "Wanica"),
+"ST" => array(
+  "01" => "Principe",
+  "02" => "Sao Tome"),
+"SV" => array(
+  "01" => "Ahuachapan",
+  "02" => "Cabanas",
+  "03" => "Chalatenango",
+  "04" => "Cuscatlan",
+  "05" => "La Libertad",
+  "06" => "La Paz",
+  "07" => "La Union",
+  "08" => "Morazan",
+  "09" => "San Miguel",
+  "10" => "San Salvador",
+  "11" => "Santa Ana",
+  "12" => "San Vicente",
+  "13" => "Sonsonate",
+  "14" => "Usulutan"),
+"SY" => array(
+  "01" => "Al Hasakah",
+  "02" => "Al Ladhiqiyah",
+  "03" => "Al Qunaytirah",
+  "04" => "Ar Raqqah",
+  "05" => "As Suwayda'",
+  "06" => "Dar",
+  "07" => "Dayr az Zawr",
+  "08" => "Rif Dimashq",
+  "09" => "Halab",
+  "10" => "Hamah",
+  "11" => "Hims",
+  "12" => "Idlib",
+  "13" => "Dimashq",
+  "14" => "Tartus"),
+"SZ" => array(
+  "01" => "Hhohho",
+  "02" => "Lubombo",
+  "03" => "Manzini",
+  "04" => "Shiselweni",
+  "05" => "Praslin"),
+"TD" => array(
+  "01" => "Batha",
+  "02" => "Biltine",
+  "03" => "Borkou-Ennedi-Tibesti",
+  "04" => "Chari-Baguirmi",
+  "05" => "Guera",
+  "06" => "Kanem",
+  "07" => "Lac",
+  "08" => "Logone Occidental",
+  "09" => "Logone Oriental",
+  "10" => "Mayo-Kebbi",
+  "11" => "Moyen-Chari",
+  "12" => "Ouaddai",
+  "13" => "Salamat",
+  "14" => "Tandjile"),
+"TG" => array(
+  "22" => "Centrale",
+  "23" => "Kara",
+  "24" => "Maritime",
+  "25" => "Plateaux",
+  "26" => "Savanes"),
+"TH" => array(
+  "01" => "Mae Hong Son",
+  "02" => "Chiang Mai",
+  "03" => "Chiang Rai",
+  "04" => "Nan",
+  "05" => "Lamphun",
+  "06" => "Lampang",
+  "07" => "Phrae",
+  "08" => "Tak",
+  "09" => "Sukhothai",
+  "10" => "Uttaradit",
+  "11" => "Kamphaeng Phet",
+  "12" => "Phitsanulok",
+  "13" => "Phichit",
+  "14" => "Phetchabun",
+  "15" => "Uthai Thani",
+  "16" => "Nakhon Sawan",
+  "17" => "Nong Khai",
+  "18" => "Loei",
+  "20" => "Sakon Nakhon",
+  "21" => "Nakhon Phanom",
+  "22" => "Khon Kaen",
+  "23" => "Kalasin",
+  "24" => "Maha Sarakham",
+  "25" => "Roi Et",
+  "26" => "Chaiyaphum",
+  "27" => "Nakhon Ratchasima",
+  "28" => "Buriram",
+  "29" => "Surin",
+  "30" => "Sisaket",
+  "31" => "Narathiwat",
+  "32" => "Chai Nat",
+  "33" => "Sing Buri",
+  "34" => "Lop Buri",
+  "35" => "Ang Thong",
+  "36" => "Phra Nakhon Si Ayutthaya",
+  "37" => "Saraburi",
+  "38" => "Nonthaburi",
+  "39" => "Pathum Thani",
+  "40" => "Krung Thep",
+  "41" => "Phayao",
+  "42" => "Samut Prakan",
+  "43" => "Nakhon Nayok",
+  "44" => "Chachoengsao",
+  "45" => "Prachin Buri",
+  "46" => "Chon Buri",
+  "47" => "Rayong",
+  "48" => "Chanthaburi",
+  "49" => "Trat",
+  "50" => "Kanchanaburi",
+  "51" => "Suphan Buri",
+  "52" => "Ratchaburi",
+  "53" => "Nakhon Pathom",
+  "54" => "Samut Songkhram",
+  "55" => "Samut Sakhon",
+  "56" => "Phetchaburi",
+  "57" => "Prachuap Khiri Khan",
+  "58" => "Chumphon",
+  "59" => "Ranong",
+  "60" => "Surat Thani",
+  "61" => "Phangnga",
+  "62" => "Phuket",
+  "63" => "Krabi",
+  "64" => "Nakhon Si Thammarat",
+  "65" => "Trang",
+  "66" => "Phatthalung",
+  "67" => "Satun",
+  "68" => "Songkhla",
+  "69" => "Pattani",
+  "70" => "Yala",
+  "71" => "Ubon Ratchathani",
+  "72" => "Yasothon",
+  "73" => "Nakhon Phanom",
+  "75" => "Ubon Ratchathani",
+  "76" => "Udon Thani",
+  "77" => "Amnat Charoen",
+  "78" => "Mukdahan",
+  "79" => "Nong Bua Lamphu",
+  "80" => "Sa Kaeo"),
+"TJ" => array(
+  "01" => "Kuhistoni Badakhshon",
+  "02" => "Khatlon",
+  "03" => "Sughd"),
+"TM" => array(
+  "01" => "Ahal",
+  "02" => "Balkan",
+  "03" => "Dashoguz",
+  "04" => "Lebap",
+  "05" => "Mary"),
+"TN" => array(
+  "02" => "Kasserine",
+  "03" => "Kairouan",
+  "06" => "Jendouba",
+  "10" => "Qafsah",
+  "14" => "El Kef",
+  "15" => "Al Mahdia",
+  "16" => "Al Munastir",
+  "17" => "Bajah",
+  "18" => "Bizerte",
+  "19" => "Nabeul",
+  "22" => "Siliana",
+  "23" => "Sousse",
+  "27" => "Ben Arous",
+  "28" => "Madanin",
+  "29" => "Gabes",
+  "31" => "Kebili",
+  "32" => "Sfax",
+  "33" => "Sidi Bou Zid",
+  "34" => "Tataouine",
+  "35" => "Tozeur",
+  "36" => "Tunis",
+  "37" => "Zaghouan",
+  "38" => "Aiana",
+  "39" => "Manouba"),
+"TO" => array(
+  "01" => "Ha",
+  "02" => "Tongatapu",
+  "03" => "Vava"),
+"TR" => array(
+  "02" => "Adiyaman",
+  "03" => "Afyonkarahisar",
+  "04" => "Agri",
+  "05" => "Amasya",
+  "07" => "Antalya",
+  "08" => "Artvin",
+  "09" => "Aydin",
+  "10" => "Balikesir",
+  "11" => "Bilecik",
+  "12" => "Bingol",
+  "13" => "Bitlis",
+  "14" => "Bolu",
+  "15" => "Burdur",
+  "16" => "Bursa",
+  "17" => "Canakkale",
+  "19" => "Corum",
+  "20" => "Denizli",
+  "21" => "Diyarbakir",
+  "22" => "Edirne",
+  "23" => "Elazig",
+  "24" => "Erzincan",
+  "25" => "Erzurum",
+  "26" => "Eskisehir",
+  "28" => "Giresun",
+  "31" => "Hatay",
+  "32" => "Mersin",
+  "33" => "Isparta",
+  "34" => "Istanbul",
+  "35" => "Izmir",
+  "37" => "Kastamonu",
+  "38" => "Kayseri",
+  "39" => "Kirklareli",
+  "40" => "Kirsehir",
+  "41" => "Kocaeli",
+  "43" => "Kutahya",
+  "44" => "Malatya",
+  "45" => "Manisa",
+  "46" => "Kahramanmaras",
+  "48" => "Mugla",
+  "49" => "Mus",
+  "50" => "Nevsehir",
+  "52" => "Ordu",
+  "53" => "Rize",
+  "54" => "Sakarya",
+  "55" => "Samsun",
+  "57" => "Sinop",
+  "58" => "Sivas",
+  "59" => "Tekirdag",
+  "60" => "Tokat",
+  "61" => "Trabzon",
+  "62" => "Tunceli",
+  "63" => "Sanliurfa",
+  "64" => "Usak",
+  "65" => "Van",
+  "66" => "Yozgat",
+  "68" => "Ankara",
+  "69" => "Gumushane",
+  "70" => "Hakkari",
+  "71" => "Konya",
+  "72" => "Mardin",
+  "73" => "Nigde",
+  "74" => "Siirt",
+  "75" => "Aksaray",
+  "76" => "Batman",
+  "77" => "Bayburt",
+  "78" => "Karaman",
+  "79" => "Kirikkale",
+  "80" => "Sirnak",
+  "81" => "Adana",
+  "82" => "Cankiri",
+  "83" => "Gaziantep",
+  "84" => "Kars",
+  "85" => "Zonguldak",
+  "86" => "Ardahan",
+  "87" => "Bartin",
+  "88" => "Igdir",
+  "89" => "Karabuk",
+  "90" => "Kilis",
+  "91" => "Osmaniye",
+  "92" => "Yalova",
+  "93" => "Duzce"),
+"TT" => array(
+  "01" => "Arima",
+  "02" => "Caroni",
+  "03" => "Mayaro",
+  "04" => "Nariva",
+  "05" => "Port-of-Spain",
+  "06" => "Saint Andrew",
+  "07" => "Saint David",
+  "08" => "Saint George",
+  "09" => "Saint Patrick",
+  "10" => "San Fernando",
+  "11" => "Tobago",
+  "12" => "Victoria"),
+"TW" => array(
+  "01" => "Fu-chien",
+  "02" => "Kao-hsiung",
+  "03" => "T'ai-pei",
+  "04" => "T'ai-wan"),
+"TZ" => array(
+  "02" => "Pwani",
+  "03" => "Dodoma",
+  "04" => "Iringa",
+  "05" => "Kigoma",
+  "06" => "Kilimanjaro",
+  "07" => "Lindi",
+  "08" => "Mara",
+  "09" => "Mbeya",
+  "10" => "Morogoro",
+  "11" => "Mtwara",
+  "12" => "Mwanza",
+  "13" => "Pemba North",
+  "14" => "Ruvuma",
+  "15" => "Shinyanga",
+  "16" => "Singida",
+  "17" => "Tabora",
+  "18" => "Tanga",
+  "19" => "Kagera",
+  "20" => "Pemba South",
+  "21" => "Zanzibar Central",
+  "22" => "Zanzibar North",
+  "23" => "Dar es Salaam",
+  "24" => "Rukwa",
+  "25" => "Zanzibar Urban",
+  "26" => "Arusha",
+  "27" => "Manyara"),
+"UA" => array(
+  "01" => "Cherkas'ka Oblast'",
+  "02" => "Chernihivs'ka Oblast'",
+  "03" => "Chernivets'ka Oblast'",
+  "04" => "Dnipropetrovs'ka Oblast'",
+  "05" => "Donets'ka Oblast'",
+  "06" => "Ivano-Frankivs'ka Oblast'",
+  "07" => "Kharkivs'ka Oblast'",
+  "08" => "Khersons'ka Oblast'",
+  "09" => "Khmel'nyts'ka Oblast'",
+  "10" => "Kirovohrads'ka Oblast'",
+  "11" => "Krym",
+  "12" => "Kyyiv",
+  "13" => "Kyyivs'ka Oblast'",
+  "14" => "Luhans'ka Oblast'",
+  "15" => "L'vivs'ka Oblast'",
+  "16" => "Mykolayivs'ka Oblast'",
+  "17" => "Odes'ka Oblast'",
+  "18" => "Poltavs'ka Oblast'",
+  "19" => "Rivnens'ka Oblast'",
+  "20" => "Sevastopol'",
+  "21" => "Sums'ka Oblast'",
+  "22" => "Ternopil's'ka Oblast'",
+  "23" => "Vinnyts'ka Oblast'",
+  "24" => "Volyns'ka Oblast'",
+  "25" => "Zakarpats'ka Oblast'",
+  "26" => "Zaporiz'ka Oblast'",
+  "27" => "Zhytomyrs'ka Oblast'"),
+"UG" => array(
+  "26" => "Apac",
+  "28" => "Bundibugyo",
+  "29" => "Bushenyi",
+  "30" => "Gulu",
+  "31" => "Hoima",
+  "33" => "Jinja",
+  "36" => "Kalangala",
+  "37" => "Kampala",
+  "38" => "Kamuli",
+  "39" => "Kapchorwa",
+  "40" => "Kasese",
+  "41" => "Kibale",
+  "42" => "Kiboga",
+  "43" => "Kisoro",
+  "45" => "Kotido",
+  "46" => "Kumi",
+  "47" => "Lira",
+  "50" => "Masindi",
+  "52" => "Mbarara",
+  "56" => "Mubende",
+  "58" => "Nebbi",
+  "59" => "Ntungamo",
+  "60" => "Pallisa",
+  "61" => "Rakai",
+  "65" => "Adjumani",
+  "66" => "Bugiri",
+  "67" => "Busia",
+  "69" => "Katakwi",
+  "70" => "Luwero",
+  "71" => "Masaka",
+  "72" => "Moyo",
+  "73" => "Nakasongola",
+  "74" => "Sembabule",
+  "76" => "Tororo",
+  "77" => "Arua",
+  "78" => "Iganga",
+  "79" => "Kabarole",
+  "80" => "Kaberamaido",
+  "81" => "Kamwenge",
+  "82" => "Kanungu",
+  "83" => "Kayunga",
+  "84" => "Kitgum",
+  "85" => "Kyenjojo",
+  "86" => "Mayuge",
+  "87" => "Mbale",
+  "88" => "Moroto",
+  "89" => "Mpigi",
+  "90" => "Mukono",
+  "91" => "Nakapiripirit",
+  "92" => "Pader",
+  "93" => "Rukungiri",
+  "94" => "Sironko",
+  "95" => "Soroti",
+  "96" => "Wakiso",
+  "97" => "Yumbe"),
+"US" => array(
+  "AA" => "Armed Forces Americas",
+  "AE" => "Armed Forces Europe, Middle East, & Canada",
+  "AK" => "Alaska",
+  "AL" => "Alabama",
+  "AP" => "Armed Forces Pacific",
+  "AR" => "Arkansas",
+  "AS" => "American Samoa",
+  "AZ" => "Arizona",
+  "CA" => "California",
+  "CO" => "Colorado",
+  "CT" => "Connecticut",
+  "DC" => "District of Columbia",
+  "DE" => "Delaware",
+  "FL" => "Florida",
+  "FM" => "Federated States of Micronesia",
+  "GA" => "Georgia",
+  "GU" => "Guam",
+  "HI" => "Hawaii",
+  "IA" => "Iowa",
+  "ID" => "Idaho",
+  "IL" => "Illinois",
+  "IN" => "Indiana",
+  "KS" => "Kansas",
+  "KY" => "Kentucky",
+  "LA" => "Louisiana",
+  "MA" => "Massachusetts",
+  "MD" => "Maryland",
+  "ME" => "Maine",
+  "MH" => "Marshall Islands",
+  "MI" => "Michigan",
+  "MN" => "Minnesota",
+  "MO" => "Missouri",
+  "MP" => "Northern Mariana Islands",
+  "MS" => "Mississippi",
+  "MT" => "Montana",
+  "NC" => "North Carolina",
+  "ND" => "North Dakota",
+  "NE" => "Nebraska",
+  "NH" => "New Hampshire",
+  "NJ" => "New Jersey",
+  "NM" => "New Mexico",
+  "NV" => "Nevada",
+  "NY" => "New York",
+  "OH" => "Ohio",
+  "OK" => "Oklahoma",
+  "OR" => "Oregon",
+  "PA" => "Pennsylvania",
+  "PR" => "Puerto Rico",
+  "PW" => "Palau",
+  "RI" => "Rhode Island",
+  "SC" => "South Carolina",
+  "SD" => "South Dakota",
+  "TN" => "Tennessee",
+  "TX" => "Texas",
+  "UT" => "Utah",
+  "VA" => "Virginia",
+  "VI" => "Virgin Islands",
+  "VT" => "Vermont",
+  "WA" => "Washington",
+  "WI" => "Wisconsin",
+  "WV" => "West Virginia",
+  "WY" => "Wyoming"),
+"UY" => array(
+  "01" => "Artigas",
+  "02" => "Canelones",
+  "03" => "Cerro Largo",
+  "04" => "Colonia",
+  "05" => "Durazno",
+  "06" => "Flores",
+  "07" => "Florida",
+  "08" => "Lavalleja",
+  "09" => "Maldonado",
+  "10" => "Montevideo",
+  "11" => "Paysandu",
+  "12" => "Rio Negro",
+  "13" => "Rivera",
+  "14" => "Rocha",
+  "15" => "Salto",
+  "16" => "San Jose",
+  "17" => "Soriano",
+  "18" => "Tacuarembo",
+  "19" => "Treinta y Tres"),
+"UZ" => array(
+  "01" => "Andijon",
+  "02" => "Bukhoro",
+  "03" => "Farghona",
+  "04" => "Jizzakh",
+  "05" => "Khorazm",
+  "06" => "Namangan",
+  "07" => "Nawoiy",
+  "08" => "Qashqadaryo",
+  "09" => "Qoraqalpoghiston",
+  "10" => "Samarqand",
+  "11" => "Sirdaryo",
+  "12" => "Surkhondaryo",
+  "13" => "Toshkent",
+  "14" => "Toshkent"),
+"VC" => array(
+  "01" => "Charlotte",
+  "02" => "Saint Andrew",
+  "03" => "Saint David",
+  "04" => "Saint George",
+  "05" => "Saint Patrick",
+  "06" => "Grenadines"),
+"VE" => array(
+  "01" => "Amazonas",
+  "02" => "Anzoategui",
+  "03" => "Apure",
+  "04" => "Aragua",
+  "05" => "Barinas",
+  "06" => "Bolivar",
+  "07" => "Carabobo",
+  "08" => "Cojedes",
+  "09" => "Delta Amacuro",
+  "11" => "Falcon",
+  "12" => "Guarico",
+  "13" => "Lara",
+  "14" => "Merida",
+  "15" => "Miranda",
+  "16" => "Monagas",
+  "17" => "Nueva Esparta",
+  "18" => "Portuguesa",
+  "19" => "Sucre",
+  "20" => "Tachira",
+  "21" => "Trujillo",
+  "22" => "Yaracuy",
+  "23" => "Zulia",
+  "24" => "Dependencias Federales",
+  "25" => "Distrito Federal",
+  "26" => "Vargas"),
+"VN" => array(
+  "01" => "An Giang",
+  "03" => "Ben Tre",
+  "05" => "Cao Bang",
+  "09" => "Dong Thap",
+  "13" => "Hai Phong",
+  "20" => "Ho Chi Minh",
+  "21" => "Kien Giang",
+  "23" => "Lam Dong",
+  "24" => "Long An",
+  "30" => "Quang Ninh",
+  "32" => "Son La",
+  "33" => "Tay Ninh",
+  "34" => "Thanh Hoa",
+  "35" => "Thai Binh",
+  "37" => "Tien Giang",
+  "39" => "Lang Son",
+  "43" => "An Giang",
+  "44" => "Dac Lac",
+  "45" => "Dong Nai",
+  "46" => "Dong Thap",
+  "47" => "Kien Giang",
+  "49" => "Song Be",
+  "50" => "Vinh Phu",
+  "51" => "Ha Noi",
+  "52" => "Ho Chi Minh",
+  "53" => "Ba Ria-Vung Tau",
+  "54" => "Binh Dinh",
+  "55" => "Binh Thuan",
+  "58" => "Ha Giang",
+  "59" => "Ha Tay",
+  "60" => "Ha Tinh",
+  "61" => "Hoa Binh",
+  "62" => "Khanh Hoa",
+  "63" => "Kon Tum",
+  "64" => "Quang Tri",
+  "65" => "Nam Ha",
+  "66" => "Nghe An",
+  "67" => "Ninh Binh",
+  "68" => "Ninh Thuan",
+  "69" => "Phu Yen",
+  "70" => "Quang Binh",
+  "71" => "Quang Ngai",
+  "72" => "Quang Tri",
+  "73" => "Soc Trang",
+  "74" => "Thua Thien",
+  "75" => "Tra Vinh",
+  "76" => "Tuyen Quang",
+  "77" => "Vinh Long",
+  "78" => "Da Nang",
+  "79" => "Hai Duong",
+  "80" => "Ha Nam",
+  "81" => "Hung Yen",
+  "82" => "Nam Dinh",
+  "83" => "Phu Tho",
+  "84" => "Quang Nam",
+  "85" => "Thai Nguyen",
+  "86" => "Vinh Puc Province",
+  "87" => "Can Tho",
+  "88" => "Dak Lak",
+  "89" => "Lai Chau",
+  "90" => "Lao Cai",
+  "91" => "Dak Nong",
+  "92" => "Dien Bien",
+  "93" => "Hau Giang"),
+"VU" => array(
+  "05" => "Ambrym",
+  "06" => "Aoba",
+  "07" => "Torba",
+  "08" => "Efate",
+  "09" => "Epi",
+  "10" => "Malakula",
+  "11" => "Paama",
+  "12" => "Pentecote",
+  "13" => "Sanma",
+  "14" => "Shepherd",
+  "15" => "Tafea",
+  "16" => "Malampa",
+  "17" => "Penama",
+  "18" => "Shefa"),
+"WS" => array(
+  "02" => "Aiga-i-le-Tai",
+  "03" => "Atua",
+  "04" => "Fa",
+  "05" => "Gaga",
+  "06" => "Va",
+  "07" => "Gagaifomauga",
+  "08" => "Palauli",
+  "09" => "Satupa",
+  "10" => "Tuamasaga",
+  "11" => "Vaisigano"),
+"YE" => array(
+  "01" => "Abyan",
+  "02" => "Adan",
+  "03" => "Al Mahrah",
+  "04" => "Hadramawt",
+  "05" => "Shabwah",
+  "06" => "Al Ghaydah",
+  "08" => "Al Hudaydah",
+  "10" => "Al Mahwit",
+  "11" => "Dhamar",
+  "14" => "Ma'rib",
+  "15" => "Sa",
+  "16" => "San",
+  "20" => "Al Bayda'",
+  "21" => "Al Jawf",
+  "22" => "Hajjah",
+  "23" => "Ibb",
+  "24" => "Lahij",
+  "25" => "Ta"),
+"ZA" => array(
+  "01" => "North-Western Province",
+  "02" => "KwaZulu-Natal",
+  "03" => "Free State",
+  "05" => "Eastern Cape",
+  "06" => "Gauteng",
+  "07" => "Mpumalanga",
+  "08" => "Northern Cape",
+  "09" => "Limpopo",
+  "10" => "North-West",
+  "11" => "Western Cape"),
+"ZM" => array(
+  "01" => "Western",
+  "02" => "Central",
+  "03" => "Eastern",
+  "04" => "Luapula",
+  "05" => "Northern",
+  "06" => "North-Western",
+  "07" => "Southern",
+  "08" => "Copperbelt",
+  "09" => "Lusaka"),
+"ZW" => array(
+  "01" => "Manicaland",
+  "02" => "Midlands",
+  "03" => "Mashonaland Central",
+  "04" => "Mashonaland East",
+  "05" => "Mashonaland West",
+  "06" => "Matabeleland North",
+  "07" => "Matabeleland South",
+  "08" => "Masvingo",
+  "09" => "Bulawayo",
+  "10" => "Harare")
+);
+?>

Added: wwwdev/usage/locations.php
===================================================================
--- wwwdev/usage/locations.php	                        (rev 0)
+++ wwwdev/usage/locations.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,64 @@
+<html> 
+<head> 
+  <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 
+  <title>Google Maps Multiple Markers</title> 
+  <script src="http://maps.google.com/maps/api/js?sensor=false" 
+          type="text/javascript"></script>
+</head> 
+<body>
+  <div id="map" style="width: 100%; height: 100%;"></div>
+
+  <script type="text/javascript">
+    var locations = [
+    <?php
+       $lines = file('http://www.ci.uchicago.edu/swift/wwwdev/usage/latlons');
+       foreach($lines as $line_num => $line) {
+           list($city, $lat, $lon, $num) = split(',', $line);
+           $num = rtrim($num);
+           if(!is_numeric($lat) || !is_numeric($lon)) { continue; }
+    ?> 
+    [ '<?php echo $city ?>', <?php echo $lat ?>, <?php echo $lon ?>, <?php echo $num ?> ], <?php } ?>
+
+    ];
+
+    var latlngbounds = new google.maps.LatLngBounds(); 
+
+    <?php
+       $lines = file('http://www.ci.uchicago.edu/swift/wwwdev/usage/latlons');
+       foreach($lines as $line_num => $line) {
+           if(empty($lat) || empty($lon)){ continue; }
+           list($city, $lat, $lon, $num) = split(',', $line);
+           $num = rtrim($num);
+           if(!is_numeric($lat) || !is_numeric($lon)) { continue; }
+    ?>
+    latlngbounds.extend( new google.maps.LatLng(<?php echo $lat ?>, <?php echo $lon ?>));
+    <?php } ?>
+    
+
+    var map = new google.maps.Map(document.getElementById('map'), {
+      zoom: 8,
+      mapTypeId: google.maps.MapTypeId.HYBRID
+    });
+    map.fitBounds(latlngbounds);
+
+    var infowindow = new google.maps.InfoWindow();
+
+    var marker, i;
+
+    for (i = 0; i < locations.length; i++) {  
+      marker = new google.maps.Marker({
+        position: new google.maps.LatLng(locations[i][1], locations[i][2]),
+        map: map
+      });
+
+      google.maps.event.addListener(marker, 'click', (function(marker, i) {
+        return function() {
+          infowindow.setContent(locations[i][0]);
+          infowindow.open(map, marker);
+        }
+      })(marker, i));
+    }
+  </script>
+</body>
+</html>
+

Added: wwwdev/usage/resources/button_rollover/button_rollover.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/button_rollover/button_rollover.fla
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/button_rollover/button_rollover.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/button_rollover/button_rollover.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/chart_in_swf/chart_in_swf.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/chart_in_swf/chart_in_swf.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/cursor/cursor.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/cursor/cursor.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/cursor/cursor.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/cursor/cursor.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/full_screen/full_screen.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/full_screen/full_screen.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/full_screen/full_screen.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/full_screen/full_screen.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/preview_scroll/black.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/preview_scroll/black.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/preview_scroll/black.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/preview_scroll/black.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/preview_scroll/preview_handle_1.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/preview_scroll/preview_handle_1.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/preview_scroll/preview_handle_1.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/preview_scroll/preview_handle_1.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/preview_scroll/preview_handle_2.fla
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/preview_scroll/preview_handle_2.fla
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/preview_scroll/preview_handle_2.swf
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/preview_scroll/preview_handle_2.swf
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_1_idle.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_1_idle.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_1_over.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_1_over.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_1_press.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_1_press.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_2_idle.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_2_idle.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_2_over.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_2_over.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_2_press.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_2_press.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_all_idle.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_all_idle.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_all_over.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_all_over.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/button_all_press.jpg
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/button_all_press.jpg
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_L.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_L.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_R.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_R.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_bg.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_bg.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_handle.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_handle.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_handle_L.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_handle_L.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_handle_R.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_handle_R.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_over_L.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_over_L.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/resources/scroll/slider_over_R.gif
===================================================================
(Binary files differ)


Property changes on: wwwdev/usage/resources/scroll/slider_over_R.gif
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: wwwdev/usage/update_data.php
===================================================================
--- wwwdev/usage/update_data.php	                        (rev 0)
+++ wwwdev/usage/update_data.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,189 @@
+#!/home/davidk/php-5.3.6/sapi/cli/php
+
+<?php
+include('geoipcity.inc');
+include('geoipregionvars.php');
+define ('HOSTNAME', 'db.ci.uchicago.edu');
+define ('USERNAME', 'swiftusage');
+define ('PASSWORD', 'Taif1TCM');
+define ('DATABASE_NAME', 'swiftusage');
+
+# Connect to database
+$db = mysql_connect(HOSTNAME, USERNAME, PASSWORD) or die ('Unable to connect');
+mysql_select_db(DATABASE_NAME);
+
+# Create HTML table of some basic information
+$query = "SELECT COUNT(DISTINCT user_id) FROM swiftusage";
+$result = mysql_query($query);
+$num_unique_users = mysql_fetch_row($result);
+$html_file = fopen("table.html", "w");
+$latlons_file = fopen("latlons", "w");
+fwrite($html_file, "<table border=\"1\">\n<tr><td>Total Unique Users</td><td>" .  $num_unique_users[0] . "</td></tr>\n");
+
+# Total number of runs
+$query = "SELECT COUNT(START_TIME) FROM swiftusage";
+$result = mysql_query($query);
+$num_runs = mysql_fetch_row($result);
+fwrite($html_file, "<tr><td>Total Runs</td><td>" . $num_runs[0] . "</td></tr>\n");
+
+# Total run time 
+#$query = "SELECT SEC_TO_TIME(SUM(stop_time) - SUM(start_time)) FROM swiftusage WHERE stop_time IS NOT NULL";
+#$result = mysql_query($query);
+#$real_time = mysql_fetch_row($result);
+#fwrite($html_file, "<tr><td>Accumulated Real Time (hh:mm:ss)</td><td>" . $real_time[0] . "</td>\n");
+
+# Average run time
+#$query = "SELECT SEC_TO_TIME(AVG(TIMESTAMPDIFF(SECOND, start_time, stop_time))) FROM swiftusage WHERE stop_time IS NOT NULL";
+#$result = mysql_query($query);
+#$avg_time_per_run = mysql_fetch_row($result);
+#fwrite($html_file, "<tr><td>Average Run Time (hh:mm:ss)</td><td>" . $avg_time_per_run[0] . "</td></tr>\n");
+
+# Longest run
+#$query = "SELECT SEC_TO_TIME(MAX(TIMESTAMPDIFF(SECOND, start_time, stop_time))) FROM swiftusage WHERE stop_time IS NOT NULL";
+#$result = mysql_query($query);
+#$max_run = mysql_fetch_row($result);
+#fwrite($html_file, "<tr><td>Longest Run (hh:mm:ss)</td><td>" . $max_run[0] . "</td></tr>\n");
+#fwrite($html_file, "<tr><td>Average Time Per Swift Run</td><td>" . $n
+fwrite($html_file, "</table>\n");
+fclose($html_file);
+
+# GeoIP info
+$query = "select distinct(ip_address) from swiftusage";
+$result = mysql_query($query);
+$gi = geoip_open("GeoLiteCity.dat", GEOIP_STANDARD);
+$count = 0;
+while($row = mysql_fetch_array($result)) {
+   $record = geoip_record_by_addr($gi, $row['ip_address']);
+   fwrite($latlons_file, $record->city . "," . $record->latitude . "," . $record->longitude . "," . $count . "\n");
+   $count++; 
+}
+fclose($latlons_file);
+
+# Monthly information
+$query = "SELECT * FROM swiftusage";
+$result = mysql_query($query);
+$months = array();
+$allusers = array();
+while ($row = mysql_fetch_array($result)) {
+   $month_string = substr($row['start_time'], 0, 7);
+   $year_string_temp = substr($month_string, 2, 2);
+   $month_string_temp = ltrim(substr($month_string, 5, 2), 0);
+   $month_string = "$month_string_temp-$year_string_temp";
+   $user = $row['user_id'];
+  
+   if(!isset($months[$month_string]['runs'])) { $months[$month_string]['runs'] = 0; }
+   if(!isset($months[$month_string]['users'])) { $months[$month_string]['users'] = array(); } 
+   if(!isset($months[$month_string]['newusers'])) { $months[$month_string]['newusers'] = array(); }
+   if(!isset($months[$month_string]['longruns1'])) { $months[$month_string]['longruns1'] = 0; }
+   if(!isset($months[$month_string]['longruns5'])) { $months[$month_string]['longruns5'] = 0; }
+
+   # Number of runs
+   $months[$month_string]['runs']++;
+
+   # Unique users per month
+   if(!in_array($user, $months[$month_string]['users'])) {
+      array_push($months[$month_string]['users'], $user);
+   }
+
+   # New users per month
+   if(!in_array($user, $allusers)) {
+      array_push($months[$month_string]['newusers'], $user);
+      array_push($allusers, $user);
+   }
+}
+
+# Total number of runs greater than 1 minute
+$query = "SELECT * FROM swiftusage WHERE (stop_time - start_time) > 60";
+$result = mysql_query($query);
+while($row = mysql_fetch_array($result)) {
+   $month_string = substr($row['start_time'], 0, 7);
+   $year_string_temp = substr($month_string, 2, 2);
+   $month_string_temp = ltrim(substr($month_string, 5, 2), 0);
+   $month_string = "$month_string_temp-$year_string_temp";
+   $months[$month_string]['longruns1']++;
+}
+
+# Total number of runs greater than 5 minutes
+$query = "SELECT * FROM swiftusage WHERE (stop_time - start_time) > 300";
+$result = mysql_query($query);
+while($row = mysql_fetch_array($result)) {
+   $month_string = substr($row['start_time'], 0, 7); 
+   $year_string_temp = substr($month_string, 2, 2); 
+   $month_string_temp = ltrim(substr($month_string, 5, 2), 0); 
+   $month_string = "$month_string_temp-$year_string_temp";
+   $months[$month_string]['longruns5']++;
+}
+ 
+# Total runs
+$usageFile = fopen("usage.xml", 'w');
+fwrite($usageFile, "<chart>\n<chart_label position='over' size='12' color='000000' alpha='90'/>\n<axis_category size='12' />\n<axis_value size='12' />\n<chart_data>\n<row>\n<null/>\n");
+foreach($months as $key => $value) {
+  fwrite($usageFile, "<string>$key</string>\n");
+}
+fwrite($usageFile, "</row>\n");
+fwrite($usageFile, "<row>\n<string>Swift runs</string>\n");
+foreach($months as $key => $value) {
+   fwrite($usageFile, "<number>" . $value['runs'] . "</number>\n");
+}
+fwrite($usageFile, "</row>\n</chart_data>\n<chart_type>3d column</chart_type>\n<chart_pref rotation_x='10' rotation_y='0' />\n</chart>\n");
+fclose($usageFile);
+
+# Total runs longer than 1 minute
+$longUsage1File = fopen("longUsage1.xml", 'w');
+fwrite($longUsage1File, "<chart>\n<chart_label position='over' size='12' color='000000' alpha='90'/>\n<axis_category size='12' />\n<axis_value size='12' />\n<chart_data>\n<row>\n<null/>\n");
+foreach($months as $key => $value) {
+  fwrite($longUsage1File, "<string>$key</string>\n");
+}
+fwrite($longUsage1File, "</row>\n");
+fwrite($longUsage1File, "<row>\n<string>Swift runs (longer than 1 minute)</string>\n");
+foreach($months as $key => $value) {
+   fwrite($longUsage1File, "<number>" . $value['longruns1'] . "</number>\n");
+}
+fwrite($longUsage1File, "</row>\n</chart_data>\n<chart_type>3d column</chart_type>\n<chart_pref rotation_x='10' rotation_y='0' />\n</chart>\n");
+fclose($longUsage1File);
+
+# Total runs longer than 5 minutes
+$longUsage5File = fopen("longUsage5.xml", 'w');
+fwrite($longUsage5File, "<chart>\n<chart_label position='over' size='12' color='000000' alpha='90'/>\n<axis_category size='12' />\n<axis_value size='12' />\n<chart_data>\n<row>\n<null/>\n");
+foreach($months as $key => $value) {
+  fwrite($longUsage5File, "<string>$key</string>\n");
+}
+fwrite($longUsage5File, "</row>\n");
+fwrite($longUsage5File, "<row>\n<string>Swift runs (longer than 5 minutes)</string>\n");
+foreach($months as $key => $value) {
+   fwrite($longUsage5File, "<number>" . $value['longruns5'] . "</number>\n");
+}
+fwrite($longUsage5File, "</row>\n</chart_data>\n<chart_type>3d column</chart_type>\n<chart_pref rotation_x='10' rotation_y='0' />\n</chart>\n");
+fclose($longUsage5File);
+
+
+# Unique users per month
+$users_per_month_file = fopen("/home/davidk/public_html/usage/users_per_month.xml", 'w');
+fwrite($users_per_month_file, "<chart>\n<chart_label position='over' size='12' color='000000' alpha='90'/>\n<axis_category size='12' />\n<axis_value size='12' />\n<chart_data>\n<row>\n<null/>\n");
+foreach($months as $key => $value) {
+   fwrite($users_per_month_file, "<string>$key</string>\n");
+}
+fwrite($users_per_month_file, "</row>\n<row>\n<string>Unique Users Per Month</string>\n");
+foreach($months as $key => $value) {
+   fwrite($users_per_month_file, "<number>" . count($value['users']) . "</number>\n");
+}
+fwrite($users_per_month_file, "</row>\n</chart_data>\n<chart_type>3d column</chart_type>\n<chart_pref rotation_x='10' rotation_y='0' />\n</chart>\n");
+fclose($users_per_month_file);
+
+# New users per month
+$new_users_per_month_file = fopen("/home/davidk/public_html/usage/new_users_per_month.xml", 'w');
+fwrite($new_users_per_month_file, "<chart>\n<chart_label position='over' size='12' color='000000' alpha='90'/>\n<axis_category size='12' />\n<axis_value size='12' />\n<chart_data>\n<row>\n<null/>\n");
+foreach($months as $key => $value) {
+   fwrite($new_users_per_month_file, "<string>$key</string>\n");
+}
+fwrite($new_users_per_month_file, "</row>\n<row>\n<string>New Users Per Month</string>\n");
+foreach($months as $key => $value) {
+   fwrite($new_users_per_month_file, "<number>" . count($value['newusers']) . "</number>\n");
+}
+fwrite($new_users_per_month_file, "</row>\n</chart_data>\n<chart_type>3d column</chart_type>\n<chart_pref rotation_x='10' rotation_y='0' />\n</chart>\n");
+fclose($new_users_per_month_file);
+
+mysql_free_result($result);
+mysql_close($db);
+?>
+


Property changes on: wwwdev/usage/update_data.php
___________________________________________________________________
Added: svn:executable
   + *

Added: wwwdev/usage/usage.php
===================================================================
--- wwwdev/usage/usage.php	                        (rev 0)
+++ wwwdev/usage/usage.php	2011-08-03 13:48:41 UTC (rev 4936)
@@ -0,0 +1,168 @@
+<HTML>
+<script language="javascript">AC_FL_RunContent = 0;</script>
+<script language="javascript"> DetectFlashVer = 0; </script>
+<script src="AC_RunActiveContent.js" language="javascript"></script>
+<script language="JavaScript" type="text/javascript">
+<!--
+var requiredMajorVersion = 10;
+var requiredMinorVersion = 0;
+var requiredRevision = 45;
+-->
+</script>
+<BODY bgcolor="#FFFFFF">
+<?php>
+include("table.html");
+?>
+<br>
+<script language="JavaScript" type="text/javascript">
+<!--
+if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
+	alert("This page requires AC_RunActiveContent.js.");
+} else {
+	var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
+	if(hasRightVersion) { 
+		AC_FL_RunContent(
+			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
+			'width', '800',
+			'height', '600',
+			'scale', 'noscale',
+			'salign', 'TL',
+			'bgcolor', '#777788',
+			'wmode', 'opaque',
+			'movie', 'charts',
+			'src', 'charts',
+                        <?php
+                        $time = time();
+			echo "'FlashVars', 'library_path=http://www.ci.uchicago.edu/swift/wwwdev/usage/charts_library&xml_source=http://www.ci.uchicago.edu/swift/wwwdev/usage/usage.xml?unique_id=$time',\n"; 
+                        ?>
+			'id', 'usage',
+			'name', 'usage',
+			'menu', 'true',
+			'allowFullScreen', 'true',
+			'allowScriptAccess','sameDomain',
+			'quality', 'high',
+			'align', 'middle',
+			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
+			'play', 'true',
+			'devicefont', 'false'
+			); 
+                document.write("<br>");
+                AC_FL_RunContent(
+                        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
+                        'width', '800',
+                        'height', '600',
+                        'scale', 'noscale',
+                        'salign', 'TL',
+                        'bgcolor', '#777788',
+                        'wmode', 'opaque',
+                        'movie', 'charts',
+                        'src', 'charts',
+                        <?php
+                        $time = time();
+                        echo "'FlashVars', 'library_path=http://www.ci.uchicago.edu/swift/wwwdev/usage/charts_library&xml_source=http://www.ci.uchicago.edu/swift/wwwdev/usage/longUsage1.xml?unique_id=$time',\n";
+                        ?>
+                        'id', 'longUsage',
+                        'name', 'longUsage',
+                        'menu', 'true',
+                        'allowFullScreen', 'true',
+                        'allowScriptAccess','sameDomain',
+                        'quality', 'high',
+                        'align', 'middle',
+                        'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
+                        'play', 'true',
+                        'devicefont', 'false'
+                        );
+                document.write("<br>");
+
+                AC_FL_RunContent(
+                        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
+                        'width', '800',
+                        'height', '600',
+                        'scale', 'noscale',
+                        'salign', 'TL',
+                        'bgcolor', '#777788',
+                        'wmode', 'opaque',
+                        'movie', 'charts',
+                        'src', 'charts',
+                        <?php
+                        $time = time();
+                        echo "'FlashVars', 'library_path=http://www.ci.uchicago.edu/swift/wwwdev/usage/charts_library&xml_source=http://www.ci.uchicago.edu/swift/wwwdev/usage/longUsage5.xml?unique_id=$time',\n";
+                        ?>
+                        'id', 'longUsage',
+                        'name', 'longUsage',
+                        'menu', 'true',
+                        'allowFullScreen', 'true',
+                        'allowScriptAccess','sameDomain',
+                        'quality', 'high',
+                        'align', 'middle',
+                        'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
+                        'play', 'true',
+                        'devicefont', 'false'
+                        );
+                document.write("<br>");
+
+                AC_FL_RunContent(
+                        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
+                        'width', '800',
+                        'height', '600',
+                        'scale', 'noscale',
+                        'salign', 'TL',
+                        'bgcolor', '#777788',
+                        'wmode', 'opaque',
+                        'movie', 'charts',
+                        'src', 'charts',
+                        <?php
+                        $time = time();
+                        echo "'FlashVars', 'library_path=http://www.ci.uchicago.edu/swift/wwwdev/usage/charts_library&xml_source=http://www.ci.uchicago.edu/swift/wwwdev/usage/users_per_month.xml?unique_id=$time',\n"; 
+                        ?>
+                        'id', 'users_per_month',
+                        'name', 'users_per_month',
+                        'menu', 'true',
+                        'allowFullScreen', 'true',
+                        'allowScriptAccess','sameDomain',
+                        'quality', 'high',
+                        'align', 'middle',
+                        'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
+                        'play', 'true',
+                        'devicefont', 'false'
+                        );
+                document.write("<br>");
+                AC_FL_RunContent(
+                        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,45,2',
+                        'width', '800',
+                        'height', '600',
+                        'scale', 'noscale',
+                        'salign', 'TL',
+                        'bgcolor', '#777788',
+                        'wmode', 'opaque',
+                        'movie', 'charts',
+                        'src', 'charts',
+                        <?php
+                        $time = time();
+                        echo "'FlashVars', 'library_path=http://www.ci.uchicago.edu/swift/wwwdev/usage/charts_library&xml_source=http://www.ci.uchicago.edu/swift/wwwdev/usage/new_users_per_month.xml?unique_id=$time',\n"; 
+                        ?>
+                        'id', 'new_users_per_month',
+                        'name', 'new_users_per_month',
+                        'menu', 'true',
+                        'allowFullScreen', 'true',
+                        'allowScriptAccess','sameDomain',
+                        'quality', 'high',
+                        'align', 'middle',
+                        'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
+                        'play', 'true',
+                        'devicefont', 'false'
+                        );
+
+        } else { 
+                var alternateContent = 'This content requires the Adobe Flash Player. '
+                + '<u><a href=http://www.macromedia.com/go/getflash/>Get Flash</a></u>.';
+                document.write(alternateContent); 
+        }
+}
+// -->
+</script>
+<noscript>
+        <P>This content requires JavaScript.</P>
+</noscript>
+</BODY>
+</HTML>




More information about the Swift-commit mailing list