private int compareVer(String str1, String str2) {
		String[] vals1 = str1.split("\\.");
		String[] vals2 = str2.split("\\.");
		int i = 0;

		while (i < vals1.length && i < vals2.length && vals1[i].equals(vals2[i]))
			i++;

		if (i < vals1.length && i < vals2.length) {
			int diff = new Integer(vals1[i]).compareTo(new Integer(vals2[i]));
			return diff < 0 ? -1 : diff == 0 ? 0 : 1;
		}

		return vals1.length < vals2.length ? -1 : vals1.length == vals2.length ? 0 : 1;
	}