<!--CMSÀÛ¾÷ ÆÄÀÏ -->
function popup() {          
	today = new Date();
	
	var year = today.getYear();
	var month=today.getMonth()+1;
	var day=today.getDate();
	var hour=today.getHours();
	var min=today.getMinutes();

	if ( month < 10 )	month = "0"+month;
	if ( day < 10 )		day = "0"+day;
	if ( hour < 10 )	hour = "0"+hour;
	if ( min < 10 )		min = "0"+min;

	var t_day = eval(year+''+month+day+hour+min);

	// ½ÃÀÛÀÏ ~ Á¾·áÀÏ
	if ( ( parseInt('201001220900',10) < parseInt(t_day,10) ) 
		&& ( parseInt(t_day, 10) < parseInt('201002121930', 10) )
		&& getCookie("svcstop_pop") != 'no' )  {
		window.open('/popup/main/svcstop_main2.html','','toolbar=no,status=yes,width=302,height=346,top=0,left=0,directories=no,scrollbars=auto,location=no,resizable=no,menubar=no');
	}
}

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 setPopupCookie( name, value, expiredays ) { 
	var todayDate = new Date(); 
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"; 
	alert("document.cookie="+document.cookie);
}

function closeWin(name) {
	if (document.all.check_day.checked){
		setPopupCookie(name, "no", 1);
		document.all.popWindow.style.visibility = "hidden";
	} else {
		document.all.popWindow.style.visibility = "hidden";
	}
}

function closeWindows() {
	document.all.popWindow.style.visibility = "hidden";
}
