function loadRss(counter, url, maxRows, target) { if (window.XMLHttpRequest) { ajaxReq = new XMLHttpRequest(); } else if (window.ActiveXObject) { ajaxReq = new ActiveXObject("Microsoft.XMLHTTP"); } ajaxReq.open("POST", "/secure/rss.jsp", true); ajaxReq.onreadystatechange = function (){ if (ajaxReq.readyState == 4) { if (ajaxReq.status == 200) { var xml = ajaxReq.responseXML.childNodes[0].nodeName == "rss"? ajaxReq.responseXML.childNodes[0].childNodes[1]: ajaxReq.responseXML.childNodes[1].childNodes[0]; var table = ""; var row = 0; for(i = 0; i < xml.childNodes.length; i++) { if (xml.childNodes[i].nodeName == 'title') { document.getElementById('rssTitle' + counter).innerHTML = xml.childNodes[i].childNodes[0].nodeValue; } if (xml.childNodes[i].nodeName == 'item') { var title = ''; var link = ''; var desc = ''; for (j = 0; j < xml.childNodes[i].childNodes.length; j++) { if (xml.childNodes[i].childNodes[j].nodeName == 'title') { // alert(xml.childNodes[i].childNodes[j].childNodes[0].nodeValue); title = xml.childNodes[i].childNodes[j].childNodes[0].nodeValue; } else if (xml.childNodes[i].childNodes[j].nodeName == 'link') { link = xml.childNodes[i].childNodes[j].childNodes[0].nodeValue; } else if (xml.childNodes[i].childNodes[j].nodeName == 'description') { desc = xml.childNodes[i].childNodes[j].childNodes[0].nodeValue; } } //alert(title); table += ""; title = title.length > 25? title.substring(0, 25) + '...': title; desc = desc.length > 50? desc.substring(0, 50) + '...': desc; table += ""; table += ""; row++; } if (row > 4) { break; } } table += "
" + title + "
" + desc + "
"; document.getElementById('rssContent' + counter).innerHTML = table; } } }; ajaxReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajaxReq.send("url=" + url); window.status = "Done"; } function showDetails(params, w, h){ if (window.XMLHttpRequest) { ajaxReq = new XMLHttpRequest(); } else if (window.ActiveXObject) { ajaxReq = new ActiveXObject("Microsoft.XMLHTTP"); } ajaxReq.open("POST", "servlet/AjaxHandler", true); ajaxReq.onreadystatechange = function (){ if (ajaxReq.readyState == 4) { if (ajaxReq.status == 200) { if($('window_id')) { win.destroy(); } win = new Window('window_id', {className: "alphacube", title: "", width:w, height:h, zIndex:150, resizable: false, maximizable: false, minimizable: false, draggable:true}); win.getContent().innerHTML = ajaxReq.responseText; win.setDestroyOnClose(); win.showCenter(true); } } }; ajaxReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajaxReq.send(params); window.status = "Done"; } function recr_job_position_bo_selectAll(theElement){ var theForm = theElement.form, z = 0; for(z=0; z=0){ theForm[z].checked = theElement.checked; } } } function recr_job_position_bo_collectIDs(event){ var field = document.forms['recr_job_position_bo_form'].elements['selected']; if (field) { var id = 0; for(z=0; z< field.length;z++){ if (field[z].checked) { id = field[z].value; } } width = 800; height = 250; var extraParams = '&apply=true&showJobSeeker=true&modify=false&width=778'; showBO("JOB_POSITION_BO", id, "../jobPositionSummary.jsp&JOB_POSITION_ID="+id + "&" + extraParams, width, height, "CANDIDATE_BO"); } else { var content = ''; content += ''; content += ''; content += '
'; content += '
You do not have a job posting created to make this selection.

Click here to add a new job posting.

Click here to go back to the search
'; if($('CANDIDATE_BO')) { win.destroy(); } win = new Window('CANDIDATE_BO', {className: "alphacube", title: "", width:500, height:100, zIndex:150, resizable: false, maximizable: false, minimizable: false, draggable:true}); win.getContent().innerHTML = content; win.setDestroyOnClose(); win.showCenter(true); } } function showBO(boName, id, redirectUrl, w, h){ var winName = boName; if (showBO.arguments.length == 6) { winName = showBO.arguments[5]; } showLookup("servlet/ServletDispatcher", "action=com.emergys.servlet.GetBusinessObjectServlet&business_object_name=" + boName + "&BO_PARAMETER_NAME=" + boName + "&object_id=" + id + "&redirect_url=" + redirectUrl, winName, w, h); } function showLookup(url, params, winName, w, h){ ajaxReq = getHTTPObject(); ajaxReq.open("POST", url, true); ajaxReq.onreadystatechange = function (){ if (ajaxReq.readyState == 4) { if (ajaxReq.status == 200) { if($(winName)) { win.destroy(); } win = new Window(winName, {className: "alphacube", title: "", width:w, height:h, zIndex:150, resizable: false, maximizable: false, minimizable: false, draggable:true}); win.getContent().innerHTML = ajaxReq.responseText; win.setDestroyOnClose(); win.showCenter(true); } } }; ajaxReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajaxReq.send(params); window.status = "Done"; } function showResults(divName, url, params){ ajaxReq = getHTTPObject(); ajaxReq.open("POST", url, true); ajaxReq.onreadystatechange = function (){ if (ajaxReq.readyState == 4) { if (ajaxReq.status == 200) { document.getElementById(divName).innerHTML = ajaxReq.responseText; } } }; ajaxReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); ajaxReq.send(params); window.status = "Done"; } function getHTTPObject() { var xmlhttp; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E){ xmlhttp = false; } } if (typeof XMLHttpRequest != 'undefined') { try{ xmlhttp = new XMLHttpRequest(); }catch (e){ xmlhttp = false; } } return xmlhttp; } function setValues(fieldName, id, field, value) { var empty = eval("document.getElementsByName(field)[0].type == ''"); if (!empty) { if(document.getElementsByName(field)[0].type =='radio' || document.getElementsByName(field)[0].type =='checkbox'){ var radioButtonArray = document.getElementsByName(field); var x = 0; for(;x < radioButtonArray.length;x++) { if(radioButtonArray[x].value == value) { document.getElementsByName(field)[x].checked = true; } } } else { document.getElementsByName(field)[0].value = value; } document.getElementsByName(fieldName)[0].value = id; } } function validate(url, changeform) { var usrName = changeform.email.value; var oldPassword = changeform.oldPass.value; var newPassword = changeform.newPass.value; var repeatPassword = changeform.repeatPass.value; if (usrName=="" || oldPassword=="" || newPassword=="" || repeatPassword=="" ){ alert("Please enter the required fields and try again."); return false; } else { if(newPassword!=repeatPassword){ alert("Entered Password does not match. Please enter the passwords again."); return false; } else { var params = ''; for (i = 0; i < changeform.elements.length; i++) { params += changeform.elements[i].name + "=" + changeform.elements[i].value + "&"; } showLookup(url, params, 'changepass', 450, 200) } } } function sendForm(url, theForm, winName, w, h) { var params = ''; for (i = 0; i < theForm.elements.length; i++) { params += theForm.elements[i].name + "=" + theForm.elements[i].value + "&"; } showLookup(url, params, winName, w, h) } function closeWin(winName) { Windows.close(winName); } function hideDiv(divName) { document.getElementById(divName).innerHTML=''; } function loadCountries() { var options = ''; for(i = 0; i < countries.length; i++) { countryId = countries[i].split('~')[0]; countryName = countries[i].split('~')[1]; options += '' } if (ExpYes) { document.getElementsByName('COUNTRY_ID')[0].outerHTML = ''; } else { document.getElementsByName('COUNTRY_ID')[0].innerHTML = options; } } function refreshLocations() { var selectOne = document.search.elements['COUNTRY_ID'][0].text; var selectedCountry = document.search.elements['COUNTRY_ID'][document.search.elements['COUNTRY_ID'].selectedIndex].value; var options = ''; if (selectedCountry != '') { var locations = eval("cities_" + selectedCountry); for(i = 0; i < locations.length; i++) { locationId = locations[i].split('~')[0]; locationName = locations[i].split('~')[1]; options += '' } } else { var selectOneCountry = document.search.elements['CITY_ID'][0].text; options = ''; } if (ExpYes) { document.getElementsByName('CITY_ID')[0].outerHTML = ''; } else { document.getElementsByName('CITY_ID')[0].innerHTML = options; } } function getParams(formName) { var params = ''; for (i = 0; i < document.forms[formName].elements.length; i++) { params += '&' + document.forms[formName].elements[i].name + '=' + document.forms[formName].elements[i].value; } return params; } function mycandidate_resume_bo_collectIDs(event) { var selIds=""; var elem = document.forms['mycandidate_resume_bo_form'].elements; var s=""; for(i=0;i