function loadDiv(div,page) {
	var x=getXMLHttpRequest();
	x.open("get",page,false);
	x.send(null);
	var content=x.responseText;
	content=content.match(/<body.*>([\s\S]*)<\/body>/);
	document.getElementById(div).innerHTML=content[1];
}
function init() {
	var page=queryString("page");
	if(page) loadDiv("content",page);
	else loadDiv("content","main.html");
	/*var a;
	a=document.getElementById("navigation").getElementsByTagName("a");
	for (var i=0;i<a.length;i++) {
		a[i].href='javascript:'+'loadDiv("content","' + a[i].href + '");';
	}*/
}

//	Contact Form
function initContact() {
	selectOther('found','search|other','otherFound');
}

function selectOther(selectID,otherText,objectID) {
	var theObject=document.getElementById(objectID);
	var other=document.getElementById(selectID).value;
	other=new RegExp(other);
	theObject.style.visibility=otherText.match(other)==null?"hidden":"visible";
}
function sendForm(form) {
	document.getElementById("to").value=encrypt('^g_d3dfXcrUlQZEYpQ','guess');
}
function resetForm(form) {
	return confirm("Are you sure you want to clear the form?");
}

