<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

include_once("$g4[path]/head.sub.php");
include_once("$g4[path]/lib/outlogin.lib.php");
include_once("$g4[path]/lib/poll.lib.php");
include_once("$g4[path]/lib/visit.lib.php");
include_once("$g4[path]/lib/connect.lib.php");
include_once("$g4[path]/lib/popular.lib.php");
//include_once("$g4[path]/lib/menu.lib.php");
//include_once("$g4[path]/lib/fixing.lib.php");
include_once("$g4[path]/lib/latest.lib.php");


//print_r2(get_defined_constants());

// 사용자 화면 상단과 좌측을 담당하는 페이지입니다.
// 상단, 좌측 화면을 꾸미려면 이 파일을 수정합니다.

$table_width = 950;
?>

<div style='height:10px;'></div>
<table width="<?=$table_width?>" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<!-- 로고 -->
		<td width="220"><a href="<?=$g4['path']?>/"><img src="<?=$g4['path']?>/img/logo.gif" width="195" height="25" border="0"></a></td>
		<td width="780" align="right" valign="bottom">

		<table border="0" cellspacing="0" cellpadding="0">
        <form name='frmsearch1' style='margin:0px;' onsubmit='return search_submit(this);'>
        <input type='hidden' name='sfl' value='wr_subject||wr_content'>
        <input type='hidden' name='sop' value='and'>
        <input type='hidden' name='stx' value=''>
		<tr>
			<!-- 처음으로 버튼 -->
			<td width="300px"><input type=text name=search_str class='ed' value='<?=$search_str?>' style="height:18px;width:300px;padding:3px;font-weight:bold;vertical-align:middle;border:6px solid #5A5A5A;"></td>
			<td width="2px"></td>
			<td><input type=image src='<?=$g4['path']?>/img/btn_sch_down.gif' border=0 align=absmiddle></td>
		</tr>
        </form>
		</table>
        <script>
        function search_submit(f) {
                f.stx.value = f.search_str.value;
                f.action = '../bbs/search.php';
        }
        /*document.getElementById('search_flag').value = '상품';*/
		</script>

		</td>
	</tr>
</table>

<div style='height:20px;'></div>

<table width="<?=$table_width?>" cellspacing="0" cellpadding="0" align="center">
	<tr>
		<td><? include_once("$g4[path]/topmenu.php"); ?> 
        </td>
	</tr>
</table>

<div style='height:18px;'></div>

