
function switchPage(page) {
	$.get("index.php", { type: "load", page: page },
		function(data) { 
			document.getElementById("pageload").innerHTML = data;
		});
}

function addComment() { 
	profile = document.getElementById("profile").value;
	myname = document.getElementById("myname").value;
	comment = document.getElementById("comment").value;
	document.getElementById("status_t").innerHTML = '<font color="red">Adding Comment, Please wait..</font><br><br>';
	$.post("index.php", { addcomment: true, profile: profile, myname: myname, comment: comment },
			function(data){
			    // added
				if(data == "1") { 
					document.getElementById("status").innerHTML = '<font color="red">Your comment has been added and is pending approval by our staff.</font>';
				}else{
					document.getElementById("status_t").innerHTML = '<font color="red">There was an error saving your comment, please try again.</font><br><br>';
				}
			  });
}

