// This file is for GIS Planning integration of ArcIMS at the city of Hayward.

//var servletServer_AppName = "http://69.90.147.173:8080/iSV/"; // Change ip and port. Put '/' at the end.
// var servletServer_AppName = "http://gis.hayward-ca.gov:8080/iSV/"; // Change ip and port. Put '/' at the end.
// var servletServer_AppName = "http://xsvr-gis:8080/iSV/"; // Change ip and port. Put '/' at the end.

var servletServer_AppName = "http://xsvr-gis:8080/iSV/"; // Change ip and port. Put '/' at the end.
var cityName = "hayward08"; // change if the value is not your city name.	
var refreshArcIMS = true;


// open iStreetViewer
function openIsv() {
		refreshArcIMS = false;
		var str1 = servletServer_AppName + "openApplet" + "?cityName=" + cityName;
   		theURL = str1 + "&nadX=" + mapX + "&nadY=" + mapY + "&isObjectViewing=true&mapLevel=3";		
   		var oWin = window.open(theURL,"", "location=yes,scrollbars=yes,resizable=yes,width=900,height=600");   

		if (oWin==null || typeof(oWin)=="undefined") {
			unblock();
		} else{
			refreshArcIMS = true;
		}
}

// open panorama applet
function openPanorama() {
	refreshArcIMS = false;	
   var objectHT = "a"; // default
   var size = 60;
   
   var str1 = servletServer_AppName + "openPano" + "?cityName=" + cityName;
   theURL = str1 + "&nadX=" + mapX + "&nadY=" + mapY + "&objectHeightType=" + objectHT + "&size=" + size;
   var oWin = window.open(theURL,"", "location=yes,scrollbars=yes,resizable=yes,width=640,height=480");   		   		
	if (oWin==null || typeof(oWin)=="undefined") {
		unblock();
	} else{
		refreshArcIMS = true;
	}
}

// open panorama applet
function openObjectViewerHeml() {
	refreshArcIMS = false;		
   var objectHT = "a"; // default
   var size = 60;
   
   var str1 = servletServer_AppName + "openObject" + "?cityName=" + cityName;
   theURL = str1 + "&nadX=" + mapX + "&nadY=" + mapY + "&objectHeightType=" + objectHT + "&size=" + size;
   var oWin = window.open(theURL,"", "location=yes,scrollbars=yes,resizable=yes,width=1030,height=600");   		   		
   		
	if (oWin==null || typeof(oWin)=="undefined") {
		unblock();
	} else{
		refreshArcIMS = true;
	}

}

// open panorama applet
function openObjectViewerApplet() {
	refreshArcIMS = false;		
   var objectHT = "a"; // default
   var size = 60;
   
   var str1 = servletServer_AppName + "openObjectViewer" + "?cityName=" + cityName;
   theURL = str1 + "&nadX=" + mapX + "&nadY=" + mapY + "&objectHeightType=" + objectHT + "&size=" + size;
   var oWin = window.open(theURL,"", "location=yes,scrollbars=yes,resizable=yes,width=900,height=600");   		   		
	if (oWin==null || typeof(oWin)=="undefined") {
		unblock();
	} else{
		refreshArcIMS = true;
	}
}

function unblock() {
	location.href="arcims.htm"  
}

	
