/* This creates the footer sections for all pages (Problem Sets)
*/

var butPath = '../../buttons/'
var opt = new Array(2)	// filename for each problem-set 'go-to-home button'
var lnk = new Array(2)	// link for each problem-set homepage
var but = new Array(3)	// for buttons common to all problem sets
var lnk0 = new Array(3)
var alt = new Array(3)	

opt[1] = butPath+'dna_forensics_problems.gif'  // 1 = DNA_forensics_1
lnk[1] = 'DNA_forensics.html'
opt[2] = opt[1]		// 2 = DNA_forensics_2
lnk[2] = lnk[1]

alt[0] = 'P&aacute;g.ini.'

but[1] = butPath+'human_bio.gif'		// Human Biology
lnk0[1] = '../../human_bio.html'
alt[1] = 'Biol.Humana'
but[2] = butPath+'vocabulary.gif'
lnk0[2] = 'http://www.biology.arizona.edu/vocabulary/vocabulary.html'
alt[2] = 'Vocabulario'
but[3] = butPath+'the_biology_project.gif'
lnk0[3] = '../../../default.html'
alt[3] = 'Proyecto Biol&oacute;gico'

function buttons(curr) {
	// 'curr' is current section numeric ID
var tex ='<center>'

// second row of buttons (general navigation links):

// problem set home:
if (fName().length<4) {
	// filenames are long only for home page, then omit home button
	tex += "<a href='" + lnk[curr] + "'><img src='" + opt[curr] + "' border=0 alt='["
	tex += alt[0] + "]'></a>&nbsp;"
}
// section home; vocabulary home; Biol.Project home:
for (var i=1;i<=3;i++) {
	tex += "<a href='" + lnk0[i] + "'><img src='" + but[i] + "' border=0 alt='["
	tex += alt[i] + "]'></a>&nbsp;"
	}

tex += '</center>'
document.write(tex)

/*
tex = ""

tex += '<br><hr>'

tex += '<a href="http://www.biologia.arizona.edu/default.html">El Proyecto Biol&oacute;gico</a>'
tex += '<br>University of Arizona<br>Revised: October 27, 2000'
tex += '<br>Traducido: Marzo 2004<br>'
tex += '<a href="http://www.biology.arizona.edu/contact/">Contact the Development Team</a>'
tex += '<br>http://www.biologia.arizona.edu<br>All contents copyright &copy; 1996 - 2004.'
tex += ' All rights reserved.<br>'
tex += '<a href="credits.html">Cr&eacute;ditos</a>'

tex += '</font></center>'
document.write(tex)
*/

document.close()
}


// extracts current page filename (without path or extension)
function fName() {
var url1 = window.location.pathname
var path1 = url1.substring(0,url1.lastIndexOf("/"))	// path only
var filename1 = url1.substring (path1.length+1, url1.lastIndexOf("."))	// filename only
return filename1
}
