﻿var ToolTipEventRender = function(){this.ctor.apply(this, arguments);};Object.SetProperties(ToolTipEventRender.prototype, 
{
  ctor:function(target, evt, style, label)
  {
    this.Target=target;
    this.Style=style;
    this.Label=label;
    this.Event=evt;
    this.Render();
  },
  Event:null,
  Render:function()
  {
    var item = this.Event;
    var s="";
    s+"<div style='text-align:justify; height:auto; width:100%; float:left'>";
    s+="<div style='width:100%; float:left; clear:both'><b>" + item.Title + "</b></div>";
    s+="<div style='width:100%; float:left; clear:both'>" + ((item.Description.length==0)?"":item.Description.substr(0,100) + this.Label.More) +"<br/><br/></div>";
    s+="<div style='width:100%; float:left; clear:both'><div style='width:25%; float:left;'>" + this.Label.From + "</div><div style='width:73%; float:left;'>" + item.From.toEString() + "</div></div>";
    s+="<div style='width:100%; float:left; clear:both'><div style='width:25%; float:left;'>" + this.Label.To + "</div><div style='width:73%; float:left;'>" + item.To.toEString() + "</div></div>";
    s+="<div style='width:100%; float:left; clear:both'><div style='width:25%; float:left;'>" + this.Label.Venue + "</div><div style='width:73%; float:left;'>" + item.Venue + "</div></div>";
    s+"</div>";
    new ToolTip(this.Target, function(str, style, con){Object.SetProperties(con, style, {innerHTML:str});}.Bind(null, s, this.Style));
  }
  
});


