strDIVNewDettaglioID='';
//alert("DIV 0: "+strDIVNewDettaglioID);
//var strListaIdCommento="";




function ajx_showCommento(lclDivID){
	
	divTMP=document.getElementById("Commento#"+"*");
	alert("divTMP: "+divTMP);
	
	
	
	// Chiudo gli altri DIV Commento
	alert("lclDivID: "+lclDivID);
	alert("strListaIdCommento: "+strListaIdCommento);
	var arrTMPArrayIdCommento=strListaIdCommento.split("_");
	//alert("arrTMPArrayIdCommento: "+arrTMPArrayIdCommento);
	
	for (i=0; i<arrTMPArrayIdCommento.length; i++) {
		//alert("arrTMPArrayIdCommento["+i+"]: "+arrTMPArrayIdCommento[i]);
		hideDiv("Commento#"+arrTMPArrayIdCommento[i]);
		//alert("DOPO arrTMPArrayIdCommento["+i+"]: "+arrTMPArrayIdCommento[i]);
	}
	// FINE Chiudo gli altri DIV Commento
	
	strDIVNewDettaglioID=lclDivID;
	alert("DIV 1: "+strDIVNewDettaglioID);
	
	var arrTMPArray=lclDivID.split("#");
	lclIntIdCommento=arrTMPArray[1];
	
	showDiv("Commento#"+lclIntIdCommento);
	
	//Richiamo la funzione httpRequest
	httpRequest('GET', '/Ajax/CommentoDettaglio.asp?Id='+lclIntIdCommento+'',true,handleRespCommento);
}

function handleRespCommento(){
	var statusMsg="";
	try{
		if(request.readyState==4){
			if(request.status==200){
				/*	Verifica dei dati che ha restituito il server	*/
				strResponseText=request.responseText;
				//alert("OCCHIO DIV 2: "+strDIVNewDettaglioID);
				//alert("OCCHIO Contenuto DIV 2: "+document.getElementById(strDIVNewDettaglioID));
				div=document.getElementById(strDIVNewDettaglioID);
				div.innerHTML="";
				//div.style.className='corpo_contentTesto_WiewOK';
				div.innerHTML=strResponseText;
			}else{
				/*
						request.status è:
						503 nel caso l'applicazione lato server non sia
						500 nel caso di un bug
				*/
				alert("Problema di comunicazione tra l'oggetto XMLHttpRequest ed lo scrip lato server. \nRequest.status="+request.status);
			}	// Chiusura if(request.status==200)
		}	// Chiusura if(request.readyState==4)
	} catch(err){
		alert("Il server non risponde.\nError: "+err.message)
	}
}

