function aplGetHeader(){ var url = "/hotelinfo/bsrch/rsv/portalloginlabel2011.do"; $.getJSON(url,function(json){ if(json!=null){ $('#header_userboxarea').html(json.header_userboxarea); $('#aplpromotion').html(json.aplpromotion); if(json.aplpromotion!=""){ $("#aplpromotion").css("display",""); }else{ $("#aplpromotion").css("display","none"); } if(json.apllogin!=""){ $("#aplpromotionoff").css("display",""); }else{ $("#aplpromotionoff").css("display","none"); } } }); } function doLogout(){ res = confirm("ログアウトします。よろしいですか?"); if(!res) return; $.ajax({ url: "/hotelinfo/bsrch/rsv/portal_logout.do", type:"GET", success:function(){ aplGetHeader(); aplReloadMyBookMark(); 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);