// MOUSEOVER
function on(id) {
   var cat = document.getElementById(id);
   cat.style.color = "#000";
   cat.style.background = "#d8d8eb";
   cat.style.cursor = "pointer";
}

// MOUSEOUT
function off(id) {
   var cat = document.getElementById(id);
   cat.style.color = "#4c4d6f";
   cat.style.background = "#eee";
   cat.style.cursor = "arrow";   
}

function leftTrim(sString) {
	while (sString.substring(0,1) == 'a') {
		sString = sString.substring(1, sString.length);
	}
	return sString;
}

// pagination menu
function goToPage(id) {
	id = leftTrim(id);
	window.location.href='/art-school-programs.html?id=' + id;
}


function passwordcheck(passwordForm) {
	if ( document.passwordForm.password.value != document.passwordForm.password_confirmation.value ) {
		var nomatch = document.getElementById('nomatch');
		nomatch.style.display = 'block';
		return false;
	} else {
		return true;
	}
}

function changePic(src, title) {
	document["largePic"].src=src;
	changeTitle(title);
}
function changeTitle(title) {
	var tag = document.getElementById('largePicTitle');
	if (tag.innerHTML) { tag.innerHTML = title; }
	else if (tag.innertext) { tag.innertext = title; }
}
