function MM_showHideLayers() { //v2.0
	var i, visStr, args, theObj;
	args = MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
		visStr   = args[i+2];
		if (navigator.appName == 'Netscape' && document.layers != null) {
			theObj = eval(args[i]);
			if (theObj) theObj.visibility = visStr;
		} else if (document.all != null) { //IE
			if (visStr == 'show') visStr = 'visible';  //convert vals
			if (visStr == 'hide') visStr = 'hidden';
			theObj = eval(args[i+1]);
			if (theObj) theObj.style.visibility = visStr;
		}
	}
}

function MenuDropOn(DropID){
	DropID.style.visibility = 'visible';
}

function MenuDropOff(DropID){
	DropID.style.visibility = 'hidden';
}

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 openwindow(name, url, width, height, scrollbar, resizable, status) {
	scrollbar_str = scrollbar ? 'yes' : 'no';
	resizable_str = resizable ? 'yes' : 'no';
	status_str = status ? 'yes' : 'no';

	window.open(url, name, 'width='+width+',height='+height+',scrollbars='+scrollbar_str+',resizable='+resizable_str+',status='+status_str+',copyhistory=yes');
}

//»õ·Î¿î¸ð´ÞÃ¢ ¿­±â..
function openModalWindow(url, width, height, scrollbar, status, help){
	scrollbar_str = scrollbar ? 'yes' : 'no';
	status_str = status ? 'yes' : 'no';
	help_str = help ? 'yes' : 'no';
	window.showModalDialog(url, window, 'dialogWidth='+width+'px; dialogHeight='+height+'px; scroll='+scrollbar_str+'; status='+status_str+'; help='+help_str+';');
}

//È¸¿ø ÇÁ·ÎÇÊ(ºí·ÎÇÇ) º¸±â..
function viewBlopy(userid, type){
	var homeurl = '';
	switch(type){
		case 'album':
			homeurl = 'http://www.neoever.com/blopy/?menu=05&nolog=1&uid=' + userid;
			break;
		case 'guestbook':
			homeurl = 'http://www.neoever.com/blopy/?menu=07&nolog=1&uid=' + userid;
			break;
		case 'nugunugu':
			homeurl = 'http://www.neoever.com/member/?menu=08&uid=' + userid;
			break;
		case 'point':
			homeurl = 'http://www.neoever.com/blopy/?menu=02&uid=' + userid;
			break;
		case 'board':
			homeurl = 'http://www.neoever.com/blopy/?menu=06&uid=' + userid;
			break;	
		default:
			homeurl = 'http://www.neoever.com/blopy/?uid=' + userid;
			break;
	}

	if('undefined' != typeof( top.frames['multi'] )){
		top.frames['multi'].viewBlopy( userid, homeurl );
	}
	else{
		memberService();
	}
}

//È¸¿ø ÇÁ·ÎÇÊ(ºí·ÎÇÇ) º¸±â..
/*function viewBlopy(userid, type){
	var homeurl = '';
	switch(type){
		case 'album':
			homeurl = 'http://www.neoever.com/member/myhome/myhome.nni?pos=album&nolog=1&uid=' + userid;
			break;
		case 'guestbook':
			homeurl = 'http://www.neoever.com/member/myhome/myhome.nni?pos=guestbook&nolog=1&uid=' + userid;
			break;
		case 'nugunugu':
			homeurl = 'http://www.neoever.com/member/myhome/myhome.nni?pos=visitor&uid=' + userid;
			break;
		case 'point':
			homeurl = 'http://www.neoever.com/member/myhome/myhome.nni?pos=point&uid=' + userid;
			break;
		default:
			homeurl = 'http://www.neoever.com/member/myhome/myhome.nni?uid=' + userid;
			break;
	}

	if('undefined' != typeof( top.frames['multi'] )){
		top.frames['multi'].viewBlopy( userid, homeurl );
	}
	else{
		openwindow(userid, homeurl,  670, 510, 0, 0, 0);
	}
}*/

//ÂÊÁö Àü¼Û ÆûÀ» ¿ÀÇÂ..
function viewMsgForm(to){
	if( 'undefined' != typeof(top.frames['multi']) ){
		top.frames['multi'].sendMsgForm(to);
	}
	else{
		memberService();
	}
}

//³ª¸¸ÀÇ µ¿¿µ»ó º¸±â..
function viewMyMovie(userid, dif){
	if('undefined' != typeof( top.frames['multi'] )){
		top.frames['multi'].viewMyMovie(userid, dif);
	}
	else{
		openwindow('MYM' + userid, 'http://www.neoever.com/member/mymovie/mm_player.neo?tuserid=' + userid + '&dif=' + dif, 400, 540, 1, 1, 0);
	}
}

// °áÁ¦È­¸éÀ» º¸¿©ÁÜ..
function viewPayForm(){
	//openwindow('content', 'http://www.neoever.com/payment/bmpayment/service_set.neo', 400, 580, 0, 0, 0);
	document.location.href = 'http://www.neoever.com/payment/new/new_main.neo';
}

//Á¤È¸¿ø ¼­ºñ½º ¾È³»..
function gMemberService(){
	//if( 'undefined' != typeof(_TEST) ){
		if (document.all != null) { //IE
			window.showModalDialog('http://www.neoever.com/global/help/alert.neo?mcode=1', window, 'dialogWidth=410px; dialogHeight=260px; scroll=no; status=no; help=no;');
			//viewPayForm();
			//return;
		}
	//}
	//alert('¼±ÅÃÇÏ½Å ¸Þ´º´Â Á¤È¸¿ø¸¸ÀÌ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\n\nÁ¤È¸¿øÀ¸·Î °¡ÀÔÇÏ½Ã¸é ³×¿À¿¡¹ö°¡ Á¦°øÇÏ´Â ¸ðµç ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');
	viewPayForm();
}

