
var objSCWeb_chk = "NotLoad";
var bLogin = false;
var bDialog = false;
var bViewMusicPlay = true;
var gbMK = false;
var login_userid = '',login_userno = '',login_checkSum = '';
if ('undefined' != typeof(window.dialogHeight)) {
    bDialog = true;

}


if (!bDialog) { // ´ÙÀÌ¾ó·Î±× ¿¡¼­´Â ÄíÅ° Ã¼Å©¸¦ ÇÏÁö ¾Ê´Â´Ù.
    if (GetCookie("loginInfo", "uno") != ''){
       	bLogin = true;
    }
    if (bLogin) {login_userid = GetCookie("loginInfo","uid");login_userno = GetCookie("loginInfo","uno");login_checkSum=GetCookie("loginInfo","cks");}
    if (bLogin)
    {
	if (GetCookie("loginInfo","mk") != "0")
	{
	    gbMK = true;
	}
    }
}
var HomeDir = "";
var ImgDir = "http://image.infomail.co.kr";
var gsTransImg = ImgDir + "/dot_trans.gif";
var giOldAvataOffsetHeight = 22 //old avata display height Á¶Á¤

// xp ¼­ºñ½º ÆÑ 2 »ç¿ëÀÚ Ã¼Å©
var gbXp_Sp2Check = false;		//false °ªÀÌ ÆË¾÷ Çã¿ëÀÌ´Ù.
gbXp_Sp2Check = (window.navigator.userAgent.indexOf("SV1") != -1);

// XP »ç¿ëÀÚ Ã¼Å©
var gbXP_User_Agent = false;	//false = XP »ç¿ëÀÚ ¾Æ´Ô
gbXP_User_Agent = (window.navigator.userAgent.indexOf("Windows NT 5.1") != -1);



/*
   if( login_userid =='jjanggu01') {
   gbXp_Sp2Check = true;  // login_userid=='oyj77' ||
//	window.status = window.navigator.userAgent  ;
window.status = gbXP_User_Agent  ;
}
 */
/*if(gbXp_Sp2Check){
  var wincheck = open.window('about:blank','','');
  if(wincheck !=null )
  wincheck = false;
  }
 */

// ±âº» js ÀÎÅ¬·çµå
/*
if (location.href.toLowerCase().substr(0,31) == 'http://minipop.ontang.com/mpop/') {// ¹Ì´ÏÆË¿ëÀÌ¸é
document.write ( "<script src=\"/javascript/selectbox_mpop.js\"></script>")
}
else {
    document.write ( "<script src=\"/javascript/selectbox.js\"></script>")
}
*/

//document.write ("<script src=\""+window.location.substring(0, window.location.indexOf("/", "http://"))+"javascript/selectbox.js\"></script>");

//alert(location.href.substring(0, location.href.indexOf("/", location.href.indexOf("http://") + 1)));
document.write ( "<script src=\"/javascript/selectbox.js\"></script>")
if(typeof(bBingoObject) == 'undefined') var bBingoObject = false;
//if (bLogin) document.write ( "<script src=\"/javascript/bingo.js\"></script>")
document.write ( "<script src=\"/javascript/script_left_popup_menu.js\"></script>")


// Á¢¼Ó°ü¸® object »ý¼º ¾÷·Îµå½Ã Á¶½É!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
var currentUrl = location.href;
var currentUrlInfo = currentUrl.split("/");

var currentPage = currentUrlInfo[2];

if(typeof(bSCWebObject) == 'undefined') var bSCWebObject = false;
//alert(bSCWebObject);

//2008.06.13
//if (!gbMK){
//    if(!bSCWebObject && !bDialog){
//	//		if(login_userid == "jjanggu01" || login_userid == "wongya" || login_userid == "kilyoung11")
//	//		{
//	//			document.write ("<script src=\"http://www.infomail.co.kr/common/javascript/ontang_login_test.js\"></script>");
//	//		}
//	//		else
//	//		{
//
//
//		if(currentPage != "aspadmin.popple.co.kr"){
//	    	document.write ("<script src=\"/javascript/ontang_login.js\"></script>");
//		}
//		
//		document.write ("<script src=\"/javascript/rtserver_login.js\"></script>");
//	//		}
//    }
//}


/*
function BINGO_download() {
    location = 'http://down.ontang.com/bingo/bingoSetup.exe'
}

function BINGO_Install() {
    open_win('http://bingo.ontang.com/bingo_setup.asp','',335,220)
}
*/

// ·Î±×ÀÎ °ü·Ã =======================================
function alertLogin() {
    ret = open_dialog("home","·Î±×ÀÎÀ» ÇØ ÁÖ¼¼¿ä!","·Î±×ÀÎ ¿äÃ»",300,180,"È®ÀÎ",70,"Ãë¼Ò",70,"",false);
    if(ret) dlgLogin();	
}

    function dlgLogin(msg,args) {
	if(bLogin) 
	    ret = open_dialog("home","·Î±×ÀÎ »óÅÂÀÔ´Ï´Ù.","",360,220,"È®ÀÎ",70,"","","",false)
	else {
	    ret = open_dialog2("/common/dlg_Login.php",360,220,false,args)
		if(typeof(ret) == 'object') {
		    if(ret["redir"]) 
			location = ret["redir"]; 
		    else if(ret["root_redir"])
			url_OpenerRootWin(ret["root_redir"]);
		    else 
			top.location.reload();
		}
	    /*
	       allStr = logindata.split("|*")
	       result = allStr[0],errCode = allStr[1],redirw = allStr[2],redir = allStr[3];
	       if(redir != '') {eval(redirw + ".location = '" + redir + "'");return;} 
	       if(result == '0') {
	       var args = new Array();
	       args["user_id"] = ret[0];
	       dlgLogin(getLoginErrMsg(errCode),args);
	       return;
	       }
	       else {
	       redir = getRedir()
	       if (redir) location = redir; else location.reload();
	       }
	     */
	}
    }

function getRedir() {
    var strHref = location.href;
    var key = "redir="
	var start = strHref.indexOf(key)
	if (start != -1) {// if key exists
	    start += key.length;
	    var token = "&";
	    var end = strHref.indexOf(token, start);// set index of beginning of value
	    if (end == -1) end = strHref.length;// set index of end of querystr value
	    return unescape(strHref.substring(start, end) + '?' + strHref.substr(end+1));
	}
	else 
	    return "";
}


