//===========================================================================
//基本設定
//==================== begin ================================================
topMargin = 112;
layerHeight = 23;
leftMargin = 90;
tableWidth = 200;
rowHeight = 22;
showWeekly = true;
path = '';
//====================  end  ================================================

//===========================================================================
//所有的menu
//==================== begin ================================================
menuNames = new Array('t','fo','p','so','int','c','o','e','stock','life','sp','region','show');
titles = new Array('頭版新聞','焦點新聞','政治新聞','社會新聞','國際新聞','自由評論','自由廣場','財經焦點','證券理財','生活新聞','體育新聞','地方新聞','影視名人');
pages = new Array('today-t1.htm','today-fo1.htm','today-p1.htm','today-so0.htm','today-int0.htm','today-s1.htm','today-o0.htm','today-e1.htm','today-stock1.htm','today-life1.htm','today-sp0.htm','today-taipei0.htm','today-show1.htm');
if (showWeekly)
{
	menuNames = menuNames.concat(new Array('weekly'));
	titles = titles.concat(new Array('生活週報'));
	pages = pages.concat(new Array('today-weekly1.htm'));
}
else
{
	menuNames = menuNames.concat(new Array('supplement'));
	titles = titles.concat(new Array('生活藝文'));
	pages = pages.concat(new Array('today-fashion1.htm'));
}
menuNames2 = new Array('taipei','north','center','south','fashion','living','family','medicine','article','young','art','travel');

names = menuNames.concat(menuNames2);
menus = Array(names.length);
for (i=0; i<menus.length; i++)
{
	menus[i] = new Object();
	menus[i].name = names[i];
}
//====================  end  ================================================

//===========================================================================
//主選單
//==================== begin ================================================
document.write('<TABLE class=block2L cellSpacing=1 cellPadding=3 width=90 border=0>');
document.write('	<TR>');
document.write('		<TD bgColor=#333399>今日要聞</TD>');
document.write('	</TR>');
for (i=0; i<menuNames.length; i++)
{
	document.write('	<TR>');
	document.write('		<TD class=block2L_tda onMouseOver="showMenu(this,'+menuNames[i]+')" onMouseOut="hideMenu()" style=color:blue;cursor:pointer');
	document.write('				onClick="location.href=\''+path+pages[i]+'\'">'+titles[i]+'</TD>');
	document.write('	</TR>');
}
document.write('	<TR>');
document.write('		<TD bgColor=#cc6600><A class=block2La href="'+path+'Rnews.htm">專題報導</A></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD bgColor=#666666>服務專區</TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><A class=block2La href="http://www.roclotto.com.tw/" target=_blank>樂透彩券</A></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><A class=block2La href="'+path+'Nnews.htm">統一發票</A></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><font color=blue><A onmouseover="this.style.cursor=\'pointer\';this.style.color=\'deepskyblue\'" ');
document.write('			onclick="window.open(\'http://www.libertytimes.com.tw/Service/Order.htm\',\'_new\',\'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=770,height=650\');" ');
document.write('			onmouseout="this.style.color=\'blue\'">訂報服務</A></FONT></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><A href="http://www.libertytimes.com.tw/about/recruit.htm">求才專區</a></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><A href="http://www.lscc.com.tw/" target=_blank>自由廣場<br>國際會議中心</a></TD>');
document.write('	</TR>');
document.write('</TABLE>');
//====================  end  ================================================

//===========================================================================
//所有的menu的項目，由PHP產生
//==================== begin ================================================

