public static int compareVersions(String v1, String v2)
	{
		String[] v1Parts = v1.split("\\.");
		String[] v2Parts = v2.split("\\.");
		int diff = 0;
		for(int iPart = 0; (iPart<v1Parts.length) && (iPart<v2Parts.length) && (diff==0); iPart++)
		{
			try {
				int num1 = Integer.decode(v1Parts[iPart]);
				int num2 = Integer.decode(v2Parts[iPart]);
				diff = num2-num1;
			} catch (NumberFormatException e)
			{
				//Well then it's characters :)
				diff = v1Parts[iPart].compareToIgnoreCase(v2Parts[iPart]);
			}
		}
		if(diff == 0)
		{
			diff = v2Parts.length - v1Parts.length;
		}
		if(diff == 0)
		{
			diff = v2.length() - v1.length();
		}
		return diff;
	}