function switchLogin(A){if(A=="close"){if(dojo.byId("popupObscurer")){dojo.byId("popupObscurer").style.display="none"}dojo.byId("login").style.visibility="hidden";dojo.byId("loginUserName").value=dojo.byId("loginPass").value="";dojo.byId("loginError").style.display="none";dojo.byId("loginUserName").blur()}else{createLayerForLoginSearch();console.debug("---switchLogin swtch: "+A);dojo.byId("login").style.visibility="visible";switchSearch("close");dojo.byId("loginUserName").focus()}}function switchSearch(A){if(A=="close"){if(dojo.byId("popupObscurer")){dojo.byId("popupObscurer").style.display="none"}dojo.byId("search").style.visibility="hidden";dojo.byId("searchHeaderField").blur()}else{if(curPage!=null&&curPage!="search"){showPage("search")}createLayerForLoginSearch();dojo.byId("search").style.visibility="visible";switchLogin("close");dojo.byId("searchHeaderField").focus()}}function logout(){dojo.byId("logout_li").style.display="none";dojo.byId("login_li").style.display="";dojo.byId("profile").style.display="none";IdentityController.clearIdentity();showPage("index");bindLogout()}function createLayerForLoginSearch(){if(dojo.byId("popupObscurer")==null){var A=document.createElement("div");A.setAttribute("id","popupObscurer");document.body.appendChild(A);A.style.zIndex=999;A.style.position="absolute";A.style.left=0;A.style.top=0;A.style.background="url('../images/i/spacer.gif')";var B=getWinSize();A.style.width=B[0]+"px";A.style.height=B[1]+"px";A.onclick=function(){switchLogin("close");switchSearch("close")}}else{dojo.byId("popupObscurer").style.display=""}}function getWinSize(){var B=0,A=0;if(typeof (window.innerWidth)=="number"){B=window.innerWidth-20}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){B=document.documentElement.clientWidth-20}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){B=document.body.clientWidth-20}}}A=dojo.byId("container").offsetHeight;return([B,A])};