//===========================================================================
//基本設定
//==================== begin ================================================
topMargin = 112;    //內部為112
layerHeight = 23;
leftMargin = 90;
tableWidth = 200;
rowHeight = 22;
showWeekly = false;
showHouse = false;
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'));
}
if (showHouse)
{
	menuNames = menuNames.concat(new Array('house'));
	titles = titles.concat(new Array('住宅生活版'));
	pages = pages.concat(new Array('today-house1.htm'));
}
menuNames2 = new Array('taipei','north','center','south','fashion','family','medicine','article','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 class=block2La href="http://www.libertytimes.com.tw/about/recruit.htm">求才專區</a></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><A class=block2La href="'+path+'activity.htm">活動訊息</a></TD>');
document.write('	</TR>');
document.write('	<TR>');
document.write('		<TD class=block2L_tdb><A class=block2La 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(10);
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 = '新聞透視／團結打選戰 民進黨正道';
	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 = '希拉蕊連任 朝白宮邁進';
	rows[7].link = 'today-fo8.htm';
																										
	rows[8].text = '州長改選 民主黨再奪六席';
	rows[8].link = 'today-fo9.htm';
																										
	rows[9].text = '阿諾  再演出續集保住加州';
	rows[9].link = 'today-fo10.htm';
																										
}
menu = null;

menu = getMenu('p');
menu.layer = 2;
menu.menuLayer = 0;
menu.rows = new Array(10);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '美國會變天 友台基調不變';
	rows[0].link = 'today-p1.htm';
																										
	rows[1].text = '本土派立委邀宴連王 獨缺馬';
	rows[1].link = 'today-p2.htm';
																										
	rows[2].text = '顧立雄：若扁嫂委任 沒理由拒絕';
	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 = '民進黨民調 陳菊支持度回穩';
	rows[5].link = 'today-p6.htm';
																										
	rows[6].text = '早安死神完結篇 留風骨勉後人';
	rows[6].link = 'today-p7.htm';
																										
	rows[7].text = '趙建銘庭內嚼口香糖 遭制止';
	rows[7].link = 'today-p8.htm';
																										
	rows[8].text = '馬、謝市長離職金逾百萬';
	rows[8].link = 'today-p9.htm';
																										
	rows[9].text = '「宣誓條例修正案」通過';
	rows[9].link = 'today-p10.htm';
																										
}
menu = null;

menu = getMenu('int');
menu.layer = 4;
menu.menuLayer = 0;
menu.rows = new Array(4);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = "WHO 陳馮富珍可望當家";
	rows[0].link = 'today-int1.htm';
																										
	rows[1].text = "自體幹細胞 心臟最佳「補」手";
	rows[1].link = 'today-int2.htm';
																										
	rows[2].text = "全球空污禍首 中國5年內稱霸";
	rows[2].link = 'today-int3.htm';
																										
	rows[3].text = "《中英對照讀新聞》Russia wants to double gas price for Georgia 俄羅斯要把供給喬治亞的天然氣價格調漲一倍";
	rows[3].link = 'today-int4.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 = '警員教綁架 錢莊擄人妻';
	rows[0].link = 'today-so1.htm';
																										
	rows[1].text = '退伍解放軍 冒充漁工入台';
	rows[1].link = 'today-so2.htm';
																										
	rows[2].text = '檢察官上訴逾期 景文弊案18人無罪';
	rows[2].link = 'today-so3.htm';
																										
	rows[3].text = '發呆…抓狂…砍警 被轟20槍';
	rows[3].link = 'today-so4.htm';
																										
	rows[4].text = '職棒教練遭綁案外案 涉案女嫌 刑警外遇對象';
	rows[4].link = 'today-so5.htm';
																										
	rows[5].text = 'PUB老闆遭擄 300萬贖身';
	rows[5].link = 'today-so6.htm';
																										
	rows[6].text = '驗收放水 台電官商7人被訴';
	rows[6].link = 'today-so7.htm';
																										
	rows[7].text = '海大修鞋伯 43年畢不了業';
	rows[7].link = 'today-so8.htm';
																										
	rows[8].text = '手工書憶亡妹我想自由';
	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 = '頭城第一所仁愛幼稚園 尋找當年小毛頭';
	rows[11].link = 'today-so12.htm';
																										
}
menu = null;

