menu_status = new Array(); 

function showHide(theid,field){
    if (document.getElementById(theid)) {
    var switch_id = document.getElementById(theid);
		
		if(field.value == 'United States' || field.value == 'Canada') {
        	if(menu_status[theid] != 'show') {
           		//switch_id.className = 'show';
           		switch_id.style.display = 'block';
           		menu_status[theid] = 'show';
       		}
       		 
    	} else {
    		//switch_id.className = 'hide';
    		switch_id.style.display = 'none';
            menu_status[theid] = 'hide';
    	}
   
    }
}

function zipShowHide(theid,field){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
		if(field.value=="-1") {
    		if(menu_status[theid] != 'show') {
           		//switch_id.className = 'show';
           		switch_id.style.display = 'block';
           		menu_status[theid] = 'show';
       		}
    	} else {
    		//switch_id.className = 'hide';
    		switch_id.style.display = 'none';
            menu_status[theid] = 'hide';	
    	}
    }
}


function zipShowHideForCountry(theid,field){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);
		
    		if(menu_status[theid] != 'show') {
           		//switch_id.className = 'show';
           		switch_id.style.display = 'block';
           		menu_status[theid] = 'show';
       		
    	} 
    }
}



function getCities(field) 
{
	DWRUtil.removeAllOptions('city');
	ajaxGeonamesService.findByCountry(field.value , loadinfo);

}

 function loadinfo(data)
 {
  DWRUtil.removeAllOptions('city');
  DWRUtil.addOptions('city',data,'value','label'); 

 }