//var pop1, pop2, pop3, pop4, pop5, pop6, pop7, pop8, pop9, pop10;
//var pop11, pop12, pop13, pop14, pop15, pop16, pop17, pop18, pop19, pop20;
//var pop21, pop22, pop23, pop24, pop25, pop26, pop27, pop28, pop29, pop30;
//var pop31, pop32, pop33, pop34, pop35, pop36, pop37, pop38, pop39, pop40;

var pops = new Array();
var pic_path;
function popupImage(n, t, o) {
  this.num = n;
  this.fsrc = "../graphics/collection/"+ pic_path +"/" + n + ".jpg";
  this.fname = "../graphics/collection/"+ pic_path +"/" + n + "big.jpg";
  this.title = t;
  this.orientation = o;
}

if (location.href.toString().search("popup")!=-1){
	var PagePath=opener.location.toString();
}else{
	var PagePath=document.location.toString();
}

PagePath=PagePath.substring(PagePath.lastIndexOf("/")+1,PagePath.length-4);

//Check Lang Ver.
if (location.href.toString().search("/en/")!=-1){
	var langno="en";
}else{
	var langno="tc";
}



if (PagePath=="collection_1"){
pic_path="collection_1"

if (langno=="en"){
//Eng Version
	pops[1] = new popupImage ("1", "Graphitic schist", "L");
	pops[2] = new popupImage ("2", "Sandstone", "L");
	pops[3] = new popupImage ("1d", "Red conglomerate", "L");
	pops[4] = new popupImage ("3", "Pebbly sandstone", "L");
	pops[5] = new popupImage ("1e", "Siltstone", "L");
	pops[6] = new popupImage ("4", "Ripple marks", "L");
//	pops[7] = new popupImage ("1b", "Bothriolepis sp", "L");
//	pops[8] = new popupImage ("1c", "Coroniceras cf. subrotiforme", "L");
//	pops[9] = new popupImage ("1a", "Oolithes spheroides", "L");
	pops[7] = new popupImage ("5", "Fan shells in various colours", "L");
	pops[8] = new popupImage ("6", "Thorny oyster", "L");
	pops[9] = new popupImage ("1j", "Silver Pheasant", "P");
	pops[10] = new popupImage ("1f", "South China Tiger", "P");
	pops[11] = new popupImage ("1g", "Asiatic Black Bear", "P");
	pops[12] = new popupImage ("1h", "Burmese Python", "P");
	pops[13] = new popupImage ("1i", "A model of a rich and varied butterfly community", "L");
}else{
//Chi Version

pops[1] = new popupImage ("1", "石墨片岩", "L");
pops[2] = new popupImage ("2", "砂岩", "L");
pops[3] = new popupImage ("1d", "礫岩", "L");
pops[4] = new popupImage ("3", "卵石砂岩", "L");
pops[5] = new popupImage ("1e", "粉砂岩。", "L");
pops[6] = new popupImage ("4", "波痕", "L");
//pops[7] = new popupImage ("1b", "溝鱗魚", "L");
//pops[8] = new popupImage ("1c", "亞輪狀花冠菊石", "L");
//pops[9] = new popupImage ("1a", "短圓形恐龍蛋", "L");
pops[7] = new popupImage ("5", "顏色多樣的扇貝", "L");
pops[8] = new popupImage ("6", "海菊蛤", "L");
pops[9] = new popupImage ("1j", "白鷴", "P");
pops[10] = new popupImage ("1f", "華南虎", "P");
pops[11] = new popupImage ("1g", "亞洲黑熊", "P");
pops[12] = new popupImage ("1h", "蟒蛇", "P");
pops[13] = new popupImage ("1i", "一個豐富而多姿多采的蝴蝶世界模型", "L");



}


}
if (PagePath=="collection_2"){
pic_path="collection_2"

if (langno=="en"){
//Eng Version
pops[1] = new popupImage (1, "Stone spearheads", "", "Neolithic period", "Excavated from Sham Wan, Lamma Island", "");
pops[2] = new popupImage (2, "Stone arrowheads", "", "Neolithic period", "Excavated from Sham Wan, Lamma Island", "");
pops[3] = new popupImage (3, "Ring-grinding stone tool", "", "Neolithic period", "Excavated from Chung Hom Wan, Hong Kong Island", "");
pops[4] = new popupImage (4, "Double-shouldered stone adze", "", "Neolithic period", "Excavated from Chung Hom Wan, Hong Kong Island", "");
pops[5] = new popupImage (5, "Stone beater", "", "Bronze period", "Excavated from Man Kok Tsui, Lantau Island", "");
pops[6] = new popupImage (6, "Grooved whetstone", "", "Bronze period", "Excavated from Man Kok Tsui, Lantau Island", "");
pops[7] = new popupImage (7, "Stone ge halberd head", "", "Neolithic period", "Excavated from Sha Chau, off Tuen Mun", "");
pops[8] = new popupImage (8, "Tooth ornament", "", "Neolithic period", "Excavated from Sham Wan, Lamma Island", "");
pops[9] = new popupImage (9, "Bone ornament", "P", "Neolithic period", "Excavated from Sham Wan, Lamma Island", "");
pops[10] = new popupImage (10, "Painted pottery basin with incised design and perforated footring", "", "Neolithic period", "Excavated from Chung Hom Wan, Hong Kong Island", "");
pops[11] = new popupImage (11, "Hard pottery urn with string-on-net design", "", "Bronze period", "Excavated from Man Kok Tsui, Lantau Island", "");
pops[12] = new popupImage (12, "Coarse pottery fu cauldron with cord and incised wavy line design", "", "Neolithic period", "Excavated from Sham Wan, Lamma Island", "");
pops[13] = new popupImage (13, "Hard pottery pot with dot, lozenge and net design", "", "Bronze period", "Excavated from Yung Shue Wan, Lamma Island", "");
pops[14] = new popupImage (14, "Hard pottery two-lug gui food container with footring and string-on-net design", "", "Bronze period", "Excavated from Man Kok Tsui, Lantau Island", "");
pops[15] = new popupImage (15, "Hard pottery gui food container with handle, footring and string-on-net design", "", "Bronze period", "Excavated from Man Kok Tsui, Lantau Island", "");
pops[16] = new popupImage (16, "Pottery spindle whorls", "", "Bronze period", "Excavated from Man Kok Tsui, Lantau Island", "");
pops[17] = new popupImage (17, "Pottery animals", "", "Bronze period", "Excavated from Man Kok Tsui and Hai Tei Wan of Lantau Island", "");
pops[18] = new popupImage (18, "Hard pottery dou stem cup", "", "Bronze period", "Excavated from Tai Wan, Lamma Island", "Father Finn Collection", "");
pops[19] = new popupImage (19, "Hard pottery pot with union - jack design", "", "Bronze period", "Father Maglioni Collection", "");
pops[20] = new popupImage (20, "Pottery four-lug pot with seal-on-net design", "", "Han dynasty (206BC - AD220)", "Father Maglioni Collection", "");
pops[21] = new popupImage (21, "Bronze dagger with human mask design and bow-shaped guard", "P", "Bronze period", "Collected from Shek Pik, Lantau Island", "");
pops[22] = new popupImage (22, "Bronze arrowheads", "", "Bronze period", "Excavated from Sham Wan, Lamma Island", "");
pops[23] = new popupImage (23, "Bronze fishing hooks", "", "Bronze period", "Excavated from Sham Wan, Lamma Island", "");
pops[24] = new popupImage (24, "Bronze spearhead ", "", "Bronze period", "Excavated from Tai Wan, Lamma Island", "Father Finn Collection", "");
pops[25] = new popupImage (25, "Pottery five-lug pot and bowl in celadon glaze", "", "Southern and Northern dynasties (AD420-589)", "Excavated from Sham Wan, Lamma Island", "");
pops[26] = new popupImage (26, "Pottery funerary jar ", "P", "Tang dynasty (AD618-907)", "Excavated from Shek Kong, Yuen Long", "");
pops[27] = new popupImage (27, "Pottery stand with perforations and lotus petal design ", "", "Tang dynasty (AD618-907)", "Excavated from Shek Kong, Yuen Long", "");
pops[28] = new popupImage (28, "Glass beads and agate beads", "", "Ming dynasty (AD1368-1644)", "Excavated from Sha Tsui, Sai Kung", "");
pops[29] = new popupImage (29, "Blue-and-white dish with grass and leaf design", "", "Qing dynasty (AD1644-1911)", "Collected from Wun Yiu Kiln, Tai Po", "");
pops[30] = new popupImage (30, "Oil lamp stand", "", "Qing dynasty (AD1644-1911)", "Collected from Wun Yiu Kiln, Tai Po", "");
//pops[31] = new popupImage (31, "Shiyishuishan (fief and revenue) Boundary Stone of the Li Family", "Song dynasty (AD960-1279)", "Man Kok Tsui, Lantau Island", "", "");
//pops[32] = new popupImage (32, "Stone tablet of Fat Tau Chau Customs Station", "Qing dynasty (AD1644-1911)", "Fat Tau Chau, Sai Kung", "", "This stone tablet was found on Fat Tau Chau. The big characters down the middle translate as "Foster benevolence over Indo-China; tributes and taxes circulate from afar", while the smaller ones down the left denote "Renovated by the Duty Officer of the Customs Station". This tablet was probably the second line of a gatepost couplet.");
}else{
//Chi Version

pops[1] = new popupImage (1, "石矛頭", "L", "新石器時代", "南丫島深灣遺址出土", "");
pops[2] = new popupImage (2, "石箭鏃", "L", "新石器時代", "南丫島深灣遺址出土", "");
pops[3] = new popupImage (3, "環砥石", "L", "新石器時代", "港島舂坎灣遺址出土", "");
pops[4] = new popupImage (4, "雙肩石錛", "L", "新石器時代", "港島舂坎灣遺址出土", "");
pops[5] = new popupImage (5, "石拍", "L", "青銅時代", "大嶼山萬角咀出土", "");
pops[6] = new popupImage (6, "有槽礪石", "L", "青銅時代", "大嶼山萬角咀出土", "");
pops[7] = new popupImage (7, "石戈", "L", "新石器時代", "屯門沙洲出土", "");
pops[8] = new popupImage (8, "牙飾", "L", "新石器時代", "南丫島深灣遺址出土", "");
pops[9] = new popupImage (9, "骨飾", "P", "新石器時代", "南丫島深灣遺址出土", "");
pops[10] = new popupImage (10, "刻劃紋鏤孔圈足彩陶盤", "L", "新石器時代", "港島舂坎灣遺址出土", "");
pops[11] = new popupImage (11, "弦線網格紋陶甕", "L", "青銅時代", "大嶼山萬角咀遺址出土", "");
pops[12] = new popupImage (12, "繩紋刻劃波浪紋夾砂陶釜", "L", "新石器時代", "南丫島深灣遺址出土", "");
pops[13] = new popupImage (13, "篦點菱格網格紋硬陶罐", "L", "青銅時代", "南丫島榕樹灣遺址出土", "");
pops[14] = new popupImage (14, "弦線方格紋雙繫圈足硬陶簋", "L", "青銅時代", "大嶼山萬角咀遺址出土", "");
pops[15] = new popupImage (15, "弦線網格紋雙繫把手圈足硬陶簋", "L", "青銅時代", "大嶼山萬角咀遺址出土", "");
pops[16] = new popupImage (16, "陶紡輪", "L", "青銅時代", "大嶼山萬角咀遺址出土", "");
pops[17] = new popupImage (17, "陶動物", "L", "青銅時代", "大嶼山萬角咀、蟹地灣遺址出土", "");
pops[18] = new popupImage (18, "硬陶豆", "L", "青銅時代", "南丫島大灣遺址出土", "芬神父藏品", "");
pops[19] = new popupImage (19, "米字紋硬陶罐", "L", "青銅時代", "麥神父藏品", "");
pops[20] = new popupImage (20, "戳印網格紋四繫硬陶罐", "L", "漢代<公元前206至公元220年>", "麥神父藏品", "");
pops[21] = new popupImage (21, "人面弓形格青銅匕首", "P", "青銅時代", "大嶼山石壁採集", "");
pops[22] = new popupImage (22, "青銅箭鏃", "L", "青銅時代", "南丫島深灣遺址出土", "");
pops[23] = new popupImage (23, "青銅魚", "L", "青銅時代", "南丫島深灣遺址出土", "");
pops[24] = new popupImage (24, "青銅矛頭", "L", "青銅時代", "南丫島大灣遺址出土", "芬神父藏品");
pops[25] = new popupImage (25, "五繫青瓷罐連碗", "L", "南北朝<公元420–589年>", "南丫島深灣遺址出土", "");
pops[26] = new popupImage (26, "陶罈", "P", "唐代<公元618–907年>", "元朗石崗遺址出土", "");
pops[27] = new popupImage (27, "鏤孔蓮花瓣陶器座", "L", "唐代<公元618–907年>", "元朗石崗遺址出土", "");
pops[28] = new popupImage (28, "玻璃珠及瑪瑙珠", "L", "明代<公元1368–1644年>", "西貢沙咀遺址出土", "");
pops[29] = new popupImage (29, "草葉紋青花瓷碟", "L", "清代<公元1644–1911年>", "大埔碗窯遺址採集", "");
pops[30] = new popupImage (30, "油燈座", "L", "清代<公元1644–1911年>", "大埔碗窯遺址採集", "");
//pops[31] = new popupImage (31, "李府“食邑稅山”界石", "宋代<公元960–1279年>", "大嶼山萬角咀", "", "L");
//pops[32] = new popupImage (32, "佛頭洲稅關石碑", "清代<公元1644–1911年>", "西貢佛頭洲", "", "這塊石碑是在佛頭洲發現，中間刻有“德懷交 趾國貢賦遙通”九個大字，左旁有小字“稅廠值理重修”，估計可能是門聯的下聯。");

}


}

