function GEID(elm)
{
	if( document.getElementById(elm) ) return document.getElementById(elm);	
	else return false;
}

var xmlHttp;

function MoheetmediaAjax(_URL,_DIV)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }

var url=_URL+"&sid="+Math.random();
xmlHttp.onreadystatechange = function()
{
if (xmlHttp.readyState < 4 )
 { 
 	document.getElementById(_DIV).innerHTML='<img src="_images/load.gif">';
 }
 else
 {
 	document.getElementById(_DIV).innerHTML=xmlHttp.responseText;
 } 
}
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
//-------------------------------------------- POST --------------------------------------------------
function pstMoheetmediaAjax(_URL,_DIV,_PST)
{
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request");
 return;
 }

var url=_URL+"&sid="+Math.random();
xmlHttp.onreadystatechange = function()
{
if (xmlHttp.readyState < 4 )
 { 
 	document.getElementById(_DIV).innerHTML='<img src="_images/load.gif">';
 }
 else
 {
 	document.getElementById(_DIV).innerHTML=xmlHttp.responseText;
 } 
}
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xmlHttp.send(_PST);
}

//function stateChanged()
//{ 
//if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
// { 
// document.getElementById(_DIV).innerHTML=xmlHttp.responseText;
// } 
//}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}// JavaScript Document

