﻿

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 invoiceAlert(oRadio) {
    alert('You will not have access to the site until the invoice is paid.\n\nIf you require instant access you should select the pay by credit card option.');
}

function showSecurityCode() {
	var newWindow3
	if (typeof(newWindow3) == 'object') {
		if (!newWindow2.closed) {
			newWindow3.close();
			newWindow3 = window.open('http://www.euromoneyplc.com/static/stubs/stub107.htm','termsandconditions', 'width=400,height=450,resizable=0,scrollbars=no,status=yes')
		} else {
			newWindow3 = window.open('http://www.euromoneyplc.com/static/stubs/stub107.htm','termsandconditions', 'width=400,height=450,resizable=0,scrollbars=no,status=yes')
		}
	} else {
		newWindow3 = window.open('http://www.euromoneyplc.com/static/stubs/stub107.htm','termsandconditions', 'width=400,height=450,resizable=0,scrollbars=no,status=yes')
	}
}
var iClickCOunt = 0;
function checkPageLoad() {
	if(document.getElementById("__EVENTVALIDATION")==null){
		iClickCOunt += 1;
		
		if(iClickCOunt >= 5) 
			if(confirm('This page has not fully loaded.\n\nClick OK to reload.'))
				location.reload(true);
				
		return false;
	}
		
    return true;
} 

