﻿ 
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-- SCRIPTS FOR GOODREAD BOOK AND CATALOGUE LINKS --//

book = new Array();
book[1] = "eng/84_charging.htm";
book[2] = "eng/christmas_carol.htm";
book[3] = "eng/cider_with_rosie.htm";
book[4] = "eng/computer_networks.htm";
book[5] = "eng/don_quixote.htm";
book[6] = "eng/elements_of_style.htm";
book[7] = "eng/hound_of_the_baskervilles.htm";
book[8] = "eng/just_for_fun.htm";
book[9] = "eng/learn_golf.htm";
book[10] = "eng/red_hat_linux.htm";
book[11] = "eng/road_less_traveled.htm";
book[12] = "eng/to_kill_a_mockingbird.htm";
book[13] = "eng/under_milk_wood.htm";
book[14] = "eng/waiting_for_godot.htm";
book[15] = "eng/weaving_the_web.htm";
book[16] = "eng/who_move_my_cheese.htm";
book[17] = "eng/history_of_the_english.htm";
book[18] = "eng/tale_of_two_cities.htm";
book[19] = "eng/tuesdays_with_morrie.htm";
book[20] = "eng/collected_ghost_stories.htm";
book[21] = "eng/ultimate_hitchhiker_guide.htm";

cbook = new Array();
cbook[1] = "chi/rensheng_tiyen.htm";
cbook[2] = "chi/zhongguochi.htm";
cbook[3] = "chi/wuqiannian_zhonghua.htm";
cbook[4] = "chi/shijie_meishu.htm";
cbook[5] = "chi/shengming_fenjin.htm";
cbook[6] = "chi/tongxin_sifenyi.htm";
cbook[7] = "chi/zoujin_yishu.htm";
cbook[8] = "chi/yangxiang.htm";
cbook[9] = "chi/liu_de_shinian.htm";
cbook[10] = "chi/jiang_shangxia.htm";
cbook[11] = "chi/yanlei.htm";
cbook[12] = "chi/juhua_yu_jian.htm";
cbook[13] = "chi/huaiju_shicun.htm";
cbook[14] = "chi/yinyuan_shidai.htm";
cbook[15] = "chi/ruxue_lungao.htm";


cata = new Array();
//--84, Charing Cross Road--//
cata[1] = "http://library.cuhk.edu.hk/search/cPS3515.A4853+Z485+1990";
//--A Christmas Carol--//
cata[2] = "http://library.cuhk.edu.hk/search/cPR4557.A1%2B1900z";
//--Cider with Rosie--//
cata[3] = "http://library.cuhk.edu.hk/search/cPR6023.E285C5";
//--Computer Networks--//
cata[4] = "http://library.cuhk.edu.hk/search/cTK5105.5+T36+1996";
//--Don Quixote de la Mancha--//
cata[5] = "http://library.cuhk.edu.hk/search/cPQ6329+.A2+1999";
//--The Elements of Style--//
cata[6] = "http://library.cuhk.edu.hk/search/cPE1408+.S772+2000";
//--The Hound of the Baskervilles--//
cata[7] = "http://library.cuhk.edu.hk/search/cPR4621.S5+1929";
//--Just for Fun: The Story of an Accidental Revolutionary--//
cata[8] = "http://library.cuhk.edu.hk/search/cQA76.2.T67+T67+2001";
//--Learn Golf in a Weekend--//
cata[9] = "http://library.cuhk.edu.hk/search/cGV965+.B34+1991";
//--Red Hat Linux 7 Weekend Crash Course--//
cata[10] = "http://library.cuhk.edu.hk/search/cQA76.76.O63+B36618+2000";
//--The Road Less Traveled--//
cata[11] = "http://library.cuhk.edu.hk/search/cBF637.S4P43";
//--To Kill a Mockingbird--//
cata[12] = "http://library.cuhk.edu.hk/search/cPS3562.E353T6%2B1960";
//--Under Milk Wood: A Play for Voices--//
cata[13] = "http://library.cuhk.edu.hk/search/cPR6039.H52U6";
//--Waiting for Godot: A Tragicomedy in Two Acts--//
cata[14] = "http://library.cuhk.edu.hk/search/cPQ2603.E378+E53+1965";
//--Weaving the Web--//
cata[15] = "http://library.cuhk.edu.hk/search/cTK5105.888%2B.B46%2B1999";
//--Who Moved My Cheese?--//
cata[16] = "http://library.cuhk.edu.hk/search/cBF637.C4+J64+1998";
//--A history of the English-speaking peoples --//
cata[17] = "http://library.cuhk.edu.hk/search/cDA16.C474";
//--A Tale of Two Cities--//
cata[18] = "http://library.cuhk.edu.hk/search/cPR4571.A1+1984";
//--Tuesdays with Morrie: an old man, a young man, and life's greatest lesson--//
cata[19] = "http://library.cuhk.edu.hk/search/cLD571.B418+S383+1997";
//--Collected Ghost Stories--//
cata[20] = "http://library.cuhk.edu.hk/search/cPR6019.A565+A6+1992";
//--The ultimate hitchhiker's guide--//
cata[21] = "http://library.cuhk.edu.hk/search/cPR6051.D3352+A6+1996";

