function aw_confirmAction(msg, url) {
	if (confirm(msg)) {
		window.document.location.href = url;
	}
}

function aw_windowOpen(url, name, width, height) {
	window.open(url, name, "width="+width+",height="+height+",resizable=0,scrollbars=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0");
	return false;
}

function aw_windowOpenExt(url, name, width, height) {
	window.open(url, name, "width="+width+",height="+height+",resizable=1,scrollbars=1,toolbar=1,location=1,directories=0,status=1,menubar=1,copyhistory=0");
	return false;
}

function toggleFindAPageArrow() {
	var findAPage = $('findAPage');
	var findAPageTextbox = $('findAPageTextbox');
	var findACountry = $('findACountry');

	if (findAPage.style.display == 'none') {
		findAPage.style.display = 'block';
		findAPageTextbox.style.display = 'none';
	}
	else {
		findAPage.style.display = 'none';
		findAPageTextbox.style.display = 'block';
	}

	findACountry.style.display = 'none';
}

function toggleFindACountry() {
	var findAPage = $('findAPage');
	var findACountry = $('findACountry');
	var findAPageTextbox = $('findAPageTextbox');

	findAPageTextbox.style.display = 'block';

	if (findACountry.style.display == 'none') {
		findACountry.style.display = 'block';
	}
	else {
		findACountry.style.display = 'none';
	}

	findAPage.style.display = 'none';
}

function focusFindAPageTextbox() {
	var findPageNumber = $('findPageNumber');

	findPageNumber.focus();
}

function submitFindPageNumber() {
	var pageNumber = parseInt($('findPageNumber').value);

	if (pageNumber >= 60 && pageNumber <= 72) {
		alert('There are no links for the Atlas index pages 60 - 72');

		return false;
	}

	return true;
}

