var url ="";
var what = "SetSubcat(req.responseText)";

function GetSubcat(StateCode,PageUrl)
{
	//alert(StateCode);
	if(document.frm.cboIsland.value!="0")
	{
		//alert(StateCode);
		url=PageUrl;
		what = "SetSubcat(req.responseText)";
		DoCallback("StateCode="+StateCode);
	}
}


function SetSubcat(State1)
{//alert(State1);
	var stateBox = document.getElementById("cboRegion");
	stateBox.options.length = 0;	
	stateBox.options[stateBox.options.length] = new Option('--Any--','');

	document.getElementById("cboArea").options.length = 0;
	document.getElementById("cboArea").options[document.getElementById("cboArea").options.length] = new Option('--Any--','');

	if(State1 != "")
	{
		var arrStates = State1.split(";");
		for(i = 0; i < arrStates.length; i++)
		{
			if(arrStates[i] != "")
			{
				var arrStatesnew = arrStates[i].split(":");
				if(arrStatesnew[0] != "")
				{
					stateBox.options[stateBox.options.length] = new Option(arrStatesnew[1], arrStatesnew[0]);
				}
			}
		}
	}
}

function GetCities(StateID, PageUrl)
{
	//alert(StateID);
	if(document.frm.cboRegion.value != "0")
	{
		//alert(StateID);
		what = "SetCities(req.responseText)";
		url=PageUrl;
		DoCallback("StateID="+StateID);
	}
}

function SetCities(State1)
{
	var stateBox = document.getElementById("cboArea");
	stateBox.options.length = 0;
	stateBox.options[stateBox.options.length] = new Option('--Any--','')
	if(State1 != "")
	{
		var arrStates = State1.split(";");
		for(i = 0; i < arrStates.length; i++)
		{
			if(arrStates[i] != "")
			{
				var arrStatesnew = arrStates[i].split(":");
				if(arrStatesnew[0] != "")
				{
					stateBox.options[stateBox.options.length] = new Option(arrStatesnew[1], arrStatesnew[0]);
				}
			}
		}
	}
}