function getCookie(name) {
	var Found = false
	var start, end
	var i = 0
	while(i <= document.cookie.length) {
		start = i
		end = start + name.length
		if(document.cookie.substring(start, end) == name) {
			Found = true
			break
    }
      i++
		}

		if(Found == true) {
			start = end + 1
			end = document.cookie.indexOf(";", start)
			if(end < start)
				end = document.cookie.length
				return document.cookie.substring(start, end)
			}
				return ""
}



function openMsgBox(setCookie,Url,POP_name,POP_width,POP_height){
	var eventCookie=getCookie(setCookie);
	if (eventCookie != "no"){
		Show(Url,POP_name,POP_width,POP_height);
	}
}


function Show(Url,POP_name,POP_width,POP_height) { 
	window.open(Url,POP_name,'width='+POP_width+',height='+POP_height);
} 

function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function close_Pop_up(Cookie_name,Cookie_date){ 
	if (document.Message_win.check_visible.checked)
	{
		setCookie(Cookie_name, "no" , Cookie_date); // 1ÀÏ °£ ÄíÅ°Àû¿ë 
	}
		self.close();
}