/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         코맨트 검색시작                                                                                          #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/


ajax.ContentLoader.prototype.comment_list = function(){

	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; //응답받은 XML에서 리스트내용을 전달
	var output = document.getElementById("div1_6");//board.php에서의 출력부분
	var outhtml = "";//return할 HTML스트링
	output.innerHTML = "< Data Loadding....>";//출력부분의 내용을 초기화
	

	var items = lists.getElementsByTagName("item"); //XML에서 표시할 게시물을 배열로 받는다.
	outhtml = "<DIV id=__ePositionContentsArea__ >";

	outhtml += "<TABLE border='0' cellpadding='0' cellspacing='0' width='471px' style='table-layout:fixed' background='"+Loadings.directory+"/OUTPUT/IMAGE/right_blank.gif'>";


	outhtml += "<tr height=5><td colspan=2></td></tr>";
	if(items.length > 0){//게시물이 1견이라도 있을경우의 처리내용
	//alert(items.length)	
		var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);//총 게시물수 취득
		outhtml += func_comment_paging(totalcnt)

		for(var i=0; i<items.length; i++){//게시물 건수만큼 루프
			var item = items[i];
			
			var seq = item.getAttribute("seq");//게시물번호
			var pno = item.getElementsByTagName("pno")[0].firstChild.nodeValue;//게시물 작성자
			var uid = item.getElementsByTagName("userid")[0].firstChild.nodeValue;//게시물 작성자
			var ep_id = item.getElementsByTagName("ep_id")[0].firstChild.nodeValue;//게시물 Subject
			var ep_domain = item.getElementsByTagName("ep_domain")[0].firstChild.nodeValue;//코멘트갯수
			var memo = item.getElementsByTagName("memo")[0].firstChild.nodeValue;//코멘트갯수
			var name = item.getElementsByTagName("name")[0].firstChild.nodeValue;//코멘트갯수
			var wtime = item.getElementsByTagName("wtime")[0].firstChild.nodeValue;//코멘트갯수
			var point = item.getElementsByTagName("point")[0].firstChild.nodeValue;//코멘트갯수

			
			uid = decodeURIComponent(uid);
			name = decodeURIComponent(name);
			wtime = decodeURIComponent(wtime);
			point = decodeURIComponent(point);

			outhtml += "<TR height=1px><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/comment_bar.gif'></td></tr>";
			outhtml += "<TR height=25>";
			outhtml += "  <TD class='list_td' align='left' width='100px'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/h_icon.gif'> <font color='#0E0E0E'>"+name+"</font></TD>";
			outhtml += "  <TD class='list_td' align='right' width='342px'><font color='#0E0E0E'>"+wtime+" | "+point;
		
			if (Login.users.ulogin==true)
			{
				if (Login.users.uid == uid || Login.users.ulevel==12)
				{
					outhtml +=" <a href='#' onclick=deletefunc("+pno+")><img src='"+Loadings.directory+"/OUTPUT/IMAGE/comment_bt_del.gif' align=absmiddle></a>&nbsp;";
				}
			}
					
			outhtml += "</TD>";
			outhtml += "</TR>";
			outhtml += "<tr height=30><td colspan=2> <font color='#2D2D2D'>"+memo+"</font><br><br></td></tr>";
		}

		var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);//총 게시물수 취득
		
		outhtml += func_comment_paging(totalcnt);//common.js의 페이징함수 호출
	}else{
		outhtml += "<TR>";
		outhtml += "  <TD align='center' colspan=2><BR><B>No Comment.</B></TD>";
		outhtml += "</TR>";
		//alert(this.req.responseText)
	}
	outhtml += "</TABLE>	</div>";
	output.innerHTML = outhtml;//출력부분에 결과리스트를 표시
	output.style.overflow="hidden";
	epositionConvert();
  } 
  

//멘트
var THISPAGE=1;
var LISTUNIT=10;
var PAGEUNIT=10;

function func_comment_paging(totalcnt){
	var totpages = Math.ceil(totalcnt/LISTUNIT); //총페이지수
	var thisblock = Math.ceil(THISPAGE/PAGEUNIT); //현재 페이징블럭
	var startpage, endpage;
	var ret_HTML = "";
	
	// 현재 페이지블럭의 시작페이지번호
	if(thisblock > 1){
		startpage = (thisblock-1)*PAGEUNIT+1;
	}else{
		startpage = 1;
	}
	
	// 현재 페이지블럭의 끝페이지번호
	if( (thisblock*PAGEUNIT) >= totpages ){
		endpage = totpages;
	}else{
		endpage = thisblock*PAGEUNIT;
	}
	
	ret_HTML = "<TR>";
	ret_HTML += "  <TD align='center' colspan='2' class='paging_td'>";
	if(THISPAGE > 1){
		ret_HTML += "  <A href='javascript:comment_page(1);'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow1.gif' align=absmiddle></A>"; 
		
		if (startpage!=1)
		{
			ret_HTML += "  <A href='javascript:comment_page("+(startpage-1)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow.gif' align=absmiddle></A>"; 

		}
	}


	for(i=startpage; i<=endpage; i++){
		if(i!=THISPAGE){
			ret_HTML += " <A href='javascript:comment_page("+i+");'>"+i+"</A>";
		}else{
			ret_HTML += " <B>"+i+"</B>";
		}
	}
	
	if(THISPAGE != totpages){

		if (i < totpages)
		{
			ret_HTML += "  <A href='javascript:comment_page("+(i)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow.gif' align=absmiddle></A>"; 

		}
		
		ret_HTML += "  <A href='javascript:comment_page("+totpages+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow1.gif' align=absmiddle></A>"; 

	}
	ret_HTML += "  </TD>";
	ret_HTML += "</TR>";
	
	return ret_HTML;
}



function comment_page(a){

	if( a == 0 ){//페이지번호가 0일경우는 현재표시중인 페이지를 처리한다
		a = THISPAGE;
	}else{
		THISPAGE = a;
	}

	if ( !isUndefined( epid_value ) )	epid_value=""; 
	if ( !isUndefined( epdomain_value ) )	epdomain_value=""; 
	if ( !isUndefined( day1 ) )	day1=""; 
	if ( !isUndefined( day2 ) )	day2=""; 
	if ( !isUndefined( search_value ) )	search_value=""; 
	if ( !isUndefined( search_key ) )	search_key=""; 


	var params="ep_id=" + epid_value + "&page="+a;
	params +="&domain="+epdomain_value;
	params +="&day1="+day1;
	params +="&day2="+day2;
	params +="&search_name="+search_value;
	params +="&search_key="+search_key;
	var loader1=new ajax.xhr.Request("XML_PHP/comment_xml_list.php",params,ajax.ContentLoader.prototype.comment_list,"GET","");


}

var search_value;
var epid_value;
var epdomain_value;
var search_key;
var day1;
var day2;

/*코멘트*/
function ment_searchchk(){
	day1=document.getElementById('day1').value;
	day2=document.getElementById('day2').value;

	search_value=document.getElementById('search_name').value;
	search_key=document.getElementById('search_key').value;
	
	epid_value=Getid.eposition.epid;
	epdomain_value=Getid.eposition.domain
	search_value=encodeURIComponent(search_value)
	epdomain_value=encodeURIComponent(epdomain_value)
	epid_value=encodeURIComponent(epid_value)
	var params="ep_id=" + epid_value + "&domain="+epdomain_value+"&page=1";
	

	if (day1!="" && day2!=""){
		day1=encodeURIComponent(day1);
		day2=encodeURIComponent(day2);
		params +="&day1="+day1;
		params +="&day2="+day2;
	}

	if (search_value!=""){
		params +="&search_name="+search_value;
		params +="&search_key="+search_key;
	}
	var loader1=new ajax.xhr.Request("XML_PHP/comment_xml_list.php",params,ajax.ContentLoader.prototype.comment_list,"GET","");

}

function comment_list(){

	epid_value=Getid.eposition.epid;

	epdomain_value=Getid.eposition.domain

	epdomain_value=encodeURIComponent(epdomain_value)
	epid_value=encodeURIComponent(epid_value)

	var params="ep_id=" + epid_value + "&domain="+epdomain_value+"&page=1";

	var loader1=new ajax.xhr.Request("XML_PHP/comment_xml_list.php",params,ajax.ContentLoader.prototype.comment_list,"GET","");


}

/*#####################################################################코맨트 검색 끝###############################################################*/




















/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         ePosition리스트                                                                                            #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/






var THISPAGE_EPOSITION=1;
var LISTUNIT_EPOSITION=10;
var PAGEUNIT_EPOSITION=10;

//ePosition 페이징 함수
function func_eposition_paging(totalcnt){
	var totpages = Math.ceil(totalcnt/LISTUNIT_EPOSITION); //총페이지수
	var thisblock = Math.ceil(THISPAGE_EPOSITION/PAGEUNIT_EPOSITION); //현재 페이징블럭
	var startpage, endpage;
	var ret_HTML = "";
	//ct=document.cform.hcate.value
	
	// 현재 페이지블럭의 시작페이지번호
	if(thisblock > 1){
		startpage = (thisblock-1)*PAGEUNIT_EPOSITION+1;
	}else{
		startpage = 1;
	}
	
	// 현재 페이지블럭의 끝페이지번호
	if( (thisblock*PAGEUNIT_EPOSITION) >= totpages ){
		endpage = totpages;
	}else{
		endpage = thisblock*PAGEUNIT_EPOSITION;
	}
	
	ret_HTML = "<table width=100%><TR>";
	ret_HTML += "  <TD align='center' colspan='5' class='paging_td' >";
	
	if(THISPAGE_EPOSITION > 1){
		ret_HTML += "  <A href='javascript:eposition_page(1);'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow1.gif' align=absmiddle></A>"; 
		
		if (startpage!=1)
		{
			ret_HTML += "  <A href='javascript:eposition_page("+(startpage-1)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow.gif' align=absmiddle></A>"; 

		}


	}



	for(i=startpage; i<=endpage; i++){
		if(i!=THISPAGE_EPOSITION){
			ret_HTML += " <A href='javascript:eposition_page("+i+");'>"+i+"</A>";
		}else{
			ret_HTML += " <B>"+i+"</B>";
		}
	}
	


	if(THISPAGE_EPOSITION != totpages){
		if (i < totpages)
		{
			ret_HTML += "  <A href='javascript:eposition_page("+(i)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow.gif' align=absmiddle></A>"; 

		}
		
		ret_HTML += "  <A href='javascript:eposition_page("+totpages+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow1.gif' align=absmiddle></A>"; 
	}

	ret_HTML += "  </TD>";
	ret_HTML += "</TR></table>";
	
	return ret_HTML;
}






var eposition_div=new Array();











var Prints=new Object();
Prints.dialog = new Array();

Prints.newdiv=function(divid,output,pno,inhtml){
	//alert(no)
	this.divid=divid;
	this.output=output;
	this.pno=pno;
	this.inhtml=inhtml;

}


Prints.newdiv.prototype.newPrint=function(){
	
	//alert(Prints.dialog.length)

	for (var i=0; i<Prints.dialog.length; i++)
	{
		var d=Prints.dialog[i];

			if (d)
			{
			
				eposition_div[i]=document.createElement("div");
				eposition_div[i].id="epexams"+i;
				d.output.appendChild(eposition_div[i]);
				eposition_div[i].innerHTML=d.inhtml;
			//	Prints.newdiv.prototype.movePrint(eposition_div[cnt])
				Prints.dialog[i]=null;
				//alert(Prints.dialog[i])
			}
	}
	//Prints.dialog="";
}

