function set_states_club_search(stage, state)
{
	
	//	We first set up the variable below that represents the each of the hidden form fields  
	//	Then we will use the if to detect which country is chosen and switch out the visible and hidden form fields via the variables


	var hidden_state_ctrl=document.forms['club_search'].hidden_state;
	var hidden_province_ctrl=document.forms['club_search'].hidden_province;	
	var hidden_australia_ctrl=document.forms['club_search'].hidden_australia;
	var hidden_mexico_ctrl=document.forms['club_search'].hidden_mexico;	
	var hidden_uae_ctrl=document.forms['club_search'].hidden_uae;	
	var hidden_italy_ctrl=document.forms['club_search'].hidden_italy;
	var hidden_brazil_ctrl=document.forms['club_search'].hidden_brazil;
	
	var hidden_other_ctrl=document.forms['club_search'].hidden_other;	
	
	var vis_state_ctrl=document.forms['club_search'].state;	
	var country_ctrl=document.forms['club_search'].country;	
	var state_label = document.getElementById('state_lbl');
	
	var selected_country=country_ctrl.options[country_ctrl.selectedIndex].value;
	
	var mylen = 0;

	
	if (selected_country == "USA" && stage == "initial")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00><strong>*</strong></font>:";
		mylen = hidden_state_ctrl.length;
		
		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_state_ctrl.options[i].text,hidden_state_ctrl.options[i].value);
			if ( vis_state_ctrl.options[i].value == state)
			{
			vis_state_ctrl.selectedIndex=i;
			}
		}
		

	} 

	else if (selected_country == "USA")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00><strong>*</strong></font>:";
		mylen = hidden_state_ctrl.length;
		
		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_state_ctrl.options[i].text,hidden_state_ctrl.options[i].value);		 
		}
		

	} 
	
  else if (selected_country == "Canada")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_province_ctrl.length;
		
		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_province_ctrl.options[i].text,hidden_province_ctrl.options[i].value);		 
		}
		
			
	
	}
  else if (selected_country == "Australia")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State/Territory<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_australia_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_australia_ctrl.options[i].text,hidden_australia_ctrl.options[i].value);		 
		}
		
			
	}
 else if (selected_country == "Mexico")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00></font>:";	
		mylen = hidden_mexico_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_mexico_ctrl.options[i].text,hidden_mexico_ctrl.options[i].value);		 
		}
		
			
	}
else if (selected_country == "UAE")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Emirate<font color=#fe6d00></font>:";	
		mylen = hidden_uae_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_uae_ctrl.options[i].text,hidden_uae_ctrl.options[i].value);		 
		}
		
			
	}
else if (selected_country == "Italy")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00></font>:";	
		mylen = hidden_italy_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_italy_ctrl.options[i].text,hidden_italy_ctrl.options[i].value);		 
		}
		
			
	}
else if (selected_country == "Brazil")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00></font>:";	
		mylen = hidden_brazil_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_brazil_ctrl.options[i].text,hidden_brazil_ctrl.options[i].value);		 
		}
		
			
	}
 else 
	{
		state_label.innerHTML = "State/Province:";	
					
		mylen = hidden_other_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		vis_state_ctrl.disabled=true;
	
	

	}
	
	delete_extra_options(vis_state_ctrl, mylen);
}