function getLoginErrMsg(errCode) {
    var ret='';
    switch (errCode) {
	case '1': ret =  "¾ÆÀÌµð¿Í ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!";break;
	case '2': ret =  "¾ø´Â ¾ÆÀÌµðÀÌ°Å³ª ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù!";break;
	case '3': ret =  "¾ø´Â ¾ÆÀÌµðÀÌ°Å³ª ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù!";break;
	case '4': ret =  "Å»Åð Ã³¸® Áß ÀÔ´Ï´Ù!";break;
	case '5': ret =  "¼öÁ¤µÈ ¾à°üÀ» È®ÀÎ ÇØ ÁÖ¼¼¿ä!";break;
	case '6': ret =  "ºÒ·® »ç¿ëÀÚÀÔ´Ï´Ù!";break;
    }
    if(ret!='') ret = "<font color=red>" + ret + "</font>";
    return ret;
}

function Logout() {
    if(bLogin) {
	ret = open_dialog("home","ÀÎÆ÷¸ÞÀÏÀ» Á¾·áÇÏ½Ã°Ú½À´Ï±î?","·Î±×¾Æ¿ô",360,220,"È®ÀÎ",60,"¾Æ´Ï¿À",60,"",false)
	    if(ret){
		if(gbMK == false){
		    //fnUserLogOutReq();
		}
		location = '/login/logoutOK.php';
	    }
    }
    else
	ret = open_dialog("home","·Î±×¾Æ¿ô »óÅÂÀÔ´Ï´Ù.","",360,220,"È®ÀÎ",60,"","","",false)
}
// ======================================================================



// ÄíÅ° °ü·Ã ÇÔ¼öµé =====================================================
function GetCookie (Name,Name2) {

    if(Name2)
    {
	var search = Name + "["+Name2+"]=";
	var returnvalue = "";

	offset = document.cookie.indexOf(search);

	if (offset != -1) {// if cookie exists
	    offset += search.length;
	    returnvalue = getCookieVal(offset);
	}
	else {
	    returnvalue = '';
	}
    }
    else
    {
	var search = Name + "=";
	var returnvalue = "";

	offset = document.cookie.indexOf(search);

	if (offset != -1) {// if cookie exists
	    offset += search.length;
	    returnvalue = getCookieVal(offset);
	}
	else {
	    returnvalue = '';
	}

    }
    /*
    if (document.cookie.length > 0) {
	offset = document.cookie.indexOf(search)
	    if (offset != -1) {// if cookie exists
		offset += search.length;
		returnvalue = getCookieVal(offset);
	    }
	    else {
		returnvalue = '';
	    }
    }
    if(Name2) { // ±×·ì¾È¿¡¼­ ´Ù½Ã Ã£´Â °æ¿ì¶ó¸é
	cookie = returnvalue
	    search = Name2 + "="
	    offset = returnvalue.indexOf(search)
	    if (offset != -1) {// if cookie exists
		offset += search.length;
		returnvalue = getCookieVal(offset,cookie,"&");
	    }
	    else {
		returnvalue = '';
	    }
    }
    */
    return returnvalue;
}

function SetCookie (name,value,expires,path,domain,secure) {
    document.cookie = name + "=" + value +
	((expires) ? "; expires=" + expires.toGMTString() : "") +
	    "; path=/" +
		((domain) ? "; domain" : "") +
		((secure) ? "; secure" : "");
}

function getCookieVal (offset,cookie,token) {
    if(!token) token = ";";
    if(!cookie) cookie = document.cookie;
    var end = cookie.indexOf(token, offset);// set index of beginning of value
    if (end == -1) end = cookie.length;// set index of end of cookie value
    return unescape(cookie.substring(offset, end));
}
// =============================================================================








// ÀÌº¥Æ® ÇÚµé °ü·Ã =============================================================

// IE5.5 ÀÌ»ó¿¡¼­ µ¿ÀÛ
IE_Ver = new Number(((window.navigator.appVersion.split('; '))[1].split(' '))[1]);
if(!bDialog) {
    //if ((navigator.appName != "Microsoft Internet Explorer" || IE_Ver < 5.5)) document.location.href = "http://www.infomail.co.kr/common/asp/down_explorer.asp";
    //document.domain = "ontang.com";// ÇÏÀ§ µµ¸ÞÀÎ¿¡¼­ ±ÇÇÑ ¿À·ù ¹ß»ýÇÒ ¼ö ÀÖÀ¸¹Ç·Î Àû¿ëÇÏÁö ¸»°Í.


    if(!navigator.cookieEnabled) { // dialogÀÏ °æ¿ì¿¡´Â cookie Ã¼Å©¸¦ ÇÏÁö ¾Ê´Â´Ù.
	if(confirm("ÄíÅ° ¼³Á¤ÀÌ µÇ¾î ÀÖÁö ¾Ê½À´Ï´Ù.\nÄíÅ° ¼³Á¤ ¾øÀÌ´Â ÀÎÆ÷¸ÞÀÏ »ç¿ëÀÌ ºÒ°¡´ÉÇÕ´Ï´Ù.\nÄíÅ° ¼³Á¤ µµ¿ò¸»À» º¸½Ã°Ú½À´Ï±î?")) 
	    document.location.href = '/login/cookie_ie5.php';
    }
}

var error_reported = false;
//window.onerror=ERROR_TRAP;
window.onload = EXEC_WIN_ONLOAD;
window.onresize = EXEC_WIN_ONRESIZE;



// onload Handle
var ARR_WIN_ONLOAD = new Array();
function ADD_WIN_ONLOAD (eval_str, priority) {
    if ("undefined" != typeof(priority)) {
	if (priority >= 0) {
	    if ("undefined" == typeof(ARR_WIN_ONLOAD[priority]))
		ARR_WIN_ONLOAD[priority] = eval_str;
	    else {
		var tmpEvalStr = ARR_WIN_ONLOAD[priority];
		ARR_WIN_ONLOAD[ARR_WIN_ONLOAD.length] = tmpEvalStr;
		ARR_WIN_ONLOAD[priority] = eval_str;
	    }
	}
    }
    else if ("undefined" == typeof(priority))
	ARR_WIN_ONLOAD[ARR_WIN_ONLOAD.length] = eval_str;
}
function EXEC_WIN_ONLOAD () {
    for (var i=0; i < ARR_WIN_ONLOAD.length; i++){
	eval(ARR_WIN_ONLOAD[i]);
    }
}

// onresize Handle
var ARR_WIN_ONRESIZE = new Array();
function ADD_WIN_ONRESIZE (eval_str) {
    ARR_WIN_ONRESIZE[ARR_WIN_ONRESIZE.length] = eval_str;
}
function EXEC_WIN_ONRESIZE () {
    for (var i=0; i < ARR_WIN_ONRESIZE.length; i++) eval(ARR_WIN_ONRESIZE[i]);
}

// onclick Handle
var ARR_WIN_ONCLICK = new Array();
function ADD_WIN_ONCLICK (eval_str) {
    ARR_WIN_ONCLICK[ARR_WIN_ONCLICK.length] = eval_str;
}
function EXEC_WIN_ONCLICK () {
    for (var i=0; i < ARR_WIN_ONCLICK.length; i++) eval(ARR_WIN_ONCLICK[i]);
}

