<!--

function ajaxFunction(){
	var ajaxRequest;

	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				//browsers all not support, rare case
				alert("Your browser does not support Ajax!");
				return false;
			}
		}

	}
	return ajaxRequest;
}

function showData(part) {
	htmlRequest = ajaxFunction();
	if (htmlRequest==null){ // If it cannot create a new Xmlhttp object.
		alert ("Browser does not support HTTP Request");
		return;
	} 

	htmlRequest.onreadystatechange = function(){
		if(htmlRequest.readyState == 4){
			document.getElementById("shoutarea").innerHTML = htmlRequest.responseText;
		}
	}
	htmlRequest.open("GET", "./outputinfo.php?part="+part, true);
	htmlRequest.send(null);
}

function saveData(){
	htmlRequest = ajaxFunction();
	if (htmlRequest==null){ // If it cannot create a new Xmlhttp object.
		alert ("Browser does not support HTTP Request");
		return;
	} 

	if(document.shoutbox.shouter_comment.value == "" || document.shoutbox.shouter_comment.value == "NULL"){
		alert('Please make a detailed comment!');
		return;
	}
	htmlRequest.open('POST', './sendshout.php');
	htmlRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
        var str=document.shoutbox.shouter_comment.value;
        str = str.replace(/&/g,'%26')
	htmlRequest.send('message='+str+'&part='+document.shoutbox.shouter_part.value); 
	document.shoutbox.shouter_comment.value = ''; // Updates the shout boxes text area to NULL.
	document.shoutbox.shouter_comment.focus(); // Focuses the text area.

} 

-->