
function goto_BackPage()
{
	try{	
	var form = document.PageForm;
	var page = form.GoBackPageNum.value ;
		document.PageForm.action = "search.asp?page="+page+"&CodeNum="+form.CodeNum.value; 						
		document.PageForm.submit();
		
	}catch(e){}
}


/*
	¼³±³ ¼­ºêÅ¸ÀÌÆ² º¸ÀÓ
*/

function Show_Details()
{	
	var tmp = 'block';
	
	try { 
		
		if (!(div_subtitle)) return; 
	}catch(e){ 
		return;//0°ÇÀÎ °æ¿ì
	}	
	
	if (div_subtitle.length > 1)
	{
		tmp = (div_subtitle[0].style.display =='block') ? 'none' : 'block' ;
		
		for (var i=0; i< div_subtitle.length; i++)
		{
			div_subtitle[i].style.display = tmp ;
		}
	}
	else
	{
		tmp = (div_subtitle.style.display =='block') ? 'none' : 'block' ;
		div_subtitle.style.display = tmp ;
	}
	
}

function Show_Detail(idx)
{
	var tmp = 'block';
	
	if (div_subtitle.length > 1)
	{
		tmp = (div_subtitle[idx].style.display =='block') ? 'none' : 'block' ;
			div_subtitle[idx].style.display = tmp ;	
	}
	else
	{
		tmp = (div_subtitle.style.display =='block') ? 'none' : 'block' ;
		div_subtitle.style.display = tmp ;
	}
}

function Show_Init_Details()
{	
	var tmp = 'block';
	var initMax = 3 ;
	
	try { 
		
		if (!(div_subtitle)) return; 
	}catch(e){ 
		return;//0°ÇÀÎ °æ¿ì
	}	
	
	if (div_subtitle.length > 1)
	{
		tmp = (div_subtitle[0].style.display =='block') ? 'none' : 'block' ;
		initMax = (initMax > div_subtitle.length ) ? div_subtitle.length :initMax  ;
		for (var i=0; i< initMax ; i++)
		{
			div_subtitle[i].style.display = tmp ;
		}
	}
	else
	{
		tmp = (div_subtitle.style.display =='block') ? 'none' : 'block' ;
		div_subtitle.style.display = tmp ;
	}
	
}

/*
	¸ñ·Ï¿¡¼­ °Ë»ö ¹öÆ° Å¬¸¯ ÀÌº¥Æ®
*/

function goSubmit(e) {
	
	var myKeyCode = 0;
	
	if (window.event) { // ie
		
		myKeyCode = e.keyCode;
		if (myKeyCode==13) {
		    Click_Search();
		}
		
	} else if (e.which) { // netscape
		
		myKeyCode = e.which;

	}

}

function Click_Search() {
	
	var form = document.PageForm ;	
	
	var SearchInput = form.SearchInput.value ;
	var SearchOption = form.SearchOption[form.SearchOption.selectedIndex].value;
	var SDate = form.sdate.value ;
	var EDate = form.edate.value ;
	if (SearchInput == 'Please Input text you want to find.') {
	    SearchInput = '';	
	}	
	var PARAM = "&SearchOption="+SearchOption+"&SearchInput="+SearchInput +"&SDate="+SDate +"&EDate="+EDate;

	try{		
	}catch(e){}
	
	if (form.CodeNum)
	form.action = "search.asp?CodeNum="+form.CodeNum.value+ PARAM; 	
	else
	form.action = "search.asp?CodeNum=100"+ PARAM; 	
	form.submit();
	
}

function Href_SM(idx,MenuID)
{ 
	/*ºÎ¸ð ¸Þ´º¿¡¼­ Å¬¸¯½Ã*/
	try{				
		document.PageForm.action = "search.asp?CodeNum="+idx; 			
		document.PageForm.submit();
	}catch(e){}
}

function Href_SMSub(idx, Menu)
{
	/*¼­ºê ¸Þ´º¿¡¼­ Å¬¸¯½Ã*/
	try{		
	
		document.PageForm.action = "search.asp?CodeNum="+idx; 			
		document.PageForm.submit();
	}catch(e){}
}
	
// ±âÃÊ¼³±³, CodeNum:7000
function Href_SM2(idx_codenum, idx, MenuID)
{ 
	/*ºÎ¸ð ¸Þ´º¿¡¼­ Å¬¸¯½Ã*/
	try{				
		document.PageForm.action = "search.asp?idx_codenum="+idx_codenum+"&CodeNum="+idx;			
		document.PageForm.submit();
	}catch(e){}
}