// onunload Handle
var ARR_WIN_ONUNLOAD = new Array();
function ADD_WIN_ONUNLOAD (eval_str) {
    ARR_WIN_ONUNLOAD[ARR_WIN_ONUNLOAD.length] = eval_str;
}
function EXEC_WIN_ONUNLOAD () {
    for (var i=0; i < ARR_WIN_ONUNLOAD.length; i++) eval(ARR_WIN_ONUNLOAD[i]);
}


// onerror Handle

/*
function ERROR_TRAP(msg,url,line){ // Window Error ¸®Æ÷Æ®¸¦ ÀÛ¼ºÇÑ´Ù.
    var getstr = '',engver='';
    getstr  += "msg="+(msg)
	+ "&url="+(url)
	+ "&line="+line
	+ "&cookieenabled="+(navigator.cookieEnabled.toString())
	+ "&userlanguage="+(navigator.userLanguage.toString()) 
	+ "&appversion="+(navigator.appVersion);

    engver  += ScriptEngine() + " Version "
	+ ScriptEngineMajorVersion() + "."
	+ ScriptEngineMinorVersion() + "."
	+ ScriptEngineBuildVersion();

    getstr += "&engver="+(engver);		

    if (!error_reported) {
	executeHidden('http://www.infomail.co.kr/common/asp/js_error_report.asp?'+getstr);
	error_reported = true;
    }
    return true;
}
*/

// ¿¡·¯ ´øÁö±â »ùÇÃ ÀÌ ÄÚµå´Â ÀÌµû°¡ Áö¿ö ÁÖ¼¼¿ë...
/*
   function err_Throw(){
   try{ eval(oErrorCode.value) } catch(Exception){};
   }

   document.write('<INPUT TYPE="text" ID=oErrorCode VALUE="someObject.someProperty=true;">'
   + '<INPUT TYPE="button" VALUE="Throw Error" onclick="err_Throw()">');
 */
// ¿¡·¯ ´øÁö±â ³¡

// ===========================================================================================


// window open, resize °ü·Ã ==========================================================================
function open_win (url, name, w, h, t, l) {
    var feature
	feature =  "scrollbars=no,resizable=no,width="+w+",height="+h

	if(t != 0){		
	    feature += ',top=' + t;
	}else{
	    feature += ',top=0';
	}

    if(l != 0){
	feature += ',left=' + l;
    }else{
	feature += ',left=0';
    }
    var oWin = window.open(url, name, feature) 

	if(oWin == null){
	    xpsp2_popup_check();
	}else {
	    try{ oWin.focus(); }catch(Exception){}
	}
    return oWin;
}
function open_win_center(url, name, w, h) {
    var height = screen.height;
    var width = screen.width;
    var toppos = height / 2 - h/2;
    var leftpos = width / 2 - w/2;

    var oWin = window.open(url, name, "scrollbars=no,resizable=no,width="+w+",height="+h+",top="+toppos+",left="+leftpos);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}
function open_win_scroll (url, name, w, h) {
    var oWin = window.open(url, name, "scrollbars=yes,resizable=yes,width="+w+",height="+h);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}
function open_win_autoscroll (url, name, w, h) {
    var oWin = window.open(url, name, "scrollbars=auto,resizable=yes,width="+w+",height="+h);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}
function open_win_resizable (url, name, w, h) {
    var oWin = window.open(url, name, "scrollbars=no,resizable=yes,width="+w+",height="+h);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}
function open_win_ret (url, name, w, h) {
    var oWin = window.open(url, name, "scrollbars=no,resizable=yes,width="+w+",height="+h);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}
function open_win_features (url, name,features) {
    var oWin = window.open(url, name, features);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}
function open_win_mpop(url, name, w, h) {	
    var height = window.screenTop + 215;
    var width = window.screenLeft + 195;
    var toppos = height - h/2;
    var leftpos = width - w/2;

    var oWin = window.open(url, name, "scrollbars=no,resizable=no,width="+w+",height="+h+",top="+toppos+",left="+leftpos);
    if(oWin == null){
	xpsp2_popup_check();
    }else {
	try{ oWin.focus(); }catch(Exception){}
    }
    return oWin;
}

// Opener ·çÆ® À©µµ¿ì ÆäÀÌÁö¸¦ ¸®´ÙÀÌ·ºÆ® ½ÃÅ²´Ù. ¾øÀ¸¸é ÇöÀçÀå top¿¡¼­ ÀÌµ¿ 
    function url_OpenerRootWin(url) {
	var root_win = get_OpenerRoot()
	    //alert(root_win)
	    if(root_win == null) {
		url_newWin(url);
	    }
	    else {
		try {
		    root_win.location = url;
		    root_win.focus();
		} 
		catch (e) {
		    url_newWin(url);
		}
	    }
    }

// Opener ·çÆ® À©µµ¿ì ÆäÀÌÁö¸¦ ¸®´ÙÀÌ·ºÆ® ½ÃÅ²´Ù. ¾øÀ¸¸é »õÃ¢ ¶ç¿î´Ù.
function url_OpenerRootNewWin(url) {
    var root_win = get_OpenerRoot('new')
	//alert(root_win)
	if(root_win == null) {
	    url_newWin(url);
	}
	else {
	    try {
		root_win.location = url;
		root_win.focus();
	    } 
	    catch (e) {
		url_newWin(url);
	    }
	}
}


function get_OpenerRoot(flg) {
    var root_win;
    c = self.top;
    if (c.opener) {
	if(!c.opener.closed) {
	    var cnt = 0;
	    while (cnt++ < 20 && (c.opener && c != c.opener) && !c.opener.closed) {c = c.opener.top;}
	}
	else { c = null }
    }

    root_win = c;

    if(flg == 'new')
	if(root_win == null || c == self.top ) root_win = null;
	else
	    if(root_win.closed || root_win == null || typeof(root_win.Navigate_popple) == 'undefined')  root_win = null;


    return root_win;
}

function GetBase() { //private
    var oBaseColl = document.all.tags('BASE');
    return ( (oBaseColl && oBaseColl.length) ? oBaseColl[0].target : null );
}

function Navigate_popple(url) { //private
    var base_target = GetBase();
    if (base_target != null)
	window.open(url, base_target);
    else
	document.location.assign(url);
    if (event) event.returnValue = false;
}

var newWindow_popple;
function url_newWin(url) {//private
    if ('object' == typeof(newWindow_popple)) {
	try {
	    newWindow_popple.Navigate_popple(url);
	    return;
	} 
	catch (e) {}
    }
    if(window.name!="ontang"){
	newWindow_popple = window.open(url, "ontang");
	newWindow_popple.focus();
    }
    else
	newWindow_popple = window.open(url, "_blank");	
}