<table width='<?=$table_width?>' cellpadding=0 cellspacing=0 border=0 align="center">
	<tr>
		<!-- 왼쪽 메뉴 -->
		<td width="230" valign=top align="center">
		  <table width="230" cellpadding="0" cellspacing="1" border="0" bgcolor="#d9d9d9">
		    <tr>
		      <td bgcolor="#f6f6f6"><?=outlogin("login"); // 외부 로그인 ?></td>
		    </tr>
		  </table>
		  <? if (($gr_id) || ($bo_table)) { ?>
		  <table width="230" cellpadding="0" cellspacing="0" border="0">
		    <tr><td height="10px"></td></tr>
		    <tr>
			  <td><? include_once("$g4[path]/left_menu/left_menu.php"); ?>
              </td>
		    </tr>
		    <tr><td height="10"></td></tr>
		  </table>
		  <? } ?>
		  <table width="230" cellpadding="0" cellspacing="0" border="0">
		    <tr><td height="10"></td></tr>
		    <tr>
		      <td align="center"><?=visit("basic"); // 방문자수 ?></td>
		    </tr>
		   <tr><td height="10"></td></tr>
		   <tr>
		     <td align="center"><?=connect(); // 현재 접속자수 ?></td>
		   </tr>
		   <tr><td height="10"></td></tr>
		   <tr>
		     <td align="center"><?=poll("basic"); // 설문조사 ?></td>
		   </tr>
		 </table>
		 <table width="230" cellpadding="0" cellspacing="0" border="0">
		   <tr><td height="10px"></td></tr>
		   <tr>
		     <td align="center" height="161" valign="top">
			 <script language="JavaScript" type="text/javascript"> // PNG이미지
				function setPng24(obj) {
						obj.width=obj.height=1;
						obj.className=obj.className.replace(/\bpng\b/i,'');
						obj.style.filter =
						"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
						obj.src=''; 
						return '';
					}
			 </script>
			 <SCRIPT LANGUAGE="JAVASCRIPT"> // 탭
				function show_tr(obj)
				{
					if(obj == "cr_c"){
						eval("check.style.display = 'inline';");
						eval("ranking.style.display = 'none';");
					}

					else if(obj == "cr_r"){
						eval("check.style.display = 'none';");
						eval("ranking.style.display = 'inline';");
					} // 출석체크
					
					else if(obj == "hr_h"){
						eval("hit.style.display = 'inline';");
						eval("recommend.style.display = 'none';");
					}

					else if(obj == "hr_r"){
						eval("hit.style.display = 'none';");
						eval("recommend.style.display = 'inline';");
					} // 조회순
					
					else if(obj == "hn_h"){
						eval("hot.style.display = 'inline';");
						eval("newb.style.display = 'none';");
					}

					else if(obj == "hn_n"){
						eval("hot.style.display = 'none';");
						eval("newb.style.display = 'inline';");
					} // 인기분양
					
					else if(obj == "dt_d"){
						eval("disappear.style.display = 'inline';");
						eval("temporary.style.display = 'none';");
					}

					else if(obj == "dt_t"){
						eval("disappear.style.display = 'none';");
						eval("temporary.style.display = 'inline';");
					} // 실종신고
					
					else if(obj == "mta_m"){
						eval("mating.style.display = 'inline';");
						eval("trust.style.display = 'none';");
						eval("adoption.style.display = 'none';");
					}

					else if(obj == "mta_t"){
						eval("mating.style.display = 'none';");
						eval("trust.style.display = 'inline';");
						eval("adoption.style.display = 'none';");
					}

					else if(obj == "mta_a"){
						eval("mating.style.display = 'none';");
						eval("trust.style.display = 'none';");
						eval("adoption.style.display = 'inline';");
					} // 교배

				}
			 </SCRIPT>
			 <div id="mating">
			 <table border="0" cellspacing="0" cellpadding="0">
			   <tr>
			     <td>
				   <table width="100%" border="0" cellspacing="0" cellpadding="0">
				     <tr>
					   <td>
					     <table border="0" cellspacing="0" cellpadding="0" id="tab_on">
						   <tr>
						     <td class="tl"></td>
							 <td class="t"></td>
						   </tr>
						   <tr>
							 <td rowspan="2" class="l"></td>
							 <td class="tab3_on"><a href="#" class="tab_on">탭01</a></td>
						   </tr>									
						   <tr>
							 <td height="1"></td>
						   </tr>
						 </table>
					   </td>
					   <td class="tab_line"></td>
					   <td>
					     <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
						   <tr>
						     <td class="t"></td>
						   </tr>
						   <tr>
						     <td class="tab3_off2"><a href="#" onMouseOver="show_tr('mta_t')" class="tab_off">탭02</a></td>
						   </tr>
						   <tr>
						     <td class="tab_line"></td>
						   </tr>
						 </table>
					   </td>
					   <td class="tab_line"></td>
					   <td>
					     <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
						   <tr>
						     <td class="t"></td>
							 <td class="tr"></td>
						   </tr>
						   <tr>
						     <td class="tab3_off"><a href="#" onMouseOver="show_tr('mta_a')" class="tab_off">탭03</a></td>
							 <td class="r"></td>
						   </tr>
						   <tr>
						     <td colspan="2" class="tab_line"></td>
						   </tr>
						 </table>
					   </td>
					 </tr>
				   </table>
				 </td>
			   </tr>
			   <tr>
			     <td>
				   <table width="100%" border="0" cellspacing="0" cellpadding="0" id="box_white">
				     <tr>
					   <td class="l"></td>
					   <td width="230" height="131" valign="top">	
                       <?=latest("basic", "content", 6, 52);?>
					 </td>
					 <td class="r"></td>
				   </tr>
				   <tr>
				     <td class="bl"></td>
					 <td class="b"></td>
					 <td class="br"></td>
				   </tr>
				 </table>
			   </td>
			 </tr>
		   </table>
		   </div>
		   <div id="trust">
		     <table border="0" cellspacing="0" cellpadding="0">
			   <tr>
			     <td>
				 <table width="100%" border="0" cellspacing="0" cellpadding="0">
				   <tr>
				     <td>
					   <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
					     <tr>
						   <td class="tl"></td>
						   <td class="t"></td>
						 </tr>
						 <tr>
						   <td class="l"></td>
						   <td class="tab3_off"><a href="#" onMouseOver="show_tr('mta_m')" class="tab_off">탭01</a></td>
						 </tr>									
						 <tr>
						   <td colspan="2" class="tab_line"></td>
						 </tr>
					   </table>
					 </td>
					 <td class="tab_line"></td>
					 <td>
					   <table border="0" cellspacing="0" cellpadding="0" id="tab_on">
					     <tr>
						   <td class="t"></td>
						 </tr>
						 <tr>
						   <td class="tab3_on2"><a href="#" class="tab_on">탭02</a></td>
						 </tr>									
						 <tr>
						   <td height="1"></td>
						 </tr>
					   </table>
					 </td>
					 <td class="tab_line"></td>
					 <td>
					   <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
					     <tr>
						   <td class="t"></td>
						   <td class="tr"></td>
						 </tr>
						 <tr>
						   <td class="tab3_off"><a href="#" onMouseOver="show_tr('mta_a')" class="tab_off">탭03</a></td>
						   <td class="r"></td>
						 </tr>
						 <tr>
						   <td colspan="2" class="tab_line"></td>
						 </tr>
					   </table>
					 </td>
				   </tr>
				 </table>
				</td>
			   </tr>
			   <tr>
			     <td>
				   <table width="100%" border="0" cellspacing="0" cellpadding="0" id="box_white">
				     <tr>
					   <td class="l"></td>
					   <td width="220" height="131" valign="top">	
                       <?=latest("basic", "content2", 6, 52);?>
					 </td>
					 <td class="r"></td>
				   </tr>
				   <tr>
				     <td class="bl"></td>
					 <td class="b"></td>
					 <td class="br"></td>
				   </tr>
				 </table>
			   </td>
			 </tr>
		   </table>
		   </div>
			<div id="adoption">
			<table border="0" cellspacing="0" cellpadding="0">
			  <tr>
			    <td>
				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
				    <tr>
					  <td>
					    <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
						  <tr>
						    <td class="tl"></td>
							<td class="t"></td>
						  </tr>
						  <tr>
						    <td class="l"></td>
							<td class="tab3_off"><a href="#" onMouseOver="show_tr('mta_m')" class="tab_off">탭01</a></td>
						  </tr>									
						  <tr>
							<td colspan="2" class="tab_line"></td>
						  </tr>
						</table>
					  </td>
					  <td class="tab_line"></td>
					  <td>
					    <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
						  <tr>
						    <td class="t"></td>
						  </tr>
						  <tr>
							<td class="tab3_off2"><a href="#" onMouseOver="show_tr('mta_t')" class="tab_off">탭02</a></td>
						  </tr>
						  <tr>
							<td class="tab_line"></td>
						  </tr>
						</table>
					  </td>
					  <td class="tab_line"></td>
					  <td>
					    <table border="0" cellspacing="0" cellpadding="0" id="tab_on">
						  <tr>
						    <td class="t"></td>
							<td class="tr"></td>
						  </tr>
						  <tr>
							<td class="tab3_on"><a href="#" class="tab_on">탭03</a></td>
							<td rowspan="2" class="r"></td>
						  </tr>									
						  <tr>
						    <td height="1"></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>
				</td>
			  </tr>
			   <tr>
			     <td>
				   <table width="100%" border="0" cellspacing="0" cellpadding="0" id="box_white">
				     <tr>
					   <td class="l"></td>
					   <td width="220" height="131" valign="top">
                       <?=latest("basic", "portfolio", 6, 52);?>
					 </td>
					 <td class="r"></td>
				   </tr>
				   <tr>
				     <td class="bl"></td>
					 <td class="b"></td>
					 <td class="br"></td>
				   </tr>
				 </table>
			   </td>
			 </tr>
		   </table>
		   </div>
		  </td>
		</tr>
	  </table>

		  <table width="230" cellpadding="0" cellspacing="0" border="0">
		    <tr><td height="20"></td></tr>
		    <tr>
		      <td align="center" height="161" valign="top">

			  <div id="disappear">
			  <table border="0" cellspacing="0" cellpadding="0">
			    <tr>
				  <td>
				    <table width="100%" border="0" cellspacing="0" cellpadding="0">
					  <tr>
					    <td>
						  <table border="0" cellspacing="0" cellpadding="0" id="tab_on">
							<tr>
							  <td class="tl"></td>
							  <td class="t"></td>
							</tr>
							<tr>
							  <td rowspan="2" class="l"></td>
							  <td class="tab2_on"><a href="#" class="tab_on">탭01</a></td>
							</tr>									
							<tr>
							  <td height="1"></td>
							</tr>
						  </table>
						</td>
						<td class="tab_line"></td>
						<td>
						  <table border="0" cellspacing="0" cellpadding="0" id="tab_off">
							<tr>
							  <td class="t"></td>
							  <td class="tr"></td>
							</tr>
							<tr>
							  <td class="tab2_off"><a href="#" onMouseOver="show_tr('dt_t')" class="tab_off">탭02</a></td>
							  <td class="r"></td>
							</tr>									
							<tr>
							  <td colspan="2" class="tab_line"></td>
							</tr>
						  </table>
					    </td>
					  </tr>
					</table>
				  </td>
				</tr>
				<tr>
				  <td>
				    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="box_white">
					  <tr>
					    <td class="l"></td>
						<td width="167" height="131" valign="top">
						<div id="Latest">
                        <?=latest("basic", "content", 6, 52);?>
                        </div>
					  </td>
					  <td class="r"></td>
					</tr>
					<tr>
					  <td class="bl"></td>
					  <td class="b"></td>
					  <td class="br"></td>
					</tr>
				  </table>
				</td>
			  </tr>
			</table>
			</div>

			<div id="temporary">
			<table border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<td>

				  <table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
					  <td>
						<table border="0" cellspacing="0" cellpadding="0" id="tab_off">
						  <tr>
							<td class="tl"></td>
							<td class="t"></td>
						  </tr>
						  <tr>
							<td class="l"></td>
							<td class="tab2_off"><a href="#" onMouseOver="show_tr('dt_d')" class="tab_off">탭01</a></td>
						  </tr>									
						  <tr>
						    <td colspan="2" class="tab_line"></td>
						  </tr>
						</table>
					  </td>
					  <td class="tab_line"></td>
					  <td>
					    <table border="0" cellspacing="0" cellpadding="0" id="tab_on">
						  <tr>
						    <td class="t"></td>
							<td class="tr"></td>
						  </tr>
						  <tr>
							<td class="tab2_on"><a href="#" class="tab_on">탭02</a></td>
							<td rowspan="2" class="r"></td>
						  </tr>									
						  <tr>
						    <td height="1"></td>
						  </tr>
						</table>
					  </td>
					</tr>
				  </table>

				</td>
			  </tr>
			  <tr>
			    <td>
				  <table width="100%" border="0" cellspacing="0" cellpadding="0" id="box_white">
				    <tr>
					  <td class="l"></td>
					  <td width="167" height="131" valign="top">					  
					  <div id="Latest">
                      <?=latest("basic", "portfolio", 6, 52);?>
                      </div>
					</td>
					<td class="r"></td>
				  </tr>
				  <tr>
				    <td class="bl"></td>
					<td class="b"></td>
					<td class="br"></td>
				  </tr>
				</table>
			  </td>
			</tr>
		  </table>
		  </div>
		</td>
	  </tr>
	  <tr><td height="10"></td></tr>
	</table>
		  <table width="230" cellpadding="0" cellspacing="0" border="0">
		    <tr><td height="10px"></td></tr>
		    <tr>
			  <td>
			    <table width="100%" border="0" cellspacing="0" cellpadding="0" id="box_white">
				  <tr>
				    <td class="tl"></td>
					<td class="t"></td>
					<td class="tr"></td>
				  </tr>
				  <tr>
				    <td class="l"></td>
					<td width="230" height="78" valign="middle">
			        <? include_once("$g4[path]/preview3.php"); // 그룹 탭 최신글 ?>
                    </td>
					<td class="r"></td>
				  </tr>
				  <tr>
					<td class="bl"></td>
					<td class="b"></td>
					<td class="br"></td>
				  </tr>
				</table>
              </td>
		    </tr>
		    <tr><td height="10px"></td></tr>
		  </table>	
	</td>
	<td width=20></td>
	<!-- 중간 -->
	<td valign=top>