function showLoc() {
  if (document.getElementById('sel_loc')) {
    document.getElementById('sel_loc').value='';
  }
  document.filterCareer.submit();
}


function leftNavOn(id,num,action) {
  if (document.getElementById && document.getElementById(id)) {
    var leftnav = document.getElementById(id);
    var page_objects = leftnav.getElementsByTagName("LI");
    counter = 0;
    for (var i=0; i < page_objects.length; i++) {
      if (page_objects[i]!=null) {
        if (page_objects[i].parentNode.id == id) {
          counter++;
          page_objects[i].className = "";
          if (page_objects[i].childNodes[0].href==window.location||page_objects[i].childNodes[1].href==window.location) page_objects[i].className = "on";
        }
        if (counter == num && page_objects[i].className!="on") {
          page_objects[i].className = action;
          var hidden_objects = page_objects[i].getElementsByTagName("UL");
          for (var j=0; j < hidden_objects.length; j++) {
            hidden_objects[j].style.display = "none";
          }
      	}
    	}
  	}
  }
}

function supp_header_enews(id) {
  if (document.getElementById && document.getElementById("supp_header_enews")) {
    var toggleCont = document.getElementById("supp_header_enews");
    if (id == "enews") {
      toggleCont.style.display = "block";
    } else {
      toggleCont.style.display = "none";
    }
  }
}

function doDelete(url,qstr) {
	if (!confirm("Are you sure you want to delete this?")) return;
  if (qstr!= null) location = url+"&qstr="+escape(qstr);
	else if (url != null) location = url;
}


function popUpwin(URL, winwidth, winheight){
  var extwin = window.open(URL,'newWin','toolbar=1,location=1,menubar=1,status=1,resizable=1,scrollbars=1,width='+winwidth+',height='+winheight);
  extwin.focus();
 }
 
function popUpOtherwin(URL, winName, winwidth, winheight){
  var extwin = window.open(URL,winName,'toolbar=1,location=1,menubar=1,status=1,resizable=1,scrollbars=1,width='+winwidth+',height='+winheight);
  extwin.focus();
 }
 
 function popUpSimpleWin(URL, winwidth, winheight){
  var extwin = window.open(URL,'newWin','toolbar=0,location=0,menubar=0,status=1,resizable=1,scrollbars=1,width='+winwidth+',height='+winheight);
  extwin.opener=self;
  extwin.focus();
 }
 
function closeWindow(orgHref) {
  if (top.self.opener){
    top.self.opener.focus();
    top.self.window.close();
  } else {
  top.location.href=orgHref;
  }
}

function PopUp(id) 
{
if (document.getElementById(id).style.visibility == "visible")
  { 
   document.getElementById(id).style.visibility = "hidden";
  } else {
   document.getElementById(id).style.visibility = "visible";
  }
}

function ShowPop(id)
{
   document.getElementById(id).style.visibility = "visible";
}

function HidePop(id)
{
   document.getElementById(id).style.visibility = "hidden";
}
function AntiSpam_Slicer(n, d, c){location.href="mailto:" + n + "@" + d + "." + c;}

function selectContent(id)
{
  // test to make sure browser is DOM compliant
  if (document.getElementById('selectContent')) {
    // curr Obj is div element with 'selectContent' id
    curr = document.getElementById('selectContent');
    for( var x = 0; x < curr.childNodes.length; x++ ) {
      if (curr.childNodes[x].nodeName.toLowerCase() == "ul") {
        // if Nodes of curr are named "ul" set new currUL Object
        currUL = curr.childNodes[x];
        for( var y = 0; y < currUL.childNodes.length; y++ ) {
          if (currUL.childNodes[y].nodeName.toLowerCase() == "li") {
            // if currUL Node is li, first child (assumed is an "a" tag) - set tab to off
            currUL.childNodes[y].firstChild.style.backgroundPosition = 'left top';
          }
        }
      }
      else if (curr.childNodes[x].nodeName.toLowerCase() == "div") {
        // if Nodes of curr are named "div" hide all the divs to init selectContent before showing id below
        curr.childNodes[x].style.display = 'none';
      }
    }
    document.getElementById('tab'+id+'Content').style.display = 'block';
    document.getElementById('tabLink'+id).style.backgroundPosition = 'left bottom';
  }
}

function selectContentInit() {
  selectContent('1');
}