// °ÔÀÓ ¹Ù·Î °¡±â 
/*
function game_go(game_url){
    if(game_url == ""){
	return false;
    }else{
	location.href=game_url;
    }
}
// °ÔÀÓ µµ¿ò¸» ¹Ù·Î°¡±â 
function goGameHelp(querystring){
    location.href="http://game.ontang.com/game_useinfo.asp?" + querystring
}
function gomissionOpen(){
    if(bLogin == false){
	SubLoginBoxOpen();
    }
    else{
	open_win("http://game.ontang.com/mymission_collectbox.asp","",600,706);
    }
}


//Å¬·´ °¡±â 
function goClub(club_id,win){
    var gohost

	if(location.host=="humoruniv.ontang.com")
	    gohost = "http://humoruniv.ontang.com"
	else
	    gohost = "http://club.ontang.com"

		if( club_id.length >0 )
		    if(win) {
			target = eval(win)
			    target.location = gohost + '/clubmain/club_main_go.asp?club_id='+club_id
		    }
		    else	
			url_OpenerRootWin(gohost + '/clubmain/club_main_go.asp?club_id='+club_id);
}
*/

//¹ßÇà/±¸µ¶ÇÔ ¶ç¿ì±â
var login_email = "";
function goMBoxOpen(){
    /*
    alert ("ÀÌÃ¢  ³ªÁß¿¡ ¾ø¾Ö¶ó...");
    login_email="sisong@infoweb.co.kr";
    SubBoxOpen();
    return;
    */
    // ÀÌ À§±îÁö ¾ø¾Ù°Í


    if(bLogin == false && GetCookie("EmailMember") == ""){
	SubLoginBoxOpen();
    }
    else
    {
	login_email = GetCookie("EmailMember");
	SubBoxOpen();
    }
}

function SubBoxOpen(){
    open_win("http://www.infomail.co.kr/magazine_box/mbox_home.php?email="+login_email,"",810,500);
}

//RSS ¼öÁýÇÔ ¶ç¿ì±â
function goRSSBoxOpen(){
    if(bLogin == false){
	var ret = open_dialog2("/common/dlg_Login.php",360,220,false,false);	
	if(typeof(ret) == 'object' || bLogin ) {
	    location.reload();
	    SubRSSBoxOpen();
	}
    }
    else
    {
	SubRSSBoxOpen();
    }
}

function SubRSSBoxOpen(){
    open_win_features("/rss/rssbox_main.php","RSSBOX","toolbar=yes,resizable=yes,width=920,height=600,status=yes");
}

function SubLoginBoxOpen(){
    open_win_center("https://www.infomail.co.kr/common/dlg_bz_login.php","",300,300);
}


//ºñÈ¸¿ø ±¸µ¶ÇÏ±â Ã¢ ¶ç¿ì±â
function gosubpop2(ifm_id){
    open_win_center("/common/p_subscript2.php?ifm_id="+ifm_id,"",400,390);
}

//Á¤È¸¿ø ±¸µ¶ÇÏ±â Ã¢ ¶ç¿ì±â
function gosubpop(ifm_id){
    if(!bLogin)
    {
	open_win_center("/common/p_subscript2.php?ifm_id="+ifm_id,"",400,390);
    }
    else
    {
	open_win_center("/sub_pop/p_subscript.php?ifm_id="+ifm_id,"",400,390);
    }
}

function goBlogzine(user_id,ifm_id,win) {
    if(win) {
	target = eval(win)
	    target.location = '/bzmain/bz_main_go.php?ifm_userid=' + user_id + '&ifm_id='+ifm_id
    }	else
	url_OpenerRootWin('/bzmain/bz_main_go.php?ifm_userid=' + user_id + '&ifm_id='+ifm_id)
}

function goInfomail(ifm_id,sendpage_id,win) {
    if(win) {
	target = eval(win)
	    target.location = '/bzmain/bz_main_go.php?ifm_id='+ifm_id+'&sendpage_id=' + sendpage_id
    }	else {
	url_OpenerRootWin('/bzmain/bz_main_go.php?ifm_id='+ifm_id+'&sendpage_id=' + sendpage_id)
    }
}


function goInfomail2(getstring,win) {
    if( getstring.length > 0 ){
	if(win) {
	    target = eval(win)
		target.location = '/bzmain/bz_main_go.php?'+getstring
	}	else
	    url_OpenerRootWin('/bzmain/bz_main_go.php?'+getstring)
    }
}

// ÆËÇÃ¼¼»ó ½ÇÇà ½ÃÅ°±â
/*
function goPopseRoom (roomID,user_id) {
    if (!bLogin) {
	if (location.href.indexOf('http://popple.ontang.com')== -1) {
	    return alertLogin();
    } else {			
	location.href = 'http://popple.ontang.com/login.asp';
	return false;			
    }
    }

    if(roomID == '0' && user_id) {roomID = virtualGetData("/common_dlg/getdata.asp?dt=searchpopseroom&dv=" + user_id);}
    execPopse(roomID,self);
}

function execPopse(roomID,win) {
    var height = screen.height;
    var width = screen.width;
    var toppos = height / 2 - 50;
    var leftpos = width / 2 - 50;
    url = 'http://popple.ontang.com/cab/neo_connect.asp?roomID='+roomID+'&ran=' + Math.round(Math.random()*10000);
    nmw = win.open(url,'_blank','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=no,copyhistory=0,width=10,height=10,top='+toppos+',left='+leftpos);
    if(nmw == null){
	xpsp2_popup_check();
	return false;
    }else{
	nmw.focus();
    }
}

//¹Ì´ÏÆË ¶ç¿ì±â
function goMinipop(userid,getstr) {
    if( userid.substring(0,11)=="ontangguest"){
	raise_alert("¼Õ´Ô¿¡°Ô´Â »ç¿ëÇÒ ¼ö ¾ø´Â ±â´ÉÀÔ´Ï´Ù.")
	    return;
    }

    var self_url = location.href; //'mpop_url:iframe url, mpop_menu:¸Þ´º¹øÈ£
    (self_url.indexOf('/mpop/') == -1)? pop=0:pop=1;

    if (getstr)
	var url = 'http://minipop.ontang.com/mpop/minipop.asp?pop='+pop+'&mpop_userid='+userid+'&'+getstr;
    else
	var url = 'http://minipop.ontang.com/mpop/minipop.asp?pop='+pop+'&mpop_userid='+userid;

    if (location.href.search("http://minipop.ontang.com/mpop/")== -1)	{
	open_win(url,'',500,654)		
    } else {
	top.location.href = url;
    }
    //m_win.resizeTo(500,654);
    return;
}
//·£´ý¹Ì´ÏÆË
function minpop_random(flg){
    if( flg =='1' ){
	m_win = open_win('http://minipop.ontang.com/mpop/minipop_random.asp?flg='+flg,'',980,625);
    } else {
	m_win = open_win('http://minipop.ontang.com/mpop/minipop_random.asp?flg='+flg,'',490,625);
    }
    return
}



//Ä¿ÇÃ¹Ì´ÏÆË ¶Ù¿ì±â
function minipop_couple( userid, couple_id ) {
    var self_url = location.href;
    var url;
    (self_url.indexOf('/mpop/') == -1)? pop=0:pop=1;
    var url = 'http://minipop.ontang.com/mpop/minipop_couple.asp?pop='+pop+'&mpop_userid='+ userid +'&couple_userid='+couple_id
	open_win(url,'',980,625)
	return;
}

// ¾ÆÀÌÅÛ¼¥ ¶ç¿ì±â
function goItemShop(iurl) {
    url = "http://shop.ontang.com/"
	if(iurl) url += '?iurl=' + iurl
	    open_win(url,'',930,671);
    return;
}

// ¾Æ¹ÙÅ¸ ²Ù¹Ì±â·Î ÀÌµ¿
function goAvataRoom() {
    url_OpenerRootWin('http://my.ontang.com/myavata/avata_deco.asp')
}
*/