ajax.ContentLoader.prototype.eposition_list=function(){

	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; //응답받은 XML에서 리스트내용을 전달
	var output = document.getElementById("div2_7");//board.php에서의 출력부분


	var items = lists.getElementsByTagName("item"); //XML에서 표시할 게시물을 배열로 받는다.
	
	//outhtml += "<TABLE border='0' cellpadding='3' cellspacing='0' align='left' class='list_table' width=500px style='table-layout:fixed'>";
	
	var page_i=0;
	var dot="&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/dot.gif' align=absmiddle>&nbsp;";

	//alert(items.length)
	if(items.length > 0){//게시물이 1견이라도 있을경우의 처리내용
		var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);//총 게시물수 취득
		
		/*
		
		var output_7 = document.getElementById("div2_4");//board.php에서의 출력부분
		var search1=document.getElementById("country");
		var region_large=document.getElementById("region_large");
		var region_sub=document.getElementById("region_sub");
		var q=document.getElementById("q");
		
		if (!isUndefined(search1.value)) var search1value="없음";  else search1value=search1.options[search1.selectedIndex].innerHTML;  
		if (region_large.value=="") var region_largevalue="없음"; else region_largevalue=region_large.value
		if (region_sub.value=="") var region_subvalue="없음"; else region_subvalue=region_sub.value
		if (q.value=="") var qvalue="없음"; else qvalue=q.value
		
		var search_history_dot="<img src='/"+Loadings.directory+"/OUTPUT/IMAGE/search_history_dot.gif' align=middle>";
		var search_history_z="<img src='/"+Loadings.directory+"/OUTPUT/IMAGE/search_history_z.gif' align=middle>";
		output.innerHTML="<table align=center><tr><td align=right>"+search_history_dot+ " 국가 : <b>" + search1value+"</b> "+search_history_dot+ "  시/도 : <b>"+region_largevalue+"</b> "+search_history_dot+ "  구/군 : <b>"+region_subvalue+"</b> "+search_history_z+" 검색어 : <b>"+qvalue+"</b>&nbsp;</td></tr></table>";

		
		output.innerHTML+=func_eposition_paging(totalcnt)
		
		
		*/


		output.innerHTML=func_eposition_paging(totalcnt)
		

		//도메인 이 없을때 디폴트값 설정
		var q_temp=document.getElementById('q')?document.getElementById('q').value:"";

		
		q_temp1=q_temp.split('#');
		
		//alert(isUndefined(q_temp1[1]))
		if (!isUndefined(q_temp1[1]))
		{
			q_temp=q_temp1[0]+"#사이사이";
		}else{
			q_temp=document.getElementById('q')?document.getElementById('q').value:"";
			//favorite_div_no=parseInt(favorite_div_no)<parseInt(a[i].nno)?parseInt(a[i].nno):parseInt(favorite_div_no);
		}
	
		var j=0;
		for(var i=0; i<items.length; i++){//게시물 건수만큼 루프
		//alert(i)
			var item = items[i];
			
			var seq = item.getAttribute("seq");//게시물번호
			
			
			var ep_id = item.getElementsByTagName("ep_id")[0].firstChild.nodeValue;//게시물 작성자
			var ep_domain = item.getElementsByTagName("ep_domain")[0].firstChild.nodeValue;//게시물 작성자
			var ep_name = item.getElementsByTagName("ep_name")[0].firstChild.nodeValue;//게시물 작성자
			var keyword = item.getElementsByTagName("keyword")[0].firstChild.nodeValue;//게시물 작성자
			var region = item.getElementsByTagName("region")[0].firstChild.nodeValue;//게시물 작성자
			var memo = item.getElementsByTagName("memo")[0].firstChild.nodeValue;//게시물 작성자
			var qurl = item.getElementsByTagName("qurl")[0].firstChild.nodeValue;//게시물 작성자
			var regtime = item.getElementsByTagName("regtime")[0].firstChild.nodeValue;//게시물 작성자
			var country = item.getElementsByTagName("country")[0].firstChild.nodeValue;//게시물 작성자
			//ep_id1 = ep_id;

			ep_id = decodeURIComponent(ep_id);
			ep_domain = decodeURIComponent(ep_domain);
			//ep_name = decodeURIComponent(ep_name);
			//alert()
			
			//검색결과 완전 일치
			if (q_temp.toLowerCase()==(ep_id+"#"+ep_domain).toLowerCase())
			{
				if (document.getElementById("q"))
				{
					if (THISPAGE_EPOSITION==1 && document.getElementById("q").value.indexOf('##') == -1 ){
						
						if (qurl!="")eposition_result(ep_id,ep_domain,qurl);
					}
				
				}
				

				if (THISPAGE_EPOSITION==1)
				{
				
					var top=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_top1.gif";
					var bg=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_bg.gif";
					var bottom=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_bottom.gif";
					var listbar=Loadings.directory+"/OUTPUT/IMAGE/list_bar.gif";
				
					outhtml="";	

					outhtml += "<DIV id='epexam"+i+"'></DIV>";
					outhtml += "<table border=0 cellpadding=0 cellspacing=0 width=471px align=center>";


					outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
					outhtml += "<tr height=25px>";
					outhtml += "<td width=80>"+dot+"ePosition</td>";
					outhtml += "<td colspan=2 width=373px > : ";
					
					if (qurl=="")
					{
						outhtml+="<a href='http://keyword.eposition.com/?keyword="+encodeURIComponent(ep_id)+"%23"+encodeURIComponent(ep_domain)+"' target=_blank><b>"+decodeURIComponent(ep_id)+"#"+decodeURIComponent(ep_domain)+"</b></a>";

					}else{
						outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
					}
					outhtml += " ("+ ep_name +")</td>";
				
					outhtml += "</tr>";

					outhtml += "<tr height=25px>";
					outhtml += "<td width=80>"+dot+"Address</td>";
					outhtml += "<td width=290> :  <img src='"+Loadings.directory+"/OUTPUT/IMAGE/COUNTRY/"+country+".png' align=absmiddle> "+ region +"</td>";
					outhtml += "<td align=right width=83>";

					if (ep_domain=="사이사이"){	

						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\" style='cursor:hand'>&nbsp;";
					}else if (ep_domain=="파주시")
					{
						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";

					}else{
						if (qurl!="")
						{
						
							outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"/d/?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";
						}
					}
					outhtml += "</td>";
					outhtml += "</tr>";
					
					if (items.length-1==i) outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
					
					outhtml += "</table>";
					Prints.dialog[j] =new Prints.newdiv("epexams",output,j,outhtml) ;
					page_i++;
					j++;
				}
			}else{
			
				//alert(ep_id)
				/*=============================================일치항목 없을때 왼쪽 div 초기================================================*/
				
			//	alert(document.getElementById("q").value.indexOf('##'))
				if (document.getElementById("q")) {
					if (THISPAGE_EPOSITION==1 && document.getElementById('q').value!="" && seq==0 && document.getElementById("q").value.indexOf('##') == -1 ) {
						nosearch_form("q");
						
					}
				}
				/*=============================================일치항목 없을때 왼쪽 div 초기================================================*/

					var top=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_top1.gif";
					var bg=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_bg.gif";
					var bottom=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_bottom.gif";
					var listbar=Loadings.directory+"/OUTPUT/IMAGE/list_bar.gif";			
				outhtml="";	
				//var z="test1.php?epid="+ep_id1;
			//outhtml += "<TR><td width=500px>";
				outhtml += "<DIV id='epexam"+i+"'></DIV>";
				outhtml += "<table border=0 cellpadding=0 cellspacing=0 width=471px align=center>";


				outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
				outhtml += "<tr height=25px>";
				outhtml += "<td width=80>"+dot+"ePosition</td>";
				outhtml += "<td colspan=2 width=373px > : ";
				
				//outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
				if (qurl=="")
				{
					outhtml+="<a href='http://keyword.eposition.com/?keyword="+encodeURIComponent(ep_id)+"%23"+encodeURIComponent(ep_domain)+"' target=_blank><b>"+decodeURIComponent(ep_id)+"#"+decodeURIComponent(ep_domain)+"</b></a>";

				}else{
					outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
				}
				outhtml += " ("+ ep_name +")</td>";
			
				outhtml += "</tr>";

				outhtml += "<tr height=25px>";
				outhtml += "<td width=80>"+dot+"Address</td>";
				outhtml += "<td width=290> :  <img src='"+Loadings.directory+"/OUTPUT/IMAGE/COUNTRY/"+country+".png' align=absmiddle> "+ region +"</td>";
				outhtml += "<td align=right width=83>";
				//outhtml += "<a href=javascript:void(ePosition2Clipboard3('epexam"+i+"','"+ep_id+"','"+ep_domain+"','"+qurl+"'));><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_copy.gif' align=absmiddle></a>";
				if (ep_domain=="사이사이"){	

					outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\" style='cursor:hand'>&nbsp;";
				//outhtml += "<a href=\"#\" onclick=\"javascript:window.open('http://egosio.epmap.egosio.com/d/?epid="+encodeURI(ep_id)+"');\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_mapview1.gif' align=absmiddle></a>&nbsp;";
					}else if (ep_domain=="파주시")
					{
						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";
				
				}else{
					if (qurl!="")
					{
					
						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"/d/?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";
					}
				}
				outhtml += "</td>";
				outhtml += "</tr>";
				
				if (items.length-1==i) outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
				
				outhtml += "</table>";
				Prints.dialog[j] =new Prints.newdiv("epexams",output,j,outhtml) ;
				page_i++;
				j++;
			
			}

			

			

			
			
			//alert(outhtml)
			




		}
		
		Prints.dialog[page_i] = new Prints.newdiv("epexams",output,j,func_eposition_paging(totalcnt)) ;//common.js의 페이징함수 호출

		Prints.newdiv.prototype.newPrint();

		if (!output.firstChild.id){
		}
		
		


	}else{

		


		//var d=document.getElementById("div1_3");	
		//if (d.style.display=="none") {d.style.display="block";}
		//d.innerHTML=Loadings.commenterror;

		if (document.getElementById("q")){
			if (document.getElementById('q').value!="") nosearch_form("q");
		}
		output.innerHTML="<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No one searched.";


		


	}
	
}








var q;
var region_large;
var region_sub;
var country;

/*ePosition 검색 리스트*/
function eposition_search_list(){

	
	//document.getElementById("spanOutput").style.display = "none";
//	HideTheBox();
	THISPAGE_EPOSITION=1
	var a=document.getElementById("div2_7");	
	a.innerHTML=Loadings.list

	q=document.getElementById("q").value;
	

	region_large=document.getElementById("region_large").value;
	region_sub=document.getElementById("region_sub").value;
	country=document.getElementById("country").value;

	
	if ( !isUndefined( q ) )	q=""; 
	if ( !isUndefined( region_large ) )	region_large=""; 
	if ( !isUndefined( region_sub ) )	region_sub=""; 
	if ( !isUndefined( country ) )	country=""; 

	q=encodeURIComponent(q);
	region_large=encodeURIComponent(region_large);
	region_sub=encodeURIComponent(region_sub);

	

	var params = "q="+q+"&region_large="+region_large+"&region_sub="+region_sub+"&country="+country+"&page=1";
	var loader5=new ajax.xhr.Request("XML_PHP/unity_xml_list.php",params,ajax.ContentLoader.prototype.eposition_list,"POST","");

	//window.open("XML_PHP/unity_xml_list1.php?"+params)
}

//ePosition 페이지
function eposition_page(p){

	if( p == 0 ){
		p = THISPAGE_EPOSITION;
	}else{
		THISPAGE_EPOSITION = p;

	}

	var a=document.getElementById("div2_7");	
	a.innerHTML=Loadings.list


	if ( !isUndefined( q ) )	q=""; 
	if ( !isUndefined( region_large ) )	region_large=""; 
	if ( !isUndefined( region_sub ) )	region_sub=""; 
	if ( !isUndefined( country ) )	country=""; 



	var params = "q="+q+"&region_large="+region_large+"&region_sub="+region_sub+"&country="+country+"&page="+p;;
	var loader4=new ajax.xhr.Request("XML_PHP/unity_xml_list.php",params,ajax.ContentLoader.prototype.eposition_list,"POST","");

	//window.open("XML_PHP/unity_xml_list.php?"+params);
}



/*최근등록 10개*/
function default_list(){
	var a=document.getElementById("div2_7");	
	
	
	a.innerHTML=Loadings.list;
	var params = "epid=&qu=";

	var loader4=new ajax.xhr.Request("XML_PHP/unity_xml_list.php",params,ajax.ContentLoader.prototype.eposition_list,"POST","");


}

//ePosition 상세 정보

/*###############################################################ePosition검색 끝###################################################################*/



















































/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         태마검색                                                                                                    #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/










var THISPAGE_THEMA=1;
var LISTUNIT_THEMA=10;
var PAGEUNIT_THEMA=10;

//ePosition 페이징 함수
function func_THEMA_paging(totalcnt){
	var totpages = Math.ceil(totalcnt/LISTUNIT_THEMA); //총페이지수
	var thisblock = Math.ceil(THISPAGE_THEMA/PAGEUNIT_THEMA); //현재 페이징블럭
	var startpage, endpage;
	var ret_HTML = "";
	//ct=document.cform.hcate.value
	
	// 현재 페이지블럭의 시작페이지번호
	if(thisblock > 1){
		startpage = (thisblock-1)*PAGEUNIT_THEMA+1;
	}else{
		startpage = 1;
	}
	
	// 현재 페이지블럭의 끝페이지번호
	if( (thisblock*PAGEUNIT_THEMA) >= totpages ){
		endpage = totpages;
	}else{
		endpage = thisblock*PAGEUNIT_THEMA;
	}
	
	ret_HTML = "<table width=100%><TR>";
	ret_HTML += "  <TD align='center' colspan='5' class='paging_td' >";
	
	if(THISPAGE_THEMA > 1){
		ret_HTML += "  <A href='javascript:THEMA_page(1);'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow1.gif' align=absmiddle></A>"; 
		
		if (startpage!=1)
		{
			ret_HTML += "  <A href='javascript:THEMA_page("+(startpage-1)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow.gif' align=absmiddle></A>"; 

		}


	}



	for(i=startpage; i<=endpage; i++){
		if(i!=THISPAGE_THEMA){
			ret_HTML += " <A href='javascript:THEMA_page("+i+");'>"+i+"</A>";
		}else{
			ret_HTML += " <B>"+i+"</B>";
		}
	}
	


	if(THISPAGE_THEMA != totpages){
		if (i < totpages)
		{
			ret_HTML += "  <A href='javascript:THEMA_page("+(i)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow.gif' align=absmiddle></A>"; 

		}
		
		ret_HTML += "  <A href='javascript:THEMA_page("+totpages+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow1.gif' align=absmiddle></A>"; 
	}

	ret_HTML += "  </TD>";
	ret_HTML += "</TR></table>";
	
	return ret_HTML;
}



