//===========================================================================
//基本設定
//==================== 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','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(12);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '橘拒簽協商 軍購案付委生變';
	rows[0].link = 'today-fo1.htm';
																										
	rows[1].text = '橘以爆制爆：馬當選黨魁後 即要求支持軍購';
	rows[1].link = 'today-fo2.htm';
																										
	rows[2].text = '郝A電話費？ 蘇：違法就辦';
	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';
																										
	rows[10].text = '宋馬鬥 意在總統大選';
	rows[10].link = 'today-fo11.htm';
																										
	rows[11].text = '橘營批馬不要臉 國民黨團緩頰';
	rows[11].link = 'today-fo12.htm';
																										
}
menu = null;

menu = getMenu('p');
menu.layer = 2;
menu.menuLayer = 0;
menu.rows = new Array(7);
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 = '辜仲<img src=imgtoday/today-word.gif border=0>若涉案 開發金經營權 財部將拿回';
	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';
																										
}
menu = null;

menu = getMenu('int');
menu.layer = 4;
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].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 = "＜中英對照＞Britain launches shock ad campaign against binge drinking 英國發起反狂飲震撼廣告宣傳";
	rows[5].link = 'today-int6.htm';
																										
}
menu = null;

menu = getMenu('so');
menu.layer = 3;
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 = '講義氣? 小弟頂罪 大哥投案';
	rows[1].link = 'today-so2.htm';
																										
	rows[2].text = '無恥黑道／償子債中風 住院還被逼債';
	rows[2].link = 'today-so3.htm';
																										
	rows[3].text = '追人女友 17歲中彈亡';
	rows[3].link = 'today-so4.htm';
																										
	rows[4].text = '情變 餵女友藥燒炭 自己跳樓';
	rows[4].link = 'today-so5.htm';
																										
	rows[5].text = '上校操死兵 判7年2月';
	rows[5].link = 'today-so6.htm';
																										
	rows[6].text = '援夢不成 換來3個月噩夢';
	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 = '吸金逾6億／老鼠會躲罰款 倒閉另起爐灶';
	rows[9].link = 'today-so10.htm';
																										
}
menu = null;

menu = getMenu('life');
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 = '揭開地底生命之謎';
	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';
																										
	rows[5].text = '專家履勘：五星級雪隧 柑仔店水準經營';
	rows[5].link = 'today-life6.htm';
																										
	rows[6].text = '9交通罰則 明年開罰';
	rows[6].link = 'today-life7.htm';
																										
	rows[7].text = '高鐵十月通車 確定跳票';
	rows[7].link = 'today-life8.htm';
																										
}
menu = null;

menu = getMenu('sp');
menu.layer = 10;
menu.menuLayer = 0;
menu.rows = new Array(9);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '暌違38年 虎雀再爭霸';
	rows[0].link = 'today-sp1.htm';
																										
	rows[1].text = '弱棒發轟 雀悅7喜';
	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 = '馬德里名人網賽／網壇雙爾 挺進8強';
	rows[5].link = 'today-sp6.htm';
																										
	rows[6].text = '台灣大長春高球賽／1桿差 陳志明獨居領先';
	rows[6].link = 'today-sp7.htm';
																										
	rows[7].text = '聖托盃隊際賽 台灣退至第7';
	rows[7].link = 'today-sp8.htm';
																										
	rows[8].text = '快樂健行 山協號召同好';
	rows[8].link = 'today-sp9.htm';
																										
}
menu = null;

menu = getMenu('e');
menu.layer = 7;
menu.menuLayer = 0;
menu.rows = new Array(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 = '中經院估 明年GDP成長4.1%';
	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 = '李勝彥降調 有機會遛英文';
	rows[4].link = 'today-e5.htm';
																										
}
menu = null;

