2 function updateMode(i, s)
5 var mode_list = mode.split(",");
9 for (j = 0; j < mode_list.length; j++) {
11 else res += mode_list[j];
12 if (j < mode_list.length - 1) res += ",";
18 function updateOutput(output,format)
20 var theoryuri = top.theoryuri;
21 var cicuri = top.cicuri;
23 var topurl = top.topurl;
24 var processorURL = top.processorURL;
25 var getterURL = top.getterURL;
26 var mode_list = mode.split(",");
27 var new_mode = output.options[output.selectedIndex].value;
28 var dest = "?theoryuri=" + theoryuri + "&cicuri=" + cicuri + "&topurl=" + topurl + "&processorURL=" + processorURL + "&getterURL=" + getterURL + "&mode=";
30 if (new_mode != mode_list[0]) {
31 updateMode(0, new_mode);
32 if (new_mode == "raw") updateMode(2, format.options[format.selectedIndex].value);
33 else updateMode(1, format.options[format.selectedIndex].value);
34 location.search = dest + top.mode;
38 function updateFormat(format)
41 var mode_list = mode.split(",");
43 if (mode_list[0] == "raw") {
44 updateMode(1, format.options[format.selectedIndex].value);
46 updateMode(2, format.options[format.selectedIndex].value);
52 function updateNatural(checkbox)
54 if (checkbox.checked) updateMode(3, "yes");
55 else updateMode(3, "no");
59 function updateAnnotations(checkbox)
61 if (checkbox.checked) updateMode(4, "yes");
62 else updateMode(4, "no");
66 function refreshReload()
70 "&cicuri=" + top.cicuri +
71 "&theoryuri=" + top.theoryuri +
72 "&processorURL=" + top.processorURL +
73 "&getterURL=" + top.getterURL;
75 top.frames[0].document.links[0].search = search;
76 top.frames[0].document.links[1].search = search;
81 function refreshcicHeader(headerURL)
83 top.cicheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.cicuri;
87 function refreshtheoryHeader(headerURL)
89 top.theoryheader.location.search = "?keys=GP&xmluri=" + headerURL + "¶m.uri=" + top.theoryuri;
93 function makeURL(type,uri,cicflags,typesflags)
96 var processorURL = top.processorURL;
97 var getterURL = top.getterURL;
98 var mode_list = mode.split(",");
103 var output = mode_list[0];
105 if (output == "raw") format = mode_list[1];
106 else format = mode_list[2];
108 if (output == "raw") {
109 url = getterURL + "getciconly?uri=" + uri +
110 "&format=" + (format == "zcic" ? "gz" : "normal");
112 if (format == "html" && type == "cic") {
113 keys = "C1,HC2¶m.processorURL=" + escape(processorURL) +
114 "¶m.getterURL=" + escape(getterURL) +
115 "¶m.keys=" + escape("C1,HC2");
116 } else if (format == "html" && type == "theory") {
117 keys = "T1,T2,E¶m.processorURL=" + escape(processorURL) +
118 "¶m.getterURL=" + escape(getterURL) +
119 "¶m.keys=" + escape("C1,HC2");
120 } else if (format == "mml_cont" && type == "cic") {
122 } else if (format == "mml_cont" && type == "theory") {
123 keys = "T1,E¶m.keys=C1";
124 } else if (format == "mml_pres" && type == "cic") {
126 } else if (format == "mml_pres" && type == "theory") {
127 keys = "T1,T2,E¶m.keys=C1,C2";
130 var naturalLanguage = typesflags;
131 if (typesflags != "NO" || type == "theory") {
132 naturalLanguage = mode_list[3];
134 var annotations = cicflags;
135 if (cicflags != "NO" || type == "theory") {
136 annotations = mode_list[4];
138 url = processorURL + "apply?xmluri=" + escape(getterURL + "getciconly?uri=" + uri) + "&keys=" + keys + "¶m.CICURI=" + uri + "¶m.naturalLanguage=" + naturalLanguage + "¶m.annotations=" + annotations;