var gnb_over = 1;
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
}
function $(_str) {
return document.getElementById(_str)?document.getElementById(_str):null;
}
function realOffset(_e) {
var T = 0, L = 0;
do { T += _e.offsetTop || 0; L += _e.offsetLeft || 0; _e = _e.offsetParent; } while (_e);
return [L, T];
}
function flashWrite( id, flashUri, vWidth, vHeight, winMode, ret) {
var _obj_ = "";
_obj_ = '';
if (ret) { return _obj_; } else { document.writeln( _obj_ ); }
}
function LogIn(f){
f.mID.value = f.mID.value.trim();
if (f.mID.value == '' || f.mID.value.length < 4) { alert("¾ÆÀ̵𸦠ÀÔ·ÂÇϼ¼¿ä."); f.mID.focus(); return false; }
else if (f.mPWD.value == '' || f.mPWD.value.length < 4) { alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä."); f.mPWD.focus(); return false; }
else { return true; }
}
function CashCharge(obj){
window.open('http://www.lottorich.co.kr/hirichToLogin.html?r_url=/cash/HirichFill.html&uid='+ obj, 'cash_popup', 'width=400, height=270');
}
function alert_anal (_nick) {
alert (_nick + 'ÀÇ VIPȸ¿ø¸¸ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
return false;
}
function viewTab (_id) {
var arr = _id.split('_');
var prefix = '';
for (var i = 0; i < arr.length - 1;i++) { prefix += arr[i] + '_'; }
for (i = 1;;i++) {
if ($(prefix + '' + i) ) {
$(prefix + '' + i).style.display = 'none';
} else { break; }
}
$(_id).style.display = 'block'
}
function smsLayer (_obj) {
if (!$('layer_top_sms')) {
var div = document.createElement("DIV");
div.id = 'layer_top_sms';
div.style.position = 'absolute';
div.style.left = realOffset(_obj)[0] + 'px';
div.style.top = realOffset(_obj)[1] + 5 + 'px';
div.style.width = 139 + 'px';
div.style.height = 300 + 'px';
div.onmouseover = function () {this.style.display = 'block';}
div.onmouseout = function () {this.style.display = 'none';}
div.innerHTML = '
';
div.innerHTML += '';
div.innerHTML += '
';
document.body.appendChild(div);
} else {
$('layer_top_sms').style.left = realOffset(_obj)[0] + 'px';
$('layer_top_sms').style.top = realOffset(_obj)[1] + 5 + 'px';
$('layer_top_sms').style.display = 'block';
}
}
function smsLayerIlban (_obj) {
if (!$('layer_top_sms')) {
var div = document.createElement("DIV");
div.id = 'layer_top_sms';
div.style.position = 'absolute';
div.style.left = realOffset(_obj)[0] + 'px';
div.style.top = realOffset(_obj)[1] + 5 + 'px';
div.style.width = 119 + 'px';
div.style.height = 68 + 'px';
div.onmouseover = function () {this.style.display = 'block';}
div.onmouseout = function () {this.style.display = 'none';}
div.innerHTML = '
';
document.body.appendChild(div);
} else {
$('layer_top_sms').style.left = realOffset(_obj)[0] + 'px';
$('layer_top_sms').style.top = realOffset(_obj)[1] + 5 + 'px';
$('layer_top_sms').style.display = 'block';
}
}
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 pop_news_data(_p_code, _p_uid, flag) {
if (flag!="") {
switch(flag) {
case 1:
var intWidth = screen.availWidth - 10;
var intHeight = screen.availHeight - 15;
var tempX = 0;
var tempY = 0;
news_data_window = window.open("", "news_data_window","left="+tempX+",top="+tempY+",width="+intWidth+",height="+intHeight+",scrollbars=yes, resizable=yes", "no");
news_data_window.location.href='/sise/kospi_sise.ls';
news_data_window.focus();
break;
case 2:
var intWidth = screen.availWidth - 10;
var intHeight = screen.availHeight - 15;
var tempX = 0;
var tempY = 0;
news_data_window = window.open("", "news_data_window","left="+tempX+",top="+tempY+",width="+intWidth+",height="+intHeight+",scrollbars=0, resizable=yes", "no");
if (_p_code && _p_uid) {
try {
news_data_window.readNews (_p_code, _p_uid);
} catch(e) {
news_data_window.location.href='/news/news_data/?p_code=' + _p_code + "&p_uid=" + _p_uid;
}
} else {
news_data_window.location.href='/news/news_data/';
}
news_data_window.focus();
break;
}
} else {
var intWidth = screen.availWidth - 10;
var intHeight = screen.availHeight - 15;
var tempX = 0;
var tempY = 0;
news_data_window = window.open("", "news_data_window","left="+tempX+",top="+tempY+",width="+intWidth+",height="+intHeight+",scrollbars=0, resizable=yes", "no");
if (_p_code && _p_uid) {
try {
news_data_window.readNews (_p_code, _p_uid);
} catch(e) {
news_data_window.location.href='/news/news_data/?p_code=' + _p_code + "&p_uid=" + _p_uid;
}
} else {
news_data_window.location.href='/news/news_data/';
}
news_data_window.focus();
}
}
function gnbMenuOver (_num) {
if (_num == gnb_over) {
return;
}
/*
if (_num == 9) {
img = img.replace("c.gif", "c.gif");
$("gnb_icon_" + _num).src = img;
}
*/
if ($("gnb_icon_" + _num)) {
var img = $("gnb_icon_" + _num).src.replace(".gif", "c.gif");
img = img.replace("cc.gif", "c.gif");
$("gnb_icon_" + _num).src = img;
}
if (gnb_over && gnb_over != 10) {
$("gnb_icon_" + gnb_over).src = $("gnb_icon_" + gnb_over).src.replace("c.gif", ".gif");
} else {
// $("gnb_icon_2").src = $("gnb_icon_2").src.replace("c.gif", ".gif");
// $("gnb_2").style.display = 'none';
}
$("gnb_" + gnb_over).style.display = 'none';
$("gnb_" + _num).style.display = 'block';
gnb_over = _num;
}