//===========================================================================
//基本設定
//==================== begin ================================================
topMargin = 112;    //內部為112
layerHeight = 23;
leftMargin = 90;
tableWidth = 200;
rowHeight = 22;
showWeekly = true;
showHouse = true;
path = '';    //內部為空字串
//====================  end  ================================================

//===========================================================================
//所有的menu
//==================== begin ================================================
menuNames = new Array('t','fo','so','int','c','o','e','life','sp','region','show');
titles = new Array('頭版新聞','焦點新聞','社會新聞','國際新聞','自由評論','自由廣場','財經焦點','生活新聞','體育新聞','地方新聞','影視名人');
pages = new Array('today-t1.htm','today-fo1.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(25);
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 = '檢方認定 扁不實核銷發票2675萬';
	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';
																										
	rows[10].text = '南線機密外交 甲君否認拿國務費 翻盤關鍵';
	rows[10].link = 'today-fo11.htm';
																										
	rows[11].text = '10.31 檢突破曾天賜等人心防 案情逆轉';
	rows[11].link = 'today-fo12.htm';
																										
	rows[12].text = '馬永成林德訓 被控偽造文書共犯';
	rows[12].link = 'today-fo13.htm';
																										
	rows[13].text = '史上最震撼 創多項司法紀錄';
	rows[13].link = 'today-fo14.htm';
																										
	rows[14].text = '10月27日二度訊扁 陳瑞仁戴安全帽避狗仔';
	rows[14].link = 'today-fo15.htm';
																										
	rows[15].text = '紅衫軍重返凱道 警舉牌蒐證';
	rows[15].link = 'today-fo16.htm';
																										
	rows[16].text = '官田鄉親錯愕 麻豆吳家鎖門';
	rows[16].link = 'today-fo17.htm';
																										
	rows[17].text = '能否起訴總統 美憲法有爭議';
	rows[17].link = 'today-fo18.htm';
																										
	rows[18].text = '權力使人腐化／國外篇 南韓總統貪腐 連5爆';
	rows[18].link = 'today-fo19.htm';
																										
	rows[19].text = '總統夫人被起訴 美學者：民主制度勝利';
	rows[19].link = 'today-fo20.htm';
																										
	rows[20].text = '國務機要費案起訴／美：美台關係不變';
	rows[20].link = 'today-fo21.htm';
																										
	rows[21].text = '北高選情投震撼彈 「民」衝擊大';
	rows[21].link = 'today-fo22.htm';
																										
	rows[22].text = '股匯市可能震盪 央行穩定喊話';
	rows[22].link = 'today-fo23.htm';
																										
	rows[23].text = '李公開信：不支持民進黨候選人';
	rows[23].link = 'today-fo24.htm';
																										
	rows[24].text = '美提醒陳總統信守憲改承諾';
	rows[24].link = 'today-fo25.htm';
																										
}
menu = null;

menu = getMenu('int');
menu.layer = 3;
menu.menuLayer = 0;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = "生態大崩盤 42年後魚蝦絕蹤";
	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 = "天價 當代抽象畫 一幅46億";
	rows[6].link = 'today-int7.htm';
																										
	rows[7].text = "《中英對照讀新聞》Paris Hilton Doesn’t Deserve Fame Says Clint Eastwood 克林伊斯威特說：芭黎絲希爾頓「浪得虛名」";
	rows[7].link = 'today-int8.htm';
																										
}
menu = null;

menu = getMenu('so');
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-so1.htm';
																										
	rows[1].text = '桃縣瞎子監視器弊案擴大 再約談2首長╱中壢市長聲押 新屋鄉長交保';
	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';
																										
}
menu = null;

menu = getMenu('life');
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-life1.htm';
																										
	rows[1].text = '高鐵通車 交通部︰別急';
	rows[1].link = 'today-life2.htm';
																										
	rows[2].text = '華信北金航線 班機玻璃破裂';
	rows[2].link = 'today-life3.htm';
																										
	rows[3].text = '愛滋病醫療卡 就醫不怕曝光';
	rows[3].link = 'today-life4.htm';
																										
	rows[4].text = '登革熱未通報 重罰醫療院所';
	rows[4].link = 'today-life5.htm';
																										
}
menu = null;

