//Function : PCL, Post Code Look-up
function ctlCat(url){	
	if (document.implementation && document.implementation.createDocument)
	{
		xmlDoc = document.implementation.createDocument("", "", null);
		xmlDoc.onload = populateListCat;
	}
	else if (window.ActiveXObject)
	{
		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.onreadystatechange = function () {
			if (xmlDoc.readyState == 4) populateListCat()
		};
	}
	else
	{
		alert('Your browser can\'t handle this script');
		return;
	}
	xmlDoc.load(url);
}

function populateListCat(){

	var x = xmlDoc.getElementsByTagName('item');
	var categoryType2 = document.getElementById('categoryType2');
	categoryType2.disabled = false;
	
	for (i=0; i< categoryType2.length;) categoryType2.remove(0);
	
	if(x.length == 0){
		categoryType2.disabled = true
	}
	
	for (i=0;i<x.length;i++)
	{	
		var listItem = document.createElement('OPTION');
		for (j=0;j<x[i].childNodes.length;j++)
		{			
			if (x[i].childNodes[j].nodeType != 1) continue;
			var theData = document.createTextNode(j+'.'+x[i].childNodes[j].firstChild.nodeValue);
			listItem.innerHTML = x[i].childNodes[0].childNodes[0].nodeValue;			
			listItem.value = x[i].childNodes[1].firstChild.nodeValue;			
			categoryType2.appendChild(listItem);
		}
	}
}