if (PagePath=="collection_3"){
pic_path="collection_3"

if (langno=="en"){
//Eng Version
pops[1] = new popupImage (1, "Rabbitfish trap.", "L");
pops[2] = new popupImage (2, "Beaded bands worn by a woman Boat Dweller.", "L");
pops[3] = new popupImage (3, "A liangmao (\"cool hat\") worn by Hakka women when working in the fields.", "L");
pops[4] = new popupImage (4, "Bridal stand with basin.", "P");
pops[5] = new popupImage (7, "Hoklo child's necklace with enamel lock in the shape of a butterfly.", "L");
pops[6] = new popupImage (9, "Bridal sedan chair.", "L");
pops[7] = new popupImage (10, "A shusi (partly threaded)-style wedding costume worn by a bride, comprising a jacket and a skirt, both  embroidered with the \"dragon-and-phoenix\" motif.", "P");
pops[8] = new popupImage (11, "A silver tripod presented by a group of guests to the bride and groom for their wedding, 1930s.", "P");
pops[9] = new popupImage (12, "Cantonese opera performer's dressing table converted from a costume trunk.", "L");
pops[10] = new popupImage (15, "Glove puppet character: Wusheng (male warrior).", "P");
pops[11] = new popupImage (16, "Rod puppet character: Wusheng (male scholar).", "P");
pops[12] = new popupImage (18, "Wooden cake moulds of various patterns.", "L");
pops[13] = new popupImage (19, "Dish with grass patterns and a Chinese character fu (happiness) at the center in underglaze blue.", "L");
pops[14] = new popupImage (20, "Yueqin (four-stringed plucked instrument with full moon-shaped sound box).", "P");
}else{
//Chi Version

pops[1] = new popupImage (1, "泥岒 ", "L");
pops[2] = new popupImage (2, "水上人婦女所編的珠帶", "L");
pops[3] = new popupImage (3, "客家婦女在田間工作時所穿的 \"涼帽\"。", "L");
pops[4] = new popupImage (4, "嫁妝面盆架連洗面盆", "P");
pops[5] = new popupImage (7, "福佬兒童佩帶的琺瑯蝴蝶鎖連鍊", "L");
pops[6] = new popupImage (9, "大紅花轎", "L");
pops[7] = new popupImage (10, "新娘所穿彩線繡龍鳳圖案 \"疏絲\" 裙褂", "P");
pops[8] = new popupImage (11, "傳統婚宴上客人送出的銀鼎賀禮，1930年代。", "P");
pops[9] = new popupImage (12, "粵劇演員裝身箱", "L");
pops[10] = new popupImage (15, "掌中木偶：武生", "P");
pops[11] = new popupImage (16, "杖頭木偶：小生", "P");
pops[12] = new popupImage (18, "各式木製餅模", "L");
pops[13] = new popupImage (19, "福字草葉紋青花碟", "L");
pops[14] = new popupImage (20, "月琴", "P");
}


}

