<!--
function funcLogingNeedAlert()
{
	
	if(confirm("È¸¿ø¸¸ »ç¿ëÀÌ °¡´ÉÇÕ´Ï´Ù.\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?"))
	{
		funcLoginPop();
	}
	return false;
}

//year auto add
function funcSelectDateBind(objname, topdata , lowdata )
{
	var obj = document.all.item(objname);
	var ilimit = topdata - lowdata + 1;
	
	if(obj==null) return;
	
	obj.length=0;


	for (var i=0; i<ilimit ;i++){
	obj.options[i]=new Option((topdata-i),(topdata-i));
	}
}

function today_broadcast()
{
	var link = "/util/todayvod.asp";
	window.open(link,"popmboardcontainer","width=690,height=561");
}

function funcViewTotayMedia()
{
	today_broadcast();
}

function funcPopmBoardContainer(boardkey,contentkey)
{

	if(contentkey=='')
	{
		alert("¹æ¼ÛÁ¤º¸¸¦ Ã£À» ¼ö ¾ø½À´Ï´Ù.");
		return;
	}
	var link = "/MBoardLib/Common/Ctr/popmboardcontainer.asp?boardtype=2&templetkey=9&boardkey=" + boardkey + "&contentkey=" + contentkey;
	window.open(link,"popmboardcontainer","width=690,height=561");
}

function funcMainMenuSearch()
{
	var link= "/util/search/detail.asp?searchword=";
	var objleftsearchword = document.all.item("leftsearchword");
	
	if(objleftsearchword.value=="")
	{
		alert("°Ë»öÇ×¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		objleftsearchword.focus();
		return;
	}
	
	document.location.href= link + objleftsearchword.value;
}



function funcViewVODFaq()
{
	var link="/util/vodfaq.asp";
	
	window.open(link,"vodfaq","width=380,height=390");
}

function funcViewVODHelp()
{
	var link="/footer/helpdesk.asp";
	
	
	opener.document.location.href = link;
	//window.open(link,"helpdesk","width=380,height=390");
	
}

function util_link(mode)
{
	var link = null;
	var ispop = false;
	var wintarget = "_self"
	var popparam = "";

	if(typeof(mode)=="undefined") mode = "";

	switch(mode.toLowerCase())
	{
	

	
		case "login" : 
			link = "/util/login.asp";
			//funcLoginPop();
			//return;
		break;
		case "logout" :
			link = "http://www.ihbc.co.kr/util/logout.asp";
		break;
		case "notice" :
			link = "http://www.ihbc.co.kr/util/notice/board.asp?boardkey=10";
		break;
		case "register" :
			link = "https://www.ihbc.co.kr/util/join_agree.asp";
		break;
		case "modify" :
			link = "https://www.ihbc.co.kr/util/join_modify.asp";
		break;
		case "event" :
			link = "http://www.ihbc.co.kr/util/event/board.asp?boardkey=8";
		break;
		case "schedule" :
			link = "http://www.ihbc.co.kr/util/schedule.asp";
		break;
		case "sitemap" :
			link = "http://www.ihbc.co.kr/util/sitemap.asp";
		break;
		default :
		alert("Àß¸øµÈ ¿äÃ»ÀÔ´Ï´Ù.");
		return;
		break; 
	}
	
	if(link!=null)
	{
		if(ispop) wintarget = "";
		window.open(link,wintarget,popparam);
	}
}

function funcImgErrNone(objthis)
{
	var objdisplay = "";
	
	switch(objthis.width)
	{
		case 240 :
		objthis.src="/images/common/vod_temp_01.gif";
		break;
		
		default : 
		objthis.src="/images/common/vod_temp.gif";
		//objdisplay = "none";
		break;
	}
	
	objthis.style.display = objdisplay;
	
	if(objthis.width==80)
	{
		objthis.style.display = "";
	}else
	{
		
	}
}

function funcFindID()
{
	var findlink = "/util/login_searchPasswordID.asp";
	window.open(findlink,"findidpop","width=380,height=330");
}

function funcLoginPop()
{
	var loginlink = "/util/login.asp";
	location.href = loginlink;
	//window.open(loginlink,"loginpop","width=380,height=330");
}

function funcMemberJoin()
{

	var joinlink="https://www.ihbc.co.kr/util/join_agree.asp";

	switch(typeof(opener))
	{
		case "undefined" :
			document.location.href = joinlink;
		break;
		default :
			opener.document.location.href = joinlink;
			window.close();
		break;
	}

	objtarget = joinlink;

}


function move_quickmenu(){
	quickmenu.style.pixelTop=document.body.scrollTop+260;
	setTimeout("move_quickmenu();",10);
}

function funcWinpopup(link,name,propty)
{
	if(typeof(name)=="undefined") name="";
	if(typeof(propty)=="undefined") propty="";
	
	
	window.open(link,name,propty);
}

function funcIsVaildStringByte(objcheck,limit)
{
	var temp;
	var count;
	count = 0;
	len = objcheck.value.length;
	for(k=0;k<len;k++){
		temp = objcheck.value.charAt(k);
		if(escape(temp).length > 4)
			count += 2;
		else
			count++;
	}
	
	if(count>limit) return false;
  return true;
}

function funcAlertMessageCreate(alertmessage,aftermethod, redirecturl)
{
	alert(alertmessage);

	switch(aftermethod.toLowerCase())
	{
		case "close" :
			parent.window.close();
		break;
		case "back" :
			history.back();
		break;		
		case "reload" :
			document.location.href=document.location.href;
		break;
		case "redirect" :
			document.location.href = redirecturl
		break;
		case "closeopnerreload" :
			opener.document.location.href=redirecturl;
			parent.window.close();
		break;	
		default :
		
		break;
	}
	
	return;
}

function Trim(s) {
    var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
    return (m == null) ? "" : m[1];
}

function funcgetCookie( name ) 
{ 
	var nameOfCookie = name + "="; 
	var x = 0; 
	while ( x <= document.cookie.length ) 
	{ 
			var y = (x+nameOfCookie.length); 
			if ( document.cookie.substring( x, y ) == nameOfCookie ) { 
					if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) 
							endOfCookie = document.cookie.length; 
					return unescape( document.cookie.substring( y, endOfCookie ) ); 
			} 
			x = document.cookie.indexOf( " ", x ) + 1; 
			if ( x == 0 ) 
					break; 
	} 
	return ""; 
} 

