// JavaScript Document
var xmlhttp=CreateXmlHttpObject();

function CreateXmlHttpObject()
{var XMLHTTP=false;
 if (window.XMLHttpRequest) // if Mozilla, Safari etc
    {XMLHTTP = new XMLHttpRequest();
	}
 else if (window.ActiveXObject)
    { // if IE
     try {XMLHTTP = new ActiveXObject("Msxml2.XMLHTTP")
         } 
     catch (e)
         {try {XMLHTTP = new ActiveXObject("Microsoft.XMLHTTP")
              }
          catch (e){}
         }
    }
 return XMLHTTP;
}

function handleXmlHttpResponse()
{
	if (xmlhttp.readyState!=4)
       {document.getElementById('mainareacontent').innerHTML="<div style='position:relative; left:220px; top:120px;'><img src='images/ajax-loader-big.gif' border='0' align='middle' /></div";
       }
    if (xmlhttp.readyState==4)
       {if (xmlhttp.status==200)
           { var results=xmlhttp.responseText;
             document.getElementById('mainareacontent').innerHTML =results;
		   }
		else
           {document.getElementById('mainareacontent').innerHTML="<h1 style='color: #FFF'>Sorry, there was a problem.<br /> Please Contact Administrator</h1>";
           }
       }
}

function getcontent(id)
	{
		var url="components/contents/ajaxShow.php?id"+id;
		xmlhttp.open('GET',url,'true');
	    xmlhttp.onreadystatechange=handleXmlHttpResponse;
	    xmlhttp.send(null);
	}

function getPublication(id)
	{
		var url="components/publication/showPublication.php?id"+id;
		xmlhttp.open('GET',url,'true');
	    xmlhttp.onreadystatechange=handleXmlHttpResponse;
	    xmlhttp.send(null);
	}
function showVideo(id)
	{
		var url="components/video/showVideo.php?id="+id;
		xmlhttp.open('GET',url,'true');
	    xmlhttp.onreadystatechange=handleXmlHttpResponse;
	    xmlhttp.send(null);
	}










