
	function show_stats (id) {
/*		getElem('stats_for_'+id).style.display = 'block';*/
		getElem('stats_for_'+id).style.visibility = 'visible';
	}
	function hide_stats (id) {
/*		getElem('stats_for_'+id).style.display = 'none';*/
		getElem('stats_for_'+id).style.visibility = 'hidden';
	}
	
	function show_login() {
		getElem('login_or_signup').style.display='none';
		getElem('jaxLogin').style.display='block';
	}
	
	function show_signup() {
		getElem('login_or_signup').style.display='none';
		getElem('jaxSignup').style.display='block';
	}

	function hide_not_logged_in(id) {
		thing = getElem('not_logged_in');
		thing.parentNode.removeChild(thing);
		thing = getElem('smalloverlay');
		thing.parentNode.removeChild(thing);
	}

	function not_logged_in (id) {
		pre_existing_thing = getElem('not_logged_in');
		if (pre_existing_thing) {
			pre_existing_thing.parentNode.removeChild(pre_existing_thing);
		}
		pre_existing_thing = getElem('smalloverlay');
		if (pre_existing_thing) {
			pre_existing_thing.parentNode.removeChild(pre_existing_thing);
		}
		getElem('thumbdiv_'+id).innerHTML = '<div id="smalloverlay"></div><div id="not_logged_in"><div id="login_or_signup">To add to favorites, you must be logged in.<br/><a onclick="show_login()">Login</a> or <a onclick="show_signup()">sign up</a> for free.</div><div id="jaxSignup"><div class="signupForm" style="margin-left: 15px;"><div id="su_message" style="height: 17px; margin-bottom: 2px; width: 100%; text-align: center;"></div><form onsubmit="newAjaxSignup(this.py_un.value, this.py_ea.value, this.py_pw.value, this.py_pw_cf.value, this.py_ts.checked, this.py_cp.value); return false;"><label for="py_un">Display Name</label><input type="text" name="py_un" class="required"><br /><label for="py_ea">Email Address:</label><input type="text" name="py_ea" class = "required" id="py_ea"/><br /><label for="py_ea">Password:</label><input type="password" name="py_pw" class="required" id="py_pw"><br /><label for="py_ea">Password (Confirm):</label><input type="password" name="py_pw_cf" class = "required"><br /><label for="py_cp"><img id="su_cp" style="border: 1px solid #bbb" src="/m/php/vendors/freecap/freecap_moo.php?cat='+Math.random()+'" /></label><input name="py_cp" id="py_cp" type="text" style="margin-top: 10px;" class="required"/><br/><div style="display: none"><label for="py_url">Are you a robot?:</label><input type="text" name="url" value=""></div><div style="width: 120px; float: left; text-align: center; margin-right: 10px;"><strong>Type the word above</strong><br style="clear: both;"/><div style="float: left; margin-left: 10px;">Agree to <a href="/pages/tos" target="_new">Terms?</a></div><input type="checkbox" name="py_ts" style="width: 16px; float: left;" /><br/></div><input type="submit" name="py_sb" id="su_submit" value="Submit" /></form><br style="clear: both;"></div></div><div id="jaxLogin"><div style="text-align: center;"><img src="http://7a69.pyzam.com/images/v2/miscGraphics/pml2.png" style="margin-bottom: 15px"></div><div class="loginWrap"><form onsubmit="newAjaxLogin(\'browse\', this.password.value, this.email.value); return false;" class="loginForm" style="z-index: 2000; position: relative;"><input name="email" type="text" size="12" class="loginFields"><label for="email">Email</label><br><input name="password" type="password" size="12" class="loginFields"><label for="password">Password</label><br style="clear: right;"><div id="login_error_browse" style="text-align: center; color: #ff8080"></div><div align="center"><input type="submit" name="Submit" value="Login" class="loginButtons"></div></form></div></div><div id="lbClose"><img src="http://7a69.pyzam.com/images/v2/miscGraphics/red_ecks.png" onclick="hide_not_logged_in('+id+')"></div></div>' + getElem('thumbdiv_'+id).innerHTML;
	}
