actinput=0;
numeroazioniannullate=0;
}
+function ask_uwobo(url)
+ {
+ return (top.topurl+"/ask_uwobo?url="+escape("http://mowgli.cs.unibo.it:58080/apply?xmluri=" + escape(url) + "&keys=T1%2CT2%2CL%2CE¶m.processorURL=http%3A//mowgli.cs.unibo.it%3A58080/¶m.getterURL=http%3A//mowgli.cs.unibo.it%3A58081/¶m.proofcheckerURL=http%3A//mowgli.cs.unibo.it%3A58084/¶m.draw_graphURL=http%3A//mowgli.cs.unibo.it%3A58083/¶m.uri_set_queueURL=http%3A//mowgli.cs.unibo.it%3A58082/¶m.UNICODEvsSYMBOL=unicode¶m.keys=d_c%2CC1%2CHC2%2CL¶m.thkeys=T1%2CT2%2CL%2CE¶m.embedkeys=d_c%2CTC1%2CHC2%2CL¶m.doctype-public=-//W3C//DTD%20XHTML%201.0%20Transitional//EN¶m.encoding=iso-8859-1¶m.thencoding=iso-8859-1¶m.media-type=text/html¶m.thmedia-type=text/html¶m.interfaceURL=http%3A//helm.cs.unibo.it/helm/html/cic/index.html¶m.thinterfaceURL=http%3A//helm.cs.unibo.it/helm/html/theory/index.html¶m.CICURI=dummy:query_result¶m.naturalLanguage=yes¶m.annotations=no¶m.topurl=http://helm.cs.unibo.it/helm&prop.method=html"));
+ }
function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito รจ legata ad un evento onFocus o onMouseOver.
{
hw.document.close();
//var topurl="";
var action="/getpage?url=";
//var action="";
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq1.html
+function templateambigpdq1_armageddon()
+ {
+ top.initialize();
+ top.window.open(top.topurl+top.action+"start.html","qw");
+ top.window.open(top.topurl+top.action+"blank.html","cw");
+ top.window.open(top.topurl+top.action+"blank.html","hw");
+ top.window.open(top.topurl+top.action+"blank.html","gw");
+ top.window.open(top.topurl+top.action+"blank.html","sw");
+ }
+
+function templateambigpdq1_resetta()
+ {
+ if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+ {templateambigpdq1_armageddon();}
+ }
+
+function templateambigpdq1_listauri(document,elenco)
+ {
+ for (i=0;i<elenco.length;i++)
+ {
+ document.write("<input type=checkbox name=uricheck value="+elenco[i]+"> "+elenco[i]+"<br>");
+ }
+ }
+
+function templateambigpdq1_invia(document,top,elenco,ident)
+ {
+ vecchiavlds=top.vlds.length;
+ stringa=top.topurl+"/searchPattern?term="+top.terminecic;
+ stringa=stringa+"&aliases="+top.listaliases;
+ stringa=stringa+"&choices=";
+ var choices = "";
+ top.vlds[top.vlds.length]=ident;
+ for (j=0;j<elenco.length;j++)
+ {
+ if (document.disamb.uricheck[j].checked)
+ {
+ top.vlds[top.vlds.length]=document.disamb.uricheck[j].value;
+ }
+ }
+ top.vlds[top.vlds.length]=";";
+ for (j=0;j<top.vlds.length;j++)
+ {
+ choices=choices+(top.vlds[j]==";"?";":escape(top.vlds[j]))+" ";
+ }
+ choices=choices.substring(0,choices.length-2);
+ stringa=stringa+escape(choices);
+ if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
+ else
+ {
+ window.open(ask_uwobo(stringa),"cw");
+ }
+ }
+
+ function templateambigpdq1_selezionaCostanti(document,elenco) {
+ for (i=0; i<elenco.length; i++) {
+ if (elenco[i].substring(elenco[i].length-4, elenco[i].length) != ".var") {
+ document.disamb.uricheck[i].checked = true;
+ } else {
+ document.disamb.uricheck[i].checked = false;
+ }
+ }
+ }
+
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq2.html
+function templateambigpdq2_armageddon()
+ {
+ top.initialize();
+ top.window.open(top.topurl+top.action+"start.html","qw");
+ top.window.open(top.topurl+top.action+"blank.html","cw");
+ top.window.open(top.topurl+top.action+"blank.html","hw");
+ top.window.open(top.topurl+top.action+"blank.html","gw");
+ top.window.open(top.topurl+top.action+"blank.html","sw");
+ }
+
+function templateambigpdq2_resetta()
+ {
+ if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+ {templateambigpdq2_armageddon();}
+ }
+
+function templateambigpdq2_listainterpretazioni(document,elenco,labels)
+ {
+ for (i=0;i<elenco.length;i++)
+ {
+ document.write("<input type=radio name=interp value="+elenco[i]+"> "+labels[i]+"<br />");
+ }
+ }
+
+function templateambigpdq2_invia(document,elenco)
+ {
+ stringa=top.topurl+"/searchPattern?term="+top.terminecic;
+ stringa=stringa+"&aliases="+(top.listaliases==""?"":"%20");
+ controllo=stringa.length;
+ for (j=0;j<elenco.length;j++)
+ {
+ if (document.disamb.interp[j].checked)
+ {
+ stringa=stringa+escape(elenco[j]);
+
+ // TODO da implementare nella terza fase
+ //top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
+
+ //for (k=0;k<top.aliasglob.length;k++){alert(top.aliasglob[k])}
+ //top.listaliases=top.listaliases+document.disamb.interp[j].value;//in caso di query ulteriori con la stessa lista di alias
+ }
+
+ }
+ if (stringa.length!=controllo)
+ {
+ window.open(ask_uwobo(stringa),"cw");
+ }
+ else {alert("You must choose one option.");}
+ }
+
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq3.html
+function templateambigpdq3_init(aliases)
+{
+ top.aliasglob = new Array();
+ for (i=0; i<aliases.length; i++) {
+ top.aliasglob[i] = aliases[i];
+ }
+ top.vlds=new Array();
+ top.window.open(top.topurl+top.action+"editorpdq.html", "sw");
+}
</SCRIPT>
</HEAD>
<script>