function closeLayer()
{
    document.getElementById("videoLayer").style.visibility = "hidden";
}

function showVideo(format, Arcdate, name, filename)
{
    if(format =="F128")
    {
    document.getElementById("videoLayer").style.width ="300";
    var swfObj = '<center><B class=body_center>FLASH - 128Kbps : '+Arcdate+'<BR><BR>'+name+'</B><BR><BR>';
    	swfObj = swfObj + '<object id="Object1" type="application/x-shockwave-flash" data="livevideo/player.swf" width="240" height="180">';
	swfObj = swfObj + '<param name="movie" value="livevideo/player.swf" />';
	swfObj = swfObj + '<param name="wmode" value="opaque" />';
	swfObj = swfObj + '<param name="allowScriptAccess" value="sameDomain" />';
	swfObj = swfObj + '<param name="quality" value="high" />';
	swfObj = swfObj + '<param name="menu" value="false" />';
	swfObj = swfObj + '<param name="autoplay" value="false" />';
	swfObj = swfObj + '<param name="autoload" value="false" />';
	swfObj = swfObj + '<param name="FlashVars" value="flv=week'+filename+'_msg128.flv&amp;width=240&amp;height=180&amp;autoplay=0&amp;autoload=0&amp;buffer=5&amp;playercolor=d38c29 &amp;loadingcolor=eed3ae&amp;buttoncolor=ffffff&amp;slidercolor=ffffff" />';
	swfObj = swfObj + '</object><BR><BR><A href="javascript:closeLayer();" class=body_center><B> X close</B></A></center>';
    }
    if(format =="F512")
    {
    document.getElementById("videoLayer").style.width ="380";
    var swfObj = '<center><B class=body_center>FLASH - 512Kbps : '+Arcdate+'<BR><BR>'+name+'</B><BR><BR><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="320" height="240" id="player" align="middle">';
    swfObj = swfObj + '<param name="movie" value="livevideo/player.swf?file=week'+filename+'_msg512.flv&size=false&aplay=false&autorew=false&title=" />';
    swfObj = swfObj + '<param name="menu" value="false" />';
    swfObj = swfObj + '<param name="quality" value="high" />';
    swfObj = swfObj + '<param name="bgcolor" value="#999999" />';
    swfObj = swfObj + '<embed src="livevideo/player.swf?file=week'+filename+'_msg512.flv&size=false&aplay=false&autorew=false&title=" menu="false" quality="high" bgcolor="#999999" width="320" height="240" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    swfObj = swfObj + '</object><BR><BR><A href="javascript:closeLayer();" class=body_center><B> X close</B></A></center>';
    }
    if(format =="W128")
    {
    document.getElementById("videoLayer").style.width ="316";
    var swfObj = '<center><B class=body_center>WMV - 128Kbps : '+Arcdate+'<BR><BR>'+name+'</B><BR><BR><OBJECT ID="MediaPlayer" WIDTH="256" HEIGHT="192" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">';
    swfObj = swfObj + '<PARAM NAME="FileName" VALUE="livevideo/week'+filename+'_msg128.wmv">';
    swfObj = swfObj + '<PARAM name="ShowControls" VALUE="true">';
    swfObj = swfObj + '<param name="ShowStatusBar" value="false">';
    swfObj = swfObj + '<PARAM name="ShowDisplay" VALUE="false">';
    swfObj = swfObj + '<PARAM name="autostart" VALUE="false">';
    swfObj = swfObj + '<EMBED TYPE="application/x-mplayer2" SRC="livevideo/week'+filename+'_msg128.wmv" NAME="MediaPlayer" WIDTH="256" HEIGHT="192" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>';
    swfObj = swfObj + '</OBJECT><BR><BR><A href="javascript:closeLayer();" class=body_center><B> X close</B></A></center>';
    }
    if(format =="W256")
    {
    document.getElementById("videoLayer").style.width ="380";
    var swfObj = '<center><B class=body_center>WMV - 256Kbps : '+Arcdate+'<BR><BR>'+name+'</B><BR><BR><OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="240" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">';
    swfObj = swfObj + '<PARAM NAME="FileName" VALUE="livevideo/week'+filename+'_msg256.wmv">';
    swfObj = swfObj + '<PARAM name="ShowControls" VALUE="true">';
    swfObj = swfObj + '<param name="ShowStatusBar" value="false">';
    swfObj = swfObj + '<PARAM name="ShowDisplay" VALUE="false">';
    swfObj = swfObj + '<PARAM name="autostart" VALUE="false">';
    swfObj = swfObj + '<EMBED TYPE="application/x-mplayer2" SRC="livevideo/week'+filename+'_msg256.wmv" NAME="MediaPlayer" WIDTH="320" HEIGHT="240" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>';
    swfObj = swfObj + '</OBJECT><BR><BR><A href="javascript:closeLayer();" class=body_center><B> X close</B></A></center>';
    }

document.getElementById("videoLayer").style.visibility ="visible";
document.getElementById("videoLayer").innerHTML = swfObj;
}


function showArchives()
{
    var tablemsg = '<table align=center border=1 cellpadding=1 cellspacing=0 width="100%"  bordercolor="#E4E3E3" class="body">';
    tablemsg +='<tr><td width="18%"align=center> Date </td>';
    tablemsg +='<td width="50%" align=center> Topic </td>';
    tablemsg +='<td width="16%" align=center> Low Speed</td>';
    tablemsg +='<td width="16%" align=center> High Speed</td></tr>';

    for(i=archivecount-1; i>=0; i--)
    {
      tablemsg +='<tr><td align=center>'+Adate[i]+'</td>';
      tablemsg +='<td>'+ AmessageTopic[i]+'</td>';
      tablemsg +='<td align=center><A href="javascript:showVideo(\'F128\',\''+Adate[i]+'\',\''+AmessageTopic[i]+'\',\''+Afilename[i]+'\')";><img src="images/view.gif" border=0></A></td>';
      tablemsg +='<td align=center><A href="javascript:showVideo(\'W256\',\''+Adate[i]+'\',\''+AmessageTopic[i]+'\',\''+Afilename[i]+'\')";><img src="images/view3.gif" border=0></A></td></tr>';
    }
    tablemsg +='</table>';


 document.getElementById("tableLayer").innerHTML = tablemsg;

}
