//var dmnPath = '/jtc2006';
var dmnPath = '';

function printTopMenu(whichClick) {
	var strETM;
	var aTM = new Array();
	
	for (dmY=5; dmY>=0; dmY--) {
		if (dmY == whichClick)
			aTM[dmY] = 'aTopMOnClic';
		else
			aTM[dmY] = 'aTopMenu';
	}
	
	strETM ='    <table cellSpacing=0 cellPadding=0 height=22 border=0 class="font10White">';
        strETM+='      <tbody>';
        strETM+='      <tr>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td><a href="/about/charles.html" class="' + aTM[0] + '">about charles</a></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td bgcolor=white><img src="/images/spacer.gif" width=1></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td><a href="/about/fiona.html" class="' + aTM[1] + '">about fiona</a></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td bgcolor=white><img src="/images/spacer.gif" width=1></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td><a href="/wedding/information.html" class="' + aTM[2] + '">Wedding Foto</a></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td bgcolor=white><img src="/images/spacer.gif" width=1></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        //strETM+='        <td><a href="/wedding/wedding.html" class="' + aTM[2] + '">Wedding 6.30</a></td>';
        //strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        //strETM+='        <td bgcolor=white><img src="/images/spacer.gif" width=1></td>';
        //strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td><a href="/hiking/hiking.php?activityYear=2001&activityPos=0" class="' + aTM[3] + '">hk trip</a></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td bgcolor=white><img src="'+dmnPath+'/images/spacer.gif" width=1></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td><a href="/trips/trips.php?year=8&wtrip=1&pfr=0&pto=14&col=2&ary=1" class="' + aTM[4] + '">@World</a></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        strETM+='        <td bgcolor=white><img src="'+dmnPath+'/images/spacer.gif" width=1></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=10></td>';
        //strETM+='        <td><a href="/about/diary/index.html" class="' + aTM[5] + '" target="index_down">e Diary</a></td>';
        strETM+='        <td><img src="'+dmnPath+'/images/spacer.gif" width=6></td>';
        strETM+='      </tr>';
        strETM+='      </tbody>';
        strETM+='    </table>';
        
	document.write(strETM);
}

function countdowntoJune30 () {
	var now = new Date();
	var event = new Date("Jun 30 2006 00:00:01");
	var seconds = (event - now) / 1000;
	var minutes = seconds / 60;
	var hours = minutes / 60;
	var days = hours / 24;
	days = Math.round(days);
	return days;
}

function printTopLeftFirstCol() {
	var strTLFC;
	
	strTLFC ='<table cellSpacing=0 cellPadding=0 width=192 border=0>';
        strTLFC+='<tbody>';
        strTLFC+='<tr><td><img src="'+dmnPath+'/images/birch_left.jpg" width=192></td></tr>';
        strTLFC+='<tr><td><a href="/home.html"><img src="'+dmnPath+'/images/logocharlesworkshop.gif" width=192 border=0></a></td></tr>';
        strTLFC+='</tbody>';
        strTLFC+='</table>';
        document.write(strTLFC);
}

function printTopRightFirstCol() {
	var strTRFC;
	
	strTRFC ='<table cellSpacing=0 cellPadding=0 width=576 border=0>';
        strTRFC+='<tbody>';
        strTRFC+='<tr>';
        strTRFC+='  <td>';
        strTRFC+='    <table cellSpacing=0 cellPadding=0 width=576 border=0 bgcolor=#CC1B1B>';
        strTRFC+='      <tbody>';
        strTRFC+='      <tr>';
        strTRFC+='        <td width=372><img src="'+dmnPath+'/images/birch_right.jpg" width=372></td>';
        strTRFC+='        <td width=204><img src="'+dmnPath+'/images/logoSlogan.gif"></td>';
        strTRFC+='      </tr>';
        strTRFC+='      </tbody>';
        strTRFC+='    </table>';
        strTRFC+='  </td>';
        strTRFC+='</tr>';
        strTRFC+='<tr>';
        strTRFC+='  <td valign=middle bgcolor=#A8A8A7><!-- divTopMenu --></td>';
        strTRFC+='</tr>';
        strTRFC+='</tbody>';
        strTRFC+='</table>';
        document.write(strTRFC);
}

