function mdlDlg(sURL, sArgument, iDialogType, iX, iY){
	switch (iDialogType) {
		case 1: {
			return showModalDialog(sURL, sArgument, "scroll:no;status:no;center:1;help:0;resizable:0;dialogWidth: " + iX + "px;dialogHeight:" + iY + "px;");
		}
		case 2: {
			return showModalDialog(sURL, sArgument, "scroll:yes;status:0;center:1;help:0;resizable:1;dialogWidth: " + iX + "px;dialogHeight:" + iY + "px;");
		}
	}
}

function openVoucher(SalesID)
{
    openWin('http://www.iremtur.com.tr/sales/common/voucher.aspx?SALESID='+SalesID,'Voucher', 1, 650, 400, 200, 100); 
}

function openContentWin(url)
{
    var iWidth=300; 
    var iHeight = window.screen.height - 77;
    var iLeft = window.screen.width - 308;
    var iTop = 0
    
    openWin(url,'PageHelp', 1, iWidth, iHeight, iLeft, iTop); 
}

function openWin(sURL, sWinName, iWinType, iX, iY){
	switch (iWinType) {
		case 1: {
			window.open (sURL, sWinName, "toolbar=0, menubar=0, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=1, resizable=1");
			break;
		}
		case 2: {
			window.open (sURL, sWinName, "toolbar=0, menubar=0, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=1, resizable=yes, left=0, top=0");
			break;
		}
		case 3: {
			if (arguments.length > 4)
				return window.open (sURL, sWinName, "toolbar=0, menubar=0, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=0, resizable=0, left=" + arguments[5] + ", top=" + arguments[6], "true");
			else
				return window.open (sURL, sWinName, "toolbar=0, menubar=0, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=0, resizable=0", "true");
			break;
		}
		case 4: {
			return window.open (sURL, sWinName, "toolbar=0, menubar=0, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=yes, resizable=yes, left=0, top=0");
			break;
		}
		case 5: {
			return window.open (sURL, sWinName, "toolbar=0, menubar=1, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=yes, resizable=yes, left=0, top=0");
			break;
		}
		case 6: {
			window.open (sURL, sWinName, "toolbar=0, menubar=1, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=1, resizable=1, left=20, top=20");
			break;
		}
	}
}