hi ...
no problem ... we are here to help you ... ;)
first let me give you an idea on how to achieve your goal: create a div at your page and give it an id so you may simply refer to it. make it hidden with the style property 'display: none;' and visible with 'display: block;' when you click your image-map / click a close-button that should be contained by the div. have a look at the example:
-
// state should be boolean (true or false)
-
function toggle_container(state) {
-
var img_container = document.getElementById('your_div_id');
-
-
img_container.style.display = state ? 'block' : 'none';
-
}
-
call that onclick of the image-map-parts with true and onclick of your button with false.
now the next part: your div should contain an img-tag with an id and empty src-attrib. now we must have a list that matches your image-map-parts with a corresponding image ... may be an id and an img-src:
-
var img_list = {
-
'part1': 'img_src1.jpg',
-
'part2': 'img_src2.jpg'
-
// and so on ...
-
};
-
-
// id is your image-map-part-id ;)
-
function set_img_src(id) {
-
var img = document.getElementById('your_img_tags_id');
-
-
img.src = img_list[id];
-
}
-
try something like that ... it should work. you may retrieve the mouse-coords in case you need that and set more style-properties of our container ... but first try to display the div the way i showed you :)
kind regards