var XAN = {};

XAN.VARS = {
	image: {
		0: ["_IMG/", "001.png", "003.png", "004.png", "004.png", "005.png", "006.png", "007.png", "008.png", "009.png", "010.png"],
		1: ["_IMG/randImg_1/", "xxx1.gif", "xxx2.gif", "xxx3.gif", "xxx4.gif", "xxx5.gif"],
		2: ["_IMG/titlebar/", "sa1.gif", "sa2.gif", "sa3.gif", "sa4.gif", "sa5.gif", "sa6.gif", "sa7.gif", "sa8.gif", "sa9.gif", "sa10.gif", "sa11.gif", "sa12.gif", "sa13.gif", "sa14.gif", "sa15.gif", "sa16.gif", "sa17.gif"],
		3: ["_IMG/titlebar/", "b1.gif", "b2.gif", "b3.gif", "b4.gif"],
		4: ["_IMG/template/", "i_schoolLogoSmall.gif"]
	},
	theme: {
		//風格1: ["index.html?c=blue3"]
		//c0: ["index.html?c=blue2"],
		//c1: ["index.html?c=blue"],
		//c2: ["index.html?c=lightBlue"],
		//c3: ["index.html?c=green"],
		//c4: ["index.html?c=orange"],
		//c5: ["index.html?c=purple"],
		//c6: ["index.html?c=black"],
		//c7: ["index.html?c=blue3"],
		//隱藏風格1: ["index_m1.html"],
		//隱藏風格2: ["index_m2.html"]
	},
	path: "./page/",
	mainPage: "main.htm",
	prints: function(map, deep) {
		deep = (deep==undefined? 0: deep);
		
		var dp = (function(deep) {
			var h = "\t";
			for( var i=0; i< deep; i++)
				h += "\t";
			return h;
		})(deep);
		
		var h = "{\n";
		for( i in map )
			h += dp+ "[\""+i+"\"] => \""+ (typeof map[i] == "object"? arguments.callee(map[i], deep+1): map[i] )+ "\",\n";
		h += dp+"}";
		
		return h;
	},
	print: function(m) {
		alert(this.prints(m));
	}
};

XAN.themeChanger = function() {
	var self = XAN;
	$("#docTheme").html((function() {
		// theme selector
		var html = "";
		for( var i in self.VARS.theme )
			html += "<a href='./"+self.VARS.theme[i]+"' style='text-decoration: none;'>["+i+"]</a>&nbsp;";
		
		// browser checker
		if( jQuery.browser.msie && /^[0-6]/.test(jQuery.browser.version) ||
			jQuery.browser.safari && /^([0-4]|5[12])/.test(jQuery.browser.version) ||
			jQuery.browser.mozilla && /^[01]\.[2-8]/.test(jQuery.browser.version) ||
			jQuery.browser.opera && /^([0-8]|9\.[0-4])/.test(jQuery.browser.version) 
		) {
			var path = "";
			if(	jQuery.browser.msie	)
				path = "http://www.microsoft.com/taiwan/windows/internet-explorer/?WT.mc_id=ieproduct";
			else if( jQuery.browser.safari )
				path = "http://www.google.com/chrome/index.html?hl=zh_tw&brand=CHMA&utm_campaign=zh_hk&utm_source=zh_tw-ha-apac-tw-bk&utm_medium=ha";
			else if( jQuery.browser.mozilla )
				path = "http://moztw.org/firefox/";
			else if( jQuery.browser.opera )
				path = "http://www.opera.com/";
			
			html += "<br /><span style='color: #FF0000;'>提示 : 你目前所使用的瀏覽器版本過舊，可能並不完全支援此網頁。請到 <a href='"+path+"' target='_blank'>這裏</a> 更新你的瀏覽器。</span>";
		}
		
		return html;
	})());
};

XAN.updatePwd = function(text) {
	$("TABLE TR TD DIV[id=docIndexPath]").html(text);
};

XAN.randomImage = function(imgType) {
	return this.VARS.image[imgType][0]+ this.VARS.image[imgType][Math.round(Math.random()* (this.VARS.image[imgType].length- 2))+ 1];
};

XAN.showPDF = function(path) {
	return "[<a href='"+path+"' target='_blank'>PDF文本</a>]";
};

