document.domain = 'ipop.co.kr';

//-- airplanz hide status S
document.write('<script language=javascript src=http://www.ipop.co.kr/script/hidestatus.js></script>');
//-- airplanz hide status E

/*
function GoMyNoriter(id,mode,itype,thisWin)
{
	if( id=='' && mode=='jukebox')
	{
		Login();
		return;
	}	
	if( itype == "undefined" )
		itype = 1;
	if( mode == "undefined" )
		mode = "";
	
	var url;
	if( id == 'ipoptheme' )
	{
		url='http://noriter.ipop.co.kr/mynoriter/event/index.html?strOwnerName='+id+'&mode='+mode+'&itype='+itype+'';
	}
	else
	{
		url='http://noriter.ipop.co.kr/mynoriter/index.html?strOwnerName='+id+'&mode='+mode+'&itype='+itype+'';
	}

	if(thisWin == 1)
	{
//		var src="http://noriter.ipop.co.kr/mynoriter/callmynoriter2.html?ownername="+id+"&mode="+mode+"&itype="+itype+"";
		window.open(url,"myNoriter","width=1000 height=645 scrollbars=no menubar=no resizable=yes");
		self.close();
	}
	else
	{
		
//		var src="http://noriter.ipop.co.kr/mynoriter/callmynoriter2.html?ownername="+id+"&mode="+mode+"&itype="+itype+"";
		if( id == "ipoptheme" )
			window.open(url,"herNoriter","width=1000 height=645 scrollbars=no menubar=no resizable=yes");
		else
			window.open(url,"myNoriter","width=1000 height=645 scrollbars=no menubar=no resizable=yes");
	}
}
*/

function Login()
{
    var url = document.URL;
    url = escape(url);
    var baseUrl = 'http://private.ipop.co.kr/cgi-bin/login.cgi?returl=' + url;
	top.document.location.replace(baseUrl);
//    baseUrl = escape(baseUrl)
//    top.document.location.href='http://c.ipop.co.kr/popcgi/framemaintop.cgi?url='+baseUrl;
}

function Login_Top() 
{       
    var url = top.parent.document.URL;
    url = escape(url);
    var baseUrl = 'http://private.ipop.co.kr/cgi-bin/login.cgi?returl=' + url;
    baseUrl = escape(baseUrl)
    document.location.href='http://c.ipop.co.kr/popcgi/framemaintop.cgi?url='+baseUrl;
}       

function LogOut_Top()
{
	RealLogOut_Top();
}

function RealLogOut_Top()
{
    var returl=top.document.URL;
    returl=escape( returl );
    var url='http://c.ipop.co.kr/popcgi/logout.cgi?returl='+returl;
    top.document.location.replace( url );
}
function LogOut()
{
	RealLogOut();
//   window.open("http://www.ipop.co.kr/popup/logout.html","LogOutAlert","toolbar=no, status=0, scrollbars=0, resizable=no, width=250, height=240")
}
function RealLogOut()
{
    var returl=document.URL;
    returl=escape( returl );
    var url='http://c.ipop.co.kr/popcgi/logout.cgi?returl='+returl;
    top.document.location.replace( url );
}

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 fcGoAccount()
{
    var url;
    if( getCookie( "chargeagree" ) != "hide" )
    {
        url = 'http://pay.ipop.co.kr/cgi-bin/agreement.cgi';
    }
    else
    {
        url = 'http://pay.ipop.co.kr/cgi-bin/agreement.cgi';
    }

    window.open( url,'Charge','toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,width=510,height=560,resizable=no' );
} 

function fcGoPolicy()
{
    var url = 'http://www.ipop.co.kr/folder/fcPolicy.html';
    document.location.href = url;
}

function fcGoService()
{
    var url = 'http://www.ipop.co.kr/folder/fcFunction.html';
    document.location.href = url;
}

function fcGoMode()
{
    var url = 'http://fc.ipop.co.kr/popcgi/fd_setmode.cgi';
    document.location.href = url;
}

function fcGoBizFee()
{
    var url = 'http://www.ipop.co.kr/popmoney/charge.html';
    document.location.href = url;
}

function fcGoSboxFee()
{
    var url = 'http://www.ipop.co.kr/popmoney/charge.html#sbox';
    document.location.href = url;
}

function fcGoCinFee()
{
    var url = 'http://www.ipop.co.kr/popmoney/charge.html#cinema';
    document.location.href = url;
}

