
function MM_swapImgRestore() { //v3.0
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
		if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var winW=300;
var winH=100;
function showInfo(tx) { 
	//alert(tx.title);
	var splitText = tx.title+"";
	var theArray = splitText.split(":");
	//alert(theArray.length);
	var LeftPosition=(screen.width)?(screen.width-winW)/2:100;
	var TopPosition=(screen.height)?(screen.height-winH)/2:100;
	
	var OpenWindow=window.open("", "infoWindow","height=100,width=300,top="+TopPosition+",left="+LeftPosition+",location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no");
	//alert(OpenWindow.document.bgColor);
	if (OpenWindow.document.bgColor=="#9b885e") {
		OpenWindow.close();
		OpenWindow=window.open("", "infoWindow","height=100,width=300,top="+TopPosition+",left="+LeftPosition+",location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no,dependent=no");
	}
	OpenWindow.document.write("<html><head><title>Quick Info</title>");
	OpenWindow.document.write("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"style.css\"></head></html>");
	OpenWindow.document.write("<body bgcolor='#9B885E'>");
	if (theArray.length==2) {
		OpenWindow.document.write("<b>"+theArray[0]+":</b> ");
		OpenWindow.document.write(theArray[1]);
	} else {
		OpenWindow.document.write(tx.title);
	}
	OpenWindow.document.write("</body>");
	OpenWindow.document.write("</html>");
	OpenWindow.focus();
	//var MapWin = open("http://www.marylandgis.net/dataviewer","shaddMap","width=800,height=600,scrollbars=no,resizable=yes,status=yes,toolbar=no,location=no,directories=no,menubar=no");
}


function showWarnings(tx) { 
	//alert(tx.title);
	var ww=550;
	var wh=400;

	//alert(theArray.length);
	var LeftPosition=(screen.width)?(screen.width-ww)/2:100;
	var TopPosition=(screen.height)?(screen.height-wh)/2:100;
	
	var OpenWindow=window.open("", "warnWindow","height="+wh+",width="+ww+",top="+TopPosition+",left="+LeftPosition+",location=no,directories=no,menubar=no,toolbar=yes,status=no,scrollbars=yes,resizable=yes,dependent=no");
	//alert(OpenWindow.document.bgColor);
	if (OpenWindow.document.bgColor=="#9b885e") {
		OpenWindow.close();
		OpenWindow=window.open("", "warnWindow","height="+wh+",width="+ww+",top="+TopPosition+",left="+LeftPosition+",location=no,directories=no,menubar=no,toolbar=yes,status=no,scrollbars=yes,resizable=yes,dependent=no");
	}
	OpenWindow.document.write("<html><head><title>Metadata Parse Warnings and Upgrades</title>");
	OpenWindow.document.write("<link rel=\"STYLESHEET\" type=\"text/css\" href=\"style.css\"></head></html>");
	OpenWindow.document.write("<body bgcolor='#9B885E'><h3>FGDC Metadata Parser Warnings and Upgrades</h3>");
	OpenWindow.document.write(tx);
	OpenWindow.document.write("</body>");
	OpenWindow.document.write("</html>");
	OpenWindow.focus();
}

var popWindow=null;
function pop(mypage,myname,w,h,s){
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',location=no,directories=no,menubar=no,toolbar=no,status=no,scrollbars=' + s + ',resizable=no,dependent=no';
	popWindow=window.open('',myname,settings);
	popWindow.focus();popWindow.location=mypage;
}
