function changeimagenews(url, apDiv1){







		document.getElementById(apDiv1).innerHTML="<img src="+url+" width='383px' border='0'>";		



		el=nodoPadre = document.getElementById('PAG_NEWS').parentNode;



		el.style.height=document.getElementById('PAG_NEWS').offsetHeight+80+"px";



		document.getElementById('taglia4').style.height=document.getElementById('PAG_NEWS').offsetHeight+80+"px";



}







function changeimage(url, apDiv1, sel, zoom){







	if (sel==1){	





		document.getElementById(apDiv1).innerHTML="<div style='width:101px; z-index:8000'><a id='thumb1' href="+zoom+" class='highslide' onclick='return hs.expand(this)'><img src="+url+" alt='' title='Zoom' width='383'></a><div align='right'><a id='zoom1' href="+zoom+" onclick='return hs.expand(this)'><img src='../images/menu/zoom.gif' alt='' title='Zoom' width='15' height='15' border='0'></a></div></div>";

		el2=document.getElementById('thumb1').parentNode;

		el2.style.width="383px";

		



	} else if (sel==2){



		document.getElementById(apDiv1).innerHTML="<div id='QTDIV'><embed src="+url+" type='video/quicktime' correction='FULL' scale='ASPECT' controller='TRUE' cache='TRUE' align='top' border='0' width='383' height='383'><noembed>Manca il supporto per il Plug-in Quick Time</noembed></div>";	

		el2=document.getElementById('thumb1').parentNode;

		el2.style.width="383px";





	}







}















function OpenPopUp(url){   







// url contiene l'URL della pagina da visualizzare come pop-up   







var new_window;   var win_width = 540;  // Larghezza finestra di pop-up   







var win_height = 450; // Altezza finestra di pop-up   







new_window = window.open(url,'Avviso','top='+(screen.height-win_height)/2+'px,left='+(screen.width-win_width)/2+'px,width='+win_width+'px,height='+win_height+'px,resizable=0,location=0,toolbar=0,menubar=0,status=0,scrollbars=0');   if (window.focus)   {      new_window.focus();   }}















function createhandler(){







var xmlhttp;







if (window.XMLHttpRequest) {







xmlhttp = new XMLHttpRequest();







}







else if (window.ActiveXObject) {







xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");







}







return xmlhttp;







}















function getnews(url,curdiv){ //Url to fetch + div ID to insert content into 







var xmlhttp=createhandler();







document.getElementById('taglia4').style.height="auto";







xmlhttp.onreadystatechange=function (){ 







document.getElementById(curdiv).innerHTML="<br><br>Loading...<br><br>";







if(xmlhttp.readyState==4){







document.getElementById(curdiv).innerHTML=xmlhttp.responseText;







//xmlhttp.onreadystatechange = null;



el=document.getElementById('PAG_NEWS').parentNode;



el.style.height=document.getElementById('PAG_NEWS').offsetHeight+80+"px";



document.getElementById('taglia4').style.height=document.getElementById('PAG_NEWS').offsetHeight+80+"px";







xmlhttp.abort();







}







};







xmlhttp.open('GET', url, true);







xmlhttp.send(null);







}















function get(url, apDiv1){ //Url to fetch + div ID to insert content into 















var xmlhttp=createhandler();







document.getElementById('taglia2').style.height="auto";







xmlhttp.onreadystatechange=function (){ 







document.getElementById(apDiv1).innerHTML="<br><br>Loading...<br><br>";







if(xmlhttp.readyState==4){







document.getElementById(apDiv1).innerHTML=xmlhttp.responseText;







//xmlhttp.onreadystatechange = null;



el=document.getElementById(apDiv1).parentNode;

el2=document.getElementById('thumb1').parentNode;

el2.style.width="383px";

el.style.height=document.getElementById(apDiv1).offsetHeight+80+"px";
document.getElementById('taglia2').style.height=document.getElementById(apDiv1).offsetHeight+80+"px";

xmlhttp.abort();

}

};

xmlhttp.open('GET', url, true);
xmlhttp.send(null);
}

var titlepage="HOME PAGE";

var NoHome=0;
var P1=0;
var P2=0;
var P3=0;
var P4=0;

