/* 動画呼び出し : トップページ  */
/* Copyright 2009 Mediansfree   */

/**********************************************/
/* 番組が変更した場合は下記を変更してください */
/**********************************************/

/* 最初に表示させるチャンネル */
var nowCH = 1;

/* ブロードバンド ※途中で改行をしない！ */
var bbData = '{"ch": [{"asx":"","w":0,"h":0},{"asx":"asx/1ch-bb.asx","w":428,"h":285},{"asx":"asx/2ch-bb.asx","w":320,"h":285},{"asx":"asx/3ch-bb.asx","w":320,"h":285},{"asx":"asx/4ch-bb.asx","w":428,"h":285},{"asx":"asx/5ch-bb.asx","w":428,"h":285},{"asx":"asx/6ch-bb.asx","w":320,"h":285},{"asx":"asx/7ch-bb.asx","w":320,"h":285},{"asx":"asx/8ch-bb.asx","w":320,"h":285}]}';

/* ナローバンド ※途中で改行をしない！ */
var nrData = '{"ch": [{"asx":"","w":0,"h":0},{"asx":"asx/nr/1ch-nr.asx","w":200,"h":165},{"asx":"asx/nr/2ch-nr.asx","w":200,"h":195},{"asx":"asx/nr/3ch-nr.asx","w":200,"h":195},{"asx":"asx/nr/4ch-nr.asx","w":200,"h":165},{"asx":"asx/nr/5ch-nr.asx","w":200,"h":165},{"asx":"asx/nr/6ch-nr.asx","w":200,"h":195},{"asx":"asx/nr/7ch-nr.asx","w":200,"h":195},{"asx":"asx/nr/8ch-nr.asx","w":200,"h":195}]}';

/*************************************************************************/
/* テキスト部分のHTML　※改行するときは末尾に半角[\]を必ずつけること！！ */
/*************************************************************************/

var text1ch = '\
<p class="new"><span class="bold"><a href="1ch/index.html">【土曜夜のとっておきの楽しみ方！】</a></span></p>\
<p class="date">（平成22年03月02日 5分57秒）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">初心者のための上方伝統芸能ナイトって？</li>\
<li class="m_text">会場は国の指定文化財の能舞台！</li>\
<li class="m_text">見に行きたい！やってみたい！という方は<a href="http://kamigata-night.com/" target="_blank">こちら</a>へ</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">1ch 平松邦夫の大阪NEWSへ<a href="1ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text2ch = '\
<p class="new"><span class="bold"><a href="2ch/index.html">おおさか情報ファイル</a></span></p>\
<p class="date">（平成22年03月15日）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">OSAKAほっとタイム<br>特別展「第41回日展」</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">2ch おおさか情報ファイルへ<a href="2ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text3ch = '\
<p class="new"><span class="bold"><a href="mayor/index.html">市長会見チャンネル</a></span></p>\
<p class="date">（平成22年03月18日）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">「長堀鶴見緑地線での事故に対する対応（『長堀鶴見緑地線の人的ミスによるインシデント調査対策委員会』の設置等）について」</li>\
<li class="m_text">「大阪府への『権限移譲実施計画（案）』の提出と『大阪発“地方分権改革”ビジョン』の再確認について」</li>\
<li class="m_text">「通天閣ロボへの『特別住民票』の交付について」</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">3ch 市長会見チャンネルへ<a href="mayor/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text4ch = '\
<p class="new"><span class="bold"><a href="4ch/index.html">いっしょにやりまひょチャンネル</a></span></p>\
<p class="date">（平成22年02月08日 2分22秒）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">第18回 なにわ元気アップ会議<br>「城東区でボランティア活動をされている皆さん」</li>\
</ul>\
\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">4ch いっしょにやりまひょチャンネルへ<a href="4ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text5ch = '\
<p><span class="bold"><a href="5ch/index.html">大阪エンターテイメントガイドチャンネル</a></span></p>\
<p class="date">（平成22年02月18日）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">OSAKA TIMES「大阪ウオーク」</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">5ch 大阪エンターテイメントガイドチャンネルへ<a href="5ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text6ch = '\
<p><span class="bold"><a href="6ch/index.html">大阪施設ガイドチャンネル</a></span></p>\
<p class="date">（平成21年8月3日）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">OSAKA 施設ガイド</li>\
<li class="m_text">OSAKA ムービーナビ</li>\
<li class="m_text">OSAKA シティガイド</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">6ch 大阪施設ガイドチャンネルへ<a href="6ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text7ch = '\
<p><span class="bold"><a href="7ch/index.html">大阪歴史ガイドチャンネル</a></span></p>\
<p class="date">（平成21年8月3日 4分59秒）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">大阪タイムトラベル</li>\
<li class="m_text">大阪遺産</li>\
<li class="m_text">大阪歴史年表</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">7ch 大阪歴史ガイドチャンネルへ<a href="7ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';

