var totalImgNum = 10;
var imgSrc	= new Array(totalImgNum);
var linkURL	= new Array(totalImgNum);
var shortTxt= new Array(totalImgNum);
var longTxt	= new Array(totalImgNum);
imgSrc[1]	= 'images/tv_fat_01.jpg';
linkURL[1]	= 'jjqmWOEw4lQ';
shortTxt[1]	= '電視專訪：如何吃粽不要重';
longTxt[1]	= '<p>▼<b>名節目主持人李大華先生邀請邱正宏醫師參加電視節目談飲食和<a href="http://www.gscline.com/fat.htm">減肥</a></b></p>';
imgSrc[2]	= 'images/tv_fat_02.jpg';
linkURL[2]	= 'K14NG8FqPJo';
shortTxt[2]	= '電視專訪：夏日減肥大作戰';
longTxt[2]	= '<p>▼<b>電視節目『夏日減肥大作戰_飲食篇』專訪邱正宏醫師和<a href="http://www.gscline.com/fat.htm">景升聯合診所</a>談健康<a href="http://www.gscline.com/fat.htm">減肥</a></b></p>';
imgSrc[3]	= 'images/tv_fat_03.jpg';
linkURL[3]	= '4ZoiJuIEd8Q';
shortTxt[3]	= '電視專訪：談「腹部肥胖」問題';
longTxt[3]	= '<p>▼腹部肥胖有什麼不好？請看邱正宏醫師受邀在電視節目中談「<a href="http://www.gscline.com/fll-abdomen.htm">腹部肥胖</a>」問題</p>';
imgSrc[4]	= 'images/tv_fat_04.jpg';
linkURL[4]	= 'nHcSaJjEQOA';
shortTxt[4]	= '電視專訪：談瘦腰和局部減肥';
longTxt[4]	= '<p>▼搖呼拉圈對腰部肥胖有幫助嗎？請看邱正宏醫師接受電視專訪談如何「<a href="http://www.gscline.com/fll-waist.htm">瘦腰</a>」和局部減肥</p>';
imgSrc[5]	= 'images/tv_fat_05.jpg';
linkURL[5]	= 'nHcSaJjEQOA';
shortTxt[5]	= '電視專訪：談瘦腰、調整型內衣';
longTxt[5]	= '<p>▼邱正宏醫師接受電視專訪談「瘦腰」、「<a href="http://www.gscline.com/fatlocallaser.htm">局部減肥</a>」和「調整型內衣」</p>';
imgSrc[6]	= 'images/tv_fat_07.jpg';
linkURL[6]	= 'TF6sGF5rS-c';
shortTxt[6]	= '電視專訪：談減肥的原理';
longTxt[6]	= '<p>▼邱正宏醫師接受電視專訪談減肥的原理,健康的減肥：把握「飲食333，運動333，藥物333...」</p>';
imgSrc[7]	= 'images/tv_fat_08.jpg';
linkURL[7]	= 'sYJyKD5eMBU';
shortTxt[7]	= '電視專訪：完美體態達人談肥胖';
longTxt[7]	= '<p>▼TVBS專訪邱正宏醫師談肥胖，雙胞胎的遺傳體質一樣，體重可以相差達三倍 ，你相信嗎？ </p>';
imgSrc[8]	= 'images/tv_fat_09.jpg';
linkURL[8]	= '9ln5rkhagpQ';
shortTxt[8]	= '電視專訪：雷射溶脂的神奇';
longTxt[8]	= '<p>▼雷射溶脂要達到最佳效果，醫師的經驗、儀器的先進和術後的照顧三者缺一不可，寧可多花一些錢也不要為了省錢達不到效果...</p>';
imgSrc[9]	= 'images/tv_fat_09.jpg';
linkURL[9]	= 'S9mv5neHNys';
shortTxt[9]	= '康熙來了: 演藝圈紙片人';
longTxt[9]	= '<p>▼演藝圈紙片人怕胖不敢吃，其實吃到該胖的地方胖了之後，其他地方靠雷射溶脂瘦就可以了...</p>';
imgSrc[10]	= 'images/tv_fat_09.jpg';
linkURL[10]	= '44POhqlONlk';
shortTxt[10]= '聚焦360度：專訪邱正宏醫師';
longTxt[10]	= '<p>▼減肥不要怕吃消夜，只要保持原來的運動量，多站一站就可以了，請看邱醫師怎麼說...</p>';


var n=parseInt(totalImgNum * Math.random())+1;

function rndSmallTVtxt() {
	return shortTxt[n];
}

function rndSmallTVImg() {	
	return getSmallTVhtml(n);
}

function getSmallTVhtml(n) {
	var tmp='<span style="background-position:  50% 50%; cursor:hand; background-image:url(\'' + imgSrc[n] + '\'); background-repeat:no-repeat; width:236; height:125" onclick="javascript:SetCookie(\'tvRNDN\',\'' + n + '\');window.location=\'tv.htm\';"></span>';
	var tmp='<span style="background-position:  50% 50%; cursor:hand; background-image:url(\'' + imgSrc[n] + '\'); background-repeat:no-repeat; width:236; height:125" onclick="javascript:SetCookie(\'tvRNDN\',\'' + n + '\');$(\'top_LTV\').innerHTML=getLargeTVhtml();"></span>';
	return tmp;
}


function getLargeTVhtml() {
	var x = GetCookie('tvRNDN');
	if(x=='') {x =1;}
	
	var tmp	= '<table border="0" width="100%" cellpadding="0" style="border-collapse: collapse">';
	tmp	+= '<tr>';
	tmp	+= '<td width="50%" valign="top" bgcolor="#000000">';
	tmp	+= '<object width="358" height="190">';
	tmp += '<param name="movie" value="http://www.youtube-nocookie.com/v/' + linkURL[x] + '&hl=zh_TW&fs=1&rel=0&autoplay=1"></param>';
	tmp += '<param name="allowFullScreen" value="true"></param>';
	tmp += '<param name="allowscriptaccess" value="always"></param>';
	tmp += '<embed src="http://www.youtube-nocookie.com/v/' + linkURL[x] + '&hl=zh_TW&fs=1&rel=0&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" enablecsi="1" width="358" height="190">';
	tmp += '</embed></object></td>';
	tmp	+= '<td width="50%" valign="top" style="padding: 10px">';
	tmp += '<table border="0" width="100%">';
	tmp += '<tr><td valign="top"><span style="text-align: center" class="bule-bt">' + longTxt[x] + '</span></td></tr>';
	tmp += '<tr><td align="center"><a href="tv.htm"><img border="0" src="images/btn_moreTV.png" width="114" height="31"></a></td>';
	tmp += '</tr></table>';
	tmp	+= '</td></tr></table>';
	return tmp;}
