// create a parameters array and pass it to the pz2's constructor
// then register the form submit event with the pz2.search function
// autoInit is set to true on default
// create a parameters array and pass it to the pz2's constructor
// then register the form submit event with the pz2.search function
// autoInit is set to true on default
-var usesessions = true;
-var pazpar2path = '/pazpar2/search.pz2';
+
+var pazpar2URL = "/pazpar2/search.pz2";
+var serviceProxyURL = "/service-proxy/";
+var authURLServiceProxy = "/service-proxy-auth";
+var pazpar2path = useServiceProxy ? serviceProxyURL : pazpar2URL;
+
+var usesessions;
+
var showResponseType = '';
if (document.location.hash == '#useproxy') {
usesessions = false;
pazpar2path = '/service-proxy/';
showResponseType = 'json';
}
var showResponseType = '';
if (document.location.hash == '#useproxy') {
usesessions = false;
pazpar2path = '/service-proxy/';
showResponseType = 'json';
}
var my_paz = new pz2( { "onshow": my_onshow,
"showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way
var my_paz = new pz2( { "onshow": my_onshow,
"showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way