click_flag = 0;
function if_scuko_ie(){
	user_agent = navigator.userAgent.toLowerCase();
	if (user_agent.indexOf("msie") != -1){
		window.open("images/map_big.jpg", "", "width=698, height=1040, left=50, top= 400");
		click_flag = 0;
		return true;
		}
	return false;
	}
function close_map(){
	click_flag = 0;
	document.getElementById("main").style.opacity = 1;
	dd = document.getElementById("image_map");
	document.body.removeChild(d);
	dd.style.visibility = "hidden";
	}
function open_map(){
	if (click_flag!=0) {return false};
	click_flag = 1;
	if (if_scuko_ie()) {return false}
	steps = 3;//numarul de pasuri
	h = 1040;//inaltimea blocului
	w = 698;//latimea blocului
//	h = 469;//inaltimea blocului
//	w = 628;//latimea blocului
	pd = 1;//duratia pausei
	i = 0; j = 0;
	ww = 0;	
	document.getElementById("main").style.opacity = 0.5;
	document.body.style.opacity = 1;
	d = document.createElement("div");
	im = document.createElement("img");
	document.body.appendChild(d);
	d.appendChild(im);
	im.src = "images/map_big.jpg";
	d.setAttribute("id", "image_map");
	im.setAttribute("onclick", "close_map();");
	d.setAttribute("onclick", "close_map();");
	s = d.style;
	dd = document.getElementById("image_map");
	function resize_blok(){
		if (s.width != w+"px"){
			i++;
			ww = parseInt(i*(w/steps));
			s.width = ww + "px";
			s.marginLeft = -ww/2 + "px";
			}else if (s.height != h+"px"){
				j++;
				hh =  parseInt(j*(h/steps));
				s.height = hh + "px";
				s.marginTop = 200-hh/2 + "px";
				}
		if ((i>=steps)&&(j>=steps)){
			clearInterval(inter);
			i = 0; j = 0;
			}
		}
	inter = window.setInterval(resize_blok, pd);
	}