
//»ó´Ü ·ÎÄÃ¸Þ´º ñé µµ¿ì¹Ì ÆË¾÷¸µÅ© 
function openPopup3() {
	var openWin = window.open('http://www.d21.org/search/search.asp', 'popup03' , 'width=530 , height=300');
	openWin.focus();
} 




function MM_preloadimages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadimages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open("http://www.d21.org//search/search.asp","µµ¿ì¹Ì","width=500,height=300");
}
function MM_openBrWindow2(theURL,winName,features) { //v2.0
  window.open("http://www.d21.org//sitemap/sitemap.htm","»çÀÌÆ®¸Ê","width=500,height=700");
}
function MM_openBrWindow3(theURL,winName,features) { //v2.0
  var theDay = (new Date()).getMonth()+1;
  window.open("http://www.d21.org/information/monthchurch/ch_month.asp?xMonth="+theDay,"»çÀÌÆ®¸Ê","width=800,height=600");
  //alert("2004church/2004.htm?xMonth="+theDay);
  
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Á¢¼ÓÇÏÀÚ ¸¶ÀÚ Ã¢ÀÇ »çÀÌÁî¸¦ »ç¿ëÀÚÀÇ ¸ð´ÏÅÍ ÇØ»óµµ¿¡ ¸ÂÃä´Ï´Ù.
//<!-- 
//var w= screen.width;
//var h= screen.height;
//window.moveTo(0, 0); 
//window.resizeTo(w, h); 
//--> 


//Äü º£³Ê ºê¶ó¿ìÀú»çÀÌÆ®¿¡ µû¶ó ½ºÅ©·Ñ µÇ´Â ½ºÆ®¸³Å© ½ÃÀÛ
var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4");
var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");

function always_pos()
{
        var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck;

        if ( bNetscape4plus ) { // ³×Ã÷ÄÉÀÌÇÁ ¿ë ¼³Á¤
                yMenuFrom   = document["scrollmenu"].top;
                yMenuTo     = top.pageYOffset + 70;   // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
        }
        else if ( bExplorer4plus ) {  // ÀÍ½ºÇÃ·Î·¯ ¿ë ¼³Á¤
                yMenuFrom   = parseInt (scrollmenu.style.top, 10);
                yMenuTo     = document.body.scrollTop + 108; // È­¸é À§ÂÊÀ¸·Î ºÎÅÍÀÇ À§Ä¡
        }

        timeoutNextCheck = 500;

        if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) {
                setTimeout ("always_pos()", timeoutNextCheck);
                return;
        }


        if ( yButtonFrom != yButtonTo ) {
                yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 10 );
                if ( yButtonTo < yButtonFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["divLinkButton"].top += yOffset;
                else if ( bExplorer4plus )
                        divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }
        if ( yMenuFrom != yMenuTo ) {
                yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 20 );
                if ( yMenuTo < yMenuFrom )
                        yOffset = -yOffset;

                if ( bNetscape4plus )
                        document["scrollmenu"].top += yOffset;
                else if ( bExplorer4plus )
                        scrollmenu.style.top = parseInt (scrollmenu.style.top, 10) + yOffset;

                timeoutNextCheck = 10;
        }

        setTimeout ("always_pos()", timeoutNextCheck);
}
function banLoad()
{
        var y;

        // ÇÁ·¹ÀÓ ¿¡¼­ ¹þ¾î³ª°Ô ÇÏ´Â ÇÔ¼öÀÔ´Ï´Ù. ÇÁ·¹ÀÓ¿¡ ³ÖÀ¸·Á¸é »èÁ¦ÇÏ¼¼¿ä
        if ( top.frames.length )
         //       top.location.href = self.location.href;

        // Æä¿¡Áö ·Îµù½Ã Æ÷Áö¼Ç
        if ( bNetscape4plus ) {
                document["scrollmenu"].top = top.pageYOffset + 100;
                document["scrollmenu"].visibility = "visible";
        }
        else if ( bExplorer4plus ) {
                scrollmenu.style.top = document.body.scrollTop + 100;
                scrollmenu.style.visibility = "visible";
        }

        always_pos();
        return true;
        
}

//Äü º£³Ê ºê¶ó¿ìÀú»çÀÌÆ®¿¡ µû¶ó ½ºÅ©·Ñ µÇ´Â ½ºÆ®¸³Å© ³¡-->



