/*
This Javascript will en/decrypt a string using the HTML XOR algorithim
XORCRYPT Version 1.2

This version is much faster because it does not use Base64 encoding.
It is also more difficult to crack, because the key is as long as the
password, and the only way to hack it is to try every possible password.

The latest version has some small bugs cleaned up, reorganized decrypt
sequence and is now crossplatform, crossbrowser compatible, with the
exception of Netscape 2.X. It would be possible to make it compatible
with Netscape 2.X, but I see no point.

For more information on this very simple algorithim email me.

This script was written by:
Evan Jones, 1997
jonesev@home.com
You may use this script any way you wish as long as you email me and let me know.
*/

var cryptTable=new String(" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789	!@#$%^&*()`'-=[];,./?_+{}|:<>~");
var cryptLength=new Number(cryptTable.length-1)
var escapeChar=cryptTable.charAt(cryptLength);

var lineFeed="\n";
var doubleQuote='"';
var clearMessage=new Number(5000);

function decrypt(input, password)
{
var inChar, inValue, outValue, escape=false;

var output="";
var arNumberPw = new Array();

var pwLength=password.length;
var inLength=input.length;

var stopStatus=Math.round(inLength/10);
var statusBar=0;

for (var pwIndex=0; pwIndex<pwLength; pwIndex++)
	{
	arNumberPw[pwIndex]=cryptTable.indexOf(password.charAt(pwIndex));
	}

for (var inIndex=0, pwIndex=0; inIndex<inLength; inIndex++, pwIndex++)
	{
	if (pwIndex>=pwLength)
		{
		pwIndex=0;
		}
	
	inChar=input.charAt(inIndex);
	inValue=cryptTable.indexOf(inChar);
	
	if (inValue==-1)
		{
		outValue=inChar;
		}	

	else if (escape)
		{
		if (inValue==cryptLength)
			{
			outValue=lineFeed;
			inValue=-1;
			}
		else if (inChar=="'")
			{
			outValue=doubleQuote;
			inValue=-1;
			}
		else
			{
			inValue+=cryptLength;
			}
		escape=false;
		}
	else if (inValue==cryptLength)
		{
		escape=true;
		pwIndex--;
		outValue="";
		inValue=-1;
		}

	if (inValue!=-1)
		{
		outValue=cryptTable.charAt(arNumberPw[pwIndex] ^ inValue);
		}

	output+=outValue;

	}

return output;
}
var d = new Date()
document.write('     </td>'+
'    </tr>'+
'  </table>'+
'</div>'+
'<table width="737"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">'+
'  <tr>'+
'    <td colspan="6" bgcolor="#663399">&nbsp;</td>'+
'  </tr>'+
'  <tr>'+
'    <td colspan="6">&nbsp;</td>'+
'  </tr>'+
'  <tr>'+
'    <td><div align="center"><a href="http://ucsd.edu" target="_blank"><img src="http://ctbp.ucsd.edu/images/ucsd.gif" alt="UCSD Home Page" width="55" height="64" border="0"></a> </div></td>'+
/*'    <td><div align="center"><a href="http://www.sdsc.edu"><img src="http://ctbp.ucsd.edu/images/sdsc.gif" alt="SDSC Home Page" width="76" height="64" border="0"></a></div></td>'+ */
'    <td><div align="center"><a href="http://www.salk.edu/" target="_blank"><img src="http://ctbp.ucsd.edu/images/salk.gif" alt="Salk Institute Home Page" width="67" height="64" border="0"></a></div></td>'+
/* '    <td><div align="center"><a href="http://www.scripps.edu/" target="_blank"><img src="http://ctbp.ucsd.edu/images/tsri.gif" alt="The Scripps Research Institute Home Page" width="85" height="64" border="0"></a></div></td>'+ */
'    <td><div align="center"><a href="http://www.nsf.gov/" target="_blank"><img src="http://ctbp.ucsd.edu/images/nsf.gif" alt="National Science Foundation Home Page" width="66" height="64" border="0"></a></div></td>'+
/*'    <td><div align="center"><a href="http://www.bwfund.org/" target="_blank"><img src="http://ctbp.ucsd.edu/images/bwf_image.gif" alt="Burroughs Wellcome Fund" width="74" height="40" border="0"></a></div>'+  */  
'    <div align="center"></div></td>'+
'  </tr>'+
'  <tr>'+
'    <td colspan="6" valign="top"><div align="center">'+
'      <p class="footer">CTBP -- UC San Diego, MC 0374 -- 9500 Gilman Drive --'+
'        La Jolla, CA 92093-0374<br>'+
'  858-822-1296 -- 858-534-7697 (fax) -- <a href="mailto:'+decrypt('qYjS','1234')+'@ucsd.edu">'+decrypt('qYjS','1234')+'@ucsd.edu</a><br>'+
'  Copyright &copy; 2002-'+d.getFullYear()+' by the Regents of the University of California.<br>'+
' CTBP is a National Science Foundation Physics Frontiers Center (award no. PHY-0822283) co-funded by the Directorate for Mathematics & Physical Sciences (Condenced Matter and Materials Theory, '+
'  and PFC programs), and the Directorate for Biological Sciences (Division of Molecular and Cellular Biology). '+
'  <br>'+
'</p>'+
'      <p class="footer" style="margin-bottom: 0;">&nbsp;      </p>'+
'    </div></td>'+
'  </tr>'+
'</table>'+
'<p>&nbsp;</p>'+
'<p>&nbsp;</p>'+
'<map name="Map">'+
'<area shape="rect" coords="663,3,714,63" href="http://www.nsf.gov" target="_blank" alt="National Science Foundation">'+
'<area shape="rect" coords="14,10,510,89" href="http://ctbp.ucsd.edu/" alt="CTBP Home Page">'+
'</map>');

