if (window.attachEvent) {window.attachEvent('onload', loadFuncs);}
else {window.addEventListener('load', loadFuncs, false);}

function loadFuncs() {
	showBrowseScreen();	
}

function showBrowseScreen() { 
	if (document.getElementById('MemberPageDiv') && document.getElementById('GuestPageDiv')) {
	var classShow = 'show-block';
	var classHide = 'hide-block';
		if (document.getElementById('login-form')) {
			if (document.cookie.search('guestcookie') == -1) {
				document.getElementById('MemberPageDiv').className = classHide;
				document.getElementById('GuestPageDiv').className = classShow;
			} else {
				document.getElementById('MemberPageDiv').className = classShow;
				document.getElementById('GuestPageDiv').className = classHide;	
			}
		} else {
			document.getElementById('MemberPageDiv').className = classShow;
			document.getElementById('GuestPageDiv').className = classHide;	
		}
	}
}


function setGuestCookie() {
	var theDate = new Date();
	//var oneYearLater = new Date( theDate.getTime() + 31536000000 );
	//var expiryDate = oneYearLater.toGMTString();
	//document.cookie = 'notagainlaunch=yes;expires'+expiryDate;
	document.cookie = 'guestcookie=yes';
	showBrowseScreen();
}