function fcGoV3Fee()
{
    var url = 'http://www.ipop.co.kr/popmoney/charge.html#myv3';
    document.location.href = url;
}
function fcGoChange()
{
    //var url = 'http://pay.ipop.co.kr/cgi-bin/famount/famount_chg1.cgi';
    //var url = 'http://pay.ipop.co.kr/cgi-bin/famount/famount_chg0.cgi';
    var url = 'http://pay.ipop.co.kr/cgi-bin/packet/packetFrame.cgi';
    window.open( url,'Charge','toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,width=620,height=800,resizable=no' );
}

function fcGoFixEnd()
{
    var url = 'http://pay.ipop.co.kr/cgi-bin/famount/resv_stop1.cgi';
    var param = 'toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,width=630,height=600,resizable=no';
    window.open( url,'fixend', param);
}

function fcGoMain()
{
    var url = 'http://www.ipop.co.kr/folder/fcMain.html';
    document.location.href = url;
}

function fcGoCoupon()
{
    var url = 'http://www.ipop.co.kr/folder/fcCoupon.html';
    document.location.href = url;
}

function fcGoExp()
{
    var url = 'http://www.ipop.co.kr/folder/fcMain.html';
    document.location.href = url;
}

function fcGoFree()
{
    var url = 'http://www.ipop.co.kr/folder/fcMain.html';
    document.location.href = url;
}

function fcGoAmount()
{
    var url = 'http://www.ipop.co.kr/folder/fcAmount.html';
    document.location.href = url;
}
  

function fcGoFolder(mode)
{
    //var url = 'http://fc.ipop.co.kr/popcgi/fd_folder.cgi?process=setmode&popmode=' + mode;
    var url = 'http://fc.ipop.co.kr/popcgi/appRun.cgi?service=0&ftype=' + mode;
    top.DESKRUN.location.href = url;
}

function fcGoClub()
{
    //var url = 'http://fc.ipop.co.kr/popcgi/fd_folder.cgi?process=setmode&popmode=' + mode;
    var url = 'http://fc.ipop.co.kr/popcgi/appRun.cgi?service=0&ftype=2&ctype=2';
    top.DESKRUN.location.href = url;
}

function fcGoPhoto()
{
    var url = 'http://fc.ipop.co.kr/popcgi/appRun.cgi?service=0&ftype=-1&ctype=1';
    top.DESKRUN.location.href = url;
}

function fcGoCharge()
{
    //var url = 'http://pay.ipop.co.kr/cgi-bin/famount/famount_chg0.cgi';
    //var url = 'http://pay.ipop.co.kr/cgi-bin/charge_packet.cgi';
    var url = 'http://pay.ipop.co.kr/cgi-bin/packet/packetFrame.cgi';
    document.location.href = url;
}

function fcGoMCharge()
{
    var url = 'http://pay.ipop.co.kr/cgi-bin/famount/famount.cgi';
    window.open( url,'Charge','toolbar=no,scrollbars=no,directories=no,status=no,menubar=no,width=620,height=800,resizable=no' );
}

function goSboxYac()
{
    window.open('http://www.ipop.co.kr/yac/payyacframe.html','payyac','width=660,height=660,directories=no,menubar=no,scrollbar=yes')
}

function goBizYac()
{
    window.open('http://www.ipop.co.kr/yac/payyacframe.html','payyac','width=660,height=660,directories=no,menubar=no,scrollbar=yes')
}

function openGretechRecruit()
{
    window.open('http://www.ipop.co.kr/event/gretech_recruit.html','recruit','toolbar=no,width=496,height=500,top=0,left=0,resize=no,scrollbars=yes')
}

function openMoneyYac()
{
    window.open('http://www.ipop.co.kr/yac/moneyyacframe.html','moneyyac','width=660,height=660,directories=no,menubar=no,scrollbar=yes')
}

function openMoneyHelp()
{
    alert( 'ÁØºñÁßÀÔ´Ï´Ù.' );
    return; 
    window.open('http://www.ipop.co.kr/img/help/payhelp_swf/main.swf','payhelppop','toolbar=no,width=650,height=420,top=0,left=0,resize=no,scrollbars=no')
}

function openHelpMail()
{
    window.open('http://c.ipop.co.kr/popcgi/deskmailform.cgi','HelpMail','width=620,height=438,directories=no,scrollbars=no,menubar=no')
}

function openReportMail()
{
    window.open('http://c.ipop.co.kr/popcgi/reportmail.cgi','ReportMail','width=656,height=455,directories=no,scrollbars=yes,menubar=no')
}

function fcOpenCharge()
{
    fcGoAccount();
}


