function aplGetHeader(){ var url = "/hotelinfo/bsrch/rsv/portalloginlabel2015.do"; $.getJSON(url,function(json){ if(document.getElementById("aplhwelcome")!=null){ $('#aplhwelcome').html(json.aplhwelcome); } if(document.getElementById("aplhwelcomer")!=null){ $('#aplhwelcomer').html(json.aplhwelcomer); } if(document.getElementById("aplhregister")!=null){ if(json.apllogin!=""){ $("#aplhregister").css("display","none"); } else { $("#aplhregister").css("display",""); } } if(document.getElementById("aplpromotionarea")!=null){ $('#aplpromotionarea').html(json.aplpromotion); if(json.aplpromotion!=""){ $("#aplpromotionarea").css("display",""); }else{ $("#aplpromotionarea").css("display","none"); } } }); } function doLogout(){ res = confirm("ログアウトします。よろしいですか?"); if(!res) return; $.ajax({ url: "/hotelinfo/bsrch/rsv/portal_logout.do", type:"GET", success:function(){ aplGetHeader(); alert("ログアウトしました"); } }); } function openLogin(s){ var subwin = window.open(s,"PLOGIN","'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,,width=550,height=400'"); subwin.focus(); } function aplReloadMyBookMark(){ if(document.getElementById("mybookmarkArea")!=null){ $("#mybookmarkArea").load("/hotelinfo/bsrch/mybookmarkBox.do?t=" +(new Date().getTime())); } } $(window).load(aplGetHeader);