var no_co_info=false;var countBasket=0;var countAlerts=0;var countSearches=0;var currentOpen="accountSettings";function cleanAmount(a){return Number(a.replace(/[^0-9\.]+/g,""))}function submitAjaxForm(a,b){var c;$(a).getElements().each(function(d){if(!$F(d)||$F(d)==$(d).readAttribute("default")){$(d).disable()}});c=$(a).serialize();$(a).getElements().each(function(d){if(!$F(d)){$(d).enable()}});if(!b){window.location="/results.php#"+c;return false}else{return c}}function checkSearch(){if($("c")){if($F("c")==""&&($F("q")=="Job Titles, Keywords or Company"||$F("q")=="job title, keyword"||$F("q")=="")&&($F("l")=="City, State or Zip"||$F("l")=="city or zip"||$F("l")=="location"||$F("l")=="")&&tagsChecked==0){alert("You must provide at least one search term to continue.");return false}}else{if(($F("q")=="Job Titles, Keywords or Company"||$F("q")=="job title, keyword"||$F("q")=="")&&($F("l")=="City, State or Zip"||$F("l")=="location"||$F("l")=="city or zip"||$F("l")=="")){alert("You must provide at least one search term to continue.");return false}}if($F("q")=="Job Titles, Keywords or Company"||$F("q")=="job title, keyword"){$("q").value=""}if($F("l")=="city or zip"||$F("l")=="City, State or Zip"||$F("l")=="location"){$("l").value=""}return true}function closeWin(){Windows.closeAll()}function showInfo(c,f,a,b,d){if(no_co_info==true){return}prefix="";if(d){prefix="ad_"}if(!$(prefix+"co_wrapper_"+c)){var e=new Element("div",{id:prefix+"co_wrapper_"+c}).update('<div id="'+prefix+"co_id_"+c+'" class="companyBox boxStyle"><span style="cursor:default"><img alt="" src="/images/loading-small.gif" class="loading-image"/> Loading company information&#8230;</span></div>');$(prefix+"co_name_"+c).insert({top:e});new Ajax.Request("/co_info.php?id="+f+"&hash="+a+"&jobHash="+c,{asynchronous:true,onSuccess:function(g){if(!$(prefix+"co_id_"+c)){}else{$(prefix+"co_id_"+c).update(g.responseText);loadLinkedIn("li_"+c,b)}},onException:function(h,g){},method:"get"})}else{$(prefix+"co_wrapper_"+c).show()}}function loadLinkedIn(b,a){if(typeof LinkedIn=="undefined"){loadScript("http://www.linkedin.com/companyInsider?script&useBorder=no",function(){loadLinkedIn(b,a)})}else{if(typeof document.getElementById(b)=="undefined"||document.getElementById(b)==null||document.getElementById(b).innerHTML.length<10){setTimeout("loadLinkedIn('"+b+"','"+a+"')",1000)}else{if(document.getElementById(b).innerHTML.indexOf("Loading LinkedIn")>=0){$(b).update();new LinkedIn.CompanyInsiderBox(b,a)}}}}function hideInfo(a,b){if(no_co_info==true){return}prefix="";if(b){prefix="ad_"}if($(prefix+"co_wrapper_"+a)){$(prefix+"co_wrapper_"+a).hide()}}function stopShowing(a){$("enableCompanyInfo").show();new Ajax.Request("co_info.php?cmd=stop",{asynchronous:true});no_co_info=true;a.parentNode.parentNode.style.display="none"}function startShowing(){$("enableCompanyInfo").hide();new Ajax.Request("co_info.php?cmd=start",{asynchronous:true});no_co_info=false;return false}var linkedInName=false;function launchedLinkedIn(b,a){if(typeof LinkedIn!="undefined"){if(a==false){a=linkedInName;linkedInName=false}if(document.getElementById("LinkedIn_"+b)){new LinkedIn.CompanyInsiderPopup("LinkedIn_"+b,a)}else{linkedInName=a;setTimeout("launchedLinkedIn('"+b+"',false)",1000)}}else{loadScript("http://www.linkedin.com/companyInsider?script&useBorder=no",function(){launchedLinkedIn(b,a)})}}_sttoolbar=true;shareThisPages=new Array();function loadShareThis(a){if(typeof shareThisPages[a]!="undefined"){if(shareThisPages[a][2]==1){return}shareThisLocation=$("optionBox_"+shareThisPages[a][1]).cumulativeOffset();shareThisPages[a][2]=1;if(typeof SHARETHIS=="undefined"){loadScript("http://w.sharethis.com/button/sharethis.js#publisher=95a1b9e2-facf-4bbb-bfe4-26f7107f3cc9&type=website&send_services=myspace%2Caim%2Csms&post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin",function(){SHARETHIS.addEntry({title:shareThisPages[a][0],url:"http://linkup.com/"+a,summary:"I found this job on LinkUp.com job search engine."},{offsetLeft:(shareThisLocation[0]-359),offsetTop:(shareThisLocation[1]+80),button:false}).attachButton(document.getElementById("pageShare_"+shareThisPages[a][1]));SHARETHIS.onReady()})}else{SHARETHIS.addEntry({title:shareThisPages[a][0],url:"http://linkup.com/"+a,summary:"I found this job on LinkUp.com job search engine."},{offsetLeft:(shareThisLocation[0]-359),offsetTop:(shareThisLocation[1]+80),button:false}).attachButton(document.getElementById("pageShare_"+shareThisPages[a][1]));SHARETHIS.onReady()}}}function validateEmail(b){if(b==""){return false}var a=/^.+@.+\..{2,3}$/;if(!(a.test(b))){return false}else{var c=/[\(\)\<\>\,\;\:\\\"\[\]]/;if(b.match(c)){return false}}return true}function validateNumber(c,b,a){if(!b){b=0}if(!a){a=255}if(isNaN(c.value)||c.value.length<b||c.value.length>a){return false}return true}function validateString(c,b,a){if(!b){b=1}if(!a){a=65535}if(!c.value||c.value.length<b||c.value.max>a){return false}return true}function launchNewWindow(a){newJobWindow=window.open(a,"job"+Math.round(Math.random()*1000),"width=800,height=800,toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes");if(window.focus){newJobWindow.focus()}return false}function ajaxifyLinks(){$$("a.ajaxWrap").each(function(a){if($(a).hasClassName("ajaxed")==false){$(a).addClassName("ajaxed");$(a).observe("click",ajaxHistoryRequest)}});$$("a.ajaxJobWrap").each(function(a){if($(a).hasClassName("ajaxed")==false){$(a).addClassName("ajaxed");$(a).observe("click",clickJob)}})}function clickJob(c){var a=Event.element(c),b=new Hash({page:hashValue});$(a).addClassName("visited");if($(a).readAttribute("company")==null){$(a).writeAttribute("company","LinkUp job result")}if($(a).readAttribute("adid")!=null){b.set("ad","1");mylogger.info("[Click Track] Logging a sponsored click");AjaxTabs.OpenTab($(a).readAttribute("jobhash"),$(a).readAttribute("company"),"premium/?a="+$(a).readAttribute("adid"),true,"")}else{b.set("ad","0");mylogger.info("[Click Track] Logging an organic click");AjaxTabs.OpenTab($(a).readAttribute("jobhash"),$(a).readAttribute("company"),"rediriframe.php?hash="+$(a).readAttribute("jobhash"),true,"")}new Ajax.Request("/includes/click-test.php",{method:"post",parameters:b.toObject()});launchedLinkedIn($(a).readAttribute("jobhash"),$(a).readAttribute("company"));AjaxTabs.FocusTab($(a).readAttribute("jobhash"));Event.stop(c)}var ignoreLocationChange=false;function ajaxHistoryRequest(c){var b=Event.element(c);var a=b.href.indexOf("#");var d=b.href.substring(a+1);resetHash=true;ignoreLocationChange=true;AjaxTabs.SetTabURL("results","/resultstab.php?"+stripslashes(d.replace("#","%23")));AjaxTabs.FocusTab("results")}function selectValue(b,a){if(typeof b!="undefined"&&b.options&&a){for(this.loop=0;this.loop<b.options.length;this.loop++){if(b.options[this.loop].value.toLowerCase()==a.toLowerCase()){b.selectedIndex=this.loop;return}}}}function setupJobAlert(a){if(!$("jobAlertBox")){this.overlay=new Element("div");this.overlay.setAttribute("id","jobAlertBox");this.overlay.addClassName("boxStyle");this.overlay.innerHTML='<form method="get" action="#" onsubmit="return createJobAlert()"><div><input name="email" id="jobAlertEmail" value="Enter email address" onkeyup="if(this.value==\'Enter email address\'){this.value=\'\';}" onfocus="this.onkeyup()" onkeydown="this.onkeyup()" type="text"/><input type="submit" value="Create Alert" id="createAlertBtn" style="letter-spacing:-1px" class="submitButton submitButtonSmall"/><input type="button" value="Cancel" onclick="closeJobAlert()" id="cancelAlertBtn" class="submitButton submitButtonSmall"/></div></form>';Element.insert("topPaginationBox",this.overlay)}else{$("jobAlertEmail").value="Enter email address";$("jobAlertBox").show()}if(a){Event.stop(a)}return false}var creatingAlert=false;function createJobAlert(){if(!creatingAlert){creatingAlert=true;if(validateEmail($F("jobAlertEmail"))==false){creatingAlert=false;alert("You must supply a valid email to create an alert.");$("jobAlertEmail").focus();return false}if($("createAlertBtn")){$("createAlertBtn").addClassName("submitButtonDisabled");$("createAlertBtn").value="creating";$("createAlertBtn").disable();$("cancelAlertBtn").hide();$("cancelAlertBtn").disable()}var a=new Ajax.Request("/job-alert/jobPassThru.php",{parameters:$("topSearch").serialize()+"&email="+$F("jobAlertEmail")+"&newAlert=true",method:"get",asynchronous:true,onSuccess:function(b){if(b.responseText=="success"){$("jobAlertBox").update("<strong>Job alert setup and confirmation sent!</strong>");setTimeout(closeJobAlert,2000);creatingAlert=false}else{$("jobAlertBox").update("<strong>"+b.responseText+"</strong>");setTimeout(closeJobAlert,6000);creatingAlert=false;setTimeout(setupJobAlert,6800)}}})}return false}function editJobAlert(a,b){$(editRow[b]).innerHTML='<input style="float: left" type="text" value="'+$("nameRowVal"+a).innerHTML+'" id="nameRowEdit'+a+'" onblur="return saveAlert(\''+a+'\')"><a href="#" class="icon" style="background-image:url(/images/icons/save.png); float: right;" title="Edit" style="display: block; float: right" onclick="return saveAlert(\''+a+"')\"><span>Save</span></a>";$("nameRowEdit"+a).focus();return false}var savingAlert=false;function saveAlert(a){if(savingAlert==false){savingAlert=true;overlay=processingRequestOverlay();var b=new Ajax.Request("/jobseeker-tools/edit.ajax.php",{parameters:"save=true&user="+a+"&name="+$("nameRowEdit"+a).value,method:"get",evalJS:true,onSuccess:function(d){if(d.responseText!="fail"){$("jobBasketContainer").innerHTML=d.responseText;var e=$("jobBasketContainer").childElements();var c=0;$("jobBasketContainer").getElementsBySelector("td.editable").each(function(f){editRow[c]=$(f).id;c++});if($(e[1])!="undefined"&&$(e[1])!=""&&e.size()>0){table=new TableKit(e[1],{sortable:true,resizable:false,stripe:false,editable:false,rowEvenClass:"tblEvenRow",rowOddClass:"tblOddRow",defaultSortDirection:-1,descendingClass:"tblDescCol",ascendingClass:"tblAscCol",columnClass:"tblColumn"})}}else{alert("There was an error deleting a position from your job basket.")}overlay.loadedHide()}});savingAlert=false}return false}function closeJobAlert(){new Effect.Fade("jobAlertBox",{duration:0.5,afterFinish:function(){$("jobAlertBox").update('<form method="get" action="#" onsubmit="return createJobAlert()"><div><input name="email" id="jobAlertEmail" value="Enter email address" onkeyup="if(this.value==\'Enter email address\'){this.value=\'\';}" onfocus="this.onkeyup()" onkeydown="this.onkeyup()" type="text"/><input type="submit" value="Create Alert" class="submitButton submitButtonSmall"/><input type="button" value="Cancel" onclick="closeJobAlert()" class="submitButton submitButtonSmall"/></div></form>')}})}function removeFromBasket(b){if(window.refactorRows===undefined){new Effect.BlindUp("basket_job"+b,{duration:0.5,afterFinish:function(){var c=new Ajax.Request("/overlays/settings.ajax.php",{parameters:"removeFromBasket="+b,method:"get",onSuccess:function(d){if(d.responseText=="success"){countBasket-=1;if(countBasket==0){new Effect.BlindDown("NoJobsLeft",{duration:0.25})}}else{alert("There was an error deleting a position from your job basket.")}}})}})}else{table=null;overlay=processingRequestOverlay();var a=new Ajax.Request("/jobseeker-tools/job-basket.php",{parameters:"removeFromBasket="+b,method:"get",evalJS:true,onSuccess:function(c){if(c.responseText!="fail"){$("jobBasketContainer").innerHTML=c.responseText;var d=$("jobBasketContainer").childElements();if($(d[0])!="undefined"&&$(d[0])!=""&&d.size()>0){table=new TableKit(d[0],{sortable:true,resizable:false,stripe:false,editable:false,rowEvenClass:"tblEvenRow",rowOddClass:"tblOddRow",defaultSortDirection:-1,descendingClass:"tblDescCol",ascendingClass:"tblAscCol",columnClass:"tblColumn"})}}else{alert("There was an error deleting a position from your job basket.")}overlay.loadedHide()}})}return false}function activateAlert(b){table=null;overlay=processingRequestOverlay();var a=new Ajax.Request("/job-alerts/confirm.html",{parameters:"jobAlert="+b+"&js=true",method:"get",evalJS:true,onSuccess:function(c){if(c.responseText!="fail"){$("jobBasketContainer").innerHTML=c.responseText;var d=$("jobBasketContainer").childElements();if($(d[0])!="undefined"&&$(d[0])!=""&&d.size()>0){table=new TableKit(d[0],{sortable:true,resizable:false,stripe:false,editable:false,rowEvenClass:"tblEvenRow",rowOddClass:"tblOddRow",defaultSortDirection:-1,descendingClass:"tblDescCol",ascendingClass:"tblAscCol",columnClass:"tblColumn"})}}else{alert("There was an error deleting a position from your job basket.")}overlay.loadedHide()}});return false}function removeAlert(a){if(window.refactorRows===undefined){new Effect.BlindUp("alert"+a,{duration:0.5,afterFinish:function(){var c=new Ajax.Request("/overlays/settings.ajax.php",{parameters:"removeAlert="+a,method:"get",onSuccess:function(d){if(d.responseText=="success"){countAlerts-=1;if(countAlerts==0){new Effect.BlindDown("NoAlertsLeft",{duration:0.25})}}else{alert("There was an error deleting your job alert.")}}})}})}else{table=null;overlay=processingRequestOverlay();var b=new Ajax.Request("/jobseeker-tools/job-alerts.php",{parameters:"removeAlert="+a+"&js=true",evalJS:true,onSuccess:function(d){if(d.responseText!="fail"){$("jobBasketContainer").innerHTML=d.responseText;var e=$("jobBasketContainer").childElements();var c=0;$("jobBasketContainer").getElementsBySelector("td.editable").each(function(f){editRow[c]=$(f).id;c++});if($(e[1])!="undefined"&&$(e[1])!=""&&e.size()>0){table=new TableKit(e[1],{sortable:true,resizable:false,stripe:false,editable:false,rowEvenClass:"tblEvenRow",rowOddClass:"tblOddRow",defaultSortDirection:-1,descendingClass:"tblDescCol",ascendingClass:"tblAscCol",columnClass:"tblColumn"})}}else{alert("There was an error deleting your job alert.")}overlay.loadedHide()}})}return false}function removeSearch(a){if(window.refactorRows===undefined){new Effect.BlindUp("search"+a,{duration:0.5,afterFinish:function(){var c=new Ajax.Request("/overlays/settings.ajax.php",{parameters:"removeSearch="+a,method:"get",onSuccess:function(d){if(d.responseText=="success"){countSearches-=1;if(countSearches==0){new Effect.BlindDown("NoSearchesLeft",{duration:0.25})}}else{alert("There was an error deleting your saved search.");new Effect.BlindDown("search"+a,{duration:0.5})}}})}})}else{table=null;processingRequestOverlay();var b=new Ajax.Request("/jobseeker-tools/saved-searches.php",{parameters:"removeSavedSearch="+a+"&js=true",method:"get",evalJS:true,onSuccess:function(d){if(d.responseText!="fail"){$("jobBasketContainer").innerHTML=d.responseText;var e=$("jobBasketContainer").childElements();var c=0;$("jobBasketContainer").getElementsBySelector("td.editable").each(function(f){editRow[c]=$(f).id;c++});if($(e[1])!="undefined"&&$(e[1])!=""&&e.size()>0){table=new TableKit(e[1],{sortable:true,resizable:false,stripe:false,editable:false,rowEvenClass:"tblEvenRow",rowOddClass:"tblOddRow",defaultSortDirection:-1,descendingClass:"tblDescCol",ascendingClass:"tblAscCol",columnClass:"tblColumn"})}}else{alert("There was an error deleting your saved search.")}overlay.loadedHide()}})}return false}function addToBasket(b){var a=new Ajax.Request("/overlays/settings.ajax.php",{parameters:"addToBasket="+b,method:"get",onSuccess:function(c){if(c.responseText=="success"){alert("Position successfully added to your job basket.")}else{if(c.responseText=="duplicate"){alert("This position is already in your job basket.")}else{alert("There was an error adding this job to your basket.")}}}})}function saveSettings(){var a=new Ajax.Request("/overlays/settings.php",{parameters:"Save_Settings=Save_Settings&"+$("settingsForm").serialize(),method:"post",onSuccess:function(b){if(b.responseText=="success"){alert("Account settings saved successfully!");var c=Math.floor(Math.random()*11);window.location=window.location+"&reload="+c}else{alert("There was a problem saving your settings. Please try again.")}}});return false}function openSettings(a){if(a!=currentOpen){new Effect.BlindUp(currentOpen,{duration:0.15,afterFinish:function(){$(currentOpen+"PM").innerHTML="&#43;";$(a+"PM").innerHTML="&#45;";new Effect.BlindDown(a,{duration:0.15});currentOpen=a}})}return false}function getHash(){addr=window.location+"";addr=addr.replace(/ /g,"%20");if(addr.indexOf("#")>0){return addr.substring(addr.indexOf("#"))}else{return""}}function bookmarkJob(a){url="http://www.linkup.com/results.php"+getHash();if(window.sidebar){window.sidebar.addPanel(a,url,"")}else{if(window.external){window.external.AddFavorite(url,a)}else{if(window.opera&&window.print){return true}}}}function clickLogin(){if(document.getElementById("resultsLogin").onclick){document.getElementById("resultsLogin").onclick()}else{document.getElementById("resultsLogin").click()}}if(typeof(tagsChecked)=="undefined"){var tagsChecked=0}function handleTags(a){$(a).select('[type="checkbox"]').each(function(b){$(b.id).observe("click",function(){if($(b.id).checked){if($(b.id+"SubDiv")){var d=$(b.id+"SubDiv").select('[type="checkbox"]');d.each(function(e){tagsChecked+=checked(e.id)})}else{var d=$(b.id).up(1).select('[class="subTag"]');var c=0;d.each(function(e){if($(e.id).checked){c+=1}});if(c==d.length){var d=$(b.id).up(2).select('[class="tagParent"]');d.each(function(e){tagsChecked+=checked(e.id)})}}checked(b.id);tagsChecked+=1}else{if($(b.id).hasClassName("subTag")){var d=$(b.id).up(2).select('[class="tagParent"]');d.each(function(e){tagsChecked+=unchecked(e.id)})}else{if($(b.id+"SubDiv")){var d=$(b.id+"SubDiv").select('[type="checkbox"]');d.each(function(e){tagsChecked+=unchecked(e.id)})}}unchecked(b.id);tagsChecked+=-1}})})}function checked(a){if($(a+"DIV")){$(a+"DIV").style.background="#3A6E8F";$(a+"DIV").style.color="#FFFFFF"}if($(a).checked==true){return 0}else{$(a).checked=true;return 1}}function unchecked(a){if($(a+"DIV")){$(a+"DIV").style.background="#FFFFFF";$(a+"DIV").style.color="#807F83"}if($(a).checked==true){$(a).checked=false;return -1}else{return 0}}function stripslashes(a){return(a+"").replace(/\\(.?)/g,function(c,b){switch(b){case"\\":return"\\";case"0":return"\0";case"":return"";default:return b}})}function cleanQ(b,a){if(!a){a="q"}keycode=b?b.keyCode:event.keyCode;if($F(a)==""&&keycode==38){$(a).blur();return false}if(b=="set"){if($F(a)==""){$(a).value="job title, keyword";if($("topSearch")){$(a).setStyle({color:"#807F83"})}}}else{if($F(a)=="job title, keyword"){$(a).value="";if($("topSearch")){$(a).setStyle({color:"#000"})}}}}shownRadius=false;function cleanL(d,c,a){if(!c){c="l"}if(a=="canada"){var b="city or postal code"}else{var b="city or zip"}if(d=="set"){if($F(c)==""){$(c).value=b;if($("topSearch")){$(c).setStyle({color:"#807F83"})}}}else{if($F(c)==b){$(c).value="";if($("topSearch")){$(c).setStyle({color:"#000"})}}}if($("radiusBlock")){if($F(c)!=""&&$F(c)!=b){if(shownRadius==false){new Effect.SlideDown("radiusBlock",{duration:0.5});shownRadius=true}}else{if(shownRadius==true){new Effect.SlideUp("radiusBlock",{duration:0.5});shownRadius=false}}}}function cleanC(){if($F("c")==""){$("c").value="company name"}}function loadScript(b,c){var a=document.createElement("script");a.type="text/javascript";if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;if(typeof c=="function"){c()}}}}else{if(typeof c=="function"){a.onload=function(){c()}}}a.src=b;document.getElementsByTagName("head")[0].appendChild(a)}var Cookie={set:function(c,e,b){var a="";if(b!=undefined){var f=new Date();f.setTime(f.getTime()+(86400000*parseFloat(b)));a="; expires="+f.toGMTString()}return(document.cookie=escape(c)+"="+escape(e||"")+a)},get:function(a){var b=document.cookie.match(new RegExp("(^|;)\\s*"+escape(a)+"=([^;\\s]*)"));return(b?unescape(b[2]):null)},erase:function(a){var b=Cookie.get(a)||true;Cookie.set(a,"",-1);return b},accept:function(){if(typeof navigator.cookieEnabled=="boolean"){return navigator.cookieEnabled}Cookie.set("_test","1");return(Cookie.erase("_test")==="1")}};function number_format(f,c,l,e){var b=f,a=c;var h=function(r,q){var i=Math.pow(10,q);return(Math.round(r*i)/i).toString()};b=!isFinite(+b)?0:+b;a=!isFinite(+a)?0:Math.abs(a);var p=(typeof e==="undefined")?",":e;var d=(typeof l==="undefined")?".":l;var o=(a>0)?h(b,a):h(Math.round(b),a);var m=h(Math.abs(b),a);var k,g;if(m>=1000){k=m.split(/\D/);g=k[0].length%3||3;k[0]=o.slice(0,g+(b<0))+k[0].slice(g).replace(/(\d{3})/g,p+"$1");o=k.join(d)}else{o=o.replace(".",d)}var j=o.indexOf(d);if(a>=1&&j!==-1&&(o.length-j-1)<a){o+=new Array(a-(o.length-j-1)).join(0)+"0"}else{if(a>=1&&j===-1){o+=d+new Array(a).join(0)+"0"}}return o}mylogger={};mylogger.log=function(a){return false};mylogger.debug=mylogger.log;mylogger.info=mylogger.log;mylogger.warn=mylogger.log;mylogger.error=mylogger.log;