function ncmWeather(id,props) {
    ncmAbstractComponent.apply(this,arguments);
    
    this.showCityInfo = function(cityId) {
        $jq("#weather"+this.m_id).find("div[@id^=city]:visible").hide();
        $jq("#weather"+this.m_id).find("#city"+cityId).show();
    }
    
    this.showMapInfo = function(mapId) {
        $jq("#weather"+this.m_id).find("div[@id^=mapimage]:visible").hide();
        $jq("#weather"+this.m_id).find("#mapimage"+this.m_id+"_"+mapId).show();
    }
}

jQuery.extend(ncmWeather.prototype, ncmAbstractComponent.prototype);

ncmWeather.properties = new NCMHash();

ncmWeather.instances = new NCMCollection();

ncmWeather.initProperties = function(properties) {
    ncmAbstractComponent.initProperties(properties,ncmWeather.properties);
}

ncmWeather.init = function(id,props) {
    var obj = new ncmWeather(id,props);
    ncmWeather.instances.add(""+id,obj);
}

ncmWeather.get = function(id) {
    return ncmWeather.instances.get(""+id);
}

ncmWeather.showCity = function(id,cityId) {
    var obj = ncmWeather.get(id);
    if(obj!=null) {
        obj.showCityInfo(cityId);
    }
}

ncmWeather.showMap = function(id,mapId) {
    var obj = ncmWeather.get(id);
    if(obj!=null) {
        obj.showMapInfo(mapId);
    }
}     