menu = getMenu('fo');
menu.layer = 1;
menu.menuLayer = 0;
menu.rows = new Array(12);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '國安會秘書長邱義仁將留任 落實扁文告';
	rows[0].link = 'today-fo1.htm';
																										
	rows[1].text = '扁文告 李大維︰美台平等溝通';
	rows[1].link = 'today-fo2.htm';
																										
	rows[2].text = '軍購挑釁說 夏馨︰不可思議';
	rows[2].link = 'today-fo3.htm';
																										
	rows[3].text = '3軍購部分轉列年度預算 國親照刪';
	rows[3].link = 'today-fo4.htm';
																										
	rows[4].text = '馬說統一是終極目標 中國國台辦讚揚';
	rows[4].link = 'today-fo5.htm';
																										
	rows[5].text = '對中情蒐 日將購無人偵察機';
	rows[5].link = 'today-fo6.htm';
																										
	rows[6].text = '綠委批軍歌與時代脫節';
	rows[6].link = 'today-fo7.htm';
																										
	rows[7].text = '預算加決議 國親連環扣 卡住18趴';
	rows[7].link = 'today-fo8.htm';
																										
	rows[8].text = '報復性審預算 國親開殺戒';
	rows[8].link = 'today-fo9.htm';
																										
	rows[9].text = '總預算提覆議 創憲政先例';
	rows[9].link = 'today-fo10.htm';
																										
	rows[10].text = '菸害防制法修正案 確定過不了';
	rows[10].link = 'today-fo11.htm';
																										
	rows[11].text = '廖源隆送公懲會 最重撤職';
	rows[11].link = 'today-fo12.htm';
																										
}
menu = null;

menu = getMenu('p');
menu.layer = 2;
menu.menuLayer = 0;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = 'NCC12委員出爐 政院下週一提釋憲';
	rows[0].link = 'today-p1.htm';
																										
	rows[1].text = '綠營贊成釋憲 藍營批亂搞';
	rows[1].link = 'today-p2.htm';
																										
	rows[2].text = '新聞透視／NCC凍否 大法官須速決議';
	rows[2].link = 'today-p3.htm';
																										
	rows[3].text = '檢察總長改立院同意 今可望三讀';
	rows[3].link = 'today-p4.htm';
																										
	rows[4].text = '治水條例排除環評 社團批大災難';
	rows[4].link = 'today-p5.htm';
																										
	rows[5].text = '呂評3候選人 游陣營反彈';
	rows[5].link = 'today-p6.htm';
																										
	rows[6].text = '國民黨邊協商 邊罵中影工會';
	rows[6].link = 'today-p7.htm';
																										
	rows[7].text = '中國指聯電投資和艦 我們查不到？';
	rows[7].link = 'today-p8.htm';
																										
}
menu = null;

menu = getMenu('int');
menu.layer = 4;
menu.menuLayer = 0;
menu.rows = new Array(9);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '伊朗核爭議 將提安理會處理';
	rows[0].link = 'today-int1.htm';
																										
	rows[1].text = '黃禹錫道歉 辯稱遭同僚陷害';
	rows[1].link = 'today-int2.htm';
																										
	rows[2].text = '行刺已故教宗男子出獄 媒體猛批';
	rows[2].link = 'today-int3.htm';
																										
	rows[3].text = '《國際索隱》以色列政局漸明朗';
	rows[3].link = 'today-int4.htm';
																										
	rows[4].text = '末日地窖 儲存植物種子';
	rows[4].link = 'today-int5.htm';
																										
	rows[5].text = '美大法官被提名人遭質問 老婆哭了';
	rows[5].link = 'today-int6.htm';
																										
	rows[6].text = '笑療法 啟動好基因';
	rows[6].link = 'today-int7.htm';
																										
	rows[7].text = '麥加朝聖 踏死345人';
	rows[7].link = 'today-int8.htm';
																										
	rows[8].text = '《中英對照讀新聞》Britons shunning New Year dieting 英國人迴避新年節食計劃';
	rows[8].link = 'today-int9.htm';
																										
}
menu = null;

menu = getMenu('so');
menu.layer = 3;
menu.menuLayer = 0;
menu.rows = new Array(12);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '簽中2億 黑道覬覦 夜逃避禍';
	rows[0].link = 'today-so1.htm';
																										
	rows[1].text = '毒舌惹禍？小柏挨揍';
	rows[1].link = 'today-so2.htm';
																										
	rows[2].text = '華視回應 繼續規規矩矩做節目';
	rows[2].link = 'today-so3.htm';
																										
	rows[3].text = '架網賣搶票程式 台鐵員工到案';
	rows[3].link = 'today-so4.htm';
																										
	rows[4].text = '輪椅老舊難久坐 癱兒上學缺半天';
	rows[4].link = 'today-so5.htm';
																										
	rows[5].text = '脊損傷友 巧手造環保綠世界';
	rows[5].link = 'today-so6.htm';
																										
	rows[6].text = '獲贈賀年禮 肌萎簡正宗快樂飛上天';
	rows[6].link = 'today-so7.htm';
																										
	rows[7].text = '屢破偽鈔 美派官員致謝';
	rows[7].link = 'today-so8.htm';
																										
	rows[8].text = '75封查扣標單 至少5張被竄改';
	rows[8].link = 'today-so9.htm';
																										
	rows[9].text = '子癌歿 父控遭媳餓死';
	rows[9].link = 'today-so10.htm';
																										
	rows[10].text = '搶匪迎面來 國中生撲倒他';
	rows[10].link = 'today-so11.htm';
																										
	rows[11].text = '火併遇警 1分鐘棄械';
	rows[11].link = 'today-so12.htm';
																										
}
menu = null;

