//png-24 ÀÍ½ºÇÃ·Î·¯ 6.0¿¡¼­ º¸ÀÌ°Ô ÇÏ´Â ½ºÅ©¸³Æ® 
   function setPng24(obj) {
        obj.width=obj.height=1;
        obj.className=obj.className.replace(/\bpng24\b/i,'');

        obj.style.filter =

        "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
        obj.src=''; 
        return '';
    }
	
	<!-- ÇÃ·¡½Ã ¸ÞÀÎºñÁê¾ó(·Î±×ÀÎ/¸®¾Æ Æ÷ÇÔ)ÇÔ¼ö ½ÃÀÛ -->
	function SWFLoader(width,height,dir,num1,num2,num3,url1,url2,url3,url4,url5, id) {
		document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+width+"' height='"+height+"' id='"+id+"' >");
		document.write("<param name='allowScriptAccess' value='always'>");
		document.write("<param name='allowFullScreen' value='false'>");
		document.write("<param name='movie' value='"+dir+"'>");
		document.write("<param name='quality' value='high'>");
		document.write("<param name='wmode' value='transparent'>");
		document.write("<param name='base' value='.'>");
		document.write("<param name=FlashVars value='mmenu="+num1+"&smenu="+num2+"&tmenu="+num3+"&url1="+url1+"&url2="+url2+"&url3="+url3+"&url4="+url4+"&url5="+url5+"' />");
		document.write("<embed name='"+id+"' base='.' src='"+dir+"' FlashVars='mmenu="+num1+"&smenu="+num2+"&tmenu="+num3+"url1="+url1+"&url2="+url2+"&url3="+url3+"&url4="+url4+"&url5="+url5+"' quality='high' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' name='wmode' value='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
		document.write("</object>");
	}

	<!-- ÇÃ·¡½Ã ¸ÞÀÎºñÁê¾ó(·Î±×ÀÎ/¸®¾Æ Æ÷ÇÔ)ÇÔ¼ö ³¡ -->

	function flashLoader(width,height,dir,mainPos,subPos,id){
		if (dir.indexOf("swf") > 0) {
			document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"' id='"+id+"'>");
			document.write("<param name='movie' value='"+dir+"?mmenu="+mainPos+"&smenu="+subPos+"'>");
			document.write("<param name='quality' value='high'>");
			document.write("<param name='wmode' value='transparent'>");
			document.write("<param name='base' value='.'>");
			document.write("<param name=FlashVars value='mmenu="+mainPos+"&smenu="+subPos+"' />");
			document.write("<embed name='"+id+"' base='.' FlashVars='mmenu="+mainPos+"&smenu="+subPos+"' src='"+dir+"?mmenu="+mainPos+"&smenu="+subPos+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' wmode='transparent'></embed>");
			document.write("</object>");
		}
		else {
			document.write("<img src='"+dir+"' width='"+width+"' height='"+height+"'  border='0'>");
		}
	}
