


function setDisplayBlock(id) {
  if (document.getElementById) {
    element = document.getElementById(id);
  } else if (document.all) {
    element = document.all[id];
  } else
  return;

  if (element.style) {
    if (element.style.display != 'block' ) {
      element.style.display = 'block';
    }
  }
}

function setDisplayNone(id) {
  if (document.getElementById) {
    element = document.getElementById(id);
  } else if (document.all) {
    element = document.all[id];
  } else
  return;

  if (element.style) {
    if (element.style.display != 'none' ) {
      element.style.display = 'none';
    }
  }
}


/**
 *  MM shared
 */
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/**
 *  SmartSource shared
 */
function A(N,V){
	return "&"+N+"="+escape(V);
}
function dcsCreateImage(dcsSrc){
	if (false){
		document.writeln('SmartSource:\n'+ dcsSrc);
	} else if (document.images){
		gImages[gIndex]=new Image;
		gImages[gIndex].src=dcsSrc;
		gIndex++;
	}else{
		document.write('<img border="0" name="DCSIMG" width="1" height="1" src="'+dcsSrc+'" />');
	}
}
function dcsMeta(){
	var myDocumentElements;
	if (document.all){
		myDocumentElements=document.all.tags("meta");
	}else if (document.documentElement){
		myDocumentElements=document.getElementsByTagName("meta");
	}
	if (typeof(myDocumentElements)!="undefined"){
		for (var i=1;i<=myDocumentElements.length;i++){
			myMeta=myDocumentElements.item(i-1);
			if (myMeta.name){
				if (myMeta.name.indexOf('WT.')==0){
					WT[myMeta.name.substring(3)]=myMeta.content;
				}else if (myMeta.name.indexOf('DCSext.')==0){
					DCSext[myMeta.name.substring(7)]=myMeta.content;
				}else if (myMeta.name.indexOf('DCS.')==0){
					DCS[myMeta.name.substring(4)]=myMeta.content;
				}
			}
		}
	}
}
function dcsTag(TagImage){
	var P="http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+TagImage+"/dcs.gif?";
	for (N in DCS){
		if (DCS[N]) {
			P+=A(N,DCS[N]);
		}
	}
	for (N in WT){
		if (WT[N]) {
			P+=A("WT."+N,WT[N]);
		}
	}
	for (N in DCSext){
		if (DCSext[N]) {
			P+=A(N,DCSext[N]);
		}
	}
	if (P.length>2048&&navigator.userAgent.indexOf('MSIE')>=0){
		P=P.substring(0,2040)+"&WT.tu=1";
	}
	dcsCreateImage(P);
}

function getFlashVersion() {
  var hasFlash = 0;
  if (navigator.plugins && navigator.plugins.length) {
    plgFlash = navigator.plugins["Shockwave Flash"];
    if (plgFlash) {
      if (plgFlash.description) {
        plgDesc = plgFlash.description;
        hasFlash = plgDesc.charAt(plgDesc.indexOf('.')-1);
      }
    } else {
      hasFlash = -1;
    }
    if (navigator.plugins["Shockwave Flash 2.0"]) {
      hasFlash = 2;
    }
  } else if (navigator.mimeTypes && navigator.mimeTypes.length) {
    mimeFlash = navigator.mimeTypes['application/x-shockwave-flash'];
    if (mimeFlash && mimeFlash.enabledPlugin) {
      hasFlash = 2;
    } else {
      hasFlash = -1;
    }
  } else if ( navigator.userAgent.toLowerCase().indexOf("msie 2") != -1 || navigator.userAgent.toLowerCase().indexOf("msie 3") != -1 || navigator.userAgent.toLowerCase().indexOf("msie 4") != -1 ) {
    hasFlash = 0; // not detecting on IE < 5
  } else if ( navigator.userAgent.toLowerCase().indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && navigator.userAgent.toLowerCase().indexOf("win")!=-1 ) {
    for(var vLoop=9; vLoop>1; vLoop--){
      try {
        var objFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + vLoop);
        hasFlash = vLoop;
        break;
      } catch(e) { }
    }
  }
  return hasFlash;
}

function unhideElementById( strIdToShow ) {
  if (document.getElementById) {
    element = document.getElementById(strIdToShow);
  } else if (document.all) {
    element = document.all[strIdToShow];
  }
  if ( element != null ) {
    if (element.style) {
      element.style.display = '';
    }
  }
}


