actinput=0;
numeroazioniannullate=0;
}
+
+// @variable@ will be substituted by the searchEngine with the param.variable
+// argument value
+var processorURL="@processorURL@";
+var getterURL="@getterURL@";
+var thkeys="@thkeys@";
+var proofcheckerURL="@proofcheckerURL@";
+var draw_graphURL="@draw_graphURL@";
+var uri_set_queueURL="@uri_set_queueURL@";
+var UNICODEvsSYMBOL="@UNICODEvsSYMBOL@";
+var keys="@keys@";
+var thkeys="@thkeys@";
+var embedkeys="@embedkeys@";
+var doctype_public="@doctype-public@";
+var encoding="@encoding@";
+var thencoding="@thencoding@";
+var media_type="@media-type@";
+var thmedia_type="@thmedia-type@";
+var interfaceURL="@interfaceURL@";
+var thinterfaceURL="@thinterfaceURL@";
+var CICURI="@CICURI@";
+var naturalLanguage="@naturalLanguage@";
+var annotations="@annotations@";
+var topurl="@topurl@";
+
+function ask_uwobo(url)
+ {
+ return (top.topurl+"/ask_uwobo?url="+
+ escape(processorURL + "apply?" +
+ "xmluri=" + escape(url) +
+ "&keys=" + escape(thkeys) +
+ "¶m.processorURL=" + escape(processorURL) +
+ "¶m.getterURL=" + escape(getterURL) +
+ "¶m.proofcheckerURL=" + escape(proofcheckerURL) +
+ "¶m.draw_graphURL=" + escape(draw_graphURL) +
+ "¶m.uri_set_queueURL=" + escape(uri_set_queueURL) +
+ "¶m.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
+ "¶m.keys=" + escape(keys) +
+ "¶m.thkeys=" + escape(thkeys) +
+ "¶m.embedkeys=" + escape(embedkeys) +
+ "¶m.doctype-public=" + escape(doctype_public) +
+ "¶m.encoding=" + escape(encoding) +
+ "¶m.thencoding=" + escape(thencoding) +
+ "¶m.media-type=" + escape(media_type) +
+ "¶m.thmedia-type=" + escape(thmedia_type) +
+ "¶m.interfaceURL=" + escape(interfaceURL) +
+ "¶m.thinterfaceURL=" + escape(thinterfaceURL) +
+ "¶m.CICURI=" + escape(CICURI) +
+ "¶m.naturalLanguage=" + escape(naturalLanguage) +
+ "¶m.annotations=" + escape(annotations) +
+ "¶m.topurl=" + escape(topurl) +
+ "&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();
switch (w) {
- case -10: hw.document.write("Insert an <a href=grammarpdq.html#Id target=gw>Id</a> or an <a href=grammarpdq.html#Uri target=gw>Uri</a> here.")
+ case -10: hw.document.write("Insert an <a href="+top.topurl+top.action+"grammarpdq.html#Id target=gw>Id</a> or an <a href="+top.topurl+top.action+"grammarpdq.html#Uri target=gw>Uri</a> here.")
break;
case -9: hw.document.write("By clicking this you may add or remove aliases as you wish.")
break;
break;
case -3: hw.document.write("Substitutes your query with the text written in the area above. Unless you have a good knowledge of MathQL, it's recommended that you use this only to recover errors.")
break;
- case -2: hw.document.write("This is the edit/submit window. You can modify your query here, but be aware that no syntax check will be performed and that if you enter a <a href=grammar.html#rvar target=gw>variable</a> it won't be available for quick composition later. You may also want to add a <a href=grammar.html#set target=gw>set</a>, a <a href=grammar.html#val target=gw>val</a> or a <a href=grammar.html#boole target=gw>boole</a> somewhere in the query. If you do, write '<set>','<val>' or '<bol>' in the point you'd like it to appear, or use the buttons on the right if you are using IE. When you're done with the query, click the Submit button.")
+ case -2: hw.document.write("This is the edit/submit window. You can modify your query here, but be aware that no syntax check will be performed and that if you enter a <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>variable</a> it won't be available for quick composition later. You may also want to add a <a href="+top.topurl+top.action+"grammar.html#set target=gw>set</a>, a <a href="+top.topurl+top.action+"grammar.html#val target=gw>val</a> or a <a href="+top.topurl+top.action+"grammar.html#boole target=gw>boole</a> somewhere in the query. If you do, write '<set>','<val>' or '<bol>' in the point you'd like it to appear, or use the buttons on the right if you are using IE. When you're done with the query, click the Submit button.")
break;
case -1: hw.document.write("You may see the grammar here.")
break;
break;
case 1: hw.document.write("You may enter an arbitrary statement here; be careful since syntax errors won't be detected.");
break;
- case 2: hw.document.write("Enter an <a href=grammar.html#attr_list target=gw>attr_list</a> here.");
+ case 2: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#attr_list target=gw>attr_list</a> here.");
break;
- case 3: hw.document.write("Enter an <a href=grammar.html#id target=gw>id</a> here.");
+ case 3: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#id target=gw>id</a> here.");
break;
- case 4: hw.document.write("You must select one previously entered <a href=grammar.html#rvar target=gw>rvar</a>. If you haven't already entered at least one, you can't choose this. ");
+ case 4: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>rvar</a>. If you haven't already entered at least one, you can't choose this. ");
break;
- case 5: hw.document.write("Enter a <a href=grammar.html#path target=gw>path</a> here.");
+ case 5: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#path target=gw>path</a> here.");
break;
- case 6: hw.document.write("You must select one previously entered <a href=grammar.html#svar target=gw>svar</a>. If you haven't already entered at least one, you can't choose this. ");
+ case 6: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#svar target=gw>svar</a>. If you haven't already entered at least one, you can't choose this. ");
break;
- case 7: hw.document.write("Enter a <a href=grammar.html#string_list target=gw>string_list</a> here.");
+ case 7: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#string_list target=gw>string_list</a> here.");
break;
- case 8: hw.document.write("You must select one <a href=grammar.html#vvar target=gw>vvar</a> previously entered as an 'attr'. If you haven't already entered at least one, you can't choose this. ");
+ case 8: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered as an 'attr'. If you haven't already entered at least one, you can't choose this. ");
break;
- case 81: hw.document.write("You must select one <a href=grammar.html#vvar target=gw>vvar</a> previously entered in a 'let' statement. If you haven't already entered at least one, you can't choose this. ");
+ case 81: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered in a 'let' statement. If you haven't already entered at least one, you can't choose this. ");
break;
- case 9: hw.document.write("Enter a single <a href=grammar.html#quoted_string target=gw>quoted_string</a> here.");
+ case 9: hw.document.write("Enter a single <a href="+top.topurl+top.action+"grammar.html#quoted_string target=gw>quoted_string</a> here.");
break;
}
}
//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>