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=0, resizable=1");
			break;
		}
		case 2: {
			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 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=1, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=yes, resizable=yes, left=0, top=0");
			break;
		}
		case 5: { // sumbo selection pencereleri için
			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 6: { // Fulscreen =YES pencereleri için
			var nHeight = screen.availHeight-30;
			var nWidth = screen.availWidth-10;
			return window.open (sURL, sWinName, "toolbar=1, menubar=1, location=1, status=1, width=" + nWidth + ", height=" + nHeight + ", scrollbars=yes, resizable=yes, left=0, top=0");
			break;
		}

		case 7: { // Ekranın ortasına açma.
			var nHeight = ((screen.availHeight-30)-iY)/2;
			var nWidth = ((screen.availWidth-10)-iX)/2;
			return window.open (sURL, sWinName, "toolbar=0, menubar=0, location=0, status=0, width=" + iX + ", height=" + iY + ", scrollbars=1, resizable=0, left=" + nWidth + ", top=" + nHeight);
			break;
		}

		case 8: { // Fulscreen =YES pencereleri için, REPORT SCREEN
			var nHeight = screen.availHeight-73;
			var nWidth = screen.availWidth-10;
			return window.open (sURL, sWinName, "toolbar=0, menubar=1, location=0, status=0, width=" + nWidth + ", height=" + nHeight + ", scrollbars=yes, resizable=yes, left=0, top=0");
			break;
		}
	}
}

function modelessDialog(sURL, iDialogType, iX, iY){
	switch (iDialogType) {
		case 1: {
			return showModelessDialog(sURL, window, "status:0; center:1; help:0; resizable:1; dialogWidth: " + iX + "px;dialogHeight:" + iY + "px;");
			break;
		}
		
		case 2: {
			return showModelessDialog(sURL, window, "status:0; center:1; help:0; resizable=0; dialogWidth: " + iX + "px;dialogHeight:" + iY + "px;");
		}	
	}
}

function modalDialog(sURL, sArgument, iDialogType, iX, iY){
	switch (iDialogType) {
		case 1: {
			return showModalDialog(sURL, sArgument, "status:0;center:1;help:0;resizable:0;dialogWidth: " + iX + "px;dialogHeight:" + iY + "px;");
		}
		case 2: {
			return showModalDialog(sURL, sArgument, "status:0;center:1;help:0;resizable:1;dialogWidth: " + iX + "px;dialogHeight:" + iY + "px;");
		}
	}
}