// JavaScript Document

<!-- Rollover -->
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

<!-- Jump Menues -->
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}


// My functions to jump

function land(ref,target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self"){window.location=loc;}
else {if (lowtarget=="_top"){top.location=loc;}
else {if (lowtarget=="_blank"){window.open(loc);}
else {if (lowtarget=="_parent"){parent.location=loc;}
else {parent.frames[target].location=loc;};
}}}
}
function jump(menu)
{
ref=menu.qlinks.options[menu.qlinks.selectedIndex].value;
splitc=ref.lastIndexOf("*");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_blank";};
if (ref != ""){land(loc,target);}
}

//Common JavaScript Functions
    
<!-- Hide script from old browsers
 var leftPos = 0
	if (screen) {
		leftPos = screen.width-650;
	}

function openPopUpWindow(url) {
        var newWindow = window.open(url, 'newWin', 'width=600,height=600, left='+leftPos+',top=0');
        }
        
function openNewWindow(url, w, h, lp) {
		if (screen) {
		lp = screen.width-lp;
	}
        var newWindow = window.open(url, 'newWin', 'width='+w+',height='+h+', left='+leftPos+',top=0');
        }
		
function openPubMed(url) {
        var newWindow = window.open(url, 'newWin', 'width=400,height=400, left='+leftPos+',top=0');
        }
        
function updateParent(url) {
	opener.document.location = url;
      window.close();
	}

function closeParent(){
    window.opener.close();
    window.close();
}

    var left = 0
	if (screen) {
		left = screen.width-820
                
	}
        function showPmid(url) {
         newWindow = window.open(url, 'newWin', 'width=810,height=300, left='+left+',top=50')
       }


function LookupEmail() {
    var base, param;
    base = 'lookupEmail.pl?email=';
    param = document.Search.Email.value;
    if (param == ""){
    param='%';
    }    
    lookup = base+param;
    //clean up form
    document.Search.Email.value = "";
    javascript:openWindow(lookup, 'right');
}


        
// End hiding script from old browsers -->
        

//Functions to hid and show

function a(container_id, text)
{
DIVID ++;
var container = document.getElementById(container_id);
var div_id = "el_"+DIVID;
var new_div = document.createElement('div');
new_div.setAttribute("id", div_id);
//var htm = "Divider Number "+div_id ;
//htm = htm + " <input type=\"button\" value= \" - \" ";
//htm = htm + "onclick=\"r(\'"+container_id+"\'  ,  \'"+div_id+"\')\">"; 
//new_div.innerHTML = htm;
new_div.innerHTML = text;
container.appendChild(new_div);
}

function r(container_id, div_id){
var container = document.getElementById(container_id);
container.removeChild(document.getElementById(div_id));
}


<!-- 
// toggle visibility 

function toggle(id, show) {
	if (el = document.getElementById(id)) {
		if (null==show) show = el.style.display=='none';
		el.style.display = (show ? '' : 'none');
	}
}

function t(id_1, id_2){
	el_1 = document.getElementById(id_1);
	el_2 = document.getElementById(id_2);
	
	el_1.style.display = 'none';
	el_2.style.display = 'block'; 
}



function tabs(id_1, id_2){
    var layers = new Array('Layer1', 'Layer2', 'Layer3', 'Layer4', 'Layer5');
	var tabs = new Array('Tab1', 'Tab2', 'Tab3', 'Tab4', 'Tab5');
	var tabs_class = new Array('Tab1_Off', 'Tab2_Off', 'Tab3_Off', 'Tab4_Off', 'Tab5_Off');
	
	for (var i=0; i<layers.length; i++){
	document.getElementById(layers[i]).style.display = 'none';	
	document.getElementById(tabs[i]).className = tabs_class[i];
	}

//		document.getElementById('Tab3').className = 'Tab3_On';
	
	el_1 = document.getElementById(id_1);
	el_1.style.display = 'block';

	if(id_2 == 'Tab1'){
	document.getElementById('Tab1').className = 'Tab1_On';
	}

	if(id_2 == 'Tab2'){
	document.getElementById('Tab2').className = 'Tab2_On';
	}
	
		if(id_2 == 'Tab3'){
	document.getElementById('Tab3').className = 'Tab3_On';
	}
	
		if(id_2 == 'Tab4'){
	document.getElementById('Tab4').className = 'Tab4_On';
	}
	
	if(id_2 == 'Tab5'){
	document.getElementById('Tab5').className = 'Tab5_On';
	}

}

//-->

