// JavaScript Document
try{if(!dontFootJs)dontFootJs=false}catch(e){dontFootJs=false}
if(!dontFootJs){
	
	var dsfqwehref = null;
	user.on("initLogin",function(){
		if(user.typeName == "游客"){
			Ext.select("A").each(function(i){
				dsfqwehref = i.getAttribute("href")
				if(dsfqwehref.indexOf("dsfqwe=")>0){
					i.set({href:dsfqwehref.split("dsfqwe=")[0]+'dsfqwe=q'})
				}
			})
			document.getElementById("s_head_loginForm").style.display="block"
			document.getElementById("s_head_hasLogin").style.display="none"
		}else{
			Ext.select("A").each(function(i){
				dsfqwehref = i.getAttribute("href")
				if(dsfqwehref.indexOf("dsfqwe=")>0){
					i.set({href:dsfqwehref.split("dsfqwe=")[0]+'dsfqwe='+user.sessionID})
				}else{
					i.set({href:(dsfqwehref.indexOf("?")>0)?dsfqwehref+"&dsfqwe="+user.sessionID:dsfqwehref+"?dsfqwe="+user.sessionID})
				}
			})
			document.getElementById("s_head_loginForm").style.display="none"
			document.getElementById("s_head_hasLogin").style.display="block"
			document.getElementById("s_head_hasLogin").innerHTML = '登录用户:'+user.name+' - <span>['+user.realName+']</span>'+' <a href="/user_ext/index.asp">后台管理[<span style="color:red">发布信息</span>]</a> <a href="javascript:void(0);" onClick="user.quit()">退出</a>'
			
		}					 
	})
	/*Ext.onReady(function(){
		ExtInit({disableShowAjaxMask:true});
	})*/
	user.reload();
}