// ¼±ÅÃÈÄ ´ÝÈ÷´Â ÆË¾÷.condition
function popup_win(form, func, id, name, path, winwValue, winhValue, prog_id)
{ 
	var winw = winwValue;
	var winh = winhValue;
	var winl = (screen.width - winw) / 2;
	var wint = (screen.height - winh) / 2; 
	
	var oURL = "";
	
	// ÁÖ¼Ò·ÎºÎÅÍ ÇÁ·Î±×·¥ ÄÚµå¸¦ ¾Ë¾Æ¿Â´Ù.
	//var prog_id = document.location+"";
	//var idx = prog_id.lastIndexOf("/");
	
	//if (idx < 0)
	//	oURL = "";
	//else
	//	prog_id = prog_id.substr(idx+1, 6);		 

	// È¸¿øµî·ÏÈ­¸é
	if (prog_id == "Member") {
		if (path == "Member_Id") // È¸¿ø¾ÆÀÌµðÃ£±â
			oURL = "/member/searchMemberIdFrame.do";
		else if (path == "Home_Addr1") // ÁÖ¼ÒÃ£±â
			oURL = "/member/searchHomeAddrFrame.do";
		else if (path == "School_Cd") // ÇÐ±³Ã£±â
			oURL = "/member/searchSchoolFrame.do";
		else if (path == "Nick_Nm") // È¸¿øº°¸íÃ£±â
			oURL = "/member/searchNickNmFrame.do";
	// ½Ç¸íÀÎÁõÈ­¸é
	} else if (prog_id == "JoinMember") {
			oURL = "/member/searchJoinMember.do";
	// »ó´ã±³»ç, »ó´ã¼¾ÅÍ, °Ô½ÃÆÇ°ü¸® µî·ÏÈ­¸é
	} else if (prog_id == "Counsel") {
		if (path == "Counseler_Id") // »ó´ã±³»ç
			oURL = "/member/searchMemberFrame.do";
		else if (path == "Teacher_Id") // »ó´ã¼¾ÅÍ È¸¿øÃ£±â
			oURL = "/counselcenter/searchMemberFrame.do";
		else if (path == "Volunteer_Id") // »ó´ã¼¾ÅÍ È¸¿øÃ£±â
			oURL = "/counselcenter/searchMemberFrame.do";
		else if (path == "Center_Addr1") // ÁÖ¼ÒÃ£±â
			oURL = "/member/searchHomeAddrFrame.do";
		else if (path == "Class_Cd") // ºÐ·ùÄÚµåÃ£±â
			oURL = "/counselmanage/searchClassCdFrame.do";
		else if (path == "Answer_Id") // »ó´ã±³»çÃ£±â
			oURL = "/counsel/searchMemberFrame.do";
	}
	
	if (oURL.length > 0)
	{
		oURL += "?form=" + form + "&func=" + func + "&id=" + id + "&name=" + name;
		if (prog_id == "JoinMember") 
			oURL += "&City_No="+name+"&Kname="+path;
			
		newWindow = window.open(oURL, 'member_popup_win', 'width='+winw+',height='+winh+',top='+wint+',left='+winl+',scrollbars=auto,resizable=no');
		newWindow.focus();
		
		//ÆË¾÷À» ¹è¿­º¯¼ö¿¡ ÀúÀå
		setPop(newWindow);   
	}
}

// ¼±ÅÃÈÄ ´ÝÈ÷´Â ÆË¾÷.condition
function news_popup_win(oURL)
{ 
	var winw = 600;
	var winh = 500;
	var winl = (screen.width - winw) / 2;
	var wint = (screen.height - winh) / 2; 
	
	newWindow = window.open(oURL, 'news_popup_win', 'width='+winw+',height='+winh+',top='+wint+',left='+winl+',scrollbars=yes,resizable=no');
	newWindow.focus();
	
	//ÆË¾÷À» ¹è¿­º¯¼ö¿¡ ÀúÀå
	setPop(newWindow);   
}