<script type="text/javascript">
var tempaccounts = false;
function showusername()
{
    $("usernamelayer").innerHTML = "<input name='tempusername' type='text' id='tempusername' size='20' class='txt' value='{username}' onkeyup=\"$('passwordlayer').style.display='';\">&nbsp;[<a href='javascript:;' onclick='resetusername()'>恢复</a>]";
    tempaccounts = true;
    var i = 1;
    while(true)
    {
        var obj = $("albums" + i);
        if(obj == null) break;
        obj.options[0].selected = true;
        obj.disabled = true
        i++;
    }
}
function resetusername()
{
    $('passwordlayer').style.display='none';
    $("usernamelayer").innerHTML = "{username}&nbsp;[<a href='javascript:;' onclick='showusername()'>切换临时帐号</a>]";
    tempaccounts = false;
    var i = 1;
    while(true)
    {
        var obj = $("albums" + i);
        if(obj == null) break;
        obj.disabled = false
        i++;
    }
}
</script>
<div class="tempaccounts">
	<p>
	<span id="usernamelayer">
	<%if {userid}>0%>
	{username}&nbsp;[<a href='javascript:;' onclick='showusername()'>切换临时帐号</a>]
	<%else%>
		匿名 [<a href="login.aspx">登录</a>] [<a href="register.aspx">注册</a>]
	<%/if%></span>
	</p>
	<div id="passwordlayer" style="display:none">
		<p><strong>密码:</strong></p>
		<p><input name="temppassword" type="password" id="temppassword" size="20" class="txt" /></p>
	<%if {config.secques}==1%>
		<p><strong>安全问题:</strong></p>
		<p><select name="question" id="question">
			<option value="0" selected="selected">无</option>
			<option value="1">母亲的名字</option>
			<option value="2">爷爷的名字</option>
			<option value="3">父亲出生的城市</option>
			<option value="4">您其中一位老师的名字</option>
			<option value="5">您个人计算机的型号</option>
			<option value="6">您最喜欢的餐馆名称</option>
			<option value="7">驾驶执照的最后四位数字</option>
			</select>
		</p>
		<p><strong>答案:</strong>(如果您设置了安全提问，请在此输入正确的问题和回答)</p>
		<p><input name="answer" type="text" id="answer" size="50" class="txt"/></p>
	<%/if%>
	</div>
</div>