//-- Chinese Books Catalogue Links --//
ccata = new Array();
//--人生之體驗--//
ccata[1] = "http://library.cuhk.edu.hk/search*chi/cBD431.T14+1980";
//--中國吃--//
ccata[2] = "http://library.cuhk.edu.hk/search*chi/cGT2853.C6T295+1976";
//--五千年中華文化大視野--//
ccata[3] = "http://library.cuhk.edu.hk/search*chi/cDS721+W866+2002";
//--世界美術名作二十講--//
ccata[4] = "http://library.cuhk.edu.hk/search*chi/cN6754+F8+1984";
//--生命的奮進--//
ccata[5] = "http://library.cuhk.edu.hk/search/cCT1826+.S5+1986";
//--同行四分一世紀：我與陳修治醫生的生死友誼--//
ccata[6] = "http://library.cuhk.edu.hk/search*chi/cPL2863.K82+Z473+1998";
//--走進藝術殿堂：中外博物館漫步--//
ccata[7] = "http://library.cuhk.edu.hk/search*chi/cAM5+.T66+1997";
//--洋相：英美社交禮儀--//
ccata[8] = "http://library.cuhk.edu.hk/search*chi/cBJ1873.H75";
//--留德十年--//
ccata[9] = "http://library.cuhk.edu.hk/search*chi/cCT1828.C52499+A3+1992";
//--將上下而求索：給明慧的二十封信--//
ccata[10] = "http://library.cuhk.edu.hk/search*chi/cBJ1668.C5+C525+1982";
//--眼淚並未抹乾：一個受苦者的聲音--//
ccata[11] = "http://library.cuhk.edu.hk/search*chi/cBV4909+.G65+2001";
//--菊花與劍：日本的民族文化模式--//
ccata[12] = "http://library.cuhk.edu.hk/search*chi/cDS821.B4612";
//--槐聚詩存--//
ccata[13] = "http://library.cuhk.edu.hk/search*chi/cPL2749.C8+A17+1995";
//--銀元時代生活史--//
ccata[14] = "http://library.cuhk.edu.hk/search*chi/cDS777.47.C43/cds++777.47+c43/1,2,2,E/frameset&FF=cds++777.47+c43&1,1,";
//--儒學論稿--//
ccata[15] = "http://library.cuhk.edu.hk/search*chi/cB127.C65+S795+2002";