menu = getMenu('stock');
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 = '外資續買 台股收復7000點';
	rows[0].link = 'today-stock1.htm';
																										
	rows[1].text = '復華金、元京證合併案財顧報告 已送董事會';
	rows[1].link = 'today-stock2.htm';
																										
	rows[2].text = '台積電Q4營收 外資估下滑5到6%';
	rows[2].link = 'today-stock3.htm';
																										
	rows[3].text = 'Q3獲利近倍 Google股價漲逾7%';
	rows[3].link = 'today-stock4.htm';
																										
	rows[4].text = '久大併購國際商貿 股價大漲';
	rows[4].link = 'today-stock5.htm';
																										
	rows[5].text = '茂德、力晶Q3獲利佳 外資看好';
	rows[5].link = 'today-stock6.htm';
																										
	rows[6].text = 'IC通路廠商／大傳、友尚、威健 前三季獲利亮眼';
	rows[6].link = 'today-stock7.htm';
																										
	rows[7].text = '國際股市／歐股午盤漲 日股上揚';
	rows[7].link = 'today-stock8.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 = '海洋死區200個 全球警訊';
	rows[0].link = 'today-t1.htm';
																										
}
menu = null;

menu = getMenu('show');
menu.layer = 12;
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 = '11月中揭曉 陶子搶進三立完娛 拔掉王仁甫?';
	rows[1].link = 'today-show2.htm';
																										
	rows[2].text = '公共場所採訪 微笑劇組野蠻動粗<br>記者遭毆 學者痛批暴力';
	rows[2].link = 'today-show3.htm';
																										
	rows[3].text = '金馬搭檔 行情金不同<br>3個侯佩岑 難敵蔡康永';
	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 = '《東京影展》武士的一分 木村人氣滿分';
	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 = 'V6長野博戴綠帽 女友劈腿堀江貴文';
	rows[13].link = 'today-show14.htm';
																										
	rows[14].text = 'KAT-TUN再出發 赤西仁落單閒嗑牙';
	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(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(12);
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 = '大冠鷲迷途 新店人盼野放';
	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 = '萬華服飾館24日開幕 網路試衣';
	rows[6].link = 'today-taipei7.htm';
																										
	rows[7].text = '最後一次護預算 馬12分鐘快閃';
	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';
																										
	rows[10].text = '莉莉安重生 首例成功醫療外交';
	rows[10].link = 'today-taipei11.htm';
																										
	rows[11].text = '＜百萬善款＞黃斑部手術 中低戶免費';
	rows[11].link = 'today-taipei12.htm';
																										
}
menu = null;

menu = getMenu('north');
menu.layer = 12;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(13);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '鑽石夫妻牽手逾70年 鶼鰈情深';
	rows[0].link = 'today-north1.htm';
																										
	rows[1].text = '湖口交通黑暗期 害苦通勤族';
	rows[1].link = 'today-north2.htm';
																										
	rows[2].text = '龍潭、八德停車格 擬12月收費';
	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';
																										
	rows[7].text = '6校聯合義賣園遊會登場 外師賣力';
	rows[7].link = 'today-north8.htm';
																										
	rows[8].text = '素人畫家江張淑芸率兒孫 4代8人開聯展';
	rows[8].link = 'today-north9.htm';
																										
	rows[9].text = '聖德書院 成立社區照護中心';
	rows[9].link = 'today-north10.htm';
																										
	rows[10].text = '搶孤、走尪… 6活動將列法定民俗';
	rows[10].link = 'today-north11.htm';
																										
	rows[11].text = '微生物環保廁所 登山好方便';
	rows[11].link = 'today-north12.htm';
																										
	rows[12].text = '專科肄業生 寫基隆郵政史';
	rows[12].link = 'today-north13.htm';
																										
}
menu = null;

