var myHtmlSl = "";
function vaChange(d,s) {
  if (s==null) {
	  	  document.getElementById("lab-0").className = "va-menuli";
	  	  document.getElementById("lab-1").className = "va-menuli";
	  	  document.getElementById("lab-2").className = "va-menuli";
	  	  document.getElementById("lab-"+d).className = "va-menuliselected";
  }
  
  document.getElementById("va-content-in").innerHTML = '<div class="va-loader"><img src="http://widgets.vatican.va/w1/img/va-loader.gif"></div>';
  window.setTimeout("changeJsSl("+d+")",200); 
}
function changeJsSl(d){
  myJsSl = document.createElement('script');
  myJsSl.setAttribute('id','myScriptJsSl');
  myJsSl.setAttribute('type','text/javascript');
  myJsSl.setAttribute('src', 'http://widgets.vatican.va/w1/index.php?s='+d+'\&l=0');
  document.getElementById('va-content-in').appendChild(myJsSl);
}

var contentVideo = "";
function vaShowClose(div,div2) {
	if (document.getElementById("va-"+div+"-in").style.display=='none') {
		if (div=='video') document.getElementById("va-video-content").innerHTML = document.getElementById("va-video-hidden").innerHTML;
		if (div2=='video') document.getElementById("va-video-content").innerHTML = '';
		document.getElementById("va-"+div2+"-in").style.display = 'none';
		document.getElementById("va-layer").style.display = 'block';
		document.getElementById("va-"+div+"-in").style.display = 'block';
	} else {
		if (div=='video') document.getElementById("va-video-content").innerHTML = '';
		document.getElementById("va-layer").style.display = 'none';
		document.getElementById("va-"+div+"-in").style.display = 'none';
	}
}

var v_css  = document.createElement('link');
v_css.rel = 'stylesheet';
v_css.type = 'text/css';
v_css.href = 'http://widgets.vatican.va/w1/va_style.css';
document.getElementsByTagName('head')[0].appendChild(v_css);


document.write('<div id="va-widget-va">');
document.write('<div id="va-container">');
document.write('<div id="va-testata" onclick="window.open(\'http://www.vatican.va\');"></div>');
document.write('<div id="va-menu">');

document.write('<div class="va-menu-in"><a style="color: #5f3b00 !important;" href="" onclick="vaChange(\'0\'); return false;" class="va-menuliselected" id="lab-0">NOVIT&#192;</a></div>');document.write('<div class="va-menu-in"><a style="color: #5f3b00 !important;" href="" onclick="vaChange(\'1\'); return false;" class="va-menuli" id="lab-1">NEWS.VA</a></div>');document.write('<div class="va-menu-in"><a style="color: #5f3b00 !important;" href="" onclick="vaChange(\'2\'); return false;" class="va-menuli" id="lab-2">SALA STAMPA</a></div>');
document.write('</div>');
document.write('<div id="va-content"><div id="va-content-in">');
myHtmlSl += '<div class="va-row">';myHtmlSl += '<div class="va-title">28 gennaio 2015</div>';myHtmlSl += '<div class="va-text"><a style="color: #774e2e !important;" href="http://w2.vatican.va/content/francesco/it/audiences/2015/documents/papa-francesco_20150128_udienza-generale.html" target="_blank">Udienza Generale del 28 gennaio 2015</a></div>';myHtmlSl += '</div>';myHtmlSl += '<div class="va-row">';myHtmlSl += '<div class="va-title">27 gennaio 2015</div>';myHtmlSl += '<div class="va-text"><a style="color: #774e2e !important;" href="http://w2.vatican.va/content/francesco/it/cotidie/2015/documents/papa-francesco-cotidie_20150127_il-cibo-di-gesu.html" target="_blank">Il cibo di Gesù (27 gennaio 2015)</a></div>';myHtmlSl += '</div>';myHtmlSl += '<div class="va-row">';myHtmlSl += '<div class="va-title">26 gennaio 2015</div>';myHtmlSl += '<div class="va-text"><a style="color: #774e2e !important;" href="http://w2.vatican.va/content/francesco/it/cotidie/2015/documents/papa-francesco-cotidie_20150126_tutto-merito-delle-donne.html" target="_blank">Tutto merito delle donne (26 gennaio 2015)</a></div>';myHtmlSl += '</div>'; 
document.write('</div></div>');
document.write('<div id="va-twitter"><a href="javascript:vaShowClose(\'twitter\',\'video\');"><i class="icon-twitter"></i></a></div>');
document.write('<div id="va-video"><a href="javascript:vaShowClose(\'video\',\'twitter\');"><i class="icon-youtube-squared"></i></a></div>');
document.write('<div id="va-calendar"><div><a href="http://www.photogallery.va" target="_blank"><i class="icon-camera" style="margin-right: 5px;"></i></a><a href="http://player.rv.va/?language=it&visual=VaticanTic" target="_blank"><i class="icon-calendar-alt"></i></a></div></div>');

document.write('<div id="va-layer" style="display: none;"></div>');
document.write('<div id="va-twitter-in" style="display: none;"><a href="javascript:vaShowClose(\'twitter\',\'video\');"><img src="http://widgets.vatican.va/w1/img/va-close.png"></a><div id="twitter_div"><ul id="twitter_update_list"><li><span>Auschwitz grida il dolore di una sofferenza immane e invoca un futuro di rispetto, pace ed incontro tra popoli.</span><br><a style=\"font-size:85%\" target=\"_blank\" href=https://twitter.com/Pontifex_it/statuses/560029533277929472>circa 23 ore fa</a></li></ul></div><div id="va-twitter-in-bottom"></div></div>');


document.write('<div id="va-video-in" style="display: none;"><a href="javascript:vaShowClose(\'video\',\'twitter\');"><img src="http://widgets.vatican.va/w1/img/va-close.png"></a><ul><div id="va-video-content"></div></ul><div id="va-video-in-bottom"></div></div>');
document.write('<div id="va-video-hidden" style="display: none;"><iframe width="90%" src="http://www.youtube.com/embed/owPVE0UttTs?rel=0" frameborder="0" allowfullscreen></iframe></div>');

document.write('</div>');
document.write('</div>');

document.getElementById("va-content-in").innerHTML = myHtmlSl;

	var myMenuSmall = "";
	if (document.getElementById("va-widget-va").parentNode.offsetWidth < 250) {
		myMenuSmall += '<select onchange="vaChange(this.value,1); return false;" class="va-menuselect">';myMenuSmall += '<option value="0" selected>NOVIT&#192;</option>';myMenuSmall += '<option value="1">NEWS.VA</option>';myMenuSmall += '<option value="2">SALA STAMPA</option>';myMenuSmall += '</select>';		document.getElementById("va-menu").innerHTML = myMenuSmall;
	}


var pkBaseURL = (("https:" == document.location.protocol) ? "https://analytics.catholica.va/piwik/" : "http://analytics.catholica.va/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));

try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 14);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}