var text8ch = '\
<p class="new"><span class="bold"><a href="8ch/index.html">大阪ライブ映像チャンネル</a></span></p>\
<p class="date">（平成21年1月29日 秒）</p>\
<p class="bold">【内容】</p>\
<ul>\
<li class="m_text">「おおさかパノラマ」 ライブ中継</li>\
<li class="m_text">天王寺動物園</li>\
<li style="font-size:85%; font-weight:bold;">※左画面の動画は、『「おおさかパノラマ」 ライブ中継』のイメージ動画になります</li>\
</ul>\
<div style="clear:both"></div>\
<table width="258" border="0" cellspacing="0" cellpadding="0">\
<tr>\
<td class="link" valign="top">8ch 大阪ライブ映像チャンネルへ<a href="8ch/index.html"><img src="common/image/common/mark.png" alt="矢印" width="24" height="24" hspace="6" align="absmiddle" /></a></td>\
</tr>\
</table>';


/************************************/
/* 以下はシステム部分なので変更不可 */
/************************************/

var obj = eval("("+bbData+")");
var nowbbnr = 0;

/* WMV PLAYER WRITE */
function wmvWrite(chnum){
	nowCH = chnum;

	document.getElementById('tv').innerHTML = '<object ID="MediaPlayer" width="'+obj.ch[chnum].w+'" height="'+obj.ch[chnum].h+'" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"standby="Loading Microsoft Windows Media Player components..." TYPE="application/x-oleobject"><PARAM NAME="FileName" VALUE="'+obj.ch[chnum].asx+'"><PARAM NAME="AutoStart" VALUE="true"><PARAM NAME="ShowControls" VALUE="true"><PARAM NAME="ShowAudioControls" VALUE="true"><PARAM NAME="ShowPositionControls" VALUE="false"><PARAM NAME="showStatusBar" VALUE="false"><PARAM NAME="showTracker" VALUE="true"><PARAM NAME="windowlessvideo" VALUE="true"><param name="wmode" value="transparent" /><EMBED  type="video/x-ms-wvx" src="'+obj.ch[chnum].asx+'" showcontrols="1" showaudiocontrols="1" showpositioncontrols="0" showstatusbar="0" showtracker="1" width='+obj.ch[chnum].w+' height='+obj.ch[chnum].h+' wmode="transparent" windowlessvideo="1"></EMBED></OBJECT>';

}

/* TEXT SET */
function loadSet(){
	/* wmvWrite(nowCH); */
	textWrite(nowCH);
}

/* TEXT CHANGE */
function textWrite(chnum){
	document.getElementById('chtext').innerHTML = eval("text"+chnum+"ch");
}

/* Broad <-> Narow Change */
function bbnr(){
	nowbbnr = 1- nowbbnr;
	bnHTML = document.getElementById('bbnrchange');
	if(nowbbnr == 0){
		obj = eval("("+bbData+")");
		bnHTML.innerHTML = bnHTML.innerHTML.replace(/btn_br/,'narrow_btn');
	}else{
		obj = eval("("+nrData+")");
		bnHTML.innerHTML = bnHTML.innerHTML.replace(/narrow_btn/,'btn_br');
	}
	wmvWrite(nowCH);
}



function top1ch(){
	wmvWrite(1);
	textWrite(1);
}
function top2ch(){
	wmvWrite(2);
	textWrite(2);
}
function top3ch(){
	wmvWrite(3);
	textWrite(3);
}
function top4ch(){
	wmvWrite(4);
	textWrite(4);
}
function top5ch(){
	wmvWrite(5);
	textWrite(5);
}
function top6ch(){
	wmvWrite(6);
	textWrite(6);
}
function top7ch(){
	wmvWrite(7);
	textWrite(7);
}
function top8ch(){
	wmvWrite(8);
	textWrite(8);
}