menu = getMenu('center');
menu.layer = 13;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(16);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '騎車碰坑洞摔成植物人 國賠696萬';
	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';
																										
	rows[7].text = '身障產品採購 公家抱怨買不到';
	rows[7].link = 'today-center8.htm';
																										
	rows[8].text = '洲際棒球場啟用 府會友誼賽暖身';
	rows[8].link = 'today-center9.htm';
																										
	rows[9].text = '讀者爆料／推甄考題同去年 中技坦承作業疏失';
	rows[9].link = 'today-center10.htm';
																										
	rows[10].text = '江順章牽手70年 夫妻從未反目';
	rows[10].link = 'today-center11.htm';
																										
	rows[11].text = '創意舞蹈賽 學子展現力與美';
	rows[11].link = 'today-center12.htm';
																										
	rows[12].text = '抗震屋揚名國際 4學子榮耀';
	rows[12].link = 'today-center13.htm';
																										
	rows[13].text = '有氧拳擊健身操 投市延燒';
	rows[13].link = 'today-center14.htm';
																										
	rows[14].text = '劉森吉照顧孤嫗 愛心無距離';
	rows[14].link = 'today-center15.htm';
																										
	rows[15].text = '中區文化圈明啟動 爆米香饗客';
	rows[15].link = 'today-center16.htm';
																										
}
menu = null;

menu = getMenu('south');
menu.layer = 14;
menu.parentMenu = 'region';
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-south1.htm';
																										
	rows[1].text = '籌獄中費用 2飛車賊再行搶';
	rows[1].link = 'today-south2.htm';
																										
	rows[2].text = '看他們';
	rows[2].link = 'today-south3.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(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 = 13;
	menu.menuLayer = 0;
	menu.rows = new Array(12);
	with (menu)
	{
		for (i=0; i<rows.length; i++)
			rows[i] = new Object();
																	
		rows[0].text = '金門IN玩法 風馳電掣勇闖碉堡';
		rows[0].link = 'today-weekly1.htm';
																											
		rows[1].text = '秋遊金門 戰地風情換新裝';
		rows[1].link = 'today-weekly2.htm';
																											
		rows[2].text = '乾烙韭菜盒  彈Q帶勁超正點';
		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 = '陰雨綿綿DON’T BLUE！<br>雨衣挑選7撇步！';
		rows[6].link = 'today-weekly7.htm';
																											
		rows[7].text = '創意生活 小物人型瘋';
		rows[7].link = 'today-weekly8.htm';
																											
		rows[8].text = 'FIRST STEP！學步鞋<br>BABY健康學走路';
		rows[8].link = 'today-weekly9.htm';
																											
		rows[9].text = '腳ㄚㄚ長大中……<br>來雙好鞋 跑、跳最神氣';
		rows[9].link = 'today-weekly10.htm';
																											
		rows[10].text = '健康醫療--<br>和諧的身心 需要足夠的維生素H';
		rows[10].link = 'today-weekly11.htm';
																											
		rows[11].text = '花編--<br>逆風的風景';
		rows[11].link = 'today-weekly12.htm';
																											
	}
	menu = null;
}
if (showHouse)
{
	menu = getMenu('house');
	menu.layer = 14;
	menu.menuLayer = 0;
	menu.rows = new Array(14);
	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 = '皇家經典 正對4800坪自強公園';
		rows[2].link = 'today-house3.htm';
																											
		rows[3].text = '窗的博物館 鄰近823公園 視野無遮蔽';
		rows[3].link = 'today-house4.htm';
																											
		rows[4].text = '左岸 緊臨公園 遠眺安平港海景';
		rows[4].link = 'today-house5.htm';
																											
		rows[5].text = '骨董家具 大玩生活情趣';
		rows[5].link = 'today-house6.htm';
																											
		rows[6].text = '幫子女建立新家 1大房換2小房 環境費思量';
		rows[6].link = 'today-house7.htm';
																											
		rows[7].text = '15年老透天 翻新更亮眼';
		rows[7].link = 'today-house8.htm';
																											
		rows[8].text = '星座開運擺飾 秋冬能量旺旺';
		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';
																											
		rows[13].text = '《房地產紙上叩應》刷卡付訂後反悔，可否請求退還？';
		rows[13].link = 'today-house14.htm';
																											
	}
	menu = null;
}
//====================  end  ================================================