menu = getMenu('life');
menu.layer = 9;
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-life1.htm';
																										
	rows[1].text = '總統教育獎 71傑出學子出列';
	rows[1].link = 'today-life2.htm';
																										
	rows[2].text = '台大傑出校友 政治人物摃龜';
	rows[2].link = 'today-life3.htm';
																										
	rows[3].text = '高鐵日運量 僅認證單向19班';
	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';
																										
	rows[7].text = '幻聽男灌高劑量氫氟酸 死裡逃生';
	rows[7].link = 'today-life8.htm';
																										
	rows[8].text = '涉勾結醫院A健保 檢搜3藥廠';
	rows[8].link = 'today-life9.htm';
																										
}
menu = null;

menu = getMenu('sp');
menu.layer = 10;
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-sp1.htm';
																										
	rows[1].text = '8隊教頭 先禮後兵';
	rows[1].link = 'today-sp2.htm';
																										
	rows[2].text = '建仔返家第二天 沒露臉';
	rows[2].link = 'today-sp3.htm';
																										
	rows[3].text = '規則改 故意保送只需投1球';
	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 = '亞職今開打 熊搶頭彩';
	rows[6].link = 'today-sp7.htm';
																										
	rows[7].text = '世界花式撞球賽 劉峻銓痛宰公敵史翠南';
	rows[7].link = 'today-sp8.htm';
																										
	rows[8].text = '用球桿叫老史閉嘴／劉峻銓 台灣新英雄';
	rows[8].link = 'today-sp9.htm';
																										
	rows[9].text = '世界女排錦標賽／不敵土耳其 台灣吞首敗';
	rows[9].link = 'today-sp10.htm';
																										
	rows[10].text = 'HBL／三民延長賽氣走光啟';
	rows[10].link = 'today-sp11.htm';
																										
	rows[11].text = '七六人 不敗破功';
	rows[11].link = 'today-sp12.htm';
																										
}
menu = null;

menu = getMenu('e');
menu.layer = 7;
menu.menuLayer = 0;
menu.rows = new Array(13);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '銀行砸錢 卡友狂刷A好康';
	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 = '檢調無法破解 黑莓機難登台';
	rows[3].link = 'today-e4.htm';
																										
	rows[4].text = '太平洋SOGO忠孝館 力拚28億';
	rows[4].link = 'today-e5.htm';
																										
	rows[5].text = 'RTC與存保基金擬併用 規模５３０億';
	rows[5].link = 'today-e6.htm';
																										
	rows[6].text = '台中港裝卸業溢收 鋼鐵公會抨港務局玩弄文字';
	rows[6].link = 'today-e7.htm';
																										
	rows[7].text = '今年稅收 可望超徵逾８００億';
	rows[7].link = 'today-e8.htm';
																										
	rows[8].text = '蓋茲與沙國王子合資 跨足觀光業';
	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 = 'EY年度創業家獎 七人入圍';
	rows[11].link = 'today-e12.htm';
																										
	rows[12].text = '台灣平均３７．６人 開一家公司';
	rows[12].link = 'today-e13.htm';
																										
}
menu = null;

