 		***************************************************************************/
 		protected function parseURL(urlString : String) : void
 		{
-			var schemeEndIndex : Number = urlString.indexOf('://');
-			if (schemeEndIndex != -1)
-			{
-				m_scheme = urlString.substring(0, schemeEndIndex + 3);
-				urlString = urlString.substr(schemeEndIndex + 3);
-			}
-			
-			var networkLocation:String = '';
-			var networkLocationEndIndex : Number = urlString.indexOf('/');
-			if (networkLocationEndIndex > 0)
-			{
-				networkLocation.substring(0, networkLocationEndIndex);
-				urlString = urlString.substr(networkLocationEndIndex);
-			}
-			else
-			{
-				networkLocation = urlString;
-				urlString = '';
-			}
-			
-			var hostParts : Array;
-			var networkLocationParts : Array = m_host.split('@');
-			if (networkLocationParts.length == 2)
-			{
-				var credentialParts : Array = networkLocationParts[0].split(':');
-
-				m_user = credentialParts[0];			
-				if (credentialParts.length == 2)
-				{
-					m_password = credentialParts[1];
-				}
-			
-				hostParts = networkLocationParts[1].split(':');
-				m_host = hostParts[0];		
-				if (hostParts.length == 2)
-				{
-					m_port = parseInt(hostParts[1]);
-				}
-			}
-			else
-			{
-				hostParts = networkLocation.split(':');
-				m_host = hostParts[0];
-				if (hostParts.length == 2)
-				{
-					m_port = parseInt(hostParts[1]);
-				}
-			}
-			
-			var queryStartIndex : Number = urlString.indexOf('?');		
-			if (queryStartIndex != -1)
-			{
-				var query : String = urlString.substring(queryStartIndex + 1);
-				var queryParts : Array = query.split('#');
-				setQuery(queryParts[0]);
-				m_fragment = queryParts[1];
-				m_path = urlString.substring(0, queryStartIndex);
-			}
-			else
-			{
-				var pathParts : Array = urlString.split('#');
-				m_path = pathParts[0];
-				if (pathParts.length == 2)
-				{
-					m_fragment = pathParts[1];
-				}
-			}
+			var match : Array = URL_PARSER.exec(urlString);
+			m_scheme = match['protocol'];
+			var credentials : Array = match['credentials'].split(':');
+			m_user = credentials[0];
+			m_password = credentials[1] || '';
+			m_host = match['host'];
+			m_port = parseInt(match['port']);
+			m_path = match['path'];
+			setQuery(match['query']);
+			m_fragment = match['anchor'];
 		}	
 	}
 }
					str += '/';
				}
			}
			if (m_path != null)
			{
				str += m_path;
			}
			if (m_query != null)
			{
				str += '?' + m_query;
			}
			if (m_fragment != null)
			{
				str += '#' + m_fragment;
			}

		
		public function scheme() : String
		{
			return m_scheme ? m_scheme + '://' : null;
		}
	
		public function setScheme(val:String) : void
		{
			if (val.indexOf('://') != -1)
			{
				val = val.substr(0, val.indexOf('://'));
			}
			m_scheme = val;
		}
		
