annotate Blast output page example_files/results.js @ 28:8a8c0c71b5d1

add blast2html.xml config setting
author Jan Kanis <jan.code@jankanis.nl>
date Thu, 15 May 2014 16:46:30 +0200
parents bad241dc701f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
1 // JScript source code
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
2
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
3 //Display Reformat page button only after the whole page is loaded
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
4
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
5 function ReformatPageEvent()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
6 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
7 var refPageLink = document.getElementById("refPage");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
8
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
9 //alert(refPageLink);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
10 //alert(refPageLink.getAttribute("submitForm"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
11 var submitForm = refPageLink.getAttribute("submitForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
12 alert(submitForm);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
13 if(refPageLink && submitForm) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
14 utils.addEvent(refPageLink,
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
15 "click",
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
16 function() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
17 document.getElementById(submitForm).submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
18 },
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
19 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
20 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
21 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
22
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
23
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
24 function SubmitEvent(linkID)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
25 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
26
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
27 var link = document.getElementById(linkID);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
28 //alert(link.getAttribute("submitForm"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
29 var submitForm = link.getAttribute("submitForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
30 if(link && submitForm) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
31 utils.addEvent(link,
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
32 "click",
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
33 function() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
34 document.getElementById(submitForm).submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
35 },
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
36 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
37 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
38 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
39
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
40
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
41 function SubmitEventSave(linkID)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
42 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
43
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
44 var link = document.getElementById(linkID);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
45 //alert(link.getAttribute("submitForm"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
46 var submitForm = link.getAttribute("submitForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
47 if(link && submitForm) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
48 utils.addEvent(link,
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
49 "click",
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
50 function() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
51 //$(submitForm).CMD.value = "GetSaved";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
52 document.getElementById(submitForm).submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
53 },
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
54 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
55 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
56 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
57
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
58
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
59
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
60
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
61 //This function creates submit form event on click
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
62 //form submitted is defined in submitForm attribute
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
63 //It also copies params from forms[0] (search paramateres) created by formatter
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
64 function SubmitEventNew(linkID)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
65 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
66
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
67 var link = document.getElementById(linkID);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
68 //alert(link.getAttribute("submitForm"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
69 if(!link) return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
70 var submitForm = link.getAttribute("submitForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
71 if(link && submitForm) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
72 utils.addEvent(link,
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
73 "click",
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
74 function() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
75 document.forms[0].CMD.value = "";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
76 if(document.forms[0].PAGE_TYPE) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
77 document.forms[0].PAGE_TYPE.value = "";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
78 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
79 var s = document.forms[0].innerHTML;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
80 var form = $(submitForm);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
81 form.innerHTML = s + form.innerHTML;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
82 form.submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
83 },
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
84 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
85 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
86 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
87
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
88 function GetResults()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
89 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
90 form = $("results");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
91 form.QUERY_INDEX.value = $("queryList")[$("queryList").selectedIndex].value;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
92 form.submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
93 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
94
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
95 function isIdIn(id, idArray){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
96 var idSeen=false;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
97
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
98 for(i=0; i<idArray.length; i++){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
99 if(id==idArray[i]){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
100 idSeen=true;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
101 break;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
102 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
103 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
104 return idSeen;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
105 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
106
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
107 function GetSelectedSeqString(formName)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
108 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
109 var selSeqs = "";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
110 var idArray=new Array();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
111 forms = document.getElementsByName(formName);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
112 for(var j=0; j < forms.length; j++){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
113 for(var i=0; i < forms[j].elements.length; i++){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
114 var theElem=forms[j].elements[i];
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
115 if(theElem.type=="checkbox"&&theElem.name=="getSeqGi"&&theElem.checked){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
116 if(!isIdIn(theElem.value, idArray)){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
117 idArray[idArray.length]=theElem.value;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
118 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
119 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
120 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
121 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
122 selSeqs = idArray.join();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
123 return selSeqs;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
124 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
125
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
126 function ViewSelectedSeqs(e)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
127 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
128 var submitForm = $("submitterTop");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
129 var targetForm = submitForm.getAttribute("seqsForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
130 $("selSeqs").value = GetSelectedSeqString(targetForm);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
131 submitForm.submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
132 utils.preventDefault(e);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
133 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
134
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
135
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
136 function ViewSelectedSeqTree()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
137 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
138 var submitForm = $("treesubmitterTop");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
139 var targetForm = submitForm.getAttribute("seqsForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
140 $("seqSet").value = GetSelectedSeqString(targetForm);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
141 $("scrWidth").value = screen.width;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
142 $("scrHeight").value = screen.height;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
143 submitForm.submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
144 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
145
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
146 function ViewTree(linkID) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
147 link = document.getElementById(linkID);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
148 var target = link.target;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
149 winRef = window.open(link.href + "&screenWidth=" + screen.width + "&screenHeight=" + screen.height, target);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
150 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
151
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
152 function ViewSelectedSeqMultiAlign()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
153 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
154 var submitForm = $("multisubmitterTop");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
155 var targetForm = submitForm.getAttribute("seqsForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
156 $("seqSetM").value = GetSelectedSeqString(targetForm);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
157 submitForm.submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
158 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
159
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
160
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
161
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
162 function selectAllSeqs()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
163 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
164 var formName = this.getAttribute("seqsForm");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
165 forms = document.getElementsByName(formName);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
166 for(var j=0; j < forms.length; j++){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
167 for(var i=0; i < forms[j].elements.length; i++){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
168 //for(var i=0; i < document.forms[formName].elements.length; i++){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
169 var theElem=forms[j].elements[i];
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
170 if(theElem.type=="checkbox"&&theElem.name=="getSeqGi"){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
171 theElem.checked=this.checked;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
172 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
173 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
174 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
175 links = document.getElementsByName("selectAll");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
176 for(var i=0; i < links.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
177 if(links[i] != this) links[i].checked = this.checked;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
178 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
179 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
180
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
181
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
182 function InitSeqAlignLinks()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
183 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
184 var links = document.getElementsByName("getSeqs");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
185 for(var i=0; i < links.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
186 utils.addEvent(links[i],"click",ViewSelectedSeqs,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
187 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
188 links = document.getElementsByName("treeView");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
189 for(var i=0; i < links.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
190 utils.addEvent(links[i],"click",ViewSelectedSeqTree,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
191 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
192 links = document.getElementsByName("mltiAln");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
193 for(var i=0; i < links.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
194 utils.addEvent(links[i],"click",ViewSelectedSeqMultiAlign,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
195 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
196 links = document.getElementsByName("selectAll");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
197 for(var i=0; i < links.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
198 utils.addEvent(links[i],"click",selectAllSeqs,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
199 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
200
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
201 if($("showAlign"))
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
202 utils.addEvent($("showAlign"),"click",showHideLinks,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
203 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
204
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
205 function InitDownLoad()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
206 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
207 var deltaBlast = ($("diThresh") && $("diThresh").value != "") ? true : false;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
208 if (!deltaBlast && ($("stepNumber").value == "" || $("stepNumber").value < 2)) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
209 utils.addClass($("dnPSSMPar"),"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
210 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
211 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
212 function Reformat()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
213 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
214 if(utils.hasClass($("FormatForm").FORMAT_ORGANISM,"orgHint")) $("FormatForm").FORMAT_ORGANISM.value = "";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
215
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
216 $("FormatForm").submit();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
217 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
218 function InitCustomButton(bn)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
219 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
220 utils.addEvent(bn, "mouseover", function() {this.src = this.getAttribute("mouseovImg");}, false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
221 utils.addEvent(bn, "mouseout", function() {this.src = this.getAttribute("mouseoutImg");}, false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
222 utils.addEvent(bn, "mousedown", function() {this.src = this.getAttribute("mousedownImg");}, false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
223 utils.addEvent(bn, "mouseup", function() {this.src = this.getAttribute("mouseupImg");}, false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
224 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
225
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
226 function InitAllCustomButtons()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
227 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
228 if($("go")) InitCustomButton($("go"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
229 if($("dn")) InitCustomButton($("dn"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
230 if($("onPageReformat")) InitCustomButton($("onPageReformat"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
231 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
232 function showHideLinks()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
233 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
234 var links = document.getElementsByName("selectAll");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
235 for(var i=0; i < links.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
236 //This is done since IE does not recognize getElementsByName for span elem
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
237 var allLinks = utils.getParent(links[i]);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
238 var removeClass,addClass;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
239 if(utils.hasClass(allLinks,"shownInl")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
240 removeClass="shownInl";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
241 addClass="hidden";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
242 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
243 else {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
244 removeClass="hidden";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
245 addClass="shownInl";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
246 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
247 utils.removeClass(allLinks,removeClass);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
248 utils.addClass(allLinks,addClass);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
249 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
250 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
251 /*remove this function */
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
252 function InitHelpLinks()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
253 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
254 for(var i=1; i <= 11;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
255 InitToggleEvent($("hlp" + i));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
256 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
257 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
258 //This function is used for collapsible deflines onmouseover="showInfo(this)"
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
259 //Initialized in showdefline.cpp
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
260 function showInfo(elem)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
261 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
262 var targetElem = $("info_" + elem.id);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
263 if(!targetElem) return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
264 if(elem.getAttribute("init") == "on") return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
265
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
266 Toggle.addTarget(elem, targetElem);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
267 elem.setAttribute("init","on");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
268 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
269
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
270 function InitPsiBlast()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
271 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
272 //utils.addEvent($("ttt"),"keyup",SetHitlistSize,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
273 var hts = document.getElementsByName("HITLIST_SIZE");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
274 for(var i=0; i < hts.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
275 utils.addEvent(hts[i],"keyup",SetHitlistSize,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
276 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
277 if($("psiInp")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
278 var numSubsets = $("psiInp").getAttribute("numSubsets");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
279 for(var i=1; i <= numSubsets;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
280 if ($("alnPos" + i)) InitToggleEvent($("alnPos" + i));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
281 if ($("deflnG" + i)) InitToggleEvent($("deflnG" + i));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
282 if ($("deflnB" + i)) InitToggleEvent($("deflnB" + i));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
283 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
284 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
285 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
286
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
287 function SetHitlistSize()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
288 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
289 var hts = document.getElementsByName("HITLIST_SIZE");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
290 for(var i=0; i < hts.length;i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
291 if(this != hts[i]) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
292 hts[i].value = this.value;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
293 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
294 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
295 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
296 function InitToggleEvent(toggleNode)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
297 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
298 if(toggleNode) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
299 var srcid = toggleNode.getAttribute("toggle");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
300 if(srcid) Toggle.addTarget(srcid, toggleNode);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
301 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
302 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
303
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
304 function InitIFrameLinks()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
305 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
306 CheckIframe($("RSIFrameNoRes"),"prlink");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
307 CheckIframe($("RSIFrameDesc"),"prlink");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
308 CheckIframe($("RSIFrameAln"),"prlink");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
309 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
310
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
311 function CheckIframe(iframe,contentElemID)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
312 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
313 if(!iframe) return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
314
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
315 var iframeDoc;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
316
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
317 if(iframe.contentDocument) {//Firefox
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
318 iframeDoc = iframe.contentDocument;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
319 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
320 else if (iframe.contentWindow) {//IE
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
321 iframeDoc = iframe.contentWindow.document;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
322 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
323 else if(iframe.document) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
324 iframeDoc = iframe.document;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
325 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
326 if(iframeDoc){
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
327 if(iframeDoc.getElementById(contentElemID)) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
328 utils.addClass(iframe,"shown");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
329 utils.removeClass(iframe,"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
330 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
331 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
332 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
333
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
334
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
335 function InitHitMatrix()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
336 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
337 if($("bl2seImg")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
338
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
339 utils.addEvent($("hitmtImg"),"load",
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
340 function() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
341 utils.addClass($("bl2seImg"),"shown");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
342 utils.removeClass($("bl2seImg"),"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
343
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
344 },
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
345 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
346 utils.addEvent($("showHitMatrix"),"click",
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
347 function() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
348 $("hitmtImg").src= $("hitmtImg").getAttribute("imgsrc");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
349 if(utils.hasClass($("htmb"),"shown")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
350 utils.addClass($("htmb"),"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
351 utils.removeClass($("htmb"),"shown");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
352 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
353 else {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
354 utils.addClass($("htmb"),"shown");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
355 utils.removeClass($("htmb"),"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
356 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
357 },
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
358 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
359
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
360 if($("blastSpec") && $("blastSpec").value=="GlobalAln") {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
361 $("hitmtImg").src= $("hitmtImg").getAttribute("imgsrc");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
362 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
363 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
364 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
365
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
366
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
367
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
368
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
369
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
370 function SetFormSubmitEvent()
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
371 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
372 var el = $("refPage");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
373 if(el) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
374 SubmitEventNew("refPage");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
375 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
376 SubmitEventNew("frmPage");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
377 el = $("searchOptions");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
378 if(el) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
379 SubmitEventNew("searchOptions");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
380 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
381 el = $("saveSearchOptions");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
382 if(el) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
383 SubmitEventNew("saveSearchOptions");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
384 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
385 //SubmitEventNew("breadCrSearchOptions");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
386 list = $("queryList");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
387 if(list) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
388 utils.addEvent(list,"change",GetResults,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
389 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
390
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
391 list = $("go");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
392 if(list) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
393 utils.addEvent(list,"click",GetResults,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
394 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
395
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
396
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
397 list= $("onPageReformat");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
398 if(list) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
399 utils.addEvent(list,"click",Reformat,false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
400 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
401
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
402 if ($("cddResults") && $("statInfo")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
403 jQuery($("cddResults")).ncbitoggler('toggle');
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
404 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
405 //New design still uses toggle
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
406 if ($("showCDD")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
407 InitToggleEvent($("cddInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
408 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
409 InitToggleEvent($("refInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
410 InitToggleEvent($("resStat"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
411 InitToggleEvent($("dbDetails"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
412 InitToggleEvent($("graphicInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
413 InitToggleEvent($("descrInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
414 InitToggleEvent($("alignInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
415 InitToggleEvent($("ovrInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
416 InitToggleEvent($("queryInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
417 InitToggleEvent($("hitMatrixInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
418 InitToggleEvent($("bl2ovrInfo"));
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
419 //Init only for PSI blastfse
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
420 if($("prevRID")) InitPsiBlast();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
421 InitSeqAlignLinks();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
422 InitAllCustomButtons();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
423 if($("dnPSSMPar")) InitDownLoad();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
424 InitHitMatrix();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
425 if($("noRes")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
426 if($("hitCvs")) utils.addClass($("hitCvs"),"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
427 if($("hitText")) utils.addClass($("hitText"),"hidden");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
428 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
429 InitIFrameLinks();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
430 showDbDetails(); //fill behind the scene
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
431 if ($("showDetails") && utils.hasClass($("showDetails"), "shown")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
432 utils.addEvent($("showDetails"), "click", showDbDetails, false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
433 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
434 initContentWidth();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
435 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
436
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
437 function initContentWidth() {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
438 var lineLengthElem = $("FormatForm").LINE_LENGTH;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
439 if (lineLengthElem) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
440 var lineLength = parseInt(lineLengthElem[lineLengthElem.selectedIndex].value);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
441 if (parseInt(lineLengthElem.getAttribute("defval")) == lineLength) return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
442
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
443 var charWidth = (navigator.userAgent.match(/ie/i)) ? 8 : 7;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
444 var minWidth = (lineLength + parseInt(17)) * charWidth;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
445
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
446
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
447 var alignView = $("FormatForm").ALIGNMENT_VIEW;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
448 var formatType = $("FormatForm").FORMAT_TYPE;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
449 var queryAnch = formatType[formatType.selectedIndex].value == "HTML" && (alignView[alignView.selectedIndex].value != "Pairwise" && alignView[alignView.selectedIndex].value != "PairwiseWithIdentities");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
450
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
451 var addWidth = ($("FormatForm").OLD_VIEW.checked || queryAnch) ? 250 : 350;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
452
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
453 minWidth = minWidth + parseInt(addWidth) + "px";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
454 jQuery($("content")).css("min-width", minWidth);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
455 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
456
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
457 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
458
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
459
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
460
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
461
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
462
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
463 function ShowHideAlnDeflines(alnID, checkbx) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
464 var dflTableID = "dln_" + alnID;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
465 if ($(dflTableID)) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
466 var rmClass, addClass;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
467 if (checkbx.checked) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
468 rmClass = "hidden";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
469 addClass = "shown";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
470 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
471 else {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
472 rmClass = "shown";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
473 addClass = "hidden";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
474 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
475 var elems = $C(rmClass, "class", $(dflTableID), "tr");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
476 if (elems) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
477 //alert(elems.length);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
478 for (var i = 0; i < elems.length; i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
479 utils.removeClass(elems[i], rmClass);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
480 utils.addClass(elems[i], addClass);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
481 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
482 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
483 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
484 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
485
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
486 function SortAln(e, sortLink, sortItem) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
487 var p = utils.getParent(sortLink);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
488 var p = utils.getParent(p);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
489 p_TD = utils.getParent(p);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
490 p_TR = utils.getParent(p_TD);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
491 if (utils.hasClass(p_TR, "dflnAln")) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
492 p_TD.innerHTML = "Reading seqaligns...";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
493 var gi = p_TD.id.substr(2);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
494 var rid = p_TD.getAttribute("rid");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
495 getAlignSort(rid, gi, p_TD, sortItem);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
496 e = e || window.event;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
497 utils.preventDefault(e);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
498 return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
499 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
500 var links = document.getElementsByName("alnSort");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
501 if (links.length >= sortItem) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
502 var href = links[sortItem].href.replace(new RegExp("selectAllTop.*(&|$)"), "");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
503 var hrefLn = sortLink.href.replace(new RegExp(".*#"), "");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
504 sortLink.href = href + hrefLn;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
505 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
506 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
507
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
508
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
509
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
510 var fullArr;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
511 var numDbs;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
512 function showDbDetails(e,dbSetIndex)
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
513 {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
514 if (!($("dbPlusSpecies"))) return; //No org display
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
515 if ($("dbPlusSpecies").getAttribute("init") == "on" && dbSetIndex == null) return;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
516 $("dbPlusSpecies").setAttribute("init", "on");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
517
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
518 dbInfoUrl = "getDBInfo.cgi";
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
519 var rp = new RemoteDataProvider(dbInfoUrl);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
520 rp.minArr = 10;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
521
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
522 if (!fullArr) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
523 var arr = $("results").DATABASE.value.split(" ");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
524 numDbs = arr.length;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
525 if (arr.length > rp.minArr) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
526 fullArr = new Array();
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
527 while (arr.length > 1) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
528 var arrNew = arr.splice(0, rp.minArr); //does not include stopindex
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
529 fullArr.push(arrNew);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
530 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
531 if (!dbSetIndex) dbSetIndex = 0;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
532 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
533 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
534
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
535 rp.onSuccess = function(obj) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
536 var navDB = document.createElement("div");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
537 if (fullArr) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
538 var prevLink, nextLink, firstLink, lastLink;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
539 if (this.currDbSetIndex >= 1) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
540 var firstStart = 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
541 var firstEnd = firstStart + fullArr[0].length - 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
542 firstLink = document.createElement("a");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
543 jQuery(firstLink).attr("href", "#");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
544 jQuery(firstLink).attr("id", "firstDbSet");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
545 jQuery(firstLink).attr("onclick", "showDbDetails(event,0);");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
546 jQuery(firstLink).attr("title", "Databases " + firstStart + "-" + firstEnd);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
547 jQuery(firstLink).html("First " + this.minArr + " dbs");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
548
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
549 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
550 if (this.currDbSetIndex >= 1) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
551 var prevStart = (this.currDbSetIndex - 1) * this.minArr + 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
552 var prevEnd = prevStart + fullArr[this.currDbSetIndex - 1].length - 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
553 prevLink = document.createElement("a");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
554 jQuery(prevLink).attr("href", "#");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
555 jQuery(prevLink).attr("id", "prevDbSet");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
556 jQuery(prevLink).attr("onclick", "showDbDetails(event," + (this.currDbSetIndex - 1) + ");");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
557 jQuery(prevLink).attr("title", "Databases " + prevStart + "-" + prevEnd);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
558 jQuery(prevLink).html("Prev " + this.minArr + " dbs");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
559 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
560
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
561 if (this.currDbSetIndex < fullArr.length - 1) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
562 var nextStart = (this.currDbSetIndex + 1) * this.minArr + 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
563 var nextEnd = nextStart + fullArr[this.currDbSetIndex + 1].length - 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
564 nextLink = document.createElement("a");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
565 jQuery(nextLink).attr("href", "#");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
566 jQuery(nextLink).attr("id", "nextDbSet");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
567 jQuery(nextLink).attr("onclick", "showDbDetails(event," + (this.currDbSetIndex + 1) + ");");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
568 jQuery(nextLink).attr("title", "Databases " + nextStart + "-" + nextEnd);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
569 jQuery(nextLink).html("Next " + this.minArr + " dbs");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
570 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
571 if (this.currDbSetIndex < fullArr.length - 1) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
572 var lastInd = fullArr.length - 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
573 var lastStart = numDbs - fullArr[lastInd].length;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
574 var lastEnd = numDbs;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
575 lastLink = document.createElement("a");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
576 jQuery(lastLink).attr("href", "#");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
577 jQuery(lastLink).attr("id", "lastDbSet");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
578 jQuery(lastLink).attr("onclick", "showDbDetails(event," + lastInd + ");");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
579 jQuery(lastLink).attr("title", "Databases " + lastStart + "-" + lastEnd);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
580 jQuery(lastLink).html("Last " + this.minArr + " dbs");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
581 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
582
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
583
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
584 jQuery(navDB).attr("id", "addDbSet");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
585 if (firstLink) jQuery(navDB).append(firstLink);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
586 if (prevLink) jQuery(navDB).append(prevLink);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
587 if (lastLink) jQuery(navDB).append(lastLink);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
588 if (nextLink) jQuery(navDB).append(nextLink);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
589 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
590
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
591 jQuery($("dbPlusSpecies")).html(navDB);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
592 jQuery(navDB).after(obj.responseText);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
593 if (fullArr) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
594 var cap = jQuery($("dbSpecies")).find("caption");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
595 if (cap) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
596 var currStart = (this.currDbSetIndex) * this.minArr + 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
597 var currEnd = currStart + fullArr[this.currDbSetIndex].length - 1;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
598 var capText = cap.html() + "<div class=\"cpAdd\"> Databases " + currStart + "-" + currEnd;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
599 cap.html(capText);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
600 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
601 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
602 };
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
603 rp.onError = function(obj) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
604 $("dbPlusSpecies").innerHTML += "error, requests:" + this.iActiveRequests + " status:" + obj.status;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
605 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
606 var dbs;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
607 if (fullArr) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
608 rp.currDbSetIndex = dbSetIndex;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
609 var currArr = fullArr[dbSetIndex];
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
610 dbs = currArr.join(",");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
611 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
612 else {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
613 dbs = $("results").DATABASE.value.replace(/ /g, ",");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
614 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
615
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
616 rp.Request("CMD=getDBOrg&DATABASE=" + dbs, "POST");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
617 if(e) utils.preventDefault(e);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
618 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
619
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
620 function synchronizeCheck(id, formName, inputName, isChecked) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
621
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
622 for (var i = 0; i < document.forms[formName].elements.length; i++) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
623 var theElem = document.forms[formName].elements[i];
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
624 if (theElem.type == "checkbox" && theElem.name == inputName && id == theElem.value) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
625 theElem.checked = isChecked;
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
626
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
627 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
628 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
629
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
630 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
631
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
632 utils.addEvent(window,
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
633 "load", SetFormSubmitEvent,
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
634 false);
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
635
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
636
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
637 /* If user agent has "safari" in it, include safari-specific stylesheet. */
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
638 if (navigator.userAgent.match(/safari/i) || navigator.userAgent.match(/opera/i)) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
639 document.write("<link rel='stylesheet' type='text/css' href='css/safari-descriptions.css' media='screen'/>");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
640 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
641 if (navigator.userAgent.match(/opera/i)) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
642 document.write("<link rel='stylesheet' type='text/css' href='css/opera-descriptions.css' media='screen'/>");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
643 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
644 if (navigator.userAgent.match(/firefox/i) || navigator.userAgent.match(/safari/i)) {
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
645 document.write("<link rel='stylesheet' type='text/css' href='css/firefox-descriptions.css' media='screen'/>");
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
646 }
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
647
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
648
bad241dc701f add example input blast xml and output html page
Jan Kanis <jan.code@jankanis.nl>
parents:
diff changeset
649