valid URLs in website menu frame and fixed GA code
[jalview.git] / examples / embeddedWJmol.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8)
4  * Copyright (C) 2012 J Procter, AM Waterhouse, LM Lui, J Engelhardt, G Barton, M Clamp, S Searle
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
11  *  
12  * Jalview is distributed in the hope that it will be useful, but 
13  * WITHOUT ANY WARRANTY; without even the implied warranty 
14  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15  * PURPOSE.  See the GNU General Public License for more details.
16  * 
17  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
18 -->
19 <html xmlns="http://www.w3.org/1999/xhtml">
20 <head>
21 <TITLE>Embedded JalviewLite talking to externally managed Jmol</TITLE>
22 <script>
23 <!--//--><![CDATA[//><!--
24 var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-9060947-1"]);_gaq.push(["_trackPageview"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
25 //--><!]]>
26 </script>
27 <script src="javascript/deployJava.js"></script>
28 <script src="jmol/Jmol.js"></script>
29 <script src="javascript/jquery-1.4.4.min.js"></script>
30 <script src="javascript/jquery.timer.js"></script>
31 <script src="javascript/jquery.blockUI.js"></script>
32 <script src="javascript/jshashtable-2.1.js" language="javascript"></script>
33 <!-- <script src="archive-min.js" language="javascript"></script>
34 -->
35 <script src="javascript/jalview.js" language="javascript"></script>
36 <script language="JavaScript">
37 // instead of this, we use a custom JmolApplet spec
38 // jmolInitialize('jmol');
39 jmolInitialize("","JmolApplet-12.2.4.jar");
40 function genHref()
41 {
42  var s1 = "ml:i@midd..", s2 = "atelcpoueau", s3 = "iomyob.neck", href="";
43  for(i=0; i<11; i++)
44  { href = href + s1.charAt(i) + s2.charAt(i) + s3.charAt(i); 
45  }
46  window.location=href;
47 }
48 </script>
49 <script>
50  var loglevel=1;
51  function dbg(lvl,string) {
52   if (_console && lvl<=loglevel) {_console.value += string + "\n";}
53  }
54  var _lastTime=new Date();
55  var _path;
56  var _datazip;
57  var _zip;
58  var alignA;
59  var alignB;
60  var featuresA;
61  var featuresB;
62  var pairs;
63  var atompairs;
64  var structdata;
65  var jmolview;
66  var jvstructassoc;
67  var modeltofiles = new Array();
68
69  function lJvA() {
70   jvfollower = document.getElementById("jvA");
71   setConsole(document.getElementById("stdout"));
72   
73   sep = jvfollower.getSeparator();
74   //jvapp.setSeparator(""+jvapp.getSeparator());
75   linkJvJmol(jvfollower, "jmolView", modeltofiles);
76  };
77
78  var _jvA=new Object();
79  _jvA.attributes = {
80   code : 'jalview.bin.JalviewLite',
81   archive : 'jalviewApplet.jar',
82   width : '500',
83   height : '350',
84   mayscript : 'True',
85   scriptable: 'True',
86   id : 'jvA'
87  };
88  _jvA.parameters = {
89    java_arguments : "-Xmx256m",
90   externalstructureviewer : "true",
91    oninit : "lJvA",
92   automaticScrolling : "true",
93 //  <!-- defaultColour : "Strand Propensity", -->
94   file : "uniref50_mz.fa",
95   
96   relaxedidmatch : "true",
97   debug : "true",
98   wrap : "false",
99   // separator : "^",
100   showAnnotation : "false",
101   embedded : "true",
102   showFullId : "false",
103   RGB : "F2F2FF",
104   linkLabel_1 : "SRS",
105   linkUrl_1 : "http://srs.ebi.ac.uk/srs7bin/cgi-bin/wgetz?-e+[uniprot-all:$SEQUENCE_ID$]+-vn+2"
106   ,
107   linkLabel_2 : "Uniprot"
108   ,
109   linkUrl_2 : "http://us.expasy.org/cgi-bin/niceprot.pl?$SEQUENCE_ID$",
110   APPLICATION_URL : "http://www.jalview.org/services/launchApp",
111   PDBfile : "1gaq.txt FER1_MAIZE"
112  };
113  jmolSetCallback("hoverCallback","_jmolhover");
114   jmolSetCallback("pickCallback","_jmolpick");
115   modeltofiles+="1gaq.txt";
116 </script>
117 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
118
119  <link href="css/reset.css" rel="stylesheet" type="text/css" />
120  <link href="css/style.css" rel="stylesheet" type="text/css" />
121  
122   <!--[if IE 6]>
123  <link rel="stylesheet" type="text/css" href="css/ie6.css" />
124 <![endif]-->
125
126 <!--[if IE 7]>
127  <link rel="stylesheet" type="text/css" href="css/ie7.css" />
128 <![endif]-->
129
130 <!-- dd menu -->
131 <script type="text/javascript">
132 <!--
133 var timeout         = 500;
134 var closetimer  = 0;
135 var ddmenuitem      = 0;
136
137 // open hidden layer
138 function mopen(id)
139
140  // cancel close timer
141  mcancelclosetime();
142
143  // close old layer
144  if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
145
146  // get new layer and show it
147  ddmenuitem = document.getElementById(id);
148  ddmenuitem.style.visibility = 'visible';
149
150 }
151 // close showed layer
152 function mclose()
153 {
154  if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
155 }
156
157 // go close timer
158 function mclosetime()
159 {
160  closetimer = window.setTimeout(mclose, timeout);
161 }
162
163 // cancel close timer
164 function mcancelclosetime()
165 {
166  if(closetimer)
167  {
168   window.clearTimeout(closetimer);
169   closetimer = null;
170  }
171 }
172
173 // close layer when click-out
174 document.onclick = mclose; 
175 // -->
176 </script>
177
178 </head>
179
180
181 <body>
182
183
184 <div id="header">
185 <div id="logo"><a href="http://www.jalview.org" title="Home"></a></div>
186 <ul id="buttons">
187 <li id="applet"><a href="applets.html" title="applet"></a></li>
188 <li id="desktop"><a href="../webstart/jalview.jnlp" title="desktop"></a></li>
189 </ul>
190 </div>
191
192
193 <div id ="nav">
194 <div id="navInner">
195
196 <ul id="sddm">
197  <li><a href="http://www.jalview.org">Home</a></li>
198  <li><a href="http://www.jalview.org/about" onmouseover="mopen('m1')" onmouseout="mclosetime()">About</a>
199   <div id="m1" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
200   <a href="http://www.jalview.org/about/documentation">Documentation</a>
201   <a href="http://www.jalview.org/about/citation">Publications</a>
202   <a href="http://www.jalview.org/about/credits">Credits</a>
203   </div>
204  </li>
205  <li><a href="http://www.jalview.org/faq">FAQ</a></li>
206  <li><a href="http://www.jalview.org/community" onmouseover="mopen('m3')" onmouseout="mclosetime()" class="community">Community</a>
207   <div id="m3" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
208   <a href="http://www.jalview.org/mailman/listinfo/jalview-announce">News Mailing List</a>
209   <a href="http://www.jalview.org/mailman/listinfo/jalview-discuss">Discussion Mailing List</a>
210   <a href="http://www.jalview.org/community/links">Links</a>
211   <a href="http://www.jalview.org/community/community-news">Community News</a>
212   </div>
213  </li>
214  <li><a href="http://www.jalview.org/development" onmouseover="mopen('m4')" onmouseout="mclosetime()" class="development">Development</a>
215   <div id="m4" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
216   <a href="http://www.jalview.org/development/release-history">Release History</a>
217   <a href="http://issues.jalview.org">Jalview Bug Tracker</a>
218   <a href="http://source.jalview.org/gitweb/">Jalview Git Web</a>
219   <a href="http://www.jalview.org/development/development-news">Development News</a>
220   </div>
221  </li>
222  <li><a href="http://www.jalview.org/training" onmouseover="mopen('m5')" onmouseout="mclosetime()" class="training">Training</a>
223   <div id="m5" onmouseover="mcancelclosetime()" onmouseout="mclosetime()">
224   <a href="http://www.jalview.org/training/training-courses">Training Courses</a>
225   <a href="http://www.jalview.org/training/training-news">Training News</a>
226   </div>
227  </li>
228  <li><a href="http://www.jalview.org/download" class="download-right">Download</a></li>
229 </ul>
230 <div style="clear:both"></div>
231 </div>
232
233 </div>
234
235
236 <div id="pageWrap">
237
238 <div id="sideNav">
239 <ul>
240 <li><a href="applets.html">JalviewLite Examples</a></li>
241 <li><a href="appletParameters.html">Applet Parameters</a></li>
242 <li><a href="jalviewLiteJs.html">Javascript API</a></li>
243 <li><a href="formComplete.html">in-page API demo</a></li>
244 <li><a href="linkedapplets_ng.html">Two JalviewLites demo</a></li>
245 <li class="jvlite-nav-small"><a href="embeddedWJmol.html">Jalview and Jmol demo</a></li>
246 </ul>
247 </div>
248
249 <div id="content" class="content">
250  <center>
251     <script>
252         jmolApplet("500x500","zap; load FILE '1gaq.txt'; frame 0; select all; wireframe off; spacefill off; cartoons; restrict; center *; set selectionhalos true;select 0","jmolView");
253 </script>
254   <script>
255     deployJava.runApplet(_jvA.attributes, _jvA.parameters, '1.4');
256     </script>
257         </center>
258 </div>
259 </div>
260 <div id ="footer">
261 <div id="innerFooter">
262 <div id="copyright"><p>Published under <a href="http://creativecommons.org/licenses/by-sa/3.0/">CC-SA 3.0</a></p></div>
263 <div id="cite">
264 <p>
265 If you use Jalview in your work, please cite this publication:
266 </p>
267 <br />
268 <p>
269 Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009)
270 "Jalview Version 2 - a multiple sequence alignment editor and analysis workbench"
271 Bioinformatics 25 (9) 1189-1191 <a href="http://dx.doi.org/10.1093/bioinformatics/btp033">doi: 10.1093/bioinformatics/btp033</a>
272 </p>
273 </div>
274 </div>
275 </div>
276 </body>
277 </html>