var GlobalHash;
var GlobalVertodos;
function GetMapImage(Command, Hash, Vertodos)
{
	var GetStr = "";
	var ContentDiv;
	MapImgLayerObj = document.getElementById('MapImgLayer');
	WidthDivObj = document.getElementById('WidthDiv');
	HeightDivObj = document.getElementById('HeightDiv');
	MapImgLayerObj.style.position = 'absolute';
	
	Width = WidthDivObj.offsetWidth-30;
	Height = HeightDivObj.offsetHeight;
	MapImgLayerObj.style.position = 'relative';
//	if (!Command) Command = "ZoomApproach";
	if(Vertodos || GlobalVertodos)
	{
		FirstQuery = "1";
		GlobalVertodos = 1;
	}
	else
		FirstQuery = 0;
	if (!Command) Command = "";
		Url = "/informacion/index.php?ShowOnlyImage=1&Id="+Id+"&Command="+Command+"&Width="+Width+"&Height="+Height+"&FirstQuery="+FirstQuery+"&PrintPage=1&Action=Z&MapShow=1";
//		Url = "/informacion/index.php?ShowOnlyImage=1&Id="+Id+"&Command="+Command+"&Width="+Width+"&Height="+Height;
	
	if(GlobalHash && !Hash)
	{
		Hash = GlobalHash; 
	}
	
	if (Hash)
	{
		Url = Url+"&Hash="+Hash;
		GlobalHash = Hash;
	}
	
	//alert(Url);
	
	RefreshAjaxDiv('MapImgLayer', Url);
	return false;
}

var ProcessCallId;

function OnResizeCallMapImage()
{
	if (ProcessCallId)
		clearTimeout(ProcessCallId);
	ProcessCallId = setTimeout('GetMapImage()', 1000);
}

function GetImage(Id)
{
	Image1 = document.getElementById(Id+"Fig1");
	URL1 = "./showimage.php?Id="+Id+"&Hash="+ArrayHash[Id]+"&Fig=_fig1_thb";
	Image1.src=URL1;

	Image2 = document.getElementById(Id+"Fig2");
	URL2 = "./showimage.php?Id="+Id+"&Hash="+ArrayHash[Id]+"&Fig=_fig2_thb";
	Image2.src=URL2;

	Image3 = document.getElementById(Id+"Fig3");
	URL3 = "./showimage.php?Id="+Id+"&Hash="+ArrayHash[Id]+"&Fig=_fig3_thb";
	Image3.src=URL3;
}

