1function leftmenu() 2{ 3 var outputMenu = ''; 4 outputMenu += '<ul class="sf-menu sf-vertical"><li class="menu_li_space" style="display:none"></li>'; 5 6 var subMenu =[ 7 [['welcome_message/'],['']],[['whatsnew/'],['']],[['press_releases/'],['']],[['about_us/'],['','','','']],[['downloadable_materials/'],['']],[['links/'],['']],[['contactus/'],['']] 8 ]; 9 10var menuArr = [ 11 [['欢è¿è¾', 'index.html']], 12 [['ææ°æ¶æ¯', 'index.html']], 13 [['æ°é»å ¬æ¥','index_2019.html']], 14 [['å ³äºæä»¬', 'index.html'], 15 ['ç®ä»', 'introduction.html'], 16 ['èè´£','mission.html'], 17 ['æååå','membership_list.html']], 18 [['åç©åä¸è½½èµæ', 'index.html']], 19 [['ç¸å ³ç½å', 'index.html']], 20 [['èç»æä»¬','index.html']] 21 ]; 22 23 var backPath = findingPath(); 24 var phpPath = 'http://gld.netsoft.net/sc_chi/'; 25 var frontPath = ''; 26 var middlePath =''; 27 var externalPath= ''; 28 var endPath = ''; 29 30 for (var i = 0;i<menuArr.length;i++) 31 { 32 for (var ii = 0;ii<menuArr[i].length;ii++) 33 { 34 35 if(menuArr[i][ii][1].indexOf(".php")>0) 36 { 37 frontPath = phpPath; 38 } 39 else if(menuArr[i][ii][1].indexOf("http://")>=0) 40 { 41 frontPath = ""; 42 } 43 else 44 { 45 frontPath = backPath; 46 } 47 48 49 if(menuArr[i][ii][1].indexOf("/")>0) 50 { 51 middlePath = ''; 52 } 53 else 54 { 55 middlePath = subMenu[i][0][0] + subMenu[i][1][ii]; 56 } 57 58 if(ii == 0) 59 { 60 outputMenu += '<li class="menu_li_lv1 in-active"><a href="'+frontPath+middlePath+menuArr[i][ii][1]+'" class="menu_lv1">'+menuArr[i][ii][0]+'</a>'; 61 } 62 else if(ii == 1) 63 { 64 outputMenu += '<ul class="in-active" style="border-top: #afafaf 1px solid; border-bottom: #afafaf 0px solid;">'; 65 outputMenu += '<li class="in-active "><a href="'+frontPath+middlePath+menuArr[i][ii][1]+'" style="font-size:1.3em">'+menuArr[i][ii][0]+'</a><div class="separate-line"></div></li>'; 66 } 67 else 68 { 69 outputMenu += '<li class="in-active"><a href="'+frontPath+middlePath+menuArr[i][ii][1]+'" style="font-size:1.3em">'+menuArr[i][ii][0]+'</a><div class="separate-line"></div></li>'; 70 } 71 72 if(ii == 0 && ii == menuArr[i].length -1) 73 { 74 outputMenu += '</li><div class="separate-line"></div>'; 75 } 76 else if(ii >= 1 && ii == menuArr[i].length -1) 77 { 78 outputMenu += '</ul></li><div class="separate-line"></div>'; 79 } 80 } 81 } 82 83 outputMenu += '</ul>'; 84 85 document.write( outputMenu ); 86 87} 88 89function setTitleImage() 90{ 91 var backPath = findingPath(); 92 93 var titleImage = document.getElementById('titleImage'); 94 95 var themeCookie = get_cookie('themeCookie'); 96 var section = getSection(); 97 98 var path = themeCookie.replace("/common/css/Theme/","images/titleimage/"); 99 section = section.replace(".html#",""); 100 section = section.replace(".html",""); 101 path = path + "/title_"+section+".png"; 102 path = backPath + path; 103 104 document.getElementById('titleImage').style.backgroundImage = "url('"+path+"')"; 105 document.getElementById('titleImage').innerHTML='<img src="'+path+'" title="'+getSection()+'" alt="'+getSection()+'">'; 106 107 document.getElementById('rightImage').innerHTML='<img src="'+backPath+'images/pic1.gif" alt="gif1"><br><img src="'+backPath+'images/pic2.gif" alt="gif2">'; 108 109} 110 111function getSection() 112{ 113 var numPath = new Number; 114 if(!(document.location.href.indexOf("preview") > 0)) 115 { 116 numPath = 4; 117 } 118 else 119 { 120 numPath = 5; 121 } 122 123 var currentURL = document.location.href; 124 if (currentURL.indexOf("index.html") > 0) 125 return "cindex"; 126 var urlElements = currentURL.split("/"); 127 return urlElements[numPath]; 128} 129 130 131 132function init() 133{ 134 setTitleImage(); 135 var currentURL = document.location.href; 136 if (currentURL.indexOf("index.html") > 0) 137 playScroller(); 138 var fontsize = get_cookie('fontsize'); 139 if (fontsize==null) 140 changeFontSize(0); 141} 142 143 144 145function getHeader() 146{ 147 var backPath= findingPath(); 148 //backPath += 'english/';
149document.write('<div style=\"float:left; width:1000px;height:70px;background:#FFFEE6 url(\'../../sc/images/bkgdtexture.jpg\') repeat;\"><a href=\"../../index.html\"><img src=\"../../sc/images/logo.png\" alt=\" æä½å·¥èµå§åä¼\" style="border:0" title="\æä½å·¥èµå§åä¼\"></a></div>'); 150} 151 152function getbottom() 153{ 154 var backPath= findingPath(); 155 //backPath += 'english/'; 156document.write('<div style=\"float:left; width:1000px;height:99px;background:#FFFEE6 url(\'../../en/images/bkgdbottom.jpg\') repeat;\"></div>'); 157document.write('<div class=\"footer\"><div class=\"footer_left\">çæææ © 2019 æä½å·¥èµå§åä¼ | <a href=\"../notices/index.html\">éè¦å示</a></div><div class=\"footer_banner\"><span class=\"footer_right\">æè¿ä¿®è®¢æ¥æ: 25/3/2019</span><span class=\"footer_w3c\"><a href="http://www.w3.org/WAI/WCAG2AA-Conformance" rel="external"><img src="../../images/w3c_wcag2_0.gif" alt="éµå®2A级æ éç¢å¾ç¤ºï¼ä¸ç»´ç½èçï¼W3Cï¼- æ éç¢ç½é¡µå¡è®®ï¼WAIï¼ Web Content Accessibility Guidelines 2.0" style="border:0" title="éµå®2A级æ éç¢å¾ç¤ºï¼ä¸ç»´ç½èçï¼W3Cï¼- æ éç¢ç½é¡µå¡è®®ï¼WAIï¼ Web Content Accessibility Guidelines 2."></a></span><span class=\"footer_wfa\"><a href="http://www.webforall.gov.hk/tc/recognition_scheme" rel="external"><img src="../../images/WA_Gold.png" alt="æ éç¢ç½é¡µå许计å" title="æ éç¢ç½é¡µå许计å" style="border:0"></a></span></div></div>'); 158} 159 160 161function getSection() 162{ 163 var currentURL = document.location.href; 164 if (currentURL.indexOf("index.html") > 0) 165 return "welcome_message"; 166 var p1 = currentURL.indexOf("english/"); 167 var currentPath = currentURL.substring(p1); 168 var urlElements = currentPath.split("/"); 169 return urlElements[1]; 170} 171 172 173function findingPath() 174{ 175 var Path= ''; 176 177 var currentURL = document.location.href; 178 var p1 = currentURL.indexOf("/sc/"); 179 currentPath = currentURL.substring(p1); 180 var urlElements = currentPath.split("/"); 181 var l = urlElements.length; 182 183 if( currentURL.indexOf("/sc/")>0) 184 { 185 if(l==4) 186 { 187 Path = '../'; 188 } 189 else if(l==5) 190 { 191 Path='../../'; 192 } 193 else if(l==6) 194 { 195 Path='../../../'; 196 } 197 } 198 else 199 { 200 Path = 'en/'; 201 } 202 203 return Path; 204} 205 206function chgText(){ 207 var currentURL=document.location.href; 208 var nextURL=''; 209 var langPath = '/sc/'; 210 var langPathTxt = '/textonly'; 211 var langPathInd = '/scindex.html'; 212 if(currentURL.indexOf(langPathTxt+"/")>=0) 213 { 214 if(currentURL.indexOf(langPathTxt + langPath)>=0){ 215 nextURL=currentURL.ReplaceAll(langPathTxt + langPath , langPath); 216 } 217 else if(currentURL.indexOf(langPathTxt + langPathInd)>=0) 218 { 219 nextURL=currentURL.ReplaceAll(langPathTxt + langPathInd, langPathInd); 220 } 221 } 222 else 223 { 224 if(currentURL.indexOf(langPath)>=0){ 225 nextURL=currentURL.ReplaceAll(langPath, langPathTxt + langPath); 226 } 227 else if(currentURL.indexOf(langPathInd)>=0) 228 { 229 nextURL=currentURL.ReplaceAll(langPathInd, langPathTxt + langPathInd); 230 } 231 } 232 document.location.href=nextURL; 233} 234 235function chglang(lang){ 236 var currentURL=document.location.href; 237 var nextURL = ''; 238 var lang1 = 'en'; 239 var langInd1 = '/eindex.html'; 240 var lang2 = 'tc'; 241 var langInd2 = '/tcindex.html'; 242 var langDef = '/sc/'; 243 var langIndDef = '/scindex.html' 244 if(currentURL.indexOf(langDef)>=0){ 245 nextURL=currentURL.ReplaceAll(langDef,"/"+lang+"/"); 246 } 247 else if(currentURL.indexOf(langIndDef)>=0) 248 { 249 if(lang == lang1) 250 { 251 nextURL=currentURL.ReplaceAll(langIndDef,langInd1); 252 } 253 else if(lang == lang2) 254 { 255 nextURL=currentURL.ReplaceAll(langIndDef,langInd2); 256 } 257 } 258 document.location.href=nextURL; 259} 260 261 262 263 264 265String.prototype.ReplaceAll = function(stringToFind, stringToReplace){ 266 var temp = this; 267 268 var index = temp.indexOf(stringToFind); 269 270 var stringToChanging = '/thisWordIsUseForChangeTheLanguage/'; 271 272 while(index != -1){ 273 temp = temp.replace(stringToFind,stringToChanging); 274 275 index = temp.indexOf(stringToFind); 276 } 277 278 var index2 = temp.indexOf(stringToChanging); 279 280 while(index2 != -1){ 281 temp = temp.replace(stringToChanging,stringToReplace); 282 index2 = temp.indexOf(stringToChanging); 283 } 284 285 return temp; 286} 287 288function activeMenu() { 289 var w = window.location+""; 290 var folders = w.split("/"); 291 if(folders.length<6){ 292 $('.menu_li_lv1').first().removeClass("in-active").addClass("active"); 293 }else{ 294 $('.menu_li_lv1 a[href="/' +folders[3]+ '/' +folders[4]+'"]').parent().removeClass("in-active").addClass("active"); 295 } 296 } 297 298 299 $(window).on('load', function () { 300 $("ul.sf-menu").find("li").removeClass("in-active active").addClass("in-active"); 301 302 303 304 $("ul.sf-menu .menu_li_lv1").on( "mouseover", 305 function () { 306 $("ul.sf-menu").find("li").removeClass("in-active active").addClass("in-active"); 307 $("ul.sf-menu").find("ul").removeClass("in-active active").addClass("in-active"); 308 309 $(this).removeClass("in-active").addClass("active"); 310 $(".in-active").on( "mouseover", 311 function () { 312 313 $(this).removeClass("in-active").addClass("active"); 314 315 } 316 ); 317 318 } 319 ); 320 321 322 $("ul.sf-menu .menu_li_lv1").on( "mouseout", 323 function () { 324 $('#about_us_submenu').show(); 325 $(this).removeClass("active").addClass("in-active"); 326 activeMenu(); 327 } 328 ); 329 330 $("ul.sf-menu .menu_li_lv1 a.menu_lv1").on( "focus", 331 function () { 332 $("ul.sf-menu").find("li").removeClass("in-active active").addClass("in-active"); 333 $(this).parent().removeClass("in-active").addClass("active"); 334 335 } 336 ); 337 338 339 $("ul.sf-menu .menu_li_lv1 a.menu_lv1").on( "blur", 340 function () { 341 $(this).parent().removeClass("active").addClass("in-active"); 342 activeMenu(); 343 } 344 ); 345 346 347 $("ul.sf-menu .menu_li_lv1 ul li a").on( "focus", 348 function () { 349 $("ul.sf-menu").find("li").removeClass("in-active active").addClass("in-active"); 350 $(this).parent().parent().parent().removeClass("in-active").addClass("active"); 351 $(this).parent().parent().removeClass("in-active").addClass("active"); 352 $(this).parent().removeClass("in-active").addClass("active"); 353 } 354 ); 355 356 357 $("ul.sf-menu .menu_li_lv1 ul li a").on( "blur", 358 function () { 359 $(this).parent().parent().parent().removeClass("active").addClass("in-active"); 360 $(this).parent().parent().removeClass("active").addClass("in-active"); 361 $(this).parent().removeClass("active").addClass("in-active"); 362 activeMenu(); 363 } 364 ); 365 366 activeMenu(); 367 }); 368 369 370 371 372function genBanner() 373{ 374 //var path = findingPath();
375 //document.write('<p>'); 376 377 //document.write('</p>'); 378 var path = findingPath(); 379 document.write('<p>'); 380 document.write('<a href="../../sc/downloadable_materials/2018_MWCReport_Chi.pdf" class="iconFocus" rel="external"><img src="../../sc/images/banner/banner_mwc_report2018_sc.gif" alt="æä½å·¥èµå§åä¼2018å¹´æ¥å" title="æä½å·¥èµå§åä¼2018å¹´æ¥å" style="padding:2px;padding-top:20px;border:0"></a><br>'); 381 document.write('</p>'); 382}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.