// µ¿ÀÇ¼­ Ãâ·Â
function printAgreement() {
    open_win('/join/agree_telfax.php','',600,600)
}
// =============================================



// AOD °ü·Ã =============================================
/*
function buyAODCoupon(){
    if(!bLogin) return alertLogin();

    sUrl = "http://aod.ontang.com/buy_Form.asp?flg=aod";
    //open_win(sUrl,'',450,500)
    //return;
    var ret = open_dialog2(sUrl, 450, 500);
    if(typeof(ret) == "object"){
	if ( eval(ret["result_code"]) > 0 ){
	    if( ret["popflg"] == '1')	goMusicBox('');
	}
    }
}
*/
// ======================================================




//  À©µµ¿ì ÀÚµ¿ ¸®»çÀÌÁî ¼öÇà(xp µî ºê¶ó¿ìÀú Æ¯¼º°ú ´ÙÀÌ¾ó·Î±× Á¦¾î±â´É Æ÷ÇÔ ==================
function resize_win_auto(new_width) { 
    if (new_width) winWidth = new_width;
    document.writeln("<img name='blank_resizeimg' src='" + ImgDir + "/dot_trans.gif' align=top width=1 height=0 onload='resize_win();'>\n");
}

var winClientHeight = -1;
var winWidth = -1;
function resize_win () {//private
    //alert(winWidth)
    if ('object' != typeof(document.blank_resizeimg)) return;
    if (document.blank_resizeimg.style.display == 'none') document.blank_resizeimg.style.display = '';
    if (winWidth == -1) winWidth = document.body.offsetWidth + 8;

    if (IE_Ver < 5.5) 
	winClientHeight = 29;
    else if (winClientHeight < 0) {
	win_resizeTo(winWidth, 180,true);
	winClientHeight = 180 - document.body.clientHeight;
    }
    var winHeight = 0;
    //alert('document.blank_resizeimg.offsetTop=' + document.blank_resizeimg.offsetTop);
    //alert('document.body.clientHeight=' + document.body.clientHeight);
    if (document.blank_resizeimg) winHeight = document.blank_resizeimg.offsetTop + winClientHeight;
    document.blank_resizeimg.style.display = 'none';
    var maxHeight = screen.availHeight - 20;
    //alert('winHeight=' + winHeight + ':maxHeight = ' + maxHeight);
    if (winHeight > maxHeight) {winHeight = maxHeight;winWidth = winWidth + 16; document.body.scroll= 'yes';}
    win_resizeTo(winWidth + 10, winHeight);
}

function win_resizeTo(width,height,moveless) {
    if(bDialog) {
	old_height = parseInt(window.dialogHeight)
	    window.dialogWidth = width + 'px';
	window.dialogHeight = height + 'px';

	if(moveless) return;
	if (height > 600) offsetHeight = -80; else offsetHeight = 0;
	//»çÀÌÁî Á¶Á¤µÈ ¸¸Å­ ´ÙÀÌ¾ó·Î±× À§Ä¡¸¦ Á¶Á¤ÇÑ´Ù. 
	if (offsetHeight != 0) 
	    window.dialogTop = (old_height - (height - old_height)/2 + offsetHeight) + 'px';
    }
    else {
	var t_win = self.top
	    t_win.resizeTo(width, height);
	//try{ t_win.resizeTo(width, height); }catch(Exception){}
    }
}

// ============================================================================

// iframe °ü·Ã ¸®»çÀÌÁî ====================================================
var bMinSize = false;
var iFrmMaxWidth;
var iFrmMaxHeight;
var bMaxSize = false;

function set_MinSize(width, height) {
    iFrmMinWidth = width;
    iFrmMinHeight = height
	bMinSize = true;
}
function set_MaxSize(width, height) {
    iFrmMaxWidth = width;
    iFrmMaxHeight = height
	bMaxSize = true;
}

function resize_ifrm(name) {
    if (name == null || !name) name = "ifrmClubMain";
    //alert(name)
    //try
    //{
    // set_MinSize(500, 300)

    var oBody   = document.frames(name).document.body;
    var oIFrame = document.all(name);
    var frmWidth  = oBody.scrollWidth;
    var frmHeight = oBody.scrollHeight;
    if(frmHeight == 0) {
	setTimeout("resize_ifrm('" + name + "')",100)
	    return;
    }
    if (bMinSize) {
	frmWidth  = Math.max(frmWidth, iFrmMinWidth);
	frmHeight = Math.max(frmHeight, iFrmMinHeight);
    }
    if (bMaxSize) {
	frmWidth  = Math.min(frmWidth, iFrmMaxWidth);
	frmHeight = Math.min(frmHeight, iFrmMaxHeight);
    }
    oIFrame.style.height = frmHeight ;
    //oIFrame.style.width = frmWidth;
    //alert(frmHeight)
    //}
    //catch (e) {	}
}

function parent_resize_ifrm(name) {
    if (parent && parent != this && typeof(parent.resize_ifrm) != 'undefined') 
	try {parent.resize_ifrm(name)} catch(e) {};
}
//=============================================================================


// ´ÙÀÌ¾Ë·Î±× ¹Ú½º °ü·Ã =====================================================
if(bDialog) {
    var ret_args = new Array();
    function dlg_ReturnArgs(dir) {
	if(dir) ret_args["dir"] = dir;
	window.returnValue = ret_args;
	window.close();
    }
}

