function showMessengerDialog(msgClass,msgTitle){
var msgClass = msgClass;
var msgTitle = msgTitle;
var dialog = new dijit.Dialog();

if(msgClass)
{
	dialog.attr('href', baseUrl+'messenger/show/id/'+encodeURIComponent(dialog.id)+'/type/'+msgClass+'/');
}
else
{
	dialog.attr('href', baseUrl+'messenger/show/id/'+encodeURIComponent(dialog.id)+'/');
}	
dialog.attr('class', msgClass);
dojo.body().appendChild(dialog.domNode);
dialog.startup();

dialog.show();
}

function closemessengerDialog (dId)
{

	dijit.byId(dId).destroy();
}

function showDialog(msgClass,msgTitle,msgContent,msgHref)
{

var dialog = new dijit.Dialog();
if(msgTitle)
{
dialog.attr('title', msgTitle);
}
if(msgClass)
{
dialog.attr('class', msgClass);
}
dialog.attr('content', msgContent);
if(msgHref)
{
dialog.attr('href', msgHref+'/dialogId/'+encodeURIComponent(dialog.id)+'/');
}
dialog.attr('parseOnLoad', true);
dojo.body().appendChild(dialog.domNode);

var btn = new dijit.form.Button({ label: "Close", style:"display:block;width:50px;margin:25px auto 0px auto;"});
dialog.containerNode.appendChild(btn.domNode);
dojo.connect(btn, "onClick", function(){
    dialog.destroy();
});


dialog.startup();
dialog.show();
return dialog;
}


