﻿//2010.11.23改寫
//雖然很長但是應該會比較容易新增或刪減資料
//目前排序是用 11px 所排
//用別的字級 對齊會跑掉

function unjsp_cprs(size, color, bgcolor, width) {
	//預設值
	var fontSize = "11";
	var fontColor = "#000000";
	var fontBackgroundColor = "#ffffff";
	var shitWidth = "390";
	
	
	if (size != undefined && ! isNaN(size)) {
		fontSize = size;
	}
	
	if (color != undefined && color.toString().length == 7) {
		fontColor = color;
	}
	
	if (bgcolor != undefined && bgcolor.toString().length == 7) {
		fontBackgroundColor = bgcolor;
	}
	
	if (width != undefined) {
		shitWidth = width;
	}
	
	//宣告四個資料陣列
	var locationArray = new Array();
	var addressArray = new Array();
	var phoneArray = new Array();
	var spaceArray = new Array();
	// id = 1
	locationArray.push("台北")
	addressArray.push("台北市開封街一段32號3樓");
	phoneArray.push("02-2331-5377");
	spaceArray.push(25);
	// id = 2
	locationArray.push("內湖");
	addressArray.push("台北市內湖區成功路三段141號3樓");
	phoneArray.push("02-5582-7590");
	spaceArray.push(11);
	// id = 2
	locationArray.push("景美");
	addressArray.push("台北市文山區羅斯福路六段234-1號5樓");
	phoneArray.push("02-5571-3131");
	spaceArray.push(4);
	// id = 4
	locationArray.push("三峽");
	addressArray.push("新北市三峽區國學街40號2樓");
	phoneArray.push("02-5578-8140");
	spaceArray.push(21);
	// id = 3
	locationArray.push("新莊");
	addressArray.push("新北市新莊區建興街9號1樓");
	phoneArray.push("02-5578-6558");
	spaceArray.push(23);
	// id = 5
	locationArray.push("淡水");
	addressArray.push("新北市淡水區博愛街51巷19之2號3樓");
	phoneArray.push("02-2625-7982");
	spaceArray.push(7);
	// id = 6
	locationArray.push("基隆");
	addressArray.push("基隆市愛二路33號2樓");
	phoneArray.push("02-2425-0691");
	spaceArray.push(33);
	// id = 7
	locationArray.push("宜蘭");
	addressArray.push("宜蘭市中山路二段145號二樓之1");
	phoneArray.push("03-931-4228");
	spaceArray.push(15);
	// id = 8
	locationArray.push("花蓮");
	addressArray.push("花蓮市中山路719號");
	phoneArray.push("03-856-8255");
	spaceArray.push(37);
	// id = 9
	locationArray.push("林口");
	addressArray.push("桃園縣龜山鄉復興一路128-2號3樓");
	phoneArray.push("03-318-5288");
	spaceArray.push(12);
	// id = 10
	locationArray.push("桃園");
	addressArray.push("桃園市復興路180號4樓");
	phoneArray.push("03-337-1118");
	spaceArray.push(31);
	// id = 11
	locationArray.push("中壢");
	addressArray.push("中壢市新興路102巷9號6樓");
	phoneArray.push("03-468-1028");
	spaceArray.push(25);
	// id = 12
	locationArray.push("中央");
	addressArray.push("中壢市五權里2鄰五興路329號");
	phoneArray.push("03-420-6169");
	spaceArray.push(19);
	// id = 13
	locationArray.push("新竹");
	addressArray.push("新竹市民族路31號9樓");
	phoneArray.push("03-523-8442");
	spaceArray.push(33);
	// id = 14
	locationArray.push("苗栗");
	addressArray.push("苗栗市為公路8號3樓");
	phoneArray.push("037-273-223");
	spaceArray.push(35);
	// id = 15
	locationArray.push("台中");
	addressArray.push("台中市中山路26號4樓");
	phoneArray.push("04-2229-0445");
	spaceArray.push(33);
	// id = 16
	locationArray.push("逢甲");
	addressArray.push("台中市河南路二段319號2樓");
	phoneArray.push("04-2452-3305");
	spaceArray.push(23);
	// id = 17
	locationArray.push("東海");
	addressArray.push("台中市龍井區中港路7-62號1樓");
	phoneArray.push("04-2632-6812");
	spaceArray.push(17);
	// id = 18
	locationArray.push("員林");
	addressArray.push("彰化縣員林鎮新生路252號");
	phoneArray.push("04-8322100");
	spaceArray.push(25);
	// id = 19
	locationArray.push("彰化");
	addressArray.push("彰化市中正路二段79號");
	phoneArray.push("04-723-9550");
	spaceArray.push(31);
	// id = 20
	locationArray.push("斗六");
	addressArray.push("斗六市民生路170號2樓");
	phoneArray.push("05-535-0071");
	spaceArray.push(31);
	// id = 21
	locationArray.push("虎尾");
	addressArray.push("雲林縣虎尾鎮林森路2段268號");
	phoneArray.push("05-6325477");
	spaceArray.push(19);
	// id = 22
	locationArray.push("嘉義");
	addressArray.push("嘉義市北榮街219號");
	phoneArray.push("05-229-0125");
	spaceArray.push(37);
	// id = 22
	locationArray.push("民雄");
	addressArray.push("嘉義縣民雄鄉大學路一段439號");
	phoneArray.push("05-300-8186");
	spaceArray.push(17);
	// id = 23
	locationArray.push("台南");
	addressArray.push("台南市成功路77號1樓");
	phoneArray.push("06-225-3462");
	spaceArray.push(33);
	// id = 24
	locationArray.push("仁德");
	addressArray.push("台南市仁德區中正路一段209號3樓");
	phoneArray.push("06-266-3595");
	spaceArray.push(11);
	// id = 25
	locationArray.push("高雄");
	addressArray.push("高雄市中山一路308號6樓");
	phoneArray.push("07-235-5618");
	spaceArray.push(27);
	// id = 26
	locationArray.push("高大");
	addressArray.push("高雄市楠梓區大學七街336號");
	phoneArray.push("07-958-1636");
	spaceArray.push(22);
	// id = 27
	locationArray.push("楠梓");
	addressArray.push("高雄市楠梓區建楠路236號5樓");
	phoneArray.push("07-3558783");
	spaceArray.push(19);
	// id = 28
	locationArray.push("屏東");
	addressArray.push("屏東縣屏東市中正路123號6樓之1");
	phoneArray.push("08-765-2590");
	spaceArray.push(13);
	
	var num = locationArray.length;
	var shitOptions = "";
	for (i = 0; i < num; i++) {
		var spaceNumber = spaceArray[i];
		var spaceString = "";
		for (j = 0; j < spaceNumber; j++) {
			spaceString += "&nbsp;";
		}
		shitOptions += "<option>" + locationArray[i] + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + addressArray[i] + spaceString + "TEL : " + phoneArray[i] + "</option>";
	}
	
	var selectHead = "<select name='shitSelect' class='shitClass'>" +
	"<option selected>" + "---------------------------" + "全 國 數 位 學 堂 服 務" + "---------------------------" + "</option>";
	
	var selectEnd = "</select>";
	
	
	//所有css樣式表
	var shitAllClass = 
	"<style type='text/css'>" +
	//以下為整體區塊使用css
	"img {" +
		"border:none;" +
	"}" +
	
	//以下為option專用css
	".shitClass {" +
		"margin: 0px;" +
		"font-family: Arial, Helvetica, sans-serif, 新細明體, 細明體;" +
		"font-size:" + fontSize + "px;" +
		"color:" + fontColor + ";" +
		"background:" + fontBackgroundColor + ";" +
		"width:" + shitWidth + "px;" +
	"}" +
	
	//以下為整個內容css
	".shitTable .slogan {" +
		"font-size:11px;" +
		"text-align:left;" +
		"margin:5px auto;" +
		"color:#CC0000;" +
	"}" +
	
	".shitTable .slogan span {" +
		"color:#1c5ba6;" +
	"}" +
	
	".shitTable .detail {" +
		"font-size:11px;" +
		"font-family: Arial, Helvetica, sans-serif, 新細明體, 細明體;" +
		"text-align:left;" +
		"margin:10px 5px 0px 5px;" +
	"}" +
	
	".shitTable .detail span {" +
		"color:#CC0000;" +
	"}" +
	
	".shitTable .detail a {" +
		"color:#1c5ba6;" +
		"text-decoration:none;" +
	"}" +
	
	".shitTable .feedback {" +
		"font-size:11px;" +
		"text-align:left;" +
		"vertical-align:top;" +
		"padding:0px 5px;" +
		"color:#666666;" +
	"}" +
	
	".shitTable .feedback span {" +
		"color:#CC0000;" +
	"}" +
	
	".shitTable .feedback a {" +
		"text-decoration:none;" +
	"}" +
	
	"</style>";
	
	
	//表格上半部資料
	var shitTableTop = 
	"<table width='790' height='170' border='0' cellspacing='0' cellpadding='0' class='shitTable'>" +
		"<tr>" +
			"<td align='center' valign='top' background='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/bg_footer.gif'>" +
				"<table style='margin:5px 3px 0px 5px;' border='0' cellspacing='0' cellpadding='0'>" +
					"<tr>" +
						"<td width='213' height='110' align='right' valign='middle'><img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/logo_tkb.gif' border='0' usemap='#MapLogo'></td>" +
						"<td width='162' align='center' valign='top'>" +
							"<table width='155' height='110' border='0' cellspacing='0' cellpadding='0'>" +
								"<tr>" +
									"<td valign='middle'><a href='http://byone.tkb.com.tw' target='_blank'><img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/logo_byone.gif'></a></td>" +
								"</tr>" +
								"<tr>" +
									"<td valign='middle'><a href='http://www.daso.com.tw' target='_blank'><img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/logo_daso.gif'></a></td>" +
								"</tr>" +
							"</table>" +
						"</td>" +
						"<td align='center' valign='top'>" +
							"<div class='slogan'>" +
								"【&nbsp;TKB數位學堂禮聘<span>大碩/碩士</span>研究所及<span>百官網</span>高普特考名師專拍數位內容課程&nbsp;】" +
							"</div>" +
	"";
	
	//表格下半部資料
	var shitTableBottom = 
							"<div class='detail'><img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/icon_sqaure.gif'>&nbsp;" +
								"<a href='http://byone.tkb.com.tw' target='_blank'>百官網</a>公職專線：(02)5581-8939&nbsp;&nbsp;&nbsp;&nbsp;<img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/icon_sqaure.gif'>&nbsp;<a href='http://ebook.tkb.com.tw' target='_blank'>TKB函授</a>服務專線：(02)5582-4957<br>" +
								"<a href='http://www.tkblearning.com.tw' target='_blank'><span>TKB數位學堂</span></a>學習場次，依季節性做彈性調整，不便之處，敬請見諒！<br>" +
								"<a href='http://www.tkblearning.com.tw' target='_blank'><span>TKB數位學堂</span></a>課程皆採章節隨選(非光碟片)" +
								"，可任意選擇單元上課，絕對來得及幫您趕考。" +
							"</div>" +
						"</td>" +
					"</tr>" +
					"<tr>" +
						"<td colspan='3' class='feedback'>" +
						"<img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/icon_sqaure.gif'>&nbsp;<a href='http://www.tkblearning.com.tw' target='_blank'><span>TKB數位學堂</span></a>為回饋社會，凡清寒(領有縣市政府低收入戶證明書)、殘障(中度以上)學子，一律五折優惠(代理課程及函授產品除外)，我們真心希望清寒子弟也能享有同齡學子的夢想！<br>" +
						"<img src='http://www.tkblearning.com.tw/Index/unjsp_cprs/images/icon_sqaure.gif'>&nbsp;本網頁內容為臺灣知識庫著作權所有，抄襲必究‧建議您使用IE5.5以上版本，解析度 1024x768 Hi-color</td>" +
					"</tr>" +
				"</table>" +
			"</td>" +
		"</tr>" +
	"</table>" +
	
	"<map name='MapLogo'>" +
		"<area shape='rect' coords='2,0,61,70' href='http://www.tkb.com.tw' target='_blank'>" +
		"<area shape='rect' coords='63,1,209,70' href='http://www.tkblearning.com.tw' target='_blank'>" +
	"</map>" +
	"";
	
	
	document.write(shitAllClass);
	document.write(shitTableTop + selectHead + shitOptions + selectEnd + shitTableBottom);
}
