function modalmsgshow(ID) {
    $('#modalmsg_modal_content' + ID).modal({
        overlayId: 'modalmsg-overlay',
        containerId: 'modalmsg-container',
        closeHTML: null,
        minHeight: 80,
        opacity: 50,
        position: ['20%', '35%'],
        overlayClose: true,
        onOpen: function (d) {
            d.overlay.fadeIn('slow', function () {
                $('#modalmsg_modal_content' + ID, self.container).show();
                var title = $('#modalmsg-modal-title' + ID, self.container);
                title.show();
                d.container.slideDown('slow', function () {
                    setTimeout(function () {
                        var h = $('#modalmsg-modal-data' + ID, self.container).height()
							            + title.height()
							            + 20; // padding
                        d.container.animate(
							            { height: h },
							            200,
							            function () {
							                $('div.close', self.container).show();
							                $('#modalmsg-modal-data' + ID, self.container).show();
							            }
						            );
                    }, 500);
                });
            })
        },
        onClose: function (d) {
            d.container.animate(
				        {
				            top: '-' + (d.container.height() + 20)
				        },
				        500,
				        function () {
				            $.modal.close();
				        }
			        );
        }
    });

}

function modalmsgshowP(ContentID, TitleID, DataID) {

    $('#' + ContentID).modal({
        overlayId: 'modalmsg-overlay',
        containerId: 'modalmsg-container',
        closeHTML: null,
        minHeight: 80,
        opacity: 65,
        position: ['0', ],
        overlayClose: true,
        onOpen: function (d) {
            d.overlay.fadeIn('slow', function () {
                $('#' + ContentID, self.container).show();
                var title = $('#' + TitleID, self.container);
                title.show();
                d.container.slideDown('slow', function () {
                    setTimeout(function () {
                        var h = $('#' + DataID, self.container).height()
							            + title.height()
							            + 20; // padding
                        d.container.animate(
							            { height: h },
							            200,
							            function () {
							                $('div.close', self.container).show();
							                $('#' + DataID, self.container).show();
							            }
						            );
                    }, 500);
                });
            })
        },
        onClose: function (d) {
            d.container.animate(
				        {
				            top: '-' + (d.container.height() + 20)
				        },
				        500,
				        function () {
				            $.modal.close();
				        }
			        );
        }
    });

}

