function showHide(element_id) {
	if (document.getElementById && document.getElementById(element_id) && document.getElementById(element_id).style) {
		var menu  = document.getElementById(element_id);
		var arrow = document.getElementById(element_id + '_arrow');
		if (menu.style.display == "block") {
			menu.style.display = "none";
			if (arrow.src) { arrow.src = arrow.src.replace("down","right"); }
		}
		else {
			menu.style.display = "block";
			if (arrow.src) { arrow.src = arrow.src.replace("right","down"); }
		}
	}
}

function changeHeight(new_height) {
	document.getElementById('banner').style.height = new_height + 'px';
}

sub_array = new Array ('employstandard', 'health', 'labourmenu');
menus_status_array = new Array ();



pathis=location.pathname;
new_array=pathis.split("/");
subdirectory=new_array[2];
//document.write(subdirectory);

	

function getFolder(element_id)
{

document.getElementById('resources').style.display = "none";
document.getElementById('abc').style.display = "none";

if(subdirectory == "es")
{
	document.getElementById('employstandard').className = 'showSub';
	
}

else if(subdirectory == "hs")
{
	document.getElementById('health').className = 'showSub';
}

else if(subdirectory == "lr")
{
	document.getElementById('labourmenu').className = 'showSub';
}

else if(subdirectory == "jpo")
{
	document.getElementById('jpo').className = 'showSub';
}

else if(subdirectory == "legal")
{
	document.getElementById('legal').className = 'showSub';
}


	
//document.write(subdirectory);
}




function showHideSub (element_id) {
  if (document.getElementById) {
    var sub_id = document.getElementById(element_id);
   
 
    if (menus_status_array[element_id] != 'show') {
    
      sub_id.className = 'showSub';
	  menus_status_array[element_id] = 'show';
	
    }else{
    
      sub_id.className = 'hideSub';
	  menus_status_array[element_id] = 'hide';
	 
    }
  }
}

function showHideDiv (element_id) {
  if (document.getElementById) {
    var sub_id = document.getElementById(element_id);
   
 
    if (menus_status_array[element_id] != 'show') {
    
      sub_id.className = 'showDiv';
	  menus_status_array[element_id] = 'show';
	
    }else{
    
      sub_id.className = 'hideDiv';
	  menus_status_array[element_id] = 'hide';
	 
    }
  }
}


function breadcrumbs(){
  sURL = new String;
  bits = new Object;
  var x = 0;
  var stop = 0;
  var output = "<a href=\"/\">Home</a> &nbsp;>&nbsp; ";
  sURL = location.href;
  sURL = sURL.slice(8,sURL.length);
  chunkStart = sURL.indexOf("/");
  sURL = sURL.slice(chunkStart+1,sURL.length)
  while(!stop){
    chunkStart = sURL.indexOf("/");
    if (chunkStart != -1){
      bits[x] = sURL.slice(0,chunkStart)
      sURL = sURL.slice(chunkStart+1,sURL.length);
    }else{
      stop = 1;
    }
    x++;
  }
  for(var i in bits){
    output += "<a href=\"";
    for(y=1;y<x-i;y++){
      output += "../";
    }
    output += bits[i] + "/\">" + bits[i] + "</a> &nbsp;>&nbsp; ";
  }
  document.write(output + document.title);
}



 