ajax.ContentLoader.prototype.THEMA_list=function(){

	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; //응답받은 XML에서 리스트내용을 전달

	var output = document.getElementById("div2_7");//board.php에서의 출력부분


	var items = lists.getElementsByTagName("item"); //XML에서 표시할 게시물을 배열로 받는다.
	
	//outhtml += "<TABLE border='0' cellpadding='3' cellspacing='0' align='left' class='list_table' width=500px style='table-layout:fixed'>";
	
	var page_i=0;
	var dot="&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/dot.gif' align=absmiddle>&nbsp;";
	
	
	
	var q_temp=document.getElementById('thema_q')?document.getElementById('thema_q').value:"";

	q_temp1=q_temp.split('#');

	//alert(isUndefined(q_temp1[1]))
	if (!isUndefined(q_temp1[1]))
	{
		q_temp=q_temp1[0]+"#사이사이";
	}else{
		q_temp=document.getElementById('thema_q')?document.getElementById('thema_q').value:"";
	}
	var j=0;
	
	
	
	
	
	
	
	
	if(items.length > 0){//게시물이 1견이라도 있을경우의 처리내용
		var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);//총 게시물수 취득
		output.innerHTML=func_THEMA_paging(totalcnt)
		

		for(var i=0; i<items.length; i++){//게시물 건수만큼 루프
		//alert(i)
			var item = items[i];
			
			var seq = item.getAttribute("seq");//게시물번호
			
			
			var ep_id = item.getElementsByTagName("ep_id")[0].firstChild.nodeValue;//게시물 작성자
			

			var ep_domain = item.getElementsByTagName("ep_domain")[0].firstChild.nodeValue;//게시물 작성자
			
			var ep_name = item.getElementsByTagName("ep_name")[0].firstChild.nodeValue;//게시물 작성자
			

			var keyword = item.getElementsByTagName("keyword")[0].firstChild.nodeValue;//게시물 작성자
			var region = item.getElementsByTagName("region")[0].firstChild.nodeValue;//게시물 작성자
			var memo = item.getElementsByTagName("memo")[0].firstChild.nodeValue;//게시물 작성자
			var qurl = item.getElementsByTagName("qurl")[0].firstChild.nodeValue;//게시물 작성자
			var regtime = item.getElementsByTagName("regtime")[0].firstChild.nodeValue;//게시물 작성자
			var country = item.getElementsByTagName("country")[0].firstChild.nodeValue;//게시물 작성자


			ep_id = decodeURIComponent(ep_id);
			ep_domain = decodeURIComponent(ep_domain);
			//keyword = decodeURIComponent(keyword);
			region = decodeURIComponent(region);
			//memo = decodeURIComponent(memo);
			qurl = decodeURIComponent(qurl);
			//regtime = decodeURIComponent(regtime);




			if (q_temp.toLowerCase()==(ep_id+"#"+ep_domain).toLowerCase())
			{
				if (document.getElementById("thema_q"))
				{					
					if (THISPAGE_THEMA==1 && document.getElementById("thema_q").value.indexOf('##') == -1 ) {
						if (qurl!="")eposition_result(ep_id,ep_domain,qurl);
						
					}
				}
			
				if (THISPAGE_THEMA==1)
				{
				
						
					var top=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_top1.gif";
					var bg=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_bg.gif";
					var bottom=Loadings.directory+"/OUTPUT/IMAGE/eposition_list_bottom.gif";
					var listbar=Loadings.directory+"/OUTPUT/IMAGE/list_bar.gif";
				
					outhtml="";	

					outhtml += "<DIV id='epexam"+i+"'></DIV>";
					outhtml += "<table border=0 cellpadding=0 cellspacing=0 width=471px align=center>";


					outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
					outhtml += "<tr height=25px>";
					outhtml += "<td width=80>"+dot+"ePosition</td>";
					outhtml += "<td colspan=2 width=373px > : ";
					
					//outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
					if (qurl=="")
					{
						outhtml+="<a href='http://keyword.eposition.com/?keyword="+encodeURIComponent(ep_id)+"%23"+encodeURIComponent(ep_domain)+"' target=_blank><b>"+decodeURIComponent(ep_id)+"#"+decodeURIComponent(ep_domain)+"</b></a>";

					}else{
						outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
					}
					
					outhtml += " ("+ ep_name +")</td>";
				
					outhtml += "</tr>";

					outhtml += "<tr height=25px>";
					outhtml += "<td width=80>"+dot+"Address</td>";
					outhtml += "<td width=290> :  <img src='"+Loadings.directory+"/OUTPUT/IMAGE/COUNTRY/"+country+".png' align=absmiddle> "+ region +"</td>";
					outhtml += "<td align=right width=83>";

					if (ep_domain=="사이사이"){	

						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\" style='cursor:hand'>&nbsp;";
					}else if (ep_domain=="파주시")
					{
						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";

					}else{
						if (qurl!="")
						{
							outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"/d/?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";
						}
					}
					outhtml += "</td>";
					outhtml += "</tr>";
					
					if (items.length-1==i) outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
					
					outhtml += "</table>";
					Prints.dialog[j] =new Prints.newdiv("epexams",output,j,outhtml) ;
					page_i++;
					j++;
				}
			}else{

				/*=============================================일치항목 없을때 왼쪽 div 초기================================================*/
				
				if (document.getElementById("thema_q"))
				{
					if (THISPAGE_THEMA==1 && document.getElementById("thema_q").value!="" && seq==0 && document.getElementById("thema_q").value.indexOf('##') == -1 ) nosearch_form("thema_q");
				}
				/*=============================================일치항목 없을때 왼쪽 div 초기================================================*/


				listbar=Loadings.directory+"/OUTPUT/IMAGE/list_bar.gif";




				outhtml="";	
						
				//outhtml += "<TR><td width=500px>";
				outhtml += "<DIV id='epexam"+i+"'></DIV>";
				outhtml += "<table border=0 cellpadding=0 cellspacing=0 width=471px align=center>";

				outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
				outhtml += "<tr height=25px>";
				outhtml += "<td width=80>"+dot+"ePosition</td>";
				outhtml += "<td colspan=2> : ";
				
				//outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
				if (qurl=="")
				{
					outhtml+="<a href='http://keyword.eposition.com/?keyword="+encodeURIComponent(ep_id)+"%23"+encodeURIComponent(ep_domain)+"' target=_blank><b>"+decodeURIComponent(ep_id)+"#"+decodeURIComponent(ep_domain)+"</b></a>";

				}else{
					outhtml += "<a href=\"#\" onclick=\"javascript:eposition_result('"+ep_id+"','"+ep_domain+"','"+qurl+"');\" title=\"`"+ep_id+"#"+ep_domain+"` Detail information.\" ><b>"+ep_id+"#"+ep_domain+"</b></a>";
				}
				outhtml += " ("+ep_name+")</td>";
			
				outhtml += "</tr>";

				outhtml += "<tr height=25px>";
				outhtml += "<td width=80>"+dot+"Address</td>";
				outhtml += "<td width=290> :  <img src='"+Loadings.directory+"/OUTPUT/IMAGE/COUNTRY/"+country+".png' align=absmiddle> "+ region +"</td>";
				outhtml += "<td align=right width=83>";
				if (ep_domain=="사이사이"){	
					outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle  onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\" style='cursor:hand'>&nbsp;";
				}else if (ep_domain=="파주시")
				{
						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\"  style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";

				}else{
					if (qurl!="")
					{
					
						outhtml += "<img src='"+Loadings.directory+"/OUTPUT/IMAGE/favorite_icon.jpg' align=absmiddle  onclick=favorite_add('"+ep_id+"','"+ep_domain+"','epexam"+i+"','') title=\"`"+ep_id+"#"+ep_domain+"` 즐겨찾기에 추가.\" style='cursor:hand'><a href=\"#\" onclick=\"window.open('"+qurl+"/d/?epid="+encodeURIComponent(ep_id)+"&epdomain="+encodeURIComponent(ep_domain)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\" title=\"`"+ep_id+"#"+ep_domain+"` 새창에서 지도보기.\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";
					}

				
				}
				
				outhtml += "</td>";
				outhtml += "</tr>";
				if (items.length-1==i) outhtml += "<tr height=1px><td colspan=3><img src='"+listbar+"'></td></tr>";
				outhtml += "</table>";

				

				
				Prints.dialog[j] =new Prints.newdiv("epexams",output,j,outhtml) ;
				page_i++;
				j++;
		
			}
		}
		
		Prints.dialog[page_i] = new Prints.newdiv("epexams",output,j,func_THEMA_paging(totalcnt)) ;//common.js의 페이징함수 호출

		Prints.newdiv.prototype.newPrint();

		if (!output.firstChild.id){
		}
		
		


	}else{
		if (document.getElementById("thema_q")){

			if (document.getElementById('thema_q').value!="") nosearch_form("thema_q");
		}
		output.innerHTML="<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No one searched.";
	}
	
}








var q;
var region_large;
var region_sub;
var thema_q
/*ePosition 검색 리스트*/
function THEMA_search_list(){
//	document.getElementById("spanOutput").style.display = "none";
	THISPAGE_THEMA=1
	var a=document.getElementById("div2_7");	
	a.innerHTML=Loadings.list
	thema_q=document.getElementById("sg_query").value;
	region_large=document.getElementById("region_large1").value;
	region_sub=document.getElementById("region_sub1").value;
	q=document.getElementById("thema_q").value;

	
	if ( !isUndefined( q ) )	q=""; 
	if ( !isUndefined( region_large ) )	region_large=""; 
	if ( !isUndefined( region_sub ) )	region_sub=""; 
	if ( !isUndefined( thema_q ) )	thema_q=""; 

	q=encodeURIComponent(q);
	region_large=encodeURIComponent(region_large);
	region_sub=encodeURIComponent(region_sub);
	thema_q=encodeURIComponent(thema_q);

	

	var params = "q="+q+"&thema_q="+thema_q+"&region_large="+region_large+"&region_sub="+region_sub+"&page=1";
	var loader5=new ajax.xhr.Request("XML_PHP/thema_xml_list.php",params,ajax.ContentLoader.prototype.THEMA_list,"POST","");

	//window.open("XML_PHP/thema_xml_list.php?"+params)
}

/*ePosition 페이지*/
function THEMA_page(p){

	if( p == 0 ){
		p = THISPAGE_THEMA;
	}else{
		THISPAGE_THEMA = p;

	}

	var a=document.getElementById("div2_7");	
	a.innerHTML=Loadings.list


	if ( !isUndefined( q ) )	q=""; 
	if ( !isUndefined( thema_q ) )	thema_q=""; 
	if ( !isUndefined( region_large ) )	region_large=""; 
	if ( !isUndefined( region_sub ) )	region_sub=""; 

	var params = "q="+q+"&thema_q="+thema_q+"&region_large="+region_large+"&region_sub="+region_sub+"&page="+p;;
	var loader4=new ajax.xhr.Request("XML_PHP/thema_xml_list.php",params,ajax.ContentLoader.prototype.THEMA_list,"POST","");
}










/*################################################################태마검색 끝#####################################################################*/


















































/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         ePosition 상세정보                                                                                       #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/

var AR_VALUE=new Array();
var AR_TEXT=new Array();



var AR_V=new Array();
var AR_T=new Array();

