var map = document.getElementById("Map");
map = x.Object.fromDOM(map);

var parentDiv = x.Object.fromTag("div");
var imgMap = x.Object.fromTag("img");

imgMap.src = "resources/images/general/mapVT.png";

parentDiv.style.backgroundColor = "black";
parentDiv.setAlpha(50);
parentDiv.style.height = "100%";
parentDiv.style.width = "100%";
parentDiv.style.position = "fixed";
parentDiv.style.top = "0px";
parentDiv.style.left = "0px";
parentDiv.style.zIndex = "100";



imgMap.setAlpha(100);
imgMap.style.position = "fixed";
imgMap.style.zIndex = "101";
imgMap.style.top = "50%";
imgMap.style.left = "50%";
imgMap.style.marginLeft = "-354px";
imgMap.style.marginTop = "-250px";

imgMap.setSize(220,160);

map.onmouseover = imgMap.onmouseover = function()
{
	x.Mouse.setCursor(x.Mouse.cursors.pointer);
}

map.onmouseout = imgMap.onmouseout = function()
{
	x.Mouse.setCursor(x.Mouse.cursors.Default);
}


map.onclick = function()
{
	document.body.appendChild(parentDiv);
	document.body.appendChild(imgMap);
	x.fx.Manager.removeEffectsByTarget(imgMap);
	x.fx.Manager.addEffect(new x.fx.Resize(imgMap, new x.geom.Point(709,500)));
}

imgMap.onclick = function()
{
	x.fx.Manager.removeEffectsByTarget(this);
	this.setSize(220,160);
	document.body.removeChild(parentDiv);
	document.body.removeChild(imgMap);
}
