function setCurrentView(siteName, jumpTo) {
	document.cookie = 'currentView=' + siteName + '; path=/';
	if (jumpTo == '') {
		document.location.reload();
	}
	else {
		document.location = jumpTo;
	}
	
}


function changeClass(id, newClass) {
        identity=document.getElementById(id);
        identity.className=newClass;
}

var whichSplash = '';

function showAgreement() {
	if (document.getElementById('agreementOverlayDiv')) {
		if (document.getElementById('splash_classic')) {
			splashDiv = document.getElementById('splash_classic');
			if (splashDiv.className == 'site_flash') {
				whichSplash = 'splash_classic';
				changeClass('splash_classic', 'hidden');
			}
		}
		if (document.getElementById('splash_brasil')) {
			splashDiv = document.getElementById('splash_brasil');
			if (splashDiv.className == 'site_flash') {
				whichSplash = 'splash_brasil';
				changeClass('splash_brasil', 'hidden');
			}
		}

		changeClass('agreementOverlayDiv', 'agreementOverlay');
		changeClass('agreementDiv', 'agreement');
	}
}

function setAgreement() {
	if (document.getElementById(whichSplash)) {
		changeClass(whichSplash, 'site_flash');
	}
	document.cookie = 'amg_agreement=agreed; path=/';
	changeClass('agreementDiv', 'hidden');
	changeClass('agreementOverlayDiv', 'hidden');
}