ajax.ContentLoader.prototype.eposition_detail= function(){
	
	var dot="&nbsp;";
	var k=document.getElementById('mapiframe');

	var a=document.getElementById("div1_3");	
	a.style.overflow="hidden";


	//멀티형
	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; 
	var items = lists.getElementsByTagName("eposition");
	


	if (lists.getAttribute("type")=="multi")
	{
		var dot="&nbsp;";

		//var items = lists.getElementsByTagName("eposition")[0]; 

		if (items[0].getElementsByTagName("RESULT")[0].firstChild.nodeValue!="find" )
		{	
			var d=document.getElementById("div1_3");	
			if (d.style.display=="none") {d.style.display="block";}
		
			d.innerHTML=Loadings.commenterror;
			return false;

		}

		
		if(items.length > 0){
			var button_="<table cellpadding=0 cellspaciing=0 width=467px><tr height=0px><td></td><tr><tr><td>";
		
//alert(button_)
			for(var i=0; i<items.length; i++){
				AR_V[i]=new Array(); 
				AR_T[i]=new Array(); 

				var item = items[i];

				var SEQ = item.getAttribute("SEQ");
				var AR = item.getAttribute("AR");
				



				AR_ARRAY=AR.split(",");

				var temp_type="";

				for (j=0;j<AR_ARRAY.length-1 ; j++){
					
					if ( i=="1" ){
					
						AR_T[i][j]= item.getElementsByTagName(AR_ARRAY[j+1])[0].getAttribute("format");

						temp_type+="|"+AR_T[i][j];
					}
				}




				for (j=0;j<AR_ARRAY.length-1 ; j++)
				{
	
					AR_V[i][j]= item.getElementsByTagName(AR_ARRAY[j+1])[0].firstChild.nodeValue;
					AR_T[i][j]= item.getElementsByTagName(AR_ARRAY[j+1])[0].getAttribute("format");
		
					//EP_TYPE
					
					//9

					http://open.egosio.com/?q=%EC%A7%84%EC%A4%91%EA%B6%8C%23%EC%82%AC%EC%9D%B4%EC%82%AC%EC%9D%B4
					if ( i=="1" )	{
						button_+="<img src='OUTPUT/IMAGE/"+AR_T[i][j]+"_.gif' onclick='ucici_popup(\""+AR_V[0][1]+"\",\""+AR_V[0][2]+"\",\""+AR_T[i][j]+"\",\""+temp_type+"\")' style='cursor:hand'><img src='OUTPUT/IMAGE/blink_.gif'>";
						
						

					}
			
					
				//alert(i +" "+ j + " "+ item.getElementsByTagName(AR_ARRAY[j+1])[0].firstChild.nodeValue + " " + item.getElementsByTagName(AR_ARRAY[j+1])[0].getAttribute("format"))
				//alert(item.getElementsByTagName(AR_ARRAY[j+1])[0].firstChild.nodeValue)
					
					

				}

				


				
			}

			button_+="</td></tr></table>";
			
			

			var button_div=document.getElementById('bt');
			AR_V[0][4]=decodeURIComponent(AR_V[0][4]);
			AR_V[0][14]=decodeURIComponent(AR_V[0][14]);
			AR_V[0][18]=decodeURIComponent(AR_V[0][18]);

			button_div.innerHTML=button_

			

			//ajax.ContentLoader.prototype.multi_view(1)
			ajax.ContentLoader.prototype.multi_view1(AR_V[0][7],AR_V[0][8],AR_V[0][9],AR_V[0][10],AR_V[0][11],AR_V[0][17],AR_V[0][13],AR_V[0][14],AR_V[0][15],AR_V[0][16],AR_V[0][17],AR_V[0][18])

	


			//if (AR_VALUE[0][2]!="eposition") viewrVandH("Mlink");
			//else viewrVandH("mapiframe");
			
			if (AR_V[0][11]!="NULL")
			{
				var imagesrc="<table width=104px height=101px><tr><td align=center><a href='"+AR_V[0][11]+"' target=_blank><img src="+AR_V[0][11]+" id=smallimg onload=smallimg_resize()></a></td></tr></table>";
			}else{
				var imagesrc="<table background='"+Loadings.directory+"/OUTPUT/IMAGE/image_small_box.gif' width=104px height=101px><tr><td>&nbsp;</td></tr></table>";
			}
			

			inhtml = "<DIV id='eposition_clipboard' style='display:none'></DIV>";
			inhtml +="<table border=0 cellpadding=0 cellspacing=0 width=471px style='table-layout:fixed' background='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_bg1.gif'>";
			inhtml += "<tr height=2px><td background='"+Loadings.directory+"/OUTPUT/IMAGE/right_blank.gif'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_blank.gif'></td></tr>";
			inhtml += "<tr><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_top.gif'></td></tr>";

			inhtml += "<tr height=22><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_top1.gif' align=absmiddle> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button1.gif' onclick=eposition_detail_close(1)  align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button2.gif' onclick=eposition_detail_close(2) align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button3.gif' onclick=eposition_detail_close(3) align=absmiddle></td></tr>";
			inhtml+="<TR height=3><TD align=center ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_search_bar.gif'></TD></TR>";
					
			inhtml+="<tr id=epositiontr0><td>";

			inhtml+="<table cellpadding=0 cellspacing=0>";
			inhtml+="<tr><td width=10px></td><td >"+imagesrc+"</td><td width=327px>";

							
			inhtml+="<table cellpadding=0 cellspacing=0 style='table-layout:fixed' width=327px>";

					
			inhtml+="<TR height=22 id='epositiontr1' style='display:block'><TD nowrap width=327px>"+dot+"ePosition : <b>"+AR_V[0][1]+"#"+AR_V[0][2]+"</b></TD></TR>";

			inhtml+="<TR height=22 id='epositiontr2' style='display:block'><TD nowrap>"+dot+"Subject : "+AR_V[0][3]+"</TD></TR>";
			inhtml+="<TR height=66 id='epositiontr3' style='display:block'><TD valign=top>&nbsp;Memo : "+AR_V[0][4]+"</TD></TR>";

			inhtml+="</table>";

			inhtml+="</td><td width=10px>";
			inhtml+="</td><tr>";
			inhtml+="</table>";
			inhtml+="</td></tr>";
			inhtml+="<TR height=3 id='epositiontr6'><TD align=center  ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_search_bar.gif'></TD></TR>";
				

			inhtml+="<TR height=22 id='epositiontr7'><TD align=center ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_copy.gif' onclick=mapinfopopup('copy') align=absmiddle style='cursor:hand'> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_favorite.gif' onclick=mapinfopopup('favorite') align=absmiddle  style='cursor:hand'></TD></TR>";
			
			inhtml += "<tr><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_bottom.gif'></td></tr>";

			inhtml+="</TABLE>";



			a.innerHTML=inhtml;
			comment_list();

			if (cici_limit_time==true){ 
				
				setTimeout("ucici_popup('"+AR_V[0][1]+"','"+AR_V[0][2]+"','"+AR_V[0][9]+"','"+temp_type+"')","500");
			
			}

			//smallimg_resize()
		//alert(incontents)
			//setTimeout("smallimg_resize()","100");

			

		}else{
		
		
		
		
		
			var d=document.getElementById("div1_3");	
			if (d.style.display=="none") {d.style.display="block";}
			d.innerHTML=Loadings.commenterror;

			Getid.eposition=new Getid.newid("","","");
	
		
		
		
		
		
		}
		






	//맵형
	}else{
	
		var items = lists.getElementsByTagName("item"); 
		
		
		var dot="&nbsp;";
		
		if(items.length > 0){
			var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);
			
			for(var i=0; i<items.length; i++){
				var button_div=document.getElementById('bt');
				button_div.innerHTML="";
				
				var item = items[i];
				var seq = item.getAttribute("seq");
				
				
				
				var epid = item.getElementsByTagName("epid")[0].firstChild.nodeValue;

				var epdomain = item.getElementsByTagName("epdomain")[0].firstChild.nodeValue;
				var epname = item.getElementsByTagName("epname")[0].firstChild.nodeValue;
				var px = item.getElementsByTagName("px")[0].firstChild.nodeValue;
				var py = item.getElementsByTagName("py")[0].firstChild.nodeValue;
				var zipcode = item.getElementsByTagName("zipcode")[0].firstChild.nodeValue;
				var region = item.getElementsByTagName("region")[0].firstChild.nodeValue;

				var tel = item.getElementsByTagName("tel")[0].firstChild.nodeValue;
				var fax = item.getElementsByTagName("fax")[0].firstChild.nodeValue;
				var hp = item.getElementsByTagName("hp")[0].firstChild.nodeValue;
				var homepage = item.getElementsByTagName("homepage")[0].firstChild.nodeValue;
				var mail = item.getElementsByTagName("mail")[0].firstChild.nodeValue;
				var image = item.getElementsByTagName("image")[0].firstChild.nodeValue;
				var memo = item.getElementsByTagName("memo")[0].firstChild.nodeValue;
				var sitename = item.getElementsByTagName("sitename")[0].firstChild.nodeValue;
				var requrl = item.getElementsByTagName("requrl")[0].firstChild.nodeValue;
				var regioncode = item.getElementsByTagName("regioncode")[0].firstChild.nodeValue;
				var url = item.getElementsByTagName("url")[0].firstChild.nodeValue;
				var userc = item.getElementsByTagName("userc")[0].firstChild.nodeValue;
				


				
				epid = decodeURIComponent(epid);
				epdomain = decodeURIComponent(epdomain);
				px = decodeURIComponent(px);
				py = decodeURIComponent(py);
				

				epname1=encodeURIComponent(epname)






				/*
				  imgchk integer NOT NULL DEFAULT 1,
				  detail_text text,
				  smallimg1 character varying(255),
				  smallimg1_text character varying(255),
				  smallimg2 character varying(255),
				  smallimg2_text character varying(255),
				  smallimg3 character varying(255),
				  smallimg3_text character varying(255),
				  
				  transportchk integer NOT NULL DEFAULT 1,
				  
				  bus character varying(500),
				  subway character varying(500),
				  car character varying(500),
				  etc character varying(500),
				  parking character varying(500)
				*/

				//소개글  
				AR_VALUE['detail_text']=  item.getElementsByTagName("detail_text")[0].firstChild.nodeValue;

				//기본정보 
				AR_VALUE['epname']= epname;
				AR_VALUE['image']= image;

				//교통정보 
				AR_VALUE['transportchk']=  item.getElementsByTagName("transportchk")[0].firstChild.nodeValue;
				AR_VALUE['bus']=  item.getElementsByTagName("bus")[0].firstChild.nodeValue;
				AR_VALUE['subway']=  item.getElementsByTagName("subway")[0].firstChild.nodeValue;
				AR_VALUE['car']=  item.getElementsByTagName("car")[0].firstChild.nodeValue;
				AR_VALUE['etc']=  item.getElementsByTagName("etc")[0].firstChild.nodeValue;
				AR_VALUE['parking']=  item.getElementsByTagName("parking")[0].firstChild.nodeValue;

				//연락처 

				AR_VALUE['tel']= tel;
				AR_VALUE['tel']= tel;
				AR_VALUE['fax']= fax;
				AR_VALUE['hp']= hp;
				AR_VALUE['mail']= mail;
				AR_VALUE['region']= region;
				AR_VALUE['open_info']=item.getElementsByTagName("open_info")[0].firstChild.nodeValue;

				//사진관
				AR_VALUE['imgchk']=  item.getElementsByTagName("imgchk")[0].firstChild.nodeValue;
				AR_VALUE['smallimg1']=  item.getElementsByTagName("smallimg1")[0].firstChild.nodeValue;
				AR_VALUE['smallimg1_text']=  item.getElementsByTagName("smallimg1_text")[0].firstChild.nodeValue;
				AR_VALUE['smallimg2']=  item.getElementsByTagName("smallimg2")[0].firstChild.nodeValue;
				AR_VALUE['smallimg2_text']=  item.getElementsByTagName("smallimg2_text")[0].firstChild.nodeValue;
				AR_VALUE['smallimg3']=  item.getElementsByTagName("smallimg3")[0].firstChild.nodeValue;
				AR_VALUE['smallimg3_text']=  item.getElementsByTagName("smallimg3_text")[0].firstChild.nodeValue;

				inhtml = "<DIV id='eposition_clipboard'  style='display:none'></DIV>";
				inhtml +="<table border=0 cellpadding=0 cellspacing=0 width=471px style='table-layout:fixed' background='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_bg1.gif'>";
				inhtml += "<tr height=2px><td background='"+Loadings.directory+"/OUTPUT/IMAGE/right_blank.gif'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_blank.gif'></td></tr>";
				inhtml += "<tr><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_top.gif'></td></tr>";

				inhtml += "<tr height=22><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_top1.gif' align=absmiddle> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button1.gif' onclick=eposition_detail_close(1)  align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button2.gif' onclick=eposition_detail_close(2) align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button3.gif' onclick=eposition_detail_close(3) align=absmiddle></td></tr>";
				inhtml+="<TR height=3><TD align=center ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_search_bar.gif'></TD></TR>";
				
				





				if (image)
				{
					var imagesrc="<table width=104px height=101px><tr><td align=center><a href='"+image+"' target=_blank><img src="+image+" id=smallimg onload=smallimg_resize()></a></td></tr></table>";
				}else{
					var imagesrc="<table background='"+Loadings.directory+"/OUTPUT/IMAGE/image_small_box.gif' width=104px height=101px><tr><td>&nbsp;</td></tr></table>";
				}
	


				inhtml+="<tr  id=epositiontr0><td>";

				inhtml+="<table cellpadding=0 cellspacing=0 >";
				inhtml+="<tr><td width=10px></td><td >"+imagesrc+"</td><td width=327px>";
						
				inhtml+="<table cellpadding=0 cellspacing=0 style='table-layout:fixed' width=337px>";


				

				if (epdomain=="사이사이"){
			
					inhtml+="<TR height=22 id='epositiontr1' style='display:block'><TD nowrap width=337px>"+dot+"ePosition : <b>"+epid+"#"+epdomain+"</b></TD></TR>";
				}
				else 
				{
					inhtml+="<TR height=22 id='epositiontr1' style='display:block'><TD nowrap width=337px>"+dot+"ePosition : <b><a href='javascript:void(0)' onclick=\"var k=document.getElementById('mapiframe');k.contentWindow.map_controls('"+px+"','"+py+"','"+epname1+"','"+epid+"','"+epdomain+"','"+url+"','"+hp+"','"+tel+"','"+fax+"','"+userc+"');\">"+epid+"#"+epdomain+"</a></b></TD></TR>";

				}
				inhtml+="<TR height=22 id='epositiontr2' style='display:block'><TD nowrap>"+dot+"Signpost Name: "+epname+"</TD></TR>";
				inhtml+="<TR height=22 id='epositiontr3' style='display:block'><TD nowrap>"+dot+"Country : "+region+"</TD></TR>";
				inhtml+="<TR height=22 id='epositiontr4' style='display:block'><TD nowrap>"+dot+"Homepage : "+homepage+"</TD></TR>";
				inhtml+="<TR height=22 id='epositiontr5' style='display:block'><TD nowrap>"+dot+"Telephone : HP : "+hp+" TEL : "+tel+"</TD></TR>";

				inhtml+="</table>";

				inhtml+="</td><td width=10px>";

				inhtml+="</td><tr>";
				inhtml+="</table>";




				inhtml+="</td></tr>";

				
				
				inhtml+="<TR height=3 id='epositiontr6'><TD align=center  ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_search_bar.gif'></TD></TR>";
				if (epdomain=="이고시오"  || epdomain=="egosio.com")
				{
					
					inhtml+="<TR height=22 id='epositiontr7'><TD align=center > <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_memo.gif'  onclick=mapinfopopup('memo') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_default.gif'  onclick=mapinfopopup('default') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_transport.gif'  onclick=mapinfopopup('transport') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_tel.gif'  onclick=mapinfopopup('telv') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_image.gif'  onclick=mapinfopopup('image') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview.gif'  onclick='eposition_multiview()' style='cursor:hand' align=absmiddle></TD></TR>";
				}else{
					inhtml+="<TR height=22 id='epositiontr7'><TD align=center ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/fax_send.gif' onclick=mapinfopopup('fax') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/sms_send.gif' onclick=mapinfopopup('hp') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_copy.gif' onclick=mapinfopopup('copy') align=absmiddle   style='cursor:hand'> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_mapview.gif' onclick=mapinfopopup('map') style='cursor:hand' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_favorite.gif' onclick=mapinfopopup('favorite') style='cursor:hand' align=absmiddle></TD></TR>";
				}
				
				inhtml += "<tr><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_bottom.gif'></td></tr>";

				inhtml+="</TABLE>";
			//google.html 
			//x,y,epname,epid,domain,homepage,hp,tel,fax
				var maploadid=document.getElementById('div1_1');
				//maploadid.innerHTML="";




				viewrVandH("mapiframe");

				//alert(document.getElementById('mapiframe'))
			

				if (k)
				{
					try{
						var k=document.getElementById('mapiframe');
						k.contentWindow.map_controls(px,py,epname,epid,epdomain,url,hp,tel,fax,userc);
					}catch(e){
						
						setTimeout('mapxy()',"100");

					}			
				}else{
					setTimeout('mapxy()',"1000");				
				}
			
				mapxy=function(){
					
					try{
						var k=document.getElementById('mapiframe');
						k.contentWindow.map_controls(px,py,epname,epid,epdomain,url,hp,tel,fax,userc);
					}catch(e){
						
						setTimeout('mapxy()',"100");

					}						


				}
				
				//alert(3)

			}
			//alert(1) 
			
				//document.getElementById("memo").value=inhtml
			a.innerHTML=inhtml;

			//alert()
			//코맨트 출력
			comment_list();

			//alert(1) 
			smallimg_resize()
		//alert(incontents)
			setTimeout("smallimg_resize()","100");


		}else{


			var d=document.getElementById("div1_3");	
			if (d.style.display=="none") {d.style.display="block";}
			d.innerHTML=Loadings.commenterror;
			
			
			Getid.eposition=new Getid.newid("","","");

		}



	}

}
function smallimg_resize(){

	var img1=document.getElementById('smallimg');
//alert(img1.width + " " + img1.height) 
	if (img1)
	{
		//alert(img1.width + " " + img1.height) 
	
		if (img1.width > img1.height)
		{
			if (img1.width > 98)
			{
				img1.width=98
			}

		}else{
			if (img1.height > 95){
			img1.height=95

			}
		
		}


	}

}
eposition_multiview=function(){

	//<img src='"+Loadings.directory+"/OUTPUT/IMAGE/fax_send.gif' onclick=mapinfopopup('fax') style='cursor:hand' align=absmiddle> 
	//<img src='"+Loadings.directory+"/OUTPUT/IMAGE/sms_send.gif' onclick=mapinfopopup('hp') style='cursor:hand' align=absmiddle> 
	//<img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_copy.gif' onclick=mapinfopopup('copy') align=absmiddle   style='cursor:hand'>
	//<img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_mapview.gif' onclick=mapinfopopup('map') style='cursor:hand' align=absmiddle> 
	//<img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_favorite.gif' onclick=mapinfopopup('favorite') style='cursor:hand' align=absmiddle>

	if (_gel('epositionmulti_div'))
	{		
		_gel('epositionmulti_div').parentNode.removeChild(_gel('epositionmulti_div'));
		return false;
	}


	var e=true;
	var a="";
	var s=""
	//alert(a+" "+b+" "+c);
	
	var b=_gel('div1_3')
	fam=document.createElement('div');

	fam.setAttribute("id","epositionmulti_div");
	fam.style.position='absolute';

	fam.style.top=parseInt(ao(b,false)+100) + "px";
	//fam.style.left=parseInt(ao(b,false)+200) + "px";

	fam.style.left='374px';
	
	var epHTML="<table style='border: solid #969696 1px;' cellspacing=0 cellpadding=0 bgcolor='#F7F7F7' width=92px height=130px onMouseover=cl(true) onMouseout='cl(false)'>";
	epHTML+="<tr height='19px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_fax.gif' onclick=mapinfopopup('fax') style='cursor:hand' align=absmiddle></td></tr>";
	epHTML+="<tr height='1px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_bar.gif'></td></tr>";
	epHTML+="<tr height='19px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_sms.gif' onclick=mapinfopopup('hp') style='cursor:hand' align=absmiddle></td></tr>";
	epHTML+="<tr height='1px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_bar.gif'></td></tr>";
	epHTML+="<tr height='19px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_copy.gif' onclick=mapinfopopup('copy') align=absmiddle   style='cursor:hand'></td></tr>";
	epHTML+="<tr height='1px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_bar.gif'></td></tr>";
	epHTML+="<tr height='19px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_map.gif' onclick=mapinfopopup('map') style='cursor:hand' align=absmiddle></td></tr>";
	epHTML+="<tr height='1px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_bar.gif'></td></tr>";
	epHTML+="<tr height='19px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_favorite.gif' onclick=mapinfopopup('favorite') style='cursor:hand' align=absmiddle></td></tr>";
	epHTML+="<tr height='19px'><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_multiview_cancel.gif' align=absmiddle onclick=\"var b=document.getElementById('div1_3');b.removeChild(document.getElementById('epositionmulti_div'))\"; style='cursor:hand'></td></tr>";
	epHTML+="</table>";
	fam.innerHTML=epHTML;
	b.appendChild(fam);

	cl=function(bl){
		e=bl
		if (e==false && _gel('epositionmulti_div')){
			s=setTimeout("cremovel()","5000");
		}else{
			clearTimeout(s)
		}
	
	}
	cremovel=function(){
		if (e==false && _gel('epositionmulti_div')) {
			option1="";
			_gel('epositionmulti_div').parentNode.removeChild(_gel('epositionmulti_div'))
		}
	}


}

