/* Version information:   * Version: $Revision: 1.4.2.1 $   */var divs= new Array("sectionHeadings");var doTimeout=false;var visible='';var hidden='';if (document.layers) {	visible = 'show';	hidden = 'hide';} else if (document.all) {	visible = 'visible';	hidden = 'hidden';}else if(document.getElementById){	visible = 'visible';	hidden = 'hidden';}function popMenu(theDiv){	adjustNav();	doTimeout=true;	popOffMenu();		if (document.layers) 		document.layers[theDiv].visibility=visible;			else if(document.getElementById)  		document.getElementById(theDiv).style.visibility=visible;  		  	else if (document.all)     		daMenu = document.all(theDiv).style.visibility = visible;    			doTimeout=false;}function popOffMenu(){	if(doTimeout)	{		var i=0;		for(i=0;i<divs.length;i++)		{			if (document.layers) 				document.layers[divs[i]].visibility=hidden;			else if(document.getElementById)				document.getElementById(divs[i]).style.visibility=hidden;			else if (document.all) 				daMenu = document.all(divs[i]).style.visibility = hidden;		}	}}function popOffTime(){	doTimeout=true;	setTimeout('popOffMenu()', 500);}function getRealLeft(imgElem) {	xPos = eval(imgElem).offsetLeft;	tempEl = eval(imgElem).offsetParent;  	while (tempEl != null) {  		xPos += tempEl.offsetLeft;  		tempEl = tempEl.offsetParent;  	}	return xPos;}function getRealTop(imgElem) {	yPos = eval(imgElem).offsetTop;	tempEl = eval(imgElem).offsetParent;	while (tempEl != null) {  		yPos += tempEl.offsetTop;  		tempEl = tempEl.offsetParent;  	}	return yPos;}function adjustNav(){	var img=document.getElementById('navImage');		if(img!=null)	{		var x=getRealLeft(img);		var y=getRealTop(img);		var div=document.getElementById('sectionHeadings');		div.style.left=x;		div.style.top=y+18;	}}function hoverLink(parent){	var anchors = parent.childNodes;		for(var i=0;i<anchors.length;i++)	{		var anchor = anchors[i];				if(anchor.tagName=="A")			anchor.style.color = '#FFFFFF';				if(anchor.childNodes.length>0)			hoverLink(anchor);	}		parent.style.bgcolor = '#548FC7';	parent.style.background = '#548FC7';}function unHoverLink(parent){	var anchors = parent.childNodes;		for(var i=0;i<anchors.length;i++)	{		var anchor = anchors[i];				if(anchor.tagName=="A")			anchor.style.color = '#333333';				if(anchor.childNodes.length>0)			unHoverLink(anchor);	}		parent.style.bgcolor = '#f4f4f4';	parent.style.background = '#f4f4f4';}
function toggleInput(field){	if(field.disabled==true)		field.disabled=false;	else		field.disabled=true;	return true;}

function popupWindow(url) {
  popupWindow(url, 100, 100);
}
function popupWindow(url, width, height) {
  window.open(url,'popupWindow','toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+width+',height='+height+',screenX=150,screenY=150,top=150,left=150')
}

function emailHider(left_array, right_array, linkText, altText)
{
	TheDomain = '';
	for(var i=0;i<right_array.length;i++)
	{
		if(i>0)
		{
			TheDomain += '.';
		}
		TheDomain += right_array[i];
	}
	
	TheName = '';
	for(var i=0;i<left_array.length;i++)
	{
		if(i>0)
		{
			TheName += '.';
		}
		TheName += left_array[i];
	}
	
	TheAddress = TheName+'@'+TheDomain;
	
	document.write('<a class="navig8" href="mailto:' + TheAddress + '" title="'+altText+'">' + (linkText == '' ? TheAddress : linkText) + '</a>')
}

function powMod(n,e,m) {
   if (m == 0 || e < 0)
      return 0;

   res = 1;
   pow = n;
   e1  = e;
   while (e1 != 0)
   {
      d   = e1%2;
      e1  = Math.floor(e1/2);
      if (d == 1)
         res = (res*pow)%m;
      pow = (pow*pow)%m;
   }

   if (res < 0)
      res += m;

   return res;
}

function push(parts, d, n)
{
	var location='';
	
	for(i=0;i<parts.length;i++)
		location+=String.fromCharCode(powMod(parts[i], d, n));
		
	window.location='mailto:'+location;
}

function get(parts, d, n)
{
	var add='';
	
	for(i=0;i<parts.length;i++)
		add+=String.fromCharCode(powMod(parts[i], d, n));
		
	document.write(add);

}
