	function do_SetState_cb(result)
	{		
		//Keep getting a : from result set ???
		//This clears it out - a work around for now
		//TO DO: Figure why AJAX JS addding :
		strResult = replace(result, ':', '' );
		document.getElementById('StateDisplayed').innerHTML = strResult;
		//document.getElementById('placeholder').style.visibility = "hidden"; 
	}
	
	function replace(s, t, u)
	{
		/*
		**  Replace a token in a string
		**    s  string to be processed
		**    t  token to be found and removed
		**    u  token to be inserted
		**  returns new String
		*/
		i = s.indexOf(t);
		r = "";
		if (i == -1) return s;
		r += s.substring(0,i) + u;
		if ( i + t.length < s.length)
		r += replace(s.substring(i + t.length, s.length), t, u);
		return r;
	}
	
	function SetState(CountryValue)
	{
		SetStateWithSelection(CountryValue, '');
	}
	
	function SetStateWithSelection(CountryValue, StateValue)
	{
		x_GetStateData(CountryValue, StateValue, do_SetState_cb);
		document.getElementById('StateDisplayed').style.visibility = "visible"; 
	}