﻿// JScript File


function OpenPopupWindow(sUrl, sName, sProperties, iWidth, iHeight, iMoveX, iMoveY){
	var iX, iY;
	
	iX = iMoveX;
	if(iMoveX == 'left')
		iX = 0
	if(iMoveX == 'middle')
		iX = (screen.width / 2) - (iWidth / 2)
	if(iMoveX == 'right')
		iX = screen.width - iWidth - 10;
		
	iY = iMoveY;	
	if(iMoveY == 'top')
		iY = 0;
	if(iMoveY == 'middle')
		iY = ((screen.height - 56) / 2) - (iHeight / 2);
	if(iMoveY == 'bottom')
		iY = screen.height - 56 - iHeight;

	sProperties += ',width=' + iWidth + ',height=' + iHeight + ',screenX=' + iX + ', screenY=' + iY + ',left=' + iX + ',top=' + iY;
	window.open(sUrl, sName, sProperties);
}

function openWindowMove(sUrl, sName, sProperties, iWidth, iHeight, iMoveX, iMoveY) {
    var iX, iY;
	
	iX = iMoveX;
	if(iMoveX == 'left')
		iX = 0
	if(iMoveX == 'middle')
		iX = (screen.width / 2) - (iWidth / 2)
	if(iMoveX == 'right')
		iX = screen.width - iWidth - 10;
		
	iY = iMoveY;	
	if(iMoveY == 'top')
		iY = 0;
	if(iMoveY == 'middle')
		iY = ((screen.height - 56) / 2) - (iHeight / 2);
	if(iMoveY == 'bottom')
		iY = screen.height - 56 - iHeight;

	sProperties += ',width=' + iWidth + ',height=' + iHeight + ',screenX=' + iX + ', screenY=' + iY + ',left=' + iX + ',top=' + iY;
	window.open(sUrl, sName, sProperties);
}