menu = getMenu('life');
menu.layer = 9;
menu.menuLayer = 0;
menu.rows = new Array(7);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '獎學金 不准用來請客';
	rows[0].link = 'today-life1.htm';
																										
	rows[1].text = '抗禽流感 我受邀參加東京世衛會議';
	rows[1].link = 'today-life2.htm';
																										
	rows[2].text = '國中畢業…應會1200個英文字';
	rows[2].link = 'today-life3.htm';
																										
	rows[3].text = '小港機場地勤 除夕起罷工';
	rows[3].link = 'today-life4.htm';
																										
	rows[4].text = '美國牛肉進口 須獲立院同意';
	rows[4].link = 'today-life5.htm';
																										
	rows[5].text = '停車失竊 賣場不賠';
	rows[5].link = 'today-life6.htm';
																										
	rows[6].text = '機場捷運 重提堤道共構案';
	rows[6].link = 'today-life7.htm';
																										
}
menu = null;

menu = getMenu('sp');
menu.layer = 10;
menu.menuLayer = 0;
menu.rows = new Array(9);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '爭得分王 小艾．小布飆破40';
	rows[0].link = 'today-sp1.htm';
																										
	rows[1].text = '普萊耶與施振榮 聯手經營品牌';
	rows[1].link = 'today-sp2.htm';
																										
	rows[2].text = '《WSBL》電信逆轉 台元自亂陣腳';
	rows[2].link = 'today-sp3.htm';
																										
	rows[3].text = '屏中小巨人 完封高苑';
	rows[3].link = 'today-sp4.htm';
																										
	rows[4].text = '雪梨網賽 希維特敗給無名小卒';
	rows[4].link = 'today-sp5.htm';
																										
	rows[5].text = '柯秉逸 最幼齒亞運培訓國手';
	rows[5].link = 'today-sp6.htm';
																										
	rows[6].text = '潘忠韋 20萬元男';
	rows[6].link = 'today-sp7.htm';
																										
	rows[7].text = '兄弟象尾牙 養父鐵現身';
	rows[7].link = 'today-sp8.htm';
																										
	rows[8].text = '經典賽準國手 今再集合';
	rows[8].link = 'today-sp9.htm';
																										
}
menu = null;

menu = getMenu('e');
menu.layer = 7;
menu.menuLayer = 0;
menu.rows = new Array(12);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '花旗看升亞洲貨幣';
	rows[0].link = 'today-e1.htm';
																										
	rows[1].text = '證券期貨整合 年底五合一';
	rows[1].link = 'today-e2.htm';
																										
	rows[2].text = '修破產法救卡奴 銀行反對';
	rows[2].link = 'today-e3.htm';
																										
	rows[3].text = '第二輪生肖套幣 上看3萬';
	rows[3].link = 'today-e4.htm';
																										
	rows[4].text = '未與銀行團談妥 高鐵新財務難產';
	rows[4].link = 'today-e5.htm';
																										
	rows[5].text = '伊朗煉鈾衝擊 油價再飆高';
	rows[5].link = 'today-e6.htm';
																										
	rows[6].text = '北商銀21日辦罷工投票';
	rows[6].link = 'today-e7.htm';
																										
	rows[7].text = '黃耀明否認掏空明日世界';
	rows[7].link = 'today-e8.htm';
																										
	rows[8].text = '就學貸款 16日起受理';
	rows[8].link = 'today-e9.htm';
																										
	rows[9].text = '歐洲、南韓利率 維持不變';
	rows[9].link = 'today-e10.htm';
																										
	rows[10].text = '派遣勞工職災費用 由派遣機構負擔';
	rows[10].link = 'today-e11.htm';
																										
	rows[11].text = 'LG變頻冷氣涉廣告不實 挨罰15萬';
	rows[11].link = 'today-e12.htm';
																										
}
menu = null;

