// JavaScript Document

//--ÄíÅ° ²¨³»±â
function getCookie( name ) {
    var start = document.cookie.indexOf( name + "=" );
    var len = start + name.length + 1;
    if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
        return null;
    }
    if ( start == -1 ) return null;
    var end = document.cookie.indexOf( ';', len );
    if ( end == -1 ) end = document.cookie.length;
    return unescape( document.cookie.substring( len, end ) );
}
//-->

//--ÄíÅ° ±Á±â
function setCookie( name, value, expires, path, domain, secure ) {
    var today = new Date();
    today.setTime( today.getTime() );
    if ( expires ) {
        expires = expires * 1000 * 60 * 60 * 24;
    }
    var expires_date = new Date( today.getTime() + (expires) );
    document.cookie = name+'='+escape( value ) +
        ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + //expires.toGMTString()
        ( ( path ) ? ';path=' + path : '' ) +
        ( ( domain ) ? ';domain=' + domain : '' ) +
        ( ( secure ) ? ';secure' : '' );
}
//-->

//--ÄíÅ° Áö¿ì±â
function deleteCookie( cookieName ) {
	var expireDate = new Date();
 
	//¾îÁ¦ ³¯Â¥¸¦ ÄíÅ° ¼Ò¸ê ³¯Â¥·Î ¼³Á¤ÇÑ´Ù.
	expireDate.setDate( expireDate.getDate() - 1 );
	document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() + "; path=/";
}
//-->

//--³¯Â¥ °¡Á®¿À±â
function getToday()
{
    var today = new Date();
	var month = today.getMonth()+1;
	var date = today.getDate();
   return month + "-" + date;
}
//-->


function mkChat(myid)
{
	if (myid == '')
	{
		alert('·Î±×ÀÎÇØ ÁÖ¼¼¿ä.      ');
		return false;
	}
	var xcurl = 'http://ifboy.com/_NEW/_skin/body/chatting/chatting/chatmake.php?xsite=ifguy&callid='+myid;
	window.open(xcurl,'','left=0,top=0,width=435,height=210,scrollbars=no,status=yes');
}

function ageChange(id)
{
	window.open('http://ifboy.com/_NEW/_system/module/chat/query/age2.php?mid='+id,'KimsonChatA2','left=0,top=0,width=435,height=210,scrollbars=no,status=yes');
}

/*//-- ÆÁ
window.addEvent('domready', function(){
	 Tips 1 
	var Tips1 = new Tips($$('.Tips1'));
	 
	/* Tips 2 
	var Tips2 = new Tips($$('.Tips2'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
	 
	/* Tips 3 
	var Tips3 = new Tips($$('.Tips3'), {
		showDelay: 400,
		hideDelay: 400,
		fixed: true
	});
	 
	/* Tips 4 
	var Tips4 = new Tips($$('.Tips4'), {
		className: 'custom'
	});
}); 
//-->*/

//-- ¼¿·ºÆ®¹Ú½º ÀÌ¹ÌÁö ±¸Çö


/* µ¥ÀÌÆÃ À¯·á°¡ÀÔ */
function confirm_check(msg,link,target,win)
{
	if(!confirm('\n'+msg+'\n')) {return false;}
	if (target)
	{
		if (win)
		{
			window.open(link,target,win);
		}
		else {
			window.open(link);
		}
	}
	else {
		location.href = link;
	}
}