XAN.postLoad = function(elementId) {
	$("#"+elementId+" DIV[name=title]")
		.css({color: "#6A2500", fontSize: "26px"});
	$("#"+elementId+" DIV[name=content]")
		.css({color: "#AB3C00", fontSize: "16px", lineHeight: "26px"});
};

XAN.xrl = function(CST, type, container) {
	CST = CST.split(/\/\.\//).join("/");
	
	if( /main\.htm/.test(CST) || /main_[^\r\n]*\.htm/.test(CST) )
		CST = "./"+ XAN.VARS.mainPage;
	
	var lang        = type== undefined? XAN.VARS.path: "./"+type+"/";
	var currentDir  = CST.match(/^\.\/[^\r\n]*\//) == null? null: lang+ CST.match(/^\.\/[^\r\n]*\//);
	
	var requestPath = currentDir == null? CST: ( CST.match(new RegExp("^"+ lang)) != null ? "": lang )+ CST.replace(/^\.\//, "");
	var container   = (container== undefined? $("DIV[id=docContent]"): container);
	
	var param = (function() {
		if( requestPath.split("?")[1] == undefined )
			return new Array();
		
		var p = requestPath.split("?")[1].split("&");
		for( var i in p )
			p[i] = [p[i].split("=")[0], p[i].split("=")[1]];
		
		return p;
	})();
	
	// save request path for browser reflesh
	if( $("#docIndexPath").html() != "" )
		$.cookie("mTitle", $("#docIndexPath").html());
	
	if( $.cookie("mTitle") == null ) {
		$("#docIndexPath").html("主頁");
		$.cookie("mTitle", $("#docIndexPath").html());
	}
	
	if( container.attr("id") == "docContent" ) {
		$.cookie("p", CST);
		$.cookie("pt", type == undefined? "page": type);
	}
	
	// get target content
	$.get(requestPath, function(e) {
		// adding parameter to target page via TEMP
		var h = "<scr"+"ipt type='text/javascr"+"ipt'> eval('TEMP = {};'); </scr"+"ipt>";;
		if( param.length > 0 )
			h = "<scr"+"ipt type='text/javascr"+"ipt'> eval('TEMP = {\""+param.join("|x1x|").split(",").join("\":\"").split("|x1x|").join("\",\"")+"\"};'); </scr"+"ipt>";
		
		if( currentDir == null ) {
			$("DIV[id=docContent]").html(h+ e);
			return;
		}
		
		// parse relative path
		if( /pageTemplate[0-9]*\.php\?p\=/.test(currentDir) ) {
			currentDir = currentDir.replace(/^.*p\=/, "");
			currentDir = requestPath.replace(/pageTemplate[0-9]*\.php\?p\=[^\r\n]*$/, "")+ currentDir.replace(/^\.\//, "");
		}
		var htmlStr = e.split(/\"\.\//).join("\""+ currentDir).split(/\'\.\//).join("'"+ currentDir);
		
		// parse static function replacement
		var cm = "";
		while( (cm = htmlStr.match(/\{\:XAN.[^\r\n]*?\;\}/)) != null ) {
			eval("var pa="+ cm[0].replace(/^\{\:/, "").replace(/\}$/, ""));
			htmlStr = htmlStr.replace(cm, pa);
		}
		
		container.html(h+ htmlStr);
	});
};

XAN.news = function(news, template) {
	var newsPath = "./newsfiles/"+ news+ "/description.2d";
	var templatePath = "./newsfiles/template/"+ template+ "/index.htm";
	
	if( template == undefined )
		XAN.windowOpen(XAN.VARS.path+ templatePath.replace("undefined", "standalone001")+ "?p="+ news);
		//window.open(XAN.VARS.path+ templatePath.replace("undefined", "standalone001")+ "?p="+ news, "", "top=10,left=10");
	else {
		if( /^standalone/i.test(template) )
			XAN.windowOpen(XAN.VARS.path+ templatePath+ "?p="+ news);
			//window.open(XAN.VARS.path+ templatePath+ "?p="+ news, "", "top=10,left=10");
		else
			XAN.xrl(templatePath+ "?p="+ XAN.VARS.path+ newsPath);
	}
};

XAN.shadowboxFLV = function(path, title) {
	if( /^\.\//.test(path) )
		path = path.replace("./", "../../../../");
	
	// get movie from media folder
	if( /^[^\.]/.test(path) )
		path = "../../../../"+ XAN.VARS.path+ "media/movies/"+ path+ "/main.flv";
	
	// set default title
	if( title == undefined )
		title = "";
	
	Shadowbox.open({
		content: path,
		title: title,
		player: "flv",
		height: "600",
		width: "800"
	});
};

XAN.shadowboxFLVInfo = function(flvId, info) {
	if( info == undefined )
		return XAN.VARS.path+ "media/movies/"+ flvId+ "/main.jpg";
	
	if( typeof info != "object" )
		return XAN.VARS.path+ "media/movies/"+ flvId+ "/main.jpg";
	
	if( info.type == "html" ) {
		var html = ""+
			"<table>"+
			"	<tr>"+
			"		<td style='padding: 5px;'><img src='"+XAN.VARS.path+ "media/movies/"+ flvId+ "/main.jpg"+"' style='width: 120px; height: 90px; border: 3px double #AAAAAA;' /></td>"+
			"		<td style='padding: 5px;' valign='top'><span style='font-size: 12px; line-height: 18px;'><a href='javascript: XAN.shadowboxFLV(\""+flvId+"\", \""+info.title+"\");'>"+info.title+"</a><br />"+(info.text==undefined? "": info.text)+"</span></td>"+
			"	</tr>"+
			"</table>";
		return html;
	}
};

XAN.shadowboxPA = function(albumId, path, no, startAt) {
	if( /^[0-9]*$/.test(albumId) )
		// get album information from data.2d
		$.get(this.VARS.path+ "media/data/album.2d", function(e) {
			// make shadowbox html content
			$.jComponent.jData({data: e})
				.query("WHERE 3=="+albumId)
				.each(false, function(e) {
					var path = null;
					if( e[0][3].split("").length > 3 )
						path = {
							path: XAN.VARS.path+ "media/photos/"+ e[0][3],
							image: function(no) { return this.path+ "/"+ no+".jpg"; },
							thumb: function(no) { return this.path+ "/thumbnail/"+ no+".jpg"; }
						};
					else
						path = {
							path: "../newPhotoAlbum/export/"+ e[0][3],
							image: function(no) { return this.path+ "/large/"+ no+".JPG"; },
							thumb: function(no) { return this.path+ "/small/"+ no+".JPG"; }
						};
						
					var html = "<div id='XAN_shadowboxPA' style='height: 600px; margin: 0px; color: #ffffff; background-color: #ffffff;'>"+
						"<table style='height: 600px; width: 800px; background-image: url(./_IMG/b_photoAlbum.jpg);'>"+
						"	<tr>"+
						"		<td>"+
						"			<div class='XAN_preview' style='width: 800px; height: 413px; border: 0px solid #ffffff; text-align: center;'>"+
						"				<img src='"+path.image(1)+"' style='height: 420px;' onclick='javascript: var n=window.open(this.src);'/>"+
						"			</div>"+
						"		</td>"+
						"	</tr>"+
						"	<tr>"+
						"		<td style='height: 150px;'>"+
						"			<div class='XAN_thumbnail' style='width: 800px; height: 150px; border: 0px solid #ffffff; margin: 5px 0px 0px 0px; overflow: auto;'>"+
						"				<table style='height: 120px;' border='0'><tr>";
					
					if( e[0][3].split("").length > 3 )
						for( var i=0; i< e[0][2]; i++ )
							html += "<td valign='middle' style='text-align: center; padding: 0px 5px 0px 5px;'>"+
								"<img src='"+path.thumb(i)+"' style='height: 80px; cursor: pointer;' onclick='javascript: $(\"#XAN_shadowboxPA DIV[class=XAN_preview] IMG\").attr({src: this.src.replace(\"small\", \"large\").replace(\"thumbnail\", \".\")});' />"+
								"</td>";
					else
						for( var i=1; i<= e[0][2]; i++ )
							html += "<td valign='middle' style='text-align: center; padding: 0px 5px 0px 5px;'>"+
								"<img src='"+path.thumb(i)+"' style='height: 80px; cursor: pointer;' onclick='javascript: $(\"#XAN_shadowboxPA DIV[class=XAN_preview] IMG\").attr({src: this.src.replace(\"small\", \"large\").replace(\"thumbnail\", \".\")});' />"+
								"</td>";
					
					html += "				</table>"+
						"			</div>"+
						"		</td>"+
						"	</tr>"+
						"</table>"+
						"</div>";
					
					Shadowbox.open({content: html, title: e[0][1], player: "html", width: "800", height: "600"});
				});
		});
	else {
		// custom photos
		var html = "<div id='XAN_shadowboxPA' style='height: 600px; margin: 0px; color: #ffffff; background-color: #ffffff;'>"+
				"<table style='height: 600px; width: 800px; background-image: url(./_IMG/b_photoAlbum.jpg);'>"+
				"	<tr>"+
				"		<td>"+
				"			<div class='XAN_preview' style='width: 800px; height: 413px; border: 0px solid #ffffff; text-align: center;'>"+
				"				<img src='"+ path+ "/"+ (startAt!= undefined? startAt: 1)+ ".jpg' style='height: 420px;' onclick='javascript: var n=window.open(this.src);'/>"+
				"			</div>"+
				"		</td>"+
				"	</tr>"+
				"	<tr>"+
				"		<td style='height: 150px;'>"+
				"			<div class='XAN_thumbnail' style='width: 800px; height: 150px; border: 0px solid #ffffff; margin: 5px 0px 0px 0px; overflow: auto;'>"+
				"				<table style='height: 120px;' border='0'><tr>";
		for( var i=(startAt!= undefined? startAt: 1); i<= no; i++ )
			html += "<td valign='middle' style='text-align: center; padding: 0px 5px 0px 5px;'>"+
				"<img src='"+ path+ "/thumbnail/"+ i+ ".jpg' style='height: 80px; cursor: pointer;' onclick='javascript: $(\"#XAN_shadowboxPA DIV[class=XAN_preview] IMG\").attr({src: this.src.replace(\"thumbnail\\\", \"\")});' />"+
				"</td>";
		html += "				</table>"+
			"			</div>"+
			"		</td>"+
			"	</tr>"+
			"</table>"+
			"</div>";
		
		Shadowbox.open({content: html, title: albumId, player: "html", width: "800", height: "600"});
	}
};

XAN.windowOpen = function(path, isReturn) {
	var n = window.open(path, "", "top=10, left=10, location=1, scrollbars=1");
	if( isReturn == true )
		return n;
};

// --- tree menu ----------------------------------------------------------------------------------
XAN.TREE = [
	["<img src='./_IMG/i_menu1_1.gif' />", function() { XAN.xrl("./main.htm"); }],
	["<img src='./_IMG/i_menu2_1.gif' />", [
		//["Custom", [				["admin", function() { XAN.xrl("./overview/adminInfo.htm"); }],				["general", function() { XAN.xrl("./overview/generalInfo.htm"); }],				["my school", function() { XAN.xrl("./overview/mySchool.htm"); }],				["quick info", function() { XAN.xrl("./overview/quickInfo.htm"); }],				["", function() { XAN.xrl("./overview/principal.htm"); }],				["", function() { XAN.xrl("./overview/principal.htm"); }]			]],
		["信念及使名", [
			["辦學宗旨", function() { XAN.xrl("./pageTemplate.php?p=./overview/objective.tmp"); }],
			["校訓", function() { XAN.xrl("./pageTemplate.php?p=./overview/aim.tmp"); }]
			//["教學信念", function() { XAN.xrl("./underConstruction.htm"); }]
		]],
		["學校歷史", function() { XAN.xrl("./pageTemplate.php?p=./overview/history.tmp"); }],
		["學校簡介", [
			["校歌", function() { XAN.xrl("./pageTemplate.php?p=./overview/song.tmp"); }],
			["校舍設施", function() { XAN.xrl("./overview/schoolInstallations.htm"); }]
		]],
		["團隊", [
			["架構圖", function() { XAN.xrl("./pageTemplate.php?p=./overview/structure.tmp"); }],
			["教師團隊", function() { XAN.xrl("./pageTemplate.php?p=./overview/staff.tmp"); }],
			["教師資歷統計", function() { XAN.xrl("./pageTemplate.php?p=./overview/teacherExperience.tmp"); }],
			["各班任教老師", function() { XAN.xrl("./pageTemplate.php?p=./overview/teachLesson.tmp"); }]
		]],
		["學校文件", function() { XAN.xrl("./pageTemplate.php?p=./overview/schoolDocuments.tmp"); }],
		["校訊", function() { XAN.xrl("./pageTemplate.php?p=./overview/periodicals.tmp"); }],
		["傳媒資料", function() { XAN.xrl("./pageTemplate.php?p=./overview/media.tmp"); }]
	]],
	["<img src='./_IMG/i_menu3_1.gif' />", [
		["校曆表", function() { XAN.xrl("./pageTemplate.php?p=./information/calendar.tmp"); }],
		["校服", function() { XAN.xrl("./pageTemplate.php?p=./information/uniform.tmp"); }],
		["校車", function() { XAN.xrl("./pageTemplate.php?p=./information/schoolBus.tmp"); }],
		["午膳", function() { XAN.xrl("./pageTemplate.php?p=./information/lunch.tmp"); }],
		["各班任教老師", function() { XAN.xrl("./pageTemplate.php?p=./overview/teachLesson.tmp"); }],
		["升中資訊", function() { window.open("../secondary/secondary.htm"); }],
		["通告", function() { XAN.xrl("./pageTemplate.php?p=./information/circular.tmp"); }],
		["功課簡稱", function() { XAN.xrl("./pageTemplate.php?p=./information/homeworkShort.tmp"); }],
		["特別安排", function() { XAN.xrl("./pageTemplate.php?p=./information/specialArrangement.tmp"); }]
	]],
	["<img src='./_IMG/i_menu4_1.gif' />", [
		["宗旨", function() { XAN.xrl("./pageTemplate.php?p=./teachAndLearn/aim.tmp"); }],
		["課程", [
			["中文科", function() { window.open("../subject/chinese/"); }, [
				["目標", function() { XAN.xrl("./subject/chinese/index.htm?p=aim"); }],
				["最新消息", function() { XAN.xrl("./subject/chinese/index.htm?p=news"); }],
				["評估", function() { XAN.xrl("./subject/chinese/index.htm?p=assessment"); }],
				["網頁連結", function() { XAN.xrl("./subject/chinese/index.htm?p=links"); }]
			]],
			["英文科", function() { window.open("../subject/english/"); }, [
				["目標", function() { XAN.xrl("./subject/english/index.htm?p=aim"); }],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["數學科", function() { window.open("../subject/mathematics/"); }, [
				["目標", function() { XAN.xrl("./subject/mathematics/index.htm?p=aim"); }],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["常識科", function() { window.open("../subject/generalStudies/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["音樂科", function() { window.open("../subject/music/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["視覺藝術科", function() { window.open("../subject/art/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["宗教科", function() { window.open("../subject/religion/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["體育科", function() { window.open("../subject/pe/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["普通話科", function() { window.open("../subject/mandarin/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]],
			["資訊科技科", function() { window.open("../subject/informationTechnology/"); }, [
				["目標", function() {}],
				["最新消息", function() {}],
				["評估", function() {}],
				["網頁連結", function() {}]
			]]
		]],
		["圖書館", function() { /*XAN.xrl("./teachAndLearn/library/"); return;*/ window.open("../library/library.htm"); }],
		//["公民教育", function() { XAN.xrl("./underConstruction.htm"); }],
		["評估", function() { XAN.xrl("./pageTemplate.php?p=./teachAndLearn/assessment.tmp"); }],
		["全方位學習", function() { window.open("../subject/omnibearing/0809/"); }],
		["資優課程", function() { window.open("../gifted_education/gifted_education.html"); }],
		["自學網頁", function() { XAN.xrl("./pageTemplate.php?p=./teachAndLearn/selfLearning.tmp"); }]
		//["專業分享", function() { XAN.xrl("./underConstruction.htm"); }]
	]],
	["<img src='./_IMG/i_menu5_1.gif' />", [
		["綜合體藝小組", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/extraCurricular.tmp"); }],
		["課後興趣班", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/extendedPrograms.tmp"); }],
		["校隊訓練", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/schoolTeam.tmp"); }],
		["服務團隊", [
			["領袖生", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/prefect/index.tmp"); return; window.open("../organization/prefect"); }],
			["升旗隊", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/flagTeam/index.tmp"); }],
			["童軍", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/scout/index.tmp"); }],
			["小女童軍", function() { window.open("../organization/girl_scouts"); return; XAN.xrl("./underConstruction.htm"); }],
			["關懷大使", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/careAmbassador/index.tmp"); }],
			["公民大使", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/citizenAmbassador/index.tmp"); }],
			["英語大使", function() { window.open("http://www.tkokt.edu.hk/ambassador/ambassador.htm"); return; }],
			["公益少年團", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/cyc/index.tmp"); return; window.open("../organization/cyc"); }],
			["基德電視台", function() { window.open("../organization/KTTVi"); return; XAN.xrl("./underConstruction.htm"); }],
			//["精靈加油站", function() { XAN.xrl("./underConstruction.htm"); }],
			["言語小導師", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/serviceTeam/languageGuide/index.tmp"); }]
		]],
		["獲獎項目", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/award.tmp"); }],
		["活動相片", function() { XAN.xrl("./pageTemplate.php?p=./media/photoAlbum1.tmp"); }],
		["升中表現", function() { XAN.xrl("./pageTemplate.php?p=./studentPerform/toSecondaryResult.tmp"); }]
	]],
	["<img src='./_IMG/i_menu6_1.gif' />", [
		["訓育組", [
			["訓導目的", function() { XAN.xrl("./pageTemplate.php?p=./guidance/discipline/aim.tmp"); }],
			["推行活動", function() { XAN.xrl("./pageTemplate.php?p=./guidance/discipline/news.tmp"); }],
			["優良積點計劃", function() { XAN.xrl("./pageTemplate.php?p=./guidance/discipline/goodConduct.tmp"); }]
			//["校規", function() { XAN.xrl("./underConstruction.htm"); }]
		]],
		["輔導組", [
			//["學生活動", function() { XAN.xrl("./underConstruction.htm"); }],
			//["家長活動及支援", function() { XAN.xrl("./underConstruction.htm"); }],
			["成長的天空", function() { XAN.xrl("./pageTemplate.php?p=./guidance/guidance/growingSky.tmp"); }]
		]],
		["升中支援", function() { window.open("../secondary/secondary.htm"); }],
		["小一支援", function() { window.open("../primary1/tko_p1.htm"); }],
		["學生支援", function() { XAN.xrl("./pageTemplate.php?p=./guidance/studentSupport.tmp"); }, [
			["宗旨", function() { XAN.xrl("./underConstruction.htm"); }]
		]],
		["午間活動", function() { XAN.xrl("./pageTemplate.php?p=./guidance/lunchActivity.tmp"); }]
		//["早禱及公訓", function() { XAN.xrl("./underConstruction.htm"); }]
	]],
	["<img src='./_IMG/i_menu7_1.gif' />", [
			["校友會報名", function() { XAN.xrl("./pageTemplate.php?p=./saa/applicationForm.tmp"); }],
			["校友成就", function() { XAN.xrl("./pageTemplate.php?p=./saa/letter.tmp"); }]
		], [
		["校友會", [
			["報名", function() { XAN.xrl("./pageTemplate.php?p=./saa/applicationForm.tmp"); }],
			["名單", function() { XAN.xrl("./underConstruction.htm"); }],
			["校友活動", function() { XAN.xrl("./underConstruction.htm"); }]
		]],
		["校友分享", function() { XAN.xrl("./underConstruction.htm"); }],
		["校友成就", function() { XAN.xrl("./underConstruction.htm"); }],
		["校友消息", function() { XAN.xrl("./underConstruction.htm"); }]
	]],
	["<img src='./_IMG/i_menu8_1.gif' />",/* function() { window.open("../PTA/"); },*/ [
		["宗旨", function() { XAN.xrl("./pta/index.htm?p=aim"); }],
		["會章", function() { XAN.xrl("./pta/index.htm?p=rules"); }],
		["委員會名單", function() { XAN.xrl("./pta/index.htm?p=structure"); }]
	]],
	["<img src='./_IMG/i_menu9_1.gif' />", 
		(function() {
			// internal test only
			if( $.jComponent.jUrl("nana") == "true" ) {
				return [
					["活動相片", function() { XAN.xrl("./pageTemplate.php?p=./media/photo.tmp"); }],
					["活動影片", function() { XAN.xrl("./pageTemplate01.php?p=./media/movie.tmp"); }], 
					["測試1", function() { XAN.news("n09013"); }],
					["測試2", function() { XAN.xrl("./pageTemplate.php?p=./saa/letter.tmp"); }]
				];
			}
			// public
			else
				return [
					["活動相片", function() { XAN.xrl("./pageTemplate.php?p=./media/photo.tmp"); }],
					["活動影片", function() { XAN.xrl("./pageTemplate01.php?p=./media/movie.tmp"); }]
				];
		})()
	]
];

