// JavaScript Document

function UI_Init() {

	/* event bindings for navigation menu */	
	
	if (document.location.href.search(/home/) == -1) {
		document.getElementById("home").onmouseover = function() { document.images.home.src = document.images.home.src.replace(/_/,"-ov_"); }
		document.getElementById("home").onmouseout = function() { document.images.home.src = document.images.home.src.replace(/-ov/,""); }
		document.getElementById("home").className = "click";
		document.getElementById("home").onclick = function () { document.location.href='index.html'; }
	}
	else {
		document.images.home.src = document.images.home.src.replace(/_/,"-ov_");
	}
	
	if (document.location.href.search(/about/) == -1) {
		document.getElementById("aboutus").onmouseover = function() { document.images.aboutus.src = document.images.aboutus.src.replace(/_/,"-ov_"); }
		document.getElementById("aboutus").onmouseout = function() { document.images.aboutus.src = document.images.aboutus.src.replace(/-ov/,""); }
		document.getElementById("aboutus").className = "click";
		document.getElementById("aboutus").onclick = function () { document.location.href='about_stagetime.html'; }
	}
	else {
		document.images.aboutus.src = document.images.aboutus.src.replace(/_/,"-ov_");
	}
	
	if (document.location.href.search(/camp/) == -1) {
		document.getElementById("camp").onmouseover = function() { document.images.camp.src = document.images.camp.src.replace(/_/,"-ov_"); }
		document.getElementById("camp").onmouseout = function() { document.images.camp.src = document.images.camp.src.replace(/-ov/,""); }
		document.getElementById("camp").className = "click";
		document.getElementById("camp").onclick = function () { document.location.href='camp.html'; }
	}
	else {
		document.images.camp.src = document.images.camp.src.replace(/_/,"-ov_");
	}
	
	if (document.location.href.search(/registration/) == -1) {
		document.getElementById("registration").onmouseover = function() { document.images.registration.src = document.images.registration.src.replace(/_/,"-ov_"); }
		document.getElementById("registration").onmouseout = function() { document.images.registration.src = document.images.registration.src.replace(/-ov/,""); }
		document.getElementById("registration").className = "click";
		document.getElementById("registration").onclick = function () { document.location.href='stagetime_registration.html'; }
	}
	else {
		document.images.registration.src = document.images.registration.src.replace(/_/,"-ov_");
	
	}
	
	if (document.location.href.search(/contact/) == -1) {
		document.getElementById("contact").onmouseover = function() { document.images.contact.src = document.images.contact.src.replace(/_/,"-ov_"); }
		document.getElementById("contact").onmouseout = function() { document.images.contact.src = document.images.contact.src.replace(/-ov/,""); }
		document.getElementById("contact").className = "click";
		document.getElementById("contact").onclick = function () { document.location.href='contact_stagetime.html'; }
	}
	else {
		document.images.contact.src = document.images.contact.src.replace(/_/,"-ov_");
	}
	
	if (document.location.href.search(/guestteachers/) == -1) {
		document.getElementById("guestteachers").onmouseover = function() { document.images.guestteachers.src = document.images.guestteachers.src.replace(/_/,"-ov_"); }
		document.getElementById("guestteachers").onmouseout = function() { document.images.guestteachers.src = document.images.guestteachers.src.replace(/-ov/,""); }
		document.getElementById("guestteachers").className = "click";
		document.getElementById("guestteachers").onclick = function () { document.location.href='guest_teachers.html'; }
	}
	else {
		document.images.guestteachers.src = document.images.guestteachers.src.replace(/_/,"-ov_");
	}	
	
	/* event bindings for footer menu */
	
	document.getElementById("footerhome").href = "index.html";
	document.getElementById("footeraboutus").href = "about_stagetime.html";
	document.getElementById("footercamp").href = "camp.html";
	document.getElementById("footerregister").href = "stagetime_registration.html";
	document.getElementById("footercontact").href = "contact_stagetime.html";
	document.getElementById("footerguestteach").href = "guest_teachers.html";
	document.getElementById("footersitemap").href = "sitemap.html";
}