
try { 
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 
} catch (e) { 
try { 
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
} catch (E) { 
xmlhttp = false; 
} 
} 
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { 
xmlhttp = new XMLHttpRequest(); 
}

function showPage(inPage, inID) {
	objID =	document.getElementById(inID);
	xmlhttp.open("GET", inPage);
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			objID.innerHTML = xmlhttp.responseText;
		}
	};
	xmlhttp.send(null);
}

function swapImage(inID, inImage) {
	document.getElementById(inID).src = inImage;
}


function clearBlog() {
	document.blog.name.value = "";
	document.blog.location.value = "";
	document.blog.story.value = "";
	document.getElementById('stories').innerHTML = '';
	showPage('showStory.php', 'stories');
}
