var incidentIcon = new GIcon();
incidentIcon.image = "images/event.png";
incidentIcon.iconSize = new GSize(16, 16);
incidentIcon.iconAnchor = new GPoint(9, 9);
incidentIcon.infoWindowAnchor = new GPoint(9, 9);

var incidentIconMed = new GIcon();
incidentIconMed.image = "images/event_medium.png";
incidentIconMed.iconSize = new GSize(24, 24);
incidentIconMed.iconAnchor = new GPoint(12, 12);
incidentIconMed.infoWindowAnchor = new GPoint(12, 12);

var incidentIconLarge = new GIcon();
incidentIconLarge.image = "images/event_large.png";
incidentIconLarge.iconSize = new GSize(32,32);
incidentIconLarge.iconAnchor = new GPoint(15, 15);
incidentIconLarge.infoWindowAnchor = new GPoint(15, 15);

var incidentImport = 40;


var incidentIconClass = Class.create(mapIconClass,{
    iconSmall: incidentIcon,
    iconMedium: incidentIconMed,
    iconLarge: incidentIconLarge,
    prefix: "<b>Advisory Text : </b>",
    suffix: "",
    zIndex: incidentImport,
    initialize: function ($super, obj){
       Object.extend(this, obj);
       this.title = this.advisoryText;
       $super(this);
    },
    update: function ($super, newObj) {
       if(this.advisoryText != newObj.advisoryText){
           this.advisoryText = newObj.advisoryText;
           this.title = newObj.advisoryText;
       } else {
           newObj.title = newObj.advisoryText;
       } 
       $super(newObj);
    }
});

