1var win; 2 3function lang_id(){ 4 var f = window.location.toString(); 5 var n = f.indexOf("/en/"); 6 var g = f.indexOf("/tc/"); 7 if (n >= 0) { 8 return 0; 9 } else { 10 if (g >= 0) { 11 return 1; 12 } else { 13 return 2; 14 } 15 } 16} 17 18function popPrint(c) { 19 alert('popPrint'); 20 var f = window.location.toString(); 21 var n = f.indexOf("/en/"); 22 var g = f.indexOf("/tc/"); 23/* 24 Comment Reason: Hang Up Problem 25 26 var k = document.title; 27*/ 28 var d = document.getElementById(c).innerHTML; 29 var h = ""; 30 if (document.getElementById("imageslide") != null) { 31 var l = document.getElementById("imageslide").querySelectorAll("img"); 32 var h = ""; 33 for (var e = 0; e < l.length; e++) { 34 var j = l[e]; 35 h = h + "<img src='" + j.src + "' alt='image" + e + "'/>" 36 } 37 d = d + "<br>" + h 38 } 39 if (n >= 0) { 40 var m = "Print" 41 } else { 42 var m = "åå°" 43 } 44 win = window.open("print.htm", "popup", "width=1024,height=768,scrollbars=yes,resizable=yes"); /* win.document.open(); */ 45/* win.document.write("<head><title>" + k + "</title></head>"); */ 46 47/* for Screen reset */ 48/* win.document.open(); 49 if (n >= 0) { 50 win.document.write("<link rel='stylesheet' href='/en/css/default/reset.css' type='text/css' media='screen'>"); 51 } else { 52 if (g >= 0) { 53 win.document.write("<link rel='stylesheet' href='/tc/css/default/reset.css' type='text/css' media='screen'>"); 54 } else { 55 win.document.write("<link rel='stylesheet' href='/sc/css/default/reset.css' type='text/css' media='screen'>"); 56 } 57 } 58 win.document.write("<link rel='stylesheet' type='text/css' media='screen' href='/common/css/default/layout.css' >"); 59 win.document.write("<link rel='stylesheet' type='text/css' media='screen' href='/common/css/default/typography.css' >"); 60 win.document.write("<link rel='stylesheet' id='theme' href='/common/css/Theme/blue.css' type='text/css' media='screen'>"); 61 win.document.write("<script type='text/javascript' src='/common/js/jquery-1.6.2.min.js'></script>"); 62 */ 63/* for printer reset */ 64 if (n >= 0) { 65 win.document.write("<link rel='stylesheet' href='/en/css/default/reset.css' type='text/css' media='print'>"); 66 } else { 67 if (g >= 0) { 68 win.document.write("<link rel='stylesheet' href='/tc/css/default/reset.css' type='text/css' media='print'>"); 69 } else { 70 win.document.write("<link rel='stylesheet' href='/sc/css/default/reset.css' type='text/css' media='print'>"); 71 } 72 } 73 // win.document.write("<link rel='stylesheet' type='text/css' media='print' href='/common/css/default/layout.css' >"); 74 // win.document.write("<link rel='stylesheet' type='text/css' media='print' href='/common/css/default/typography.css' >"); 75 // win.document.write("<link rel='stylesheet' id='theme' href='/common/css/Theme/blue.css' type='text/css' media='print'>");
76 win.document.write('<style type="text/css">body{width:95%;left:0px;margin:20px;padding:0px}a{color:#06F;text-decoration:none}a:hover{color:#3c81a2;text-decoration:underline}</style>'); 77 78 win.document.write('<table align="center" border="0" cellpadding="0" cellspacing="0" style="margin-left:auto;margin-right:auto;"><tr><td align="left" valign="top">'); 79 if (n >= 0) { 80 win.document.write('<div id="branding"><a href="/en/index.htm"><img src="/en/images/mobile/logo-hk.png" alt="Office of the Government Chief Information Officer" ></a><a name="Top"></a></div>'); 81 } else { 82 if (g >= 0) { 83 win.document.write('<div id="branding"><a href="/tc/index.htm"><img src="/tc/images/mobile/logo-hk.png" alt="馿¸¯ç¹å¥è¡æ¿åæ¿åºæ¿åºè³è¨ç§æç¸½ç£è¾¦å ¬å®¤" ></a><a name="Top"></a></div>'); 84 } else { 85 win.document.write('<div id="branding"><a href="/sc/index.htm"><img src="/sc/images/mobile/logo-hk.png" alt="馿¸¯ç¹å«è¡æ¿åºæ¿åºæ¿åºèµè®¯ç§ææ»çåå ¬å®¤" ></a><a name="Top"></a></div>'); 86 } 87 }
88 win.document.write('<div style="float:right;"><a href="javascript:window.print();" style="font-weight:bold; color:#FFF; background:url(/common/images/btn_search.gif) no-repeat 0 0; padding:0px 0px 0px 0px; width:54px; height:24px; text-align:center; display:block; font-size:12px; text-decoration:none;">' + m + "</a></div>"); 89 win.document.write('</td></tr><tr><td align="left" valign="top" style="width:951px;height:18px;background: url(/common/images/mobile/yellow_bar_repeat.png) repeat-x;">'); 90 win.document.write('</td></tr><tr><td align="left" valign="top">'); 91 win.document.write("<div>"); 92 win.document.write("<br/>" + d + "<br />"); 93 win.document.write("</div>"); 94 win.document.write('</td></tr><tr><td align="left" valign="top">'); 95 win.document.write('<div style="float:right;"><a href="javascript:window.print();" style="font-weight:bold; color:#FFF; background:url(/common/images/btn_search.gif) no-repeat 0 0; padding:0px 0px 0px 0px; width:54px; height:24px; text-align:center; display:block; font-size:12px; text-decoration:none;">' + m + "</a></div>"); 96 win.document.write("</td></tr></table>");
97 win.document.write('<script type="text/javascript" src="/sites/all/modules/kanhan_header/js/print2.js"><\/script>'); 98 win.document.close(); 99 100/* 101 win.document.write('<script type="text/javascript" src="/common/js/jquery-1.6.2.min.js"><\/script>'); 102 win.document.write('<script type="text/javascript" src="/common/js/print2.js"><\/script>'); 103 win.document.write('<link rel="stylesheet" href="/common/css/default/MainStyle.css" type="text/css" media='screen'>'); 104 win.document.write('<link rel="stylesheet" href="/en/css/default/reset.css" type="text/css" media="screen">'); 105 win.document.write('<link rel="stylesheet" href="/common/css/default/coda-slider-2.0.css" type="text/css" media="screen">'); 106 win.document.write('<link rel="stylesheet" href="/common/css/default/mycss_print.css" type="text/css" media='screen'>'); 107 win.document.write('<link rel="stylesheet" media="screen" href="/common/css/default/superfish.css">'); 108 win.document.write('<link rel="stylesheet" media="screen" href="/common/css/default/superfish-vertical.css">');
109 win.document.write('<link rel="stylesheet" type="text/css" href="/common/css/default/JQueryStyle.css">'); 110 win.document.write('<link rel="stylesheet" type="text/css" href="/common/css/default/highlight.css">'); 111 win.document.write('<link rel="stylesheet" href="/common/css/default/changeFontSize.css" type="text/css">'); 112 win.document.write('<link rel="stylesheet" type="text/css" href="/common/css/default/jquery.lightbox-0.5.css">'); 113 win.document.write('<link rel="stylesheet" type="text/css" href="/common/css/default/F_TabStyle.css">'); 114 win.document.write('<link rel="stylesheet" id="theme" href="/common/css/Theme/\'themeCookie\'.css" type="text/css">'); 115 win.document.write('<link rel="stylesheet" href="/common/css/default/TableSorterStyle.css">'); 116 win.document.write('<link rel="stylesheet" href="/common/css/default/DataTable.css">'); 117 win.document.write('<link rel="stylesheet" type="text/css" href="/common/css/default/demoStyleSheet.css" >'); 118 win.document.write('<style type="text/css">body {width:95%;left:0px;margin:20px;padding:0px}</style>'); 119 var ogcio_1 = $("li:has(hr)").nextAll().hide(); 120 var ogcio_2 = $(".alignRight").remove();
121 win.document.write('<script>'+ ogcio_1 + ogcio_2 +'</script>'); 122*/ 123} 124 125 126function newPopPrint() { 127 if (document.getElementById("content")) { 128 // if (document.readyState=="complete"){ 129 popPrint("content"); 130 // } 131 } 132 // if (document.getElementById("newsContent")) { 133 // if (document.readyState=="complete"){ 134 // popPrint("newsContent"); 135 // } 136 // } 137}; 138 139/* 140if (window.addEventListener) { 141 window.addEventListener("load", init, false); 142} 143else if (window.attachEvent) { 144 window.attachEvent("onload", init); 145} 146*/ 147 148function print_view() { 149 var url = window.location.toString(); 150 var lastIndex = url.lastIndexOf('#'); 151 if(lastIndex != -1){ 152 url = url.substring(0,lastIndex); 153 } 154 155 lastIndex = url.lastIndexOf('?'); 156 if(lastIndex != -1){ 157 url = url.substring(0,lastIndex); 158 } 159 var len = url.length; 160 161 162 var printPage=""; 163 if(url.substring(len-1,len)=="/"){ 164 printPage = url+"index.html" 165 } else { 166 lastIndex = url.lastIndexOf('.'); 167 printPage = url.substring(0,lastIndex) + ".html" 168 } 169 170 if (checkURLexist(printPage)){ 171 win = window.open(printPage+"?print=1", "popup", "width=1024,height=768,scrollbars=yes,resizable=yes"); 172 173 174 }else{ 175 var f = window.location.toString(); 176 var n = f.indexOf("/en/"); 177 var g = f.indexOf("/tc/"); 178 if (n >= 0) { 179 alert("This page does not have Printer View"); 180 } else { 181 if (g >= 0) { 182 alert("éé æ²æåå°çæ¬"); 183 } else { 184 alert("è¿é¡µæ²¡æåå°çæ¬"); 185 } 186 } 187 } 188} 189 190 191function checkURLexist(targetFile){ 192 targetFile = targetFile.replace('#top' , '' ); 193 194 if (window.XMLHttpRequest){ 195 xhttp = new XMLHttpRequest(); 196 xhttp.open("POST", targetFile, false); 197 198 xhttp.send(null); 199 if (xhttp.status == 200) { /* the request has been returned */ 200 return true; 201 }else { 202 return false 203 } 204 } else{ 205 xhttp = new ActiveXObject("Microsoft.XMLHTTP"); 206 xhttp.open("GET", targetFile, false); 207 208 xhttp.send(null); 209 if (xhttp.status == 200) { /* the request has been returned */ 210 return true; 211 }else { 212 return false 213 } 214 } 215 return true ; 216 217} 218 219(function ($) { 220 jQuery.fn.isPrintPopup = function () { 221 var href = window.location.href; 222 var vars = [], hash; 223 var hashes = href.slice(href.indexOf('?') + 1).split('&'); 224 for (var i = 0; i < hashes.length; i++) { 225 hash = hashes[i].split('='); 226 vars[hash[0]] = hash[1]; 227 if (hash[0] == 'print' && hash[1] == 1) 228 return true; 229 } 230 return false; 231 } 232 233 if ($(window).isPrintPopup()) { 234 235 // $('link[media=screen]').remove(); 236 // $('head').prepend("<link rel='stylesheet' href='/" + lang + "/css/print.css' media='screen' />"); 237 238 $('head').prepend("<link rel='stylesheet' href='/sites/all/modules/kanhan_header/css/print.css' media='screen' />"); 239 $(document).ready(function(){ 240 var tx_close = ["Close","éé","å ³é"]; 241 var tx_print = ["Print","åå°","åå°"]; 242 $('#main').css("background","none"); 243 $("#page").before("<div style='text-align:right; width:1000px; margin:3px auto'><input class='printBtn' type='button' value='"+tx_print[lang_id()]+"' onclick='javascript:window.print();'/> <input class='closeBtn' type='button' value='"+tx_close[lang_id()]+"' onclick='javascript:window.close();'/></div><HR>"); 244 }); 245 // popPrint("main"); 246 // window.print(); 247 } 248}(jQuery));
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.