//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ÇÃ·¡½Ã Ãâ·Â
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var TopcurMenu, LeftcurMenu;

function ViewFlash(URL,width,height,vars,bgColor,winmode,curmenu) { //(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, º¯¼ö, ¹è°æ»ö, À©µµ¿ì¸ðµå)

	var id=URL.split("/")[URL.split("/").length-1].split(".")[0];
	if(vars==null) vars='';
	if(bgColor==null) bgColor='#FFFFFF';
	if(winmode==null) winmode='transparent';  //wmode¼Ó¼º=window,opaque,transparent

	document.write("	<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' "); 
	document.write("		width='"+width+"' height='"+height+"' id='"+id+"' align='middle'> ");
	document.write("	<param name='allowScriptAccess' value='always' /> ");
	document.write("	<param name='movie' 						value='"+URL+"' /> ");
	document.write("	<param name='FlashVars' 				value='"+vars+"' /> ");
	document.write("	<param name='wmode' 						value='"+winmode+"' /> ");
	document.write("	<param name='menu' 							value='false' /> ");
	document.write("	<param name='quality'						value='high' /> ");
	document.write("	<param name='scale'							value='noscale' /> ");
	document.write("	<param name='salign'						value='lt' /> ");
	document.write("	<param name='bgcolor'						value='"+bgColor+"' /> ");
	document.write("	<embed src='"+URL+"' flashVars='"+vars+"' wmode='"+winmode+"' menu='false' quality='high' scale='noscale' salign='lt'");
	document.write("		bgcolor='"+bgColor+"' width='"+width+"' height='"+height+"' name='"+id+"' align='middle' ");
	document.write("		allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> ");
	document.write("	</object> ");
}

/* ÆäÀÌÁö »ç¿ë ¹æ¹ý (º¯¼ö,¹è°æ»ö,À©µµ¿ì¸ðµå »ý·«°¡´É)
<script>ViewFlash('URL','Width','Height','VARS','BGC','WINMODE')</script>
*/

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ÇÃ·¡½Ã ¸Þ´º ¸µÅ©
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// Å¾¸Þ´º
function top(n){
 if (n=='01'){
  location.href="/church/history.asp";
 }else if(n=='02'){
  location.href="/worship/weekly.asp";
 }else if(n=='03'){
  location.href="/education/prek.asp";
 }else if(n=='04'){
  location.href="/rearing/family.asp";
 }else if(n=='05'){
  location.href="/training/goguma.asp";
 }else if(n=='06'){
  location.href="/mission/missionary.asp";
 }else if(n=='07'){
  location.href="/data/praise.asp";
 }
}

// 01 ±³È¸¾È³»
function church(n){
 if (n=='01'){
  location.href="/church/history.asp";
 }else if(n=='02'){
  location.href="/church/pastor.asp";
 }else if(n=='03'){
  location.href="/church/staffs.asp";
 }else if(n=='04'){
  location.href="/church/structure.asp";
 }else if(n=='05'){
  location.href="/church/news.asp";
 }else if(n=='06'){
  location.href="/church/notice.asp";
 }else if(n=='07'){
  location.href="/church/calendar.asp";
 }else if(n=='08'){
  location.href="/church/paper.asp";
 }else if(n=='09'){
  location.href="/church/promise.asp";
 }else if(n=='10'){
  location.href="/church/interphone.asp";
 }else if(n=='11'){
  location.href="/church/reservation.asp";
 }else if(n=='12'){
  location.href="/church/counsel.asp";
 }else if(n=='13'){
  location.href="/church/map.asp";
 }else if(n=='14'){
  location.href="/church/sitmap.asp";
 }
}

