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_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; }
}

function betweenDate() {
 	division = "-";
	use_timefilter = 'Y';
	startDate ='2010-02-16';
	start_time ='01';
	endDate ='2010-02-17';
	end_time ='04';
	var now = new Date ();
	time = now.getHours();

	if ( division != null ) {
		var reg = new RegExp ( division, "g" );
		startDate = startDate.replace ( reg, "" );
		startDate = startDate + "" + start_time; //+
		endDate = endDate.replace ( reg, "" );
		endDate = endDate + "" + end_time; //+
	}

	var now = new Date ();
	var strYear = now.getYear ();
	var strMonth = now.getMonth() + 1;
	if ( strMonth < 10 ) strMonth = "0" + strMonth;

	var strDay = now.getDate ();
	if ( strDay < 10 ) strDay = "0" + strDay;

	var strDate = strYear + "" + strMonth + "" + strDay + "" + time;
 
	if ( startDate > strDate || strDate > endDate ) return false;
// 	alert(use_timefilter=='Y' && (strDate <= strDate) && (endDate >= strDate));
	if ( use_timefilter=='Y' && (startDate <= strDate) && (endDate >= strDate)  )
//  	if ( use_timefilter=='Y' ) // +
	{
		return true;
	} else{
		return false;
	}

}


function just_go(a){
	if (betweenDate ()) {
		alert("ÇöÀç ¼­ºñ½º Á¡°ËÁßÀÔ´Ï´Ù");
	} else {
		location.href=a;
	}
}

/*
function openpop(a){
	window.open ('/member/contingency_ok.aspx','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=290');
}
*/
/*
function openpop(a){

	window.open ('/bbs/pop_login.aspx','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=0,resizable=no,copyhistory=no,width=400,height=290');
}
*/
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 FCopenpop()
{
  if(getCookie( "chk_close" ) != "done") 
  {

    window.open('http://www.homeplusstory.com/FcCheck/popupifame.html','FCCheck','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=395,height=300');
  }

}
//ÆË¾÷¶ç¿ì±â
function openPop(url,idn,intWidth,intHeight,scroll) { 
	//alert("pop_scroll");
	window.open(url, idn,"width="+intWidth+", height="+intHeight+",resizable=0,scrollbars="+scroll) ;
}
function policy() {
	window.open ('http://www.homeplusstory.com/bbs/policy_100419.html','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=575,height=550');
}

function yakkwan() {
	window.open ('https://sso.homeplus.co.kr/register/join_iframe_03.html','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=555,height=550');
}

//»õÃ¢¶ç¿ì±â
function eventPop(url){
	window.open(url, "eventPop");
}

/*½Ã½ºÅÛÁ¡°Ë¶§
function openpop(a){
	alert("ÇöÀç ½Ã½ºÅÛ Á¡°ËÁßÀÔ´Ï´Ù.");
}
*/


function openpop(a){
	if (betweenDate()) {
		window.open ('/bbs/pop_login.aspx','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=0,resizable=no,copyhistory=no,width=400,height=290');
	} else {
		//window.open ('https://sso.homeplus.co.kr/login/login.jsp?ReturnURL='+a+'/member/ssologin_ok.aspx&access_system=APP05','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,resize=no,width=410,height=300');
		window.open ('/member/contingency_ok.aspx','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=290');
		//window.open ('/bbs/pop_login.aspx','Login','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=0,resizable=no,copyhistory=no,width=400,height=290');

	}
}

function openpoll() {
	window.open('/bbs/pop_poll/pop_poll_write.aspx','pollpop','status=no,resize=no');
}

	/* Topvi ³ôÀÌ°è»ê*/
	function changeDiv(chPos,fileName, size){
		//alert(chPos+fileName+size);
		var conSize= (size=="100%") ? "100%" : size+"px";
		var getEI; // ¿¤¸®¸ÕÆ® ³×ÀÓ

		switch(fileName){
			case"LeftNavigation":{getEI="secNavi";break;}
			default : break;
		}
		if(chPos=="w"){
			document.getElementById(getEI).style.width=conSize;
		} else{
			document.getElementById(getEI).style.height=conSize;
		}
	}
