form_name = "postal_code_lookup" ;
form_element = "postalcode_1" ;

// Error messages:
alertPostalCodeRequired = "Please enter a postal code." ;	
alertInvalidPostalCode = "Please enter a valid postal code." ;
alertNoProvinceSelected = "Please select a province from the drop down list." ;

function province_selected ( objElement ) {
	//if (document.city_lookup.province=="select"){ // not select
	//		document.city_lookup.city[0].selected=true;
	//} 
	//if (objElement=="select"){ // not select
	//	(objElement[objElement.selectedIndex].value=0);
	//} 
	//if (objElement.value=="select"){
	//	document.city_lookup.city[0].selected=true;
	//}
	arrCities = eval(objElement[objElement.selectedIndex].value) ;
	document.city_lookup.city.options.length = 0;
	document.city_lookup.city.options.length = arrCities.length;
	for ( i = 0; i < arrCities.length ; i++ ) {
		document.city_lookup.city.options[i] =  new Option(arrCities[i]);
	}
	
	
}


function
verifyData( objForm )
{
var form = objForm ;
if ( objForm.name == "postal_code_lookup" ) {

	postalcode = form.postalcode_1.value + form.postalcode_2.value
	if ( true == isBlank ( form.postalcode_1.value ) || true == isBlank ( form.postalcode_2.value ) )
	{
		return ( notifyAndFail( "alertPostalCodeRequired", "postalcode_1" ) );
	}
	if ( false == isValidPostalCode ( postalcode ) )
	{
		return ( notifyAndFail( "alertInvalidPostalCode", "postalcode_1" ) );
	}
}
if ( objForm.name == "city_lookup" ) {
	if ( form.province.selectedIndex == 0 )
	{
		return ( notifyAndFail( "alertNoProvinceSelected", "postalcode_1" ) );
	}
}

return ( true );

}