/*These global variables and functions are needed for each unique instance of REQ2. To run your own version you must first get a 
Google Maps key http://code.google.com/apis/maps/signup.html and put it into the head of the html:
<script src= "YOUR GOOGLE MAPS KEY HERE" type="text/javascript"></script>
This key will only work on the domain that you register it to and on your local machine.


Author: Jon Connolly
Pacific Northwest Seismic Network, University of Washington
joncon@u.washington.edu
*/

//define map center and zoom level here by entering map lat and lon center and zoom level.
//the greater the zoom level the larger the scale
var mapParam = {
	lat: 34,
 	lon: -116,
	zoom: 6
};

//define event file path here. This is the file that comes from merge.xml
var eventXml = "xml/req2.xml";

//define authorative network code here. This will cause all network events to plot as 
// circles and all non- network events to plot as squares
var authorNW = "CI";

//webicorder types. This is an array of webicorder type names. These names must match the 
//names of the checkbox id in the html and the names of the webicorder xml files. In other words
//the codes assumes both the individual xml file and the coresponding checkbox have the same name.
//if checkbox has id ="something" then the xml file needs to be name "something.xml"
//edit out or add check boxes in html as needed. For the PNSN, these names match the naming scheme of the 
//html address where they live.

// var webiNames = ['pnsn', 'bb', 'volc', 'smo_n', 'smo_sea', 'smo_s'];
// var webiNames = ['scsn', 'sp', 'bb', 'hs', 'lp'];
var webiNames = ['scsn'];

//get links for event pages--including imports. Edit this file as needed. You must include all networks that are in your xml
//file--including the authoritative network. params: net = networkcode, id = event id as provided by QDDS
function getLink(net, id){
	if(net.toUpperCase() =="CI"){
	 	return "<a href = 'http://www.data.scec.org/recenteqs/Quakes/ci" + id + ".html'>"
	}
	if(net.toUpperCase() =="US"){
	 return "<a href = 'http://earthquake.usgs.gov/eqcenter/recenteqsus/Quakes/nc" + id +".html'>"
	}
	if(net.toUpperCase() == "NN"){
		return "<a href =' http://www.data.scec.org/recenteqs/Quakes/nn" + id + ".html'>";
	}
	if(net.toUpperCase()=="NC"){
		return "<a href ='http://www.data.scec.org/recenteqs/Quakes/nc" + id + ".html'>"
	}
}

//get links for the webicorder. Edit as needed. See webicorder xml schema for param names.
function getWebiLink(typ, nam, chan, net, time){
	var path = "http://www.data.scec.org/stations/views/showsta.php?sta=" + nam + "&display=station&activeonly=1&todo=query"
//	var img = "<img src =" + path + ".gif alt = 'Webicorder not available'/>";
	return "<a href=" + path  + ">View station information</a> <br/> ";
}
