
loadTools = function(){
var imageHost = "http://www.stthomas.edu"

if ("https:" == document.location.protocol) {
	imageHost = "https://www.stthomas.edu"
}

var tools = [
		// col 1
		[
			{
				"description":{"longDesc":"Bringing your life at UST together","shortDesc":"Portal"},
				"link":"http:\/\/portal.stthomas.edu",
				"image":{"src":"common\/images\/tool_portal.gif","alt":"Portal Icon"}
			},
			{
				"description":{"longDesc":"Access your web-based e-mail","shortDesc":"Email"},
				"link":"https:\/\/mail.stthomas.edu",
				"image":{"src":"common\/images\/tool_mail.gif","alt":"Email Icon"} 
			}, 
			{
				"description":{"longDesc":"Access course &amp; community sites","shortDesc":"Blackboard (MyUST)"},
      
"link":"http:\/\/blackboard.stthomas.edu",
				"image":{"src":"common\/images\/tool_bb.gif","alt":"Blackboard Logo"}
			},
			{
				"description":{"longDesc":"Register &amp; manage classes","shortDesc":"MURPHY Online"},
				"link":"https:\/\/banner.stthomas.edu\/",
				"image":{"src":"common\/images\/tool_murphy.gif","alt":"Folder Icon"}}
				,
			{
				"description":{"longDesc":"Online alumni network","shortDesc":"The Quad"},
				"link":"http:\/\/alumni.stthomas.edu\/",
				"image":{"src":"common\/images\/tool_quad.gif","alt":"Quad Icon"}
			},
			{
				"description":{"longDesc":"Search for classes","shortDesc":"Class Finder"},
				"link":"http:\/\/www.stthomas.edu\/classes\/index.asp",
				"image":{"src":"common\/images\/tool_classfinder.gif","alt":"Magnifying Glass Icon"}
			}
		],
		// col 2
		[
			{
				"description":{"longDesc":"Search the UST Libraries","shortDesc":"Libraries"},
				"link":"http:\/\/www.stthomas.edu\/libraries\/",
				"image":{"src":"common\/images\/tool_libraries.gif","alt":"Key Icon"}
			},
			{
				"description":{"longDesc":"Change your username or password","shortDesc":"Manage Your Net ID & Password"},
				"link":"http:\/\/www.stthomas.edu\/password\/",
				"image":{"src":"common\/images\/tool_password.gif","alt":"Key Icon"}
			},
			{	
				"description":{"longDesc":"Buy books and merchandise online","shortDesc":"Bookstore"},
				"link":"http:\/\/tommiebooks.stthomas.edu\/",
				"image":{"src":"common\/images\/tool_bookstore.gif","alt":"Book Icon"}
			},
			{
				"description":{"longDesc":"Get event tickets &amp; rent equipment","shortDesc":"Box Office &amp; Expeditions"},
				"link":"http:\/\/www.stthomas.edu\/boxoffice\/",
				"image":{"src":"common\/images\/tool_boxoffice.gif","alt":"Ticket Icon"}
			},
			{
				"description":{"longDesc":"Faculty and staff development sessions","shortDesc":"Leadership Academy"},
				"link":"http:\/\/www.stthomas.edu\/leadership\/",
			 	"image":{"src":"common\/images\/tool_leadership.gif","alt":"Leadership Icon"}
			},
			{
				"description":{"longDesc":"Report your planned vacation days","shortDesc":"Vacation Reporting"},
				"link":"https:\/\/banner.stthomas.edu\/",
				"image":{"src":"common\/images\/tool_vacation.gif","alt":"Palm Tree Icon"}
			}
		],
		
		// col 3
		[
			{
				"description":{"longDesc":"Employment opportunities at UST","shortDesc":"Jobs at UST"},
				"link":"http:\/\/www.stthomas.edu\/jobsatust",
				"image":{"src":"common\/images\/tool_jobs.gif","alt":"People Icon"}
			},
			{
				"description":{"longDesc":"Access institutional data and reports","shortDesc":"Cognos BI"},
				"link":"https:\/\/biprod.stthomas.edu\/",
				"image":{"src":"common\/images\/tool_reportnet.gif","alt":"Graph Icon"}
			},
			{
				"description":{"longDesc":"Access our data warehouse","shortDesc":"Internet Native Banner"},
				"link":"http:\/\/www.stthomas.edu\/irt\/support\/enterprise\/login.html",
				"image":{"src":"common\/images\/tool_banner.gif","alt":"DatabaseSymbol"}
			},
			{
				"description":{"longDesc":"Enterprise document management","shortDesc":"Optix"},
				"link":"https:\/\/optixweb.stthomas.edu\/optix-web\/Logon.jsp",
				"image":{"src":"common\/images\/tool_optix.gif","alt":"Paper Icon"}
			},
			{
				"description":{"longDesc":"Manage job searches","shortDesc":"Talent Management System"},
				"link":"https:\/\/jobs.stthomas.edu\/userfiles\/jsp\/shared\/frameset\/Frameset.jsp",
				"image":{"src":"common\/images\/tool_talent.gif","alt":"Briefcase Icon"}
			},
			{
				"description":{"longDesc":"Make requests of central services","shortDesc":"Request for Services"},
				"link":"https:\/\/webapp.stthomas.edu\/RFS\/",
				"image":{"src":"common\/images\/tool_rfs.gif","alt":"Clipboard Icon"}
			}
		]
	]
	
	// loop through each tool menu (each will be a UL)
	 
	$('appeartools').update('<div class="long_headline"><h3>Tools</h3></div>')
	for (var i = 0; i < tools.length; ++i){
		var ul = document.createElement('ul')
		ul.className = 'col1'
		for (var j = 0; j < tools[i].length; ++j){
			var li = document.createElement('li')
			var a = document.createElement('a')
			
			var tool = tools[i][j]
			a.href = tool.link
			
			
			var img = document.createElement('img')
			img.src = imageHost + "/" + tool.image.src
			img.alt = tool.image.alt
			
			var description = document.createElement('span')
			description.className = 'description'
			var shortDescription = document.createElement('em')
			$(shortDescription).update(tool.description.shortDesc)
			var longDescription = document.createElement('span')
			$(longDescription).update(tool.description.longDesc)
			
	 		
			// create DOM tree
			li.appendChild(a)
			a.appendChild(img)
			description.appendChild(shortDescription)
			description.appendChild(longDescription)
			a.appendChild(description)
			ul.appendChild(li)
		}
		$('appeartools').appendChild(ul) 
		
	} 
}
Event.observe(window, 'load', loadTools)
