messageObj = new DHTML_modalMessage();
messageObj.setShadowOffset(5);


function displayMessage(url, width, height, cssClass)
{	
	if(isNaN(width)){
		width = 400;
	}
	if(isNaN(height)){
		height = 200;
	}

	messageObj.setSource(url);

	if(cssClass != ""){
		messageObj.setCssClassMessageBox('modalDialog_contentDiv_bio');
	}
	else{
		messageObj.setCssClassMessageBox(false);
	}

	messageObj.setSize(width, height);
	messageObj.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj.display();
}

function displayStaticMessage(messageContent,cssClass, width, height)
{
	if(isNaN(width)){
		width = 300;
	}
	if(isNaN(height)){
		height = 150;
	}
	messageObj.setHtmlContent(messageContent);
	messageObj.setSize(width, height);
	messageObj.setCssClassMessageBox(cssClass);
	messageObj.setSource(false);	// no html source since we want to use a static message here.
	messageObj.setShadowDivVisible(false);	// Disable shadow for these boxes	
	messageObj.display();
}

function displayLoadingUploadingData()
{
	var path = window.location.pathname;
	path = path.replace(/index\.php/,"");
	
	displayStaticMessage("<br><br><img src='"+ path +"includes/client_template/images/icons/loading.gif' style='padding-left: 20px;'> <div style='display: inline; position: relative; top: -5px; left: 10px; font-weight: bold; color: red;'>Please wait...Transferring data</div>", 'modalDialog_contentDivLoading_bio', 260,100);
}

function closeMessage()
{
	messageObj.close();	
}

function displayHelpMessage(mid, width, height){
	if(isNaN(mid) || mid <= 0){
		return "";
	}
	
	if(isNaN(width)){
		width = 300;
	}
	if(isNaN(height)){
		height = 200;
	}

	displayMessage("index.php?action=get_help_message&mid=" + mid, width, height, 'modalDialog_contentDiv_bio');
}