if (PagePath=="collection_4"){
pic_path="collection_4"

if (langno=="en"){
//Eng Version
pops[1] = new popupImage (1, "Interior of the Shing Chai Tong Herbal Medicine Shop established in 1885 in Hong Kong. It was originally located at 180 Queen's Road Central.\n\rShing Chai Tong was formerly located at 180 Queen's Road Central. It was one of the first Chinese herbal medicine shops in Hong Kong. Before starting his business in Hong Kong in 1885, Mr. Tang Sek-kwan had a sizable herbal medicine shop in Guangzhou. Mr. Tang maintained good relationship with the government officials in Guangzhou and that explains the reason for having five plagues given by the Chinese officials in shop. The furniture and fittings of more than hundred years of age were acquired by the Museum in 1980 when the shop closed for urban redevelopment. Our Museum dismantled the entire shop and had it reconstructed in this gallery according to its original layout.\n\rRunning most of the length of the store is a counter made of solid wood, called the \"Long Dragon\". The head of the counter where money was collected was called the \"Precious Dragon Head\". Behind this part of the counter sat the chief shopkeeper. The far end is the \"Dragon Tail\", on which always stood a brass mortar. Every morning a simple ritual known as \"Prospering the Dragon\" was performed to commence the day. The chief shopkeeper behind the counter head would take up his abacus and shook it to make some sound. This was echoed by the stamping sound of a pestle against the mortar on the far end of the counter, done by his deputy. This ritual was meant to evoke a prosperous business. As for religious beliefs, people working in Chinese medicine shops worship \"Yaowang\" as the patron god of Chinese Medicine. The birthday festival of \"Yaowang\" was a time of celebration for everyone in the shops. \"Patszikui\" (a cabinet of 100 children), which usually has 100 small drawers, is used in a traditional Chinese medicine shop to store various herbal medicine. A serial of drawer from bottom to top, would be pulled out and stepped by the counter staff to reach the medicine kept near the top.", "P");
pops[2] = new popupImage (2, "The price list for mooncakes of Tim Nam Lau Teahouse, 1937.", "L");
pops[3] = new popupImage (3, "Signboard of the Rice Merchants' Association of Hong Kong.", "P");
//pops[4] = new popupImage (4, "A block of 12 Hong Kong Jubilee commemorative stamps, 1891 (22 January)", "L");
pops[4] = new popupImage (4, "Calendar poster of A.S. Watson & Co.Ltd., 1914.", "P");
pops[5] = new popupImage (5, "Gramophone, 1930s.", "P");
pops[6] = new popupImage (6, "Timetable of Kowloon-Canton Railway, 1912.", "P");
pops[7] = new popupImage (7, "Trademark plaque of Leung So Kee Umbrella Factory", "P");
pops[8] = new popupImage (8, "Cast glass domestic oil lamp, 1950s.", "P");
pops[9] = new popupImage (9, "Copper plate for printing shares certificates of the Taikoo Dockyard & Engineering Co. (HK) Ltd., early 20th century.", "L");
pops[10] = new popupImage (10, "Alarm clock made by Chiap Hua Clock & Watches Ltd., winner in the 1961 design competition of Chinese Manufacturers' Association.", "P");
pops[11] = new popupImage (11, "Jumbo toothbrush made by Star Industrial Co., Ltd. for Hong Kong Industrial Products Exhibition, 1960s.", "L");
pops[12] = new popupImage (12, "Enamelled food carrier made by I-Feng Enamelling Co. (HK) Ltd., 1930s.", "L");
pops[13] = new popupImage (13, "Thermal food container of \"Camel\" brand, 1960s.", "P");
pops[14] = new popupImage (14, "The movie poster for \"The Kingdom and the Beauty\". This film won the Best Picture of the Year Award in the Asia Movie Festival, 1959.", "P");
pops[15] = new popupImage (15, "The Chair of the President of the Legislative Council in the British era.", "P");
pops[16] = new popupImage (16, "The Public Seal for sealing all ordinances, proclamations and other important documents bearing the Governor's signature.", "P");
pops[17] = new popupImage (17, "Chair used by the representatives of the Chinese & British governments during the Handover Ceremony.", "P");
pops[18] = new popupImage (18, "Sewing table with ivory accessories", "P");
pops[19] = new popupImage (19, "Map of the Sun On (Xinan) County", "L");
}else{
//Chi Version

pops[1] = new popupImage (1, "誠濟堂的內部陳設\n\r一八八五年於香港創立，原址在皇后大道中180迭C\n\r誠濟堂原舖位於中環皇后道中180號, 是唐石昆先生在1885創立。是本港歷史最悠久的中藥行之一。唐氏曾在廣州開設極具規模的中藥行，與當時的中國官員交往密切，現時掛於店內的其中五塊牌匾便是清代官員所送贈。1980年藥材舖因社區重建而結業，其店主將藥行內具有百多年歷史的傢具、裝飾和器物轉讓給本館。現把這間古色古香的藥材店復原於此，以供觀賞。\n\r店內的櫃檯用柚木製成，櫃頭稱之為 「寶龍頭」，所謂 「寶龍頭」意指招財進寶的頭部，是龍頭所在地，故坐此位置的掌櫃稱之為 「頭櫃」。櫃頭以下的一條長長的櫃檯，稱為 「長龍」；最末的部分稱為 「龍尾」，在此部分照例放一個銅舂坎。早上開舖的時候，坐在頭櫃的當櫃拿起算盤向上搖動悉悉有聲；接著是二櫃在 「龍尾」處，拿起銅舂柱向銅舂坎內敲打幾下，打得噹噹有聲，這動作稱為 「旺龍」，意思是一開門就旺財旺相。一般中藥行都信奉有「藥王」稱號的「神農氏」，在每年的「藥王誕」，店內上下都會慶祝一番。傳統的中藥店會將各種藥材分別存放在約有百多個小抽屜的「百子櫃」內。因「百子櫃」體形龐大，藥店職員若要拿取存放在高層抽屜內的藥材時，需先抽出較下層的抽屜作為梯子，然後步履輕盈地爬到櫃頂取藥。", "P");
pops[2] = new popupImage (2, "1937年添男樓月餅價目表", "L");
pops[3] = new popupImage (3, "香港米行商會的告示牌", "P");
//pops[4] = new popupImage (4, "1891年（1月22日）發行「香港開埠五十週年」紀念郵票十二方連", "L");
pops[4] = new popupImage (4, "屈臣氏大藥房於1914年印製的年曆海報", "P");
pops[5] = new popupImage (5, "1930年代唱機", "P");
pops[6] = new popupImage (6, "1912年九廣鐵路的行車時間表", "P");
pops[7] = new popupImage (7, "香港梁蘇記遮廠的商標匾額", "P");
pops[8] = new popupImage (8, "1950年代家居使用的玻璃油燈", "P");
pops[9] = new popupImage (9, "二十世紀初香港太古船塢印製股票證書的銅板", "L");
pops[10] = new popupImage (10, "捷和鐘表有限公司生產的鬧鐘，在1961年中華廠商會設計比賽中獲勝。", "P");
pops[11] = new popupImage (11, "1960年代星光實業有限公司特為工展會製造的巨型牙刷", "L");
pops[12] = new popupImage (12, "1930年代香港益豐搪瓷廠有限公司製造的食盒", "L");
pops[13] = new popupImage (13, "1960年代的\"駱駝牌\"嬰兒給食器", "P");
pops[14] = new popupImage (14, "1959年\"江山美人\"電影海報，這部電影曾於1959年獲亞洲影展最佳影片獎。", "P");
pops[15] = new popupImage (15, "英治時期立法局主席座椅", "P");
pops[16] = new popupImage (16, "用於蓋在所有條例、公告和具總督簽署的重要文件的政府紋章。", "P");
pops[17] = new popupImage (17, "「香港交接儀式」中方和英方代表在台上所用的坐椅", "P");
pops[18] = new popupImage (18, "縫紉台內有象牙配件", "P");
pops[19] = new popupImage (19, "1868年新安縣全圖", "L");

}


}