function printWeWillMarry() {
	var strWWM;
	
	strWWM ='我們要結婚了！還有';
	strWWM+='<b>'+(countdowntoJune30())+'</b>';
        strWWM+='天！';
        
        strWWM = '順利完成，多謝大家支持';
        document.write(strWWM);
}

function printHomePic() {
	var strHP;
	var homePicAry = new Array();
	var m=-1;
	var strDomain='/';
	
	homePicAry[++m] = {ImgS:"wedding/images/cwg4lt0766.jpg", ImgDesc:"我們的結婚照" ,active:true}
	homePicAry[++m] = {ImgS:"wedding/images/cwg4lt0533.jpg", ImgDesc:"" ,active:true}
	homePicAry[++m] = {ImgS:"wedding/images/cwg4lt0765.jpg", ImgDesc:"" ,active:true}
	homePicAry[++m] = {ImgS:"wedding/630/f1280028.jpg", ImgDesc:"6月30日當天切蛋糕情況" ,active:true}
	homePicAry[++m] = {ImgS:"wedding/630/f1070002.jpg", ImgDesc:"6月30日當天的情況" ,active:true}
	homePicAry[++m] = {ImgS:"wedding/630/f1110033.jpg", ImgDesc:"6月30日當天的情況" ,active:true}
	homePicAry[++m] = {ImgS:"wedding/630/f1190031.jpg", ImgDesc:"6月30日當天的情況" ,active:true}
	homePicAry[++m] = {ImgS:"hiking/images/20060827/060827_08b.jpg", ImgDesc:"" ,active:true}
	homePicAry[++m] = {ImgS:"hiking/images/20060827/060827_11b.jpg", ImgDesc:"" ,active:true}
	homePicAry[++m] = {ImgS:"images/homePic_06091004.jpg", ImgDesc:"" ,active:true}
	homePicAry[++m] = {ImgS:"images/homePic_06091005.jpg", ImgDesc:"" ,active:true}
	homePicAry[++m] = {ImgS:"images/valentine.jpg", ImgDesc:"" ,active:true}
	
	var r = getRemainder(homePicAry.length);
	strHP ='<img src=' + strDomain + homePicAry[r].ImgS + ' width=372 alt='+ homePicAry[r].ImgDesc +'>';
        document.write(strHP);
}

function getRemainder(n) {
	return (Math.round((Math.random() * 100)) % n);
}

function printHomeBottom3Cols() {
	var strHB3C;
	
	strHB3C ='<table cellSpacing=0 cellPadding=0 width=564 border=0>';
        strHB3C+='  <tr>';
        strHB3C+='    <td width=192 bgcolor=#FF8A00 height=12></td>';
        strHB3C+='    <td width=186 bgcolor=#800567></td>';
        strHB3C+='    <td width=186 bgcolor=#295418></td>';
        strHB3C+='  </tr>';
        strHB3C+='  <tr>';
        strHB3C+='    <td valign=top>' + returnHomeBottom1stCol() + '</td>';
        strHB3C+='    <td valign=top>' + returnHomeBottom2ndCol() + '</td>';
        strHB3C+='    <td valign=top>' + returnHomeBottom3rdCol() + '</td>';
        strHB3C+='  </tr>';
        strHB3C+='</table>';
	document.write(strHB3C);
}

