code: function determineWMSTitle(json, version) {
  	var ret = '';
  
  	if (version == '1.3.0') {
  		if (json.WMS_Capabilities.Service) {
  			if (json.WMS_Capabilities.Service[0]) {
  				if (json.WMS_Capabilities.Service[0].Title) {
  					if (json.WMS_Capabilities.Service[0].Title[0]) {
  						ret = json.WMS_Capabilities.Service[0].Title[0];
  					}
  				}
  			}
  		}
  	} else {
  		if (version == '1.1.1' || version == '1.1.0' || version == '1.0.0') {
  			if (json.WMT_MS_Capabilities.Service) {
  				if (json.WMT_MS_Capabilities.Service[0]) {
  					if (json.WMT_MS_Capabilities.Service[0].Title) {
  						if (json.WMT_MS_Capabilities.Service[0].Title[0]) {
  							ret = json.WMT_MS_Capabilities.Service[0].Title[0];
  						}
  					}
  				}
  			}
  		}
  	}
  
  	return ret;
  }
docs: It determines the WMS title.
  
  @param {object}
  json GetCapabilities document as JSON.
  @param {string}
  version Version of GetCapabilities document.
  @returns {string} WMS title.