menu = getMenu('stock');
menu.layer = 8;
menu.menuLayer = 0;
menu.rows = new Array(13);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '網銀理財 客廳變VIP室';
	rows[0].link = 'today-stock1.htm';
																										
	rows[1].text = '才開年 金價已上漲6%';
	rows[1].link = 'today-stock2.htm';
																										
	rows[2].text = '第一金董座 張兆順接任';
	rows[2].link = 'today-stock3.htm';
																										
	rows[3].text = '《理財Q&A》高收益公司債 ３要件評估';
	rows[3].link = 'today-stock4.htm';
																										
	rows[4].text = '固態電容開發 金山電達陣';
	rows[4].link = 'today-stock5.htm';
																										
	rows[5].text = '英華達獲授權 生產VoIP手機';
	rows[5].link = 'today-stock6.htm';
																										
	rows[6].text = '22奈米製程 台積今年著手研發';
	rows[6].link = 'today-stock7.htm';
																										
	rows[7].text = '接單利多 中低價PCB逆勢收紅';
	rows[7].link = 'today-stock8.htm';
																										
	rows[8].text = 'LPL稅後淨利約106億元 去年Q4獲利旺旺';
	rows[8].link = 'today-stock9.htm';
																										
	rows[9].text = '台幣升 摩根富林明投信︰抱股過年免驚';
	rows[9].link = 'today-stock10.htm';
																										
	rows[10].text = '友達、三星專利交互授權';
	rows[10].link = 'today-stock11.htm';
																										
	rows[11].text = '《期指觀測站》量能漸退潮 提防多殺多';
	rows[11].link = 'today-stock12.htm';
																										
	rows[12].text = '《國際股市》德法午盤下跌 日股收高';
	rows[12].link = 'today-stock13.htm';
																										
}
menu = null;

menu = getMenu('t');
menu.layer = 0;
menu.menuLayer = 0;
menu.rows = new Array(1);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '總預算遭大砍凍結 政院要覆議';
	rows[0].link = 'today-t1.htm';
																										
}
menu = null;

menu = getMenu('show');
menu.layer = 12;
menu.menuLayer = 0;
menu.rows = new Array(12);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '女頭家何如芸 拒做半吊子';
	rows[0].link = 'today-show1.htm';
																										
	rows[1].text = '伍佰聲援王心凌';
	rows[1].link = 'today-show2.htm';
																										
	rows[2].text = '5566帶頭作秀 過年削600萬';
	rows[2].link = 'today-show3.htm';
																										
	rows[3].text = '馬景濤牽于莉 臉紅又尷尬';
	rows[3].link = 'today-show4.htm';
																										
	rows[4].text = '木村戴綠帽 靜香搭上英文教師';
	rows[4].link = 'today-show5.htm';
																										
	rows[5].text = '現代版大長今 女星降價搶演';
	rows[5].link = 'today-show6.htm';
																										
	rows[6].text = '被罵豬朋狗友 陳小春反擊GIGI';
	rows[6].link = 'today-show7.htm';
																										
	rows[7].text = '霍元甲求精簡 楊紫瓊沒戲唱';
	rows[7].link = 'today-show8.htm';
																										
	rows[8].text = '和家馨有了 要生獅寶寶';
	rows[8].link = 'today-show9.htm';
																										
	rows[9].text = '莎嬸尬幼齒球星 穿凡妮莎舊鞋';
	rows[9].link = 'today-show10.htm';
																										
	rows[10].text = '莎莉塞隆新片 籲社會重人權';
	rows[10].link = 'today-show11.htm';
																										
	rows[11].text = '姚文智提限播外劇 余天 江霞聲援';
	rows[11].link = 'today-show12.htm';
																										
}
menu = null;