// ±âÃÊ¼³±³, CodeNum:7000
function Href_SMSub2(idx_codenum, idx, Menu)
{
	/*¼­ºê ¸Þ´º¿¡¼­ Å¬¸¯½Ã*/
	try{		
	
		document.PageForm.action = "search.asp?idx_codenum="+idx_codenum+"&CodeNum="+idx;
		document.PageForm.submit();
	}catch(e){}
}
	
	
var tmpToggle = 0;
function ShowToggle()
{
	if (tmpToggle == 1 ) { Default_SMSub(0); tmpToggle = 0; }
	else { Default_SMSub(1); tmpToggle= 1;}
}
	
/* °øÅë : Æ®¸® °ü·Ã */

function Click_SM(idx)
{	
	
	try {
		if (DEFAULT_TYPE ==0)
		{
			for (var i=0; i< SMSub.length; i++)
			{
					SMSub[i].style.display = 'none';					
			}
			
			if (idx!=1 && idx!=2) { // ÁÖÁ¦¼³±³ÀÏ °æ¿ì ÇÏÀ§¸ñ·Ï ¾Èº¸¿©ÁÜ(idx´Â ÀÌ¹ÌÁö ¼ø¼­) 08.04.18
					SMSub[idx].style.display = 'block';			
			}
		}
	}catch(e){}
	
	Click_Img(idx) ;

}

function Click_Img(idx)
{
	
	try{
		
		var Common_Img_Path = './img/en/';
		
		for (var i=0; i< SM.length; i++)
		{
			
				document.SMImg[i].src = Common_Img_Path + 'sermon_m01_' + i + '_off.gif';
				
		}
	
		document.SMImg[idx].src = Common_Img_Path + 'sermon_m01_' + idx + '.gif';
		
	}catch(e){}
	
}

function Default_SMSub(display_type)
{
	
	try {
		if (SMSub.length >= 2)
		{	
			if ( display_type == 0)
			{
				for (var i=0; i< SMSub.length; i++)
				{
					SMSub[i].style.display = 'none';
				}
				SMSub[0].style.display = 'block';
					
			}		
			else if ( display_type == 1)
			{
				for (var i=0; i< SMSub.length; i++)
				{
					SMSub[i].style.display = 'block';
				}	
			}	
		}	
		else
		{

			SMSub.style.display = 'block';
		}
	}catch(e){}
	
}

function new_open1(theURL,selObj,features) {
	
	mCodeNum = selObj.options[selObj.selectedIndex].value
	if (mCodeNum == "000" ) {
		
	} else {
		location.href="../TV_Sermon/search.asp?CodeNum="+mCodeNum;
	}
	
}	

function Show_Detail_Change(itemp) {

	try {
		theme_img1 = "./img/en/theme_sermon_list.gif"
		//theme_img2 = "./img/en/list_close2.jpg"
		theme_img2 = ""
		
		var tmp = 'none';
		
	
		if (itemp==0) {
					
			if (div_change_memo.style.display == '') {
				div_change_memo.style.display = 'block';
			}
			
			tmp = (div_change_memo.style.display == 'block') ? 'none' : 'block' ;
			div_change_memo.style.display = tmp ;
			
			if (tmp == 'block') {
			    //document.all["div_CategorySermonList_Inner"].innerHTML = "<a href='#close' onClick='Show_Detail_Change(0)' onfocus='this.blur()'><img src='" + theme_img2 + "' border='0'></a>";
				document.all["div_CategorySermonList_Inner"].innerHTML = '';
			} else {
			    document.all["div_CategorySermonList_Inner"].innerHTML = "<a href='#close' onClick='Show_Detail_Change(0)' onfocus='this.blur()'><img src='" + theme_img1 + "' border='0'></a>" ;
			}

			document.all["div_CategorySermonList_Inner"].style.display = '';

		} else {
			div_change_memo.style.display = 'none';
			document.all["div_CategorySermonList_Inner"].innerHTML = "<a href='#close' onClick='Show_Detail_Change(0)' onfocus='this.blur()'><img src='" + theme_img1 + "' border='0'></a>" ;
			document.all["div_CategorySermonList_Inner"].style.display = '';
			
		}
	
	}catch(e){}

}


function openwin_pod(theURL) {
    window.open(theURL,"03",'left=5,top=5,width=574,height=850,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}


function chage_paging(selObj) {
	
	Click_Search();
//	var m_select_paging = selObj.options[selObj.selectedIndex].value;

}



