3 <SCRIPT language="Javascript">
11 top.window.open(top.topurl+"/getpage?url=start.html","qw");
12 top.window.open(top.topurl+"/getpage?url=blank.html","cw");
13 top.window.open(top.topurl+"/getpage?url=blank.html","hw");
14 top.window.open(top.topurl+"/getpage?url=blank.html","gw");
15 top.window.open(top.topurl+"/getpage?url=blank.html","sw");
17 function idcheck(ident)
20 partediid=/[a-zA-Z0-9_\-\']/;
21 if (!lettera.test(ident.charAt(0))){alert("an Id must begin with a letter.");return(0)}
22 while (ident.length>0)
24 ident=ident.substring(1,(ident.length));
26 if (!partediid.test(ident.charAt(0))){alert(ident.charAt(0)+" is not a valid character for an Id.");return(0);}
30 function uricheck(ident)
33 cic=ident.substring(0,5);//alert(cic);
34 if (cic!="cic:/"){alert("an Uri must begin with the string 'cic:/'");return(0);}
35 ident=ident.substring(5,ident.length);//alert(ident);
36 if (ident.indexOf(".")<0){alert("an Uri must contain a '.'");return(0);}
37 ident1=ident.substring(0,ident.indexOf("."));//alert(ident1);
38 ident2=ident.substring(ident.indexOf(".")+1,ident.length);//alert(ident2);
39 while (ident1.length>0)
41 if (ident1.indexOf("/")>-1)
43 if (idcheck(ident1.substring(0,ident1.indexOf("/")))==0){return (0)}
44 ident1=ident1.substring(ident1.indexOf("/")+1,ident1.length);//alert(ident1);
46 else {if (idcheck(ident1)==0){return (0)}
49 if (ident2=="con"||ident2=="var"){return(1)}
50 if (ident2.substring(0,6)!="ind#1/"){alert ("syntax error in the Uri.");return(0);}
51 ident2=ident2.substring(6,ident2.length);//alert(ident2);
52 if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
53 if (ident2.indexOf("/")>-1)
55 while (ident2.charAt(0)!="/")
58 if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
59 ident2=ident2.substring(1,ident2.length);
62 while (ident2.length>0)
65 ident2=ident2.substring(1,ident2.length);
67 if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
74 window.open(top.topurl+"/getpage?url=aliaslist.html","bw");
75 top.cw.bw.document.aliaslist.idi.focus();
79 window.open(top.topurl+"/getpage?url=expnamedsubst.html","bw");
80 bw.document.aliaslist.varid.focus();
86 if (mcq.indexOf("[")>-1)
88 mcq=mcq.replace("[","<font color=\"#ff0000\">[");
89 mcq=mcq.replace("]","]</font>");
90 top.qw.document.close();
91 top.qw.document.write(mcq);
92 if (mcq.charAt(mcq.indexOf("[")+1)=="A")
94 window.open(top.topurl+"/getpage?url=aliaslist.html","bw")
96 if (mcq.charAt(mcq.indexOf("[")+1)=="E")
98 window.open(top.topurl+"/getpage?url=expr.html","bw")
100 if (mcq.charAt(mcq.indexOf("[")+1)=="G")
102 window.open(top.topurl+"/getpage?url=genid.html","bw")
104 if (mcq.charAt(mcq.indexOf("[")+1)=="e")
106 window.open(top.topurl+"/getpage?url=expnamedsubst.html","bw")
111 while (mcq.indexOf(">")>-1)
113 mcq=mcq.replace(">",">");
115 top.window.sw.editexpr(mcq);
116 window.open(top.topurl+"/getpage?url=blank.html","bw");
117 window.open(top.topurl+"/getpage?url=blank.html","qw");
123 //top.qw.document.write(mcq);
128 document.write(' <frameset rows="24%,76%" border="0" noresize> <frame name=tw src="'+top.topurl+'/getpage?url=query_choice.html";> <frame name=bw src="'+top.topurl+'/getpage?url=blank.html";> </frameset> ');