function getCookieValue (strName)
{
var strCookieName = strName + "=";
var objCookie = [안내]태그제한으로등록되지않습니다-document.cookie;
if (objCookie.length > 0)
{
var nBegin = objCookie.indexOf(strCookieName);
if (nBegin < 0)
{
return '';
}
nBegin += strCookieName.length;
var nEnd = objCookie.indexOf(";", nBegin);
if (nEnd == -1)
{
nEnd = objCookie.length;
}
}
if(objCookie.substring(nBegin, nEnd) == undefined){
return '';
}else{
return objCookie.substring(nBegin, nEnd);
}
}
function checkCapsLock(e) {
var mykeyCode = 0;
var myShiftKey = false;
try {
if (document.all) {
myKeyCode = e.keyCode;
myShiftKey = e.shiftKey;
} else if (document.layers) {
myKeyCode = e.which;
myShiftKey = (myKeyCode == 16) ? true: false;
} else if (document.getElementById) {
myKeyCode = e.which;
myShiftKey = (myKeyCode == 16) ? true: false;
}
if ((myKeyCode >= 65 && myKeyCode <= 90) && !myShiftKey) {
document.all.caps.style.display = "";
setTimeout("document.all.caps.style.display = 'none'",1500);
} else if (myKeyCode >= 97 && myKeyCode <= 122 && myShiftKey) {
document.all.caps.style.display = "";
setTimeout("document.all.caps.style.display = 'none'",1500);
} else {
document.all.caps.style.display = "none";
}
} catch (ex) {
document.all.caps.style.display = "none";
}
}
function setDefaultStartPage(anch) {
var hostname = document.location.hostname;
setstart.style.behavior='url(#default#homepage)';
setstart.setHomePage('http://'+hostname);
}
// 통합검색 찾기...
function search(){
var keyword = document.getElementById("keyword").value;
document.searchFrm.dquery.value = keyword;
var collection = document.searchFrm.collection.value;
document.searchFrm.collection.value = collection;
document.searchFrm.submit();
}
function getCookie(name)
{
var nameOfCookie = name + "=";
var x = 0;
while(x <= [안내]태그제한으로등록되지않습니다-document.cookie.length)
{
var y = (x + nameOfCookie.length);
if([안내]태그제한으로등록되지않습니다-document.cookie.substring(x,y) == nameOfCookie)
{
if((endOfCookie = [안내]태그제한으로등록되지않습니다-document.cookie.indexOf(";",y)) == -1)
endOfCookie = [안내]태그제한으로등록되지않습니다-document.cookie.length;
return unescape([안내]태그제한으로등록되지않습니다-document.cookie.substring(y,endOfCookie));
}
x = [안내]태그제한으로등록되지않습니다-document.cookie.indexOf(" ",x) + 1;
if(x == 0)
break;
}
return "";
}
function setDefaultStartPage(anch) {
var hostname = document.location.hostname;
setstart.style.behavior='url(#default#homepage)';
setstart.setHomePage('http://'+hostname);
}
function ssoLogin()
{
var _form = document.getElementById('ssoLoginForm');
var _login_id = _form.login_id.value;
if(_login_id == '')
{
alert("아이디를 입력해주십시오.");
_form.login_id.focus();
return false;
}
if(_form.password.value == '')
{
alert("비밀번호를 입력해주십시오.");
_form.password.focus();
return false;
}
//if(_form.checkSaveLoginId.checked == true) {
// saveLoginId(_login_id);
//}
//else {
// deleteLoginId(_login_id);
//}
if(checkUser(_form.login_id.value, _form.password.value)){
_form.submit();
//chk_sms(); //sms전송 추가
} else {
return false;
}
}
function onLoginCheck(){
var f = document.ssoLoginForm;
var tmplogCh = location.href;
var logCh = "";
var amp = /&/g;
logCh = tmplogCh.replace(amp,"%26");
document.getElementById('rtn_url').value = document.getElementById('rtn_url').value + '?loginUrl='+logCh;
f.submit();
}
function enterKey() {
if(window.event.keyCode==13){
onLoginCheck();
}
}
function checkUser(loginId, password) {
var _url = "check_user";
var _pars ="login_id=" + loginId;
//보안상 패스워드 숨김
//var _pars ="login_id=" + loginId + "&password=" + password;
//Ajax를 통해 기존회원인지 여부 체크하는 로직 확인 필요
//Ajax를 통해 가져올수 있도록 구현 필요
var ajax = new Ajax.Request(_url,
{
method: 'get',
parameters: _pars,
onComplete: resultCheckUser
}
);
//임시로 회원가입여부 상관없이 모두 로긴처리하도록 함 : resultCheckUser 확인!!
return true;
}
function resultCheckUser(oriRequest) {
var _form = document.getElementById('ssoLoginForm');
var responseText = oriRequest.responseText;
var _result = eval("(" + responseText + ")");
if(_result.user_status == "S") {
if(confirm("회원님은 기존 블로그 회원입니다.\n통합회원으로 가입하시면 다양한 정책정보 서비스를 받아 보실 수 있습니다.")) {
//document.location.href = "";
}
} else {
return;
}
}
function openerror(){
window.open("/newsWeb/membererror.html","","width=600,height=200");
}
function onLoginPage(){
var documentHref = document.location.href;
document.location.href = '/newsWeb/pages/unify2/gpkiLogin3.jsp?logCh='+documentHref;
}
|