function zHelpCat(cat1_no, cat2_no, con_no) 
{
    document.location.href = 'http://c.ipop.co.kr/popcgi/pophelp/popHelpCat.cgi?cat1_no=' + cat1_no + '&cat2_no=' + cat2_no + '&con_no=' + con_no; 
}

/* younghun ( noriter 2.0 ) S */
// username : º¸·Á´Â »ç¶÷ 
// owner : ³ë¸®ÅÍ ÁÖÀÎ
// fid : family noriter ID, default 0
// uitype : 1 ~ 5 ÆË¾÷, 6~10 ÆäÀÌÁö, ¸ð¸£¸é 0
// mode : default 0, board 1, album 2, folder 3
// info : default 0, boardid, albumid
function OpenNoriter( username, owner, fid, uitype, mode, info )
{
	if ( uitype == 0 )
	{
		var url = 'http://noriter.ipop.co.kr/cgi-bin/noriteropen.cgi?owner='+owner+'&fid='+fid+'&mode='+mode+'&info='+info;
//		NORITEREXEC.location.replace(url);
//		document.write("<div id=hiddenlyr name=hiddenlyr style='display:none;width:0;height:0'><iframe height=0 width=0></iframe></div>" );
		var str = '<iframe name=NORITEROPENFRAME src='+url+' width=0 height=0></iframe>';
		document.all['hiddenlyr'].innerHTML=str;
	}
	else if ( uitype < 6 )
	{
		// popup
		OpenNoriterPopup( username, owner, fid, mode, info );
	}
	else
	{
		// page
		OpenNoriterPage( username, owner, fid, mode, info );
	}
}

function OpenNoriterCommon( username, owner, fid, uitype, mode, info )
{
	OpenNoriter( username, owner, fid, uitype, mode, info );
	//top.name = "_IPOP_";
}

var noriterpop;
var noriterpage;
function OpenNoriterPopup( username, owner, fid, mode, info )
{
	var url = 'http://noriter.ipop.co.kr/cgi-bin/noritermain.cgi?owner='+owner+'&fid='+fid+'&mode='+mode+'&info='+info;
	if ( username == owner )
		noriterpop = window.open( url, 'NoriterMyWin', 'width=980,height=600,toolbar=0,status=1,fullscreen=0,menubar=0,scrollbars=0,resizable=0');
	else
		noriterpop = window.open( url, 'NoriterPopupWin', 'width=980,height=600,toolbar=0,status=1,fullscreen=0,menubar=0,scrollbars=0,resizable=0');
}

function OpenNoriterPage( username, owner, fid, mode, info )
{
	SetNoriterCookie( owner, fid, mode, info );

	var url = 'http://noriter.ipop.co.kr/' + owner;
	if ( username == owner )
		noriterpage = window.open( url, 'NoriterMyWin');
	else
		noriterpage = window.open( url, 'NoriterPageWin');
}

function SetNoriterCookie( owner, fid, mode, info )
{
	document.cookie = "NoriterOpenOwner=" + owner + "; domain=ipop.co.kr; path=/;";
	document.cookie = "NoriterOpenFid=" + fid + "; domain=ipop.co.kr; path=/;";
	document.cookie = "NoriterOpenMode=" + mode + "; domain=ipop.co.kr; path=/;";
	document.cookie = "NoriterOpenInfo=" + info + "; domain=ipop.co.kr; path=/;";
}

function openNickMakeCommon()
{
    window.open("http://noriter.ipop.co.kr/cgi-bin/nickmake.cgi", "nickmake", "width=400, height=440, scrollbars=no, resizable=no");
}

function showOrgImage( mid, nid )
{
	var url = 'http://noriter.ipop.co.kr/cgi-bin/showOrgImage.cgi?mid='+mid+'&nid=' + nid;
	window.open(url, 'OrgImage', 'width=180,height=180,directories=no,scrollbars=yes,menubar=no');

}
function showOrgImageStr( midNnid )
{
	var url = 'http://noriter.ipop.co.kr/cgi-bin/showOrgImage.cgi?'+midNnid;
	window.open(url, 'OrgImage', 'width=180,height=180,directories=no,scrollbars=yes,menubar=no');

}

function runObj(obj)
{
	document.write(obj);
}

//document.write("<iframe name=NORITEREXEC src='http://noriter.ipop.co.kr/blank.html' frameborder=0 scrolling=no width=0 height=0></iframe>\n");
document.write("<div id=hiddenlyr name=hiddenlyr style='display:none;width:0;height:0'></div>" );
/* younghun ( noriter 2.0 ) E */