function set_states()
{
	
	//	We first set up the variable below that represents the each of the hidden form fields  
	//	Then we will use the if to detect which country is chosen and switch out the visible and hidden form fields via the variables


	var hidden_state_ctrl=document.forms['club_search'].hidden_state;
	var hidden_province_ctrl=document.forms['club_search'].hidden_province;	
	var hidden_australia_ctrl=document.forms['club_search'].hidden_australia;
	var hidden_mexico_ctrl=document.forms['club_search'].hidden_mexico;	
	var hidden_uae_ctrl=document.forms['club_search'].hidden_uae;	
	
	var hidden_uae_ctrl=document.forms['club_search'].hidden_saudiarabia;	
	var hidden_italy_ctrl=document.forms['club_search'].hidden_italy;
	var hidden_brazil_ctrl=document.forms['club_search'].hidden_brazil;
	var hidden_dominican_republic_ctrl=document.forms['club_search'].hidden_dominican_republic;	
	var hidden_colombia_ctrl=document.forms['club_search'].hidden_colombia;	
	var hidden_japan_ctrl=document.forms['club_search'].hidden_japan;
	var hidden_venezuela_ctrl=document.forms['club_search'].hidden_venezuela;
	var hidden_indonesia_ctrl=document.forms['club_search'].hidden_indonesia;
	var hidden_malaysia_ctrl=document.forms['club_search'].hidden_malaysia;
	var hidden_costarica_ctrl=document.forms['club_search'].hidden_costarica;
	var hidden_panama_ctrl=document.forms['club_search'].hidden_panama;
		
	var hidden_other_ctrl=document.forms['club_search'].hidden_other;	
	
	var vis_state_ctrl=document.forms['club_search'].state;	
	var country_ctrl=document.forms['club_search'].country;	
	var state_label = document.getElementById('state_lbl');
	
	var zip = document.forms['club_search'].zip;
	var phone = document.forms['club_search'].phone;
	var phone_sample = document.getElementById('phone_sample');
	var country_code = document.getElementById('country_code');

	
	var selected_country=country_ctrl.options[country_ctrl.selectedIndex].value;
	
	var mylen = 0;

	//alert (selected_country + " " + vis_state_ctrl.options[0].text);

//	if ((selected_country == "USA" && vis_state_ctrl.options[0].text == "Select a State") ||  
//		(selected_country == "Canada" && vis_state_ctrl.options[0].text == "Select a Province") || 
//		(selected_country == "Mexico" && vis_state_ctrl.options[0].text == "Select a Province"))
//	{
//		return;
//	}
	
	if (selected_country == "USA")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00><strong>*</strong></font>:";
		mylen = hidden_state_ctrl.length;
		
		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_state_ctrl.options[i].text,hidden_state_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "";
		phone.size=20;
		phone.maxLength=14;
		phone_sample.innerHTML = "(xxx) xxx-xxxx";

	} 
  else if (selected_country == "Canada")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_province_ctrl.length;
		
		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_province_ctrl.options[i].text,hidden_province_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=7;
		
		country_code.innerHTML = "";
		phone.size=20;
		phone.maxLength=14;
		phone_sample.innerHTML = "(xxx) xxx-xxxx";
		
	
	}
	
  else if (selected_country == "Australia")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State/Territory<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_australia_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_australia_ctrl.options[i].text,hidden_australia_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+61 (0) ";	
		phone.size=13;
		phone.maxLength=14;
		phone_sample.innerHTML = "x xxxx xxxxxx";
		
	}
 else if (selected_country == "Mexico")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_mexico_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_mexico_ctrl.options[i].text,hidden_mexico_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "+52 (0) ";	
		phone.size=13;
		phone.maxLength=14;
		phone_sample.innerHTML = "(xxx) xxx-xxxx";
		
	}
 else if (selected_country == "Panama")
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_panama_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_panama_ctrl.options[i].text,hidden_panama_ctrl.options[i].value);		 
		}
		
		zip.disabled=true;
		zip.maxLength=5;
		
		country_code.innerHTML = "+507 (0) ";	
		phone.size=13;
		phone.maxLength=10;
		phone_sample.innerHTML = "xxxx-xxxx";
		
	}
else if (selected_country == "Belgium") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+32 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xxx xxx xxx";
	}
else if (selected_country == "Brazil") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_brazil_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_brazil_ctrl.options[i].text,hidden_brazil_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "+55 (0) ";	
		phone.size=10;
		phone.maxLength=12;
		phone_sample.innerHTML = "xx xxxx xxxx";
		
	}
else if (selected_country == "Cambodia") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+855 (0) ";	
		phone.size=12;
		phone.maxLength=10;
		phone_sample.innerHTML = "xx xxx xxx";
	}
else if (selected_country == "Czech Republic") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+420 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xxx xxx xxx";
	}
else if (selected_country == "Denmark") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+45 (0) ";	
		phone.size=12;
		phone.maxLength=10;
		phone_sample.innerHTML = "xxxx xxxx";
	}
 else if (selected_country == "Dominican Rep") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_dominican_republic_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_dominican_republic_ctrl.options[i].text,hidden_dominican_republic_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
				
		country_code.innerHTML = "";
		phone.size=20;
		phone.maxLength=14;
		phone_sample.innerHTML = "(xxx) xxx-xxxx";
		
	}
	
