var iniintro = { valore:0 }
var inischeda = { valore:0 }
var inifoto = { valore:0 }
var inivideo = { valore:0 }
var iniesercizifoto = { valore:0 }
var iniesercizivideo = { valore:0 }
var inicataloghi = { valore:0 }
var inilinea = { valore:0 }

function maximize()
{
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
}
function resetta_menu(origine){
	 var w=document.getElementById(origine);
	 var s=w.getElementsByTagName('DIV');
	 var l=s.length;
	 var h=null;
	 var att=null;
	 var i=0;	
		for(i;i<l;i++){
			h=s[i].parentNode;
			att=h.getAttribute("id")			
			if(att !=null && (att.substring (0,9)=="zoomupper")){
			if(h.style.display=="block"){
				h.style.display='none';
				//alert(h.style.display);
			}
			}
			//alert(h.getAttribute("id"))
			}
}

/*function catpdfori(){
inicataloghi.valore=1;	         
var tmpfile=document.getElementById("pdf").name;
document.getElementById('con').innerHTML='<object data="documenti/'+tmpfile+'#view=Fit&toolbar=1&messages=0&navpanes=0&scrollbar=1" type="application/pdf" width="800" height="630"></object>';	   
$("img[rel]").overlay({mask: '#555555', effect: 'apple', top: '0'});
}*/
function catpdf(){
inicataloghi.valore=1;	         
var tmpfile=document.getElementById("pdf").name;
document.getElementById('con').innerHTML='<iframe src=documenti/'+tmpfile+'#view=Fit&toolbar=1&messages=0&navpanes=0&scrollbar=1" width="800" height="630"></iframe>';	   
$("img[rel]").overlay({mask: '#555555', effect: 'apple', top: '0'});
}
function initload(tipo,lang){
	if(tipo==0){
	//requester('menuprincipale.php','lang=it','toolbar',1,true); 
	if(sessioneid.valore !=""){ 
	requester('sessione.php','rx=1','',1,true); 
	}
	}
	if(tipo==3){
	//requester('menuprincipale.php','lang=en','toolbar',1,true); 
	if(sessioneid.valore !=""){ 
	requester('sessione.php','rx=1','',1,true); 
	}
	}
	if(tipo==1){// per dattagli.php
	if(sessioneid.valore !=""){ 
	requester('sessione.php','rx=1','',1,true); 
	}
	}
}
function clearall(){
	 $("a[rel]").each(function() {
		$(this).overlay().close();
 });
}
function logout(){
	createCookie('iduser',"",-1);
	createCookie('denominazione',"",-1);
	idanagrafica.valore=0;
	document.getElementById("online").innerHTML='';
	document.getElementById("logout").style.display="none";
	document.getElementById("login").style.display="inline";
	document.getElementById("regist").style.display="inline";
}
