function showDivDettaglioModulo(ritorno,div) {
	// ottengo i px dello scroll per aprire il dettaglio al posto giusto	
	var offset = 0;
	if (navigator.appName == "Microsoft Internet Explorer")
		offset = document.body.scrollTop;
	else offset = window.pageYOffset;
	var offsetstr = offset.toString() + "px";
	
	
	var elem = document.getElementById(div) ;
	if (elem.style.display == 'none') {
	
						
		var ajaxObj = new ClassAJAX();	
		ajaxObj.setExecute(false) ;
		ajaxObj.setReturn(true) ;
		ajaxObj.setLoading(true) ;
		ajaxObj.runAJAX(ritorno) ;
		
		var html = "" ;
		var htmlOld = "" ;
			
		myInterval = window.setInterval(
		function() { 
			
			htmlOld = html ;
			html = ajaxObj.getHtml() ;
			
			if (html != false) {
				
				if (htmlOld == html) {
					
					window.clearInterval(myInterval);
					
					elem.style.top=offsetstr ;
					elem.style.display = '' ;
					elem.className = 'alert' ;
					elem.style.zIndex = '1001' ;
					elem.innerHTML = html ;
					
					
					
					/*******************************************************
					* appiccio la patina sotto a tutto
					*******************************************************/
					/*
					
					var xWithScroll ;
					var yWithScroll ;
					if (window.innerHeight && window.scrollMaxY) {// Firefox
						yWithScroll = window.innerHeight + window.scrollMaxY;
						xWithScroll = window.innerWidth + window.scrollMaxX;
					} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
						yWithScroll = document.body.scrollHeight;
						xWithScroll = document.body.scrollWidth;
					} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
						yWithScroll = document.body.offsetHeight;
						xWithScroll = document.body.offsetWidth;
				  	}
					var overlay = document.getElementById('overlay') ;
					overlay.style.height = yWithScroll.toString() + 'px' ;
					overlay.style.display = '' ;
					overlay.style.backgroundImage="url("+webpath+"/griglia.gif)" ;
					overlay.style.zIndex = '1000' ;
					*/
				
					// per la cancellazione dei menu
					try{
						
						if(document.getElementById('cancella_ok').value==1){
							setTimeout("closeDettaglioModulo('log_res');location.href='gestione-menu.php';",3000);	
						}
					}catch(e){}finally{}
					
					
					// per la cancellazione delle sezioni
					try{
						
						if(document.getElementById('cancella_sezione_ok').value==1){
							setTimeout("closeDettaglioModulo('log_res');location.href='gestione-sezioni.php';",3000);	
						}
					}catch(e){}finally{}
					
					
					// per la cancellazione delle categorie
					try{
						
						if(document.getElementById('cancella_categoria_ok').value==1){
							setTimeout("closeDettaglioModulo('log_res');location.href='gestione-categorie.php';",3000);	
						}
					}catch(e){}finally{}
					
					// per la cancellazione delle pagine
					try{
						
						if(document.getElementById('cancella_pagina_ok').value==1){
							setTimeout("closeDettaglioModulo('log_res');location.href='gestione-pagine.php';",3000);	
						}
					}catch(e){}finally{}
					
					
				}
				
			} 
		} 
		,1) ; 
	}
	
}

function closeDettaglioModulo(div) {
	
	var elem = document.getElementById(div) ;
	elem.style.display = 'none' ;
	
	/*var overlay = document.getElementById('overlay') ;
	overlay.style.display = 'none' ;*/
}
