/* ============================================================
   Alaska Airlines Careers Website Script file
   (c) Alaska Airlines, Inc.
   ============================================================ */

function toggleShow(choice)
{if(!document.getElementById(choice).offsetWidth)
	{document.getElementById(choice).style.display="block";}
else
	{document.getElementById(choice).style.display="none";}
}


/* =====================================================================================
   Show all | Hide all code, based heavily on http://www.insidedhtml.com/forums/viewConverse.asp?d_id=19244&Sort=0&t=all
   ===================================================================================== */

function swap1div(id,idlist){ 
 hideall(idlist);
 show1div(id);
}

function hideall(idlist){
	var ids = idlist;
 //loop through the array and hide each element by id
 for (var i=0;i<ids.length;i++){
  hide1div(ids[i]);
 }    
}

function showall(idlist){
	var ids = idlist;
 //loop through the array and show each element by id
 for (var i=0;i<ids.length;i++){
  show1div(ids[i]);
 }    
}

function hide1div(id) {
 //safe function to hide an element with a specified id
 if (document.getElementById) { // DOM3 = IE5, NS6
  document.getElementById(id).style.display = 'none';
 }
 else {
  if (document.layers) { // Netscape 4
   document.id.display = 'none';
  }
  else { // IE 4
   document.all.id.style.display = 'none';
  }
 }
}

function show1div(id) {
 //safe function to show an element with a specified id
    
 if (document.getElementById) { // DOM3 = IE5, NS6
  document.getElementById(id).style.display = 'block';
 }
 else {
  if (document.layers) { // Netscape 4
   document.id.display = 'block';
  }
  else { // IE 4
   document.all.id.style.display = 'block';
  }
 }
}

/* =====================================================================================
   End of Show all | Hide all
   ===================================================================================== */
   