menu = getMenu('c');
menu.layer = 5;
menu.menuLayer = 0;
menu.rows = new Array(3);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '《今日社論》台灣若無防衛決心 怎能期待友邦相助';
	rows[0].link = 'today-s1.htm';
																
	rows[1].text = '《自由談》潑婦罵街';
	rows[1].link = 'today-f1.htm';
																
	rows[2].text = '《鏗鏘集》放水，畫押，亂憲政！';
	rows[2].link = 'today-f2.htm';
																
}
menu = null;

menu = getMenu('region');
menu.layer = 11;
menu.menuLayer = 0;
menu.rows = new Array(4);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();

	rows[0].text = '大台北新聞　→';
	rows[0].submenu = 'taipei';
	rows[0].link = 'today-taipei0.htm';

	rows[1].text = '北部新聞　　→';
	rows[1].submenu = 'north';
	rows[1].link = 'today-north0.htm';

	rows[2].text = '中部新聞　　→';
	rows[2].submenu = 'center';
	rows[2].link = 'today-center0.htm';

	rows[3].text = '南部新聞　　→';
	rows[3].submenu = 'south';
	rows[3].link = 'today-south0.htm';
}
menu = null;

menu = getMenu('taipei');
menu.layer = 11;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(11);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '電擊棒騎士 街頭亂電人';
	rows[0].link = 'today-taipei1.htm';
																										
	rows[1].text = '專偷三媽臭臭鍋 7店遭竊';
	rows[1].link = 'today-taipei2.htm';
																										
	rows[2].text = '縣市談合 交通觀光啟動';
	rows[2].link = 'today-taipei3.htm';
																										
	rows[3].text = '鶯歌石恐斷頭 速速搶救';
	rows[3].link = 'today-taipei4.htm';
																										
	rows[4].text = '三重部分陸橋下 增設行人穿越道';
	rows[4].link = 'today-taipei5.htm';
																										
	rows[5].text = '衛生局提醒 3不原則 採辦年貨';
	rows[5].link = 'today-taipei6.htm';
																										
	rows[6].text = '拆光外牆 還恐嚇抗議住戶';
	rows[6].link = 'today-taipei7.htm';
																										
	rows[7].text = '瓦斯費新制 劫貧濟富';
	rows[7].link = 'today-taipei8.htm';
																										
	rows[8].text = '過敏性鼻炎 誤為妥瑞兒';
	rows[8].link = 'today-taipei9.htm';
																										
	rows[9].text = '私立中學 學雜費上限不放寬';
	rows[9].link = 'today-taipei10.htm';
																										
	rows[10].text = '中學主任組長 輪調將放寬';
	rows[10].link = 'today-taipei11.htm';
																										
}
menu = null;

menu = getMenu('north');
menu.layer = 12;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '軍人扮惡賊 劫財伸狼爪';
	rows[0].link = 'today-north1.htm';
																										
	rows[1].text = '太神了 緝槍埋伏2晝夜 入廟一拜賓果';
	rows[1].link = 'today-north2.htm';
																										
	rows[2].text = '泰女陷艷窟 苗警救出4人';
	rows[2].link = 'today-north3.htm';
																										
	rows[3].text = '車禍事主跑了 可申請己車強制險理賠';
	rows[3].link = 'today-north4.htm';
																										
	rows[4].text = '討債不成就砰砰 惡煞被訴';
	rows[4].link = 'today-north5.htm';
																										
	rows[5].text = '5少K1少 強押他賣毒抵債';
	rows[5].link = 'today-north6.htm';
																										
	rows[6].text = '遙控直升機裝針孔 險砸2警';
	rows[6].link = 'today-north7.htm';
																										
	rows[7].text = '社會傳真／女法官遇搶 痛失重要紀念品';
	rows[7].link = 'today-north8.htm';
																										
}
menu = null;

