

var topVal = 50, leftVal = 50;
topVal  = (screen.availHeight / 2);
leftVal = (screen.availWidth / 2);



function ShowPrivacy(pathToCommon) {
	try {
		var a = window.open(pathToCommon+'privacy.php', 'ermaaPrivacyPopUp', 'width=500,height=500,top='+(topVal-280)+',left='+(leftVal-250)+',resizable,scrollbars,toolbar');
	}catch(e) {
		return;
	}
	a.focus();
}


function ShowW3CValid(pathToCommon) {
	try {
		var a = window.open(pathToCommon+'sitevalidity.php', 'ermaaW3CPopUp', 'width=700,height=550,top='+(topVal-305)+',left='+(leftVal-350)+',resizable,scrollbars,toolbar');
	}catch(e) {
		return;
	}
	a.focus();
}


function BookmarkSite() {
	// only works on MSIE
	try {
		if(confirm("\nThis will add www.ermaa.com to your favourites menu\n\n Would you like to do this?\n ")) {
			window.external.AddFavorite('http://www.ermaa.com/', 'ERMAA - European Russian Martial Arts Association');
		}
	}catch(e) {
		alert("\nThe Bookmark could not be added, your security settings may have disallowed it.\n\n" +
					"Please add the Bookmark manually using your menu. \n ");
	}
}