function ssang_alert(msg,title,winWidth,winHeight) { // ´ÙÀÌ¾ó·Î±× ¹Ú½º¿¡¼­ ´Ù½Ã ´ÙÀÌ¾ó·Î±× alertÀ» ¶ç¿ï¶§ window.dialogArgments ¼Ó¼ºÀ» ÀÐÁö ¸øÇÏ±â ¶§¹®¿¡ alert ´ÙÀÌ¾ó·Î±× ÆäÀÌÁö´Â º°µµ·Î ¸¸µç´Ù.
    var dialog = null;
    if(!title) title = 'LolTown';
    url = "/common/zin_alert.php?title=" + title + "&msg=" + msg
	if(!winWidth) winWidth = 345;
    if(!winHeight) winHeight = 350;
    args = ''
	try {
	    dialog = window.showModalDialog(url, args,
		    "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;");
	}catch(e){ 	
	    if( gbXp_Sp2Check ){
		xpsp2_popup_check();
		return false;
	    }
	}	


    return dialog;
}	

function raise_alert(msg,title,winWidth,winHeight) { // ´ÙÀÌ¾ó·Î±× ¹Ú½º¿¡¼­ ´Ù½Ã ´ÙÀÌ¾ó·Î±× alertÀ» ¶ç¿ï¶§ window.dialogArgments ¼Ó¼ºÀ» ÀÐÁö ¸øÇÏ±â ¶§¹®¿¡ alert ´ÙÀÌ¾ó·Î±× ÆäÀÌÁö´Â º°µµ·Î ¸¸µç´Ù.
    var dialog = null;
    if(!title) title = "ÀÎÆ÷¸ÞÀÏ";
    url = "/common/dlg_alert.php?title=" + title + "&msg=" + msg
	if(!winWidth) winWidth = 300;
    if(!winHeight) winHeight=180;
    args = ''
	try {
	    dialog = window.showModalDialog(url, args,
		    "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;");
	}catch(e){ 	
	    if( gbXp_Sp2Check ){
		xpsp2_popup_check();
		return false;
	    }
	}	
    return dialog;
}

function raise_alert3(msg,title,winWidth,winHeight) { // ´ÙÀÌ¾ó·Î±× ¹Ú½º¿¡¼­ ´Ù½Ã ´ÙÀÌ¾ó·Î±× alertÀ» ¶ç¿ï¶§ window.dialogArgments ¼Ó¼ºÀ» ÀÐÁö ¸øÇÏ±â ¶§¹®¿¡ alert ´ÙÀÌ¾ó·Î±× ÆäÀÌÁö´Â º°µµ·Î ¸¸µç´Ù.
    var dialog = null;
    if(!title) title = 'ÀÎÆ÷¸ÞÀÏ';
    url = "/common/dlg_alert.php?title=" + title + "&msg=" + msg
	if(!winWidth) winWidth = 300;
    if(!winHeight) winHeight=180;
    args = ''
	try {
	    if(!gbXp_Sp2Check){
		dialog = window.showModalDialog(url, args,
			"dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;");
	    }else{
		alert(msg);
		dialog = true;
	    }
	}catch(e){ 	
	    if( gbXp_Sp2Check ){
		xpsp2_popup_check();
		return false;
	    }
	}	
    return dialog;
}


function raise_confirm(msg,chgsize,title) {  
    var dialog = null;
    if(!chgsize) chgsize = 320;
    if(!title) title = 'ÀÎÆ÷¸ÞÀÏ'
	url = "/common/dlg_alert.php?title=" + title + "&msg=" + msg
	    dialog = open_dialog("home", msg, title,chgsize,200,"È®ÀÎ",50,"Ãë¼Ò",50)
	    return dialog;
}

function raise_alert2(msg) {
    ADD_WIN_ONLOAD("setForgroundHiddenHtml(GetAlertHtml('" + msg + "'));");
}	


function open_dialog(moduleID, msg, winTitle, winWidth, winHeight, btnTitle, btnWidth, btn2Title, btn2Width, icon, MODALESS,winArgs) {
    var args;
    if(!winArgs || 'undefined' == typeof(winArgs))
	args = new Array();
    else
	args = winArgs;

    if(!moduleID || 'undefined' == typeof(moduleID))
	var moduleID = "home";
    if(!msg || 'undefined' == typeof(msg))
	var msg = "¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù."
	    if(!winTitle || 'undefined' == typeof(winTitle))
		var winTitle = "¿À·ù"
		    if(!winWidth || 'undefined' == typeof(winWidth))
			var winWidth = 360;
    if(!winHeight || 'undefined' == typeof(winHeight))
	var winHeight = 220;
    if(!btnTitle || 'undefined' == typeof(btnTitle))
	var btnTitle = "È®ÀÎ";
    if(!btnWidth || 'undefined' == typeof(btnWidth))
	var btnWidth = "70";
    if(icon && 'undefined' != typeof(icon))
	args["icon"]      = icon;
    args["msg"]       = msg;
    args["winTitle"]  = winTitle;
    args["btnTitle"]  = btnTitle;
    args["btnWidth"]  = btnWidth;
    args["btnLink"]  = "javascript:fun_yes();";
    args["btn2Title"] = btn2Title;
    args["btn2Width"] = btn2Width;
    args["btn2Link"]  = "javascript:fun_no();";

    var dialog = null;
    url = "/common/modal_pop.php?mid="+moduleID+"&title="+winTitle
    //url = "/common_dlg/ModalPop.asp?mid="+moduleID+"&title="+winTitle


	if(!MODALESS || 'undefined' == typeof(MODALESS)){
	    try{
		dialog = window.showModalDialog(url, args,
			"dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;");
	    }catch(e){ 	
		if( gbXp_Sp2Check ){
		    xpsp2_popup_check();
		    return false;
		}
	    }	
	} else {
	    try{
		dialog = window.showModelessDialog(url, args,
			"dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;");
	    }catch(e){ 	
		if( gbXp_Sp2Check ){
		    xpsp2_popup_check();
		    return false;
		}
	    }
	}
    return dialog;
}


function open_dialog2(url,winWidth,winHeight,MODALESS,winArgs,winLeft,winTop) {
    if(!winWidth) winWidth = 300;
    if(!winHeight) winHeight = 150;
    if(winTop && winLeft) 
	sFeatures = "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px;dialogTop:"+winTop+"px;dialogLeft="+winLeft+";edge:sunken; center:no; resizable:no; status:no; help:no; scroll:no;";
    else
	sFeatures = "dialogWidth:"+winWidth+"px; dialogHeight:"+winHeight+"px; edge:sunken; center:yes; resizable:no; status:no; help:no; scroll:no;";

    if(!MODALESS || 'undefined' == typeof(MODALESS)){
	try{
	    dialog = window.showModalDialog(url, winArgs,sFeatures);

	}catch(e){ 	
	    if( gbXp_Sp2Check ){
		xpsp2_popup_check();
		return false;
	    }
	}	
    } else {
	try {
	    dialog = window.showModelessDialog(url, winArgs,sFeatures);
	}catch(e){ 	
	    if( gbXp_Sp2Check ){
		xpsp2_popup_check();
		return false;
	    }
	}	
    }
    return dialog;
}


