//===========================================================================
//基本設定
//==================== 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(11);
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 = '熱情巴拉圭 紓解37小時疲憊';
	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 = '前進中國 87台商受困杭州';
	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';
																										
}
menu = null;

menu = getMenu('p');
menu.layer = 2;
menu.menuLayer = 0;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '蘇揆︰泛藍只敢在台一中各表';
	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 = '游錫&#22531;︰無北謝南葉規劃';
	rows[4].link = 'today-p5.htm';
																										
	rows[5].text = '葉丁郝 三方攻防';
	rows[5].link = 'today-p6.htm';
																										
	rows[6].text = '八選將 互相交鋒';
	rows[6].link = 'today-p7.htm';
																										
	rows[7].text = '李登輝︰北高選舉別談統獨';
	rows[7].link = 'today-p8.htm';
																										
}
menu = null;

menu = getMenu('int');
menu.layer = 4;
menu.menuLayer = 0;
menu.rows = new Array(10);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = "人事傾軋 美CIA局長請辭";
	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 = "EFSA宣稱 代糖無致癌之虞";
	rows[4].link = 'today-int5.htm';
																										
	rows[5].text = "用奈米保養品 被當白老鼠？";
	rows[5].link = 'today-int6.htm';
																										
	rows[6].text = "水中魔術師 能否手住紀錄？";
	rows[6].link = 'today-int7.htm';
																										
	rows[7].text = "美直升機墜毀 10死";
	rows[7].link = 'today-int8.htm';
																										
	rows[8].text = "《中英對照讀新聞》Rio de Janeiro to appoint \"women only\" trains 里約熱內盧將推出女性專車";
	rows[8].link = 'today-int9.htm';
																										
	rows[9].text = "《中日對照讀新聞》日本&#32076;&#28168;&#29987;業省&#12399;、放映&#12364;規制&#12373;&#12428;&#12390;&#12356;&#12427;結婚相談所&#12394; 經產省擬將限播之結婚諮詢公司等電視廣告解禁";
	rows[9].link = 'today-int10.htm';
																										
}
menu = null;

menu = getMenu('so');
menu.layer = 3;
menu.menuLayer = 0;
menu.rows = new Array(12);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '可疑小板車 模擬出軌專用？';
	rows[0].link = 'today-so1.htm';
																										
	rows[1].text = '「義禮 媽媽盼你活著回來」';
	rows[1].link = 'today-so2.htm';
																										
	rows[2].text = '洪若潭全家自焚疑案 3名子女至今下落不明';
	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 = '男童意外／1歲童燒死 父火場抱屍<br>3歲童墜崖 父電線救子';
	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 = '鬼門關前辦畫展 癌末媽媽悲喜落淚';
	rows[11].link = 'today-so12.htm';
																										
}
menu = null;

menu = getMenu('life');
menu.layer = 8;
menu.menuLayer = 0;
menu.rows = new Array(7);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '賣地8000萬 買NCD逃稅4000萬';
	rows[0].link = 'today-life1.htm';
																										
	rows[1].text = '事故傷害 勞工高出常人65％';
	rows[1].link = 'today-life2.htm';
																										
	rows[2].text = '大學畢展即性演出 火辣飆特色';
	rows[2].link = 'today-life3.htm';
																										
	rows[3].text = '上網填志願 延至晚上12點';
	rows[3].link = 'today-life4.htm';
																										
	rows[4].text = '搏浪救死 方敏嵩更惜生';
	rows[4].link = 'today-life5.htm';
																										
	rows[5].text = 'Pre-S突變株 B肝致癌兇手';
	rows[5].link = 'today-life6.htm';
																										
	rows[6].text = '更生牧師 要陳進興2子不忘本';
	rows[6].link = 'today-life7.htm';
																										
}
menu = null;

menu = getMenu('sp');
menu.layer = 9;
menu.menuLayer = 0;
menu.rows = new Array(9);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '泰山163轟 新科全壘打王';
	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 = '7局8K 吳偲佑捕鯨樂';
	rows[4].link = 'today-sp5.htm';
																										
	rows[5].text = '李筱瑜，蟬聯后座';
	rows[5].link = 'today-sp6.htm';
																										
	rows[6].text = '瓊斯大驚奇 巫師1分恨';
	rows[6].link = 'today-sp7.htm';
																										
	rows[7].text = '台啤狂洩 裕隆快意聽牌';
	rows[7].link = 'today-sp8.htm';
																										
	rows[8].text = '《亞洲九號球巡迴賽越南站》王泓翔衝進四強 阿順出局';
	rows[8].link = 'today-sp9.htm';
																										
}
menu = null;