menu = getMenu('stock');
menu.layer = 8;
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-stock1.htm';
																										
	rows[1].text = '投資基金 國人愛炒短';
	rows[1].link = 'today-stock2.htm';
																										
	rows[2].text = '理財Q&A／卡債協商 妥託代辦行不通';
	rows[2].link = 'today-stock3.htm';
																										
	rows[3].text = '開拓B2B市場 特力入主東隆五金';
	rows[3].link = 'today-stock4.htm';
																										
	rows[4].text = '站在高峰上 TFT面板需求恐走弱';
	rows[4].link = 'today-stock5.htm';
																										
	rows[5].text = '旺季到 散熱模組Q4可望翻身';
	rows[5].link = 'today-stock6.htm';
																										
	rows[6].text = '打整體戰 光寶科明年獲利看揚';
	rows[6].link = 'today-stock7.htm';
																										
	rows[7].text = '台新金前三季 每股虧1.01元';
	rows[7].link = 'today-stock8.htm';
																										
	rows[8].text = '堤維西、耿鼎 月績創新高';
	rows[8].link = 'today-stock9.htm';
																										
	rows[9].text = 'YARIS上市 和泰車信心滿滿';
	rows[9].link = 'today-stock10.htm';
																										
	rows[10].text = '歐股午盤跌 日菲重挫';
	rows[10].link = 'today-stock11.htm';
																										
	rows[11].text = '股訊要覽';
	rows[11].link = 'today-stock12.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(17);
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 = '布蘭妮閃電訴離 溜冰好心情';
	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 = '杜德偉海上求愛 Lara只想吐';
	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 = '安妮斯頓人氣in 狠踢裘莉out';
	rows[10].link = 'today-show11.htm';
																										
	rows[11].text = '阿湯哥凱蒂 婚禮辦2次';
	rows[11].link = 'today-show12.htm';
																										
	rows[12].text = '瀨戶朝香衝浪調情 井之原密謀閃電婚';
	rows[12].link = 'today-show13.htm';
																										
	rows[13].text = '安在旭大阪開唱 被索35萬保護費';
	rows[13].link = 'today-show14.htm';
																										
	rows[14].text = '朴信惠獻初吻 李莞內疚狂NG';
	rows[14].link = 'today-show15.htm';
																										
	rows[15].text = 'Akemi超市買菜 外套內暗潮洶湧';
	rows[15].link = 'today-show16.htm';
																										
	rows[16].text = '蔡淑臻有潔癖 廚餘擺冰箱';
	rows[16].link = 'today-show17.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 = '橋下15窩虎頭蜂 狂螫7教師';
	rows[0].link = 'today-taipei1.htm';
																										
	rows[1].text = '招來橫禍 獨眼紋身師無怨';
	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 = '中國狂犬病延燒 寵物快打疫苗';
	rows[5].link = 'today-taipei6.htm';
																										
	rows[6].text = '孔廟圍牆降低？ 學者︰破壞傳統';
	rows[6].link = 'today-taipei7.htm';
																										
	rows[7].text = '學生遭家暴及性侵 老師24hr須通報';
	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(7);
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 = '與人同床／阿嬤光屁股 阿公告通姦';
	rows[1].link = 'today-north2.htm';
																										
	rows[2].text = '大樂透３獎鬧雙包 偷中獎彩券被訴';
	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 = '老榮民散各步 被載去買健康器材';
	rows[5].link = 'today-north6.htm';
																										
	rows[6].text = '社會觀測站／精障男刺父 與警對峙後自盡';
	rows[6].link = 'today-north7.htm';
																										
}
menu = null;

menu = getMenu('center');
menu.layer = 13;
menu.parentMenu = 'region';
menu.menuLayer = 1;
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-center1.htm';
																										
	rows[1].text = '6人獲總統教育獎 2位是漸凍人';
	rows[1].link = 'today-center2.htm';
																										
	rows[2].text = '八卦山旱灌 跳票10多年';
	rows[2].link = 'today-center3.htm';
																										
	rows[3].text = '露天燒稻草 3年沒通過1件';
	rows[3].link = 'today-center4.htm';
																										
	rows[4].text = 'I Speak English 雙語司機市府授證';
	rows[4].link = 'today-center5.htm';
																										
	rows[5].text = '視病猶親 雲林洪毅一獲醫療奉獻獎';
	rows[5].link = 'today-center6.htm';
																										
	rows[6].text = '多元就業／穿拖鞋嚼檳榔…面試狀況多';
	rows[6].link = 'today-center7.htm';
																										
}
menu = null;

menu = getMenu('south');
menu.layer = 14;
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-south1.htm';
																										
	rows[1].text = '中國新娘遭遺棄 流浪公廁2年 教會助返鄉';
	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 = '中山路不平 夜歸女的噩夢';
	rows[5].link = 'today-south6.htm';
																										
	rows[6].text = '死亡邊溝意外不斷 地方要國賠';
	rows[6].link = 'today-south7.htm';
																										
	rows[7].text = '猴靈樹王公病了 市府挨罵';
	rows[7].link = 'today-south8.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(6);
	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 = 'family';
		rows[1].link = 'today-family1.htm';
	
		rows[2].text = '健康醫療　　→';
		rows[2].submenu = 'medicine';
		rows[2].link = 'today-medicine1.htm';
	
		rows[3].text = '自由副刊　　→';
		rows[3].submenu = 'article';
		rows[3].link = 'today-article1.htm';
	
		rows[4].text = '藝術文化　　→';
		rows[4].submenu = 'art';
		rows[4].link = 'today-art1.htm';
	
		rows[5].text = '休閒旅遊　　→';
		rows[5].submenu = 'travel';
		rows[5].link = 'today-travel1.htm';
	}
	menu = null;
}

menu = getMenu('fashion');
menu.layer = 13;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
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-fashion1.htm';
																										
	rows[1].text = '週年慶  再破紀錄';
	rows[1].link = 'today-fashion2.htm';
																										
	rows[2].text = '印表機不止印相片  電視畫面也能印';
	rows[2].link = 'today-fashion3.htm';
																										
}
menu = null;

