1var g_BrowserType = getBrowserType(); 2 3function getBrowserType() 4{ 5 var ua = navigator.userAgent; 6 7 if(ua.split('AppleWebKit/')[1]) 8 return "safari"; 9 else if(ua.split('Konqueror/')[1]) 10 return "konqueror"; 11 else if(ua.split('Gecko/')[1]) 12 return "gecko"; 13 else if (!!window.opera && (typeof XMLHttpRequest) == 'function') 14 return "opera"; 15 else if (!!window.ActiveXObject) 16 return "msie"; 17 else 18 return "unknown"; 19 20} 21 22function checkAjaxBrowser() 23{ 24 var a, ua = navigator.userAgent; 25 26 this.bw = 27 { 28 safari : ((a=ua.split('AppleWebKit/')[1]) ? a.split('(')[0]:0) >=124, 29 konqueror : ((a=ua.split('Konqueror/')[1]) ? a.split('(')[0]:0) >=124, 30 mozes : ((a=ua.split('Gecko/')[1]) ? a.split('(')[0]:0) >=124, 31 opera : (!!window.opera) && ((typeof XMLHttpRequest) == 'function'), 32 msie : (!!window.ActiveXObject) ? (!!createHttpRequest()) : false 33 } 34 35 return (this.bw.safari || this.bw.konqueror || this.bw.mozes || this.bw.opera || this.bw.msie); 36} 37 38function createHttpRequest() 39{ 40 if(window.ActiveXObject) 41 { 42 try 43 { 44 return new ActiveObject("Msxml2.XMLHTTP"); 45 } 46 catch(e) 47 { 48 try 49 { 50 return new ActiveXObject("Microsoft.XMLHTTP"); 51 } 52 catch(e2) 53 { 54 return null; 55 } 56 } 57 } 58 else if(window.XMLHttpRequest) 59 { 60 return new XMLHttpRequest(); 61 } 62 else 63 return null; 64} 65 66function sendRequest(callback, data, method, url, async, sload, user, password) 67{ 68 var oj = createHttpRequest(); 69 70 if(oj == null) 71 return null; 72 73 var sload = (!!sendRequest.arguments[5]) ? sload:false; 74 if(sload || method.toUpperCase() == 'GET') 75 url += "?"; 76 if(sload) 77 url = url + "t=" + (new Date()).getTime(); 78 79 var bwoj = new checkAjaxBrowser(); 80 81 var opera = bwoj.bw.opera; 82 var safari = bwoj.bw.safari; 83 var konqueror = bwoj.bw.konqueror; 84 var mozes = bwoj.bw.mozes; 85 86 if(opera || safari || mozes) 87 { 88 oj.onload = function() 89 { 90 callback(oj); 91 } 92 } 93 else 94 { 95 oj.onreadystatechange = function() 96 { 97 if(oj.readyState == 4) 98 { 99 callback(oj); 100 } 101 } 102 } 103 104 data = uriEncode(data); 105 106 if(method.toUpperCase() == 'GET') 107 url += data; 108 109 oj.open(method, url, async, user, password); 110 setEncHeader(oj); 111 oj.send(data); 112 113 function setEncHeader(oj) 114 { 115 //var contentTypeUrlenc = 'application/x-www-form-urlencoded; charset=UTF-8'; 116 var contentTypeUrlenc = 'application/x-www-form-urlencoded'; 117 //var contentTypeUrlenc = 'application/x-www-form-urlencoded;charset=euc-kr'; 118 if(!window.opera) 119 { 120 oj.setRequestHeader('Content-Type', contentTypeUrlenc); 121 } 122 else 123 { 124 if((typeof oj.setRequestHeader) == 'function') 125 { 126 oj.setRequestHeader('Content-Type', contentTypeUrlenc); 127 } 128 } 129 return oj; 130 } 131 132 function uriEncode(data) 133 { 134 if(data != '') 135 { 136 var encdata = ''; 137 var datas = data.split('&'); 138 139 for(i = 1; i < datas.length; i++) 140 { 141 var dataq = datas[i].split('='); 142 encdata += '&' + encodeURIComponent(dataq[0]) + '=' + encodeURIComponent(dataq[1]); 143 } 144 } 145 else 146 { 147 encdata = ''; 148 } 149 return encdata; 150 } 151 152 return oj; 153}
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.