function mmLoadMenus() {
  if (window.mm_menu_0002084446_0) return;
  window.mm_menu_0002084446_0 = new Menu("root",75,18,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#660099","#330066","left","middle",4,0,700,-5,7,true,true,true,0,false,true);
  mm_menu_0002084446_0.addMenuItem("Mission","location='http://ctbp.ucsd.edu/mission.html'");
  mm_menu_0002084446_0.addMenuItem("People","location='http://ctbp.ucsd.edu/people.php'");
  mm_menu_0002084446_0.addMenuItem("Partners","location='http://ctbp.ucsd.edu/partners.html'");
  mm_menu_0002084446_0.addMenuItem("Resources","location='http://ctbp.ucsd.edu/resources.html'");
  mm_menu_0002084446_0.addMenuItem("Contacts","location='http://ctbp.ucsd.edu/contacts.html'");
/*  mm_menu_0002084446_0.addMenuItem("Suggestions","location='http://ctbp.ucsd.edu/misc/suggestions.php'"); */
   mm_menu_0002084446_0.fontWeight="bold";
   mm_menu_0002084446_0.hideOnMouseOut=true;
   mm_menu_0002084446_0.menuBorder=1;
   mm_menu_0002084446_0.menuLiteBgColor='#666666';
   mm_menu_0002084446_0.menuBorderBgColor='#666666';
   mm_menu_0002084446_0.bgColor='#666666';
  window.mm_menu_0002085210_1 = new Menu("root",181,18,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#660099","#330066","left","middle",4,0,700,-5,7,true,true,true,0,true,true);
 
  mm_menu_0002085210_1.addMenuItem("Cellular Tectonics","location='http://ctbp.ucsd.edu/molecular_biophysics.html'");
  mm_menu_0002085210_1.addMenuItem("Gene Regulatory Networks","location='http://ctbp.ucsd.edu/statistical_biophysics.html'");
  mm_menu_0002085210_1.addMenuItem("Cell Communication","location='http://ctbp.ucsd.edu/biodynamics.html'");
  mm_menu_0002085210_1.addMenuItem("Research&nbsp;Opportunities","location='http://ctbp.ucsd.edu/research_opps.html'");
   mm_menu_0002085210_1.addMenuItem("Research Resources","location='http://ctbp.ucsd.edu/resources.html'");
   mm_menu_0002085210_1.fontWeight="bold";
   mm_menu_0002085210_1.hideOnMouseOut=true;
   mm_menu_0002085210_1.menuBorder=1;
   mm_menu_0002085210_1.menuLiteBgColor='#666666';
   mm_menu_0002085210_1.menuBorderBgColor='#666666';
   mm_menu_0002085210_1.bgColor='#666666';
  window.mm_menu_0002085807_2 = new Menu("root",138,18,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#660099","#330066","left","middle",4,0,700,-5,7,true,true,true,0,false,true);
 // mm_menu_0002085807_2.addMenuItem("Instructional&nbsp;Modules","location='http://ctbp.ucsd.edu/learning_modules.html'");
  mm_menu_0002085807_2.addMenuItem("Curriculum","location='http://ctbp.ucsd.edu/curriculum.html'");
  mm_menu_0002085807_2.addMenuItem("Workshops/Schools","location='http://ctbp.ucsd.edu/workshops/workshops.html'");
  mm_menu_0002085807_2.addMenuItem("Research&nbsp;Opportunities","location='http://ctbp.ucsd.edu/research_opps.html'");
    mm_menu_0002085807_2.addMenuItem("Education&nbsp;Highlights","location='http://ctbp.ucsd.edu/ed_highlights.html'");
   mm_menu_0002085807_2.fontWeight="bold";
   mm_menu_0002085807_2.hideOnMouseOut=true;
   mm_menu_0002085807_2.menuBorder=1;
   mm_menu_0002085807_2.menuLiteBgColor='#666666';
   mm_menu_0002085807_2.menuBorderBgColor='#666666';
   mm_menu_0002085807_2.bgColor='#666666';
    window.mm_menu_0002090053_3 = new Menu("root",120,18,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#660099","#330066","left","middle",4,0,700,-5,7,true,true,true,0,false,true);
  mm_menu_0002090053_3.addMenuItem("Seminars","location='http://ctbp.ucsd.edu/seminars/'");
/*  mm_menu_0002090053_3.addMenuItem("Colloquia","location='http://ctbp.ucsd.edu/colloquia.html'"); */
  mm_menu_0002090053_3.addMenuItem("Journal&nbsp;Club","location='http://ctbp.ucsd.edu/journalclub/index.php'");  
  mm_menu_0002090053_3.addMenuItem("Group&nbsp;Meetings","location='http://ctbp.ucsd.edu/groupmeetings.html'");
/*  mm_menu_0002090053_3.addMenuItem("Community","location='http://ctbp.ucsd.edu/community_events.html'");*/
   mm_menu_0002090053_3.fontWeight="bold";
   mm_menu_0002090053_3.hideOnMouseOut=true;
   mm_menu_0002090053_3.bgColor='#666666';
   mm_menu_0002090053_3.menuBorder=1;
   mm_menu_0002090053_3.menuLiteBgColor='#666666';
   mm_menu_0002090053_3.menuBorderBgColor='#666666';

	//Publications menu
	// window.mm_menu_0002090321_4 = new Menu("root",119,18,"Arial, Helvetica, sans-serif",10,"#ffffff","#ffffff","#660099","#330066","left","middle",4,0,700,-5,7,true,true,true,0,false,true);
	// 			mm_menu_0002090321_4.addMenuItem("Recent&nbsp;Publications","location='http://ctbp.ucsd.edu/pubs/'");
	// 			mm_menu_0002090321_4.addMenuItem("Archived&nbsp;Publications","location='http://ctbp.ucsd.edu/pubs/?a=1'");
	// 			mm_menu_0002090321_4.fontWeight="bold";
	// 			mm_menu_0002090321_4.hideOnMouseOut=true;
	// 			mm_menu_0002090321_4.menuBorder=1;
	// 			mm_menu_0002090321_4.menuLiteBgColor='#666666';
	// 			mm_menu_0002090321_4.menuBorderBgColor='#666666';
	// 			mm_menu_0002090321_4.bgColor='#666666';
			
				mm_menu_0002090053_3.writeMenus();
}

mmLoadMenus();

document.write('</body></html>');