<!-- ÇÃ·¡½Ã ¸ÞÀÎºñÁê¾ó½Ã°è ÇÔ¼ö ³¡ -->
	function flashLoader_MainClock(width,height,dir,mainPos,subPos,id){
		if (dir.indexOf("swf") > 0) {
			document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+width+"' height='"+height+"' id='"+id+"'>");
			document.write("<param name='movie' value='"+dir+"'>");
			document.write("<param name='quality' value='high'>");
			document.write("<param name='wmode' value='transparent'>");
			document.write("<param name='base' value='.'>");
			document.write("<param name=FlashVars value='mmenu="+mainPos+"&smenu="+subPos+"' />");
			document.write("<embed name='"+id+"' base='.' FlashVars='mmenu="+mainPos+"&smenu="+subPos+"' src='"+dir+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' wmode='transparent'></embed>");
			document.write("</object>");
		}
		else {
			document.write("<img src='"+dir+"' width='"+width+"' height='"+height+"'  border='0'>");
		}
	}


	//¸ÞÀÎ - Ã¤³Î¼øÀ§ Æ÷½ºÅÍ ½ºÅ©¸³Æ®
	function viewPoster(e, url1) {
		var width = 619;
		var height = 445;
		var dir = "/flash/hana_poster.swf";		
		var type = e;

		html = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+width+"' height='"+height+"'>";
		html += "<param name='allowScriptAccess' value='always'>";
		html += "<param name='allowFullScreen' value='false'>";
		html += "<param name='movie' value='"+dir+"'>";
		html += "<param name='quality' value='high'>";
		html += "<param name='wmode' value='transparent'>";
		html += "<param name='base' value='.'>";
		html += "<param name=FlashVars value='url1="+url1+"&type="+e+"' />";
		html += "<embed base='.' src='"+dir+"' FlashVars='url1="+url1+"&type="+e+"' quality='high' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' name='wmode' value='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>";
		html += "</object>";
		var poster = document.getElementById("poster");
		poster.style.display = "";
		poster.innerHTML = html;
	}

	function hiddenLayer() {
		var poster = document.getElementById("poster");
		poster.style.display = "none";
		poster.innerHTML = "";
	}


	//IPTVÃ¤³ÎÆí¼ºÇ¥ ½ºÅ©¸³Æ®
	function layerOn_live(dir) {
		html = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='875' height='500' id='programLog' align='middle'>";
		html += "<param name='allowScriptAccess' value='sameDomain' />";
		html += "<param name='allowFullScreen' value='false' />";
		html += "<param name='movie' value='"+dir+"' />";
		html += "<param name='quality' value='high' /><param name='bgcolor' value='#ffffff' />";
		html += "<param name='wmode' value='transparent'>";
		html += "<embed src='"+dir+"' quality='high' bgcolor='#ffffff' width='875' height='500' name='programLog' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
		html += "</object>";
		var liveTable = document.getElementById("p_liveTable");
		liveTable.style.display = "";
		liveTable.innerHTML = html;
	}

	function layerOff_live() {
		var liveTable = document.getElementById("p_liveTable");
		liveTable.style.display = "none";
		liveTable.innerHTML = "";
	}


	//Äü¹Ù - Ã¤³Î¹Ù·ÎÃ£±â ½ºÅ©¸³Æ®
		function channel_select(e, url1) {
		var width = 589;
		var height = 473;
		var dir = "/flash/channel_select.swf";
		url1 = "/main/QuickMenuNew.asp";
		var type = e;

		html = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+width+"' height='"+height+"'>";
		html += "<param name='allowScriptAccess' value='always'>";
		html += "<param name='allowFullScreen' value='false'>";
		html += "<param name='movie' value='"+dir+"'>";
		html += "<param name='quality' value='high'>";
		html += "<param name='wmode' value='transparent'>";
		html += "<param name='base' value='.'>";
		html += "<param name=FlashVars value='xmlUrl="+url1+"&type="+e+"' />";
		html += "<embed base='.' src='"+dir+"' FlashVars='xmlUrl="+url1+"&type="+e+"' quality='high' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' name='wmode' value='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>";
		html += "</object>";
		var chGo = document.getElementById("channel_go");
		chGo.style.display = "";
		chGo.innerHTML = html;
	}

	function hiddenChannel() {
		var chGo = document.getElementById("channel_go");
		chGo.style.display = "none";
		chGo.innerHTML = "";
	}


	//Ã¤³Î¾È³» - µ¿¿µ»óº¸±â ½ºÅ©¸³Æ® 
	function show(object, url1) {
		var width = 499;
		var height = 227;
		var dir = "/flash/hana_vod.swf";
		//var url1 = "/flash/loadVod.txt"

		html = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+width+"' height='"+height+"'>";
		html += "<param name='allowScriptAccess' value='always'>";
		html += "<param name='allowFullScreen' value='false'>";
		html += "<param name='movie' value='"+dir+"'>";
		html += "<param name='quality' value='high'>";
		html += "<param name='wmode' value='transparent'>";
		html += "<param name='base' value='.'>";
		html += "<param name=FlashVars value='url1="+url1+"' />";
		html += "<embed base='.' src='"+dir+"' FlashVars='url1="+url1+"' quality='high' width='"+width+"' height='"+height+"' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' name='wmode' value='transparent' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>";
		html += "</object>";

		if (document.layers && document.layers[object] != null) {
			document.layers[object].visibility = 'visible';
			document.layers[object].innerHTML = html;
		}
		else if (document.all) {
			document.all[object].style.visibility = 'visible';
			document.all[object].innerHTML = html;
		}
	}
	function hide(object) {
		if (document.layers && document.layers[object] != null) {
			document.layers[object].visibility = 'hidden';
			document.layers[object].innerHTML = "";
		}
		else if (document.all) {
			document.all[object].style.visibility = 'hidden';
			document.all[object].innerHTML = "";
		}
	}

	//footer ¼¿·ºÆ®¹Ú½º ·Ñ¿À¹ö ½ºÅ©¸³Æ® 
	function selectbox_list() { 
	var i,p,v,obj,args=selectbox_list.arguments;
	for (i=0; i<(args.length-2); i+=3) 
	with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
	}

	//·Ñ¿À¹ö ÀÌ¹ÌÁö±³Ã¼ °ü·Ã 
	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_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];}
	}

	//µ¿¿µ»ó Àç»ý
	function moviePlayer() {
		document.write(""
		+ "<OBJECT ID='MediaPlayer' Name='MediaPlayer' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject ' bgcolor='DarkBlue' width='332' Height='269' VIEWASTEXT>"
		+ "<PARAM NAME='AutoStart' VALUE='1'>"
		+ "<PARAM NAME='AutoSize' VALUE='1'>"
		+ "<PARAM NAME='AnimationAtStart' VALUE='0'>"
		+ "<PARAM NAME='DisplayMode' VALUE='4'>"
		+ "<PARAM NAME='Enabled' VALUE='1'>"
		+ "<PARAM NAME='ShowControls' VALUE='0'>"
		+ "<PARAM NAME='ShowAudioControls' VALUE='0'>"
		+ "<PARAM NAME='ShowDisplay' VALUE='0'>"
		+ "<PARAM NAME='ShowGotoBar' VALUE='0'>"
		+ "<PARAM NAME='ShowPositionControls' VALUE='0'>"
		+ "<PARAM NAME='ShowStatusBar' VALUE='0'>"
		+ "<PARAM NAME='Volume' VALUE='50'>"
		+ "<PARAM NAME='ShowCaptioning' VALUE='0'>"
		+ "<PARAM NAME='TransparentAtStart' value='1'>"
		+ "<EMBED invokeURLs='false' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' id='MediaPlayer' Name='MediaPlayer' DisplaySize='4' AutoSize='1' ShowControls='0' ShowDisplay='0' ShowStatusBar='1' autostart='0'>"
		+ "</EMBED>"
		+ "</OBJECT>");


	}
	//ÆË¾÷
	function openPopUp(url,nm,sb,w,h) { 
		window.open(url,nm,"toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars="+sb+",resizable=no,copyhistory=no,width="+w+",height="+h); 
	} 
	//IPTVÆË¾÷
	function openPopUpIPTV() { 
		window.open("/iptv2/index_nl.asp","iptv2","toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=980,height=700"); 
	} 

	function openPopupFull(url){
		window.open(url);
	}

	function overTab1(num)
	{
	  if(num==1){
		document.all.com_TAB1.src="../img/channel/btn_menu1o.gif";
		document.all.com_TAB2.src="../img/channel/btn_menu2.gif";
		document.all.com_TAB3.src="../img/channel/btn_menu3.gif";
		document.all.com_TAB4.src="../img/channel/btn_menu4.gif";
		document.all.com_TAB5.src="../img/channel/btn_menu5.gif";
	  } else   if(num==2){
		document.all.com_TAB1.src="../img/channel/btn_menu1.gif";
		document.all.com_TAB2.src="../img/channel/btn_menu2o.gif";
		document.all.com_TAB3.src="../img/channel/btn_menu3.gif";
		document.all.com_TAB4.src="../img/channel/btn_menu4.gif";
		document.all.com_TAB5.src="../img/channel/btn_menu5.gif";
	  } else   if(num==3){
		document.all.com_TAB1.src="../img/channel/btn_menu1.gif";
		document.all.com_TAB2.src="../img/channel/btn_menu2.gif";
		document.all.com_TAB3.src="../img/channel/btn_menu3o.gif";
		document.all.com_TAB4.src="../img/channel/btn_menu4.gif";
		document.all.com_TAB5.src="../img/channel/btn_menu5.gif";
	  } else   if(num==4){
		document.all.com_TAB1.src="../img/channel/btn_menu1.gif";
		document.all.com_TAB2.src="../img/channel/btn_menu2.gif";
		document.all.com_TAB3.src="../img/channel/btn_menu3.gif";
		document.all.com_TAB4.src="../img/channel/btn_menu4o.gif";
		document.all.com_TAB5.src="../img/channel/btn_menu5.gif";
	  } else   if(num==5){
		document.all.com_TAB1.src="../img/channel/btn_menu1.gif";
		document.all.com_TAB2.src="../img/channel/btn_menu2.gif";
		document.all.com_TAB3.src="../img/channel/btn_menu3.gif";
		document.all.com_TAB4.src="../img/channel/btn_menu4.gif";
		document.all.com_TAB5.src="../img/channel/btn_menu5o.gif";
	  }
	}

	// ¹®ÀÚ¿­ Ã¼Å©
	function LengthCheck( strValue, strName, lowLength, highLength )
	{
		var nsize = 0;

		nsize = GetLength(strValue);

		if ( lowLength > 0 && nsize == 0 ) {
			msg = "[" + strName + "] : ÀÔ·ÂÇØÁÖ½Ê½Ã¿À!";
			alert(msg);
			return false;
		}

		if ( nsize < lowLength || nsize > highLength ) {
			if ( lowLength == highLength ) {
				msg = "[" + strName + "] : " + lowLength + "ÀÚ¸¦ ÀÔ·ÂÇØÁÖ½Ê½Ã¿À!\r\n\r\n (ÁÖÀÇ: ÇÑ±Û 1ÀÚ´Â 2ÀÚ·Î °è»êÇÔ.)";
				alert(msg);
				return false;
			} else {
				msg = "[" + strName + "] : " + lowLength + " - " + highLength + " ÀÚ¸¦  ÀÔ·ÂÇØÁÖ½Ê½Ã¿À!\r\n\r\n (ÁÖÀÇ: ÇÑ±Û 1ÀÚ´Â 2ÀÚ·Î °è»êÇÔ.)";
				alert(msg);
				return false;
			}	
		}
		else
			return true;
	}

	// ¹®ÀÚ¿­ ±æÀÌ¸¦ ÀÐÀ½
	function GetLength( strValue )
	{
		var nsize = 0;
		var chrOrig;
		var charEscaped;

		for( var intinx = 0; intinx <= strValue.length -1 ; intinx++ ){
			chrOrig = strValue.substring(intinx,intinx+1);
			chrEscaped = escape(chrOrig);
			if ( chrEscaped.substring(0,2) == "%u" )
				nsize = nsize + 2;
			else
				nsize++;
		}
		return nsize;
	}

	/*######################################################################
	# trim
	######################################################################*/
	function trim(str)
	{
		var arrStr = new Array();
		var lenStr;
		var rtnStr = "";
		
		if(str == null)
			return "";

		lenStr = str.length;
		for (var i = 0; i <lenStr; i++){
			arrStr[i] = str.charAt(i);
		
			if (arrStr[i] == " "){
				if (i > 0){
					if (!arrStr[i - 1]) arrStr[i] = "";
				} else {
					arrStr[i] = "";
				}
			}
		}
		
		for (i = lenStr - 1; i >= 0; i--){
			if (arrStr[i] == " ")
			{
				if (i < lenStr - 1){
					if (!arrStr[i + 1])
						arrStr[i] = "";
				} else {
					arrStr[i] = "";
				}
			}
		}
		
		for (i = 0; i < lenStr; i++)
			if (arrStr[i])
				rtnStr += arrStr[i];
		
		return rtnStr;
	}


