
function openPickerDialog(sURL,Argument,nH,nW) {
	if (IsIE()) {
		if (window.screen.height<nH) { nH=window.screen.height-30; }
		window.showModalDialog(sURL,Argument,"resizable:yes; help:no; status:yes; dialogHeight:" + nH + "px ;dialogWidth:" + nW + "px");	
		if (Argument!=null && Argument.CallBackFunc!=null && Argument.HasResult==true) {
			Argument.CallBackFunc(Argument);
		}
	} else {
		window.dialogArguments=Argument;
		var oWin=window.open(sURL,sURL,"resizable=yes, modal=yes, width=" + nW + ", height=" + nH,0);
		oWin.focus();
	} 
}

function saveDialogResult(value) {
	DialogArgument.ReturnValue=value;
	DialogArgument.HasResult=true;
	if (!IsIE()){
	    if (DialogArgument.CallBackFunc!=null) { DialogArgument.CallBackFunc(DialogArgument); }
	}
}

function DialogArgument() {
	this.CallBackFunc=null;
	this.Parameter=null;
	this.ActiveWin=null;
	this.HasResult=false;
	this.Selection=null;
	this.IsNewElement=false;
	this.ActiveCommand=null;
	this.ReturnValue=null;
}

function giveFocus() {
    this.focus();
}

function IsIE() {
	return (window.navigator.appVersion.indexOf("MSIE")!=-1);
}

