xGap=(navigator.appName == "Netscape")?11:9;
yGap=(navigator.appName == "Netscape")?31:29;

//------------------------------------------------
// POPUP FOOTER
//------------------------------------------------
function openCredits()
{
	var xCrd=(screen.availWidth-300-xGap)/2;
	var yCrd=(screen.availHeight-300-yGap)/2;
	windowFeatures = 'width=300,height=300,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("credits/credits.html", "credits", windowFeatures);
}
function openPrivacy()
{
	var xCrd=(screen.availWidth-500-xGap)/2;
	var yCrd=(screen.availHeight-500-yGap)/2;
	windowFeatures = 'width=500,height=500,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("pop_privacy.php", "privacy", windowFeatures);
}
function openAnniversaryPopup()
{
	var xCrd=(screen.availWidth-500-xGap)/2;
	var yCrd=(screen.availHeight-500-yGap)/2;
	windowFeatures = 'width=500,height=500,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("pop_anniversary.php", "privacy", windowFeatures);
}
function openPrivacyAffiliazione()
{
	var xCrd=(screen.availWidth-500-xGap)/2;
	var yCrd=(screen.availHeight-500-yGap)/2;
	windowFeatures = 'width=500,height=500,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("pop_privacy_affiliazione.php", "privacy", windowFeatures);
}
function openCompanyInfo()
{
	var xCrd=(screen.availWidth-500-xGap)/2;
	var yCrd=(screen.availHeight-230-yGap)/2;
	windowFeatures = 'width=500,height=230,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("pop_company_info.php", "CompanyInfo", windowFeatures);
}
function openBackstage()
{
	var xCrd=(screen.availWidth-500-xGap)/2;
	var yCrd=(screen.availHeight-420-yGap)/2;
	windowFeatures = 'width=500,height=420,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("videobackstage/video.php", "CompanyInfo", windowFeatures);
}
//------------------------------------------------
// POPUP HOMEPAGE
//------------------------------------------------
function openCorsoDesigner()
{
	var xCrd=(screen.availWidth-500-xGap)/2;
	var yCrd=(screen.availHeight-425-yGap)/2;
	windowFeatures = 'width=500,height=425,status=no,top='+yCrd+',left='+xCrd
	newWindow=window.open("pop_corso_designer.php", "corsoDesigner", windowFeatures);
}

//------------------------------------------------
// COMUNICAZIONE
//------------------------------------------------
function comunicazionePe(){
	document.getElementById('comunicazioneAi').style.display='none';
	document.getElementById('comunicazionePe').style.display='block';
}
function comunicazioneAi(){
	document.getElementById('comunicazioneAi').style.display='block';
	document.getElementById('comunicazionePe').style.display='none';
}

$(function(){
	$('#openCreativeWorkshop').click(function(){
		var target = $(this).attr('href');
		$(this).apriModale({
			color: '#717a73',
			/* divToload: target, */
			altClose : '#chiudi'
		});
		return false;
	});

/* POP UP creative Workshop	 
====================================*/
	$('#btn_1 ').live('click',function(){	
	$('#content_2, #content_3').hide();
	$('#content_1').show();	
	return false; 
	}); 
	$('#btn_2 ').live('click',function(){	
	$('#content_1, #content_3').hide();
	$('#content_2').show();	
	return false; 
	}); 
	$('#btn_3 ').live('click',function(){	
	$('#content_1, #content_2').hide();
	$('#content_3').show();	
	return false; 
	}); 

});
