function getCookie(name) {
	var label = name + "=" ;
	var labelLen = label.length ;
	var cLen = document.cookie.length;
	var i = 0;
	while (i < cLen){
		var j = i + labelLen;
		if (document.cookie.substring(i,j) == label) {
			var cEnd = document.cookie.indexOf(";",j);
			if (cEnd == -1) {
				cEnd = document.cookie.length;
			}
			return unescape(document.cookie.substring(j,cEnd));
		}
		i++;
	}
	return "";
}

function openPopup(data) {
	var winprops = "";
	var mypage = "";
	var scroll = "";

	scroll = "no";
	resize = "no";

	var leftValue = "0";
	var leftValue2 = "0";
	if ( getCookie("POPUP_KNOW_NOT_OPEN_2") != "Y" ) {
		//leftValue = "480";
	}
//	if ( getCookie("POPUP_KNOW_NOT_OPEN_3") != "Y" ) {
//		leftValue = "355";
//	}
//	if ( getCookie("POPUP_KNOW_NOT_OPEN_2") != "Y" && getCookie("POPUP_KNOW_NOT_OPEN_3") != "Y") {
//		leftValue = "710";
//		leftValue2 = "355";
//	}

	winprops = 'height='+350+',width='+420+',top=0,left='+leftValue+',scrollbars='+scroll+',resizable='+resize;
	mypage = "/event/08/creditbank/ev08cb_020p.jsp?data="+data;
	
	winprops2 = 'height='+300+',width='+473+',top=0,left='+leftValue2+',scrollbars='+scroll+',resizable='+resize;
	mypage2 = "/html/event/09/shinhan/shinhanPop.html";
	

	if ( getCookie("POPUP_KNOW_NOT_OPEN") != "Y" ) {
		win = window.open(mypage, 'pop_1', winprops);
		if(win != null) win.focus();
	}
//	if ( getCookie("POPUP_KNOW_NOT_OPEN_2") != "Y" ) {
//		win = window.open(mypage2, 'pop_2', winprops2);
//		if(win != null) win.focus();
//	}
//	if ( getCookie("POPUP_KNOW_NOT_OPEN_3") != "Y" ) {
//		win = window.open(mypage3, 'pop_3', winprops3);
//		if(win != null) win.focus();
//	}

}

function openPopup2() {
	var winprops3 = "";
	var mypage3 = "";
	var scroll = "";

	scroll = "no";
	resize = "no";

	
	winprops3 = 'height='+533+',width='+400+',top=0,left=0,scrollbars='+scroll+',resizable='+resize;
	mypage3 = "/event/10/kndda/popup.jsp";

	//alert("getCookie(POPUP_KNOW_NOT_OPEN_3):" + getCookie("POPUP_KNOW_NOT_OPEN_3"));
	if ( getCookie("POPUP_KNOW_NOT_OPEN_3") != "Y" ) {
		win = window.open(mypage3, 'pop_3', winprops3);
		if(win != null) win.focus();
	}

}