function returnHomeBottom1stCol(r) {
	var str1stC;
	var m = -1;
	var aryFPStory = new Array();
	aryFPStory[++m] = {topic:"台北蘇菲雅結婚照", intro:"我們在台北一共拍了五百多張照片，最後選購了其中的八十張，我們把...", imgA:"wedding/images/cwg4lt0372s.jpg", imgB:"wedding/images/cwg4lt0565s.jpg", ending:"更多的照片", endingHref:"wedding/information.html", active:true}
	aryFPStory[++m] = {topic:"香港羅浮宮", intro:"香港羅浮宮的婚紗照和台北的處理方法很不同，同時 Fiona 亦選了一套比較古典的婚紗。她穿得很好看的...", imgA:"wedding/images/louvre21.jpg", imgB:"wedding/images/louvre02.jpg", ending:"更多的照片", endingHref:"wedding/louvre.php?picFrom=0&picTo=8", active:true}
	aryFPStory[++m] = {topic:"四川海螺溝", intro:"我和小寶同學去了四川的山區，到了中國最接近陸地的冰川海螺溝，和藏族情歌聖地康定的跑馬山和木格措，那裡的風景...", imgA:"trips/200906_sichuan/090625sc11.jpg", imgB:"trips/200906_sichuan/090625sc07.jpg", ending:"詳情", endingHref:"trips/trips.php?year=11&wtrip=0&pfr=0&pto=12&col=2&ary=1", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：希臘", intro:"我們在 Perissa 逗留到六點，就開車前往仙島著名欣賞日落的 Oia。在這裡有更多漂亮的藍色圓頂小白屋...", imgA:"trips/200607_europe/060704_greece/12GS14.jpg", imgB:"trips/200607_europe/060704_greece/12GS32.jpg", ending:"詳情", endingHref:"/trips/trips.php?year=8&wtrip=1&pfr=15&pto=44&col=2&ary=2", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：希臘米島", intro:"希臘很普遍的食物「烤羊」和「烤雞」。一家餐廳的伙計正在為準備烤的羊和雞塗上香油。這一晚我...", imgA:"trips/200607_europe/060704_greece/13GM18.jpg", imgB:"trips/200607_europe/060704_greece/13GM08.jpg", ending:"詳情", endingHref:"/trips/trips.php?year=8&wtrip=1&pfr=45&pto=77&col=2&ary=3", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：瑞士", intro:"瑞士是一個很美的地方，而且很乾淨，到處都是花花草草...", imgA:"trips/200607_europe/060715_swiss/33SL05.jpg", imgB:"trips/200607_europe/060715_swiss/33SL24.jpg", ending:"詳情", endingHref:"trips/trips.php?year=8&wtrip=3&pfr=9&pto=41&col=2&ary=3", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：英國倫敦", intro:"吃過午餐，我們就提行李去火車站打算坐2:00多的班車去倫敦，怎麼知道去到 Eurostar 的售票處才知道...", imgA:"trips/200607_europe/060722_london/51LD04.jpg", imgB:"trips/200607_europe/060722_london/51LD07.jpg", ending:"詳情", endingHref:"trips/trips.php?year=8&wtrip=5&pfr=0&pto=99&col=2&ary=0", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：羅馬", intro:"因為飛機延誤了個多小時，晚上十點多才到達羅馬，想啟動 Europass，可是火車站一個職員都沒有，只有一...", imgA:"trips/200607_europe/060710_italy/22IR13.jpg", imgB:"trips/200607_europe/060710_italy/22IR04.jpg", ending:"詳情", endingHref:"trips/trips.php?year=8&wtrip=2&pfr=24&pto=45&col=2&ary=2", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：威尼斯", intro:"...", imgA:"trips/200607_europe/060710_italy/25IV03.jpg", imgB:"trips/200607_europe/060710_italy/25IV19.jpg", ending:"詳情", endingHref:"trips/trips.php?year=8&wtrip=2&pfr=76&pto=101&col=2&ary=5", active:true}
	//aryFPStory[++m] = {topic:"蜜月旅行：佛羅倫斯", intro:"...", imgA:"trips/200607_europe/060710_italy/23IF12.jpg", imgB:"trips/200607_europe/060710_italy/23IF04.jpg", ending:"詳情", endingHref:"trips/trips.php?year=8&wtrip=2&pfr=46&pto=65&col=2&ary=3", active:true}
	//aryFPStory[++m] = {topic:"獨孤山", intro:"開始上獨孤山，一開始還好，只是碎石路，之後轉入叢林就連路也看不到了。", imgA:"hiking/images/20060827/060827_08.jpg", imgB:"hiking/images/20060827/060827_11.jpg", ending:"更多的照片", endingHref:"", active:true}
	
	//var r = getRemainder(aryFPStory.length);
	
	str1stC ='<div id="divHomeBottom1stCol">';
	str1stC+='<table cellspacing=0 cellpadding=0 border=0 width=180>';
	str1stC+='  <tr><td class="homeBottom1stColTitle">' + aryFPStory[r].topic + '</td></tr>';
	str1stC+='  <tr><td height=5></td></tr>';
	str1stC+='  <tr><td class="homeBottomColText">' + aryFPStory[r].intro + '</td></tr>';
	str1stC+='  <tr><td><img src="' + aryFPStory[r].imgA + '" border=0 width=85><img src="/images/spacer.gif" width=5><img src="' + aryFPStory[r].imgB + '" border=0 width=85></td></tr>';
	str1stC+='  <tr><td class="homeBottomColText" style="text-align:right"><a href="' + aryFPStory[r].endingHref + '">' + aryFPStory[r].ending + '...</a></td></tr>';
	str1stC+='</table>';
	str1stC+='</div>';
	return str1stC;
}

