//===========================================================================
//基本設定
//==================== begin ================================================
topMargin = 112;    //內部為112
layerHeight = 23;
leftMargin = 90;
tableWidth = 200;
rowHeight = 22;
showWeekly = true;
showHouse = false;
path = '';    //內部為空字串
//====================  end  ================================================

//===========================================================================
//所有的menu
//==================== begin ================================================
menuNames = new Array('t','fo','p','so','int','c','o','e','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-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(8);
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 = '藍營黑衣部隊 被查獲BB槍';
	rows[5].link = 'today-fo6.htm';
																										
	rows[6].text = '藍嗆扁 科工館遊客稀';
	rows[6].link = 'today-fo7.htm';
																										
	rows[7].text = '追國民黨產 直搗中央黨部';
	rows[7].link = 'today-fo8.htm';
																										
}
menu = null;

menu = getMenu('p');
menu.layer = 2;
menu.menuLayer = 0;
menu.rows = new Array(5);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '綠：陳由豪掏空600億 談清廉是笑話';
	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';
																										
}
menu = null;

menu = getMenu('int');
menu.layer = 4;
menu.menuLayer = 0;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = "德州石油大亨523億遺產 繼承人驟逝 玩伴女利多?";
	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 = "《中英對照讀新聞》Pregnant pause as Aussie mums wait for baby bonus 澳洲準媽媽為等新生兒獎金暫停懷孕";
	rows[6].link = 'today-int7.htm';
																										
	rows[7].text = "《中日對照讀新聞》中&#22269;&#12398;動物愛護&#22243;体、「&#12493;&#12467;肉&#12524;&#12473;&#12488;&#12521;&#12531;」&#12395;抗議 中國的愛護動物團體抗議「貓肉餐廳」";
	rows[7].link = 'today-int8.htm';
																										
}
menu = null;

menu = getMenu('so');
menu.layer = 3;
menu.menuLayer = 0;
menu.rows = new Array(15);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '9旬翁仙遊 玉樹臨風表錯情';
	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 = '病床玩黏土 癌末婦掙脫苦海';
	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 = '有恩必報 46年後跨海尋覓老同學';
	rows[11].link = 'today-so12.htm';
																										
	rows[12].text = '天使飛 樂音揚 認養相見歡';
	rows[12].link = 'today-so13.htm';
																										
	rows[13].text = '永遠的張老師 潘家群 又得獎';
	rows[13].link = 'today-so14.htm';
																										
	rows[14].text = '降低離婚率 蘇永村 勸合百餘對夫妻';
	rows[14].link = 'today-so15.htm';
																										
}
menu = null;

menu = getMenu('life');
menu.layer = 8;
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 = '苗栗段出問題 電腦凸槌 停車10分鐘';
	rows[1].link = 'today-life2.htm';
																										
	rows[2].text = '時速3百 被嫌不夠快';
	rows[2].link = 'today-life3.htm';
																										
	rows[3].text = '抓了8輛龜速車 雪隧通樂';
	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 = '二萬二買鹿茸 一半是佣金';
	rows[8].link = 'today-life9.htm';
																										
}
menu = null;

menu = getMenu('sp');
menu.layer = 9;
menu.menuLayer = 0;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '《2006世界盃足球賽》搶晉8 德第1';
	rows[0].link = 'today-sp1.htm';
																										
	rows[1].text = '《2006世界盃足球賽》法瑞 搭上末班車';
	rows[1].link = 'today-sp2.htm';
																										
	rows[2].text = '《2006世界盃足球賽》小貝放話 蛋洗厄人';
	rows[2].link = 'today-sp3.htm';
																										
	rows[3].text = '《2006世界盃足球賽》歷史鐵口 葡勝荷';
	rows[3].link = 'today-sp4.htm';
																										
	rows[4].text = '《2006世界盃足球賽》醜聞 傷兵 希丁克…義軍怕怕';
	rows[4].link = 'today-sp5.htm';
																										
	rows[5].text = '建仔 捕魚樂';
	rows[5].link = 'today-sp6.htm';
																										
	rows[6].text = 'I trust you... 托瑞一句話 建仔更有信心';
	rows[6].link = 'today-sp7.htm';
																										
	rows[7].text = '獅連勝喊停 熊M1';
	rows[7].link = 'today-sp8.htm';
																										
}
menu = null;

menu = getMenu('e');
menu.layer = 7;
menu.menuLayer = 0;
menu.rows = new Array(5);
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 = 'IMF上修預測 今明兩年全球經濟成長5%';
	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 = '遠雄三年內 再投資1,300億';
	rows[4].link = 'today-e5.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 = 11;
