
function survey_on()
{
	document.getElementById('survey_diary_header').className='diaryoff';

	document.getElementById('survey_ratings').style.display='';
	document.getElementById('survey_text').style.display='';

	document.getElementById('diary_text').style.display='none';

//	document.getElementById('diary_ratings').style.display='none'; // <<-- not sure why I put this line in: there is nothing called diary_ratings!
	document.getElementById('small_print').style.display=''; 

}

function diary_on()
{
	document.getElementById('survey_diary_header').className='diaryon';
	document.getElementById('survey_ratings').style.display='none';
	document.getElementById('survey_text').style.display='none';

	document.getElementById('diary_text').style.display='';

//	document.getElementById('diary_ratings').style.display='';  // <<-- not sure why I put this line in: there is nothing called diary_ratings!
	document.getElementById('small_print').style.display='none'; 
}
	//getDiaryEntry('{$row["ID"]}');


function getDiaryEntry(ID)
{
	var xmlHttp;
	function GetXmlHttpObject()
	{ 
    	var objXMLHttp=null;
    	if (window.XMLHttpRequest)
    	{
       	 objXMLHttp=new XMLHttpRequest();
    	}
    	else if (window.ActiveXObject)
    	{
        	objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
    	}
    	return objXMLHttp;
	}

	//document.getElementById('mCancelButton'+ reservationId).disabled=true;
	//document.getElementById('mCancelButton'+ reservationId).style.visibility='hidden';
    //document.getElementById("bookingResult" + reservationId).innerHTML='<img src=\'http://images.hardens.com/images/ajax-loader.gif\' alt=\'\' align=\'absmiddle\'/> cancelling... (this may take a few minutes)';
     
     xmlHttp=GetXmlHttpObject();
    
    if (xmlHttp==null)
    {
        alert ("Browser does not support HTTP Request");
        return;
    }
    
    var url="http://beta.hardens.com/restaurants/Diary.php";
    url=url+"?ID="+ID;
    
    xmlHttp.onreadystatechange=function(){
     if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){
     
     		
     		
        	document.getElementById("diary_text").innerHTML=xmlHttp.responseText;
        	
        	
        	
     	}
     };
    xmlHttp.open("GET",url,true);
    xmlHttp.send(null);  
}