//document.domain = 'pdpop.com';
function notice_closeWin(abc) 
{ 
   notice_setCookie( abc, "done" , 1); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½
   parent.close(); 
}

function notice_setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + "; domain=" + ".pdpop.com";
}

function notice_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 notice_closeLayer(abc,layer1,layer2,val) 
{ 
   notice_setCookie( abc, "done" , val); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½
   Layer_(layer1,layer2,'hidden','none');
}

function Layer_(layer1,layer2, style1,style2) {
  document.getElementById(layer1).style.visibility = style1;
  document.getElementById(layer1).style.display = style2;
  document.getElementById(layer2).style.visibility = style1;
  document.getElementById(layer2).style.display = style2;
}

function L_cls(url)
{
	
	opener.location.href = url;
	self.close();
}

function notice_closeDiv(abc, val) 
{ 
   notice_setCookie( abc, "done" , 1); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½
   document.getElementById(val).style.display = "none";
}

function winResize() 
{ 
var Dwidth = parseInt(document.body.scrollWidth); 
var Dheight = parseInt(document.body.scrollHeight); 
var divEl = document.createElement("div"); 
divEl.style.position = "absolute"; 

divEl.style.width = "100%"; 
divEl.style.height = "100%"; 

document.body.appendChild(divEl); 

window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight); 
document.body.removeChild(divEl); 
} 

function pop_Login(url, uid)
{
	if(uid != '')
	{
		location.href = url;
	} else{
		if((decodeURIComponent(url.indexOf("view")) > -1) && (decodeURIComponent(url.indexOf("mode")) > -1)){
			var width = 375;
			var height = 275;

			var left = (window.screen.width - width)/2;
			var top = (window.screen.height - height)/2;

			var oWin = window.open('http://member.pdpop.com/login/pop_login.html?url='+url, 'p_login', 'scrollbars=no,resizable=no,width='+width+',height='+height+',top='+top+',left='+left);
			oWin.focus();
		}else if((decodeURIComponent(url.indexOf("F_06_11")) > -1)){  //ÁÖ½º¹ÂÁ÷°ü·Ã Ãß°¡(2011-08-10)
			var width = 375;
			var height = 275;

			var left = (window.screen.width - width)/2;
			var top = (window.screen.height - height)/2;

			var oWin = window.open('http://member.pdpop.com/login/pop_login.html?url='+url+'&szType=joos', 'p_login', 'scrollbars=no,resizable=no,width='+width+',height='+height+',top='+top+',left='+left);
			oWin.focus();
		}else{
			if(decodeURIComponent(url.indexOf("mypage")) == -1 && decodeURIComponent(url.indexOf("type=my")) == -1 ){
				alert("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ÆäÀÌÁöÀÔ´Ï´Ù.");
			}
		}
	}
}