//1:1 Ã¤ÆÃÈ­¸éÀ» ¿ÀÇÂ
function mtmSend(to){
	if('undefined' != typeof(top.frames['multi'])){
		top.frames['multi'].sendMtmMsgForm(to);
	}
	else{
		memberService();
	}
}

//Ä£±¸Ãß°¡..
function viewAddFriend(tid){
	openwindow('myfriend' + tid, 'http://www.neoever.com/member/myfriends/myfriends_add.neo?mode=modFriendWin&friendid=' + tid, 350, 260, 0,0,0);
}

//»èÁ¦ ¼±ÅÃ..
var onChecked = false;
function allcheck(){
	frm = document.del_form;
	if (onChecked == false)
		onChecked = true;
	else
		onChecked = false;

	for(var i=0; i < frm.elements.length ; i++)
		if(frm.elements[i].type == 'checkbox')
			frm.elements[i].checked = onChecked;
}

function check_del(){
	if(confirm('¼±ÅÃÇÑ ¸ñ·ÏÀ» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?' ))
	{
		document.del_form.submit();
	}
}

//µµ¿ò¸»(³×¿À¹Ì) ÆäÀÌÁö ¿ÀÇÂ
function viewNeome(mcode){
	openwindow('neome','http://www.neoever.com/global/help/help_msg.neo?mcode=' + mcode, 430, 20, 0,0,0);
}

//¸ð´ÞÃ¢À¸·Î ¸Þ¼¼Áö¸¦ º¸¿©ÁÜ..
function viewAlert(msg){
	window.showModalDialog('http://www.neoever.com/global/help/alert.neo?msg=' + msg, window, 'dialogWidth=407px; dialogHeight=210px; scroll=no; status=no; help=no;');
}

function viewNewAlert(title,msg){   
	window.showModalDialog('http://www.neoever.com/global/help/alert.neo?msg=' + msg + '&title=' + title, window, 'dialogWidth=407px; dialogHeight=237px; scroll=no; status=no; help=no;');
}

//ÁöÁ¤µÈ ÄÚµå·Î ¸Þ¼¼Áö¸¦ º¸¿©ÁÜ..
function viewAlertCode(mc){
	window.showModalDialog('http://www.neoever.com/global/help/alert.neo?mcode=' + mc, window, 'dialogWidth=410px; dialogHeight=260px; scroll=no; status=no; help=no;');
}

//°ÔÀÓ ¼­ºñ½º..
/*function startGame(view){
	
	if('undefined' != typeof(top.frames['multi']) && 'undefined' != typeof(top.frames['multi'].geogame) ){
		top.frames['multi'].startGame(view);
	}
	else{
		viewAlert('³×¿À¿¡¹ö¿¡ Àç·Î±×ÀÎ ÇÏ½Å ÀÌÈÄ¿¡ °ÔÀÓ ¼­ºñ½º ÀÌ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù..^^');
	}
}*/

var geogame = null;

function startGame(view){
	if(geogame == null || geogame.closed ){
		geogame=window.open('http://www.neoever.com/service/game/_index.neo?view='+view,'geogame','toolbar=no,resizable=no,scrollbars=yes,status=no,width=817,height=600');
	}
	else{
		alert('ÇöÀç °ÔÀÓÃ¢ÀÌ ¿ÀÇÂµÇ¾î ÀÖ½À´Ï´Ù.^^');
		geogame.focus();
	}
}

//ÆùÆÃ ¼­ºñ½º..
function viewPhoneTing(tid){
	/*
	pt = window.open('http://www.neoever.com/service/phonedate/?targetid=' + tid, 'phoneting', 'width=600,height=368,scrollbars=no,resizable=no,status=no,copyhistory=yes');
	pt.focus();
	*/
}

//¸ð¹ÙÀÏ Æ÷Åä
function goMobilePhoto(tid){
	document.location.href = 'http://www.neoever.com/service/mobilephoto/mobilephoto.neo?rev_id=' + tid;
}

function getCookie(Name)
{
	var search = Name + "=";
	if ( document.cookie.length > 0 ) { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
		offset = document.cookie.indexOf(search);
		if ( offset != -1 ) { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
			offset += search.length
			// set index of beginning of value
			end = document.cookie.indexOf(";", offset);
			// ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
			if (end == -1) end = document.cookie.length;
			return unescape(document.cookie.substring(offset, end));
		}
	}
}

function zzim(mate)
{
	if( 'undefined' != typeof(top.frames['multi']) ){
		if( 'undefined' != typeof(document.frames['procFrame']) ){
			document.frames['procFrame'].location.href = '/love/zzim.neo?mate=' + mate;
		}
		else{
			viewAlert('procFrame ÀÌ Á¸Àç ÇÏÁö ¾Ê½À´Ï´Ù');
		}
	}
	else{
		memberService();
	}
}

function loveprofile(ids)
{	
	if( 'undefined' != typeof(top.frames['multi']) ){
		top.frames['multi'].loveprofile(ids);
	}
	else{
		memberService();
	}
}

function voteRecom(tid)
{
	if( 'undefined' != typeof(document.frames['procFrame']) ){
		document.frames['procFrame'].location.href = '/love/recom.neo?tid=' + tid;
	}
	else{
		alert('procFrame ÀÌ Á¸Àç ÇÏÁö ¾Ê½À´Ï´Ù');
	}
}

function myBlopy(userid){
    parent.location.href='/blopy/?uid='+ userid;	
}