function popArcExplorerWin(server, service) {
	// first open the window
	var ArcExplorerWin;
	if (is_win) {
		ArcExplorerWin = window.open('',"ArcExplorerWeb","toolbar=no,width=800,height=564,left=5,top=5");
	} else if (!is_win && is_nav){
		ArcExplorerWin = window.open("","ArcExplorerWeb","toolbar=no,width=800,height=564,screenX=5,screenY=5");
	} else if (!is_win && is_ie){
		ArcExplorerWin = window.open('',"ArcExplorerWeb","toolbar=no,width=784,height=548,left=5,top=5");
	} else {
		ArcExplorerWin = window.open('',"ArcExplorerWeb","toolbar=no,width=800,height=564");
	}

	// was it open already?
	if (!ArcExplorerWin.closed && ArcExplorerWin.Map) {
		// yes, so add this new service
		ArcExplorerWin.focus();
      	ArcExplorerWin.Map.addServiceRemote(server, service);
	} else {
		// no, so open ArcExplorerWin properly and add this service
		var URL = "http://www.geographynetwork.com/arcexplorer/arcexplorer.html?server=" + server + "&service=" + service;
		if (is_win) {
			ArcExplorerWin = window.open(URL,"ArcExplorerWeb","toolbar=no,menubar=yes,width=800,height=564,left=5,top=5");
		} else if (!is_win && is_nav){
			ArcExplorerWin = window.open("","ArcExplorerWeb","toolbar=no,menubar=yes,width=800,height=564,screenX=5,screenY=5");
			ArcExplorerWin.location = URL;
		} else if (!is_win && is_ie){
			URL += "&addremote=true";
			ArcExplorerWin = window.open(URL,"ArcExplorerWeb","toolbar=no,menubar=yes,width=784,height=548,left=5,top=5");
		} else {
			ArcExplorerWin = window.open(URL,"ArcExplorerWeb","toolbar=no,menubar=yes,width=800,height=564");
		}
	}
}

//Nipa 7/28/04 added this so we can trap who clicked on website button
function popDoLinktoContentWin(linktoContent) {
	// first open the window
	var ArcExplorerWin;
	if (is_win) {
		ArcExplorerWin = window.open('',"Website","toolbar=yes,menubar=yes,width=800,height=564,left=5,top=5,scrollbars=yes,resizable=yes");
	} else if (!is_win && is_nav){
		ArcExplorerWin = window.open("","Website","toolbar=yes,menubar=yes,width=800,height=564,screenX=5,screenY=5,scrollbars=yes,resizable=yes");
	} else if (!is_win && is_ie){
		ArcExplorerWin = window.open('',"Website","toolbar=yes,menubar=yes,width=784,height=548,left=5,top=5,scrollbars=yes,resizable=yes");
	} else {
		ArcExplorerWin = window.open('',"Website","toolbar=yes,menubar=yes,width=800,height=564,scrollbars=yes,resizable=yes");
	}

	// was it open already?
	if (!ArcExplorerWin.closed && ArcExplorerWin.Map) {
		// yes, so add this new service
		//alert
		//ArcExplorerWin.focus();
      	//ArcExplorerWin.Map.addServiceRemote(server, service);
	} else {
		// no, so open ArcExplorerWin properly and add this service
		var URL = "WentLog.jsp?theLinktoContent="+linktoContent;
		if (is_win) {
			ArcExplorerWin = window.open(URL,"Website","toolbar=yes,width=800,height=564,left=5,top=5,scrollbars=yes,resizable=yes");
		} else if (!is_win && is_nav){
			ArcExplorerWin = window.open("","Website","toolbar=yes,width=800,height=564,screenX=5,screenY=5,scrollbars=yes,resizable=yes");
			ArcExplorerWin.location = URL;
		} else if (!is_win && is_ie){
			URL += "&addremote=true";
			ArcExplorerWin = window.open(URL,"Website","toolbar=yes,width=784,height=548,left=5,top=5,scrollbars=yes,resizable=yes");
		} else {
			ArcExplorerWin = window.open(URL,"Website","toolbar=yes,width=800,height=564,scrollbars=yes,resizable=yes");
		}
	}
}

function addToArcExplorerWeb(server, service) {
	popArcExplorerWin(server, service);
}

//Nipa 7/28/04 added this so we can trap who clicked on website button
function doLinktoContent(linktoContent) {
	popDoLinktoContentWin(linktoContent)
}
