//ヘッダー部ログイン function login(APPLICATION_NAME) { alert('使用後にコンピュータから離れるときは,ログアウトしてください。'); httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { var prm2 = document.headerloginform._USERID.value; var prm3 = document.headerloginform._PASSWORD.value; httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform&prm1=loginaction&prm2="+prm2+"&prm3="+prm3); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } //ヘッダー部ログイン(TOP画面) function logintop(APPLICATION_NAME) { alert('使用後にコンピュータから離れるときは,ログアウトしてください。'); httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { var prm2 = document.headerloginform._USERID.value; var prm3 = document.headerloginform._PASSWORD.value; httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform_top&prm1=loginaction&prm2="+prm2+"&prm3="+prm3); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } //ヘッダー部ログイン(大学検索) function loginsch(APPLICATION_NAME) { alert('使用後にコンピュータから離れるときは,ログアウトしてください。'); httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { var prm2 = document.headerloginform._USERID.value; var prm3 = document.headerloginform._PASSWORD.value; httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform_subnavi&prm1=loginaction&prm2="+prm2+"&prm3="+prm3); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } //ログインフォーム表示 function displayData() { try{ if ((httpObj.readyState == 4) && (httpObj.status == 200)) { $("mypageloginform").innerHTML = httpObj.responseText; var error_flg = (httpObj.responseText).indexOf('
'); if(error_flg != -1){ alert("ユーザーIDとパスワードがまちがっています。\n再入力し直してください。\n\nパスワードを忘れた場合は 「パスワード忘れはこちら」 へ進んでください。"); } } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } // HTTP通信用、共通関数 function createXMLHttpRequest(cbFunc) { var XMLhttpObject = null; var objectPattern = null; try{ XMLhttpObject = new XMLHttpRequest(); objectPattern = "0"; }catch(e){ try{ XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP"); objectPattern ="1"; }catch(e){ try{ XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP"); objectPattern ="2"; }catch(e){ return null; } } } if (XMLhttpObject){ var ua=navigator.userAgent; if(ua.indexOf("MSIE 7.0") !=-1){ XMLhttpObject.onreadystatechange = cbFunc; } if(objectPattern =="0"){ XMLhttpObject.onload = cbFunc; }else{ XMLhttpObject.onreadystatechange = cbFunc; } } return XMLhttpObject; } function $(tagId) { return document.getElementById(tagId); } //ヘッダー部ログアウト(MYページ以外) function logout(APPLICATION_NAME) { if(confirm("ログアウトします。よろしいですか?")){ httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform&prm1=logoutaction"); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } } //ヘッダー部ログアウト(TOP) function logouttop(APPLICATION_NAME) { if(confirm("ログアウトします。よろしいですか?")){ httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform_top&prm1=logoutaction"); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } } //ヘッダー部ログアウト(大学検索) function logoutsch(APPLICATION_NAME) { if(confirm("ログアウトします。よろしいですか?")){ httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform_subnavi&prm1=logoutaction"); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } } //ヘッダー部ログアウト(MYページ) function logout_mypage(){ if(confirm("ログアウトします。よろしいですか?")){ document.headerloginform.submit(); } } //ヘッダー部ログインSSL用 function loginssl(APPLICATION_NAME) { alert('使用後にコンピュータから離れるときは,ログアウトしてください。'); httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { var prm2 = document.headerloginform._USERID.value; var prm3 = document.headerloginform._PASSWORD.value; httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform_ssl&prm1=loginaction&prm2="+prm2+"&prm3="+prm3); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } //ヘッダー部ログアウトSSL用(MYページ以外) function logoutssl(APPLICATION_NAME) { if(confirm("ログアウトします。よろしいですか?")){ httpObj = createXMLHttpRequest(displayData); try{ if (httpObj) { httpObj.open("POST",APPLICATION_NAME+"/control",false); httpObj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); httpObj.send("requestId=headerloginform_ssl&prm1=logoutaction"); } else{ alert("ご使用のブラウザではご利用できません。"); } }catch(e){ alert("ご使用のブラウザではご利用できません。"); } } }