menu = getMenu('e');
menu.layer = 7;
menu.menuLayer = 0;
menu.rows = new Array(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 = '美股飆到 6年來新高';
	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('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 = '乘客目擊：南迴翻車後 李雙全扶妻進2、3車廂廁所';
	rows[0].link = 'today-t1.htm';
																										
}
menu = null;

menu = getMenu('show');
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 = '舞尬廖鎮漢 醉貼女大叔 劉嘉玲夜店狂趴';
	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 = '阿信夜店遭砸傷 嘴角縫10針';
	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 = '2006MTV亞洲大獎 Jolin舞孃爭光 王力宏英雄滿堂采';
	rows[7].link = 'today-show8.htm';
																										
	rows[8].text = '寶兒唱銷日韓 Rain內外通吃';
	rows[8].link = 'today-show9.htm';
																										
	rows[9].text = '暑假強片票房預測 「海盜」搶錢最猛 「任務」吸金最快';
	rows[9].link = 'today-show10.htm';
																										
	rows[10].text = '吳宇森來了 想吃滷肉飯';
	rows[10].link = 'today-show11.htm';
																										
	rows[11].text = '艾希莉比潔西卡燒 辣翻時人';
	rows[11].link = 'today-show12.htm';
																										
}
menu = null;

menu = getMenu('c');
menu.layer = 5;
menu.menuLayer = 0;
menu.rows = new Array(2);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
		rows[0].text = '《星期專論》台灣應申請為WHO會員國 不是WHA觀察員';
		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(9);
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 = '感謝母愛 他們沒有障礙';
	rows[6].link = 'today-taipei7.htm';
																										
	rows[7].text = '捧西瓜 體驗當媽媽的辛勞';
	rows[7].link = 'today-taipei8.htm';
																										
	rows[8].text = '創意烹飪賽 用太陽能煮飯';
	rows[8].link = 'today-taipei9.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 = '傳盜木種牛樟菇 花蓮警方追查';
	rows[0].link = 'today-north1.htm';
																										
	rows[1].text = '搖頭店詐降 桃警直搗逮45毒客';
	rows[1].link = 'today-north2.htm';
																										
	rows[2].text = '狗仔來電套話 新埔賄聲賄影洩底';
	rows[2].link = 'today-north3.htm';
																										
	rows[3].text = '香爐竊案連連 桃園廟宇出招自保';
	rows[3].link = 'today-north4.htm';
																										
	rows[4].text = '《社會傳真》臨檢汽車旅館 查獲男子持槍';
	rows[4].link = 'today-north5.htm';
																										
}
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 = '回收場收贓 起出230公斤台電纜線';
	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 = '私人空地遭盜砂 逮獲7嫌';
	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 = 13;
menu.parentMenu = 'region';
menu.menuLayer = 1;
menu.rows = new Array(8);
with (menu)
{
	for (i=0; i<rows.length; i++)
		rows[i] = new Object();
																
	rows[0].text = '布農族射耳祭 三民鄉登場';
	rows[0].link = 'today-south1.htm';
																										
	rows[1].text = '爆笑廣告 銀行竊賊誤喝精子';
	rows[1].link = 'today-south2.htm';
																										
	rows[2].text = '琴聲惱人 鄰居反目成仇';
	rows[2].link = 'today-south3.htm';
																										
	rows[3].text = '失業男行竊 民眾制伏';
	rows[3].link = 'today-south4.htm';
																										
	rows[4].text = '青少棒賽 南市贏了桃園縣';
	rows[4].link = 'today-south5.htm';
																										
	rows[5].text = '不當討債 2人被移送法辦';
	rows[5].link = 'today-south6.htm';
																										
	rows[6].text = '神壇掩護 毒販做毒品交易';
	rows[6].link = 'today-south7.htm';
																										
	rows[7].text = '不滿服務 男子持槍射KTV';
	rows[7].link = 'today-south8.htm';
																										
}
menu = null;

menu = getMenu('o');
menu.layer = 6;
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-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 = '一具屍體500萬';
	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';
																										
}
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 = '挑戰第一高峰 登玉山非難事';
		rows[0].link = 'today-weekly1.htm';
																											
		rows[1].text = '一步一腳 百岳峰頂等著你';
		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 = '菜鳥要上山 配備停看聽';
		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 = '告別熊貓一族<br>神奇眼妝2招 遮掉黑眼圈';
		rows[7].link = 'today-weekly8.htm';
																											
		rows[8].text = '髒兮兮糾察隊出動 隨手搞定髒污小角落';
		rows[8].link = 'today-weekly9.htm';
																											
		rows[9].text = '怎麼辦？我家貓咪要當媽咪啦！';
		rows[9].link = 'today-weekly10.htm';
																											
		rows[10].text = '十二星座戀愛禁忌大公開';
		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';
}