Well, first off, you'd be best off doing some reading on working with JS and the DOM. This site has been very useful. Specific to your problem would be parts 4 - 6.
// This won't work. You're not accessing a FlashVars property of an element. In the DOM, attributes are treated like any other node.
document.getElementById("flashmap").FlashVars = 'region=europe';
You'd be better off doing something like this:
// First off, we need to give an ID to your <param> that contains your flashvars attribute.
<param name="FlashVars" value="" id="flash" />
// Now in our JS, we can access this node directly, rather than trying to get it through its parent.
var myElement = document.getElementById("flash");
myElement.setAttribute("value", "*YOUR CUSTOM FLASHVARS GO HERE*");
// Above, we access the value attribute of our referenced <param> element