<!--
var CONST_LOCATION = "/ucsc/";
var modifiedStatus = false;
var formFocus = false;
var checkModifiedMessage = 'You may have changed page content without saving. \nClick OK to continue without saving (any changes will be lost), \nor cancel to go back and click save.'
if(document.images){

  //basketOff =new Image();  basketOff.src= CONST_LOCATION +"images/basket_off.gif";
  //basketOn =new Image();  basketOn.src= CONST_LOCATION +"images/basket_over.gif";
	
  //findBrowseOff =new Image();  findBrowseOff.src= CONST_LOCATION + "images/find_browse_off.gif";
  //findBrowseOn =new Image();  findBrowseOn.src= CONST_LOCATION + "images/find_browse_over.gif";

  //findSearchOff =new Image();  findSearchOff.src= CONST_LOCATION + "images/find_search_off.gif";
  //findSearchOn =new Image();  findSearchOn.src= CONST_LOCATION + "images/find_search_over.gif";

    emailUserNameOff =new Image();  emailUserNameOff.src= CONST_LOCATION + "images/nav/buttons/forms/email_user_name_off.gif";
    emailUserNameOn =new Image();  emailUserNameOn.src= CONST_LOCATION + "images/nav/buttons/forms/email_user_name_over.gif";
  
}



function changeImg(imgNam, onoff){
	if(document.images){	
		if (onoff == 'on')
                    onoff = 'On';
                else if (onoff == 'off')
                    onoff = 'Off';
                else if (onoff == 'over')
                    onoff = 'On';
		document.images[imgNam].src=eval(imgNam+onoff+'.src');
	}
}



function changeImg1(imgNam, imgSrc, onoff){
	if (document.images) {
		document.images[imgNam].src=eval(imgSrc+onoff+'.src');
	}
}

  
function hyperlinkjump(form) {
  parent.refresh;
  var myindex=form.quickinfo.selectedIndex
  if (myindex==0) return false;
  if (form.quickinfo.options[myindex].value.indexOf("http://")!=-1) {
    form.target="_blank";
  } else {
    form.target="_self";
  }
  if (form.quickinfo.options[myindex].value!="") {
    form.action=form.quickinfo.options[myindex].value;
    form.submit();
    return true;
  }
  return false;
}

// side menu arrow bullets

function act(imgName) {
  if (document.images)
     document.images[imgName.name].src = linkon.src;
}

function inact(imgName) {
  if (document.images)
     document.images[imgName.name].src = linkoff.src;
}    

var popF;
function centeredPopup(page, popWidth, popHeight, close_only, properties) {

  if (properties==null) { properties=",resizable=yes,scrollbars=yes,toolbar=no,menubar=no,location=no,top="}
	if ( popF && !popF.closed && popF.close ) {
		popF.close();
	}
	if ( !close_only ) {
		if (popWidth==null) { popWidth=400 }
		if (popHeight==null) { popHeight=400 }
 	    winX=(screen.width-popWidth)/2
	    winY=(screen.height-popHeight)/2      
      popF = window.open(page, "Window", "width="+ popWidth + ",height=" + popHeight + properties +winY+",left="+winX);
  } 
}

function create() {
        this.width = ''
        this.height = ''
        this.src = ''
        this.href = ''
        this.border = ''
        this.mouseover = ''
        this.sponsor = ''
}



function setModifiedStatus() {
  modifiedStatus = true
}

function checkModifiedStatus() {
  if (formFocus==false) {
    return true;
  }
  if (modifiedStatus==true) {
    if (confirm(checkModifiedMessage)) {
      return true;
    }
    return false;
  }

}  

// JavaScript Document
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];}
}

function initFormFocus(formNumber) {
  if (formFocus==true) {
    if (document.forms[formNumber]!=null) {
      for(i=0;i<document.forms[formNumber].elements.length;i++) {
          document.forms[formNumber].elements[i].onfocus=setModifiedStatus;
      }
    }
  }
}
//-->