ajax.ContentLoader.prototype.multi_view=function(a){

//	alert(AR_VALUE[a][2])
var obt=document.getElementById('obt');

if (obt ){
obt.parentNode.removeChild(obt)
}


	if (AR_VALUE[a][0]=="NULL") AR_VALUE[a][0]=""; //넘버
	if (AR_VALUE[a][1]=="NULL") AR_VALUE[a][1]=""; //ePosition넘버
	if (AR_VALUE[a][2]=="NULL") AR_VALUE[a][2]=""; //타입
	if (AR_VALUE[a][3]=="NULL") AR_VALUE[a][3]=""; //url
	if (AR_VALUE[a][4]=="NULL") AR_VALUE[a][4]=""; //이미지
	if (AR_VALUE[a][5]=="NULL") AR_VALUE[a][5]=""; //ePosition
	if (AR_VALUE[a][6]=="NULL") AR_VALUE[a][6]=""; //이넘
	if (AR_VALUE[a][7]=="NULL") AR_VALUE[a][7]=""; //메모
	if (AR_VALUE[a][8]=="NULL") AR_VALUE[a][8]=""; //디폴트뷰
	if (AR_VALUE[a][9]=="NULL") AR_VALUE[a][9]=""; //공개
	if (AR_VALUE[a][10]=="NULL") AR_VALUE[a][10]=""; //날짜
	if (AR_VALUE[a][11]=="NULL") AR_VALUE[a][11]=""; //Subject


	if (AR_VALUE[a][2]=="eposition"){
		


		//viewrVandH("mapiframe");
		
		
		if (AR_VALUE[a][5]!="NULL"  && AR_VALUE[a][5]!="")
		{
			//alert(AR_VALUE[a][5])
			var ep=AR_VALUE[a][5].split("#");
			//alert(ep)
			var epid=ep[0];
			var domain=ep[1];
			var params="epid="+encodeURIComponent(epid);
			params+="&domain="+encodeURIComponent(domain);
		
			var loader4=new ajax.xhr.Request("XML_PHP/unity_xml_detail.php",params,ajax.ContentLoader.prototype.eposition_xml_xy,"POST","");
			//window.open("XML_PHP/unity_xml_detail.php?"+params)
			//alert(loader4.req.responseText)
		}
	
		
	
	}else if (AR_VALUE[a][2]=="movie"){
		var obt=document.getElementById('obt');


		var button_div=document.getElementById('bt');
	
		if (obt)
		{
			var bt= document.createElement("div");

		}else{
			var bt= document.createElement("div");
		
		}

		bt.id='obt';
		bt.style.left='410px';
		bt.style.top='8px';
		bt.style.position='absolute';

		bt.innerHTML="<table><tr><td><a href='"+AR_VALUE[a][3]+"' style='cursor:hand' target=_blank>Original link</a></td></tr></table>";
		button_div.appendChild(bt);

		
		
		viewrVandH("Mlink");
	
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'><tr height=344px><td align=center><embed src='"+AR_VALUE[a][3]+"' width='458px' height='324px'  allowScriptAccess='always' type='application/x-shockwave-flash' allowFullScreen='true'></embed></td></tr><tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr><tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr></table>";

	
		
		
		var Mlinkdiv=document.getElementById('Mlink');

		Mlinkdiv.innerHTML=incontents;
		/*
		if (!document.getElementById('Mlink'))
		{
			setTimeout("view_contents(a)",1000);	
		}else{
			view_contents(a)
		}
	*/
	


	}else if (AR_VALUE[a][2]=="url"){
		viewrVandH("Mlink");
	
		
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_title.gif'></td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";



		if (AR_VALUE[a][4]!="")	incontents+="<tr  height=221px><td><table width='256px' height='187px' background='"+Loadings.directory+"/OUTPUT/IMAGE/url_box.gif' border=0 cellpadding=0 cellspacing=0><tr><td><a href='"+AR_VALUE[a][3]+"' target=blank><img src='http://ucici.net/MapImage/"+AR_VALUE[a][4]+"' id=img1 width=250px height=181px></a></td></tr></table></td></tr>"; 
		
		else incontents+="<tr height=221px><td><table width='256px' height='187px' background='"+Loadings.directory+"/OUTPUT/IMAGE/url_box.gif' border=0><tr><td></td></tr></table></td></tr>"; 
		

		incontents+="<tr height=101px><td><table cellpadding=0 cellspacing=0>";
		incontents+="<tr height=22px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_dot.gif' align=absmiddle>&nbsp;<b>Subject : `"+AR_VALUE[a][11]+"`</b></td></tr><tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_bar.gif'></td></tr>"; 
		
		incontents+="<tr height=22px><td align=left nowrap><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_dot1.gif' align=absmiddle nowrap>&nbsp;Memo :"+AR_VALUE[a][7]+"</td></tr><tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_bar.gif'></td></tr>"; 

	



		
		if (AR_VALUE[a][3]) incontents+="<tr height=22px ><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_dot1.gif' align=absmiddle>&nbsp;Homepage : <img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_icon.gif' align=absmiddle>&nbsp; <a href='"+AR_VALUE[a][3]+"' target=_blank>[LINK]</a></td></tr><tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_bar.gif'></td></tr></table>"; 
		
		incontents+="</td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";

		incontents+="</table>";
		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		

	
	
	}else if (AR_VALUE[a][2]=="news"){
		viewrVandH("Mlink");
	
		
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/news_title.gif'></td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		
		if (AR_VALUE[a][4]!="")	incontents1="<img src='http://ucici.net/MapImage/"+AR_VALUE[a][4]+"' id=img1 width='179px' height='133px' align=left  style='padding:3'>"; 

		if (AR_VALUE[a][11])	{ incontents2="<b>`"+AR_VALUE[a][11]+"`</b><br>"; }
	
			
		if (AR_VALUE[a][7])	{
			

			while( AR_VALUE[a][7].indexOf("\n") > 0 ) { 
				AR_VALUE[a][7] = AR_VALUE[a][7].replace("\n","<br>"); 

			}
			incontents+="<tr height=290px><td align=left valign=top style='padding:5px'>"+incontents1+""+""+incontents2+""+AR_VALUE[a][7]+"</td></tr>"; 
			
		}else incontents+="<tr height=290px ><td align=left valign=top style='padding:5px'>"+incontents1+"</td></tr>"; 

		if (AR_VALUE[a][3])	{ incontents+="<tr height=22px><td align=left nowrap>Original Link : <a href='"+AR_VALUE[a][3]+"' target=_blank>"+AR_VALUE[a][3]+"</a></td></tr>"; }

		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";
		incontents+="</table>";
		
		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		
		
	
		
	
	
	
	}else if (AR_VALUE[a][2]=="enum"){
		viewrVandH("Mlink");
	
		
		if (AR_VALUE[a][6]!="")
		{
			//alert(AR_VALUE[a][5])
			var params="ENUM="+encodeURIComponent(AR_VALUE[a][6]);
		
			var loader4=new ajax.xhr.Request("XML_PHP/eposition_xml_enum.php",params,ajax.ContentLoader.prototype.eposition_xml_enum,"POST","");
			//window.open("XML_PHP/eposition_xml_enum.php?"+params)
			//alert(loader4.req.responseText)
		}
	
	
	
	}else if (AR_VALUE[a][2]=="image"){
		viewrVandH("Mlink");
	
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_title.gif'></td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";


		//if (AR_VALUE[a][6])	incontents+="<tr><td>"+AR_VALUE[a][6]+"</td></tr>"; 
		
		if (AR_VALUE[a][4]!="")	incontents+="<tr height=322px><td><table width='441px' height='271px'  border=0 cellpadding=0 cellspacing=0><tr><td><a href='http://ucici.net/MapImage/"+AR_VALUE[a][4]+"' target=blank><img src='http://ucici.net/MapImage/"+AR_VALUE[a][4]+"' id=img1 ></a></td></tr></table></td></tr>"; 
		else 	incontents+="<tr height=322px><td><table width='441px' height='271px' background='"+Loadings.directory+"/OUTPUT/IMAGE/image_box.gif' border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table></td></tr>"; 
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";
		
		incontents+="</table>";
		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		
		var img1=document.getElementById('img1');

		if (img1)
		{
				if (img1.width > 441)
				{
					img1.width=441
				}

		}	
	
	
	
	
	}



}