//=============================================================

// virtual Data °ü·Ã ==========================================
function _xmlGetData (url) {
    var virtual = new ActiveXObject("Microsoft.XMLHTTP"); 
    var _httpMethod = "GET"; // post/get/put/etc optional 
    var _syncFlag = false;
    virtual.open(_httpMethod,url, _syncFlag); 
    virtual.setRequestHeader("Content-type:", "text/html");   
    virtual.setRequestHeader("Referer:", url);   
    virtual.send(); 
    if (virtual.status > 200) {//
    }
    return virtual.responseText;
}

function virtualGetData(url) {
    return _xmlGetData(url);
}
function executeHidden (url) {
    var oIframe = document.createElement("<IFRAME style='display:none'></IFRAME>");
    document.body.appendChild(oIframe);
    oIframe.src = url;
}

/*
   function ReturnDialogFormData(form) {
   window.returnValue = ConvArgsForm(form);
   window.close(); 
   }

   function ConvArgsForm(frm) {// form object ÀÇ µ¥ÀÌÅÍ¸¦ args ·Î º¯È¯ÇÏ¿© ¸®ÅÏ
   args = new Array();
   args["action"] = frm.action
   var QueryString = "";
   for (i=0;i<frm.elements.length;i++) {
   if(QueryString != "") QueryString += "&";
   QueryString += ConvQueyrStrFormat(frm.elements[i].name) + '=' + ConvQueyrStrFormat(frm.elements[i].value);
   }
   args["querystring"] = QueryString;
   return args;
   }

   function ConvQueyrStrFormat(str) {
   var ret
   ret = str
   ret = ret.replace("=","%3D")
   ret = ret.replace("&","%26")
   return ret
   }

   function virtualSubmit(args,blnDialog) {
   url = args["action"]
   QueryString = args["querystring"]
   if(url.indexOf("?") != -1) 
   url += "&" + QueryString
   else
   url += "?" + QueryString

   if (blnDialog) 
   return open_dialog2(url,300,300,false,"")
   else
   executeHidden(url)
   }
 */

//=============================================================================


// ¾ÆÀÌÅÛ °ü·Ã  =====================================================
/*
function filterColor(item_color) {
    var item = item_color
	if (!item) return "";
    item = item.replace("Çì¾î¾Ç¼¼»ç¸®","")
	item = item.replace("È¯¿µ¸ðÀÚ","")
	item = item.replace("P_¼ÒÇ°-°¡¸é","")
	item = item.replace("p_3Â÷±âÅ¸ÆÈ·¿Æ®","")
	item = item.replace("p_°¡¸é¸ðÀÚÆÄ·¹Æ®2","")
	item = item.replace("p_°¡¸é¸ðÀÚÆÄ·¹Æ®","")
	item = item.replace("p_¾Ö´Ï¹Â04_1","")
	item = item.replace("p_¾Ö´Ï¹Â","")
	item = item.replace("p_¼ÒÇ°","")
	item = item.replace("P_¼ÒÇ°","")
	item = item.replace("¸Ó¸®","")
	item = item.replace("Ãß°¡Ä³¸¯ÅÍ","")
	item = item.replace("p_¼±±Û¶ó½º","")	
	item = item.replace("¾Ö¿Ï","")	

	return item;
}
// °áÁ¦Ã¢ ¶ç¿ì±â
function openChargeWin() {
    open_win('http://pay.ontang.com/secure/select.asp','',500,680);
}

function RemakeAvataImg() {
    executeHidden('http://my.ontang.com/makeWebAvataImg.asp');
}
*/
// ÀÌ¹ÌÁö ±âº» ¶ç¿ì±â 
function defaultImg(obj, path) {
    obj.src=path;
}


// Tips & Tips ¶ç¿ì±â
    function tipsntips(num,seq){
	if(seq) 
	    var url = "/help/tipntip_view.php?seqidx=" + seq + "&tntType=" + num;
	else
	    var url = "/help/tipntip.php?tntType="+num;

	open_win(url,'',500,520);
    }



// xp ¼­ºñ½º ÆÑ 2 »ç¿ëÀÚ Ã¼Å©
/*
if(gbXp_Sp2Check && self.parent  == self && !bDialog ) {
    document.write ('	<DIV align="left" valign="center" id="xp_sp2_activex" style="z-index:10;display:none;position:absolute;width:100%;">');
    document.write ('		<table width=100 border=0 border=0><tr><td align=center>');
    document.write ('   	<img src="http://image.infomail.co.kr/www/sp2_01.gif" usemap="#axtive">');
    document.write ('		</td></tr></table> ');
    document.write ('	<map name="axtive">'); 
    document.write ('  <area shape="rect" coords="321,130,434,167" href="javascript:url_OpenerRootWin(\'http://www.infomail.co.kr/common/asp/xpsp2_active_help.asp\');">');
    document.write ('  <area shape="rect" coords="298,77,419,119" href="http://down.ontang.com/activex/setupCab.exe" onFocus="this.blur()">');
    document.write ('  <area shape="rect" coords="393,12,434,27" onclick="javascript:xp_sp2_activex.style.display=\'none\';"></map>');
    document.write ('	</DIV>');
    document.write ('	<DIV  align="left" valign="center" id="xp_sp2_popup" style="z-index:10;display:none;position:absolute;width:100%;">');
    document.write ('		<table width=100 border=0 border=0><tr><td align=center>');
    document.write ('   	<img src="http://image.infomail.co.kr/www/sp2_02.gif" usemap="#popup">');
    document.write ('		</td></tr></table> ');
    document.write ('	<map name="popup">');
    document.write ('  <area shape="rect" coords="321,130,434,167" href="javascript:url_OpenerRootWin(\'http://www.infomail.co.kr/common/asp/xpsp2_popup_help.asp\');">');
    document.write ('  <area shape="rect" coords="393,12,434,27" onclick="javascript:xp_sp2_popup.style.display=\'none\';"></map>');
    document.write ('	</DIV>');
} else {//µðÀÚÀÎ Àû¿ëÇÏÁö ¸¶¼¼¿ä.
    document.write ('	<DIV align="left" id="xp_sp2_activex" style="z-index:0;display:none;position:absolute;width:0;height:0;top:0">');
    document.write ('	</DIV>');
    document.write ('	<DIV align="center" id="xp_sp2_popup" style="z-index:0;display:none;position:absolute;width:0;height:0;top:0">');
    document.write ('	</DIV>');
}
*/

