public static function split_tag_attributes($tag) {
		$tag_tmp = trim(preg_replace('/^<[^[:space:]]*/', '', trim($tag)));
			// Removes any > in the end of the string
		$tag_tmp = trim(rtrim($tag_tmp, '>'));

		$value = array();
		while (strcmp($tag_tmp, '')) { // Compared with empty string instead , 030102
			$firstChar = substr($tag_tmp, 0, 1);
			if (!strcmp($firstChar, '"') || !strcmp($firstChar, "'")) {
				$reg = explode($firstChar, $tag_tmp, 3);
				$value[] = $reg[1];
				$tag_tmp = trim($reg[2]);
			} elseif (!strcmp($firstChar, '=')) {
				$value[] = '=';
				$tag_tmp = trim(substr($tag_tmp, 1)); // Removes = chars.
			} else {
					// There are '' around the value. We look for the next ' ' or '>'
				$reg = preg_split('/[[:space:]=]/', $tag_tmp, 2);
				$value[] = trim($reg[0]);
				$tag_tmp = trim(substr($tag_tmp, strlen($reg[0]), 1) . $reg[1]);
			}
		}
		reset($value);
		return $value;
	}