var arState = new Array();
	function AdjustStateLabel(cntry)
	{
	   	var obj=document.getElementById("lblstates");
		var sHTML="";
		var bDisable=true;
		switch (cntry)
		{
			case "All" :
				sHTML="<th width=\"156\" scope=\"col\"><strong>State: <br /></strong>";
				bDisable=false;
			break;
			case "USA" :
				sHTML="<th width=\"156\" scope=\"col\"><strong>State: <br /></strong>";
				bDisable=false;
				PopulateStates(cntry);
			break;
			case "Canada" :
				  sHTML="<th width=\"156\" scope=\"col\"><strong>Province: <br /></strong>";
				  bDisable=false;
		  		  PopulateStates(cntry);
			break;
			case "Australia" :
				sHTML="<th width=\"156\" scope=\"col\"><strong>Territory: <br /></strong>";
				bDisable=false;
				PopulateStates("Australia");
			break;
			default :
				sHTML="<th width=\"156\" scope=\"col\"><strong><font color=\"999999\">State: </font><br /></strong>";
			break;

		}

	   obj.innerHTML=sHTML;
	   var obj2=document.getElementById("cbxState");
	   obj2.disabled=bDisable;
	   //alert(obj.innerHTML);
	    var obj3=document.getElementById("selectedcountry");
   	    obj3.value=cntry;
	}
	function PopulateStates(ctry)
	{
	         document.forms['Search'].State.length=0;
			  var numberofitems = arState[ctry].length;

			  for (var j = 0; j < numberofitems; j++)
			  {

				      var el = new Option;
				      el.text = arState[ctry][j];
				      el.value = arState[ctry][j];
				      //alert(el.text);
			    document.forms['Search'].State.options[document.forms['Search'].State.length] = el;
			  }
	}
	function fixState()
	{
	   var obj=document.getElementById("selectedcountry");
	   AdjustStateLabel(obj.value);
        }

