function hideall() {
	$("div.page").hide();
	$("a.title").removeClass("selected");
	$("h2.pagetitle").hide();
}
function hideallnews() {
	$("div.news").hide();
}
function show(pageno) {
	hideall();
	$("a.title#title" + pageno).addClass("selected");
	$("div.page#page" + pageno).fadeIn("def");
	$("h2.pagetitle#pagetitle" + pageno).fadeIn("def");

}
function news(newsno) {
	hideallnews();
	$("div.news#news" + newsno).fadeIn("def");
}
function editpage(pageno) {
	window.location = "index.php?editpage=" + pageno;
}
$(window).load( function() {
	// this function happens AFTER ready()

	});
// ------ JQuery Form Plugin - generic scripts
function showRequest(formData, jqForm, options) {
	// formData is an array; here we use $.param to convert it to a string to
	// display it
	// but the form plugin does this for you automatically when it submits the
	// data
	var queryString = $.param(formData);
	
	// jqForm is a jQuery object encapsulating the form element. To access the
	// DOM element for the form do this:
	// var formElement = jqForm[0];

	// alert('About to submit: \n\n' + queryString);
	// todo check inputs
	// here we could return false to prevent the form from being submitted;
	// returning anything other than false will allow the form submit to
	// continue
	$('img.loading').show();
	return true;
}

// post-submit callback
function showResponse(responseText, statusText) {
	$('img.loading').hide();
}
