
// JavaScript Document
/*==========================================================
	ÆÄÀÏ¸í		:PopupViewCounting.js
	ÆÄÀÏ¼³¸í		:°Ô½Ã¹° Ajax Js
==========================================================*/

/***********************************************************
	ÇÔ¼ö¸í		:popXMLHttpRequest()
	Ã³¸®³»¿ë		:¿äÃ»°´Ã¼¸¦ »ý¼ºÈÄ ¹ÝÈ¯
***********************************************************/

var REQ; //¿äÃ»°´Ã¼¿ë
function popXMLHttpRequest() {
	var xmlreq = false;
	if (window.XMLHttpRequest) {
		xmlreq = new XMLHttpRequest();
	} else if (window.ActiveXObject) {
		try {
			xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
			try {
				xmlreq = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
			}
		}
	}
	return xmlreq;
}

function pop_act_list(idx,atag,sb) {
	var idx;
	var atag;
	var sb;
	document.getElementById("LayerClickCntBar").style.display="";
	setTimeout("pop_show_list(" + idx + ",'" + atag + "','" + sb + "')",200);
}

function pop_show_list(idx,atag,sb){

	REQ = popXMLHttpRequest();//req °´Ã¼¹ÝÈ¯

	var idx;
	var atag;
	var sb;
	var winOpts;
	//¿äÃ»Ã³¸®	
	var list_url = "/include/popup/popup_counting.asp";
	REQ.open("POST", list_url, true);
	REQ.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	REQ.send("idx="+idx+"&chk="+idx);
	//location.href=atag;

	if(sb == 'blank'){  //target=_blank ÀÏ °æ¿ì
		var width = "800";
		var height = "500";
		var LeftPosition;
		var TopPosition;
		LeftPosition=(screen.width)?(screen.width-width)/2:100;
		TopPosition=(screen.height)?(screen.height-height)/2:100;
		
		
		winOpts="scrollbars=yes,toolbar=yes,location=yes,directories=yes,width="+width+",height="+height+",resizable=yes,mebar=yes,left="+LeftPosition+",top="+TopPosition;
	var obj = window.open(atag,'popup', winOpts);
	}
	else{
		location.href=atag;	
	}
}


