function settile(title) {
 document.getElementById('pos').innerHTML = title;
}

/* AJAX Functions */
/* These two functions are used to call specific pages
to use insert onclick="getdata('page','title','divid');". IE:
<a href="#" onclick="getdata('videos.php','content');"></a>
*/

var dest=""; //Stuff
function getdata(what,title,where){
	http = new XMLHttpRequest(); //Where is the request to go out from?
        dest = where; //More stuff.
        document.getElementById('pos').innerHTML = title; //Put the title into the title bar on the top of the page.
        document.getElementById(dest).innerHTML ="Loading..."; //Generic loading stuff.
	http.open('get', what); //Open the socket.
	http.onreadystatechange = changepage; //When we need it, run changepage().
	http.send(null); //Null requestion.
	return false;
}
function changepage(){
	if(http.readyState == 4){ //Finished loading the response
		var response = http.responseText; //Get the response.
		document.getElementById(dest).innerHTML = response; //Display the response.
	}
}