/**
 *	Whatever:hover - V1.41.050927 - hover & active
 *	------------------------------------------------------------
 *	(c) 2005 - Peter Nederlof
 *	Peterned - http://www.xs4all.nl/~peterned/
 *	License  - http://creativecommons.org/licenses/LGPL/2.1/
 *
 *	Whatever:hover is free software; you can redistribute it and/or
 *	modify it under the terms of the GNU Lesser General Public
 *	License as published by the Free Software Foundation; either
 *	version 2.1 of the License, or (at your option) any later version.
 *
 *	Whatever:hover is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *	Lesser General Public License for more details.
 *
 *	Credits and thanks to:
 *	Arnoud Berendsen, Martin Reurings, Robert Hanson
 *
 *	howto: body { behavior:url("csshover.htc"); }
 *	------------------------------------------------------------
 *
 *      JG: adapted to not be a behaviour to avoid security issues with blocking behaviours (but not JS)
 */

var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
	onhover:{on:'onmouseover', off:'onmouseout'},
	onactive:{on:'onmousedown', off:'onmouseup'}
}

function parseStylesheets() {
	if(!/MSIE (5|6|7)/.test(navigator.userAgent))
	 	return;
	window.attachEvent('onunload', unhookHoverEvents);
	var sheets = doc.styleSheets, l = sheets.length;
	for(var i=0; i<l; i++)
		parseStylesheet(sheets[i]);
}
function parseStylesheet(sheet) {
        if(sheet.imports) {
                try {
                        var imports = sheet.imports, l = imports.length;
                        for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
                } catch(securityException){}
        }

        try {
                var rules = (currentSheet = sheet).rules, l = rules.length;
                for(var j=0; j<l; j++) parseCSSRule(rules[j]);
        } catch(securityException){}
}

function parseCSSRule(rule) {
        var select = rule.selectorText, style = rule.style.cssText;
        if(!csshoverReg.test(select) || !style) return;

        var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
        var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
        var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
        var affected = select.replace(/:(hover|active).*$/, '');
        var elements = getElementsBySelect(affected);
        if(elements.length == 0) return;

        currentSheet.addRule(newSelect, style);
        for(var i=0; i<elements.length; i++)
                new HoverElement(elements[i], className, activators[pseudo]);
}

function HoverElement(node, className, events) {
	if(!node.hovers) node.hovers = {};
	if(node.hovers[className]) return;
	node.hovers[className] = true;
	hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
	hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}
function hookHoverEvent(node, type, handler) {
        node.attachEvent(type, handler);
        hoverEvents[hoverEvents.length] = {
                node:node, type:type, handler:handler
        };
}

function unhookHoverEvents() {
        for(var e,i=0; i<hoverEvents.length; i++) {
                e = hoverEvents[i];
                e.node.detachEvent(e.type, e.handler);
        }
}

