1function MM_openBrWindow(theURL,winName,features) { //v2.0 2 window.open(theURL,winName,features); 3} 4 5var jsSaveSearchAttempts = 0; 6function jsSaveSearch( formObj, name, select, emailAddr, sendJobs ) { 7 8 var http = new XHConn(); 9 if( ! http ) return false; 10 11 jsSaveSearchAttempts++; 12 http.connect( '/savealert', 'GET', 'email=' + escape( formObj.email.value ) + '&query=' + escape( formObj.query.value ) + '&location=' + escape( formObj.location.value ) + '&source=' + escape( formObj.source.value ) + '&attempts=' + jsSaveSearchAttempts, handleWishlistHttpResponse ); 13 return false; 14} 15 16function jsSaveSearchReload( formObj, name, select, emailAddr, sendJobs ) { 17 18 var http = new XHConn(); 19 if( ! http ) return false; 20 21 http.connect( '/savealert', 'GET', 'email=' + escape( formObj.email.value ) + '&query=' + escape( formObj.query.value ) + '&location=' + escape( formObj.location.value ), handleWishlistHttpResponse ); 22 return false; 23} 24 25function jsSaveSearchGeneric( formObj ) { 26 27 var http = new XHConn(); 28 if( ! http ) return false; 29 30 var extra_args = ''; 31 if( typeof formObj.google_jwt !== 'undefined' ) { 32 extra_args = "&google_jwt=" + escape( formObj.google_jwt.value ); 33 } 34 if( formObj.phone ) { 35 // Watch out for the plus at the start of phone numbers 36 var phone = formObj.phone.value; 37 phone - encodeURIComponent( phone ); 38 phone = phone.replace( '+','%2B' ); 39 extra_args = extra_args + "&phone=" + phone; 40 } 41 if( formObj.exp_c ) { 42 extra_args = extra_args + "&exp_c=" + formObj.exp_c.value; 43 } 44 45 jsSaveSearchAttempts++; 46 if( typeof( formObj.coregister.checked ) == undefined ) { 47 http.connect( '/savealert', 'GET', 'email=' + escape( formObj.email.value ) + '&query=' + escape( formObj.query.value ) + '&location=' + escape( formObj.location.value ) + '&source=' + escape( formObj.source.value ) + '&attempts=' + jsSaveSearchAttempts + extra_args, handleWishlistHttpResponseGeneric.bind( null, formObj ) ); 48 } else { 49 http.connect( '/savealert', 'GET', 'email=' + escape( formObj.email.value ) + '&query=' + escape( formObj.query.value ) + '&location=' + escape( formObj.location.value ) + '&source=' + escape( formObj.source.value ) + '&coregister=' + escape( formObj.coregister.checked ) + '&attempts=' + jsSaveSearchAttempts + extra_args, handleWishlistHttpResponseGeneric.bind( null, formObj ) ); 50 } 51 return false; 52} 53 54function setNavToLoggedIn() { 55 var navhtml = 'Logged in | <a href="/alerts">Job alerts</a> | <a href="/settings">Settings</a> | <a href="/logout">Logout</a>' ; 56 var topmenu = document.getElementById('login_nav').innerHTML = navhtml; 57 $.modal.close(); 58 $('#emailinjobs').hide(); 59 $('#emailsaved').show(); 60}; 61 62function setNavToLoggedOut() {; 63 var navhtml = '<a href="/login">Login</a> | <a href="/login#register">Register</a> | <a href="/alerts">Job alerts</a>'; 64 var topmenu = document.getElementById('login_nav').innerHTML = navhtml; 65} 66 67function handleWishlistHttpResponse2( http ) { 68 window.location.reload(); 69 handleWishlistHttpResponse( http ); 70} 71 72function handleWishlistHttpResponseGeneric( myForm, http ) { 73 var wishlistHTML = http.responseText; 74 var regex_value = new RegExp( '^[^\n]+' ); 75 var list = regex_value.exec( wishlistHTML ); 76 var objId = list[0]; 77 var title = wishlistHTML.replace( regex_value, '' ); 78 79 if( ! isNaN( objId ) && objId != 0 ) { 80 // Log this to Google Analytics
81 _gaq.push(['_trackEvent', 'Alert', 'Saved']); 82 //gtag_report_conversion(); 83 84 // If 'reload' exists, just reload the page to make it all look okay, 85 // otherwise rewrite the page 86 87 var tr = myForm.getElementsByClassName("force_reload")[0]; 88 89 if ( tr ) { 90 //document.location.reload(); 91 // 92 // Changed to this so we can trigger post email 93 // registration tracking events 94 let url = window.location.href; 95 if (url.indexOf('?') > -1){ 96 url += '>ag_e_conv=1' 97 } else { 98 url += '?gtag_e_conv=1' 99 } 100 window.location.href = url; 101 } else { 102 var tr = myForm.getElementsByClassName("save_search")[0]; 103 if( tr ) 104 tr.style.display = 'none'; 105 var tr = myForm.getElementsByClassName("just_saved")[0]; 106 setNavToLoggedIn(); 107 108 if( tr ) 109 tr.style.display = ''; 110 var tr = myForm.getElementsByClassName("error")[0]; 111 if( div ) 112 div.style.display = 'none'; 113 } 114 } else { 115 if( title == '\nPlease login first' ) { 116 title = 'Email address already used - please <a href="/login">login</a> instead.<br>'; 117 } 118 119 var div = myForm.getElementsByClassName("error")[0]; 120 if( div ) { 121 div.innerHTML = title; 122 div.style.display = ''; 123 } 124 125 } 126 127 128}; 129/* 130function handleWishlistHttpResponse( http ) { 131 132 var wishlistHTML = http.responseText; 133 var regex_value = new RegExp( '^[^\n]+' ); 134 var list = regex_value.exec( wishlistHTML ); 135 var objId = list[0]; 136 var title = wishlistHTML.replace( regex_value, '' ); 137// alert( 'here' ); 138 139 if( ! isNaN( objId ) && objId != 0 ) { 140 var tr = document.getElementById( 'jsSaveSearch' ); 141 if( tr ) 142 tr.style.display = 'none'; 143 tr = document.getElementById( 'jsJustSaved' ); 144 if( tr ) 145 tr.style.display = ''; 146 147 tr = document.getElementById( 'jsSaveSearch2' ); 148 if( tr ) 149 tr.style.display = 'none'; 150 tr = document.getElementById( 'jsJustSaved2' ); 151 if( tr ) 152 tr.style.display = ''; 153 var div = document.getElementById( 'jsError' ); 154 if( div ) 155 div.style.display = 'none'; 156 div = document.getElementById( 'jsError2' ); 157 if( div ) 158 div.style.display = 'none'; 159 } else { 160 if( title == '\nPlease login first' ) { 161 title = 'Please <a href="/login">login</a> first'; 162 } 163 164 165 var div = document.getElementById( 'jsError' ); 166 if( div ) { 167 div.innerHTML = title; 168 div.style.display = ''; 169 } 170 div = document.getElementById( 'jsError2' ); 171 if( div ) { 172 div.innerHTML = title; 173 div.style.display = ''; 174 } 175 div = document.getElementById( 'jsError3' ); 176 if( div ) { 177 div.innerHTML = title; 178 div.style.display = ''; 179 } 180 181 182 } 183} 184*/ 185 186var containerObj; 187 188function toggleAllCheckboxes( state, form, className ) { 189 if( ! className ) 190 className = 'toggleMe'; 191 192 var n = className.length; 193 for( var i = 0; i < form.elements.length; i++ ) { 194 if( form.elements[i].className.substring( 0, n ) == className ) { 195 form.elements[i].checked = state; 196 } 197 } 198} 199 200function toggleShowHide( imgObjId, toggleObjId, offImg, onImg ) { 201 var imgObj = document.getElementById( imgObjId ); 202 var toggleObj = document.getElementById( toggleObjId ); 203 204 if( toggleObj.style.display == 'none' ) { 205 toggleObj.style.display = ''; 206 imgObj.src = onImg; 207 } else { 208 toggleObj.style.display = 'none'; 209 imgObj.src = offImg; 210 } 211} 212 213var topTabShowing; 214var topTabTimeout; 215 216function topTabClearTimeout() { 217 if( typeof topTabTimeout != 'undefined' ) 218 clearTimeout( topTabTimeout ); 219} 220 221function topTabShow( id ) { 222 topTabClearTimeout(); 223 for( var n = 0; n < topTabs.length; n++ ) { 224 if( id != topTabs[n] ) { 225 if( topTabs[n] != topTabDefault ) { 226 obj = document.getElementById( 'topTab' + topTabs[n] ); 227 if( obj ) 228 obj.className = ''; 229 } 230 } else { 231 var obj = document.getElementById( 'topTab' + topTabs[n] ); 232 if( obj ) 233 obj.className = 'tabSelected'; 234 } 235 } 236 topTabShowing = id; 237} 238 239function topTabHide() { 240 obj = document.getElementById( 'topTab' + topTabShowing ); 241 if( obj ) 242 obj.className = ''; 243 obj = document.getElementById( 'topTab' + topTabDefault ); 244 if( obj ) 245 obj.className = 'tabSelected'; 246} 247 248function toggleJobStatus( jobId ) { 249 var imgObj = document.getElementById( 'jobStatusImg' + jobId ); 250 if( ! imgObj ) 251 return; 252 253 var newStatus = 'live'; 254 if( imgObj.src.substring( imgObj.src.length - 21, imgObj.src.length ) == '/images/dot_green.gif' ) 255 newStatus = 'paused'; 256 257 var func = function( http ) { 258 if( http.status != 200 ) 259 return; 260 261 if( newStatus == 'live' ) 262 imgObj.src = '/images/dot_green.gif'; 263 else 264 imgObj.src = '/images/dot_red.gif'; 265 }; 266 var http = new XHConn(); 267 if( ! http ) 268 return; 269 http.connect( '/ajax/togglejobstatus', 'GET', 'job_id=' + jobId + '&new_status=' + newStatus, func ); 270} 271 272/** XHConn - Simple XMLHTTP Interface - [email protected] - 2005-04-08 **
273 ** Code licensed under Creative Commons Attribution-ShareAlike License ** 274 ** http://creativecommons.org/licenses/by-sa/2.0/ **/ 275function XHConn() 276{ 277 var xmlhttp, bComplete = false; 278 try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } 279 catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } 280 catch (e) { try { xmlhttp = new XMLHttpRequest(); } 281 catch (e) { xmlhttp = false; }}} 282 if (!xmlhttp) return null; 283 this.connect = function(sURL, sMethod, sVars, fnDone) 284 { 285 if (!xmlhttp) return false; 286 bComplete = false; 287 sMethod = sMethod.toUpperCase(); 288 289 try { 290 if (sMethod == "GET") 291 { 292 xmlhttp.open(sMethod, sURL+"?"+sVars, true); 293 sVars = ""; 294 } 295 else 296 { 297 xmlhttp.open(sMethod, sURL, true); 298 xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1"); 299 xmlhttp.setRequestHeader("Content-Type", 300 "application/x-www-form-urlencoded"); 301 } 302 xmlhttp.onreadystatechange = function(){ 303 if (xmlhttp.readyState == 4 && !bComplete) 304 { 305 bComplete = true; 306 fnDone(xmlhttp); 307 }}; 308 xmlhttp.send(sVars); 309 } 310 catch(z) { return false; } 311 return true; 312 }; 313 return this; 314} 315 316/*********************************************** 317* Fixed ToolTip script- © Dynamic Drive (www.dynamicdrive.com) 318* This notice MUST stay intact for legal use 319* Visit http://www.dynamicdrive.com/ for full source code 320***********************************************/ 321 322var tipwidth='220px' //default tooltip width 323var tipbgcolor='#ffffff' //tooltip bgcolor 324var disappeardelay=4000 //tooltip disappear speed onMouseout (in miliseconds) 325var vertical_offset="0px" //horizontal offset of tooltip from anchor link 326var horizontal_offset="-3px" //horizontal offset of tooltip from anchor link 327 328/////No further editting needed 329 330var ie4=document.all 331var ns6=document.getElementById&&!document.all 332 333if (ie4||ns6)
334document.write('<div id="fixedtipdiv" style="visibility:hidden;width:'+tipwidth+';background-color:'+tipbgcolor+'" ></div>') 335 336function getposOffset(what, offsettype){ 337var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; 338var parentEl=what.offsetParent; 339while (parentEl!=null){ 340totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; 341parentEl=parentEl.offsetParent; 342} 343return totaloffset; 344} 345 346 347function showhide(obj, e, visible, hidden, tipwidth){ 348if (ie4||ns6) 349dropmenuobj.style.left=dropmenuobj.style.top=-500 350if (tipwidth!=""){ 351dropmenuobj.widthobj=dropmenuobj.style 352dropmenuobj.widthobj.width=tipwidth 353} 354if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") 355obj.visibility=visible 356else if (e.type=="click") 357obj.visibility=hidden 358} 359 360function iecompattest(){ 361return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body 362} 363 364function clearbrowseredge(obj, whichedge){ 365var edgeoffset=(whichedge=="rightedge")? parseInt(horizontal_offset)*-1 : parseInt(vertical_offset)*-1 366if (whichedge=="rightedge"){ 367var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 368dropmenuobj.contentmeasure=dropmenuobj.offsetWidth 369if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) 370edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth 371} 372else{ 373var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 374dropmenuobj.contentmeasure=dropmenuobj.offsetHeight 375if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure) 376edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight 377} 378return edgeoffset 379} 380 381function fixedtooltip(menucontents, obj, e, tipwidth){ 382if (window.event) event.cancelBubble=true 383else if (e.stopPropagation) e.stopPropagation() 384clearhidetip() 385dropmenuobj=document.getElementById? document.getElementById("fixedtipdiv") : fixedtipdiv 386dropmenuobj.innerHTML=menucontents 387 388if (ie4||ns6){ 389showhide(dropmenuobj.style, e, "visible", "hidden", tipwidth) 390dropmenuobj.x=getposOffset(obj, "left") 391dropmenuobj.y=getposOffset(obj, "top") 392dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px" 393dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px" 394} 395} 396 397function hidetip(e){ 398if (typeof dropmenuobj!="undefined"){ 399if (ie4||ns6) 400dropmenuobj.style.visibility="hidden" 401} 402} 403 404function delayhidetip(){ 405if (ie4||ns6) 406delayhide=setTimeout("hidetip()",disappeardelay) 407} 408 409function clearhidetip(){ 410if (typeof delayhide!="undefined") 411clearTimeout(delayhide) 412} 413 414 415// TJs code for making the save search pop up - and other stuff TBA 416 417function toggle( id ) { 418 var ele = document.getElementById("register"); 419 if ( id ) { 420 var text = document.getElementById("jobSummary" + id); 421 } else { 422 var text = document.getElementById("savesearch"); 423 } 424 if(ele.style.display == "block") { 425 ele.style.display = "none"; 426 text.style.display = "block"; 427 } 428 else { 429 //alert( text.offsetTop ); 430 ele.style.display = "block"; 431 ele.style.top = text.offsetTop+"px"; 432 //ele.style.left = text.offsetLeft+"px"; 433 ele.style.left = "10px"; 434 //ele.style.top = "120px"; 435 text.style.zindex = 0; 436 ele.style.zindex = 1; 437 //text.style.display = "none"; 438 } 439} 440 441// close div 442function hide(div) { 443 document.getElementById(div).style.display = "none"; 444 } 445 446function isVisible( elem ){ 447 var $elem = $('#'+elem); 448if( $('#'+elem).is(":hidden") ) { 449 //First check if elem is hidden through css as this is not very costly: 450// if($elem.css('display') == 'none' || $elem.css('visibility') == 'hidden' ){ 451 //elem is set through CSS stylesheet or inline to invisible 452 return false; 453 } 454 //Now check for the elem being outside of the viewport 455// var $elemOffset = $elem.viewportOffset(); 456 // if($elemOffset.left < 0 || $elemOffset.top < 0){ 457 // //elem is left of or above viewport 458 // return false;
459 // } 460// var vp = document.viewport.getDimensions(); 461 // if($elemOffset.left > vp.width || $elemOffset.top > vp.height){ 462 //elem is below or right of vp 463 // return false; 464 // } 465 //Now check for elements positioned on top: 466 //TODO: build check for this using prototype... 467 //Neither of these was true, so the elem was visible: 468 return true; 469} 470 471////// 472// The Totaljobs code 473 474function createCORSRequest(method, url) { 475 var xhr = new XMLHttpRequest(); 476 xhr.withCredentials = true; 477 xhr.open(method, url, true); 478 return xhr; 479} 480 481function go_totaljobs() { 482 var url = 'https://www.totaljobs.com/nvv/api/verification/verify'; 483 var xhr = createCORSRequest('GET', url); 484 485 xhr.onload = function() { 486 var text = xhr.responseText; 487 var jsonText = JSON.parse(text); 488 if( jsonText.IsNewUser ) 489 { 490 $.getJSON('/ajax/totaljobsuser?flag=tj&value=2', function(data, textStatus) {} ); 491 go_tjnewuser_inject(); 492// And inject a job 493 } 494 else 495 { 496 $.getJSON('/ajax/totaljobsuser?flag=tj&value=1', function(data, textStatus) {} ); 497 } 498 }; 499 500 xhr.send(); 501} 502 503// 504/////// 505 506/////// 507// 508// This is the new Topbox injector, to put a customer at the top of the listings. It's an attempt to be generic, based on the specifc Adzuna 509// one below 510// 511 512function go_inject( yourCountry, recruiter, query, locations, page, logo, count, simple ) { 513 var window_width = $(window).width(); 514 515 if ( 1 ) { 516 517 $.getJSON('https://json.workcircle.com/?search=1&weight_sort=1&json=' + simple + '&query=' + query + '&locations=' + locations + '&n=' + count + '&recruiter_id=' + recruiter + '&callback=?', function(data, textStatus) { 518 519 if( data.totalResults > 0 && yourCountry == 'GB' ) { 520 521 if ( logo ) { 522 var topslots = '<div class="indeed"><img src="' + logo + '" width=50></div>'; //<div id="indeed_at" class="indeed"><a href="http://www.adzuna.co.uk/jobs">jobs</a> by <a href="http://www.adzuna.co.uk/jobs" title="Job Search"><img src="/images/adzuna.jpg" width=60 alt="Adzuna job search" /></a></div>'; 523 } else { 524 var topslots = ''; 525 } 526 $.each(data.results, function(i, result) { 527 topslots += '<div id="jsJobListing"><div class="job">'; 528 topslots += '<span class="jobtitle"><a onclick="_gaq.push([\'_trackPageview\', \'\/topslot\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '/s52/" target="_blank">' + result.jobtitle + '<\/a><\/span>'; 529 topslots+= '<span class="joblocation">' + result.location.toUpperCase() + '<\/span>'; 530 topslots+= '<span class="jobdesc">' + result.snippet + ' '; 531 topslots += '<a onclick="_gaq.push([\'_trackPageview\', \'\/topslot\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">more details<\/a> »<\/span>'; 532 topslots+= '<\/div><\/div>'; 533 534 } ); 535 //topslots += '<hr class="adsrule" />'; 536 if (document.getElementById("topslot_ad_unit") != null) document.getElementById("topslot_ad_unit").innerHTML = document.getElementById("topslot_ad_unit").innerHTML + topslots; 537 } 538 if ( yourCountry == 'GB' ) { 539 //go_indeed( data.totalResults, yourCountry, siteId, query, locations, page, your_ip ); 540 } else { 541 //go_indeed( 0, yourCountry, siteId, query, locations, page, your_ip ); 542 } 543 } ); 544 } 545} 546 547// 548/////// 549 550function go_adverts( yourCountry, siteId, query, locations, page, your_ip ) { 551 var window_width = $(window).width(); 552 553 if ( 1 ) { 554 $.getJSON('https://json.workcircle.com/?search=1&query=' + query + '&locations=' + locations + '&n=3&recruiter_id=2924393&callback=?', function(data, textStatus) { 555 556 if( data.totalResults > 0 && yourCountry == 'GB' && ( typeof $('#indeed_at')[0] === 'undefined' ) ) { 557 558 var topslots = '<div id="indeed_at" class="indeed"><a href="http://www.adzuna.co.uk/jobs">jobs</a> by <a href="http://www.adzuna.co.uk/jobs" title="Job Search"><img src="/images/adzuna.jpg" width=60 alt="Adzuna job search" /></a></div>'; 559 $.each(data.results, function(i, result) { 560 topslots += '<div id="jsJobListing"><div class="job">'; 561 topslots += '<span class="jobtitle">
561<a onclick="_gaq.push([\'_trackPageview\', \'\/topslot\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">' + result.jobtitle + '<\/a><\/span>'; 562 topslots+= '<span class="joblocation">' + result.location.toUpperCase() + '<\/span>'; 563 topslots+= '<span class="jobdesc">' + result.snippet + ' '; 564 topslots += '<a onclick="_gaq.push([\'_trackPageview\', \'\/topslot\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">more details<\/a> »<\/span>'; 565 topslots+= '<\/div><\/div>'; 566 567 } ); 568 //topslots += '<hr class="adsrule" />'; 569 //document.getElementById("topslot_ad_unit").innerHTML = topslots; 570 if (document.getElementById("topslot_ad_unit") != null) document.getElementById("topslot_ad_unit").innerHTML = document.getElementById("topslot_ad_unit").innerHTML + topslots; 571 } 572 if ( yourCountry == 'GB' ) { 573 //go_indeed( data.totalResults, yourCountry, siteId, query, locations, page, your_ip ); 574 } else { 575 //go_indeed( 0, yourCountry, siteId, query, locations, page, your_ip ); 576 } 577 } ); 578 } 579} 580 581function go_indeed( topslotsResults, yourCountry, siteId, query, locations, page, your_ip ) { 582 var jobs_top_page = 2 - topslotsResults; 583 var jobs_mid_page = 0; 584 var jobs_bot_page = 0; 585 var indeed_job_count = 0; 586 587 if ( siteId == 3 ) { // More adverts if it's the US site 588 jobs_top_page = 3 - topslotsResults; 589 jobs_mid_page = 2; 590 jobs_bot_page = 2; 591 } 592 if ( siteId == 1 ) { // More adverts if it's the .com site 593 jobs_top_page = 3 - topslotsResults; 594 jobs_mid_page = 2; 595 jobs_bot_page = 2; 596 } 597 if ( siteId == 2 ) { // No jobs at the top for the UK site, unless we're not a UK user 598 //jobs_top_page = 2 - topslotsResults; 599 jobs_top_page = 3 - topslotsResults; // Just for Christmas 600 } 601 602 var country = yourCountry.toLowerCase(); 603 var channel = yourCountry.toLowerCase(); 604 var job_limit = jobs_top_page + jobs_mid_page + jobs_bot_page; 605 606 $.getJSON('http://api.indeed.com/ads/apisearch?publisher=707946489192080&q=' + query + '&l=' + locations + '&co=' + country + '&sort=&radius=&st=&jt=&start=' + (' + page + ' - 1) * job_limit + '&limit=' + job_limit + '&fromage=&filter=&latlong=1&chnl=' + channel + '&userip=' + your_ip + '&useragent=' + navigator.userAgent + '&format=json&callback=?', function(data, textStatus) { 607 608 indeed_job_count = data.totalResults; 609 610 if ( ( jobs_top_page > 0 ) && ( indeed_job_count > 0 ) ) { 611 var indeedAds = '<div id="indeed_at" class="indeed"><a href="http://www.indeed.com/">jobs</a> by <a href="http://www.indeed.com/" title="Job Search"><img src="http://www.indeed.com/p/jobsearch.gif" alt="Indeed job search" /></a></div>'; 612 var top_count = 0; 613 614 $.each(data.results, function(i, result) { 615 616 //var onmousedown = eval(result.onmousedown).toString().replace( 'function', '' ); 617 //onmousedown = onmousedown.replace( '\(\)', ''); 618 //onmousedown = onmousedown.replace( '{', ''); 619 //onmousedown = onmousedown.replace( '}', ''); 620 //onmousedown = onmousedown.replace( /\n/g, ''); 621 //onmousedown = onmousedown.replace( /"/g, '\''); 622 623 indeedAds += '<div id="jsJobListing"><div class="job">'; 624 indeedAds += '<span class="jobtitle"><a onclick="_gaq.push([\'_trackPageview\', \'\/indeed\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">' + result.jobtitle + '<\/a><\/span>'; 625 indeedAds+= '<span class="joblocation">' + result.formattedLocation + '<\/span>'; 626 indeedAds+= '<span class="jobdesc">' + result.snippet + ' '; 627 indeedAds += '<a onclick="_gaq.push([\'_trackPageview\', \'\/indeed\/top\/\']);" onmousedown="' + result.onmousedown + '" href="' + result.url + '" target="_blank">more details<\/a> »<\/span>'; 628 indeedAds+= '<\/div><\/div>'; 629 top_count = top_count + 1; 630 if( i == jobs_top_page - 1 ) return false; 631 }); 632 //indeedAds += '<hr class="adsrule" />'; 633 } else { 634 //var indeedAds = '<hr class="adsrule" />' 635 var indeedAds = '' 636 } 637 638 if ( jobs_top_page > 0 && top_count > 0 ) { 639 if (document.getElementById("indeed_ad_unit") != null) document.getElementById("indeed_ad_unit").innerHTML = indeedAds; 640 } 641 642 if ( ( jobs_mid_page > 0 ) && ( indeed_job_count > jobs_top_page ) ) { 643 var indeedAds = ''; 644 645 $.each(data.results, function(i, result) { 646 647 if ( i > jobs_top_page - 1 ) { 648 //var onmousedown = eval(result.onmousedown).toString().replace( 'function', '' ); 649 //onmousedown = onmousedown.replace( '\(\)', ''); 650 //onmousedown = onmousedown.replace( '{', ''); 651 //onmousedown = onmousedown.replace( '}', ''); 652 //onmousedown = onmousedown.replace( /\n/g, ''); 653 //onmousedown = onmousedown.replace( /"/g, '\''); 654 655 indeedAds += '<div id="indeed_at" class="indeed"><a href="http://www.indeed.com/">jobs</a> by <a href="http://www.indeed.com/" title="Job Search"><img src="http://www.indeed.com/p/jobsearch.gif" alt="Indeed job search" /></a></div>'; 656 indeedAds += '<div id="jsJobListing"><div class="job">'; 657 indeedAds += '<span class="jobtitle">
657<a onclick="_gaq.push([\'_trackPageview\', \'\/indeed\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">' + result.jobtitle + '<\/a><\/span>'; 658 indeedAds+= '<span class="joblocation">' + result.formattedLocation + '<\/span>'; 659 indeedAds+= '<span class="jobdesc">' + result.snippet + ' '; 660 indeedAds += '<a onclick="_gaq.push([\'_trackPageview\', \'\/indeed\/top\/\']);" onmousedown="' + result.onmousedown + '" href="' + result.url + '" target="_blank">more details<\/a> »<\/span>'; 661 indeedAds+= '<\/div><\/div>'; 662 } 663 if( i == jobs_top_page + jobs_mid_page - 1 ) return false; 664 }); 665 if (document.getElementById("middle_indeed_unit") != null) document.getElementById("middle_indeed_unit").innerHTML = indeedAds; 666 } 667 668 if ( ( jobs_bot_page > 0 ) && ( indeed_job_count > jobs_mid_page ) ) { 669 var indeedAds = ''; 670 671 $.each(data.results, function(i, result) { 672 673 if ( i > jobs_top_page + jobs_mid_page - 1 ) { 674 var onmousedown = eval(result.onmousedown).toString().replace( 'function', '' ); 675 onmousedown = onmousedown.replace( '\(\)', ''); 676 onmousedown = onmousedown.replace( '{', ''); 677 onmousedown = onmousedown.replace( '}', ''); 678 onmousedown = onmousedown.replace( /\n/g, ''); 679 onmousedown = onmousedown.replace( /"/g, '\''); 680 681 indeedAds += '<div id="indeed_at" class="indeed"><a href="http://www.indeed.com/">jobs</a> by <a href="http://www.indeed.com/" title="Job Search"><img src="http://www.indeed.com/p/jobsearch.gif" alt="Indeed job search" /></a></div>'; 682 indeedAds += '<div id="jsJobListing"><div class="job">'; 683 indeedAds += '<span class="jobtitle"><a onclick="_gaq.push([\'_trackPageview\', \'\/indeed\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">' + result.jobtitle + '<\/a><\/span>'; 684 indeedAds+= '<span class="joblocation">' + result.formattedLocation + '<\/span>'; 685 indeedAds+= '<span class="jobdesc">' + result.snippet + ' '; 686 indeedAds += '<a onclick="_gaq.push([\'_trackPageview\', \'\/indeed\/top\/\']);" onmousedown="' + onmousedown + '" href="' + result.url + '" target="_blank">more details<\/a> »<\/span>'; 687 indeedAds+= '<\/div><\/div>'; 688 } 689 if( i == jobs_top_page + jobs_mid_page + jobs_bot_page - 1 ) return false; 690 }); 691 if (document.getElementById("bottom_indeed_unit") != null) document.getElementById("bottom_indeed_unit").innerHTML = indeedAds; 692 } 693 694 //go_adsense( top_count + topslotsResults, yourCountry, siteId ); 695 } ); 696} 697 698/* 699function wcAutocomplete ( element, type ) { 700 $( element ).autocomplete({ 701 serviceUrl: 'http://api.workcircle.com/ajax/autocomplete?mode=get&what=' + type + '&json=1', 702 paramName: 'letters', 703 minChars: 2, 704 lookupLimit: 20, 705 maxHeight: 200, 706 transformResult: function(response) { 707 response = JSON.parse( response ); 708 var map = $.map( response, function(dataItem) { return { value: dataItem, data: dataItem } }); 709 return { suggestions: map } 710 }, 711 onSelect: function (suggestion) { 712 } 713 }); 714} 715*/ 716
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.