
function show_tip(event, div_text) {

    div_html = div_text

	if (div_text.slice(0, 3) == "PDF") {
	    div_html = "Click to view a larger version of this image.<BR>PDF file size: "
		pdf_size_start = div_text.search(":") + 1
		pdf_size_end = div_text.search(";")
		pdf_size = div_text.slice(pdf_size_start, pdf_size_end)
		div_html = div_html + pdf_size + "<BR>&nbsp;<BR>"
		div_html = div_html + '<I>To view this PDF file, you need the Adobe Acrobat Reader.</I><BR>'
		div_html = div_html + '<I>Go to the bottom of this page for more information.</I>'
	}

	if (div_text.slice(0, 3) == "GIF") {
	    div_html = "Click to view a larger version of this image.<BR>GIF file size: "
		pdf_size_start = div_text.search(":") + 1
		pdf_size_end = div_text.search(";")
		pdf_size = div_text.slice(pdf_size_start, pdf_size_end)
		div_html = div_html + pdf_size 
	}

	if (div_text.slice(0, 3) == "JPG") {
	    div_html = "Click to view a larger version of this image.<BR>JPG file size: "
		pdf_size_start = div_text.search(":") + 1
		pdf_size_end = div_text.search(";")
		pdf_size = div_text.slice(pdf_size_start, pdf_size_end)
		div_html = div_html + pdf_size 
	}


	if (document.all) {

		tooltip.innerHTML = div_html

		if (event.clientY + tooltip.offsetHeight > document.body.offsetHeight - tooltip.offsetHeight ) {
			tooltip.style.top = event.clientY + document.body.scrollTop - tooltip.offsetHeight - 10
		} else {
			tooltip.style.top = event.clientY + document.body.scrollTop + 30
		}

		if (event.clientX > document.body.offsetWidth - tooltip.offsetWidth ) {
			tooltip.style.left = event.clientX - tooltip.offsetWidth
		} else {
			tooltip.style.left = event.clientX + 20
		}
		tooltip.style.visibility = 'visible'
	}

	if (document.layers) {
	
	
		document.layers["tooltip_ns"].document.open()
		document.layers["tooltip_ns"].document.write('<TABLE BGCOLOR="#FFFFCC" BORDER="1" CELLSPACING="0" CELLPADDING="4"><TR> ')
		document.layers["tooltip_ns"].document.write('<TD><FONT STYLE="font-size: 9pt; font-family: arial, helvetica, sans-serif; color: #000000;">')
		document.layers["tooltip_ns"].document.write(div_html)
		document.layers["tooltip_ns"].document.write('</TR></TABLE>')
		document.layers["tooltip_ns"].document.close()


		
		if (event.pageY + document.layers["tooltip_ns"].document.height + 20 > innerHeight) {
			document.layers["tooltip_ns"].top = event.layerY - 35
		} else {
			document.layers["tooltip_ns"].top = event.layerY + 20 
		}

		if (event.pageX + document.layers["tooltip_ns"].document.width + 20 > innerWidth) {
			document.layers["tooltip_ns"].left = innerWidth - document.layers["tooltip_ns"].document.width - 20
		} else {
			document.layers["tooltip_ns"].left = event.pageX + 20 
		}
		document.layers["tooltip_ns"].visibility = 'show'
	}

	
	
}





function hide_tip() {

	if (document.all) {
		tooltip.style.visibility = 'hidden'
		tooltip.innerText = ' '
		tooltip.style.top = 1
		tooltip.style.left = 1
	}

	if (document.layers) {
		document.layers["tooltip_ns"].visibility = 'hide'
	}

}

