//gus functions
// not normally done like this, but bill had put them in window.js and they got bonked when I updated the files from POP...

function personaRedirect() {
	var returnTo = encodeURIComponent(this.document.location);
	var personaLink = $j('#gusChangePersona').attr('href');
	if (personaLink.indexOf('?') > -1) {
		if (personaLink.indexOf('&') > -1) {
			personaLink = personaLink + "&";
		}
	} else {
		personaLink = personaLink + "?";
	}
	this.document.location = personaLink + "surl=" + returnTo;
}
function logoutRedirect() {
	var returnTo = encodeURIComponent(this.document.location);
	var logoutLink = $j('#gus_logout_link').attr('href');
	if (logoutLink.indexOf('?') > -1) {
		if (logoutLink.indexOf('&') > -1) {
			logoutLink = logoutLink + "&";
		}
	} else {
		logoutLink = logoutLink + "?";
	}
	this.document.location = logoutLink + "&surl=" + returnTo;
}
function loginRedirect() {
	var returnTo = encodeURIComponent(this.document.location);
	var loginLink = $j('#gus_login_link').attr('href');
	this.document.location = loginLink + "&surl=" + returnTo;
}
function registerRedirect() {
	var returnTo = encodeURIComponent(this.document.location);
	var regLink = $j('#gus_register_link').attr('href');
	this.document.location = regLink + "&surl=" + returnTo;
}