// Locators for My ajcjobs, CC and Employer submenu help and promo messages var sitePath = window.location.href; var sitePathSplit = sitePath.split('/'); var siteServer = sitePathSplit[2]; var dirPath = '/' + sitePathSplit[3] + '/' + sitePathSplit[4] + '/'; var dirPathCommonFiles = '/' + sitePathSplit[4] + '/' + sitePathSplit[6] + '/'; var endPath = sitePathSplit[5]; var endPathEndeca = sitePathSplit[6]; var contentPathSplit = sitePath.split('='); var contentEndPath = contentPathSplit[2]; if (contentEndPath == null) contentEndPath = 'default'; var contentDirPath = contentEndPath.split('/'); var contentMainDir = contentDirPath[1]; var contentSubDir = contentDirPath[2]; var contentSubSubDir = contentDirPath[3]; var blogDir = sitePathSplit[7]; var jobNewsMain = sitePathSplit[5]; var jobNewsDir = sitePathSplit[6]; var wetFeetDir = sitePathSplit[6]; // Career Center and Endeca linking var baseCMSURL = 'http://jobnews.ajcjobs.com/news/content/'; var baseEndecaURL = 'http://jobsearch.ajcjobs.com/hp/ajc/jobsearchtc/'; function extCareerCenter() {document.location = baseCMSURL + 'careercenter/homepage/';} // CSS class toggle function toggleBgColor(elem) { var toggleBgStyle = document.getElementById(elem).style; toggleBgStyle.backgroundColor = toggleBgStyle.backgroundColor? "":"#ddd"; } // Generic window open function jobsOpenWindow(url) {window.open (url, 'jobsWindow','width=640,height=400,location=1,resizable=1,scrollbars=1,status=1,toolbar=1');} function jobsWindow(url) {window.open (getJobsURL() + url, 'jobsWindow','width=640,height=400,location=1,resizable=1,scrollbars=1,status=1,toolbar=1');} function jobsearchWindow(url) {window.open (getJobsearchURL() + url, 'jobsWindow','width=640,height=400,location=1,resizable=1,scrollbars=1,status=1,toolbar=1');} function offsiteWindow(url) {window.open (url, 'jobsWindow','width=640,height=400,location=1,resizable=1,scrollbars=1,status=1,toolbar=1');} function jobsearchTips() {window.open (getJobsURL() + 'JOBSWeb/ajc/content/help/searchTipsResults.html', 'jobsWindow','width=640,height=400,location=1,resizable=1,scrollbars=1,status=1,toolbar=1');} var highLink=""; var highMore=""; /*********************************************** //@Rajit 10/28/06: to fix highlighting. Called from homeSearchBox.jsp ***********************************************/ function doOverlay(objstr1,objstr2){ if (document.getElementById){ if(highLink!=""){ document.getElementById(highLink).style.display="none"; if(highLink!=objstr1 ){ document.getElementById(objstr1).style.display="block"; highLink=objstr1; }else{ highLink=""; } }else{ highLink=objstr1; document.getElementById(highLink).style.display="block"; } if(highMore!=""){ document.getElementById(highMore).style.backgroundColor=""; if(highMore!=objstr2 ){ document.getElementById(objstr2).style.backgroundColor="#ddd"; highMore=objstr2; }else{ highMore=""; } }else{ highMore=objstr2; document.getElementById(highMore).style.backgroundColor="#ddd"; } return false; } return true; } /*********************************************** //@Rajit 10/28/06: to fix highlighting. Called from searchNavBox.jsp ***********************************************/ function doOffset(curobj, subobjstr, opt_position){ if (document.getElementById){ var subobj=document.getElementById(subobjstr); var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("middle")!=-1)? (curobj.offsetHeight - (subobj.offsetHeight / 2)) : 0); subobj.style.left=xpos+"px" subobj.style.top=ypos+"px" return false } else return true } /*********************************************** * Drop Down/ Overlapping Content- © Dynamic Drive (www.dynamicdrive.com) * Modded 09012006 mboyd for change in link/popup positioning ***********************************************/ function getposOffset(overlay, offsettype){ var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop; var parentEl=overlay.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function overlay(curobj, subobjstr, opt_position){ if (document.getElementById){ var subobj=document.getElementById(subobjstr) subobj.style.display=(subobj.style.display!="block")? "block" : "none" var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("middle")!=-1)? (curobj.offsetHeight - (subobj.offsetHeight / 2)) : 0); subobj.style.left=xpos+"px" subobj.style.top=ypos+"px" return false } else return true } function overlayclose(subobj){ document.getElementById(subobj).style.display="none" } /*********************************************** // Splintered striper 1.3 // Patrick H. Lauke aka redux / www.splintered.co.uk // Distributed under the Creative Commons Attribution-ShareAlike license - http://creativecommons.org/licenses/by-sa/2.0/ ***********************************************/ function striper(parentElementTag, parentElementClass, childElementTag, styleClasses) { var i=0,currentParent,currentChild; if ((document.getElementsByTagName)&&(parentElementTag)&&(childElementTag)&&(styleClasses)) { var styles = styleClasses.split(','); var parentItems = document.getElementsByTagName(parentElementTag); while (currentParent = parentItems[i++]) { if ((parentElementClass == null)||(currentParent.className == parentElementClass)) { var j=0,k=0; var childItems = currentParent.getElementsByTagName(childElementTag); while (currentChild = childItems[j++]) { k = (j+(styles.length-1)) % styles.length; currentChild.className = currentChild.className+" "+styles[k]; } } } } }