var optionsTotal
optionsTotal = 10;

var docArray = new Array('Document#1','Document#2','Document#3','Document#4','Document#5','Document#6','Document#7','Document#8','Document#9','Document#10')
var docTypeArray = new Array('Excel','PPT','Word','PDF','PDF','Excel','PPT','Word','PDF','PDF')
var docSizeArray = new Array('54k','12k','11k','64k','64k','54k','12k','11k','64k','64k')
var docFileArray = new Array('www1','www2','www3','www4','www5','www1','www2','www3','www4','www5')

// drawing function

function drawDocuments (){

document.write("<div id='docLayer' style='position:absolute; width:200px; height:115px; z-index:1; left: 650px; top: 110px; visibility: hidden;'>")

// write out the table

var tableOpen = '<table width=100% border=0 bgcolor=ffffcc class=sectionColumn>'
var outerTableOpen = '<table width=150 border=0 bgcolor=ffff33 cellspacing=2>'
var tableClose = '</table>'

// outer table

document.write(outerTableOpen + "<tr><td>")

// write the title of the box

document.write("<span class='sectionColumn'>")
document.write("<b>Document downloads</b></span>")

// write the inner table for the content

document.write(tableOpen)

for (x=0; x<optionsTotal; x++){
	
	if (x == whichPage){ document.write("<tr class='thisPage'>") } else { document.write("<tr>") }
		
	document.write("<td>")

	document.write(docArray[x])
	document.write("</td><td>")

// write out the href
	document.write("<a href='" + docFileArray[x] + "'")
	
	if (x == whichPage){ document.write(" class='thisPage'") }
		
	document.write(">")

// write out the image

// check for index.html - if so (whichpage = 100), need to change the image directory

if (whichPage == 100) { 	document.write("<img src='fileadmin/template/obbard/images/") } else { document.write("<img src='../images/") }

	document.write("icon" + docTypeArray[x] + ".gif' border=0 alt='"+ docTypeArray[x] + "'>")
	document.write(" " + docSizeArray[x])
	document.write("</a>")

	document.write("</td></tr>")
	
	}
	
// close the inner table
document.write(tableClose)

// write the close script
document.write("<span class='sectionColumn'>")
document.write("<i><a href=# onClick=MM_showHideLayers('docLayer','','hide')>Close [x]</i></span>")

// close the outer table
document.write("</td></tr>" + tableClose)

document.write("</span>")

document.write("</div>")
	
}