else if (selected_country == "Colombia") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Department<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_colombia_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_colombia_ctrl.options[i].text,hidden_colombia_ctrl.options[i].value);		 
		}
		
		zip.disabled=true;
		
		country_code.innerHTML = "+57 (0) ";	
		phone.size=13;
		phone.maxLength=14;
		phone_sample.innerHTML = "";
		
	}
	
else if (selected_country == "Costa Rica") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_costarica_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_costarica_ctrl.options[i].text,hidden_costarica_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=8;
		
		country_code.innerHTML = "+506 (0) ";	
		phone.size=9;
		phone.maxLength=10;
		phone_sample.innerHTML = "xxxx xxxx";
		
	}
else if (selected_country == "Egypt") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+20 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xx xxx xxxx";
	}
else if (selected_country == "UKEngland") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=8;
		
		country_code.innerHTML = "+44 (0) ";	
		phone.size=13;
		phone.maxLength=13;
		phone_sample.innerHTML = "xxxx xxxxxx";
	}
else if (selected_country == "Guatemala") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "+502 (0) ";	
		phone.size=10;
		phone.maxLength=9;
		phone_sample.innerHTML = "xxxx xxxx";
	}
else if (selected_country == "Hong Kong") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=true;
		zip.maxLength=4;
		
		country_code.innerHTML = "+852 (0) ";	
		phone.size=10;
		phone.maxLength=9;
		phone_sample.innerHTML = "xxxx xxxx";
	}
	else if (selected_country == "Iceland") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=3;
		
		country_code.innerHTML = "+354 (0) ";	
		phone.size=12;
		phone.maxLength=8;
		phone_sample.innerHTML = "xxx xxxx";
	}
else if (selected_country == "Indonesia") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_indonesia_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_indonesia_ctrl.options[i].text,hidden_indonesia_ctrl.options[i].value);		 
		}
		
			zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+62 (0) ";	
		phone.size=13;
		phone.maxLength=14;
		phone_sample.innerHTML = "";
	}
else if (selected_country == "Ireland") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=2;
		
		country_code.innerHTML = "+353 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xx xxx xxxx";
	}
else if (selected_country == "Italy") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_italy_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_italy_ctrl.options[i].text,hidden_italy_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "+39 (0) ";	
		phone.size=9;
		phone.maxLength=11;
		phone_sample.innerHTML = "xxxx xxxxx";
		
	}
else if (selected_country == "Japan") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Prefecture<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_japan_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_japan_ctrl.options[i].text,hidden_japan_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=8;
		
		country_code.innerHTML = "+81 (0) ";	
		phone.size=13;
		phone.maxLength=14;
		phone_sample.innerHTML = "x xxxx xxxxxx";
		
	}
else if (selected_country == "Malaysia") 
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_malaysia_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_malaysia_ctrl.options[i].text,hidden_malaysia_ctrl.options[i].value);		 
		}
		
			zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "+60 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "";
	}
else if (selected_country == "Netherlands")
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+31 (0) ";	
		phone.size=13;
		phone.maxLength=11;
		phone_sample.innerHTML = "x xxxx xxxx";
	}
else if (selected_country == "New Zealand")
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+64 (0) ";	
		phone.size=13;
		phone.maxLength=11;
		phone_sample.innerHTML = "x xxx xxxx";
	}
else if (selected_country == "Norway") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+47 (0) ";	
		phone.size=12;
		phone.maxLength=10;
		phone_sample.innerHTML = "xxxx xxxx";
	}
else if (selected_country == "Philippines")
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+63 (0) ";	
		phone.size=13;
		phone.maxLength=12;
		phone_sample.innerHTML = "xxx xxx xxxx";
	}
else if (selected_country == "Portugal")
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+351 (0) ";	
		phone.size=13;
		phone.maxLength=11;
		phone_sample.innerHTML = "x xxxx xxxx";
	}
else if (selected_country == "Saudi Arabia") 
	{
		vis_state_ctrl.disabled=true;
		state_label.innerHTML = "Manatiq/Province<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_other_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=5;
		
		country_code.innerHTML = "+966 ";	
		phone.size=13;
		phone.maxLength=10;
		phone_sample.innerHTML = "x xxx xxxx";
	}
else if (selected_country == "Venezuela") // dont forget to remove the add in clubadd.pl
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "State<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_venezuela_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_venezuela_ctrl.options[i].text,hidden_venezuela_ctrl.options[i].value);		 
		}
		
			zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+58 (0) ";	
		phone.size=13;
		phone.maxLength=14;
		phone_sample.innerHTML = "";
	}
	
