var messageObj;
var isclosing = false;

function Map_Open(){
	window.scrollTo(0,0);
	isclosing = false;
	if ( !document.getElementById("map_iframe") ){
		var oiframe = document.createElement("iframe");
		oiframe.id = "map_iframe";
		oiframe.name = "map_iframe";
		oiframe.width = "800";
		oiframe.height = "590";
		oiframe.frameBorder = "0";
		oiframe.border = "0";
		oiframe.scrolling = "no";
		oiframe.src = "interactivemap.asp";
		document.getElementById("galleryHolder").appendChild( oiframe );
		oiframe.className = "map-iframe";
		oiframe.style.position = "absolute";
		oiframe.style.visibility = "hidden";
		oiframe.style.top = "0px";
		oiframe.style.left = "0px";
		oiframe.style.zIndex = 100001;
	
	}	


	//messageObj.display();	
	//Map_Resize();
	document.getElementById("galleryHolder").style.display = "block";
	document.getElementById("galleryBack").style.display = "block";
	document.getElementById("map_iframe").style.visibility = "visible";
    document.documentElement.style.overflow = "hidden";
}

function Map_Resize(){
	//document.getElementById("map_iframe").style.left = document.getElementById("DHTMLSuite_modalBox_contentDiv").offsetLeft + 1 +"px";
	//document.getElementById("map_iframe").style.top = document.getElementById("DHTMLSuite_modalBox_contentDiv").offsetTop + 1  + "px";
}

function Map_OnClose(){
	isclosing = true;
	//messageObj.close();
	document.getElementById("map_iframe").style.visibility = "hidden";
	document.getElementById("galleryHolder").style.display = "none";
	document.getElementById("galleryBack").style.display = "none";
    document.documentElement.style.overflow = "";
}

//window.onresize = function(){ if(!isclosing && messageObj != null ){ messageObj.__resizeDivs();  Map_Resize() } }
window.onunload = function(){ if ( document.getElementById("map_iframe") ){ window["map_iframe"].GUnload(); } }