if (PagePath=="collection_5"){
pic_path="collection_5"

if (langno=="en"){
//Eng Version
pops[1] = new popupImage (1, "Pottinger Street, Central District, Hong Kong Island, c. 1905-1910", "P");
pops[2] = new popupImage (2, "Praya after the completion of the Reclamation in 1873, it would later be renamed Des Voeux Road, c. 1878-1880.", "L");
pops[3] = new popupImage (3, "Chinese lady in a costume of Qing period, pre-1912.", "P");
pops[4] = new popupImage (4, "Kowloon-Canton Railway, Tsim Sha Tsui, Kowloon, terminus and clock tower were just completed, c. 1916.", "L");
pops[5] = new popupImage (5, "Race Course, Happy Valley, Hong Kong Island, 1873. Wong Nai Chung Village is visible at the far end of the Valley.", "L");
pops[6] = new popupImage (6, "Hong Kong waterfront, Central District, Hong Kong Island, c.1938. The magnificent new Hongkong & Shanghai Bank could be seen (completed in 1935).", "L");
pops[7] = new popupImage (7, "Hong Kong's first City Hall, Central District, Hong Kong Island, c.1875.", "L");
pops[8] = new popupImage (8, "Pedder Street and the Clock Tower, Central District, Hong Kong Island, c.1870s.", "L");
pops[9] = new popupImage (9, "Queen's Road West, Sai Ying Pun, Hong Kong Island, c.1910.", "L");
pops[10] = new popupImage (10, "Peak Tram Terminus, Garden Road, Hong Kong Island, c. the 1920s.", "L");
pops[11] = new popupImage (11, "The Hong Kong Club, Central District, Hong Kong Island, c.1900.", "L");
pops[12] = new popupImage (12, "Queen's College, Junction of Aberdeen Street and Hollywood Road, Sheung Wan, Hong Kong Island, c.1900.", "L");
pops[13] = new popupImage (13, "Hong Kong Waterfront, Central District, Hong Kong Island, c.1890-1900.", "L");
pops[14] = new popupImage (14, "Hong Kong Waterfront, Hong Kong Island, c.1905-1910.", "L");
pops[15] = new popupImage (15, "Star Ferry Pier, Tsim Sha Tsui, Kowloon, c.1920.", "L");
pops[16] = new popupImage (16, "Bridge over Bowington Canal, Causeway Bay, Hong Kong Island, c. the 1920s.", "L");
pops[17] = new popupImage (17, "Street Barbers, Hong Kong, c. the 1920-1930s.", "L");
pops[18] = new popupImage (18, "Connaught Road Central near Triangular Pier in the, c.1910s.", "L");
pops[19] = new popupImage (19, "Alexandra Building, Central District, Hong Kong Island, c.1910-1920.", "L");
pops[20] = new popupImage (20, "Statue Square, Central District, c. the 1910s.", "L");
}else{
//Chi Version

pops[1] = new popupImage (1, "港島中環砵甸乍街，約攝於一九零五至一九一零年。", "P");
pops[2] = new popupImage (2, "在一八七三年填海工程完成後的港島海旁，後來命名為德輔道，約攝於一八七八至一八八零年。", "L");
pops[3] = new popupImage (3, "穿著滿清服飾的中國女子，攝於一九一二年以前。", "P");
pops[4] = new popupImage (4, "九龍尖沙咀九廣鐵路，車站大樓和鐘樓皆為剛落成不久，約攝於一九一六年。", "L");
pops[5] = new popupImage (5, "港島跑馬地馬場，遠處可見黃泥涌村，攝於一八七三年。", "L");
pops[6] = new popupImage (6, "港島中環海旁，可見於一九三五年落成的香港上海匯豐銀行新廈，約攝於一九三八年。", "L");
pops[7] = new popupImage (7, "香港首座大會堂，位於港島中環，約攝於一八七五年。", "L");
pops[8] = new popupImage (8, "港島中環畢打街和鐘樓，約攝於一八七零年代。", "L");
pops[9] = new popupImage (9, "港島西營盤皇后大道西，約攝於一九一零年。", "L");
pops[10] = new popupImage (10, "港島花園道纜車總站，約攝於一九二零年代。", "L");
pops[11] = new popupImage (11, "港島中環香港會，約攝於一九零零年。", "L");
pops[12] = new popupImage (12, "港島上環荷李活道和鴨巴甸街交界的皇仁書院，約攝於一九零零年。", "L");
pops[13] = new popupImage (13, "港島中環海旁，約攝於一八九零至一九零零年。", "L");
pops[14] = new popupImage (14, "港島中環海旁，約攝於一九零五至一九一零年。", "L");
pops[15] = new popupImage (15, "九龍尖沙咀天星碼頭，約攝於一九二零年。", "L");
pops[16] = new popupImage (16, "港島銅鑼灣鵝頸橋，約攝於一九二零年代。", "L");
pops[17] = new popupImage (17, "街頭理髮，約攝於一九二零至一九三零年代。", "L");
pops[18] = new popupImage (18, "干諾道中近三角碼頭一帶，約攝於一九一零年代。", "L");
pops[19] = new popupImage (19, "港島中環亞歷山打行，約攝於一九一零至一九二零年。", "L");
pops[20] = new popupImage (20, "中環皇后像廣場，約攝於一九一零年代。", "L");

}


}


	