//¿¢Æ¼ºê ¼³Ä¡ µµ¿ò¸» Ãâ·Â
/*
function ActiveLoadCheckDiv(){
    if(!bDialog){
	if('undefined' == typeof(window.dialogHeight)){

	    if( gbXp_Sp2Check && objSCWeb_chk == "NotLoad"){
		document.getElementById('xp_sp2_activex').style.display = "block";
	    }
	}
    }
}
*/
//XP ¼­ºñ½ºÆÑ »ç¿ëÀÚ ÀÌ¸é¼­. Active X ¸¦ ¼­Ä¡ ÇÏÁö ¾ÊÀº »ç¿ëÀÚ¿¡°Ô ¾È³» ÆÐÀÌÁö¸¦ Div·Î Ãâ·ÂÇÑ´Ù.
//if (gbXp_Sp2Check) ADD_WIN_ONLOAD('checkPlugin();');

/*
function xpsp2_popup_check(){
    //	xp_sp2_activex.style.display="none";
    xp_sp2_activex.style.top = 180;
    xp_sp2_popup.style.display="inline";
    location.href="#top"
}
*/

/*
function checkPlugin()
{
    //				alert(typeof(document.getElementById('xp_sp2_activex').style));

    if (!bLogin) return;
//       xp_sp2_popup.style.display="none";
//       xp_sp2_activex.style.display="inline";

    if(navigator.appName == 'Netscape')
    {
	if(document.ONTANG_AX == null )
	    alert('ÀÎÆ÷¸ÞÀÏ¿¡¼­ Áö¿øÇÏÁö ¾Ê´Â À¥ ºê¶ó¿ìÀú ÀÔ´Ï´Ù.');
	//alert(document.ONTANG_AX);
	//alert(" ÀÚµ¿À¸·Î ÇÃ·¯±×ÀÎ ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù. \n\n ÆäÀÌÁö»óÀÇ Á¶Ä¡ÀýÂ÷¿¡ µû¶ó ¼³Ä¡ÇÏ¼¼¿ä."); 
    } else {
	if(typeof(document.ONTANG_AX) != 'undefind'){
	    if(document.ONTANG_AX.object == null ){
		if(typeof(document.all.xp_sp2_popup.style) == "object") document.getElementById('xp_sp2_popup').style.display="none";
		if(typeof(document.all.xp_sp2_activex) == "object") document.getElementById('xp_sp2_activex').style.display="inline"; 
		//				xp_sp2_activex.style.display="inline";
		location.href="#top"
		    //alert(" ÀÚµ¿À¸·Î ÇÃ·¯±×ÀÎ ÇÁ·Î±×·¥ÀÌ ¼³Ä¡µÇÁö ¾Ê¾Ò½À´Ï´Ù. \n\n ÆäÀÌÁö»óÀÇ Á¶Ä¡ÀýÂ÷¿¡ µû¶ó ¼³Ä¡ÇÏ¼¼¿ä.");
	    } 
	}
	if(typeof(document.mbox) != 'undefined') {
	    if (document.mbox.object == null ){
		document.getElementById('xp_sp2_popup').style.display="none";
		document.getElementById('xp_sp2_activex').style.display="inline"; 
		//				xp_sp2_popup.style.display="none";
		//				xp_sp2_activex.style.display="inline";
	    }
	}
    }
}
*/

var get_tooltip_flg = false;
function get_tooltip() {
    if (!get_tooltip_flg) return;
    var boxWidth = 64,boxHeight=20;
    var boxWidth = (divToolTip.offsetWidth) + 6;
    //if(login_userid == 'sinachuri') alert(boxWidth)
    var xMax = parseInt(document.body.clientWidth) - boxWidth;
    event.clientX >= xMax ? xPos = xMax : xPos =  event.clientX;
    //alert((event.clientX - xMax) / boxWidth)

    if(((event.clientX - xMax) / boxWidth) > 0.3)
	tblToolTip.rows[2].cells[1].align = 'center';
    else
	tblToolTip.rows[2].cells[1].align = 'left';

    //xPos =  event.clientX;
    yPos =  event.clientY;
    var x = xPos + document.body.scrollLeft;
    var y = yPos + document.body.scrollTop;	

    divToolTip.style.left = x + 5;
    divToolTip.style.top = y - 30;

}

function showToolTip(str) {
    if(typeof(divToolTip) != 'object') return;

    var strToolTip = '<table id=tblToolTip border="0" cellspacing="0" cellpadding="0">'
	+ '  <tr> '
	+ '    <td height="3" width="3"><img src="http://image.infomail.co.kr/bz/alt_box01.gif" width="3" height="3"></td>'
	+ '    <td background="http://image.infomail.co.kr/bz/alt_box05.gif" height="3"></td>'
	+ '    <td height="3" width="3"><img src="http://image.infomail.co.kr/bz/alt_box02.gif" width="3" height="3"></td>'
	+ '  </tr>'
	+ '  <tr bgcolor=#ffffff>'
	+ '    <td background="http://image.infomail.co.kr/bz/alt_box06.gif" width="3"></td>'
	+ '    <td class=basic2 valign="bottom" style="padding:2 3 0 3"><nobr>'+ str +'</nobr></td>'
	+ '    <td background="http://image.infomail.co.kr/bz/alt_box07.gif" width="3"></td>'
	+ '  </tr>'
	+ '  <tr> '
	+ '    <td width="3" height="8"><img src="http://image.infomail.co.kr/bz/alt_box03.gif" width="3" height="8"></td>'
	+ '    <td background="http://image.infomail.co.kr/bz/alt_box08.gif" style="padding:0 2 0 2"><img src="http://image.infomail.co.kr/bz/alt_box09.gif" width="5" height="8"></td>'
	+ '    <td width="3" height="8"><img src="http://image.infomail.co.kr/bz/alt_box04.gif" width="3" height="8"></td>'
	+ '  </tr>'
	+ '</table>';

    divToolTip.innerHTML = strToolTip;
    get_tooltip_flg = true;
    get_tooltip();
    document.onmousemove = get_tooltip;
    divToolTip.style.display = "inline";
}

function hideToolTip() {
    get_tooltip_flg = false;
    document.onmousemove = "";
    divToolTip.style.display = "none";
    //spnToolTipStr.innerText = '';
}

document.write ('<div id="divToolTip" style="display:none;position:absolute;width:0;height:0;top:0;"></div>');


//µå¸²À§¹ö ÀÌ¹ÌÁö °ü·Ã ÇÔ¼ö ÀÚµ¿ »ý¼º °ø¿ë

function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
    var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v3.0
    var i,p,v,obj,args=MM_showHideLayers.arguments;
    for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
	if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
	obj.visibility=v; }
}

//ÂÊÁö ¼­¹ö Áß´ÜÀ¸·Î ÀÎÇÑ ÇÔ¼ö È£Ãâ Áß´Ü...2005-08-23
//ADD_WIN_ONLOAD("ActiveLoadCheckDiv();");

function noGathereMail()
{
  noGatherMailWin = window.open('/policy/nogather_email.php','noGathereMail','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,copyhistory=0,width=300,height=350,top=20,left=20');
  noGatherMailWin.focus();
}
