var aboutbutton = new Image();
aboutbutton.src="about.jpg";
var aboutbuttonh = new Image();
aboutbuttonh.src="about_hover.jpg";
var technologybutton = new Image();
technologybutton.src="technology.jpg";
var technologybuttonh = new Image();
technologybuttonh.src="technology_hover.jpg";
var applicationbutton = new Image();
applicationbutton.src="application.jpg";
var applicationbuttonh = new Image();
applicationbuttonh.src="application_hover.jpg";
var approachbutton = new Image();
approachbutton.src="approach.jpg";
var approachbuttonh = new Image();
approachbuttonh.src="approach_hover.jpg";
var contactbutton = new Image();
contactbutton.src="contact.jpg";
var contactbuttonh = new Image();
contactbuttonh.src="contact_hover.jpg";

function revertAll() {
	document.getElementById('aboutbutton').src=aboutbutton.src;
	document.getElementById('technologybutton').src=technologybutton.src;
	document.getElementById('applicationbutton').src=applicationbutton.src;
	document.getElementById('approachbutton').src=approachbutton.src;
	document.getElementById('contactbutton').src=contactbutton.src;
}

function thisPage(name) {
	switch(name) {
		case "about":
			aboutbutton.src="about_page.jpg";
			break;
		case "technology":
			technologybutton.src="technology_page.jpg";
			break;
		case "application":
			applicationbutton.src="application_page.jpg";
			break;
		case "approach":
			approachbutton.src="approach_page.jpg";
			break;
		case "contact":
			contactbutton.src="contact_page.jpg";
			break;
	}
}

function switchImages(image) {
	revertAll();
	switch(image) {
	case 0:
		document.getElementById('aboutbutton').src=aboutbuttonh.src;
		break;
	case 1:
		document.getElementById('technologybutton').src=technologybuttonh.src;
		break;
	case 2:
		document.getElementById('applicationbutton').src=applicationbuttonh.src;
		break;
	case 4:
		document.getElementById('approachbutton').src=approachbuttonh.src;
		break;
	case 3:
		document.getElementById('contactbutton').src=contactbuttonh.src;
		break;
	}
}
