var type="img";
		
	function tr(img_win)
	{
		the_timeout = setTimeout("img_win.focus();", 500);
	}
	function picked(passedin)
	{
		type = passedin;
	}
	
	function NowGoTo(id, aval, server, address)
	{
		if (aval == "snap")
		{
			var url= "http://nyctmc.org/opener1.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}
		else if (aval == "cdpd")
		{
			var url= "http://nyctmc.org/opener_cdpd.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}
		else if (aval == "earthcam")
		{
			var url= "http://nyctmc.org/opener_earthcam.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}
		else if (aval == "metrocommute")
		{
			var url= "http://nyctmc.org/opener_metrocommute.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=320,width=415');
			tr(img_win);
		}

		else if (aval == "tree")
		{
			var url= "http://nyctmc.org/view_stilltree.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=320,width=415');
			tr(img_win);
		}
		else if (aval == "250" || aval == "bth250" && type == "img")
		{
			var url= "http://nyctmc.org/Xopener250.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}
		else if (aval == "252" || aval == "bth252" && type == "img")
		{
			var url= "http://nyctmc.org/Xopener252.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=320,width=415');
			tr(img_win);
		}
		else if (aval == "bth250" && type == "vid")
		{
			var url= "http://nyctmc.org/Xopener250.asp?cam_id=" + id + "&list=yes&type=vid&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}
		else if (aval == "bth252" && type == "vid")
		{
			var url= "http://nyctmc.org/Xopener252.asp?cam_id=" + id + "&list=yes&type=vid&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}


		else if (type == "img" || aval == "still")
		{
			var url= "http://nyctmc.org/Xopener.asp?cam_id=" + id + "&list=yes&type=img&server=" + server + "&address=" + escape(address);
			//for debugging only - alert("Still: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}

		else if(type == "vid" && aval == "both" && server=="RS1")
		{
			var url= "http://nyctmc.org/Xopener2.asp?cam_id=" + id + "&list=yes&type=vid&server=" + server + "&address=" + escape(address);
			//for debuggin only - alert("Video: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}

	        else if(type == "vid" && aval == "both" && server=="RS2")
		{
			var url= "http://nyctmc.org/Xopener2.asp?cam_id=" + id + "&list=yes&type=vid&server=" + server + "&address=" + escape(address);
			//for debuggin only - alert("Video: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win); 
		}
	        else if(type == "vid" && aval == "both" && server=="RS3")
		{
			var url= "http://nyctmc.org/Xopener2.asp?cam_id=" + id + "&list=yes&type=vid&server=" + server + "&address=" + escape(address);
			//for debuggin only - alert("Video: " +url);
			img_win = window.open(url,'ttt','height=335,width=460');
			tr(img_win);
		}
	        else if(type == "vid" && aval == "both" && server=="RS9")
		{
			var url= "http://nyctmc.org/Xopener9.asp?cam_id=" + id + "&list=yes&type=vid&server=" + server + "&address=" + escape(address);
			//for debuggin only - alert("Video: " +url);
			img_win = window.open(url,'ttt','height=320,width=415');
			tr(img_win);
		}

	}
