/**************************** Variable Declaration Section *************************************************/ var selectedSection; var selectedSubSection; var selectedSecondSubSection; var subPath; var locationPath; var langID; var titleID; var langNum; var langPath; var langCode = 'en'; var menu; var txtHome; var txtContact; var txtSitemap; var txtSearch; var txtGo; var mode; var searchLink; var screenWidth = screen.width; var sitePath = 'https://www.hkreform.gov.hk/'; //var sitePath = 'http://lrcwww.ai-sol.com/'; //var sitePath = 'http://localhost/~tonylaw/lrc/'; var imagePath = sitePath + 'common/images/'; var langCodeEN = 'en'; var langCodeTC = 'tc'; var langCodeGB = 'gb'; var langCodeCHS = 'chs'; var searchDate; var revisionDate; var reviewDate; // variables with values stored in cookies var cookie = readCookie("textsize"); var textsize = cookie ? cookie : 1; // 1=normal 2=larger 3=largest var mobileMode; cookie = readCookie("mobileMode"); if (cookie != null){ mobileMode = cookie; }else if(screenWidth<800){ //switch to mobile mode if screen width is less than 800px; mobileMode = 1; }else{ mobileMode = 0; } /**************************** Variable Declaration Section FINISH ******************************************/ /**************************** Language / Server Path declaration ******************************************/ isText=false; if(document.URL.toString().search('/' + langCodeEN + '/')!=-1 || location.search.toString().indexOf('lang=' + langCodeEN)!=-1 || location.search.toString().indexOf('mode=257')!=-1){ langPath = langCodeEN + '/'; langID=1; titleID=1; txtPageTitle = 'The Law Reform Commission of Hong Kong'; txtHome = 'HOME'; txtContact = 'CONTACT'; txtSitemap = 'SITE MAP'; txtSearch = 'SEARCH'; txtGo = 'GO'; txtRevisionDate = "Last revision date"; txtGoToTop = "Go to Top"; txtSearchFieldLabel = "Input Search"; mode = 257; searchLink = "https://www.search.gov.hk/search.html"; }else if ((document.URL.toString().search('/' + langCodeTC + '/')!=-1 || location.search.toString().indexOf('lang=' + langCodeTC)!=-1 || location.search.toString().indexOf('mode=258')!=-1) &&!(document.URL.toString().search('/gb/')!=-1)){ langPath = langCodeTC + '/'; langID=2; titleID=2; txtPageTitle = "香港法律改革委員會"; txtHome = '主頁'; txtContact = '聯絡我們'; txtSitemap = '網頁指南'; txtSearch = '搜尋'; txtGo = '去'; txtRevisionDate = "修訂日期"; txtGoToTop = "頁首"; txtSearchFieldLabel = "搜尋輸入"; mode = 258; searchLink = "https://www.search.gov.hk/search.html"; }else{ langPath = langCodeCHS + '/'; langID=3; titleID=3; txtPageTitle = '香港法律改革委员会'; txtHome = '主页'; txtContact = '联络我们'; txtSearch = '搜寻'; txtSitemap = '网页指南'; txtGo = '去'; txtRevisionDate = "修订日期"; txtGoToTop = "页首"; txtSearchFieldLabel = "搜寻输入"; mode = 258; searchLink = "https://www.search.gov.hk/search.html"; } var gicSearchForm; var ui_langs = new Array("en", "zh-hk", "zh-cn"); var ui_charsets = new Array("utf-8", "utf-8", "utf-8"); gicSearchForm='