//´ãÀÓ¸ñ»ç´Ô ÆíÁö¾²±â ¹Ì¸®º¸±â ÆË¾÷
function Popup_pastor_latter_preview() {
	var openWin = window.open('http://www.d21.org/_061222/information/pastor/latter_preview.asp', 'popup_pastor_latter_preview' , 'width=640 , height=536');
	openWin.focus();
}

//¿î¿µÀÚ¿¡°Ô ÆíÁö¾²±â ¹Ì¸®º¸±â ÆË¾÷
function Popup_admin_latter_preview() {
	var openWin = window.open('http://www.d21.org/_061222/community/board/to_admin_preview.asp', 'popup_admin_latter_preview' , 'width=640 , height=536');
	openWin.focus();
}





//¿¹¹è¿µ»ó º¸±â ÆË¾÷
function Popup_pastor_sermon_view(seq,tb,divcode,mode) {
	var openWin = window.open('http://www.d21.org/_061228/information/pastor/sermon_view.asp?seq='+seq+'&tb='+tb+'&divcode='+divcode+'&mode='+mode, 'popup_pastor_sermon_view' , 'width=750 , height=466');
	openWin.focus();
}
//½Å³âºÎÈïÈ¸,´ë°¢¼º¿µ»ó,ºÎ¼­Çà»ç,±³È¸Çà»ç º¸±â ÆË¾÷
function Popup_pastor_sermon_view2(seq,tb,divcode,mode) {
	var openWin = window.open('http://www.d21.org/_061228/information/pastor/sermon_view.asp?seq='+seq+'&tb='+tb+'&divcode='+divcode+'&mode='+mode, 'popup_pastor_sermon_view' , 'width=405, height=466');
	openWin.focus();
}


//¿¹¹è¿µ»ó º¸±â ÆË¾÷
//function Popup_pastor_sermon_view1() {
	//var openWin = window.open('http://www.d21.org/_061228/information/pastor/sermon_view.asp', 'popup_pastor_sermon_view' , 'width=750 , height=466');
	//openWin.focus();
//}


/* È­¸é Áß¾Ó¿¡ ÀÌ¹ÌÁö Ç¥½Ã */
function openImageWinCenter(imageRef){
	var x,y,w,h,loadingMsg;
	//ÆË¾÷µÉ Ã¢ÀÇ ÃÊ±â Å©±â
	w=300;h=100;
	//È­¸é ÇÑ°¡¿îµ¥·Î ÆË¾÷Ã¢ ¶ç¿ì±â À§ÇÑ ÁÂÇ¥ °è»ê
	x=Math.floor( (screen.availWidth-(w+12))/2 );y=Math.floor( (screen.availHeight-(h+30))/2 );

	//ÀÌÁö¹Ì°¡ ·ÎµùÁß¿¡ ³»º¸³¾ ¸Þ½ÃÁö
	loadingMsg="<table width=100% height=100%><tr><td valign=center align=center><font size='2' color='#ffffff' face='termanal'>NOW LODDING...</font></td></tr></table>";

	with( window.open("","",'height='+h+',width='+w+',top='+y+',left='+x+',scrollbars=yes,resizable=yes') )
	{
		document.write(
		"<body topmargin=0 rightmargin=0 bottommargin=0 leftmargin=0 bgcolor=#808080>",
		loadingMsg,
		"<div align=center><img src=\""+imageRef+"\" hspace=0 vspace=0 border=0 alt=\"ÀÌ¹ÌÁö¸¦ Å¬¸¯ÇÏ½Ã¸é Ã¢ÀÌ ´ÝÈü´Ï´Ù.\"  style=\"cursor: hand;\" onmousedown=\"window.close();\" onload=\"document.title=this.src;document.body.removeChild(document.body.children[0]);window.resizeTo(this.width+12,this.height+30);window.moveTo(Math.floor( (screen.availWidth-(this.width+12))/2),Math.floor( (screen.availHeight-(this.height+30))/2 ));\"></div>",
		"</body>");
		focus();
	}
}

function swf2(src)
{
	html = '';
	html += '<embed src="'+ src + '" quality=high bgcolor="#ffffff" width="992" height="102" swliveconnect="true" id="param" name="param" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"><\/embed>';
	document.write(html);
}