TT_Message = Class.create();
TT_Message.prototype = {
  	initialize: function(msg) {
        var html = '';
        html += '<img src = "'+ANTIKGUIDE_PATH+'img/dialog/information.gif" />';
        html += '&nbsp;&nbsp;&nbsp;<b>'+msg+'</b>';
        html += '<div class="buttons" style="text-align: center; margin: 10px 0 10px 0">';
        html +=     '<input type="button" id="btn_error_close" value="Close" />';
        html += '</div>';
        this.msgForm = new TT_Form({title:'Warning', content: html, zIndex: 12000});
        $('btn_error_close').onclick = function () {
            this.msgForm.tt_close();
        }.bind(this);
  	}
}

TT_Error = Class.create();
TT_Error.prototype = {
  	initialize: function(msg) {
        var html = '';
        html += '<img src = "'+ANTIKGUIDE_PATH+'img/dialog/error.gif" />';
        html += '&nbsp;&nbsp;&nbsp;<b>'+msg+'</b>';
        html += '<div class="buttons" style="text-align: center; margin: 10px 0 10px 0">';
        html +=     '<input type="button" id="btn_error_close" value="Close" />';
        html += '</div>';
        this.msgForm = new TT_Form({title:'Error', content: html, zIndex: 12000});
        $('btn_error_close').onclick = function () {
            this.msgForm.tt_close();
        }.bind(this);
  	}
}

TT_Question = Class.create();
TT_Question.prototype = {
  	initialize: function(msg, callback) {
  	    if (typeof callback=='function')
  	         this.callback = callback
	    else this.callback = new Function;
        var html = '';
        html += '<img src = "'+ANTIKGUIDE_PATH+'img/dialog/help.gif" />';
        html += '&nbsp;&nbsp;&nbsp;<b>'+msg+'</b>';
        html += '<div class="buttons" style="text-align: center; margin: 10px 0 10px 0">';
        html +=     '<input type="button" id="btn_yes_anwser" value="Yes" />';
        html +=     '<input type="button" id="btn_no_anwser" value="No" />';
        html += '</div>';
        this.msgForm = new TT_Form({title:'Confirm', content: html, zIndex: 12000});
        $('btn_yes_anwser').onclick = function () {
            this.msgForm.tt_close();
            this.callback(true);
        }.bind(this);
        $('btn_no_anwser').onclick = function () {
            this.msgForm.tt_close();
            this.callback(false);
        }.bind(this);
  	}
}

TT_Announce = Class.create();
TT_Announce.prototype = {
  	initialize: function(msg, callback) {
  	    if (typeof callback=='function')
  	         this.callback = callback
	    else this.callback = new Function;
        var html = '';
        html += '<img src = "'+ANTIKGUIDE_PATH+'img/dialog/help.gif" />';
        html += '&nbsp;&nbsp;&nbsp;<b>'+msg+'</b>';
        html += '<div class="buttons" style="text-align: center; margin: 10px 0 10px 0">';
        html +=     '<input type="button" id="btn_yes_anwser" value="OK" />';
        html += '</div>';
        this.msgForm = new TT_Form({title:'Announce', content: html, zIndex: 12000});
        $('btn_yes_anwser').onclick = function () {
            this.msgForm.tt_close();
            this.callback(true);
        }.bind(this);
  	}
}