function open_popup(num, left, top, width, height) {
	if(getCookie("popup_" + num) != "1") 
		window.open("/default/popup/open_popup.jsp?u_num=" + num,"popup_" + num,"left=" + left + "; top=" + top + "; width=" + width + "; height=" + height + "; toolbars=no");
}
function banner_popup(num, left, top, width, height) {
	if(getCookie("popup_" + num) != "1") 
		window.open("/default/popup/banner_popup.jsp","popup_0","left=" + left + "; top=" + top + "; width=" + width + "; height=" + height + "; toolbars=no");
}
function layer_popup(num) {
	if(getCookie("popup_" + num) != "1") {
		document.body.innerHTML = "/default/popup/open_popup.jsp?u_num=" + num; 
	}
}
function popup_close(num) {
	if(document.getElementById("u_check").checked == true) setCookie("popup_" + num,"1");
	self.close();
}

function layer_close(num) {
	if(document.getElementById("u_check_" + num).checked == true) setCookie("popup_" + num,"1");
	document.getElementById("popup_" + num).style.display="none";
}

function setCookie(name, value) {
	document.cookie = name + '=' + escape(value) + '; path=/; '
}

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 "";
}