// JavaScript Document
var curlevel=1
var cacheobj=document.doublecombo.LocationPref2

function populate(x){
	for (m=cacheobj.options.length-1;m>0;m--)
		cacheobj.options[m]=null
	
	selectedarray=eval(x)
	
	for (i=0;i<selectedarray.length;i++)
		cacheobj.options[i]=new Option(selectedarray[i].text,selectedarray[i].value)
	
	cacheobj.options[0].selected=true
}

function displaysub(){
	if (curlevel==1){
	populate(cacheobj.options[cacheobj.selectedIndex].value)
	curlevel=2
	}
	else
	gothere()
}


function gothere(){
	if (curlevel==2){
		if (cacheobj.selectedIndex==cacheobj.options.length-1){
		curlevel=1
		populate(country)
		}
		else
		cacheobj.options[cacheobj.selectedIndex].value
	}
}

//SHOW categories by default
populate(country)