//도메인이 사이사이 일경우 ePosition에 #사이사이 가 들어 갔을경우 
ajax.ContentLoader.prototype.multi_view1=function(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11){

	if (a0=="NULL") a0=""; //넘버
	if (a1=="NULL") a1=""; //ePosition넘버
	if (a2=="NULL") a2=""; //타입
	if (a3=="NULL") a3=""; //url
	if (a4=="NULL") a4=""; //이미지
	if (a5=="NULL") a5=""; //ePosition
	if (a6=="NULL") a6=""; //이넘
	if (a7=="NULL") a7=""; //메모
	if (a8=="NULL") a8=""; //디폴트뷰
	if (a9=="NULL") a9=""; //공개
	if (a10=="NULL") a10=""; //날짜
	if (a11=="NULL") a11=""; //Subject



	//ucici_popup(\""+AR_V[0][1]+"\",\""+AR_V[0][2]+"\",\""+AR_T[i][j]+"\",\""+temp_type+"\")'


	if (a2=="eposition"){
		
		alert('에혀..')
		
	
	}else if (a2=="movie"){
		



		//alert(a)
		
		viewrVandH("Mlink");
	
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'><tr height=344px><td align=center><embed src='"+a3+"' width='458px' height='324px'  allowScriptAccess='always' type='application/x-shockwave-flash' allowFullScreen='true'></embed></td></tr><tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr><tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr></table>";

		
		
		var Mlinkdiv=document.getElementById('Mlink');

		Mlinkdiv.innerHTML=incontents;
		


		/*
		if (!document.getElementById('Mlink'))
		{
			setTimeout("view_contents(a)",1000);	
		}else{
			view_contents(a)
		}
	*/
	
	}else if (a2=="url"){
		viewrVandH("Mlink");
	
		
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_title.gif'></td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";



		if (a4!="")	incontents+="<tr  height=221px><td><table width='256px' height='187px' background='"+Loadings.directory+"/OUTPUT/IMAGE/url_box.gif' border=0 cellpadding=0 cellspacing=0><tr><td><a href='"+a3+"' target=blank><img src='"+a4+"' id=img1 width=250px height=181px></a></td></tr></table></td></tr>"; 
		
		else incontents+="<tr height=221px><td><table width='256px' height='187px' background='"+Loadings.directory+"/OUTPUT/IMAGE/url_box.gif' border=0><tr><td></td></tr></table></td></tr>"; 
		

		incontents+="<tr height=101px><td><table cellpadding=0 cellspacing=0>";
		incontents+="<tr height=22px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_dot.gif' align=absmiddle>&nbsp;<b>Subject `"+a11+"`</b></td></tr><tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_bar.gif'></td></tr>"; 
		incontents+="<tr height=22px><td align=left nowrap><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_dot1.gif' align=absmiddle nowrap>&nbsp;Memo :"+a7+"</td></tr><tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_bar.gif'></td></tr>"; 

		if (a3)incontents+="<tr height=22px ><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_dot1.gif' align=absmiddle>&nbsp;Homepage : <img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_icon.gif' align=absmiddle>&nbsp; <a href='"+a3+"' target=_blank>[LINK]</a></td></tr><tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_bar.gif'></td></tr></table>"; 
		
		incontents+="</td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";

		incontents+="</table>";
		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		

	
	
	}else if (a2=="news"){
		viewrVandH("Mlink");
		

		
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/news_title.gif'></td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		if (a4!="") {	var incontents1="<img src='"+a4+"' id=img1 width='179px' height='133px' align=left  style='padding:3'>"; }
		else {var  incontents1="";} 
		if (a11)	{ incontents2="<b>`"+a11+"`</b><br>"; }
		if (a3)	{ 
			var incontent_original="<br><br><b>Original link</b> : <a href='"+a3+"' target=_blank>"+a3+"</a>";
		}else{ 
			var incontent_original=""
		}


			
		if (a7)	{
			

			while( a7.indexOf("\n") > 0 ){ 
				a7 = a7.replace("\n","<br>"); 

			}
			incontents+="<tr height=302px><td align=left valign=top style='padding:10px'>"+incontents1+""+""+incontents2+""+left_cut(a7,500)+".."+incontent_original+"</td></tr>"; 
			
		}else incontents+="<tr height=302px ><td align=left valign=top style='padding:10px'>"+incontents1+""+incontent_original+"</td></tr>"; 

		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";
		incontents+="</table>";
		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		
		
	
		
	
	
	
	}else if (a2=="enum"){
		viewrVandH("Mlink");
	
		
		if (a6!="")
		{
			//alert(a5)
			var params="ENUM="+encodeURIComponent(a6);
		
			var loader4=new ajax.xhr.Request("XML_PHP/eposition_xml_enum.php",params,ajax.ContentLoader.prototype.eposition_xml_enum,"POST","");
			//window.open("XML_PHP/eposition_xml_enum.php?"+params)
			//alert(loader4.req.responseText)
		}
	
	
	
	}else if (a2=="image"){
		viewrVandH("Mlink");
	
		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/image_title.gif'></td></tr>";
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";


		//if (a6)	incontents+="<tr><td>"+a6+"</td></tr>"; 
		
		if (a4!="")	incontents+="<tr height=322px><td><table width='441px' height='271px'  border=0 cellpadding=0 cellspacing=0><tr><td><a href='"+a4+"' target=blank><img src='"+a4+"' id=img1></a></td></tr></table></td></tr>"; 
		else 	incontents+="<tr height=322px><td><table width='441px' height='271px' background='"+Loadings.directory+"/OUTPUT/IMAGE/image_box.gif' border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table></td></tr>"; 
		incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";
		
		incontents+="</table>";
		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		
		//var img1=document.getElementById('img1');
	
	
		img_resize1()
		//alert(incontents)
		setTimeout("img_resize1()","100");
	
	
	}
	
}

function left_cut(str,len){
	
	if (str==null || str=="") return str;
	var strLength=str.length;
	if (strLength<1 || len>=strLength) return str;
	else return str.substr(0,len);
}
function img_resize1(){

	var img1=document.getElementById('img1');

	if (img1)
	{
//		alert(img1.width + " " + img1.height) 
	
		if (img1.width > img1.height)
		{
			if (img1.width > 441)
			{
				img1.width=441
			}

		}else{
				if (img1.height > 300){
			img1.height=300

		}
		
		}


	}

}


//맵뷰어 부분 검색 결과가 없거나 처음 들어왔을때 광고보여주기
default_view=function(){
	viewrVandH("Mlink");
	var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
	incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left><img src='"+Loadings.directory+"/OUTPUT/IMAGE/url_title.gif'></td></tr>";
	incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";


	//if (AR_VALUE[a][6])	incontents+="<tr><td>"+AR_VALUE[a][6]+"</td></tr>"; 
	
	incontents+="<tr height=322px><td><table width='441px' height='271px' background='"+Loadings.directory+"/OUTPUT/IMAGE/image_box.gif' border=0 cellpadding=0 cellspacing=0><tr><td></td></tr></table></td></tr>"; 
	incontents+="<tr height=1px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
	incontents+="<tr bgcolor='#F9F9F9' height=40px><td>&nbsp;</td></tr>";
	
	incontents+="</table>";
	var Mlinkdiv=document.getElementById('Mlink');
	Mlinkdiv.innerHTML=incontents;


}

//사이사이 ePosition 좌표 뿌려주기
ajax.ContentLoader.prototype.eposition_xml_xy=function(){



	var dot="&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/dot.gif' align=absmiddle>&nbsp;";
	var k=document.getElementById('mapiframe');
	var a=document.getElementById("div1_3");	
	a.style.overflow="hidden";

	//멀티형
	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; 
	var items = lists.getElementsByTagName("eposition");
	


	if (lists.getAttribute("type")=="multi")
	{

	
		var dot="&nbsp;";

		//var items = lists.getElementsByTagName("eposition")[0]; 

		if (items[0].getElementsByTagName("RESULT")[0].firstChild.nodeValue=="notfind" )
		{

			
		}

		
		if(items.length > 0){
	
			var v=new Array(); 
			var t=new Array(); 

			var item = items[1];

			var SEQ = item.getAttribute("SEQ");
			var AR = item.getAttribute("AR");
			



			AR_ARRAY=AR.split(",");
			
			
			for (j=0;j<AR_ARRAY.length-1 ; j++)
			{
				v[j]= item.getElementsByTagName(AR_ARRAY[j+1])[0].firstChild.nodeValue;
			
				t[j]= item.getElementsByTagName(AR_ARRAY[j+1])[0].getAttribute("format");
	
			//alert(i +" "+ j + " "+ item.getElementsByTagName(AR_ARRAY[j+1])[0].firstChild.nodeValue + " " + item.getElementsByTagName(AR_ARRAY[j+1])[0].getAttribute("format"))
			//alert(item.getElementsByTagName(AR_ARRAY[j+1])[0].firstChild.nodeValue)


			}

			//ajax.ContentLoader.prototype.multi_view(1)
			//if (AR_VALUE[0][2]!="eposition") viewrVandH("Mlink");
			//else viewrVandH("mapiframe");
		}
	
	
	
		ajax.ContentLoader.prototype.multi_view1(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11])

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	//맵형
	}else{
	

		var items = lists.getElementsByTagName("item"); 
		
		
		var dot="&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/dot.gif' align=absmiddle>&nbsp;";
		
		if(items.length > 0){
			var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);
			
			for(var i=0; i<items.length; i++){
				var item = items[i];
				
				var seq = item.getAttribute("seq");
				
				
				var epid = item.getElementsByTagName("epid")[0].firstChild.nodeValue;

				var epdomain = item.getElementsByTagName("epdomain")[0].firstChild.nodeValue;
				var epname = item.getElementsByTagName("epname")[0].firstChild.nodeValue;
				var px = item.getElementsByTagName("px")[0].firstChild.nodeValue;
				var py = item.getElementsByTagName("py")[0].firstChild.nodeValue;
				var zipcode = item.getElementsByTagName("zipcode")[0].firstChild.nodeValue;
				var region = item.getElementsByTagName("region")[0].firstChild.nodeValue;

				var tel = item.getElementsByTagName("tel")[0].firstChild.nodeValue;
				var fax = item.getElementsByTagName("fax")[0].firstChild.nodeValue;
				var hp = item.getElementsByTagName("hp")[0].firstChild.nodeValue;
				var homepage = item.getElementsByTagName("homepage")[0].firstChild.nodeValue;
				var mail = item.getElementsByTagName("mail")[0].firstChild.nodeValue;
				var image = item.getElementsByTagName("image")[0].firstChild.nodeValue;
				var memo = item.getElementsByTagName("memo")[0].firstChild.nodeValue;
				var sitename = item.getElementsByTagName("sitename")[0].firstChild.nodeValue;
				var requrl = item.getElementsByTagName("requrl")[0].firstChild.nodeValue;
				var regioncode = item.getElementsByTagName("regioncode")[0].firstChild.nodeValue;
				var url = item.getElementsByTagName("url")[0].firstChild.nodeValue;
				var userc = item.getElementsByTagName("userc")[0].firstChild.nodeValue;

				epid = decodeURIComponent(epid);
				epdomain = decodeURIComponent(epdomain);
				px = decodeURIComponent(px);
				py = decodeURIComponent(py);

				if (epdomain=="사이사이")
				{

				
				}else{

					viewrVandH("mapiframe");

					//alert(document.getElementById('mapiframe'))
				

					if (k)
					{
						try{
							var k=document.getElementById('mapiframe');
							k.contentWindow.map_controls(px,py,epname,epid,epdomain,url,hp,tel,fax,userc);
						}catch(e){
							
							setTimeout('mapxy()',"100");

						}			
					}else{
						setTimeout('mapxy()',"1000");				
					}
				
					mapxy=function(){
						
						try{
							var k=document.getElementById('mapiframe');
							k.contentWindow.map_controls(px,py,epname,epid,epdomain,url,hp,tel,fax,userc);
						}catch(e){
							
							setTimeout('mapxy()',"100");

						}						


					}
					
					//alert(3)

				}

				//a.innerHTML=inhtml;
				//코맨트 출력
				//comment_list();

			}
			

		}else{

			alert("No ePosition.")			
		}



	}



}


//5.4.5.9.3.0.4.8.1.2.8.e164.arpa. 10 IN NAPTR 10 101 "u" "E2U+ep" "!^.*$!ep:e0a174959b5a4616d133ca637b3d0f!" .
//5.4.5.9.3.0.4.8.1.2.8.e164.arpa. 10 IN NAPTR 10 101 "u" "E2U+mailto" "!^.*$!mailto:jedinjs@paran.com!" .
//5.4.5.9.3.0.4.8.1.2.8.e164.arpa. 10 IN NAPTR 10 101 "u" "E2U+mobile" "!^.*$!tel:018-403-9545!" .
//5.4.5.9.3.0.4.8.1.2.8.e164.arpa. 10 IN NAPTR 10 102 "u" "E2U+http" "!^.*$!http://egosio.com!" .
//5.4.5.9.3.0.4.8.1.2.8.e164.arpa. 10 IN NAPTR 10 103 "u" "E2U+fax" "!^.*$!tel:042-828-7717!" .
//5.4.5.9.3.0.4.8.1.2.8.e164.arpa. 10 IN NAPTR 10 100 "u" "E2U+fixed" "!^.*$!tel:018-403-9545!" .

ajax.ContentLoader.prototype.eposition_xml_enum=function(){
	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; 

	var items = lists.getElementsByTagName("item"); 
		
	var dot="&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/dot.gif' align=absmiddle>&nbsp;";
	
	if(items.length > 0){
		
		for(var i=0; i<items.length; i++){
			var item = items[i];
			
			var seq = item.getAttribute("seq");
			
			var ep = item.getElementsByTagName("ep")[0].firstChild.nodeValue;
			var mailto = item.getElementsByTagName("mailto")[0].firstChild.nodeValue;
			var mobile = item.getElementsByTagName("mobile")[0].firstChild.nodeValue;
			var http = item.getElementsByTagName("http")[0].firstChild.nodeValue;
			var fax = item.getElementsByTagName("fax")[0].firstChild.nodeValue;
			var fixed = item.getElementsByTagName("fixed")[0].firstChild.nodeValue;



		var incontents="<table cellspacing=0 cellpadding=0 width=469px height=383px style='table-layout:fixed'>";
		incontents+="<col align=left width=50px>"; 
		incontents+="<col align=left>"; 
		
		incontents+="<tr bgcolor='#F9F9F9' height=21px><td align=left colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_title.gif'></td></tr>";
		incontents+="<tr height=1px><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";

		incontents+="<tr height=322px><td colspan=2 align=center valign=top><br>";
		incontents+="	<table width='441px' height='271px' background='"+Loadings.directory+"/OUTPUT/IMAGE/enum_box.gif' border=0 cellpadding=0 cellspacing=0><tr><td width=125 align=right><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_img.gif'></td><td valign=top align=left>";

		incontents+="	<table align=left cellspacing=3 cellpadding=0 >";
		incontents+="	<tr><td colspan=2 ><br><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_logo.gif'></td></tr>"; 
		incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;ENUM</td><td>: "+chk_enum1(fixed)+"</td></tr>"; 
		incontents+="	<tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 

		incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;Telehome</td><td>: "+fixed+"</td></tr><tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 
		
		if (ep) incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;ePosition</td><td>: "+ep+"</td></tr><tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 
		if (mailto) incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;Email</td><td>: "+mailto+"</td></tr><tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 
		if (mobile) incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;Telephone</td><td>: "+mobile+"</td></tr><tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 
		if (http) incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;Homepage</td><td>: "+http+"</td></tr><tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 
		if (fax) incontents+="	<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_dot.gif' align=absmiddle>&nbsp;Fax</td><td>: "+fax+"</td></tr><tr><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/enum_bar.gif'></td></tr>"; 

		

		incontents+="	</table>"; 
		incontents+="	</td></tr></table>"; 
		incontents+="	</td></tr>"; 
		incontents+="<tr height=1px ><td colspan=2><img src='"+Loadings.directory+"/OUTPUT/IMAGE/viewer_bar.gif'></td></tr>";
		incontents+="<tr bgcolor='#F9F9F9' height=39px ><td colspan=2>&nbsp;</td></tr>";

		incontents+="</table>";

		var Mlinkdiv=document.getElementById('Mlink');
		Mlinkdiv.innerHTML=incontents;
		



		}
	}
}

