function getObject(objectId) { 
// checkW3C DOM, then MSIE 4, then NN 4. 
// 
if(document.getElementById && document.getElementById(objectId)) { 
return document.getElementById(objectId); 
} 
else if (document.all && document.all(objectId)) { 
return document.all(objectId); 
} 
else if (document.layers && document.layers[objectId]) { 
return document.layers[objectId]; 
} else { 
return false; 
} 
} 

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_setCookie( name, value, expiredays ){
        var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function WM_Pop(a,b,c,d,e){
	var url= "./popup.html?idx="+a;
	var win_name = a;

	if ( notice_getCookie( a ) != "done" ){
		if ( d == "blank"){
		OpenWin = window.open( url ,win_name,"left=0, top=0,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,width=5,height=5,top=" + b +",left=" + c +";"); 
		}else{
			getObject(e).style.visibility = "visible";
		}
	}else{
		if ( d == "blank"){
			
		}else{
			getObject(e).style.visibility = "hidden";
		}
	}
}

function notice_closeWin(a, b) { 
        notice_setCookie( a, "done" , 1); // 1=ÇÏ·íµ¿¾È °øÁöÃ¢ ¿­Áö ¾ÊÀ½
        getObject(b).style.visibility = "hidden";
}

function notice_closeWin2(a) { 
		getObject(a).style.visibility = "hidden";
}