
// File = SiteAdmin/Includes/Js/Dialogs/Dialogs.js

function ShowDialog(dlgPath, dlgName, dlgArgs){
	
	var dlgFullPath = dlgPath + dlgName + ".htm";
	 var dlgHeight, dlgWidth;
	 
	// Set dialog height & width
	// Set dialog type
	var sDlgType = dlgArgs.DlgType;
	switch(dlgName){
		case "DlgOK":
		    switch(sDlgType){
		        default:
		            dlgHeight = 200;
			        dlgWidth = 450;        
		            break;     
		   } 
			break;								
		case "DlgYesNo":
		    switch(sDlgType){
		        default:
		            dlgHeight = 230;
                    dlgWidth = 460;    
		            break;
		    }    
		    break;
		default:
			break;
	} 					
	
	var dlgFeatures = GetDlgFeatures(dlgHeight, dlgWidth); 
	return window.showModalDialog(dlgFullPath,dlgArgs,dlgFeatures);
}

function GetDlgFeatures(dlgHeight, dlgWidth){

	var sFeatures = "dialogHeight: " + dlgHeight + "px;"
	sFeatures += "dialogWidth: " + dlgWidth + "px;"
	sFeatures += "help:No;scroll:No;"
	
	return sFeatures;
}