function chk_enum1(en)
{

	var evalue = en;

	var tmp;
	var retNumber = new Array(4);
	retNumber[0] = "+82";

	var num = evalue;

	num = num.replace(/ /gi, "");
	num = num.replace(/\-/gi,"");
	num = num.replace(/\+82/gi,"");



	// Address번호 만들기
	if ( num.substr(0,2) == "02" )
	{
		retNumber[1] = "2";
		num = num.substr(2,num.length-1);
	}
	else if ( num.substr(0,1) == "2" )
	{
		retNumber[1] = "2";
		num = num.substr(1,num.length-1);
	}
	else
	{
		switch ( num.substr(0,3) )
		{
			case "031" : tmp="31"; break;
			case "032" : tmp="32"; break;
			case "033" : tmp="33"; break;
			case "041" : tmp="41"; break;
			case "042" : tmp="42"; break;
			case "043" : tmp="43"; break;
			case "051" : tmp="51"; break;
			case "052" : tmp="52"; break;
			case "053" : tmp="53"; break;
			case "054" : tmp="54"; break;
			case "055" : tmp="55"; break;
			case "061" : tmp="61"; break;
			case "062" : tmp="62"; break;
			case "063" : tmp="63"; break;
			case "064" : tmp="64"; break;
			case "010" : tmp="10"; break;
			case "011" : tmp="11"; break;
			case "016" : tmp="16"; break;
			case "017" : tmp="17"; break;
			case "018" : tmp="18"; break;
			case "019" : tmp="19"; break;
			default : tmp = "";
		}
		if ( tmp == "" )
		{
			switch ( num.substr(0,2) )
			{
				case "31" : tmp="31"; break;
				case "32" : tmp="32"; break;
				case "33" : tmp="33"; break;
				case "41" : tmp="41"; break;
				case "42" : tmp="42"; break;
				case "43" : tmp="43"; break;
				case "51" : tmp="51"; break;
				case "52" : tmp="52"; break;
				case "53" : tmp="53"; break;
				case "54" : tmp="54"; break;
				case "55" : tmp="55"; break;
				case "61" : tmp="61"; break;
				case "62" : tmp="62"; break;
				case "63" : tmp="63"; break;
				case "64" : tmp="64"; break;
				case "10" : tmp="10"; break;
				case "11" : tmp="11"; break;
				case "16" : tmp="16"; break;
				case "17" : tmp="17"; break;
				case "18" : tmp="18"; break;
				case "19" : tmp="19"; break;
				default : tmp = "";
			}

				retNumber[1] = tmp;
				num = num.substr(2,num.length-1);
		}
		else
		{
			retNumber[1] = tmp;
			num = num.substr(3,num.length-1);
		}
	}

	if ( num.length == 7 )
	{
		retNumber[2] = num.substr(0,3);
		retNumber[3] = num.substr(3,4);
	}
	else if ( num.length == 8 )
	{
		retNumber[2] = num.substr(0,4);
		retNumber[3] = num.substr(4,4);
	}

	num = retNumber.join("-");
	return num;
}


//선택된 ePosition 아이디 전역변수에 저장
var Getid=new Object();
Getid.eposition=new Array();

Getid.newid=function(epid,domain,qurl){
	this.epid=epid;
	this.domain=domain;

	this.qurl=qurl;
	if (this.qurl=="")  this.qurl="http://egosio.epmap.egosio.com/";

	Getid.eposition=this;
}


//ePosition 상세 정보 보기 xml 받음
function eposition_result(a,b,c){
	//alert(a + " " + b)
	if (b=="보물찾기"){
		window.open(c+"/d/?epid="+a);
		return false;
	}
	var d=document.getElementById("div1_3");	
	if (d.style.display=="none") {d.style.display="block";}
	d.innerHTML=Loadings.comment;

	Getid.eposition=new Getid.newid(a,b,c);
	a=encodeURIComponent(a);
	b=encodeURIComponent(b);
	c=encodeURIComponent(c);
	var params = "epid="+a+"&domain="+b+"&qu="+c;
	//var loader4=new ajax.ContentLoader("XML_PHP/unity_xml_detail.php",ajax.ContentLoader.prototype.eposition_detail,null,'GET',params);
	//window.open("XML_PHP/unity_xml_detail.php?"+params)
	var loader4=new ajax.xhr.Request("XML_PHP/unity_xml_detail.php",params,ajax.ContentLoader.prototype.eposition_detail,"GET","");

	
}



function eposition_detail_close(a){
	var t0=document.getElementById("epositiontr0");
	var t1=document.getElementById("epositiontr1");
	var t2=document.getElementById("epositiontr2");
	var t3=document.getElementById("epositiontr3");
	var t4=document.getElementById("epositiontr4");
	var t5=document.getElementById("epositiontr5");
	var t6=document.getElementById("epositiontr6");
	var t7=document.getElementById("epositiontr7");

	if (a==3)
	{
		var div2_2=document.getElementById("div1_3");
		div2_2.style.display="none";
	}else if (a==2)
	{
		if (t1.style.display=="none")
		{
			//themasearch()
			eposition_result(Getid.eposition.epid,Getid.eposition.domain,Getid.eposition.qurl)
		}

	}else if (a==1)
	{
		if (t1.style.display=="block")
		{
			t0.style.display="none"
			t1.style.display="none"
			t2.style.display="none"
			t3.style.display="none"
			if (t4) t4.style.display="none";
			if (t5) t5.style.display="none";
			t6.style.display="none"
			t7.style.display="none"
		}

	}

}


/*#####################################################################ePosition 상세정보 끝########################################################*/










/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         태마검색 시작                                                                                             #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/


function themasearch_close(a){
	t1=document.getElementById("thematr1");
	t2=document.getElementById("thematr2");

	if (a==3)
	{
		var div2_2=document.getElementById("div2_2");
		div2_2.style.display="none";
	}else if (a==2)
	{

		if (t1.style.display=="none")
		{
			themasearch()
		}

	}else if (a==1)
	{
		if (t1.style.display=="block")
		{
			t1.style.display="none"
			t2.style.display="none"
		}

	}

}

var selectedIdxNum = 0;

function sg_display(mode)
{
	if(mode==null)mode='none';
	var div_box = document.getElementById('sg');
	var div_data = document.getElementById('sg_category');
	if ( div_data.innerHTML != "" )
	{
		//div_box.style.display = mode;
	}
}



function themasearch(){


}



//Address선택
function AreaSelect1(Z,a){
	
	if (a==1)
	{
		
		document.getElementById('region_sub1').options.length=0;
		document.getElementById('region_sub1').options[0]=new Option("GU/GUN","");
		if(Z)
		{
			for(i=0;i<AreaS[Z].length;i++) {
				Temp=AreaS[Z][i].split(",");
				newItem=new Option(Temp[2]);
				newItem.value = Temp[1];
				document.getElementById('region_sub1').options.add(newItem,i+1);
			
			

			
			}
		}

	
	}


}



function thema_search(){





//var loader_region=new ajax.xhr.Request("http://map.eposition.com/map_util/get_addr_from_naver.php?query=동구",params,ajax.ContentLoader.prototype.send_fax,"POST","");
//http://map.eposition.com/map_util/get_addr_from_naver.php?query=동구



}







ajax.ContentLoader.prototype.tag_list=function(){

	var lists = this.req.responseText


	var a=lists.split(",");
	var b_html="<table><tr><td>";
	var fontColor="#003366";
	var b=document.getElementById('thema_tag')

	for (i=0; i<a.length; i++)
	
	{
	
	if (i%2==0)
	{
		fontColor="#C75B01";
	}else{
		fontColor="#999900";
	}
		//<a href=\"javascript:sg_values('공원')\">공원</a>
		b_html +=" <img src='"+Loadings.directory+"/OUTPUT/IMAGE/thema_tag_dot.gif' align=absmiddle> <a href=javascript:sg_values('"+a[i]+"')><FONT COLOR='"+fontColor+"'>"+a[i]+"</font></a> ";
	}
	b.innerHTML=b_html+"</td></tr></table>";
}

/*#####################################################################태마검색 끝##################################################################*/











/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         즐겨찾기매뉴 시작                                                                                       #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/




ajax.ContentLoader.prototype.favorite_menu_list=function(){

	search_location(3)

}

/*###################################################################즐겨찾기매뉴 끝###############################################################*/








/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                                         즐겨찾기목록 시작                                                                                       #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/




var THISPAGE_FAVORITE=1;
var LISTUNIT_FAVORITE=10;
var PAGEUNIT_FAVORITE=10;

//ePosition 페이징 함수
function func_FAVORITE_paging(totalcnt){
	var totpages = Math.ceil(totalcnt/LISTUNIT_FAVORITE); //총페이지수
	var thisblock = Math.ceil(THISPAGE_FAVORITE/PAGEUNIT_FAVORITE); //현재 페이징블럭
	var startpage, endpage;
	var ret_HTML = "";
	//ct=document.cform.hcate.value
	
	// 현재 페이지블럭의 시작페이지번호
	if(thisblock > 1){
		startpage = (thisblock-1)*PAGEUNIT_FAVORITE+1;
	}else{
		startpage = 1;
	}
	
	// 현재 페이지블럭의 끝페이지번호
	if( (thisblock*PAGEUNIT_FAVORITE) >= totpages ){
		endpage = totpages;
	}else{
		endpage = thisblock*PAGEUNIT_FAVORITE;
	}
	
	ret_HTML = "<table width=100%><TR>";
	ret_HTML += "  <TD align='center' colspan='5' class='paging_td' >";
	
	if(THISPAGE_FAVORITE > 1){
		ret_HTML += "  <A href='javascript:FAVORITE_page(1);'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow1.gif' align=absmiddle></A>"; 
		
		if (startpage!=1)
		{
			ret_HTML += "  <A href='javascript:FAVORITE_page("+(startpage-1)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/left_arrow.gif' align=absmiddle></A>"; 

		}


	}



	for(i=startpage; i<=endpage; i++){
		if(i!=THISPAGE_FAVORITE){
			ret_HTML += " <A href='javascript:FAVORITE_page("+i+");'>"+i+"</A>";
		}else{
			ret_HTML += " <B>"+i+"</B>";
		}
	}
	


	if(THISPAGE_FAVORITE != totpages){
		if (i < totpages)
		{
			ret_HTML += "  <A href='javascript:FAVORITE_page("+(i)+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow.gif' align=absmiddle></A>"; 

		}
		
		ret_HTML += "  <A href='javascript:FAVORITE_page("+totpages+");'><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_arrow1.gif' align=absmiddle></A>"; 
	}

	ret_HTML += "  </TD>";
	ret_HTML += "</TR></table>";
	
	return ret_HTML;
}



ajax.ContentLoader.prototype.favorite_xml_eplist=function(){

	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; //응답받은 XML에서 리스트내용을 전달

	var output = document.getElementById("div2_7");//board.php에서의 출력부분


	var items = lists.getElementsByTagName("item"); //XML에서 표시할 게시물을 배열로 받는다.
	
	//outhtml += "<TABLE border='0' cellpadding='3' cellspacing='0' align='left' class='list_table' width=500px style='table-layout:fixed'>";
	

	/*
		$out .= "  <item seq=\"".$i."\">\n";
	$out .= "    <no>".$fa['no']."</no>\n";
	$out .= "    <nno>".$fa['nno']."</nno>\n";
	$out .= "    <user_id><![CDATA[".$fa['user_id']."]]></user_id>\n";
	$out .= "    <ep_name>".$fa['ep_name']."</ep_name>\n";
	$out .= "    <do_name>".$fa['do_name']."</do_name>\n";
	$out .= "    <cate><![CDATA[".$z[$c]."]]></cate>\n";
	$out .= "  </item>\n";
	*/
	var page_i=0;
	var dot="&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/dot.gif' align=absmiddle>&nbsp;";
	if(items.length > 0){//게시물이 1견이라도 있을경우의 처리내용
		var totalcnt = parseInt(lists.getAttribute("totalcnt"), 10);//총 게시물수 취득
		output.innerHTML=func_FAVORITE_paging(totalcnt)
		
		
		for(var i=0; i<items.length; i++){//게시물 건수만큼 루프
		//alert(i)
			var item = items[i];
			
			var seq = item.getAttribute("seq");//게시물번호
			
			var no = item.getElementsByTagName("no")[0].firstChild.nodeValue;//게시물 작성자
			var nno = item.getElementsByTagName("nno")[0].firstChild.nodeValue;//게시물 작성자
			var user_id = item.getElementsByTagName("user_id")[0].firstChild.nodeValue;//게시물 작성자
			var ep_name = item.getElementsByTagName("ep_name")[0].firstChild.nodeValue;//게시물 작성자
			var do_name = item.getElementsByTagName("do_name")[0].firstChild.nodeValue;//게시물 작성자
			var cate = item.getElementsByTagName("cate")[0].firstChild.nodeValue;//게시물 작성자
			var qurl="";

			ep_name = decodeURIComponent(ep_name);
			do_name = decodeURIComponent(do_name);

			outhtml="";	
						
			//outhtml += "<TR><td width=500px>";
			outhtml += "<DIV id='epexam"+i+"' style='display:none;'></DIV>";
			outhtml += "<table border=0 cellpadding=0 cellspacing=0 width=471px>";


			outhtml += "<tr><td colspan=4><img src='"+Loadings.directory+"/OUTPUT/IMAGE/list_bar.gif'></td></tr>";
			outhtml += "<tr height=25>";
			outhtml += "<td width=25 rowspan=2>&nbsp;<input type=checkbox value='"+no+"'  id=nochk"+i+"></td>";
			outhtml += "<td width=80>"+dot+"ePosition</td>";
			outhtml += "<td colspan=2>";
			
			//if (qurl=="")
			//{
				//outhtml+="<a href='http://keyword.eposition.com/?keyword="+(ep_id)+"%23"+(ep_domain)+"' target=_blank><b>"+decodeURIComponent(ep_id)+"#"+decodeURIComponent(ep_domain)+"</b></a>";

			//}else{
			
				outhtml += " : <a href=\"#\" onclick=\"javascript:eposition_result('"+ep_name+"','"+do_name+"','"+qurl+"');\" title=\"`"+ep_name+"#"+do_name+"` Detail information.\" ><b>"+ep_name+"#"+do_name+"</b></a>";
			//}

			
			outhtml += "</td>";
		
			outhtml += "</tr>";

			outhtml += "<tr height=25>";

			outhtml += "<td width=80>"+dot+"Category</td>";
			outhtml += "<td width=290> :  "+ cate +"</td>";
			outhtml += "<td align=right width=83>";
			//outhtml += "<a href=javascript:void(ePosition2Clipboard3('epexam"+i+"','"+ep_id+"','"+ep_domain+"','"+qurl+"'));><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_copy.gif' align=absmiddle></a>";

			outhtml += "<a href=\"#\" onclick=\"window.open('http://egosio.epmap.egosio.com/d/?epid="+encodeURIComponent(ep_name)+"&epdomain="+encodeURIComponent(do_name)+"','egosio_Window','status=no,scrollbars=yes,resizable=yes,width=800,height=600');\"><img src='"+Loadings.directory+"/OUTPUT/IMAGE/map_icon.jpg' align=absmiddle></a>&nbsp;";

			outhtml += "</td>";
			outhtml += "</tr>";
			if (items.length-1==i) outhtml += "<tr><td colspan=4><img src='"+Loadings.directory+"/OUTPUT/IMAGE/list_bar.gif'></td></tr>";
			outhtml += "</table>";

			

			
			Prints.dialog[i] =new Prints.newdiv("epexams",output,i,outhtml) ;
			page_i++;
		}
		
		Prints.dialog[page_i] = new Prints.newdiv("epexams",output,items.length,func_FAVORITE_paging(totalcnt)) ;//common.js의 페이징함수 호출

		Prints.newdiv.prototype.newPrint();

		if (!output.firstChild.id){
		}
		
		


	}else{

		//var d=document.getElementById("div1_3");	
		//if (d.style.display=="none") {d.style.display="block";}
		//d.innerHTML=Loadings.commenterror;
output.innerHTML="<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No one searched.";
	}
	
}








