function idIsInDoc(id){
		if (document.getElementById(id) != null){return true;}
		else {return false;}
};


function ajaxInnerHtmlById(url,childId,parentId,asynch){
	// if the paret id exists and the child id does not exist 
	// load the contents of the document at url into child
	if ( idIsInDoc(parentId) && !idIsInDoc(childId) ){
		if(!document.getElementById) return; //Prevent older browsers from getting any further.
		var xmlHttp;
		try
		  {
		  // Firefox, Opera 8.0+, Safari
		  xmlHttp=new XMLHttpRequest(url);
		  }
		catch (e)
		  {
		  // Internet Explorer
		  try
		    {
		    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		    }
		  catch (e)
		    {
		    try
		      {
		      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		      }
		    catch (e)
		      {
		      alert("Your browser does not support AJAX!");
		      return false;
		      }
		    }
		  }
		  xmlHttp.onreadystatechange=function()
		  {
			if(xmlHttp.readyState==4)
			{
				    document.getElementById(parentId).innerHTML=xmlHttp.responseText;	  
			}
			
		  }
		  xmlHttp.open("GET",url,asynch);
		  xmlHttp.send(null);
	}

};