function openclose(valore){
    var n = valore;

	var M1 = parseInt(document.getElementById("M_DNA").style.width);
	var M2 = parseInt(document.getElementById("M_PRODUCTS").style.width);
	var M3 = parseInt(document.getElementById("M_ARCHITECTURE").style.width);
	var M4 = parseInt(document.getElementById("M_NEWS").style.width);

    var T1 = 1;
	var T2 = 1;
	var T3 = 1;
	var T4 = 1;
	
	if (document.getElementById('M_DNA_LABEL').style.display=='none'){T1=0;};
	if (document.getElementById('M_PRODUCTS_LABEL').style.display=='none'){T2=0;};
	if (document.getElementById('M_ARCHITECTURE_LABEL').style.display=='none'){T3=0;};
	if (document.getElementById('M_NEWS_LABEL').style.display=='none'){T4=0;};
	
	document.getElementById('DNA_LABEL_MENUPAGE').style.display='none';
	document.getElementById('PRODUCT_LABEL_MENUPAGE').style.display='none';
	document.getElementById('ARCHITECTURE_LABEL_MENUPAGE').style.display='none';
	document.getElementById('NEWS_LABEL_MENUPAGE').style.display='none';

  if (T1==0 || T2==0 || T3==0 || T4==0){
  	// non eseguo nulla c'è una pagina aperta
  }else{ 	
  document.getElementById('taglia1').style.display='none';
  document.getElementById('taglia2').style.display='none';
  document.getElementById('taglia3').style.display='none';
  document.getElementById('taglia4').style.display='none';

	if(n == 1){ 
	    puls = 1;
		if (M2 > 25){slide_horiz2.start();}
		if (M3 > 25){slide_horiz3.start();}
		if (M4 > 25){slide_horiz4.start();}
		document.title="Delineodesing > DNA";
		titlepage="Delineodesing > DNA";
		slide_horiz.start();
	} else if (n == 2){
		puls = 2;
		if (M1 > 25){slide_horiz.start();}
		if (M3 > 25){slide_horiz3.start();}
		if (M4 > 25){slide_horiz4.start();}
		document.title="Delineodesing > PROJECTS";
		titlepage="Delineodesing > PROJECTS";
		slide_horiz2.start();
	} else if (n == 3){
		puls = 3;
		if (M1 > 25){slide_horiz.start();}
		if (M2 > 25){slide_horiz2.start();}
		if (M4 > 25){slide_horiz4.start();}	
		document.title="Delineodesing > COMMUNICATION";
		titlepage="Delineodesing > COMMUNICATION";
		slide_horiz3.start();

	} else if (n == 4){
		puls = 4;
		if (M1 > 25){slide_horiz.start();}
		if (M2 > 25){slide_horiz2.start();}
		if (M3 > 25){slide_horiz3.start();}	
		document.title="Delineodesing > NEWS";
		titlepage="Delineodesing > NEWS";
		slide_horiz4.start();
	}
  }	

}
function changecolor(){
 document.getElementById("imgbgdelineo").src = "../images/menu/spazio_0.gif";
 document.body.style.backgroundColor = "#4d4948";
 document.getElementById("DELINEO_LOGO").style.backgroundImage = "url(../images/loghi/delineodesign_logo_w.gif)";
}

function pageopen(page,section,language,titlesez){
		var p = page;
		var s = section;
		var l = language;
		var currtit = titlepage;
		//Home Page
		if (p == 0 && s == 0){
			NoHome=0;
			//document.getElementById("DELINEO_ADDRESS_NEW").style.display="block";
			document.location.href="/?LANG="+l;

		} else {
			changecolor();
			cutOFF();
		}
		document.title = titlepage+" > "+titlesez;
		//Pagina DNA
		if (p==1){
		NoHome=1;
		slide_horiz.start();
		document.getElementById("DELINEO_ADDRESS_NEW").style.display="none";
		document.getElementById("DELINEO_ADDRESS").style.display="none";
		document.getElementById("M_DNA_LABEL").style.display="none";
		document.getElementById("M_DNA_MENU").style.display="none";
		document.getElementById('DNA_LABEL_MENUPAGE').style.display='block';
		}
		//Pagina PROJECTS
		if (p==2){
		NoHome=1;
		slide_horiz2.start();
		document.getElementById("DELINEO_ADDRESS_NEW").style.display="none";
		document.getElementById("DELINEO_ADDRESS").style.display="none";
		document.getElementById("M_PRODUCTS_LABEL").style.display="none";
		document.getElementById("M_PRODUCTS_MENU").style.display="none";		
		document.getElementById('PRODUCT_LABEL_MENUPAGE').style.display='block';
		}
		//Pagina ARCHITECTURE
		if (p==3){
		NoHome=1;
		slide_horiz3.start();	
		document.getElementById("DELINEO_ADDRESS_NEW").style.display="none";
		document.getElementById("DELINEO_ADDRESS").style.display="none";
		document.getElementById("M_ARCHITECTURE_LABEL").style.display="none";
		document.getElementById("M_ARCHITECTURE_MENU").style.display="none";
		document.getElementById('ARCHITECTURE_LABEL_MENUPAGE').style.display='block';		
		}

		//Pagina NEWS
		if (p==4){
		NoHome=1;
		slide_horiz4.start();	
		document.getElementById("DELINEO_ADDRESS_NEW").style.display="none";
		document.getElementById("DELINEO_ADDRESS").style.display="none";
		document.getElementById("M_NEWS_LABEL").style.display="none";
		document.getElementById("M_NEWS_MENU").style.display="none";
		document.getElementById('NEWS_LABEL_MENUPAGE').style.display='block';		

		}	

}

function cutON(){
 	document.getElementsByTagName("html")[0].style.overflow="hidden";
	document.getElementsByTagName("body")[0].style.overflow="hidden";

 } 

function cutOFF(){ 
	document.getElementsByTagName("html")[0].style.overflow = "auto";
	document.getElementsByTagName("body")[0].style.overflow = "visible";	
}