Im having a little issue with compatibility between IE and FF with this script. It works fine on IE, but FF is saying it's not a function.

Basically, im populating two dropdown boxes (dynamically) based on the informaiton in the XML file.

XML file structure:
<a>
<b name="" code="">
<c name="" code=""></c>
</b>
<b name="" code="">
<c name="" code=""></c>
<c name="" code=""></c>
</b>
</a>

in Drop down box 1, i will populate it with every b node with the value of it's name element. Based on the value in drop down box 1, i will populate drop down box 2 with every C node with the value of it's name element.

This javascript works fine with IE, but it needs to work with FireFox aswell. The issue with Firefox, is that it populates drop down 1, but throws the error when selecting the drop down 1 element, to populate drop down 2. Saying that the ".getAttribute is not a function".

I've highlighted the offending code in red, but im completely stuck how i can get this to work with FireFox. Any help and or advice would be welcome!

Javascript code in full:

Code:
var xmlhttp;
var xmlDoc;
var UKnode;
var Destnode;
var opt;
function loadXMLDoc()
{
xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for all new browsers
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE5 and IE6
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
  xmlhttp.onreadystatechange=state_Change;
  xmlhttp.open("GET","File.xml",true);
  xmlhttp.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}
function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = OK
				xmlDoc=xmlhttp.responseXML.documentElement;
				boxone();
    }
  else
    {
    alert("Problem retrieving XML data");
    }
  }
}
function boxone()
{
var x = xmlDoc.getElementsByTagName("UK");
for (i=0;i<(x.length);i++)
{
  opt = document.createElement("option");
	opt.name = x[i].getAttribute("name");
  opt.value = x[i].getAttribute("code");
  opt.innerHTML = x[i].getAttribute("name");
  document.frmSearch.DeptAirportFrom.appendChild(opt);
}
}
function boxtwo(uk)
{
UKnode = xmlDoc.firstChild;
var choice = false;
removeAllOptions(document.frmSearch.DeptAirportTo);
while(choice != true)
{
  if(UKnode[i].getAttribute("code") == uk)
  {
	 Destnode = UKnode.firstChild;
	 choice = true;
  }
	else
	{
	 UKnode = UKnode.nextSibling;
	}
}
choice = false;
while(choice != true)
{
 	opt = document.createElement("option");
	opt.name = Destnode.getAttribute("name");
  opt.value = Destnode.getAttribute("code");
  opt.innerHTML = Destnode.getAttribute("name");
  document.frmSearch.DeptAirportTo.appendChild(opt);
	if(Destnode.nextSibling == null)
  {
	 	choice = true;
  }
	else
	{
	 	Destnode = Destnode.nextSibling;
	}
 }
}