var qmax = 27;
var q = location.href.replace(".*q([0-9]*).html?", "$1") - 0;

function nextquote() {
	if (++q >= qmax) q=0;
	location.replace('q' + q + '.html');
}

function randquote() {
	location.replace('q' + Math.floor(Math.random()*qmax) + '.html');
}

