function set_preuser(){ var loginForm = document.getElementById( "loginForm" ); var herou = document.getElementById( "herou" ); var herop = document.getElementById( "herop" ); var heroc = document.getElementById( "herochk" ); if( loginForm ){ if( herou ) setCookie( 'pu', herou.value ); if( herop ) setCookie( 'pp', herop.value ); if( heroc ){ if(heroc.checked == true){ setCookie( 'pc', '1' ); }else{ setCookie( 'pc', '0' ); } } } return true; } function setCookie(key,val){ tmp = key+"="+escape(val)+";"; tmp += "expires=Fri, 31-Dec-2030 23:59:59;"; document.cookie = tmp; } function getCookie(key){ tmp = document.cookie+";"; tmp1 = tmp.indexOf(key,0); if(tmp1 != -1){ tmp = tmp.substring(tmp1,tmp.length); start = tmp.indexOf("=",0); end = tmp.indexOf(";",start); return(unescape(tmp.substring(start+1,end))); } return(""); } function user_set(){ var herou = document.getElementById("herou"); var herop = document.getElementById("herop"); var heroc = document.getElementById("herochk"); var herochk_c = getCookie( 'heroc' ); if (herochk_c == 1){ heroc.checked = true; }else{ heroc.checked = false; } if (herochk_c == 1){ herou.value = getCookie( 'herou' ); herop.value = getCookie( 'herop' ); } // setdisp(); } function asyncHttpRequest(url,func){ if(url=="")return; try{ if (window.ActiveXObject){ asyncHttp = new ActiveXObject("Microsoft.XMLHTTP"); }else{ asyncHttp = new XMLHttpRequest(); } }catch(e){ alert( e ); } asyncHttp.open("GET", url, true); asyncHttp.onreadystatechange = func; asyncHttp.send(null); } function setNews(){ if(asyncHttp==null)return; if ((asyncHttp.readyState == 4) && (asyncHttp.status == 200)){ // document.getElementById("newsbody").innerHTML=asyncHttp.responseText; } } function setdisp(){ var herou = getCookie( 'herou' ); if ( window.innerWidth ) { u_width = window.innerWidth; }else if ( document.documentElement && document.documentElement.clientWidth != 0 ) { u_width = document.documentElement.clientWidth; }else if ( document.body ) { u_width = document.body.clientWidth; } if ( window.innerHeight ) { u_height = window.innerHeight; }else if ( document.documentElement && document.documentElement.clientHeight != 0 ) { u_height = document.documentElement.clientHeight; }else if ( document.body ) { u_height = document.body.clientHeight; } asyncHttpRequest("http://www2.livelink.ne.jp/js/disp?mbr_cd=" + herou + "&u_width=" + u_width + "&u_height=" + u_height,setNews); } window.onload=user_set;