﻿var messageObj = new DHTML_modalMessage();	// We only create one object of this class
messageObj.setShadowOffset(5);	// Large shadow

function displayMessage(url, dWidth, dHeight)
{
    if (messageObj == null) return;
    messageObj.divs_transparentDiv = null;
	messageObj.setSource(url);
	messageObj.setCssClassMessageBox(false);
	messageObj.setSize(dWidth,dHeight);
	messageObj.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj.display();
}

function displayStaticMessage(messageContent,cssClass,dWidth,dHeight) {
    if (messageObj == null) return;
    messageObj.divs_transparentDiv = null;
	messageObj.setHtmlContent(messageContent);
	messageObj.setSize(dWidth,dHeight);
	messageObj.setCssClassMessageBox(cssClass);
	messageObj.setSource(false);	// no html source since we want to use a static message here.
	messageObj.setShadowDivVisible(true);	// Disable shadow for these boxes	
	messageObj.display();
}

function displayDivWindow(divObj, dWidth, dHeight) {
    if (messageObj == null) return;
    messageObj.divs_transparentDiv = null;
    messageObj.setDivContent(divObj);
    messageObj.setSize(dWidth, dHeight);
    messageObj.setCssClassMessageBox(false);
    messageObj.setSource(false); // no html source since we want to use a static message here.
    messageObj.setShadowDivVisible(true); // Disable shadow for these boxes	
    messageObj.display();


}


function closeMessage()
{
    if (messageObj == null) return;
	messageObj.close();
}

/* special case show busy window */
function showBusyWindow() {
    displayStaticMessage('<div align=\'center\' style=\'font-size:12px;font-weight:bold\'><br><br>Processing request. Please wait...<br><br><img src=\'/Images/busy_wait.gif\' /></div>', false,300,110);
}

/* special functions for other modal windows */
var MSIE = false;
if (navigator.userAgent.indexOf('MSIE') >= 0) this.MSIE = true;

function mouseOverClose(obj) {
    if (obj == null) return;
    if (this.MSIE) obj.style.cursor = 'hand';
    else obj.style.cursor = 'pointer';
}
function mouseOutClose(obj) {
    if (obj == null) return;
    obj.style.cursor = '';
}

