
// File = Includes/Js/Dialogs/Dialogs.js

function ShowDialog(dlgPath, dlgName, dlgArgs){
	
	var dlgFullPath = dlgPath + dlgName + ".htm";
	
	// set dialog height & width
	sDlgType = dlgArgs.DlgType;
	switch(dlgName){
		case "DlgOK":
		    switch(sDlgType){
		        case "NewsTypeHasNews":
		            dlgHeight = 200;
			        dlgWidth = 650;
			       break;
			   default:
			        dlgHeight = 150;
			        dlgWidth = 350;
			       break; 
		    }
			break;								
		case "DlgYesNo":
			switch(sDlgType){
			    case "DelDirectorPhoto":
			        dlgHeight = 180;
					dlgWidth = 520;
			        break;
			    case "DelDirector":
			        dlgHeight = 180;
					dlgWidth = 500;
			        break;
			    case "DelAllNews":
			        dlgHeight = 180;
					dlgWidth = 500;
			        break;
			    case "TransferNewsTypeNews":
			        dlgHeight = 180;
					dlgWidth = 480;
			        break;            
				default:
					dlgHeight = 180;
					dlgWidth = 400;
					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;
}
