function ShowPlayer()
{
	var url;
	url="http://onair.etomato.com/tomatoplayer/tomatoplayervideoonly.html?s=etomato&txf=akldsfjas";
	top.tomatolive.location.href=url;
	screen_shot.style.display = "none";
	tv_live.style.display = "block";
}
// ·¹ÀÌ¾î ÆË¾÷À» À§ÇÑ ÇÔ¼ö - ½ÃÀÛ
function setCookie( name, value, expiredays )
{
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

function closeWin(setName) 
{
	if (document.notice_form.chkbox.checked)
	{
		setCookie( setName, "done" , 1 );
	}
	
	

	if(setName=="divpop")
	{
		MediaPlayer2.stop();
		document.all['divpop'].style.visibility = "hidden";
	}
}

function getDateObjToStr(date){
	var str = new Array();

	var _year = date.getFullYear();
	str[str.length] = _year;

	var _month = date.getMonth()+1;
	if(_month < 10) _month = "0"+_month;
	str[str.length] = _month;

	var _day = date.getDate();
	if(_day < 10) _day = "0"+_day;
	str[str.length] = _day;

	var _hour = date.getHours();
	if(_hour < 10) _hour = "0"+_hour;
	str[str.length] = _hour;

	var _min = date.getMinutes();
	if(_min < 10) _min = "0"+_min;
	str[str.length] = _min

	var getDateObjToStr = str.join("");

	return getDateObjToStr;
}

function getToday(){
	var d = new Date();
	var getToday = getDateObjToStr(d);
	return getToday;
}

function fnDivpop(startdate, enddate, width, height, url, target)
{
	var html="";
	var targetOption="";

	if (target==1)
	{
		targetOption = "_blank"
	}
	else
	{
		targetOption = "_self"
	}

	html = html + " <div id=\"divpop\" style=\"position:absolute; left:500px; top:200px; z-index:200; background:#000;\" style=\"display:;\">";
	html = html + " 	<table width='"+width+"' height='"+height+"' cellpadding='0' cellspacing='0'  style=\"border:0px #F9A100 solid\">";
	html = html + " 		<tr>";
	html = html + " 			<td width='"+width+"' height=''"+height+"' align='center' bgcolor='white'>";
	//html = html + " 				<a href='"+url+"' target='"+targetOption+"'><img src='"+popupImg+"' width='"+width+"' height='"+height+"' style=\"cursor:hand;\" border='0'/>";
	html += ' <object id="MediaPlayer2" name="MediaPlayer2" width="352" height="260" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"';
	html += ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"';
	html += ' standby="Loading Microsoft Windows Media Player components..."';
	html += ' type="application/x-oleobject"';
	html += ' vspace="0"';
	html += ' hspace="0"';
	html += ' <param name="AllowChangeDisplaySize" value="true">';
	html += ' <param name="AudioStream" value="0">';
	html += ' <param name="AutoSize" value="true">';
	html += ' <param name="AutoStart" value="true">';
	html += ' <param name="DisplaySize" value="0">';
	html += ' <param name="EnableContextMenu" value="0">';
	html += ' <param name="FileName" value="mms://media1.etomato.com/vodroot2/hello_new_year.wmv">';
	html += ' <param name="ShowCaptioning" value="0">';
	html += ' <param name="ShowControls" value="1">';
	html += ' <param name="ShowDisplay" value="0">';
	html += ' <param name="ShowGoToBar" value="0">';
	html += ' <param name="ShowPositionControls" value="0">';
	html += ' <param name="ShowStatusBar" value="0">';
	html += ' <param name="ShowTracker" value="-1">';
	html += ' <param name="VideoBorderWidth" value="0">';
	html += ' <param name="VideoBorderColor" value="0">';
	html += ' <param name="VideoBorder3D" value="0">';
	html += ' <!-- object tagÀ» Áö¿øÇÏÁö ¾Ê´Â browser¿¡¼­´Â ´ÙÀ½ ³»¿ëÀÌ Ãâ·ÂµÈ´Ù. -->';
	html += ' ÀÌ ¿µ¿ªÀº Microsoft Windows Media Player¸¦ <BR>';
	html += ' MIME typeÀ¸·Î ÇÏ¿© »ç¿ëÇÏ°í ÀÖ½À´Ï´Ù.<BR>';
	html += ' Microsoft Windows Media Player¸¦ Áö¿øÇÏÁö ¾Ê´Â<BR>';
	html += ' Browser¿¡¼­´Â ÀÌ °´Ã¼¸¦ º¼ ¼ö ¾ø½À´Ï´Ù.<BR>';
	html += ' </object>	'
	html = html + " 			</td>";
	html = html + " 		</tr>";
	html = html + " 		<form id=\"notice_form\" name=\"notice_form\">";
	html = html + " 		<tr>";
	html = html + " 			<td align='right' bgcolor='#000'>";
	html = html + " 				<input type=\"checkbox\" name=\"chkbox\" id=\"chkbox\" value=\"checkbox\" onclick=\"javascript:closeWin('divpop');\"/>";
	html = html + " 				<font style=\"font-size:11px;color:#fff;vertical-align:middle;\">¿À´Ã ÇÏ·ç ÀÌ Ã¢À» ¿­Áö ¾ÊÀ½ <a href=\"javascript:closeWin('divpop');\" style=\"font-size:11px;color:#fff;\"><B>[´Ý±â]</B></a></font>";
	html = html + " 			</td>";
	html = html + " 		</tr>";
	html = html + " 		</form>";
	html = html + " 	</table>";
	html = html + " </div>";

	document.write(html);

	if(getToday() >= startdate && enddate >= getToday())
	{
		document.all['divpop'].style.display = "block";
	}
	else
	{	
		MediaPlayer2.stop();
		document.all['divpop'].style.display = "none";
	}
}
// ·¹ÀÌ¾î ÆË¾÷À» À§ÇÑ ÇÔ¼ö - ³¡