menu = getMenu('center');
menu.layer = 13;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(6);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '教師甄試聯盟 敲定聯合命題';
	rows[0].link = 'today-center1.htm';
																										
	rows[1].text = '昱晏投訴 指護聯故意阻擋救護';
	rows[1].link = 'today-center2.htm';
																										
	rows[2].text = '當3個詐騙集團車手 他經手逾3000萬';
	rows[2].link = 'today-center3.htm';
																										
	rows[3].text = '集集逮2車手 半年領千萬';
	rows[3].link = 'today-center4.htm';
																										
	rows[4].text = '惡性非輕 埔里鎮代羅惠美遭求刑';
	rows[4].link = 'today-center5.htm';
																										
	rows[5].text = '社會傳真／贊助旅遊求勝選 何文海被訴';
	rows[5].link = 'today-center6.htm';
																										
}
menu = null;

menu = getMenu('south');
menu.layer = 14;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(9);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '○╳遊戲變調 國中生性侵學妹';
	rows[0].link = 'today-south1.htm';
																										
	rows[1].text = '色情網 標榜偷拍名女人';
	rows[1].link = 'today-south2.htm';
																										
	rows[2].text = '拍賣網 警盯春節火車票';
	rows[2].link = 'today-south3.htm';
																										
	rows[3].text = '南市魚塭盜採案 認定屬於海砂';
	rows[3].link = 'today-south4.htm';
																										
	rows[4].text = '中石化污土外流？ 環局澄清';
	rows[4].link = 'today-south5.htm';
																										
	rows[5].text = '查緝毒蟲 追出3顆手榴彈';
	rows[5].link = 'today-south6.htm';
																										
	rows[6].text = '靶場，火大 林園鄉濃煙臭沖天';
	rows[6].link = 'today-south7.htm';
																										
	rows[7].text = '家長，頭大 高中生放火燒單車';
	rows[7].link = 'today-south8.htm';
																										
	rows[8].text = '社會傳真／車禍 客運撞死遊民';
	rows[8].link = 'today-south9.htm';
																										
}
menu = null;

menu = getMenu('o');
menu.layer = 6;
menu.menuLayer = 0;
menu.rows = new Array(11);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '別讓勞工變長工';
	rows[0].link = 'today-o1.htm';
																										
	rows[1].text = '找回失落的師道';
	rows[1].link = 'today-o2.htm';
																										
	rows[2].text = '海洋事務 海洋思維';
	rows[2].link = 'today-o3.htm';
																										
	rows[3].text = '民主 進步 黨';
	rows[3].link = 'today-o4.htm';
																										
	rows[4].text = '台北 對岸 三重埔';
	rows[4].link = 'today-o5.htm';
																										
	rows[5].text = '三合一打敗民進黨';
	rows[5].link = 'today-o6.htm';
																										
	rows[6].text = '韓流的故事';
	rows[6].link = 'today-o7.htm';
																										
	rows[7].text = '為何沒台流？';
	rows[7].link = 'today-o8.htm';
																										
	rows[8].text = '中文熱迷思';
	rows[8].link = 'today-o9.htm';
																										
	rows[9].text = '菸商 軍火商';
	rows[9].link = 'today-o10.htm';
																										
	rows[10].text = '立委尚蓋大？';
	rows[10].link = 'today-o11.htm';
																										
}
menu = null;

if (showWeekly == false)
{
	menu = getMenu('supplement');
	menu.layer = 13;
	menu.menuLayer = 0;
	menu.rows = new Array(8);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
	
		rows[0].text = '流行消費　　→';
		rows[0].submenu = 'fashion';
		rows[0].link = 'today-fashion1.htm';
	
		rows[1].text = '好品味　　　→';
		rows[1].submenu = 'living';
		rows[1].link = 'today-living1.htm';
	
		rows[2].text = '家庭兩性　　→';
		rows[2].submenu = 'family';
		rows[2].link = 'today-family1.htm';
	
		rows[3].text = '健康醫療　　→';
		rows[3].submenu = 'medicine';
		rows[3].link = 'today-medicine1.htm';
	
		rows[4].text = '自由副刊　　→';
		rows[4].submenu = 'article';
		rows[4].link = 'today-article1.htm';
	
		rows[5].text = '青春美　　　→';
		rows[5].submenu = 'young';
		rows[5].link = 'today-young1.htm';
	
		rows[6].text = '藝術文化　　→';
		rows[6].submenu = 'art';
		rows[6].link = 'today-art1.htm';
	
		rows[7].text = '休閒旅遊　　→';
		rows[7].submenu = 'travel';
		rows[7].link = 'today-travel1.htm';
	}
	menu = null;
}