menu = getMenu('sp');
menu.layer = 8;
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-sp1.htm';
																										
	rows[1].text = '世撞賽今開打－吳珈慶 馬尼拉紅人';
	rows[1].link = 'today-sp2.htm';
																										
	rows[2].text = '羅傑斯 投手金手套';
	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 = '洲際盃官辦熱身 我今首戰義大利';
	rows[6].link = 'today-sp7.htm';
																										
	rows[7].text = '競標松&#22338; 已有3隊出手';
	rows[7].link = 'today-sp8.htm';
																										
}
menu = null;

menu = getMenu('e');
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 = '雷曼兄弟︰中國明年GDP成長下修至9.6%';
	rows[0].link = 'today-e1.htm';
																										
	rows[1].text = '渣打併竹商銀 不規劃優離優退';
	rows[1].link = 'today-e2.htm';
																										
	rows[2].text = 'Fed理事︰明年通膨可能減緩';
	rows[2].link = 'today-e3.htm';
																										
	rows[3].text = '我外匯存底2618億美元 全球第三';
	rows[3].link = 'today-e4.htm';
																										
	rows[4].text = '中國人行存款準備率 調升至9%';
	rows[4].link = 'today-e5.htm';
																										
	rows[5].text = '寶華完成40億現增 才能併亞信';
	rows[5].link = 'today-e6.htm';
																										
	rows[6].text = '16萬公頃國有山坡地作保育 停止租售';
	rows[6].link = 'today-e7.htm';
																										
	rows[7].text = '台灣連鎖加盟促協會 設品牌展示中心';
	rows[7].link = 'today-e8.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 = '國務機要費案 吳淑珍等4人被起訴';
	rows[0].link = 'today-t1.htm';
																										
}
menu = null;

menu = getMenu('show');
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 = 'Elva躲廁所取景 黃金味加持';
	rows[0].link = 'today-show1.htm';
																										
	rows[1].text = '瑪丹娜挨整 領養變笑柄';
	rows[1].link = 'today-show2.htm';
																										
	rows[2].text = '第7屆拉丁葛萊美獎 夏奇拉大贏家  瑞奇馬汀最搶靚';
	rows[2].link = 'today-show3.htm';
																										
	rows[3].text = 'S.H.E吸吸樂 代言秀過頭';
	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 = '阿湯哥投靠米高梅 跟龐德並肩做戰';
	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 = '第6屆南方影展 愛河燦爛上映';
	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 = 4;
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 = 9;
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 = 9;
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 = '山佳車站停車場 養蚊子5年';
	rows[0].link = 'today-taipei1.htm';
																										
	rows[1].text = '年底前全面改善 禁停標線 不再胡塗';
	rows[1].link = 'today-taipei2.htm';
																										
	rows[2].text = '科技新貴 15％有中度憂鬱';
	rows[2].link = 'today-taipei3.htm';
																										
	rows[3].text = '護石防盜採 北投社區擬自救';
	rows[3].link = 'today-taipei4.htm';
																										
	rows[4].text = '市府明年度總預算1406.92億元／送新市長大禮 預算小砍過關';
	rows[4].link = 'today-taipei5.htm';
																										
	rows[5].text = '國務機要費案起訴／綠營受衝擊 藍營未必看郝';
	rows[5].link = 'today-taipei6.htm';
																										
}
menu = null;

menu = getMenu('north');
menu.layer = 10;
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 = '9特定行業 須離學校200米外';
	rows[3].link = 'today-north4.htm';
																										
	rows[4].text = '流行率5.8％ 宜縣 C肝比例全國最高';
	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 = 11;
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 = '偷電2人組 改裝電錶與店家拆帳';
	rows[0].link = 'today-center1.htm';
																										
	rows[1].text = '中市傳地下道之狼 性侵女生';
	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 = '查緝中國仿冒品 追出案外案';
	rows[5].link = 'today-center6.htm';
																										
	rows[6].text = '社會傳真／乾爺孫為錢切腹 負傷求醫';
	rows[6].link = 'today-center7.htm';
																										
}
menu = null;