// 02 ¿¹¹èÁýÈ¸
function worship(n){
 if (n=='01'){
  location.href="/worship/weekly.asp";
 }else if(n=='02'){
  location.href="/worship/sermon.asp";
 }else if(n=='03'){
  location.href="/worship/choir.asp";
 }else if(n=='04'){
  location.href="/worship/partsong.asp";
 }else if(n=='05'){
  location.href="/worship/info.asp";
 }else if(n=='06'){
  location.href="/worship/zone.asp";
 }else if(n=='07'){
  location.href="/worship/chief.asp";
 }else if(n=='08'){
  location.href="/worship/im.asp";
 }else if(n=='09'){
  location.href="/worship/em.asp";
 }else if(n=='10'){
  location.href="/worship/festival.asp";
 }
}

// 03 ±³À°
function education(n){
 if (n=='01'){
  location.href="/education/prek.asp";
}else if(n=='02'){
  location.href="/education/lower.asp";
}else if(n=='03'){
  location.href="/education/junior.asp";
}else if(n=='04'){
  location.href="/education/senior.asp";
}else if(n=='05'){
  location.href="/education/young.asp";
 }
}

// 04 ¾çÀ°
function rearing(n){
 if (n=='01'){
  location.href="/rearing/family.asp";
 }else if(n=='02'){
  location.href="/rearing/bible.asp";
 }else if(n=='03'){
  location.href="/rearing/reading.asp";
 }else if(n=='04'){
  location.href="/rearing/home.asp";
 }else if(n=='05'){
  location.href="/rearing/pepp.asp";
 }else if(n=='06'){
  location.href="/rearing/smallgroup.asp";
 }
}

// 05 ÈÆ·Ã
function training(n){
 if (n=='01'){
  location.href="/training/goguma.asp";
 }else if(n=='02'){
  location.href="/training/evangelism.asp";
 }else if(n=='03'){
  location.href="/training/disciple.asp";
 }else if(n=='04'){
  location.href="/training/ministry.asp";
 }else if(n=='05'){
  location.href="/training/one2one.asp";
 }else if(n=='06'){
  location.href="/training/prayer.asp";
 }
}

// 06 ¼±±³ ´ë¿Ü»ç¿ª
function mission(n){
 if (n=='01'){
  location.href="/mission/missionary.asp";
 }else if(n=='02'){
  location.href="/mission/mission_meeting.asp";
 }else if(n=='03'){
  location.href="/mission/senior_academy.asp";
 }else if(n=='04'){
  location.href="/mission/korean_school.asp";
 }else if(n=='05'){
  location.href="/mission/ezemiah.asp";
 }else if(n=='06'){
  location.href="/mission/short_mission.asp";
 }else if(n=='07'){
  location.href="/mission/cooperation.asp";
 }
}

// 07 ÀÚ·á½Ç
function data(n){
 if (n=='01'){
  location.href="/data/praise.asp";
 }else if(n=='02'){
  location.href="/data/general.asp";
 }else if(n=='03'){
  location.href="/data/administration.asp";
 }else if(n=='04'){
  location.href="/data/prayer.asp";
 }else if(n=='05'){
  location.href="/data/poll.asp";
 }
}

