// JavaScript Document
function showIt() {
	//navigation menu
 	var aTagsNav=document.getElementById('navigation').getElementsByTagName('a');
	for (i=0; i<aTagsNav.length; i++) {
  	 aTagsNav[i].onclick=function() {
	 var showN=this.id.split(" ")
	 the_content= "page.php?id="+showN[0]
	 if (showN[0] != "about" && showN[0] != "programs"){
	 check_content(the_content)
	 return false }
	 }
	}
	//sidemenu
	var aTagsSide=document.getElementById('sidemenu').getElementsByTagName('a');
 	for (i=0; i<aTagsSide.length; i++) {
  	 aTagsSide[i].onclick=function() {
	 var showS=this.id.split(" ")
	 the_content= "page.php?id="+showS[0]
	 check_content(the_content)
	 return false 
	}}
	//about menu
	var aTagsAbout=document.getElementById('aboutNav').getElementsByTagName('a');
 	for (i=0; i<aTagsAbout.length; i++) {
  	 aTagsAbout[i].onclick=function() {
	 var showA=this.id.split(" ")
	 the_content= "page.php?id="+showA[0]
	 if (showA[0] != "presskitFTH") {
	 check_content(the_content)
	 document.getElementById('aboutNav').style.visibility  = "hidden";
	 return false }
	}}
	//program menu
	var aTagsProg=document.getElementById('progNav').getElementsByTagName('a');
 	for (i=0; i<aTagsProg.length; i++) {
  	 aTagsProg[i].onclick=function() {
	 var showP=this.id.split(" ")
	 the_content = "programs.php"
	 check_content(the_content)
	 window.location.hash = showP[0]
	 document.getElementById('progNav').style.visibility  = "hidden";
	 return false 
	}}
	//eshop menu
}

//window.onload=showIt;



function makeObject(){ 
var x; 
if (window.ActiveXObject) { 
x = new ActiveXObject("Microsoft.XMLHTTP"); 
}else if (window.XMLHttpRequest) { 
x = new XMLHttpRequest(); 
} 
return x; 
} 
var request = makeObject(); 
 

var the_content; 
function check_content(the_content){ 
request.open('get', the_content); 
request.onreadystatechange = parseCheck_content; 
request.send(''); 
} 
function parseCheck_content(){ 

var answer = request.responseText; 
document.getElementById('content').innerHTML = answer; 

} 