//¸ÞÀÎ,¼­ºê ·Ñ¿À¹ö½Ã div height°ª ÀÚµ¿À¸·Î ´Ã¾î³ª´Â ÇÔ¼ö
function mainNavi(e) {
	if(e=="on") {
		document.getElementById("main_navi").className = "on";
	}
	else {
		document.getElementById("main_navi").className = "off";
	}
}

function subNavi(e) {
	if(e=="on") {
		document.getElementById("sub_navi").className = "on";
	}
	else {
		document.getElementById("sub_navi").className = "off";
	}
}

function flashWinOpen(url){
	window.open(url);
}


function clickStaticsURL(url, name){
		//alert(name)
		click_event(name);
		
		location.href = url;

}


function clickStaticsURLpopup(url, name, link_type){
		click_event(name);
 
	if (link_type=='1')
	{
		location.href = url;
	}else if (link_type=='3'){
		openPopUpIPTV(); 
	}else if (link_type=='4'){ 
		openPopUp(url,'','no','980' ,'700'); 

	} else{
		window.open(url);
	}
		

}

function clickStaticsURLpopup2(url, name, link_type){
		click_event(name);
 
	if (link_type=='1')
	{
		location.href = url;
	}else if (link_type=='3'){
		openPopUpIPTV(); 
	}else if (link_type=='4'){ 
		openPopUp(url,'','no','980' ,'700'); 

	} else{
		window.open(url);
	}
		

}