function funcsetCookie( name, value, expiredays ) 
{ 
	var todayDate = new Date(); 
	if(expiredays !=""){
		todayDate.setDate( todayDate.getDate() + expiredays );
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" ;
	}else{
		document.cookie = name + "=" + escape( value ) + "; path=/; expires=;" ;
	}
}


function funcSetSelected(objname,selectedvalue)
{
	var obj = document.all.item(objname);
	
	if(obj==null||typeof(obj)=="undefined") return;
	
	for(var i=0; i<obj.length;i++)
	{
		if(obj[i].value.toLowerCase()==selectedvalue.toLowerCase())
		{
			obj[i].selected = true;
			break;
		}
	}
}

function funcSetRadioChecked(objname,checkedvalue)
{
	var obj = document.all.item(objname);
	
	if(obj==null||typeof(obj)=="undefined") return;
	
	for(var i=0; i<obj.length;i++)
	{
		if(obj[i].value.toLowerCase()==checkedvalue.toLowerCase())
		{
			obj[i].checked = true;
			break;
		}
	}
}

function funcSetCheckChecked(objname,checkedvalue,defualtcheckedindex)
{
	var obj = document.all.item(objname);
	var checkedvaluearr=null;
	var checkok = false;
	if(typeof(checkedvalue)=="string")
	{
		checkedvaluearr = checkedvalue.split(",");
	}else
	{
		checkedvaluearr = checkedvalue;
	}
	
	if(obj==null||typeof(obj)=="undefined") return;
	
	for (var j=0;j<checkedvaluearr.length;j++)
	{
	
		for(var i=0; i<obj.length;i++)
		{
			if(obj[i].value.toLowerCase()==checkedvaluearr[j].toLowerCase())
			{
				obj[i].checked = true;
				checkok = true
				break;
			}
		}
	}
	
	if(!checkok&&typeof(defualtcheckedindex)!="undefined")
	{
		obj[defualtcheckedindex].checked=true;
	}
	
}



function funcGetObjByArray(obj)
{
	if(typeof(obj.length)=="undefined")
	{
		obj[0] = obj;
		obj.length =1;
	}
	
	return obj;
}
	
//-->