1 function chopSlash(url)
3 return url.slice(0,url.lastIndexOf('/'));
6 function dropParam(url,name)
8 var urla = url.split("?");
10 var args = search.split("&");
11 var newargs = new Array();
14 for (var i = 0 ; i < args.length ; i++) {
15 var couple = args[i].split("=");
16 if (couple[0] != name) {
22 return (urla[0] + "?" + newargs.join("&"));
25 function setParam(url,name,value)
27 var urla = url.split("?");
29 var args = search.split("&");
32 for (var i = 0 ; i < args.length ; i++) {
33 var couple = args[i].split("=");
34 if (couple[0] == name) {
36 args[i] = name + "=" + value;
40 return (urla[0] + "?" + args.join("&") + (found ? "" : ("&" + name + "=" + value)));
43 function extractParam(url,name)
45 var search = url.split("?")[1];
46 search = search.split("#")[0];
47 var args = search.split("&");
50 for (var i = 0 ; i < args.length ; i++) {
51 var couple = args[i].split("=");
52 if (couple[0] == name) value = couple[1];
55 if (value == "???") value = getDefaultParam(name);
60 function getParam0(search,name)
62 var args = search.split("&");
65 for (var i = 0 ; i < args.length ; i++) {
66 var couple = args[i].split("=");
67 if (couple[0] == name) value = couple[1];
70 if (value == "???") value = getDefaultParam(name);
75 function getParam(name)
77 return getParam0(location.search.slice(1),name);
80 function getParam2(name)
82 var url = unescape(getParam('xmluri'));
83 var tmp = url.split("?");
86 return getParam0(tmp[1],name);
88 return getDefaultParam(name);
92 function outputOption(doc, value, content, selected)
94 doc.write("<option value=\"" + value + "\" ");
95 if (value == selected) doc.write("selected ");
96 doc.write(">" + content + "</option>");
99 function outputCheckbox(doc, onclick, content, checked)
101 doc.write("<input type=\"checkbox\" onClick=\"" + onclick + "\" ");
102 if (checked) doc.write("checked");
103 doc.write(">" + content + "</input>");