menu = getMenu('fashion');
menu.layer = 13;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('living');
menu.layer = 14;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('family');
menu.layer = 15;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('medicine');
menu.layer = 16;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('article');
menu.layer = 17;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('young');
menu.layer = 18;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('art');
menu.layer = 19;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('travel');
menu.layer = 20;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

if (showWeekly)
{
	menu = getMenu('weekly');
	menu.layer = 13;
	menu.menuLayer = 0;
	menu.rows = new Array(11);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
																	
		rows[0].text = '老字號伴手禮 送到心坎禮';
		rows[0].link = 'today-weekly1.htm';
																											
		rows[1].text = '精選新春禮 回味一整年';
		rows[1].link = 'today-weekly2.htm';
																											
		rows[2].text = '百年老字號伴手禮<br>婚禮加溫 囍上眉梢創新意';
		rows[2].link = 'today-weekly3.htm';
																											
		rows[3].text = '媽祖加持<br>大甲三寶奶油飄香';
		rows[3].link = 'today-weekly4.htm';
																											
		rows[4].text = '世紀美味 愛吃，有禮';
		rows[4].link = 'today-weekly5.htm';
																											
		rows[5].text = '無敵老字號 無上好風味';
		rows[5].link = 'today-weekly6.htm';
																											
		rows[6].text = '走逛深坑老街 玩古味';
		rows[6].link = 'today-weekly7.htm';
																											
		rows[7].text = '深坑豆腐 臭 氣吸人氣';
		rows[7].link = 'today-weekly8.htm';
																											
		rows[8].text = '謝霆鋒獨鍾太和殿麻辣鍋';
		rows[8].link = 'today-weekly9.htm';
																											
		rows[9].text = '招桃花 居家布置法 大公開';
		rows[9].link = 'today-weekly10.htm';
																											
		rows[10].text = '尾牙員工最愛3C禮品';
		rows[10].link = 'today-weekly11.htm';
																											
	}
	menu = null;
}
//====================  end  ================================================

//===========================================================================
//產生tables
//==================== begin ================================================
for (j=0; j<menus.length; j++)
{
	var previousRowType = '';
	if (menus[j].parentMenu == null)
		document.write('<table id='+menus[j].name+' style="position:absolute;left:'+(leftMargin+tableWidth*menus[j].menuLayer)+';visibility:hidden;font-size:13px;width:200;cursor:pointer;border:1 solid #00CCFF" border=0 bgcolor=#FFFFFF cellspacing=1 cellpadding=2 onMouseOver=showMenu(null,null) onMouseOut=hideMenu()>');
	else
		document.write('<table id='+menus[j].name+' style="position:absolute;left:'+(leftMargin+tableWidth*menus[j].menuLayer)+';visibility:hidden;font-size:13px;width:200;cursor:pointer;border:1 solid #00CCFF" border=0 bgcolor=#FFFFFF cellspacing=1 cellpadding=2 onMouseOver=showMenu2(null,null) onMouseOut=hideMenu2()>');

	for (i=0; i<menus[j].rows.length; i++)
	{
		if (previousRowType!='' && menus[j].rows[i].type==null)
		{
			document.write('<tr bgcolor=#00CCFF height=2 style=cursor:default>');
			document.write('	<td></td>');
			document.write('</tr>');
		}

		if (menus[j].rows[i].type && menus[j].rows[i].type!=previousRowType)
		{
			document.write('<tr bgcolor=#00CCFF height='+rowHeight+' style="cursor:default">');
			document.write('	<td>《'+menus[j].rows[i].type+'》</td>');
			document.write('</tr>');
		}

		if (menus[j].rows[i].submenu)
		{
			document.write('<tr onMouseOver="incell(this);showMenu2(this,'+menus[j].rows[i].submenu+')" onMouseOut="outcell(this);hideMenu2()" bgcolor=#C2E5FF height='+rowHeight+'>');
			if (menus[j].rows[i].link)
				document.write('	<td onClick="location.href=\''+path+menus[j].rows[i].link+'\'">'+menus[j].rows[i].text+'</td>');
			else
				document.write('	<td>'+menus[j].rows[i].text+'</td>');
			document.write('</tr>');
		}
		else 
		{
			if (menus[j].rows[i].type == null)
			{
				document.write('<tr onMouseOver=incell(this) onMouseOut=outcell(this) bgcolor=#C2E5FF height='+rowHeight+'>');
				document.write('	<td onClick="location.href=\''+path+menus[j].rows[i].link+'\'">◎'+menus[j].rows[i].text+'</td>');
				document.write('</tr>');
			}
			else
			{
				document.write('<tr onMouseOver=incell(this) onMouseOut=outcell2(this) bgcolor=#41DAAA height='+rowHeight+'>');
				document.write('	<td onClick="location.href=\''+path+menus[j].rows[i].link+'\'">．'+menus[j].rows[i].text+'</td>');
				document.write('</tr>');
			}
		}

		previousRowType = menus[j].rows[i].type==null? '': menus[j].rows[i].type;
	}

	document.write('</table>');
}
//====================  end  ================================================