function returnHomeBottom2ndCol() {
	var str2ndC;
	var strA;
	strA = "abcdefghijklmn";
	
	str2ndC ='<div id="divHomeBottom2ndCol">';
	str2ndC+='<table cellspacing=0 cellpadding=0 border=0 width=170>';
	//str2ndC+='  <tr><td class="homeBottom2ndColTitle">每日故事</td></tr>';
	//str2ndC+='  <tr><td height=5></td></tr>';
	str2ndC+='  <tr><td>' + printDiaryShortIntro(4) + '</td></tr>';
	//str2ndC+='  <tr><td></td></tr>';
	//str2ndC+='  <tr><td class="homeBottomColText"></td></tr>';
	str2ndC+='</table>';
	str2ndC+='</div>';
	return str2ndC;
}

function returnHomeBottom3rdCol() {
	var str3rdC;
	
	str3rdC ='<div id="divHomeBottom3rdCol">';
	str3rdC+='<table cellspacing=0 cellpadding=0 border=0 width=156 class="homeBottomColText">';
	str3rdC+='  <tr><td class="homeBottom3rdColTitle">Quick Click:</td></tr>';
	str3rdC+='  <tr><td height=5></td></tr>';
	str3rdC+='  <tr><td>- <a href="/about/charles/diary.php">福如的日誌已重新啟動</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="/trips/trips.php?year=8&wtrip=1&pfr=0&pto=14&col=2&ary=1">度蜜月歐洲之旅</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="">6.30 結婚當天的情況</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="/wedding/sophia.php?picFrom=0&picTo=7">我們在香港羅浮宮拍的結婚照</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="/wedding/louvre.php?picFrom=0&picTo=4">我們在台北蘇菲雅拍的結婚照</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="about/charles/jumptocharles.html">Jump.to/Charles 的歷史</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="http://www.taylor.com.hk" target="_blank">Taylor Systems Limited</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="http://www.evarich.com" target="_blank">Evarich International</a></td></tr>';
	str3rdC+='  <tr><td>- <a href="mailto:fyccharles@hotmail.com">聯絡網主</a></td></tr>';
	str3rdC+='  <tr><td>- MSN：fyccharles@hotmail.com</td></tr>';
	str3rdC+='  <tr><td>- Skype Charles： fyccharles</td></tr>';
	str3rdC+='</table>';
	str3rdC+='</div>';
	return str3rdC;
}