menu = getMenu('family');
menu.layer = 14;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
menu.rows = new Array(4);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '創意收納  空間變大了';
	rows[0].link = 'today-family1.htm';
																										
	rows[1].text = '老公迷戀AV女優';
	rows[1].link = 'today-family2.htm';
																										
	rows[2].text = '老爸的幸福計畫';
	rows[2].link = 'today-family3.htm';
																										
	rows[3].text = '糖醋白菜卷';
	rows[3].link = 'today-family4.htm';
																										
}
menu = null;

menu = getMenu('medicine');
menu.layer = 15;
menu.parentMenu = 'supplement';
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-medicine1.htm';
																										
	rows[1].text = '子宮肌瘤懷孕  產檢多留心可保平安';
	rows[1].link = 'today-medicine2.htm';
																										
	rows[2].text = '天涼進補  吃好更要吃對';
	rows[2].link = 'today-medicine3.htm';
																										
	rows[3].text = '逾八成青少年 蔬果吃得不夠多';
	rows[3].link = 'today-medicine4.htm';
																										
	rows[4].text = '經常流眼油 多因鼻淚管慢性發炎引起';
	rows[4].link = 'today-medicine5.htm';
																										
	rows[5].text = '鐵屑噴進眼睛  儘速求醫 別亂點藥';
	rows[5].link = 'today-medicine6.htm';
																										
}
menu = null;

menu = getMenu('article');
menu.layer = 16;
menu.parentMenu = 'supplement';
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-article1.htm';
																										
	rows[1].text = '在文字與影像之間  作家李志薔新戲上路';
	rows[1].link = 'today-article2.htm';
																										
	rows[2].text = '想念黑貓南瓜皮';
	rows[2].link = 'today-article3.htm';
																										
	rows[3].text = '照片';
	rows[3].link = 'today-article4.htm';
																										
	rows[4].text = '愛讀書《人生一瞬》';
	rows[4].link = 'today-article5.htm';
																										
	rows[5].text = '書寫為志業，桂冠如浮雲  法國文學大獎紛紛揭曉，法語系作家勝出';
	rows[5].link = 'today-article6.htm';
																										
	rows[6].text = '純文學閱讀走出低迷  日本三大文學雜誌10月號開花結果';
	rows[6].link = 'today-article7.htm';
																										
	rows[7].text = '愛特伍給台灣讀者的問候  《道德錯亂》簽書會現場直擊';
	rows[7].link = 'today-article8.htm';
																										
	rows[8].text = '獨立書店又一家  蓋瑞森．凱勒的「公共好書店」開張';
	rows[8].link = 'today-article9.htm';
																										
	rows[9].text = '義大利奇幻史詩';
	rows[9].link = 'today-article10.htm';
																										
	rows[10].text = '秋日，在布拉格，村上春樹';
	rows[10].link = 'today-article11.htm';
																										
}
menu = null;

menu = getMenu('art');
menu.layer = 17;
menu.parentMenu = 'supplement';
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-art1.htm';
																										
	rows[1].text = '藝術家放洋駐村 第六屆聯展秀成果';
	rows[1].link = 'today-art2.htm';
																										
	rows[2].text = '男高音里契特拉正當紅  國家音樂廳今晚演出';
	rows[2].link = 'today-art3.htm';
																										
	rows[3].text = '歡喜扮戲團 詮釋高齡產婦心境';
	rows[3].link = 'today-art4.htm';
																										
	rows[4].text = '紐約秋拍結果 蘇富比創新高 佳士得解除禁拍令';
	rows[4].link = 'today-art5.htm';
																										
	rows[5].text = '陳顯棟2006個展';
	rows[5].link = 'today-art6.htm';
																										
}
menu = null;

menu = getMenu('travel');
menu.layer = 18;
menu.parentMenu = 'supplement';
menu.menuLayer = 1;
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-travel1.htm';
																										
}
menu = null;

if (showWeekly)
{
	menu = getMenu('weekly');
	menu.layer = 13;
	menu.menuLayer = 0;
	menu.rows = new Array(0);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
																	
	}
	menu = null;
}
if (showHouse)
{
	menu = getMenu('house');
	menu.layer = 14;
	menu.menuLayer = 0;
	menu.rows = new Array(0);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
																	
	}
	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,600);
}

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,600);
}

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';
}