// 08 Ä¿¹Â´ÏÆ¼
function community(n){
 if (n=='01'){
  location.href="http://www.bethelchurch.org/community/main.asp";
 }
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// µ¿¿µ»ó Àç»ý
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function ViewMediaPlayer(id, name, width, height, showcontrols, autostart, autorewind, autosize, autoresize, transparentatstart, loop, url) {

	document.write("<object id='"+id+"' codeBase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' "); 
	document.write("		type='application/x-oleobject' standby='Loading Microsoft Windows Media Player components...' "); 
	document.write("		width='"+width+"' height='"+height+"' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' name='"+name+"'> ");
	document.write("	<param name='ShowControls' 				value='"+showcontrols+"'> ");
	document.write("	<param name='AutoStart' 					value='"+autostart+"'> ");
	document.write("	<param name='AutoRewind'					value='"+autorewind+"'> ");
	document.write("	<param name='Autosize'				 		value='"+autosize+"'> ");
	document.write("	<param name='AutoResize' 					value='"+autoresize+"'> ");
	document.write("	<param name='TransparentAtStart' 	value='"+transparentatstart+"'> ");
	document.write("	<param name='loop' 								value='"+loop+"'> ");
	document.write("	<param name='Filename'						value='"+url+"'> ");
	document.write("	<embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' "); 
	document.write("		id='"+id+"' name='"+name+"' showpositioncontrols='0' showcontrols='"+showcontrols+"' autosize='"+autosize+"' autostart='"+autostart+"' showdisplay='0' ");
	document.write("		showstatusbar='0' showtracker='1' loop='1' width='"+width+"'  height='"+height+"' src='"+url+"'></embed> "); 
	document.write("</object> ");
}

function media_play(id) 
{
  document.getElementById(id).play()
}

function media_stop(id)
{
  document.getElementById(id).stop()
}

function media_pause(id)
{
  document.getElementById(id).pause()
}

/* ÆäÀÌÁö »ç¿ë ¹æ¹ý
<script>ViewMediaPlayer('id','name','width','height','showcontrols','autostart','autorewind','autosize','autoresize','transparentatstart','loop','url')</script>
*/

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ·Ñ¿À¹ö
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

	function na_restore_img_src(name, nsdoc)
	{
	  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
	  if (name == '')
		return;
	  if (img && img.altsrc) {
		img.src    = img.altsrc;
		img.altsrc = null;
	  } 
	}

	function na_preload_img()
	{ 
	  var img_list = na_preload_img.arguments;
	  if (document.preloadlist == null) 
		document.preloadlist = new Array();
	  var top = document.preloadlist.length;
	  for (var i=0; i < img_list.length; i++) {
		document.preloadlist[top+i]     = new Image;
		document.preloadlist[top+i].src = img_list[i+1];
	  } 
	}

	function na_change_img_src(name, nsdoc, rpath, preload)
	{ 
	  var img = eval((navigator.appName == 'Netscape') ? nsdoc+'.'+name : 'document.all.'+name);
	  if (name == '')
		return;
	  if (img) {
		img.altsrc = img.src;
		img.src    = rpath;
	  } 
	}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ·Ñ¿À¹ö ÀÌ¹ÌÁö °íÁ¤
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
        if (browserName == "Netscape" && browserVer >= 3) { init="net";}

        else { init="ie";}

        if ((init == "net") || ((init ==  "ie") && (browserVer >= 4))) 
		
		{ 
		t0on = new Image; t0on.src ="/images/sub/left_m01_01_on.gif";
		t1on = new Image; t1on.src ="/images/sub/left_m01_02_on.gif";
		t2on = new Image; t2on.src ="/images/sub/left_m01_03_on.gif";
		t3on = new Image; t3on.src ="/images/sub/left_m01_04_on.gif";		
		t4on = new Image; t4on.src ="/images/sub/left_m01_05_on.gif";
		t5on = new Image; t5on.src ="/images/sub/left_m01_06_on.gif";
		t6on = new Image; t6on.src ="/images/sub/left_m01_07_on.gif";
		t7on = new Image; t7on.src ="/images/sub/left_m01_08_on.gif";
		t8on = new Image; t8on.src ="/images/sub/left_m01_09_on.gif";
		t9on = new Image; t9on.src ="/images/sub/left_m01_10_on.gif";
		t10on = new Image; t10on.src ="/images/sub/left_m01_11_on.gif";
		t11on = new Image; t11on.src ="/images/sub/left_m01_12_on.gif";
		t12on = new Image; t12on.src ="/images/sub/left_m01_13_on.gif";
		t13on = new Image; t13on.src ="/images/sub/left_m01_14_on.gif";
		
		t14on = new Image; t14on.src ="/images/sub/left_m02_01_on.gif";
		t15on = new Image; t15on.src ="/images/sub/left_m02_02_on.gif";
		t16on = new Image; t16on.src ="/images/sub/left_m02_03_on.gif";		
		t17on = new Image; t17on.src ="/images/sub/left_m02_04_on.gif";
		t18on = new Image; t18on.src ="/images/sub/left_m02_05_on.gif";
		t19on = new Image; t19on.src ="/images/sub/left_m02_06_on.gif";
		t20on = new Image; t20on.src ="/images/sub/left_m02_07_on.gif";
		t21on = new Image; t21on.src ="/images/sub/left_m02_08_on.gif";
		t22on = new Image; t22on.src ="/images/sub/left_m02_09_on.gif";
		t23on = new Image; t23on.src ="/images/sub/left_m02_10_on.gif";

		t24on = new Image; t24on.src ="/images/sub/left_m03_01_on.gif";
		t25on = new Image; t25on.src ="/images/sub/left_m03_02_on.gif";
		t26on = new Image; t26on.src ="/images/sub/left_m03_03_on.gif";
		t27on = new Image; t27on.src ="/images/sub/left_m03_04_on.gif";
		t28on = new Image; t28on.src ="/images/sub/left_m03_05_on.gif";

		t29on = new Image; t29on.src ="/images/sub/left_m04_01_on.gif";
		t30on = new Image; t30on.src ="/images/sub/left_m04_02_on.gif";
		t31on = new Image; t31on.src ="/images/sub/left_m04_03_on.gif";
		t32on = new Image; t32on.src ="/images/sub/left_m04_04_on.gif";
		t33on = new Image; t33on.src ="/images/sub/left_m04_05_on.gif";
		t331on = new Image; t33on.src ="/images/sub/left_m04_06_on.gif";

		t34on = new Image; t34on.src ="/images/sub/left_m05_01_on.gif";
		t35on = new Image; t35on.src ="/images/sub/left_m05_02_on.gif";
		t36on = new Image; t36on.src ="/images/sub/left_m05_03_on.gif";
		t37on = new Image; t37on.src ="/images/sub/left_m05_04_on.gif";
		t38on = new Image; t38on.src ="/images/sub/left_m05_05_on.gif";
		t39on = new Image; t39on.src ="/images/sub/left_m05_06_on.gif";

		t40on = new Image; t40on.src ="/images/sub/left_m06_01_on.gif";
		t41on = new Image; t41on.src ="/images/sub/left_m06_02_on.gif";
		t42on = new Image; t42on.src ="/images/sub/left_m06_03_on.gif";
		t43on = new Image; t43on.src ="/images/sub/left_m06_04_on.gif";
		t44on = new Image; t44on.src ="/images/sub/left_m06_05_on.gif";
		t45on = new Image; t45on.src ="/images/sub/left_m06_06_on.gif";
		t46on = new Image; t46on.src ="/images/sub/left_m06_07_on.gif";

		t47on = new Image; t47on.src ="/images/sub/left_m07_01_on.gif";
		t48on = new Image; t48on.src ="/images/sub/left_m07_02_on.gif";
		t49on = new Image; t49on.src ="/images/sub/left_m07_03_on.gif";
		t50on = new Image; t50on.src ="/images/sub/left_m07_04_on.gif";
		t51on = new Image; t51on.src ="/images/sub/left_m07_05_on.gif";

		t52on = new Image; t52on.src ="/images/sub/left_m08_01_on.gif";
		t53on = new Image; t53on.src ="/images/sub/left_m08_02_on.gif";
		t54on = new Image; t54on.src ="/images/sub/left_m08_03_on.gif";
		t55on = new Image; t55on.src ="/images/sub/left_m08_04_on.gif";
		t56on = new Image; t56on.src ="/images/sub/left_m08_05_on.gif";
		t57on = new Image; t57on.src ="/images/sub/left_m08_06_on.gif";

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		
        t0off = new Image; t0off.src ="/images/sub/left_m01_01.gif";
        t1off = new Image; t1off.src ="/images/sub/left_m01_02.gif";
		t2off = new Image; t2off.src ="/images/sub/left_m01_03.gif";
        t3off = new Image; t3off.src ="/images/sub/left_m01_04.gif";
		t4off = new Image; t4off.src ="/images/sub/left_m01_05.gif";
        t5off = new Image; t5off.src ="/images/sub/left_m01_06.gif";
		t6off = new Image; t6off.src ="/images/sub/left_m01_07.gif";
        t7off = new Image; t7off.src ="/images/sub/left_m01_08.gif";
		t8off = new Image; t8off.src ="/images/sub/left_m01_09.gif";
        t9off = new Image; t9off.src ="/images/sub/left_m01_10.gif";
		t10off = new Image; t10off.src ="/images/sub/left_m01_11.gif";
        t11off = new Image; t11off.src ="/images/sub/left_m01_12.gif";
        t12off = new Image; t12off.src ="/images/sub/left_m01_13.gif";
        t13off = new Image; t13off.src ="/images/sub/left_m01_14.gif";

        t14off = new Image; t14off.src ="/images/sub/left_m02_01.gif";        
		t15off = new Image; t15off.src ="/images/sub/left_m02_02.gif";
        t16off = new Image; t16off.src ="/images/sub/left_m02_03.gif";
        t17off = new Image; t17off.src ="/images/sub/left_m02_04.gif";
        t18off = new Image; t18off.src ="/images/sub/left_m02_05.gif";
        t19off = new Image; t19off.src ="/images/sub/left_m02_06.gif";
        t20off = new Image; t20off.src ="/images/sub/left_m02_07.gif";
        t21off = new Image; t21off.src ="/images/sub/left_m02_08.gif";
        t22off = new Image; t22off.src ="/images/sub/left_m02_09.gif";
        t23off = new Image; t23off.src ="/images/sub/left_m02_10.gif";

        t24off = new Image; t24off.src ="/images/sub/left_m03_01.gif";
        t25off = new Image; t25off.src ="/images/sub/left_m03_02.gif";
        t26off = new Image; t26off.src ="/images/sub/left_m03_03.gif";
        t27off = new Image; t27off.src ="/images/sub/left_m03_04.gif";
        t28off = new Image; t28off.src ="/images/sub/left_m03_05.gif";

        t29off = new Image; t29off.src ="/images/sub/left_m04_01.gif";
        t30off = new Image; t30off.src ="/images/sub/left_m04_02.gif";
        t31off = new Image; t31off.src ="/images/sub/left_m04_03.gif";
        t32off = new Image; t32off.src ="/images/sub/left_m04_04.gif";
        t33off = new Image; t33off.src ="/images/sub/left_m04_05.gif";
		t331off = new Image; t331off.src ="/images/sub/left_m04_06.gif";

        t34off = new Image; t34off.src ="/images/sub/left_m05_01.gif";
        t35off = new Image; t35off.src ="/images/sub/left_m05_02.gif";
        t36off = new Image; t36off.src ="/images/sub/left_m05_03.gif";
        t37off = new Image; t37off.src ="/images/sub/left_m05_04.gif";
        t38off = new Image; t38off.src ="/images/sub/left_m05_05.gif";
        t39off = new Image; t39off.src ="/images/sub/left_m05_06.gif";

        t40off = new Image; t40off.src ="/images/sub/left_m06_01.gif";
        t41off = new Image; t41off.src ="/images/sub/left_m06_02.gif";
        t42off = new Image; t42off.src ="/images/sub/left_m06_03.gif";
        t43off = new Image; t43off.src ="/images/sub/left_m06_04.gif";
        t44off = new Image; t44off.src ="/images/sub/left_m06_05.gif";
        t45off = new Image; t45off.src ="/images/sub/left_m06_06.gif";
        t46off = new Image; t46off.src ="/images/sub/left_m06_07.gif";

		t47off = new Image; t47off.src ="/images/sub/left_m07_01.gif";
		t48off = new Image; t48off.src ="/images/sub/left_m07_02.gif";
		t49off = new Image; t49off.src ="/images/sub/left_m07_03.gif";
		t50off = new Image; t50off.src ="/images/sub/left_m07_04.gif";
		t51off = new Image; t51off.src ="/images/sub/left_m07_05.gif";

		t52off = new Image; t52off.src ="/images/sub/left_m08_01.gif";
		t53off = new Image; t53off.src ="/images/sub/left_m08_02.gif";
		t54off = new Image; t54off.src ="/images/sub/left_m08_03.gif";
		t55off = new Image; t55off.src ="/images/sub/left_m08_04.gif";
		t56off = new Image; t56off.src ="/images/sub/left_m08_05.gif";
		t57off = new Image; t57off.src ="/images/sub/left_m08_06.gif";

        }


actor = "";
old_actor = "";

function img_act(imgName) {
        if (((init=="net")&&(browserVer >= 3)) || ((init == "ie") && (browserVer >= 4)))
        {
        imgOn = eval(imgName + "on.src");
        document [imgName].src = imgOn;
        }
}
function img_inact(imgName) {
 if(actor != imgName) {
        if (((init=="net")&&(browserVer >= 3)) || ((init == "ie") && (browserVer >= 4)))
        {
        imgOff = eval(imgName + "off.src");
        document [imgName].src = imgOff;
        }
    }
}
function img_onact(imgName) {
 if (actor == "") {
  old_actor = imgName; 
  actor = imgName;
 }else {
  old_actor = actor;
  actor = imgName;
  img_inact(old_actor);
 }
 
 img_act(actor);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Å¸ÀÌÆ²ÇÃ·¡½Ã
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function Title_swf(){
		if(LeftcurMenu == null) LeftcurMenu='1';
		title_num = LeftcurMenu.charAt(0);
		cur_num = LeftcurMenu.charAt(1);
		ViewFlash("/img/swf/sub_title0"+ title_num +".swf","675","130","curTitle="+ cur_num +"","#ffffff", "");
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ÆË¾÷
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// top¹öÆ°
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function scrollLayer(p_obj_name, p_gap_point, t_point) 
{ 
    var top_point, start_point, end_point, timer; 

    var obj_layer   = document.getElementById(p_obj_name);  // ·¹ÀÌ¾î ¿ÀºêÁ§Æ®

    top_point   = obj_layer.style.top;
    start_point = parseInt(top_point, 10); 
    end_point   = (parseInt(document.body.clientHeight) - p_gap_point) + parseInt(document.body.scrollTop); 
    limit_point = parseInt(document.body.scrollHeight) - parseInt(obj_layer.offsetHeight) -10; 

    if ( end_point > limit_point )  end_point = limit_point; 
		if ( end_point < t_point)	end_point = t_point;
    if ( end_point < top_point )    end_point = top_point; 

    if ( start_point != end_point ) 
    { 
        scroll_amount = Math.ceil( Math.abs( end_point - start_point ) / 15 ); 
        obj_layer.style.top = parseInt(top_point, 10) + ( ( end_point < start_point ) ? -scroll_amount : scroll_amount ); 
    } 

    timer = setTimeout ("scrollLayer('" + p_obj_name + "', " + p_gap_point + ", " + t_point +");", 5); 
} 

function gotop(){
  document.body.scrollTop=0;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// iframe ÀÚµ¿ ³ôÀÌ Á¶Àý ½ºÅ©¸³Æ®
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function resizeFrame(iframeObj){
	var innerBody = iframeObj.contentWindow.document.body;
	oldEvent = innerBody.onclick;
	innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	iframeObj.style.height = innerHeight;
	var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	iframeObj.style.width = innerWidth;     
	if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
	this.scrollTo(1,1);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// tab ¾×¼Ç
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////



function tab_action(obj1, obj2) { //obj1:tab±¸ºÐÀÚ, obj2:¼±ÅÃµÇ´Âtab



		for(i=0;i<=(eval(obj1).length-1);i++){

			if(eval(obj1)[obj2-1] == eval(obj1)[i]){

				eval(obj1)[i].style.display="block";

			}

			else{

				eval(obj1)[i].style.display="none";

			}

		}

	}