var activeRow,activeMenu1,activeRow1,activeMenu2;
var protrude1;
var timer,timer2;
var hide,hide2

function getMenu(name)
{
	index = -1;
	for (i=0; i<menus.length; i++)
		if (menus[i].name == name)
		{
			index = i;
			break;
		}
	if (index != -1) return menus[index];
	else return null;
}

function showMenu(row,menu)
{
	if (activeRow)
	{
		hide = true;
		hideAllMenu();
	}
	hide = false;
	if (row)	activeRow = row;
	activeRow.style.backgroundColor = '#FFCCFF';
	if (menu) activeMenu1 = menu;
	
	defaultTop = topMargin+layerHeight*getMenu(activeMenu1.id).layer;
	protrude1 = defaultTop-document.body.scrollTop+activeMenu1.offsetHeight-document.body.clientHeight;
	if (protrude1 > 0)	
		activeMenu1.style.top = defaultTop-protrude1;
	else
		activeMenu1.style.top = defaultTop;
		
	activeMenu1.style.visibility = 'visible';
}

function hideMenu()
{
	clearTimeout(timer);
	hide = true;
	timer = setTimeout(hideAllMenu,700);
}

function hideAllMenu()
{
	if (hide)
	{
		activeRow.style.backgroundColor = '#FAF9F5';
		activeMenu1.style.visibility = 'hidden';
	}
}

function showMenu2(row,menu)
{
	if (activeRow1)
	{
		hide2 = true;
		hideAllMenu2();
	}
	hide = false;
	hide2 = false;
	if (row)	activeRow1 = row;
	activeRow.style.backgroundColor = '#FFCCFF';
	activeRow1.style.backgroundColor = '#FFCCFF';
	if (menu) activeMenu2 = menu;
	
	defaultTop = topMargin+layerHeight*getMenu(activeMenu2.id).layer;
	protrude2 = defaultTop-document.body.scrollTop+activeMenu2.offsetHeight-document.body.clientHeight;
	if (protrude2 > 0)	
	{
		if (protrude1 > protrude2)
			activeMenu2.style.top = defaultTop-protrude1;
		else
			activeMenu2.style.top = defaultTop-protrude2;
	}
	else
	{
		if (protrude1 > 0)
			activeMenu2.style.top = defaultTop-protrude1;
		else
			activeMenu2.style.top = defaultTop;
	}
	
	activeMenu1.style.visibility = 'visible';
	activeMenu2.style.visibility = 'visible';
}

function hideMenu2()
{
	hideMenu();
	clearTimeout(timer2);
	hide2 = true;
	timer2 = setTimeout(hideAllMenu2,700);
}

function hideAllMenu2()
{
	if (hide2) {
		activeRow1.style.backgroundColor = '#C2E5FF';
		activeMenu2.style.visibility = 'hidden';
	}
}

function outcell(cell)
{
	cell.style.backgroundColor = '#C2E5FF';
	cell.style.color = 'black';
}

function outcell2(cell)
{
	cell.style.backgroundColor = '#41DAAA';
	cell.style.color = 'black';
}

function incell(cell)
{
	cell.style.backgroundColor = '#FFCCFF';
	cell.style.color = 'blue';
}