/*ePosition 페이지*/
function FAVORITE_page(p){

	if( p == 0 ){
		p = THISPAGE_FAVORITE;
	}else{
		THISPAGE_FAVORITE = p;

	}

	var a=document.getElementById("div2_7");	
	a.innerHTML=Loadings.list

	if ( !isUndefined( q ) )	q=""; 

	var params="q="+q_cate+"&page="+p;


	var loader1=new ajax.xhr.Request("XML_PHP/favorite_xml_eplist.php",params,ajax.ContentLoader.prototype.favorite_xml_eplist,"GET","");
}


/*###################################################################즐겨찾기목록 끝###############################################################*/







nosearch_form=function(q){
	default_view()
	
	
	Loadings.nosearch="<table border=0 cellpadding=0 cellspacing=0 width=471px style='table-layout:fixed'  background='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_bg1.gif'>";
	Loadings.nosearch += "<tr height=2px><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/right_blank.gif'></td></tr>";
	Loadings.nosearch += "<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_top.gif'></td></tr>";
	Loadings.nosearch += "<tr height=22><td ><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_top1.gif' align=absmiddle> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button1.gif'  align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button2.gif' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_thema_button3.gif' onclick=eposition_detail_close(3) align=absmiddle></td></tr>";
	Loadings.nosearch+="<TR height=3><TD align=center><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_search_bar.gif'></TD></TR>";
	Loadings.nosearch+="<TR height=22><TD></TD></TR>";
	Loadings.nosearch+="<TR height=22><TD></TD></TR>";
	
	if (document.getElementById(q).value.indexOf('#') == -1 )
	{
		Loadings.nosearch+="<TR height=22><TD align=center> '<b>There are not "+ document.getElementById(q).value +"#사이사이</b>' complete agreement results </TD></TR>";
	}else{
		Loadings.nosearch+="<TR height=22><TD align=center> '<b>There are not "+ document.getElementById(q).value +"</b>' complete agreement results</TD></TR>";
	}
	//There are not A complete agreement results 
	
	Loadings.nosearch+="<TR height=22><TD></TD></TR>";
	Loadings.nosearch+="<TR height=22><TD></TD></TR>";
	Loadings.nosearch+="<TR height=3><TD align=center><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_search_bar.gif'></TD></TR>";
	Loadings.nosearch+="<TR height=22 id='epositiontr7'><TD align=center><img src='"+Loadings.directory+"/OUTPUT/IMAGE/fax_send.gif'align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/sms_send.gif'  align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_copy.gif' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_mapview.gif' align=absmiddle> <img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_favorite.gif'  align=absmiddle></TD></TR>";
	Loadings.nosearch+= "<tr><td><img src='"+Loadings.directory+"/OUTPUT/IMAGE/eposition_detail_bottom.gif'></td></tr>";
	Loadings.nosearch+="</TABLE>";

	var d=document.getElementById("div1_3");	
	if (d.style.display=="none") {d.style.display="block";}
	d.innerHTML=Loadings.nosearch;
		
	


	document.getElementById("div1_6").innerHTML="";



	Getid.eposition=new Getid.newid("","","");
}



/*#################################################################################################################################################
#                                                                                                                                                                                                                         #
#                                                                                 핸드폰/팩스/ePosition복사/지도보기  시작                                                                               #
#                                                                                                                                                                                                                         #                                                   
###################################################################################################################################################*/
function tel_add(){

	var rt1_value=document.getElementById("rt1").value;
	if(rt1_value!="010" && rt1_value!="011" && rt1_value!="017" && rt1_value!="016" && rt1_value!="018" && rt1_value!="019" ){
		document.getElementById("rt1").focus();alert("Error in format of cell phone number" );	return false;
	}

	if(document.getElementById("rt1").value==''){document.getElementById("rt1").focus();alert('Enter the service name.');return false;}
	else if(document.getElementById("rt2").value==''){document.getElementById("rt2").focus();alert('Enter the telephone exchange number.');return false;}
	else if(document.getElementById("rt3").value==''){document.getElementById("rt3").focus();alert('Enter the local number.');return false;}
	else if(!isTEL(document.getElementById("rt1").value+ '-' +document.getElementById("rt2").value+ '-' + document.getElementById("rt3").value)){document.getElementById("rt1").focus();alert('Enter the correct telephone number.');return false;
	}else{
		Rtel=document.getElementById("rt1").value+"-"+document.getElementById("rt2").value+"-"+document.getElementById("rt3").value
		
		if (document.getElementById("rtf").value=="")
		{
			document.getElementById("rtf").value=Rtel;
		}else{
		document.getElementById("rtf").value=document.getElementById("rtf").value=Rtel + "," +Rtel;
		}

		document.getElementById("rt1").value="";
		document.getElementById("rt2").value="";
		document.getElementById("rt3").value="";
	}



}

//핸드폰으로 전송
function eposition_hp_send(){





	var rt1_value=document.getElementById("rt1").value;
	var Ttel;
	var Rtel;


	if (document.getElementById("rtf").value=="")
	{
		if(rt1_value!="010" && rt1_value!="011" && rt1_value!="017" && rt1_value!="016" && rt1_value!="018" && rt1_value!="019" ){
			document.getElementById("rt1").focus();alert("Error in format of cell phone number" );	return false;
		}

		if(document.getElementById("rt1").value==''){document.getElementById("rt1").focus();alert('Enter the service name.');return false;}
		else if(document.getElementById("rt2").value==''){document.getElementById("rt2").focus();alert('Enter the telephone exchange number.');return false;}
		else if(document.getElementById("rt3").value==''){document.getElementById("rt3").focus();alert('Enter the local number.');return false;}
		else if(!isTEL(document.getElementById("rt1").value+ '-' +document.getElementById("rt2").value+ '-' + document.getElementById("rt3").value)){document.getElementById("rt1").focus();alert('Enter the correct telephone number.');return false;
		}else{
			Rtel=document.getElementById("rt1").value+"-"+document.getElementById("rt2").value+"-"+document.getElementById("rt3").value

		}
	}else{
	
		Rtel=document.getElementById("rtf").value;
	}
	

	var tt1_value=document.getElementById("tt1").value;
	if(tt1_value!="010" && tt1_value!="011" && tt1_value!="017" && tt1_value!="016" && tt1_value!="018" && tt1_value!="019" ){
		document.getElementById("tt1").focus();alert("Error in format of cell phone number" );	return false;
	}

	if(document.getElementById("tt1").value==''){document.getElementById("tt1").focus();alert('Enter the service name.');return false;}
	else if(document.getElementById("tt2").value==''){document.getElementById("tt2").focus();alert('Enter the telephone exchange number.');return false;}
	else if(document.getElementById("tt3").value==''){document.getElementById("tt3").focus();alert('Enter the local number.');return false;}
	else if(!isTEL(document.getElementById("tt1").value+ '-' +document.getElementById("tt2").value+ '-' + document.getElementById("tt3").value)){form.tt1.focus();alert('Enter the correct telephone number.');return false;
	
	}else{
		Ttel=document.getElementById("tt1").value+"-"+document.getElementById("tt2").value+"-"+document.getElementById("tt3").value
	}

	var params = "epid="+encodeURIComponent(Getid.eposition.epid)+"&domain="+encodeURIComponent(Getid.eposition.domain);



	params+="&Ttel="+encodeURIComponent(Ttel);
	params+="&Rtel="+encodeURIComponent(Rtel);
//	params+="&MSG="+encodeURIComponent(document.getElementById("MSG").value);
	//document.getElementById("memo").value=params;
	
//XML_PHP/hp_xml_send.php?epid=%EC%84%B1%ED%83%9C%ED%98%84&domain=%EC%9D%B4%EA%B3%A0%EC%8B%9C%EC%98%A4&Ttel=018-403-9545&Rtel=018-403-9545&MSG=%ED%95%98%ED%95%98%ED%95%98
	var loader4=new ajax.xhr.Request("XML_PHP/hp_xml_send.php",params,ajax.ContentLoader.prototype.send_sms,"POST","");
	
	//window.open("XML_PHP/hp_xml_send.php?"+params)
	
}

ajax.ContentLoader.prototype.send_sms=function(){



	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; //응답받은 XML에서 리스트내용을 전달

	var items = lists.getElementsByTagName("item"); //XML에서 표시할 게시물을 배열로 받는다.
	if(items.length > 0){//게시물이 1견이라도 있을경우의 처리내용
		
		for(var i=0; i<items.length; i++){//게시물 건수만큼 루프
			
			var item = items[i];
			var msg = item.getElementsByTagName("msg")[0].firstChild.nodeValue;//게시물 작성자
			msg = decodeURIComponent(msg);

			alert(msg);
			pops.newwindows.prototype.divRemove()

			
		}

	}

}

//fax  전송
function eposition_fax_send(){
	var ft1_value=document.getElementById("ft1").value;
	var Ftel;

	if(ft1_value!="010" && ft1_value!="011" && ft1_value!="017" && ft1_value!="016" && ft1_value!="018" && ft1_value!="019" ){
		if(document.getElementById("ft1").value==''){document.getElementById("ft1").focus();alert('Enter the Address number.');return false;}
		else if(document.getElementById("ft2").value==''){document.getElementById("ft2").focus();alert('Enter the telephone exchange number.');return false;}
		else if(document.getElementById("ft3").value==''){document.getElementById("ft3").focus();alert('Enter the local number.');return false;}
		else if(!isTEL(document.getElementById("ft1").value+ '-' +document.getElementById("ft2").value+ '-' + document.getElementById("ft3").value)){form.tt1.focus();alert('Enter the correct FAX number.');return false;
		
		}else{
			Ftel=document.getElementById("ft1").value+"-"+document.getElementById("ft2").value+"-"+document.getElementById("ft3").value
		}
		
	}else{
		document.getElementById("ft1").focus();alert("FAX Error in format of cell phone number" );	return false;
	}

	
	var params = "epid="+encodeURIComponent(Getid.eposition.epid)+"&domain="+encodeURIComponent(Getid.eposition.domain);

	params+="&Ftel="+encodeURIComponent(Ftel);
	params+="&FAXMSG="+encodeURIComponent(document.getElementById("FAXMSG").value);

	var loader4=new ajax.xhr.Request("XML_PHP/fax_xml_send.php",params,ajax.ContentLoader.prototype.send_fax,"POST","");

}


ajax.ContentLoader.prototype.send_fax=function(){

	var lists = this.req.responseXML.getElementsByTagName("lists")[0]; //응답받은 XML에서 리스트내용을 전달

	var items = lists.getElementsByTagName("item"); //XML에서 표시할 게시물을 배열로 받는다.
	if(items.length > 0){//게시물이 1견이라도 있을경우의 처리내용
		
		for(var i=0; i<items.length; i++){//게시물 건수만큼 루프
			
			var item = items[i];
			var msg = item.getElementsByTagName("msg")[0].firstChild.nodeValue;//게시물 작성자
			//epid = decodeURIComponent(epid);
			if (msg=='true')
			{
				alert("Success to send");
				pops.newwindows.prototype.divRemove()
			}else{
				
				alert("Failed to sent")
				pops.newwindows.prototype.divRemove()

			}
			
		}

	}

}




/*#####################################################핸드폰/팩스/ePosition복사/지도보기  끝########################################################*/
 