Need a little bit of magic!

It is much easier to have the script work for all the countries once you have it in a JavaScript file rather than jumbled with the HTML. You could even attach it to the body of the page and then test within the script which country to process.