// Static Properties
xModalDialog.grey = xModalDialog.grey2 = xModalDialog.shadow = xModalDialog.shadow2 = null;

xModalDialog.instances = {};

window.onload = function(){
    //alert('Load Event');
};
window.onunload = function() // assigning an unload listener disables bfcache (fastback) in Opera and Firefox
{
    //alert('Unload Event');
};
var col_name = '';
xAddEventListener(window, 'load', function(){
    if (document.getElementById && document.createElement && document.body.appendChild) {
    	if ((enableAll || enableCustomInfo) && buildInfoBox) {
			// setup info box
			buildInfoBox();
			var xmd_id = new xModalDialog('idInfoDialog', true);
			xmd_id.focusElement = 'idIDOk';
			// setup info autoclose box
			buildInfoBox(true);
			var xmd_iad = new xModalDialog('idInfoAutoDialog', true);
			xmd_iad.focusElement = 'idIADOk';		
    	}

    	if ((enableAll || enableCustomAlert) && buildAlertBox) {
			// setup alert box
			buildAlertBox();
			var xmd_ad = new xModalDialog('idAlertDialog', true);
			xmd_ad.focusElement = 'idADOk';
    	}

    	if ((enableAll || enableCustomConfirm) && buildConfirmBox) {
			// setup confirm box
			buildConfirmBox();
			var xmd_cd = new xModalDialog('idConfirmDialog', true);
			xmd_cd.focusElement = 'idCDYes';
    	}
    	
    	if ((enableAll || enableCustomPrompt) && buildPromptBox) {
			// setup prompt box
			buildPromptBox();
			var xmd_pd = new xModalDialog('idPromptDialog', true);
			xmd_pd.focusElement = 'idPDInput';
    	}
				
    	if ((enableAll || enableCustomInProgress) && buildInProgressBox) {
			// setup in progress box
			buildInProgressBox();
			var xmd_ipw = new xModalDialog('idInProgressDialog', true);
			xmd_ipw.lb_type = 'progress';
    	}
    	
    	if ((enableAll || enableCustomMiniWin) && buildMiniWinBox) {
			// setup mini win box
			buildMiniWinBox();
			var xmd_mw = new xModalDialog('idMiniWinDialog');
			xmd_mw.lb_type = 'win';
    	}
    	
    	if ((enableAll || enableCustomHelp) && buildHelpBox) {
			// setup mini win box
			buildHelpBox();
			var xmd_hw = new xModalDialog('idHelpDialog', true);
			xmd_hw.lb_type = 'win';
    	}
    }
}, false);