function getElementsBySelect(rule) {
	var parts, nodes = [doc];
	parts = rule.split(' ');
	for(var i=0; i<parts.length; i++) {
		nodes = getSelectedNodes(parts[i], nodes);
	}	return nodes;
}
function getSelectedNodes(select, elements) {
        var result, node, nodes = [];
        var identify = (/\#([a-z0-9_-]+)/i).exec(select);
        if(identify) return [doc.getElementById(identify[1])];

        var classname = (/\.([a-z0-9_-]+)/i).exec(select);
        var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
        var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
        for(var i=0; i<elements.length; i++) {
                result = tagName? elements[i].all.tags(tagName):elements[i].all;
                for(var j=0; j<result.length; j++) {
                        node = result[j];
                        if(classReg && !classReg.test(node.className)) continue;
                        nodes[nodes.length] = node;
                }
        }	return nodes;
}

/*
 *	end Whatever:hover
 */

function init() {
  // parseStylesheets(); // not currently used
  unhideElementById('jobPrintLink');
}

/*
onload=init;
init();
*/

















  
    <!--JOB SEARCH JAVASCRIPT-->
    

    

			<!--data dump-->
      var sectorOptions = new Array();
      var lowerSalaryOptions = new Array();
      var upperSalaryOptions = new Array();
      var subDisciplineSectorOptions = new Array();
      var subDisciplineToDisciplineMapping = new Array();

      sectorOptions[0] = [{value:"ALL", label:"All Sectors"}];
      lowerSalaryOptions[0] = [{value:"ALL", label:"Lowest Salary"},{value:"250000", label:"R250k (125ph)"},{value:"500000", label:"R500k (250ph)"},{value:"750000", label:"R750k (375ph)"},{value:"1000000", label:"R1000k (500ph)"}];
      upperSalaryOptions[0] = [{value:"250000", label:"R260k (126ph)"},{value:"500000", label:"R501k (251ph)"},{value:"750000", label:"R751k (376ph)"},{value:"1000000", label:"R1001k (501ph)"},{value:"ALL", label:"Highest Salary"}];

      loadDisciplines();

      function loadDisciplines(){
        var disciplineId;
        var subDisciplineId;
        
          disciplineId = 526;
          sectorOptions[disciplineId] = [{value:"ALL", label:"All Sectors"}];
          lowerSalaryOptions[disciplineId] = [{value:"ALL", label:"Lowest Salary"},{value:"250000", label:"R250k (125ph)"},{value:"500000", label:"R500k (250ph)"},{value:"750000", label:"R750k (375ph)"},{value:"1000000", label:"R1000k (500ph)"}];
          upperSalaryOptions[disciplineId] = [{value:"250000", label:"R260k (126ph)"},{value:"500000", label:"R501k (251ph)"},{value:"750000", label:"R751k (376ph)"},{value:"1000000", label:"R1001k (501ph)"},{value:"ALL", label:"Highest Salary"}];
          
        
          disciplineId = 529;
          sectorOptions[disciplineId] = [{value:"ALL", label:"All Sectors"}];
          lowerSalaryOptions[disciplineId] = [{value:"ALL", label:"Lowest Salary"},{value:"250000", label:"R250k (125ph)"},{value:"500000", label:"R500k (250ph)"},{value:"750000", label:"R750k (375ph)"},{value:"1000000", label:"R1000k (500ph)"}];
          upperSalaryOptions[disciplineId] = [{value:"250000", label:"R260k (126ph)"},{value:"500000", label:"R501k (251ph)"},{value:"750000", label:"R751k (376ph)"},{value:"1000000", label:"R1001k (501ph)"},{value:"ALL", label:"Highest Salary"}];
          
        
          disciplineId = 554;
          sectorOptions[disciplineId] = [{value:"ALL", label:"All Sectors"},{value:"5847", label:"Change Management"},{value:"5846", label:"Compensation & Benefits"},{value:"5848", label:"Employee Relations"},{value:"5849", label:"Head of HR"},{value:"5851", label:"HR Administrator"},{value:"5859", label:"HR Advisor"},{value:"5857", label:"HR Assistant"},{value:"5852", label:"HR Business Partner"},{value:"5853", label:"HR Consultant"},{value:"5854", label:"HR Director"},{value:"5856", label:"HR Manager"},{value:"5850", label:"Learning & Development"},{value:"5858", label:"Recruitment"},{value:"5855", label:"Reward"},{value:"5860", label:"Shared Services"},{value:"5862", label:"Talent Management"},{value:"5863", label:"Trainer"},{value:"5861", label:"Training Manager"}];
          lowerSalaryOptions[disciplineId] = [{value:"ALL", label:"Lowest Salary"}];
          upperSalaryOptions[disciplineId] = [{value:"ALL", label:"Highest Salary"}];
          
        
          disciplineId = 552;
          sectorOptions[disciplineId] = [{value:"ALL", label:"All Sectors"}];
          lowerSalaryOptions[disciplineId] = [{value:"ALL", label:"Lowest Salary"}];
          upperSalaryOptions[disciplineId] = [{value:"ALL", label:"Highest Salary"}];
          
        
          disciplineId = 553;
          sectorOptions[disciplineId] = [{value:"ALL", label:"All Sectors"}];
          lowerSalaryOptions[disciplineId] = [{value:"ALL", label:"Lowest Salary"}];
          upperSalaryOptions[disciplineId] = [{value:"ALL", label:"Highest Salary"}];
          
        
          disciplineId = 557;
          sectorOptions[disciplineId] = [{value:"ALL", label:"All Sectors"},{value:"5866", label:"Infrastructure"},{value:"5865", label:"IT Business Analysis"},{value:"5868", label:"IT Project & Programme Management"},{value:"5869", label:"IT Support"},{value:"5870", label:"IT Systems & Testing"},{value:"5867", label:"Senior IT Management"}];
          lowerSalaryOptions[disciplineId] = [{value:"ALL", label:"Lowest Salary"}];
          upperSalaryOptions[disciplineId] = [{value:"ALL", label:"Highest Salary"}];
          
        
      }
    
  


function populateSelectList( theSelectList, optionsArray ){
  theSelectList.options.length = 0;
  for( var i=0; i<optionsArray.length; i++){ /// > js fix
    theSelectList.options[i] = new Option(optionsArray[i].label, optionsArray[i].value);
  }
}

function onPageLoad(theDocument){
  if( document.getElementById("jobSearchJavascriptEnabled") != null ){
    document.getElementById("jobSearchJavascriptEnabled").value = true;
    document.getElementById("disciplineDropdownParagraph").style.display="block";
    if ( document.getElementById("sectorDropdownParagraph") != null ) {
      document.getElementById("sectorDropdownParagraph").style.display="block";
      document.getElementById("jobSearchDisciplinesSelect").disabled = false;
      document.getElementById("jobSearchSectorSelect").disabled = false;
    }

    var nestedDisciplineSectorDropdownParagraph = document.getElementById("nestedDisciplineSectorDropdownParagraph");
    if( nestedDisciplineSectorDropdownParagraph != null ){
			var nestedJobSearchDisciplinesSelect = document.getElementById("nestedJobSearchDisciplinesSelect");
			nestedJobSearchDisciplinesSelect.disabled = true;
      nestedDisciplineSectorDropdownParagraph.style.display="none";
    }
  }

  if( document.getElementById("cvSubmitJavascriptEnabled") != null ){
    if( document.getElementById("cvDisciplineDropdownLi") != null ){
      document.getElementById("cvSubmitJavascriptEnabled").value = true;
      document.getElementById("cvDisciplineDropdownLi").style.display="block";
      document.getElementById("cvSubmitDisciplinesSelect").disabled = false;
      document.getElementById("cvSectorDropdownLi").style.display="block";
      document.getElementById("cvOfficeDropdownLi").style.display="block";

      var nestedDisciplineSectorDropdownParagraph = document.getElementById("nestedCvSubmitDisciplineDropdownLi");
      if( nestedDisciplineSectorDropdownParagraph != null ){
        var cvNestedDiscipline = document.getElementById("cvNestedDiscipline");
        cvNestedDiscipline.disabled = true;
        nestedDisciplineSectorDropdownParagraph.style.display="none";
      }
    } else {
      // single cvOffice
    }
  }
}


function onDisciplineChange(theDocument){
  var disciplineSelect = theDocument.getElementById("jobSearchDisciplinesSelect");
  var disciplineId = disciplineSelect.value;  
  var subDisciplineId = 0;
  if( disciplineId == "ALL" ) {
    disciplineId = 0;
  } else if ( disciplineId.indexOf("D") > -1 ) {
    subDisciplineId = disciplineId.substring(1);
    disciplineId = subDisciplineToDisciplineMapping[subDisciplineId];
  }

  var sectorSelect = theDocument.getElementById("jobSearchSectorSelect");
  if (subDisciplineId > 0) {
     populateSelectList( sectorSelect, subDisciplineSectorOptions[subDisciplineId] );
  } else {
     populateSelectList( sectorSelect, sectorOptions[disciplineId] );
  }

  var salaryLowerSelect = theDocument.getElementById("salaryLowerSelect");
  populateSelectList( salaryLowerSelect, lowerSalaryOptions[disciplineId] );
  salaryLowerSelect.selectedIndex = 0;

  var salaryUpperSelect = theDocument.getElementById("salaryUpperSelect");
  populateSelectList( salaryUpperSelect, upperSalaryOptions[disciplineId] );
  salaryUpperSelect.selectedIndex = salaryUpperSelect.length - 1;
  salaryUpperSelect.options[salaryUpperSelect.length - 1].selected = true;
}

function jobSearchTextBoxOnFocus(jobSearchTextBox){
  var prompt = document.getElementById("searchTextPrompt").value;
  if( jobSearchTextBox.value == prompt ){
    jobSearchTextBox.value = "";
  }
}

function jobSearchTextBoxOnBlur(jobSearchTextBox){
  var prompt = document.getElementById("searchTextPrompt").value;
  if( jobSearchTextBox.value == "" ){
    jobSearchTextBox.value = prompt;
  }
}