menu.menuLayer = 0;
menu.rows = new Array(16);
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 = '揮別法籍男友  天心改愛ABC';
	rows[4].link = 'today-show5.htm';
																										
	rows[5].text = '許志安搞飛機 酒醉玩跳傘';
	rows[5].link = 'today-show6.htm';
																										
	rows[6].text = '陳嘉鈞獵豔 緊盯李婷宜';
	rows[6].link = 'today-show7.htm';
																										
	rows[7].text = '伊林啦啦隊 蒙足感召潦落去';
	rows[7].link = 'today-show8.htm';
																										
	rows[8].text = '羅志祥 楊丞琳 撈327萬台幣';
	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';
																										
	rows[12].text = '芭黎絲&布蘭妮 變髮當黑幫';
	rows[12].link = 'today-show13.htm';
																										
	rows[13].text = '成宥利簽名會落跑 朴龍河登台踩煞車';
	rows[13].link = 'today-show14.htm';
																										
	rows[14].text = '蘇志燮拷貝裴帥狂冒汗';
	rows[14].link = 'today-show15.htm';
																										
	rows[15].text = '方文琳賺多存少 再婚適熟男';
	rows[15].link = 'today-show16.htm';
																										
}
menu = null;

menu = getMenu('c');
menu.layer = 5;
menu.menuLayer = 0;
menu.rows = new Array(2);
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';
																
}
menu = null;

menu = getMenu('region');
menu.layer = 10;
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 = 10;
menu.parentMenu = 'region';
menu.menuLayer = 1;
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-taipei1.htm';
																										
	rows[1].text = '文化志工露一手 新莊展作品';
	rows[1].link = 'today-taipei2.htm';
																										
	rows[2].text = '兒童藝術節 7月歡樂登場';
	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 = '跟監員警出勤 自己人扮狗仔';
	rows[7].link = 'today-taipei8.htm';
																										
	rows[8].text = '打擊家暴 泰山揮大槌';
	rows[8].link = 'today-taipei9.htm';
																										
	rows[9].text = '盤查挨槍 勇警帶傷擒2嫌';
	rows[9].link = 'today-taipei10.htm';
																										
}
menu = null;

menu = getMenu('north');
menu.layer = 11;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(5);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '酒後亂棍打死人 4嫌落網';
	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 = '疑酒駕失控 連環撞釀3傷';
	rows[3].link = 'today-north4.htm';
																										
	rows[4].text = '深夜海泳 男子溺斃';
	rows[4].link = 'today-north5.htm';
																										
}
menu = null;

menu = getMenu('center');
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-center1.htm';
																										
	rows[1].text = 'e化勤務 中市警局訂獎懲';
	rows[1].link = 'today-center2.htm';
																										
	rows[2].text = '醉漢行竊 貪杯醉倒被捕';
	rows[2].link = 'today-center3.htm';
																										
	rows[3].text = '偷不成搶 心臟病發落網';
	rows[3].link = 'today-center4.htm';
																										
	rows[4].text = '毒蟲持槍放狠話 兄嫂嚇得皮皮剉';
	rows[4].link = 'today-center5.htm';
																										
	rows[5].text = '機智女匯1塊 凍結網詐戶頭';
	rows[5].link = 'today-center6.htm';
																										
	rows[6].text = '《社會傳真》逃逸女外勞 打扮入時露餡';
	rows[6].link = 'today-center7.htm';
																										
}
menu = null;

menu = getMenu('south');
menu.layer = 13;
menu.parentMenu = 'region';
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-south1.htm';
																										
	rows[1].text = '大雨過後 東港溪流域 鱷魚現形';
	rows[1].link = 'today-south2.htm';
																										
	rows[2].text = '獨臂蛇王 活逮3公尺長巨蟒';
	rows[2].link = 'today-south3.htm';
																										
	rows[3].text = '衛星定位 鎖定竊嫌';
	rows[3].link = 'today-south4.htm';
																										
}
menu = null;

menu = getMenu('o');
menu.layer = 6;
menu.menuLayer = 0;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '300年老樹VS.300公里極速';
	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 = '愛不愛足球 看8月16日';
	rows[7].link = 'today-o8.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(0);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
}
menu = null;

menu = getMenu('family');
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('medicine');
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('article');
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('art');
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('travel');
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;

if (showWeekly)
{
	menu = getMenu('weekly');
	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 = '初夏遊雙溪<br>體驗花香、人文香';
		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 = '台中水湳市場 美食小吃人氣旺';
		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 = '挑戰極限 RV車越野上路';
		rows[7].link = 'today-weekly8.htm';
																											
		rows[8].text = '越野好風光 盡收眼底';
		rows[8].link = 'today-weekly9.htm';
																											
		rows[9].text = '補習IN！ 自學Out！<br>網路English正流行';
		rows[9].link = 'today-weekly10.htm';
																											
		rows[10].text = '誰說膽固醇 低低就是好？';
		rows[10].link = 'today-weekly11.htm';
																											
		rows[11].text = '所謂真實的快樂';
		rows[11].link = 'today-weekly12.htm';
																											
	}
	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';
}