function Frame(booknumber)
{
document.write("<frameset rows='*,26' framespacing='0' frameborder='0' border='0'>");
{
if (booknumber == "1"){
urlbook = book[1];urlcata = cata[1];
}
if (booknumber == "2"){
urlbook = book[2];urlcata = cata[2];
}
if (booknumber == "3"){
urlbook = book[3];urlcata = cata[3];
}
if (booknumber == "4"){
urlbook = book[4];urlcata = cata[4];
}
if (booknumber == "5"){
urlbook = book[5];urlcata = cata[5];
}
if (booknumber == "6"){
urlbook = book[6];urlcata = cata[6];
}
if (booknumber == "7"){
urlbook = book[7];urlcata = cata[7];
}
if (booknumber == "8"){
urlbook = book[8];urlcata = cata[8];
}
if (booknumber == "9"){
urlbook = book[9];urlcata = cata[9];
}
if (booknumber == "10"){
urlbook = book[10];urlcata = cata[10];
}
if (booknumber == "11"){
urlbook = book[11];urlcata = cata[11];
}
if (booknumber == "12"){
urlbook = book[12];urlcata = cata[12];
}
if (booknumber == "13"){
urlbook = book[13];urlcata = cata[13];
}
if (booknumber == "14"){
urlbook = book[14];urlcata = cata[14];
}
if (booknumber == "15"){
urlbook = book[15];urlcata = cata[15];
}
if (booknumber == "16"){
urlbook = book[16];urlcata = cata[16];
}
if (booknumber == "17"){
urlbook = book[17];urlcata = cata[17];
}
if (booknumber == "18"){
urlbook = book[18];urlcata = cata[18];
}
if (booknumber == "19"){
urlbook = book[19];urlcata = cata[19];
}
if (booknumber == "20"){
urlbook = book[20];urlcata = cata[20];
}
if (booknumber == "21"){
urlbook = book[21];urlcata = cata[21];
}
//-- CHINESE BOOKS --//

if (booknumber == "c1"){
urlbook = cbook[1];urlcata = ccata[1];
}
if (booknumber == "c2"){
urlbook = cbook[2];urlcata = ccata[2];
}
if (booknumber == "c3"){
urlbook = cbook[3];urlcata = ccata[3];
}
if (booknumber == "c4"){
urlbook = cbook[4];urlcata = ccata[4];
}
if (booknumber == "c5"){
urlbook = cbook[5];urlcata = ccata[5];
}
if (booknumber == "c6"){
urlbook = cbook[6];urlcata = ccata[6];
}
if (booknumber == "c7"){
urlbook = cbook[7];urlcata = ccata[7];
}
if (booknumber == "c8"){
urlbook = cbook[8];urlcata = ccata[8];
}
if (booknumber == "c9"){
urlbook = cbook[9];urlcata = ccata[9];
}
if (booknumber == "c10"){
urlbook = cbook[10];urlcata = ccata[10];
}
if (booknumber == "c11"){
urlbook = cbook[11];urlcata = ccata[11];
}
if (booknumber == "c12"){
urlbook = cbook[12];urlcata = ccata[12];
}
if (booknumber == "c13"){
urlbook = cbook[13];urlcata = ccata[13];
}
if (booknumber == "c14"){
urlbook = cbook[14];urlcata = ccata[14];
}
if (booknumber == "c15"){
urlbook = cbook[15];urlcata = ccata[15];
}
}
document.write("<frame src='" + urlbook + "' frameborder='0'>");
document.write("<frame src='holdings.htm' frameborder='0' scrolling='no'>");
document.write("</frameset>");
}


function goURL(booknumber)
{
if (booknumber == "1"){
window.location.href = cata[1];
}
if (booknumber == "2"){
window.location.href = cata[2];
}
if (booknumber == "3"){
window.location.href = cata[3];
}
if (booknumber == "4"){
window.location.href = cata[4];
}
if (booknumber == "5"){
window.location.href = cata[5];
}
if (booknumber == "6"){
window.location.href = cata[6];
}
if (booknumber == "7"){
window.location.href = cata[7];
}
if (booknumber == "8"){
window.location.href = cata[8];
}
if (booknumber == "9"){
window.location.href = cata[9];
}
if (booknumber == "10"){
window.location.href = cata[10];
}
if (booknumber == "11"){
window.location.href = cata[11];
}
if (booknumber == "12"){
window.location.href = cata[12];
}
if (booknumber == "13"){
window.location.href = cata[13];
}
if (booknumber == "14"){
window.location.href = cata[14];
}
if (booknumber == "15"){
window.location.href = cata[15];
}
if (booknumber == "16"){
window.location.href = cata[16];
}
if (booknumber == "17"){
window.location.href = cata[17];
}
if (booknumber == "18"){
window.location.href = cata[18];
}
if (booknumber == "19"){
window.location.href = cata[19];
}
if (booknumber == "20"){
window.location.href = cata[20];
}
if (booknumber == "20"){
window.location.href = cata[20];
}
if (booknumber == "21"){
window.location.href = cata[21];
}
//-- CHINESES CATALOGUE LINK --//

if (booknumber == "c1"){
window.location.href = ccata[1];
}
if (booknumber == "c2"){
window.location.href = ccata[2];
}
if (booknumber == "c3"){
window.location.href = ccata[3];
}
if (booknumber == "c4"){
window.location.href = ccata[4];
}
if (booknumber == "c5"){
window.location.href = ccata[5];
}
if (booknumber == "c6"){
window.location.href = ccata[6];
}
if (booknumber == "c7"){
window.location.href = ccata[7];
}
if (booknumber == "c8"){
window.location.href = ccata[8];
}
if (booknumber == "c9"){
window.location.href = ccata[9];
}
if (booknumber == "c10"){
window.location.href = ccata[10];
}
if (booknumber == "c11"){
window.location.href = ccata[11];
}
if (booknumber == "c12"){
window.location.href = ccata[12];
}
if (booknumber == "c13"){
window.location.href = ccata[13];
}
if (booknumber == "c14"){
window.location.href = ccata[14];
}
if (booknumber == "c15"){
window.location.href = ccata[15];
}
if (booknumber == "c16"){
window.location.href = ccata[16];
}

}