//===========================================================================
//產生tables
//==================== begin ================================================
for (j=0; j<menus.length; j++)
{
	var previousRowType = '';
	if (menus[j].parentMenu == null)
		document.write('<table id='+menus[j].name+' style="position:absolute;left:'+(leftMargin+tableWidth*menus[j].menuLayer)+';visibility:hidden;font-size:13px;width:200;cursor:pointer;border:1 solid #00CCFF" border=0 bgcolor=#FFFFFF cellspacing=1 cellpadding=2 onMouseOver=showMenu(null,null) onMouseOut=hideMenu()>');
	else
		document.write('<table id='+menus[j].name+' style="position:absolute;left:'+(leftMargin+tableWidth*menus[j].menuLayer)+';visibility:hidden;font-size:13px;width:200;cursor:pointer;border:1 solid #00CCFF" border=0 bgcolor=#FFFFFF cellspacing=1 cellpadding=2 onMouseOver=showMenu2(null,null) onMouseOut=hideMenu2()>');

	for (i=0; i<menus[j].rows.length; i++)
	{
		if (previousRowType!='' && menus[j].rows[i].type==null)
		{
			document.write('<tr bgcolor=#00CCFF height=2 style=cursor:default>');
			document.write('	<td></td>');
			document.write('</tr>');
		}

		if (menus[j].rows[i].type && menus[j].rows[i].type!=previousRowType)
		{
			document.write('<tr bgcolor=#00CCFF height='+rowHeight+' style="cursor:default">');
			document.write('	<td>《'+menus[j].rows[i].type+'》</td>');
			document.write('</tr>');
		}

		if (menus[j].rows[i].submenu)
		{
			document.write('<tr onMouseOver="incell(this);showMenu2(this,'+menus[j].rows[i].submenu+')" onMouseOut="outcell(this);hideMenu2()" bgcolor=#C2E5FF height='+rowHeight+'>');
			if (menus[j].rows[i].link)
				document.write('	<td onClick="location.href=\''+path+menus[j].rows[i].link+'\'">'+menus[j].rows[i].text+'</td>');
			else
				document.write('	<td>'+menus[j].rows[i].text+'</td>');
			document.write('</tr>');
		}
		else 
		{
			if (menus[j].rows[i].type == null)
			{
				document.write('<tr onMouseOver=incell(this) onMouseOut=outcell(this) bgcolor=#C2E5FF height='+rowHeight+'>');
				document.write('	<td onClick="location.href=\''+path+menus[j].rows[i].link+'\'">◎'+menus[j].rows[i].text+'</td>');
				document.write('</tr>');
			}
			else
			{
				document.write('<tr onMouseOver=incell(this) onMouseOut=outcell2(this) bgcolor=#41DAAA height='+rowHeight+'>');
				document.write('	<td onClick="location.href=\''+path+menus[j].rows[i].link+'\'">．'+menus[j].rows[i].text+'</td>');
				document.write('</tr>');
			}
		}

		previousRowType = menus[j].rows[i].type==null? '': menus[j].rows[i].type;
	}

	document.write('</table>');
}
//====================  end  ================================================

var activeRow,activeMenu1,activeRow1,activeMenu2;
var protrude1;
var timer,timer2;
var hide,hide2

function getMenu(name)
{
	index = -1;
	for (i=0; i<menus.length; i++)
		if (menus[i].name == name)
		{
			index = i;
			break;
		}
	if (index != -1) return menus[index];
	else return null;
}

function showMenu(row,menu)
{
	if (activeRow)
	{
		hide = true;
		hideAllMenu();
	}
	hide = false;
	if (row)	activeRow = row;
	activeRow.style.backgroundColor = '#FFCCFF';
	if (menu) activeMenu1 = menu;
	
	defaultTop = topMargin+layerHeight*getMenu(activeMenu1.id).layer;
	protrude1 = defaultTop-document.body.scrollTop+activeMenu1.offsetHeight-document.body.clientHeight;
	if (protrude1 > 0)	
		activeMenu1.style.top = defaultTop-protrude1;
	else
		activeMenu1.style.top = defaultTop;
		
	activeMenu1.style.visibility = 'visible';
}

function hideMenu()
{
	clearTimeout(timer);
	hide = true;
	timer = setTimeout(hideAllMenu,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';
}