var origWidth, origHeight;
var origWidthP, origHeightP;
var origWidthL, origHeightL;
var	initX, initY;
var	initXP, initYP;
var	initXL, initYL;

var totImage, curNum, curTitle, curOrientation, curSRC, curWidth, curHeight;

//totImage = 30;

initXL = 36;
initYL = 53;
initXP = 36;
initYP = 53;

origWidthP = 200;
origHeightP= 300;
origWidthL = 420;
origHeightL= 300;
curWidth = 420;
curHeight= 300;

function loadPopupImage (str) { 
  var s, qry, arr, p;
  if (str == "") return;
  //  get num from search string
  s = new String (str);
  s = s.substring (1, s.length);
//  alert(s);
  arr = s.split ('=');
  // set image number
 // alert(arr[1]);
  curNum = arr[1]; 
  // assign attributes
//      p = eval ("pops["+curNum+"]");
  i=0;
  
  do {
     i++;
	  p = eval ("pops["+i+"]");
  } while (p!=null && p.num != curNum && i < pops.length)
// alert(p.title);
  curNum = i;
  curTitle = p.title;
  curSRC = p.fname;
  curOrientation = p.orientation;
  if (p.orientation == "P") { 
  	initX = initXP;
	initY = initYP;

    curWidth = origWidthP;
	curHeight = origHeightP;
    origWidth = origWidthL;
	origHeight = origHeightL;
  }
  else { 
	initX = initXL;
	initY = initYL;
    curWidth = origWidthL;
	curHeight = origHeightL;
    origWidth = origWidthL;
	origHeight = origHeightL;
  }
  totImage = pops.length-1;
}

loadPopupImage (document.location.search);