menu = getMenu('south');
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-south1.htm';
																										
	rows[1].text = '疼惜台灣促進會 明天成立';
	rows[1].link = 'today-south2.htm';
																										
	rows[2].text = '大學生賣保育龜 判刑9月';
	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 = '台日媽媽排球隊 24日開打';
	rows[5].link = 'today-south6.htm';
																										
	rows[6].text = '遏阻登革熱 前鎮區全面噴藥';
	rows[6].link = 'today-south7.htm';
																										
}
menu = null;

menu = getMenu('o');
menu.layer = 5;
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-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';
																										
	rows[11].text = '回應';
	rows[11].link = 'today-o12.htm';
																										
}
menu = null;

if (showWeekly == false)
{
	menu = getMenu('supplement');
	menu.layer = 12;
	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 = 12;
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 = 11;
	menu.menuLayer = 0;
	menu.rows = new Array(12);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
																	
		rows[0].text = '台中 10大人氣肉圓 傳統美食再現';
		rows[0].link = 'today-weekly1.htm';
																											
		rows[1].text = '皮薄滑Q 肉餡香嫩';
		rows[1].link = 'today-weekly2.htm';
																											
		rows[2].text = '美哉花蓮 山海遊蹤暢快行';
		rows[2].link = 'today-weekly3.htm';
																											
		rows[3].text = '岩洞體驗行 風光任你遊';
		rows[3].link = 'today-weekly4.htm';
																											
		rows[4].text = '女大憧憬 V型臉No.1<br>瓜子臉美顏全攻略';
		rows[4].link = 'today-weekly5.htm';
																											
		rows[5].text = 'FaceV妝 小臉修容術';
		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 = '古著風 老樂團正火熱<br>超Hot樂團Tee';
		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 = 12;
	menu.menuLayer = 0;
	menu.rows = new Array(13);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
																	
		rows[0].text = '醫生家族黃彬 為家人打造夢想城堡';
		rows[0].link = 'today-house1.htm';
																											
		rows[1].text = '銀行利率促銷戰 房屋轉貸 精打細算';
		rows[1].link = 'today-house2.htm';
																											
		rows[2].text = '民權Uptown 鄰萬坪森林公園';
		rows[2].link = 'today-house3.htm';
																											
		rows[3].text = '啟奧邦城 1500坪綠意中庭 打造森林城堡';
		rows[3].link = 'today-house4.htm';
																											
		rows[4].text = '精銳市政桃源 距7期重劃區僅800公尺';
		rows[4].link = 'today-house5.htm';
																											
		rows[5].text = '大橘鎮 大地坪透天 坐擁千坪公園';
		rows[5].link = 'today-house6.htm';
																											
		rows[6].text = '解煞救風水 懷孕非夢事';
		rows[6].link = 'today-house7.htm';
																											
		rows[7].text = '頂級功能床 量身打造一夜好夢';
		rows[7].link = 'today-house8.htm';
																											
		rows[8].text = '200坪別墅 原味十足';
		rows[8].link = 'today-house9.htm';
																											
		rows[9].text = '選對抽油煙機 提升廚房品質';
		rows[9].link = 'today-house10.htm';
																											
		rows[10].text = '房價狂飆 富豪群聚';
		rows[10].link = 'today-house11.htm';
																											
		rows[11].text = '選擇綠建材 住的健康又環保';
		rows[11].link = 'today-house12.htm';
																											
		rows[12].text = '《房地產紙上叩應》年底進場購屋，是好時機嗎？';
		rows[12].link = 'today-house13.htm';
																											
	}
	menu = null;
}
//====================  end  ================================================

//===========================================================================
//產生tables
//==================== begin ================================================
for (j=0; j<menus.length; j++)
{
	var previousRowType = '';
	if (menus[j].name == 'fo')
		document.write('<table id='+menus[j].name+' style="position:absolute;left:'+(leftMargin+tableWidth*menus[j].menuLayer)+';visibility:hidden;font-size:13px;width:250;cursor:pointer;border:1 solid #00CCFF" border=0 bgcolor=#FFFFFF cellspacing=1 cellpadding=2 onMouseOver=showMenu(null,null) onMouseOut=hideMenu()>');
	else 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';
}