function printLastUpdatesNews() {
	var strLUN;
	
	strLUN ='<table cellSpacing=0 cellPadding=0 border=0 class="middleRightColText">';
        strLUN+='    <tr><td class="newsLastUpdatesTitle">Events and Last Updates:</td></tr>';
        strLUN+='    <tr><td><img src="/images/spacer.gif" height=5></td></tr>';
        strLUN+='    <tr><td>06.03.06 - <a href="/trips.php?year=8&wtrip=0" class="aLastUpdt">台北遊</a></td></tr>';
        strLUN+='    <tr><td>23.02.06 - <a href="/hiking/hiking.php?activityYear=2006&activityPos=0" class="aLastUpdt">環島行2006</a></td></tr>';
        strLUN+='    <tr><td>06.11.05 - <a href="/hiking/hiking.php?activityYear=2005&activityPos=1" class="aLastUpdt">毅行者2005</a></td></tr>';
        strLUN+='    <tr><td>06.11.05 - <a href="/hiking/hiking.php?activityYear=2005&activityPos=0" class="aLastUpdt">大東山</a></td></tr>';
        strLUN+='    <tr><td>01.08.04 - <a href="/hiking/hiking.php?activityYear=2004&activityPos=4" class="aLastUpdt">西貢龍蝦灣</a></td></tr>';
        strLUN+='    <tr><td>23.05.04 - <a href="/hiking/hiking.php?activityYear=2004&activityPos=3" class="aLastUpdt">清水灣釣魚翁郊遊</a></td></tr>';
        strLUN+='    <tr><td>15.02.04 - <a href="/hiking/hiking.php?activityYear=2004&activityPos=2" class="aLastUpdt">八仙嶺至鶴藪水塘</a></td></tr>';
        strLUN+='    <tr><td>18.01.04 - <a href="/hiking/hiking.php?activityYear=2004&activityPos=1" class="aLastUpdt">行赤徑下大雨</a></td></tr>';
        strLUN+='    <tr><td>01.01.04 - <a href="/hiking/hiking.php?activityYear=2004&activityPos=0" class="aLastUpdt">釣魚翁郊遊徑</a></td></tr>';
        strLUN+='    <tr><td>30.11.03 - <a href="/hiking/hiking.php?activityYear=2003&activityPos=12" class="aLastUpdt">鹿湖郊遊徑</a></td></tr>';
        strLUN+='    <tr><td>07.11.03 - <a href="/hiking/hiking.php?activityYear=2003&activityPos=11" class="aLastUpdt">毅行者2003</a></td></tr>';
        strLUN+='    <tr><td>02.11.03 - <a href="/hiking/coming.html" class="aLastUpdt">登獅子山</a></td></tr>';
        strLUN+='    <tr><td>19.10.03 - <a href="/hiking/hiking.php?activityYear=2003&activityPos=10" class="aLastUpdt">麥徑第三段</a></td></tr>';
        strLUN+='    <tr><td>12.10.03 - <a href="/hiking/hiking.php?activityYear=2002&activityPos=8" class="aLastUpdt">蚺蛇尖、大浪大灣</a></td></tr>';
        strLUN+='  </table>';
	document.write(strLUN);
}

function printAboutCharlesLeftMenu(acOnClick) {
	var strACLM;
	
	strACLM ='<table cellSpacing=0 cellPadding=0 border=1 class="middleRightColText">';
        strACLM+='    <tr><td class="newsLastUpdatesTitle">About Charles:</td></tr>';
        strACLM+='    <tr><td><img src="/jtc2006/images/spacer.gif" height=5></td></tr>';
        strACLM+='    <tr><td><img src="/jtc2006/images/arrow.gif"><img src="/jtc2006/images/spacer.gif" width=5><a href="readings.html" class="aLastUpdt">好書分享</a></td></tr>';
        strACLM+='    <tr><td><img src="/jtc2006/images/arrow.gif"><img src="/jtc2006/images/spacer.gif" width=5><a href="jumptocharles.html" class="aLastUpdt">Jump.to/Charles 的演變</a></td></tr>';
        strACLM+='  </table>';
	document.write(strACLM);
}

function printAboutUsLeftMenu() {
	var strAULM;
	
	strAULM ='<table cellspacing=0 cellpadding=0 border=0>';
        strAULM+='<tr>';
        strAULM+='  <td><img src="/jtc2006/images/crownhead.gif" width=192></td>';
        strAULM+='</tr>';
        strAULM+='<tr>';
        strAULM+='  <td align=center><a href="fiona.html">Fiona</a> & <a href="charles.html">Charles</a></td>';
        strAULM+='</tr>';
        strAULM+='</table>';
        document.write(strAULM);
}

function printAboutCharlesLeftMenu() {
	var strAULM;
	
	strAULM ='<table cellspacing=0 cellpadding=0 border=1>';
        strAULM+='<tr>';
        strAULM+='  <td><img src="/images/crownhead.gif" width=192></td>';
        strAULM+='</tr>';
        strAULM+='  <tr><td align=center><a href="fiona.html">Fiona</a> & <a href="charles.html">Charles</a></td></tr>';
        strAULM+='  <tr><td align=center><a href="/about/charles/diary.php">My Diary</a></td></tr>';
        strAULM+='</table>';
        document.write(strAULM);
}

function printHomeBottom1stCol() {
	document.write(returnHomeBottom1stCol());
}