// - - - - - - - - - - - -
// CUSTOM TO THIS SITE
// - - - - - - - - - - - -

function ans(s) {
	highlight(s);
}

function showOther (slct) {
	if (slct.options[slct.selectedIndex].value == "other")
		turnOn ("otherdiv");
	else
		turnOff ("otherdiv");
}

var nextKid = 2;
function addKid () {
	if (nextKid <= 11) {
		turnOn ("kidsDiv"+nextKid);
		nextKid++;
	}
}

// - - - - - - - - - - - -
// HIGHLIGHT ROWS
// - - - - - - - - - - - -

function highlight(j) {
	var n = null;
	if (j.parentNode && j.parentNode.parentNode) {
		n = j.parentNode.parentNode;
	}
	else if (j.parentElement && j.parentElement.parentElement) {
		n = j.parentElement.parentElement;
	}
	if (n) {
		n.className = n.className.replace("unlit","lit");
	}
}

// - - - - - - - - - - - -
// HIDE AND SHOW
// - - - - - - - - - - - -

function turnOff (id) {
	setProp(id,'display','none');
}

function turnOn (id) {
	setProp(id,'display','block');
}

function setProp (id,prop,val) {
	el = document.getElementById(id);
	eval("el.style."+prop+" = '"+val+"';");
}

// - - - - - - - - - - - -
// GENERAL FUNCTIONS
// - - - - - - - - - - - -

function nostatus () {
	window.status=" ";
	return true;
}

function randomize (total,pre,post) {
	var num = Math.random();
	num = Math.round((total*num)+.5);
	return pre+num+post;
}

// - - - - - - - - - - - -
// INIT FUNCTIONS
// - - - - - - - - - - - -

function pageInit () {
}

function init () {
	pageInit ();
}

window.onload = init;