function getEmergency(agy, incid, d)  {
	//if(id != getCookie(agy))  {
		//setCookie(agy, agy);
		wid = 450;
		hg = 300;
		var newwindow;
		var x = (screen.availWidth - wid)/2;
		var y = (screen.availHeight - hg)/2;
		var title = "Emergency Alert";
		if (newwindow && !newwindow.closed)  {
			newwindow.focus(); 
			newwindow.document.clear();
		}  else  { 
			//Below is a local test location
			//newwindow=window.open('http://10.15.14.116/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow=window.open('https://www6.state.nj.us/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow=window.open('http://vega.oit.state.nj.us/DOC_Inmate/emergencyAlert.jsp?a='+ agy + '&b=' + incid + '&c=' + d,agy + incid,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			newwindow=window.open('https://www6.state.nj.us/DOC_Inmate/emergencyAlert.jsp?a='+ agy + '&b=' + incid + '&c=' + d,agy + incid,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow.moveTo(x,y);
			//newwindow.document.close();
		}
	//}			
}

/*function getEmergency(agy, incid)  {
	//if(id != getCookie(agy))  {
		//setCookie(agy, agy);
		wid = 450;
		hg = 300;
		var newwindow;
		var x = (screen.availWidth - wid)/2;
		var y = (screen.availHeight - hg)/2;
		var title = "Emergency Alert";
		if (newwindow && !newwindow.closed)  {
			newwindow.focus(); 
			newwindow.document.clear();
		}  else  { 
			//Below is a local test location
			//newwindow=window.open('http://10.15.14.116/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow=window.open('https://www6.state.nj.us/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			newwindow=window.open('http://vega.oit.state.nj.us/DOC_Inmate/emergencyAlert.jsp?a='+ agy + '&b=' + incid,agy + incid,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow.moveTo(x,y);
			//newwindow.document.close();
		}
	//}			
}
	
	//if(id != getCookie(id))  {
		//setCookie(id, id);
		
		/*wid = 440;
		hg = 400;
		var newwindow;
		var x = (screen.availWidth - wid)/2;
		var y = (screen.availHeight - hg)/2;
		var title = "Escape Alert";
		if (newwindow && !newwindow.closed)  {
			newwindow.focus(); 
			newwindow.document.clear();
		}  else  { 
			//newwindow=window.open('http://vega.oit.state.nj.us/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//Below is a local test location
			//newwindow=window.open('http://10.15.14.116/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow=window.open('https://www6.state.nj.us/DOC_Inmate/escapeAlert.jsp?z='+ id,id,'width=' + wid + ', height=' + hg + ',resizable=0, scrollbars=1');
			//newwindow.moveTo(x,y);
			//newwindow.document.close();
		}
}*/

