//##########################################################
//#                     FREDERIC MARTIN                    #
//#                      MAPORAMA-2002                     #
//#                                                        #
//# Procedure HideOrNotState (Object, String)              #
//# Description : Modifie l'affichage suivant le pays      #
//#                                                        #
//# Procedure ChangeTypeDisplay (Object, String, String)   #
//# Description : Modifie le type d'affichage suivant le   #
//#                       pays                             #
//#                                                        #
//# Fonction SearchAddressProcess (Object, String, String) #
//# Description : Appel les 2 procedures                   #
//#                                                        #
//##########################################################

function SearchAddressProcess_HideOrNotState(form, country) {

	if ((country)=='US' || (country)=='CA' || (country)=='AU') {

		form.State.style.visibility = 'visible';
		form.State.style.display    = 'block';
		form.State.style.width	    = '46px';

		document.all.TextState.style.visibility = 'visible';
		document.all.TextState.style.display    = 'block';
	}
	else {
		
		if (form.State.style.visibility == 'visible') {
			form.State.style.visibility = 'hidden';
			form.State.style.display    = 'none';
		}

		if (document.all.TextState.style.visibility == 'visible') {
			document.all.TextState.style.visibility = 'hidden';
			document.all.TextState.style.display	 = 'none';
		}
	}
}

function SearchAddressProcess_ChangeTypeDisplay(form, country, text) {

	if (((country)== 'DE') || ((country)== 'AR') || ((country)== 'AU') || ((country)== 'AT') || ((country)== 'BE') || ((country)== 'BR') || ((country)== 'CA') || ((country)== 'DK') || ((country)== 'ES') || ((country)== 'FI') || ((country)== 'FR') || ((country)== 'GR') || ((country)== 'GP') || ((country)== 'IE') || ((country)== 'IT') || ((country)== 'KW') || ((country)== 'VA') || ((country)== 'LI') || ((country)== 'LU') || ((country)== 'MQ') || ((country)== 'MC') || ((country)== 'NO') || ((country)== 'NL') || ((country)== 'PT') || ((country)== 'CZ') || ((country)== 'UK') || ((country)== 'SM') || ((country)== 'SE') || ((country)== 'CH') || ((country)== 'US')) {

		if (form.quality.options.length <= 1) {
		  form.quality.options[1]=new Option(text,"2");
		}
	}
	else {

		if (form.quality.options.length > 1) {
			form.quality.options[(form.quality.options.length - 1)] = null;
		}
	}
}

function SearchAddressProcess (form, country, text) {

	SearchAddressProcess_HideOrNotState (form, country);
	//SearchAddressProcess_ChangeTypeDisplay (form, country, text);
	return true;
}

