function clearReference(){$("reference_first_name").value="";$("reference_last_name").value="";$("reference_phone").value="";$("reference_email").value="";$("reference_relationship").value=""}function clearKeyword(){$("keyword_name").value=""}function clearEducation(){$("education_degree_name_id").value="";$("education_major").value="";$("education_school").value="";$("education_year").value=""}function finish_employment(){$("work_city").value="";$("work_state").value="";$("work_from_year").value="";$("work_to_year").value="";$("work_to_month").value="";$("work_from_month").value="";$("work_company").value="";$("work_role_id").value="";$("work_resignation_reason_id").value="";$("work_resignation_reason_id").enabled=false;new Effect.Highlight("work_experiences")}function edit_experience(g,e,d,a,c,i,b,f,h){$("work_company").value=g;$("work_role_id").value=e;$("work_city").value=d;$("work_state").value=a;$("work_from_month").value=c;$("work_from_year").value=i;$("work_to_month").value=b;$("work_to_year").value=f;$("work_resignation_reason_id").value=h;$("work_resignation_reason_id").disabled=false}function edit_education(d,b,a,c){$("education_degree_name_id").value=d;$("education_school").value=b;$("education_major").value=a;$("education_year").value=c}function disable_key(b){var a;if(window.event){a=window.event.keyCode}else{a=b.which}if(a==13){return false}else{return true}}function enter_submits_form(c,b){var a;if(window.event){a=window.event.keyCode}else{a=c.which}if(a==13){return submit_keyword(b)}else{return true}}function submit_keyword(a){field=document.getElementById("keyword_name");new Ajax.Request("/climbers/"+a+"/keywords?keyword%5Bname%5D="+field.value,{asynchronous:true,evalScripts:true,onComplete:function(b){clearKeyword()},onLoading:function(b){Element.show("waiting")}});field.value=""}function toggle_selection(a){frm=document.forms[""+a+""].elements;for(x=0;x<frm.length;x++){if(frm[x].type=="checkbox"){frm[x].checked?frm[x].checked=false:frm[x].checked=true}}}function expandKeywords(){parent=$("keywords_container");for(var b=0;b<3;b++){var a=document.createElement("input");a.id="keyword_";a.name="keyword[]";a.style.width="180px";a.type="text";a.value="";parent.appendChild(a)}}function tab_mouse_over(a){a=$($(a).up(0));$("top_nav_tab_active").id="";$("top_nav_bar_active").style.visibility="hidden";$("top_nav_bar_active").id="";a.id="top_nav_tab_active";a.down(0).next(0).id="top_nav_bar_active";a.down(0).next(0).style.visibility="visible"}function load_keywords(a){new Ajax.Request("/climbers/"+a+"/keywords/show",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("keywords");Element.hide("waiting")},onLoading:function(b){Element.show("waiting")}})}function load_experiences(a){new Ajax.Request("/climbers/"+a+"/work_experiences/list",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("experiences");Element.hide("waiting_experiences")},onLoading:function(b){Element.show("waiting_experiences")}})}function load_experiences_resume(a){new Ajax.Request("/premier/resources/resumes/"+a+"/experiences/list",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("experiences");Element.hide("waiting_experiences")},onLoading:function(b){Element.show("waiting_experiences")}})}function load_educations(a){new Ajax.Request("/climbers/"+a+"/educations/list",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("educations");Element.hide("waiting_educations")},onLoading:function(b){Element.show("waiting_educations")}})}function load_educations_resume(a){new Ajax.Request("/premier/resources/resumes/"+a+"/educations/list",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("educations");Element.hide("waiting_educations")},onLoading:function(b){Element.show("waiting_educations")}})}function load_references_resume(a){new Ajax.Request("/premier/resources/resumes/"+a+"/references/list",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("references");Element.hide("waiting_references")},onLoading:function(b){Element.show("waiting_references")}})}function load_skills_resume(a){new Ajax.Request("/premier/resources/resumes/"+a+"/skills/list",{asynchronous:true,evalScripts:true,method:"get",onComplete:function(b){new Effect.Highlight("skills");Element.hide("waiting_skills")},onLoading:function(b){Element.show("waiting_skills")}})}function premierTracker(a){new Ajax.Request("/payments/tracker?field="+a,{asynchronous:true,evalScripts:true,method:"get"})}function checkBoxUpdate(c,b,d,a){if(c.checked==true){new Ajax.Request("/premier/resources/resumes/"+d+"/"+b+"/"+a+"/enable?enable=1",{asynchronous:true,evalScripts:true})}else{new Ajax.Request("/premier/resources/resumes/"+d+"/"+b+"/"+a+"/enable?enable=0",{asynchronous:true,evalScripts:true})}return false}function premiersUpdater(a){new Ajax.Request("/premiers/getrecruited_ajaxer",{asynchronous:true,evalScripts:true,method:"post",parameters:Form.serialize(a)})}function AccountLevel(b,a){if(b==1){title="Downgrade Account Level";if(a==2){type="downgrade/premier_to_advance"}if(a==3){type="downgrade/premier_to_basic"}}if(b==2){if(a==3){title="Downgrade Account Level";type="downgrade/advance_to_basic"}if(a==1){title="Upgrade Account Level";type="upgrade/advance_to_premier"}}if(b==3){title="Upgrade Account Level";if(a==1){type="upgrade/basic_to_premier"}if(a==2){type="upgrade/basic_to_advance"}}new Ajax.Request("/billings/dialog?type="+type+"&title="+title,{asynchronous:true,evalScripts:true,method:"get"})}function validateBillingForm(){ok=true;form=document.forms.billing_form;for(var a=0;a<form.elements.length;a++){if(form.elements[a].type=="text"&&(form.elements[a].value==null||form.elements[a].value=="")){ok=false}}if(ok){form.submit()}else{alert("Make sure all fields are filled in before submitting.");return false}}function showMapTooltip(a){new Tip("map_tooltip",$("map_tooltip_content").cloneNode(true),{title:a,stem:"topLeft",hook:{tip:"leftMiddle",target:"rightMiddle",mouse:false},width:"auto",showOn:"click",closeButton:true,hideOn:{element:"closeButton",event:"click"},offset:{x:0,y:10}});$("map_tooltip").prototip.show()}function displayAnalyticsTooltip(a,b){new Tip(a,unescape(b),{style:"darkgrey",stem:"bottomMiddle",hook:{target:"topMiddle",tip:"bottomMiddle"},offset:{x:0,y:15}});$(a).prototip.show()};