﻿//
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);
}

function ShowTermsAndConditions(todo,description) {
    var newwindow;
	if (typeof(newWindow2) == 'object') {
		if (!newWindow2.closed) {
			newWindow2.close();
			newWindow2 = window.open('Popups/TermsAndPrivacy.aspx?todo=' + todo, description, 'width=600,height=450,resizable=0,scrollbars=yes,status=yes');
		} else {
			newWindow2 = window.open('Popups/TermsAndPrivacy.aspx?todo=' + todo, description, 'width=600,height=450,resizable=0,scrollbars=yes,status=yes');
		}
	} else {
		newWindow2 = window.open('Popups/TermsAndPrivacy.aspx?todo=' + todo, description, 'width=600,height=450,resizable=0,scrollbars=yes,status=yes');
	}
}