else if (selected_country == "UKScotland") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=8;
		
		country_code.innerHTML = "+44 (0) ";	
		phone.size=13;
		phone.maxLength=13;
		phone_sample.innerHTML = "xxxx xxxxxx";
	}
else if (selected_country == "Singapore") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+65 (0) ";	
		phone.size=10;
		phone.maxLength=9;
		phone_sample.innerHTML = "xxxx xxxx";
	}
else if (selected_country == "St. Kitts") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+869 (0) ";	
		phone.size=12;
		phone.maxLength=9;
		phone_sample.innerHTML = "xxx xxxx";
	}
else if (selected_country == "Sudan") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+249 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xx xxx xxxx";
	}
else if (selected_country == "Sweden") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+46 (0) ";	
		phone.size=13;
		phone.maxLength=12;
		phone_sample.innerHTML = "xxx xx xx xx";
	}
	
else if (selected_country == "Switzerland") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=4;
		
		country_code.innerHTML = "+41 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xx xxx xxxx";
	}
else if (selected_country == "South Korea") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=7;
		
		country_code.innerHTML = "+82 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xx xxx xxxx";
	}
else if (selected_country == "Spain") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+34 (0) ";	
		phone.size=13;
		phone.maxLength=11;
		phone_sample.innerHTML = "xxx xxx xxx";
	}
else if (selected_country == "Taiwan") // dont forget to remove the add in clubadd.pl
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+886 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "xx xxxx xxx";
	}
else if (selected_country == "Thailand") // 
	{

		state_label.innerHTML = "State/Province:";				
		vis_state_ctrl.disabled=true;
		
		mylen = hidden_other_ctrl.length;
		
			for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		zip.disabled=false;
		zip.maxLength=6;
		
		country_code.innerHTML = "+66 (0) ";	
		phone.size=11;
		phone.maxLength=12;
		phone_sample.innerHTML = "x xxxx xxxx";
	}
else if (selected_country == "UAE") 
	{
		vis_state_ctrl.disabled=false;
		state_label.innerHTML = "Emirate<font color=#fe6d00><strong>*</strong></font>:";	
		mylen = hidden_uae_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_uae_ctrl.options[i].text,hidden_uae_ctrl.options[i].value);		 
		}
		
		zip.disabled=true;
		zip.maxLength=5;
		
		city.disabled=true;
		
		country_code.innerHTML = "+971 (0) ";	
		phone.size=12;
		phone.maxLength=11;
		phone_sample.innerHTML = "x xxx xxxx";
	}
else if (selected_country == "Argentina" || selected_country == "Aruba" || selected_country == "Antigua" || selected_country == "Bahamas" || selected_country == "Barbados" || selected_country == "Bermuda" || selected_country == "Finland" || selected_country == "France" || selected_country == "Germany" || selected_country == "Jamaica" || selected_country == "India" || selected_country == "South Africa" || selected_country == "St. Lucia" || selected_country == "Uruguay" ) 
	{
	state_label.innerHTML = "State/Province:";	
	vis_state_ctrl.disabled=true;
	
		mylen = hidden_other_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
	
	zip.disabled=false;
	zip.maxLength=8;
		
	country_code.innerHTML = "";
	phone.size=20;
	phone.maxLength=18;
	phone_sample.innerHTML = "";
	

	}

 else 
	{
		state_label.innerHTML = "State/Province:";	
					
		mylen = hidden_other_ctrl.length;

		for (i=0;i<mylen;i++)
		{
			vis_state_ctrl.options[i] = new Option(hidden_other_ctrl.options[i].text,hidden_other_ctrl.options[i].value);		 
		}
		
		vis_state_ctrl.disabled=true;
	
	

	}
	
	delete_extra_options(vis_state_ctrl, mylen);
}

function delete_extra_options (selobj, size)
{
	while (selobj.options.length > size)
		selobj.options[selobj.options.length - 1] = null;
}

function popup(pageName,pageWidth,pageHeight) {

window.open(pageName,"remote","width=" + pageWidth + " ,height=" + pageHeight + ",menubar=no,scrollbars=1");

}

function contractcontent(omit){
	var inc=0
	while (ccollect[inc]){
		if (ccollect[inc].id!=omit)
			ccollect[inc].style.display="none"
		inc++
	}
}

function expandcontent(cid){
if (typeof ccollect!="undefined")
	document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
}

