+
+function selectSearchEngineURL(ss)
+{
+ if (ss.selectedIndex == 0) {
+ document.searchengineURL.elements[0].value = "";
+ } else {
+ document.searchengineURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58085/";
+ }
+}
+
+function selectDrawGraphURL(ss)
+{
+ if (ss.selectedIndex == 0) {
+ document.draw_graphURL.elements[0].value = "";
+ } else {
+ document.draw_graphURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58083/";
+ }
+}
+
+function selectURISetQueueURL(ss)
+{
+ if (ss.selectedIndex == 0) {
+ document.uri_set_queueURL.elements[0].value = "";
+ } else {
+ document.uri_set_queueURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58082/";
+ }
+}
+
+function selectRdflyURL(ss)
+{
+ if (ss.selectedIndex == 0) {
+ document.rdflyURL.elements[0].value = "";
+ } else {
+ document.rdflyURL.elements[0].value = "http://" + ss.options[ss.selectedIndex].value + ":58086/";
+ }
+}
+
+function selectInterfaceURL(ss)
+{
+ if (ss.selectedIndex == 0) {
+ document.interfaceURL.elements[0].value = "";
+ } else {
+ document.interfaceURL.elements[0].value = "http://helm.cs.unibo.it/helm";
+ }
+}
+
+function selectProfile(ss, interfaceURL)
+{
+ location = getUwoboURL() +
+ 'apply?keys=SPK¶m.processorURL=' + escape(getUwoboURL()) +
+ '¶m.profile=' + escape(ss.options[ss.selectedIndex].value) +
+ '&xmluri=' + escape(interfaceURL + 'html/configuration.html');
+}
+
+function saveProfile(origProfileId)
+{
+ var profileId = getProfileId();
+ var exists = false;
+ var i;
+ var options = document.profileList.elements[0];
+ for (i = 0; i < options.length; i++)
+ if (profileId == options[i].value) exists = true;
+ if (exists) {
+ if (confirm('Update the profile \'' + profileId + '\'?'))
+ location = getUwoboURL() + 'setparams?id=' + profileId + getUpdateURL();
+ } else {
+ if (confirm('Create a new profile \'' + profileId + '\' with the current settings?'))
+ location = getUwoboURL() + 'createprofile?id=' + profileId + '&orig=' + origProfileId + getUpdateURL();
+ }
+}
+