function click_event(name) {
	//alert(name);
	eval("try{ _trk_clickTrace( 'EVT', '" + name + "' ); }catch(_e){ }");
}


// ÀÌº¥Æ® ÆäÀÌÁö textarea , text ¿¡ ", "¹®ÀÚ Ä¡È¯ (Ã¼Å©¹Ú½º¿¡¼­ »ç¿ë)
function eventCheckBoxCheck(thisForm){
 
		var frmCnt;
		var cFrm; 
		var frNm; 
		var tmpFrm; 
		var strValue; 
		frmCnt = thisForm.elements.length;  
		for (i = 0 ; i <= frmCnt-1 ; i++ )
		{
			var cFrm = thisForm[i]; 
			if (cFrm.type.toLowerCase() == "textarea" || cFrm.type.toLowerCase() == "text"  )
			{  
				frNm = cFrm.name; 
				tmpFrm = eval("thisForm."+frNm) ;   
				strValue = tmpFrm.value;
				for (j=0; j<strValue.length ; j++ )
				{ 
					strValue = strValue.replace(/, /g, ",") ;
				}
				tmpFrm.value = strValue; 
			}
		} 
}
 
function eventLoignCheckV(eventSeq){
	var jsnxssChksso = parent.jsnxssChksso;
	if (jsnxssChksso=='N')
	{
		if (confirm("·Î±×ÀÎ ÈÄ ÀÌ¿ë°¡´ÉÇÕ´Ï´Ù. \n\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?"))
		{
			parent.location.href = "/hanarosso/ssoexec.asp?UURL=http://www.skbtv.co.kr/event/EventDetail.asp?eventSeq="+eventSeq;//ÀÌº¥Æ® ¹øÈ£
			return 1;
		}else{
			return -1;
		}

	}
}
 