PageSourceSearch

https://www.jobforum.tw/includesU/default.js?v=151013

js jobforum.tw collected 2026-10-01 14:47:05 UTC 41,961 bytes, 882 lines download raw bytes

1function chkFindSalaryIndex() {
2	if ($('#c3').val() == '' && $('#d6').val() == '' && $('#t3').val() == '') {
3		alert('地區、職務或行業請至少輸入一項設定');
4		return false;
5	}
6	document.forms['searchform4'].submit();
7}
8
9function chkFindSkill(stype) {
10    if (!(stype == 3)) { $('#S4facet').val(''); }
11    var sckey = $('#sckey').val();
12    keys = sckey.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
13    if (keys.indexOf('關鍵字(專長|證照)') >= 0) { keys = ''; $('#sckey').val(''); }
14    if ((keys.indexOf('關鍵字(專長|證照)') >= 0 || keys.length < 1 || (keys.indexOf('股份') == 0 && keys.length <= 6) || (keys.indexOf('份有') == 0 && keys.length <= 6) || (keys.indexOf('有限') == 0 && keys.length <= 4) || (keys.indexOf('限公') == 0 && keys.length <= 4) || (keys.indexOf('公司') == 0 && keys.length <= 4)) && $('#skill').val() == '' && $('#certify').val() == '') {
15        $('#sckey').val('關鍵字(專長|證照)');
16        alert('專長、證照或關鍵字請至少輸入一項設定');
17        return false;
18    } else if (keys.length > 0 && keys.length < 2) {
19        alert('查詢關鍵字請至少輸入兩個字');
20        return false;
21    }
22    document.forms['searchform7'].submit();
23}
24
25
26function chkForm1(x) {
27  var dutyV, cityV
28  d = document.searchform1
29  if (x == 1) {
30    d.SearchItem.value = '職務'
31    dutyV = document.forms['searchform1']['duty0'].value;
32    cityV = document.forms['searchform1']['city0'].value;
33  } else {
34    d.SearchItem.value = '公司'
35    d.tradeOrgan.value = d.trade0.value;
36    dutyV = document.forms['searchform1']['dutyOrgan'].value;
37    cityV = document.forms['searchform1']['cityOrgan'].value;
38    //		document.forms['searchform1']['duty0'].value=document.forms['searchform1']['dutyOrgan'].value;
39    //		document.forms['searchform1']['city0'].value=document.forms['searchform1']['cityOrgan'].value;
40  }
41
42
43  var strKeyword = document.forms['searchform1']['keys'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
44
45  var keyStt = (strKeyword.indexOf('請輸入') >= 0
46            || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6)
47            || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6)
48            || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4)
49            || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4)
50            || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))
51  if (keyStt) {
52    alert('請輸入明確的關鍵字'); return false;
53  } else if (d.trade0.value == '' && dutyV == '' && cityV == '' && (keyStt || strKeyword.length <= 0)) {
54    alert('職務、地區、行業或關鍵字請至少輸入一項設定'); return false;
55  } else if (d.trade0.value == '' && dutyV == '' && cityV == '' && x != 1 && strKeyword.length < 2) {
56    alert('查詢公司關鍵字請至少輸入兩個字'); return false;
57  }
58
59  document.forms['searchform1']['keys'].value = strKeyword.replace('&', '&');
60  redir(23459);
61  //    var query = 'SearchSubmit=' + escape('送出');
62  //    query = query + '&duty0=' + document.forms['searchform1']['duty0'].value;
63  //    query = query + '&city0=' + document.forms['searchform1']['city0'].value;
64  //    query = query + '&trade0=' + document.forms['searchform1']['trade0'].value;
65  //    query = query + '&keys=' + escape(document.forms['searchform1']['keys'].value);
66  //    if (document.forms['searchform1']['fullSearch'].checked == true) {
67  //        query = query + '&fullSearch=' + document.forms['searchform1']['fullSearch'].value;
68  //    }
69  //    query = query + '&cityOrgan=' + document.forms['searchform1']['cityOrgan'].value;
70  //    query = query + '&tradeOrgan=' + document.forms['searchform1']['tradeOrgan'].value;
71  //    query = query + '&SearchItem=' + escape(document.forms['searchform1']['SearchItem'].value);
72  //    document.forms['searchform1'].action = '/job-bank/job-index.asp?' + query
73  if (document.forms['searchform1']['duty0Argu'] != '' && document.forms['searchform1']['duty0Argu'] != null) { document.forms['searchform1']['duty0Argu'].value = ''; }
74  if (document.forms['searchform1']['city0Argu'] != '' && document.forms['searchform1']['city0Argu'] != null) { document.forms['searchform1']['city0Argu'].value = ''; }
75  if (document.forms['searchform1']['trade0Argu'] != '' && document.forms['searchform1']['trade0Argu'] != null) { document.forms['searchform1']['trade0Argu'].value = ''; }
76  if (document.forms['searchform1']['major0Argu'] != '' && document.forms['searchform1']['major0Argu'] != null) { document.forms['searchform1']['major0Argu'].value = ''; }
77  document.forms['searchform1'].submit();
78}
79
80function chkSkillForm(x) {
81  if (x.skill.value.length == 0 && x.certify.value.length == 0 && x.keys.value.length == 0) {
82    alert('請輸入專長或證照或關鍵字')
83    return false;
84  }
85}
86
87function setHref(lNo) {
88  $.post('/includes_xml/linkRedirMain.asp', { 'lNo': lNo }
89	);
90}
91
92function checkItem(strFun, strVal, divName) {
93  var http_request = false;
94  if (window.XMLHttpRequest) { // Mozilla, Safari,...
95    http_request = new XMLHttpRequest();
96  } else if (window.ActiveXObject) { // IE
97    try {
98      http_request = new ActiveXObject("Msxml2.XMLHTTP");
99    } catch (e) {
100      try {
101        http_request = new ActiveXObject("Microsoft.XMLHTTP");
102      } catch (e) { }
103    }
104  }
105  if (!http_request) {
106    alert('Cannot create an XMLHTTP instance');
107    return false;
108  }
109  http_request.onreadystatechange = function () {
110    if (http_request.readyState == 4) {
111      if (http_request.status == 200) {
112        IgotIt = http_request.responseText;
113        if (divName == undefined) {
114          done = eval(IgotIt)
115        } else {
116          document.getElementById(divName).innerHTML = IgotIt;
117        }
118      } else {
119        if (document.getElementById(divName) != null) {
120          document.getElementById(divName).innerHTML = http_request.responseText;
121        } else {
122          alert('There was a problem with the request.');
123        }
124
125      }
126    }
127  };
128  var url = '/includesU/resumeCheckItem.asp?itemfun=' + strFun + '&itemVal=' + escape(strVal)
129  http_request.open('GET', url, true);
130  http_request.send(null);
131}
132
133function checkItemOther(divName, url) {
134  var http_request = false;
135  if (window.XMLHttpRequest) { // Mozilla, Safari,...
136    http_request = new XMLHttpRequest();
137  } else if (window.ActiveXObject) { // IE
138    try {
139      http_request = new ActiveXObject("Msxml2.XMLHTTP");
140    } catch (e) {
141      try {
142        http_request = new ActiveXObject("Microsoft.XMLHTTP");
143      } catch (e) { }
144    }
145  }
146  if (!http_request) {
147    alert('Cannot create an XMLHTTP instance');
148    return false;
149  }
150  http_request.onreadystatechange = function () {
151    if (http_request.readyState == 4) {
152      if (http_request.status == 200) {
153        IgotIt = http_request.responseText;
154        if (divName == undefined) {
155          done = eval(IgotIt);
156        } else {
157          document.getElementById(divName).innerHTML = IgotIt;
158        }
159      } else {
160        if (document.getElementById(divName) != null) {
161          document.getElementById(divName).innerHTML = http_request.responseText;
162        } else {
163          alert('There was a problem with the request.');
164        }
165
166      }
167    }
168  };
169  http_request.open('GET', url, true);
170  http_request.send(null);
171}
172
173function chkLiveSearch(kind, tno, sno, tcolor) { //活版搜尋
174  for (j = 0; j < tno; j++) {
175    var imgShow = document.getElementById(kind + j + '_img');
176    var divShow = document.getElementById(kind + j);
177    if (imgShow != null && divShow != null) {
178      if (j == sno) {
179        //imgShow.src = '/images/default/'+tcolor+'/label0'+(j+1)+'-o.gif';
180        //if(j == 0){
181        //    imgShow.style.backgroundImage = 'url(/images/default/'+tcolor+'/label01-o.gif)';
182        //}else{
183        //   imgShow.style.backgroundImage = 'url(/images/default/'+tcolor+'/label02-o.gif)';
184        //}
185        //imgShow.style.color = '#FFFFFF';
186        divShow.style.display = '';
187        divShow.style.visibility = 'visible';
188        if (document.getElementById('twinsStar') != null) { if (j > 1) { document.getElementById('twinsStar').style.display = 'none'; } else { document.getElementById('twinsStar').style.display = ''; } }
189      } else {
190        //imgShow.src = '/images/default/'+tcolor+'/label0'+(j+1)+'.gif';
191        //if(j == 0){
192        //    imgShow.style.backgroundImage = 'url(/images/default/'+tcolor+'/label01.gif)';
193        //}else{
194        //    imgShow.style.backgroundImage = 'url(/images/default/'+tcolor+'/label02.gif)';
195        //}
196        //if(tcolor == 'blue'){
197        //    imgShow.style.color = '#3C57D0';
198        //}else{
199        //    imgShow.style.color = '#636363';    
200        //}                    
201        divShow.style.display = 'none';
202        divShow.style.visibility = 'hidden';
203      }
204    }
205  }
206}
207
208function chkBanner(kind, tno, sno) {
209  //var divKind = document.getElementById(kind);
210  for (j = 0; j < tno; j++) {
211    var imgShow = document.getElementById(kind + j + '_img');
212    if (imgShow != null) {
213      if (j == sno) {
214        imgShow.src = '/images/icon_' + (j + 1) + 'on.gif';
215      } else {
216        imgShow.src = '/images/icon_' + (j + 1) + 'off.gif';
217      }
218    }
219  }
220  for (i = 0; i < tno; i++) {
221    var divShow = document.getElementById(kind + i);
222    if (divShow != null) {
223      if (i == sno) {
224        //divKind.style.display = 'none';
225        divShow.style.display = '';
226      } else {
227        divShow.style.display = 'none';
228      }
229    }
230  }
231
232  if (document.getElementById('twinsStart') != null) { document.getElementById('twinsStart').style.display = 'none' }
233}
234
235function chkMore(kind, rep) {
236  if (rep != 0) { var intRep = rep - 1; rep == 1; }
237  if (intRep == 0 || rep == 0) {
238    for (i = 0; i < 99; i++) {
239      var divKind = document.getElementById('tr' + kind + i);
240      if (divKind != null) {
241        if (divKind.style.display == '') {
242          var x = i + 1;
243          if (document.getElementById('tr' + kind + x) != null) {
244            document.getElementById('tr' + kind + x).style.display = '';
245            divKind.style.display = 'none';
246          } else {
247            divKind.style.display = 'none';
248            document.getElementById('tr' + kind + '0').style.display = '';
249          }
250          break;
251        } else {
252          divKind.style.display = 'none';
253        }
254      } else {
255        if (document.getElementById('tr' + kind + '0') != null) {
256          document.getElementById('tr' + kind + '0').style.display = '';
257        }
258      }
259    }
260  }
261  if (intRep == 1 || rep == 1) { if (intRep == 0) { intRep++ }; setTimeout("chkMore('" + kind + "'," + intRep + ")", 5000); }
262}
263
264function chkMoreMore(kind) {
265  for (i = 0; i < 99; i++) {
266    var divKind = document.getElementById('tr' + kind + i + '0');
267    if (divKind != null) {
268      chkMore(kind + i, 2);
269    }
270  }
271}
272
273function chkRadMore(kind) {
274  for (i = 0; i < 99; i++) {
275    if (document.getElementById('tr' + kind + i) == null) {
276      i--;
277      break;
278    }
279  }
280
281  var maxNum = i;
282  var minNum = 0;
283  var t = Math.floor(Math.random() * (maxNum - minNum + 1)) + minNum;
284  //var now = new Date();
285  //var s = now.getSeconds();
286  //var t = (((s+i)%2)) ;
287  if (i > 0) {
288    for (x = 0; x <= i; x++) {
289      if (x == t) { document.getElementById('tr' + kind + x).style.display = 'block'; } else { document.getElementById('tr' + kind + x).style.display = 'none'; }
290    }
291  }
292}
293
294function redir(lNo) {
295  location.href = '/includes_xml/linkRedir.asp?lNo=' + (lNo);
296}
297
298function chkReset(formName) { //重置清空欄位值
299  if (document.forms[formName]['keys'] != null && document.forms[formName]['keys'] != '') { document.forms[formName]['keys'].value = ''; }
300  if (document.forms[formName]['city0'] != null && document.forms[formName]['city0'] != '') { document.forms[formName]['city0'].value = ''; }
301  if (document.forms[formName]['city1'] != null && document.forms[formName]['city1'] != '') { document.forms[formName]['city1'].value = ''; }
302  if (document.forms[formName]['city2'] != null && document.forms[formName]['city2'] != '') { document.forms[formName]['city2'].value = ''; }
303  if (document.forms[formName]['city0Cht'] != null && document.forms[formName]['city0Cht'] != '') { document.forms[formName]['city0Cht'].value = ''; }
304  if (document.forms[formName]['city1Cht'] != null && document.forms[formName]['city1Cht'] != '') { document.forms[formName]['city1Cht'].value = ''; }
305  if (document.forms[formName]['city2Cht'] != null && document.forms[formName]['city2Cht'] != '') { document.forms[formName]['city2Cht'].value = ''; }
306  if (document.forms[formName]['duty0'] != null && document.forms[formName]['duty0'] != '') { document.forms[formName]['duty0'].value = ''; }
307  if (document.forms[formName]['duty1'] != null && document.forms[formName]['duty1'] != '') { document.forms[formName]['duty1'].value = ''; }
308  if (document.forms[formName]['duty2'] != null && document.forms[formName]['duty2'] != '') { document.forms[formName]['duty2'].value = ''; }
309  if (document.forms[formName]['duty0Cht'] != null && document.forms[formName]['duty0Cht'] != '') { document.forms[formName]['duty0Cht'].value = ''; }
310  if (document.forms[formName]['duty1Cht'] != null && document.forms[formName]['duty1Cht'] != '') { document.forms[formName]['duty1Cht'].value = ''; }
311  if (document.forms[formName]['duty2Cht'] != null && document.forms[formName]['duty2Cht'] != '') { document.forms[formName]['duty2Cht'].value = ''; }
312  if (document.forms[formName]['trade0'] != null && document.forms[formName]['trade0'] != '') { document.forms[formName]['trade0'].value = ''; }
313  if (document.forms[formName]['trade1'] != null && document.forms[formName]['trade1'] != '') { document.forms[formName]['trade1'].value = ''; }
314  if (document.forms[formName]['trade2'] != null && document.forms[formName]['trade2'] != '') { document.forms[formName]['trade2'].value = ''; }
315  if (document.forms[formName]['trade0Cht'] != null && document.forms[formName]['trade0Cht'] != '') { document.forms[formName]['trade0Cht'].value = ''; }
316  if (document.forms[formName]['trade1Cht'] != null && document.forms[formName]['trade1Cht'] != '') { document.forms[formName]['trade1Cht'].value = ''; }
317  if (document.forms[formName]['trade2Cht'] != null && document.forms[formName]['trade2Cht'] != '') { document.forms[formName]['trade2Cht'].value = ''; }
318  if (document.forms[formName]['major0'] != null && document.forms[formName]['major0'] != '') { document.forms[formName]['major0'].value = ''; }
319  if (document.forms[formName]['major1'] != null && document.forms[formName]['major1'] != '') { document.forms[formName]['major1'].value = ''; }
320  if (document.forms[formName]['major2'] != null && document.forms[formName]['major2'] != '') { document.forms[formName]['major2'].value = ''; }
321  if (document.forms[formName]['major0Cht'] != null && document.forms[formName]['major0Cht'] != '') { document.forms[formName]['major0Cht'].value = ''; }
322  if (document.forms[formName]['major1Cht'] != null && document.forms[formName]['major1Cht'] != '') { document.forms[formName]['major1Cht'].value = ''; }
323  if (document.forms[formName]['major2Cht'] != null && document.forms[formName]['major2Cht'] != '') { document.forms[formName]['major2Cht'].value = ''; }
324  if (document.forms[formName]['experience'] != null && document.forms[formName]['experience'] != '') { document.forms[formName]['experience'].selectedIndex = 0; }
325  if (document.forms[formName]['compSkill_Title'] != null && document.forms[formName]['compSkill_Title'] != '') { document.forms[formName]['compSkill_Title'].value = ''; }
326  if (document.forms[formName]['skill'] != null && document.forms[formName]['skill'] != '') { document.forms[formName]['skill'].value = ''; }
327  if (document.forms[formName]['certify_Title'] != null && document.forms[formName]['certify_Title'] != '') { document.forms[formName]['certify_Title'].value = ''; }
328  if (document.forms[formName]['certify'] != null && document.forms[formName]['certify'] != '') { document.forms[formName]['certify'].value = ''; }
329  if (document.forms[formName]['capital'] != null && document.forms[formName]['capital'] != '') { document.forms[formName]['capital'].selectedIndex = 0; }
330  if (document.forms[formName]['staff'] != null && document.forms[formName]['staff'] != '') { document.forms[formName]['staff'].selectedIndex = 0; }
331  if (document.forms[formName]['salary'] != null && document.forms[formName]['salary'] != '') { document.forms[formName]['salary'].selectedIndex = 0; }
332  if (document.forms[formName]['grade'] != null && document.forms[formName]['grade'] != '') { for (i = 0; i < document.forms[formName]['grade'].length; i++) { document.forms[formName]['grade'][i].checked = false; document.forms[formName]['grade'].selectedIndex = 0; } }
333  if (document.forms[formName]['character'] != null && document.forms[formName]['character'] != '') { for (i = 0; i < document.forms[formName]['character'].length; i++) { document.forms[formName]['character'][i].checked = false; } }
334  if (document.forms[formName]['attribute'] != null && document.forms[formName]['attribute'] != '') { for (i = 0; i < document.forms[formName]['attribute'].length; i++) { document.forms[formName]['attribute'][i].checked = false; } }
335  if (document.forms[formName]['benefit'] != null && document.forms[formName]['benefit'] != '') { for (i = 0; i < document.forms[formName]['benefit'].length; i++) { document.forms[formName]['benefit'][i].checked = false; } }
336}
337
338
339function chkKeysDuty() {
340
341
342  var dutyV = document.forms['searchform1']['duty0'].value;
343  var cityV = document.forms['searchform1']['city0'].value;
344
345  var strKeyword = document.forms['searchform1']['keys'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
346  if (dutyV == '' && cityV == '' && (strKeyword.indexOf('請輸入') >= 0 || strKeyword.length < 1 || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))) {
347    alert('職務、地區或關鍵字請至少輸入一項設定');
348  } else if ((dutyV != '' || cityV != '') && (strKeyword.indexOf('請輸入') >= 0 || strKeyword.length < 2 || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))) {
349    document.forms['searchform1']['keys'].value = '';
350    redir(23459);
351    document.forms['searchform1'].submit();
352  } else {
353    document.forms['searchform1']['keys'].value = strKeyword.replace('&', '');
354    redir(23459);
355    document.forms['searchform1'].submit();
356  }
357
358
359
360}
361
362function chkKeysOrg() {
363  var tradeV = document.forms['searchform2']['tradeOrgan'].value;
364  var cityV = document.forms['searchform2']['cityOrgan'].value;
365  var strKeyword = document.forms['searchform2']['keys'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
366  if (tradeV == '' && cityV == '' && (strKeyword.indexOf('請輸入') >= 0 || strKeyword.length < 2 || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))) {
367    alert('行業、地區或關鍵字請至少輸入一項設定');
368  } else if ((tradeV != '' || cityV != '') && (strKeyword.indexOf('請輸入') >= 0 || strKeyword.length < 2 || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6) || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4) || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))) {
369    document.forms['searchform2']['keys'].value = '';
370    redir(23460);
371    document.forms['searchform2'].submit();
372  } else {
373    document.forms['searchform2']['keys'].value = strKeyword.replace('&', '');
374    redir(23460);
375    document.forms['searchform2'].submit();
376  }
377
378}
379
380
381function chkKeysEmpNo() {
382  var strKeyword = document.forms['searchform4']['keys'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
383
384  if (isNaN(strKeyword) || strKeyword.length == 0) {
385    alert('請輸入明確的職缺碼!');
386  } else {
387    document.forms['searchform4'].action = '/job-bank/job-description.asp?mid=searcheNo&agent=home2010_searcheNo&eNo=' + document.getElementById('findemp').value
388    redir(103069);
389    document.forms['searchform4'].submit();
390  }
391}
392
393function onover(transfer_kind) {
394  if (document.getElementById(transfer_kind) != null && document.getElementById(transfer_kind) != '') { document.getElementById(transfer_kind).style.display = ''; }
395
396}
397
398function onout(transfer_kind) {
399  if (document.getElementById(transfer_kind) != null && document.getElementById(transfer_kind) != '') { document.getElementById(transfer_kind).style.display = 'none'; }
400}
401
402function MM_showHideLayers() { //v6.0
403  var i, p, v, obj, args = MM_showHideLayers.arguments;
404  for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) {
405    v = args[i + 2];
406    if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
407    obj.visibility = v;
408  }
409}
410
411function MM_findObj(n, d) { //v4.01
412  var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
413    d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
414  }
415  if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
416  for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
417  if (!x && d.getElementById) x = d.getElementById(n); return x;
418}
419
420function DisplayNF(id) {
421  (document.getElementById(id).style.display == 'none') ? document.getElementById(id).style.display = 'block' : document.getElementById(id).style.display = 'none';
422}
423
424function setCookie(CookieName, CookieString, Expires, timeUnit) {
425  if ((CookieName != null) && (CookieString != null)) {
426    if (Expires == null)
427      document.cookie = CookieName + "=" + escape(CookieString)
428    else {
429      Expires = eval(Expires);
430      setDay = new Date();
431
432      if (timeUnit == null)
433        timeUnit = "day";
434
435      switch (timeUnit) {
436        case "week":
437          setDay.setTime(setDay.getTime() + (Expires * 1000 * 60 * 60 * 24 * 7));
438          break;
439        case "day":
440          setDay.setTime(setDay.getTime() + (Expires * 1000 * 60 * 60 * 24));
441          break;
442        case "hour":
443          setDay.setTime(setDay.getTime() + (Expires * 1000 * 60 * 60));
444          break;
445        case "minute":
446          setDay.setTime(setDay.getTime() + (Expires * 1000 * 60));
447          break;
448        case "second":
449          setDay.setTime(setDay.getTime() + (Expires * 1000));
450          break;
451        default:
452          setDay.setTime(setDay.getTime() + (Expires * 1000 * 60 * 60 * 24));
453      }
454
455      expTime = setDay.toGMTString();
456      document.cookie = CookieName + "=" + escape(CookieString) + ";expires=" + expTime;
457    }
458
459    //寫完cookie順便把上方連結換掉
460    setlastMenu();
461    return true;
462
463  }
464  return false;
465}
466
467
468function getCookie(CookieName) {
469
470  CookieName += "=";
471  theCookie = document.cookie + ";";
472  start = theCookie.indexOf(CookieName);
473
474  if (start != -1) {
475    End = theCookie.indexOf(";", start);
476    return unescape(theCookie.substring(start + CookieName.length, End));
477  }
478}
479
480function allService() {
481  if ($('#menu5').css('display') == 'none') {
482      //$('#services').html('<img src="/images102/cut.png" border="0"/>');
483      $('#services').html('收合>');
484    $('#services').attr('title', '較少服務');
485    $('#[id^=menu]').each(function () {
486      $('#' + $(this).attr("id")).css('display', '');
487    });
488    $('#subNav').attr('style', 'border:solid 1px #79A6D2;border-bottom:inset 2px #85ADD6;border-right:inset 2px #85ADD6;')  //藍色
489  } else {
490    //$('#services').html('<img src="/images102/plus.png" border="0"/>');
491    $('#services').html('更多>');
492    $('#services').attr('title', '全部服務');
493    $('#[id^=menu]').each(function () {
494      $('#' + $(this).attr("id")).css('display', 'none');
495    });
496    $('#subNav').attr('style', 'border-right:solid 1px #e0e1e2;border-bottom:solid 1px #e0e1e2;')
497  }
498}
499
500function setlastMenu() {
501  var lastclickDiv = document.getElementById("lastclick");
502  var hlc = "";
503  var hlccontent;
504  hlc = getCookie("hlc");
505  if (hlc != undefined) {
506    hlccontent = $('#' + hlc).parent().html();
507    $('#lastclick').html(hlccontent);
508  } else {
509    if ($.browser.msie && $.browser.version == "7.0") {
510      $('#lastclick').css('display', 'none');
511      //$('#jobNice').css('margin-top', '370px');
512    }
513
514  }
515}
516function chkhint(frmindex) {
517  var frmob = document.forms["searchform" + frmindex];
518  switch (frmindex) {
519    case 1: //找工作
520      if ($('#d0Cht').val() == "") { $('#d0Cht').val('職務').css('color','#666'); }
521      if ($('#c0Cht').val() == "") { $('#c0Cht').val('地區').css('color', '#666'); }
522      if ($('#t0Cht').val() == "") { $('#t0Cht').val('行業').css('color', '#666'); }
523      //if ($('#keys1').val() == "") { $('#keys1').val('關鍵字').css('color', '#666'); }
524      break;
525    case 2: //找公司
526    	if ($('#tradeOrganCht').val() == "") { $('#tradeOrganCht').val('行業').css('color', '#666'); }
527    	if ($('#cityOrganCht').val() == "") { $('#cityOrganCht').val('地區').css('color', '#666'); }
528    	//if ($('#keys2').val() == "") { $('#keys2').val('關鍵字(公司)').css('color', '#666'); }
529      break;
530    case 3: //產品找工作
531    	if ($('#tradeProdCht').val() == "") { $('#tradeProdCht').val('行業').css('color', '#666'); }
532    	if ($('#cityBCht').val() == "") { $('#cityBCht').val('地區').css('color', '#666'); }
533    	if ($('#keys3').val() == "") { $('#keys3').val('關鍵字(產品)').css('color', '#666'); }
534    	if ($('#t1Cht').val() == "") { $('#t1Cht').val('行業').css('color', '#666'); }
535    	if ($('#cityOrganCht').val() == "") { $('#cityOrganCht').val('地區').css('color', '#666'); }
536  
537  		break;
538    case 4: //地圖找工作
539		var x = $("#srhMapGroup").val();
540		if (x == 0 ) {
541			if ($('#workcityCht').val() == "") { $('#workcityCht').val('選擇縣市').css('color', '#666'); }
542		} else if (x == 1) {
543			if ($('#mrtCht').val() == '') {$('#mrtCht').val('請選擇捷運站').css('color', '#666');return false; }
544		} else if (x == 2) {
545			if ($('#schoolCht').val() == '') {$('#schoolCht').val('請選擇學校').css('color', '#666');return false; }
546		} else if (x == 3) {
547            if ($('#traCht').val() == '') { $('#traCht').val('請選擇火車站').css('color', '#666'); return false; }
548        } else if (x == 4) {
549            if ($('#shoppingCht').val() == '') { $('#shoppingCht').val('請選擇熱門商圈').css('color', '#666'); return false; }
550        }
551      break;
552    case 5: //薪資找工作
553    	if ($('#dutyCht').val() == "") { $('#dutyCht').val('職務').css('color', '#666'); }
554      break;
555  	case 6: //專長找工作
556  		if ($('#c2Cht').val() == "") { $('#c2Cht').val('地區').css('color', '#666'); }
557  		if ($('#skillVal').val() == "") { $('#skillVal').val('專長').css('color', '#666'); }
558  		if ($('#certifyVal').val() == "") { $('#certifyVal').val('證照').css('color', '#666'); }
559  		break;
560		case 7: //家教
561			if ($('#sDuty0Cht').val() == "") { $('#sDuty0Cht').val('授課科目').css('color', '#666'); }
562			if ($('#sCity0Cht').val() == "") { $('#sCity0Cht').val('地區').css('color', '#666'); }
563			if ($('#sTrade0Cht').val() == "") { $('#sTrade0Cht').val('授課對象').css('color', '#666'); }
564			break;
565  	case 8: //工讀
566  		if ($('#dutyBCht').val() == "") { $('#dutyBCht').val('職務').css('color', '#666'); }
567  		if ($('#WorkCityCht').val() == "") { $('#WorkCityCht').val('地區').css('color', '#666'); }
568  		break;
569  }
570}
571
572function hideorgan() {
573	if ($("#d0").val() == '') {
574		$("#corpSearch").show();
575	} else {
576		$("#corpSearch").hide();
577	}
578}
579
580$(document).ready(function () {
581	try
582	{
583	   //在此运行代码
584	  if ($('#d0Cht').val() == "") { $("#d0Cht").val('職務'); }
585	  if ($('#c0Cht').val() == "") { $("#c0Cht").val('地區'); }
586	  if ($('#t0Cht').val() == "") { $("#t0Cht").val('行業'); }
587	  //if ($('#cityOrganCht').val() == "") { $("#cityOrganCht").val('地區'); }
588	  //if ($('#tradeOrganCht').val() == "") { $("#tradeOrganCht").val('行業'); }
589	  if ($('#tradeProdCht').val() == "") { $("#tradeProdCht").val('行業'); }
590	  if ($('#cityBCht').val() == "") { $("#cityBCht").val('地區'); }
591	  if ($('#dutyCht').val() == "") { $("#dutyCht").val('職務'); }
592	
593	  $("#gradeItems").delegate("li", "mouseover", function () {
594		$('#gradeItems li').each(function () { $(this).removeClass('ac_over'); });
595		$(this).addClass('ac_over');
596	  });
597	  $("#gradeItems").delegate("li", "click", function () {
598		if ($(this).attr('data-val') != "") {
599		  $("#gradeItems").hide();
600		  $('#gradeCht').val($(this).html());
601		  $('#grade').val($(this).attr('data-val'));
602		}
603	  });
604	
605	  $("#experienceItems").delegate("li", "mouseover", function () {
606		$('#experienceItems li').each(function () { $(this).removeClass('ac_over'); });
607		$(this).addClass('ac_over');
608	  });
609	  $("#experienceItems").delegate("li", "click", function () {
610		if ($(this).attr('data-val') != "") {
611		  $("#experienceItems").hide();
612		  $('#experienceCht').val($(this).html());
613		  $('#experience').val($(this).attr('data-val'));
614		}
615	  });
616	  
617	}
618	catch(err)
619	{
620	   //在此处理错误
621	}
622  
623});
624
625function chkKeysProduct() {
626  d = document.forms["searchform3"];
627  var strKeyword = document.forms['searchform3']['keys'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
628  if (strKeyword.indexOf('產品關鍵字') >= 0) { strKeyword = '' }
629  var keyStt = (strKeyword.indexOf('關鍵字') >= 0
630            || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6)
631            || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6)
632            || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4)
633            || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4)
634            || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))
635  var trdaeV = 0
636  var cityV = 0
637  tradeV = d.tradeProd.value;
638  cityV = d.cityB.value;
639  //	    d.t0.value = d.tradeProd.value;
640  //		d.c0.value = d.cityB.value;
641
642  /*	if(document.forms['searchform3']['cityB'] != ''){document.forms['searchform3']['c0'].value = document.forms['searchform3']['cityB'].value;}
643  if (document.forms['searchform3']['tradeProd'] != '') { document.forms['searchform3']['t0'].value = document.forms['searchform3']['tradeProd'].value; }*/
644
645
646  if (tradeV == 0 && cityV == 0 && (keyStt || strKeyword.length <= 0)) {
647    alert('行業、地區或關鍵字請至少輸入一項設定'); return false;
648  } else if (tradeV == 0 && cityV == 0 && strKeyword.length < 2) {
649    alert('查詢關鍵字請至少輸入兩個字'); return false;
650  } else {
651    document.forms['searchform3'].submit();
652  }
653}
654function chkMrtIndex() {
655  if ($('#srhMapGroup').val() == '1' && $('#mrtArea').val() == '1') { $('#TPmrt').val($('#mrtVal').val()); $('#KSmrt').val(''); } else if ($('#srhMapGroup').val() == '1' && $('#mrtArea').val() == '2') { $('#KSmrt').val($('#mrtVal').val()); $('#TPmrt').val(''); } else { $('#TPmrt').val(''); $('#KSmrt').val(''); }
656}
657function chkKeysEmpNoIndex() {
658  var strKeyword = document.forms['searchform5']['keys5'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
659
660  if (isNaN(strKeyword) || strKeyword.length == 0) {
661    alert('請輸入正確的職缺代碼!');
662  } else {
663    document.forms['searchform5'].action = '/job-bank/job-description.asp?mid=searcheNo&agent=home2010_searcheNo&eNo=' + document.getElementById('keys5').value
664    document.forms['searchform5'].submit();
665  }
666}
667
668function chkSalaryIndex() {
669  if ($('#duty').val() == '') { alert('請選擇職務類別'); return false; }
670  if ($('#grade').val() == '') { alert('請選擇教育程度'); return false; }
671  if ($('#experience').val() == '') { alert('請選擇工作年資'); return false; }
672  document.forms['searchform4'].submit();
673}
674
675function chkKeysProductIndex() {
676  d = document.forms["searchform3"];
677  var strKeyword = document.forms['searchform3']['ks'].value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
678  if (strKeyword.indexOf('關鍵字(產品)') >= 0) { strKeyword = '' }
679  var keyStt = (strKeyword.indexOf('關鍵字') >= 0
680            || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6)
681            || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6)
682            || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4)
683            || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4)
684            || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))
685  var trdaeV = 0;
686  var cityV = 0;
687  tradeV = d.tradeProd.value;
688  cityV = d.cityB.value;
689  d.t0.value = d.tradeProd.value;
690  d.c0.value = d.cityB.value;
691
692  if (document.forms['searchform3']['cityB'] != '') { document.forms['searchform3']['c0'].value = document.forms['searchform3']['cityB'].value; }
693  if (document.forms['searchform3']['tradeProd'] != '') { document.forms['searchform3']['t0'].value = document.forms['searchform3']['tradeProd'].value; }
694
695
696  if (tradeV == 0 && cityV == 0 && (keyStt || strKeyword.length <= 0)) {
697    alert('行業、地區或關鍵字請至少輸入一項設定'); return false;
698  } else if (tradeV == 0 && cityV == 0 && strKeyword.length < 2) {
699    alert('查詢關鍵字請至少輸入兩個字'); return false;
700  } else {
701    if (document.forms['searchform3'].ks.value == '關鍵字(產品)') {
702      document.forms['searchform3'].ks.value = "";
703    }
704    document.forms['searchform3'].submit();
705  }
706}
707
708function chkJobIndex() {
709  d = document.forms["searchform1"];
710  var dutyV = d.d0.value;
711  var cityV = d.c0.value;
712  var tradeV = d.t0.value;
713
714  d.ks.focus();
715	var strKeyword = d.ks.value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
716  //if (strKeyword.indexOf('關鍵字') >= 0) { strKeyword = '';d.ks.value = ''; }
717
718  var keyStt = (strKeyword.indexOf('請輸入') >= 0
719            || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6)
720            || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6)
721            || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4)
722            || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4)
723            || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))
724
725//  if (dutyV == 0 && cityV == 0 && tradeV == 0 && (keyStt || strKeyword.length <= 0)) {
726//        //20141128 洪副指示不用設定條件,如無條件搜尋結果限制筆數
727//      //alert('職務、地區、行業或關鍵字請至少輸入一項設定');
728//      //return false;
729//      //華董說要恢復原有的,不要有預設值2013/10/16
730//      //ESO102082906 
731//      //if ($("#si").val() == '2') {
732//      //    location.href = '/job-bank/job-index.asp?ss=s&t1=101000,100700,100200&si=2&tk=&ps=40&trans=1';
733//      //} else {
734//      //    location.href = '/job-bank/job-index.asp?ss=s&tt=1,2,4,16&flag=1&si=1&ps=40&trans=1';
735//      //}
736
737//  } else
738      if (dutyV == 0 && cityV == 0 && tradeV == 0 && strKeyword.length < 2 && strKeyword.length > 0) {
739    alert('查詢關鍵字請至少輸入兩個字'); 
740    return false;
741  } else {
742    /*
743	if (d.ks.value == '關鍵字') {
744      d.ks.value = '';
745    } else {*/
746      d.ks.value = strKeyword.replace('&', '&');
747    /*}
747*/
748	
749    d.submit();
750  }
751}
752
753function chkOrganIndex() {
754  d = document.forms["searchform2"];
755  var tradeV = d.tradeOrgan.value;
756  var cityV = d.cityOrgan.value;
757  d.t0.value = tradeV;
758  d.c0.value = cityV;
759
760  var strKeyword = d.ks.value.replace(/^[\s]+/g, '').replace(/[\s]+$/g, '').replace(/[ ]/g, '');
761  if (strKeyword.indexOf('關鍵字(職缺)') >= 0 || strKeyword.indexOf('關鍵字(公司)') >= 0) { strKeyword = '' }
762
763  var keyStt = (strKeyword.indexOf('關鍵字') >= 0
764            || (strKeyword.indexOf('股份') == 0 && strKeyword.length <= 6)
765            || (strKeyword.indexOf('份有') == 0 && strKeyword.length <= 6)
766            || (strKeyword.indexOf('有限') == 0 && strKeyword.length <= 4)
767            || (strKeyword.indexOf('限公') == 0 && strKeyword.length <= 4)
768            || (strKeyword.indexOf('公司') == 0 && strKeyword.length <= 4))
769
770  if (tradeV == 0 && cityV == 0 && (keyStt || strKeyword.length <= 0)) {
771    alert('行業、地區或關鍵字請至少輸入一項設定'); return false;
772  } else if (tradeV == 0 && cityV == 0 && strKeyword.length < 2) {
773    alert('查詢關鍵字請至少輸入兩個字'); return false;
774  } else {
775    if (d.ks.value == '關鍵字(職缺)' || d.ks.value == '關鍵字(公司)') {
776      d.ks.value = '';
777    } else {
778      d.ks.value = strKeyword.replace('&', '&');
779    }
780    d.submit();
781  }
782}
783
784function showItems(listob, txtob, closeob1, closeob2) {
785  if ($('#' + listob).css('display') == 'none') {
786    $('#' + listob).css('left', $('#' + txtob).position().left).show();
787    $('#' + closeob1).hide();
788    if (closeob2 != "") { $('#' + closeob2).hide(); }
789  } else {
790    $('#' + listob).hide();
791  }
792}
793function changeMapMenu_new(inx, lno) {
794    var arr = new Array("shK1", "shK2", "shK3", "shK4", "shK5");
795  for (i = 0; i < arr.length; i++) {
796    $('#' + arr[i]).hide();
797  }
798  switch (inx) {
799    case 0:
800      $("#shK1").show();
801      $('#srhMapGroupCht').val('地址附近');
802      break;
803    case 1:
804      //$.get('/jobmap/getList102.asp', { 'k': 'm', 'area': 'TP' }, function (data) { $('#mrtItems').html(data); });
805      $("#shK2").show();
806      $('#srhMapGroupCht').val('捷運附近');
807      break;
808    case 2:
809      //$.get('/jobmap/getList102.asp', { 'k': 's' }, function (data) { $('#schItems').html(data); });
810      $("#shK3").show();
811      $('#srhMapGroupCht').val('學校附近');
812      break;
813    case 3:
814      //$.get('/jobmap/getList102.asp', { 'k': 't' }, function (data) { $('#trainItems').html(data); });
815      $("#shK4").show();
816      $('#srhMapGroupCht').val('火車站附近');
817      break;
818    case 4:
819      //$.get('/jobmap/getList102.asp', { 'k': 't' }, function (data) { $('#trainItems').html(data); });
820      $("#shK5").show();
821      $('#srhMapGroupCht').val('熱門商圈附近');
822      break;
823  }
824  $('#srhMapGroup').val(inx);
825  $("#srhKind").val(inx + 1);
826  //if (lno != "") { setHref(lno); }
827  $('#srhMapGroupItems').css('display', 'none');
828}
829function chCo(inx) {
830  switch (inx) {
831    case 1:
832      $('#timeEMP').addClass('on');
833      $('#freeEMP').removeClass('on');
834      $('#freeEMPcontent').attr('class', 'closeBox boxL');
835      $('#timeEMPcontent').attr('class', 'boxL');
836      $('#EMPmore').attr('href', '//www.1111.com.tw/12SP/immediately/');
837      break;
838    case 2:
839      $('#timeEMP').removeClass('on');
840      $('#freeEMP').addClass('on');
841      $('#timeEMPcontent').attr('class', 'closeBox boxL');
842      $('#freeEMPcontent').attr('class', 'boxL');
843      $('#EMPmore').attr('href', '//www.1111.com.tw/11sp/hot/index.asp?k=9');
844      break;
845  }
846}
847
848
849function saveJobSearchData(rulestr) {
850    try{
851        var objJobSearchLog = $("#JobSearchLog")[0].getSODataAll();
852        var objsearchrule = objJobSearchLog['searchrule'];
853        var savedata = location.search + rulestr;
854        if (rulestr.length > 0) {
855            if (objsearchrule == 'underfined' || objsearchrule == null) { objsearchrule = ''; }
856            if (objsearchrule.indexOf(savedata) == -1) {
857                objsearchrule = savedata + objsearchrule;
858            }
859            $("#JobSearchLog")[0].saveSOData('searchrule', objsearchrule, 0);
860        }
861        updateEViewData(objsearchrule);
862    }catch(e){
863    }
864}
865function clearEViewData() {
866    var objDel = $("#JobSearchLog")[0].removeSOData();
867    updateEViewData();
868}
869function updateEViewData(objsearchrule) {
870    $.post('/job-bank/job-index-searchlist.asp', { 'viewlist': objsearchrule }, function (data) {
871        $('#searchbRec').html(data);
872        $('#lastestSearchLog').hide();
873        $('#searchbRec').hide();
874        if (data.indexOf('找工作') >= 0 || data.indexOf('找公司') >= 0) {
875            var intC = data.split('找工作').length - 1 + data.split('找公司').length - 1;
876            $('#lastestSearchLog').html('最近搜尋條件(' + intC + ')▼');
877        } else {
878            $('#lastestSearchLog').html('無最近搜尋條件▼');
879        }
880        $('#lastestSearchLog').show();
881    });
vendor: 1 bytes, line 882
882}

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.