$=function(_id){return document.getElementById(_id);};
function Ajax(){
	var _transport = null;
	var that = this;
	var _states = ['Uninitialize','Loading','Loaded','Interactive',['Failure','Success']];
	try{_transport=new XMLHttpRequest();}catch(e){try{_transport = new ActiveXObject('Msxml2.XMLHTTP');}catch(e){try{_transport = new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
	this.stateChange=function(){
		var r =_transport.readyState;
		var evt=_states[r];
		if(r==4)var evt=evt[_transport.status==200?1:0];
		that.Options['on'+evt](_transport);
	};
	if(_transport!=null) _transport.onreadystatechange=this.stateChange;
	
	this.transport=_transport;
	this._request=function(uri,options){
		if(this.transport==null) return;
		for(var i in options) this.Options[i]=options[i];
		this.transport.open(this.Options.method, uri, this.Options.asynchronous);
		this.transport.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
		this.transport.setRequestHeader("Referer", document.location.href);
		this.transport.setRequestHeader("X-Requested-With", 'ViteSpiate Ajax Service');
		this.send(this.Options.postBody||null);
		if (!this.Options.asynchronous && this.transport.overrideMimeType) this.stateChange();
	};
}

function createXmlHttpRequest() {
	if (typeof XMLHttpRequest != "undefined")
		return new XMLHttpRequest();
	var xhrVersion = [ "MSXML2.XMLHttp.5.0", "MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp" ];
	for (var i = 0; i < xhrVersion.length; i++) {
		try {
			var xhrObj = new ActiveXObject(xhrVersion[i]);
			return xhrObj;
		} catch (e) { }
	}
	raiseEvent("FatalError");
	return null;
};



Ajax.prototype={       
	Options:{
		onUninitialize:function(){},
		onLoading:function(){},
		onLoaded:function(){},
		onInteractive:function(){},
		onSuccess:function(){},
		onFailure:function(){},
		method:'post',
		postBody:null,
		asynchronous:true,
		valorize:function(n,v){Ajax.prototype[n]=v;}
	},
    request:function(uri,options){
		this._request(uri,options);
	},
	update:function(uri,el,options){
		var success=options.onSuccess||function(){};
		options.onSuccess=function(t){
			el.innerHTML=t.responseText;
			success(t);
		};
		this._request(uri,options);
	},
	send:function(data){
		data=''+data;
		this.transport.setRequestHeader("Content-Length", data.length);
		this.transport.send(data);
	},
	close:function(){if (this.transport) this.transport.abort();}
};

// JavaScript Document

//Shows the login screen
function showLogin() {
	var login=$('loginScreen').style;
	if (login.display == 'block') {
		fadeScreen('none');
		login.display = 'none';
	}else{
		fadeScreen('block');
		login.display = 'block';
		var iframe=get_iframe('loginframe');
		//iframe.window.focus();
		iframe.getElementById('nickname').focus();
	}
}

function showMap() {
	var map=$('modalMap').style;
	fadeScreen('block');
	map.display = 'block';
}

function showPopGen(name) {
	var map=$(name).style;
	fadeScreen('block');
	map.display = 'block';
}

function get_iframe(iframe) {
    var iframe = $(iframe);
	var doc = iframe.contentWindow || iframe.contentDocument;
    if(doc.document) doc=doc.document;
	return doc;
}

//Change profile popup
function changeProfile() {
	var change_prof=$('changeProfile').style;
	
		fadeScreen('block');
		change_prof.display = 'block';
	
}


/*function bannerRefresh(webcam_id) {
	if (webcam_id) {
		$('banner_bottom').src = 'http://www.vitespiate.com/banner/locations/468_60.php?webcam_id='+webcam_id;
		$('banner_top').src = 'http://www.vitespiate.com/banner/locations/728_90.php?webcam_id='+webcam_id;
	}else{
		$('banner_bottom').src = $('banner_bottom').src;
		$('banner_top').src = $('banner_top').src
	}
}*/

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
{
// code for IE7+, Firefox, Chrome, Opera, Safari
return new XMLHttpRequest();
}
if (window.ActiveXObject)
{
// code for IE6, IE5
return new ActiveXObject("Microsoft.XMLHTTP");
}
return null;
}

//add user id
function addUsDwn(){
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null){
		alert ("Your browser does not support XMLHTTP!");
		return;
	}
	var url="invite_dwn.php";
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}


//switch webcam
function changeWebcam(wid,selW) {
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null){
		alert ("Your browser does not support XMLHTTP!");
		return;
	}

	//set all breadcam grey
	var numWeb = $('jwebcams').innerHTML
	numWeb = Number(numWeb)
	//alert(typeof(numWeb))
	for(var i=1;i<=numWeb;i++){
		$('wc'+[i]).className='acam';
	}
	$('wc'+selW).className='acam2';
	var url="../../../../../ajax/change_webcam.php?webcam_id="+wid;
	xmlhttp.onreadystatechange=function() {
	if (xmlhttp.readyState==4) {
		var reply=xmlhttp.responseText;
		var replyarr=reply.split('|*|');
		var camattiva=replyarr[1].split(' ');
		$('core_title').innerHTML = '&nbsp;&nbsp;'+replyarr[1];
		$('webcam_iframe').src = 'http://www.vitespiate.com/ajax/switch_webcam.php?url='+replyarr[0];
		//document.frames["banner_bottom"].location.reload(true);
		
	}
	
	
	}
	bannerRefresh(wid);
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}


//Change mail popup
function changeEmail() {
	var change_mail=$('changeEmail').style;

		
		fadeScreen('block');
		change_mail.display = 'block';
	
}

//Change pass popup
function changePass() {
	var change_pass=$('changePass').style;
	fadeScreen('block');
	change_pass.display = 'block';
}

//Fade out the viewport
function fadeScreen(status) {
	$('fadeScreen').style.display = status;
}

//Close all popups
function closePopups(lyname) {
	fadeScreen('none');
	$(lyname).style.display = 'none';
	$('credits').style.display = 'none';
	$('modalMap').style.display = 'none';
	$('modalPrenota').style.display = 'none';
	$('responsvoti').style.display = 'none';
	$('textok').style.display = 'none';
	$('textno').style.display = 'none';
	$('textScreen').style.display = 'none';
	$('loginScreen').style.display = 'none';	
	$('changeEmail').style.display = 'none';
	$('changePass').style.display = 'none';
	$('changeProfile').style.display = 'none';
}
function closePop(layer) {
	fadeScreen('none');
	var lay = layer
	$(lay).style.display = 'none';
}
//Close all popups
function closePopups1() {
	fadeScreen('none');
	$('mailScreen').style.display = 'none';
}

//Show Locations full texts
function showLocations() {
	$('talent_short').style.display = 'none';
	$('talent_full').style.display = 'block';
	$('lele_short').style.display = 'none';
	$('lele_full').style.display = 'block';
	$('datch_short').style.display = 'none';
	$('datch_full').style.display = 'block';
}


function demoLogin() {
	fadeScreen('block');
	$('signupCall').style.display = 'block';
	
}


////////////////
////////////////
//add text area
function addInput() {
	
	//contorllo che non ci siano campi email vuoti
	var myform = document.singleEl;
	var allMail = ''
	for(var i=0;i<myform.elements.length;i++){
		//'tipo:'+ myform.elements[i].type+' name='+myform.elements[i].name+' value='+myform.elements[i].value+'<br>');
		elmentForm = myform.elements[i].value;
		if(elmentForm==''){
			var vuoto = 1
		}
	} 
	
	if(vuoto != 1){
		//Create an input type dynamically.
		var element = document.createElement("input");
	
		//Assign different attributes to the element.
		element.setAttribute("type", 'text');
		//element.setAttribute("id", 'mail_add');
		element.setAttribute("name", 'mail_add');
		element.setAttribute("class", 'text_invite');
	
		var foo = document.getElementById("fooBar");
	
		//Append the element in page (in span).
		foo.appendChild(element);
	} else {
		alert('Attenzione, devi compilare tutti i campi indicati!')
	}

}

function searchMail(mails){
	
	xmlhttp=createXmlHttpRequest();
	
	if(mails=='single'){
		var myform = document.singleEl;
		var allMail = ''
		for(var i=0;i<myform.elements.length;i++){
			//'tipo:'+ myform.elements[i].type+' name='+myform.elements[i].name+' value='+myform.elements[i].value+'<br>');
			elmentForm = myform.elements[i].value;
			if(elmentForm!=''){
				allMail += elmentForm+'||';
			}
		} 
	}else{
		allMail= mails
	}
	
	if(allMail!=''){
		//alert(allMail)	
		if (xmlhttp==null){
			alert ("Your browser does not support XMLHTTP!");
			return;
		}
	
		var url="../ajax/check_mail_friend.php";
		
		xmlhttp.open('POST',url,true) 
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", allMail.length);
		xmlhttp.setRequestHeader("Connection", "close");
		
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) {
				var reply=xmlhttp.responseText;
				
				var login=$('mailScreen').style;
				fadeScreen('block');
				login.display = 'block';
				$('resultMail').innerHTML = reply;
				$('close_ref').innerHTML = '<a href="Invita-un-amico"><img src="img/close.png" border="0" alt="" /></a>';
			}
		
		}
		xmlhttp.send('allMail='+allMail);
		
	} else {		
		var login=$('mailScreen').style;
		fadeScreen('block');
		login.display = 'block';
		$('resultMail').innerHTML = 'Attenzione, devi inserire tutti i dati in modo corretto!';
	}
}


function send_mail_invite(){
	
	xmlhttp=GetXmlHttpObject();

	var myform = document.sendMail_fin;
	var allMail = ''
	for(var i=0;i<myform.elements.length;i++){
		if(myform.elements[i].checked){
			elmentForm = myform.elements[i].value;
			if(elmentForm!=''){
				allMail += elmentForm+'||';
			}
		}
	} 
	//alert(allMail)
	if(allMail!=''){
		if (xmlhttp==null){
			alert ("Your browser does not support XMLHTTP!");
			return;
		}
	
		var url="../ajax/send_invite.php?mail="+allMail;
		xmlhttp.onreadystatechange=function() {
			
			$('resultMail').innerHTML = '<br />Stiamo procedendo all\'invio degli inviti.<br /><br /><img src="img/loader.gif">';
			
			if (xmlhttp.readyState==4) {
				var reply=xmlhttp.responseText;
				
				var login=$('mailScreen').style;
				fadeScreen('block');
				login.display = 'block';
				$('resultMail').innerHTML = '<br />E-mail inviate correttamente!';
				
				//change the close popup
				$('close_ref').innerHTML = '<a href="Invita-un-amico"><img src="img/close.png" border="0" alt="" /></a>';
			}
		
		}
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}
}

function send_invite(mode){
	
	//xmlhttp=GetXmlHttpObject();
	var xmlhttp=createXmlHttpRequest();
	
	var login=$('mailScreen').style;
	fadeScreen('block');
	login.display = 'block';
	
	var myPre = '<br />Stiamo procedendo alla ricerca dei tuoi contatti.<br /><br /><img src="img/loader.gif">';
		
	if(mode==1){
		var modeSend=document.social_sel.social.options[document.social_sel.social.selectedIndex].value;
		var mailSend = document.social_sel.email_box.value;
		var pwdSend = document.social_sel.password_box.value;
		
		$('preload').innerHTML = myPre;
		
		//send var for session
		var url='ajax/setpsw.php';
		var dataSend='mailBox1='+mailSend+'&pwdBox1='+pwdSend+'&modeSend1='+modeSend;
		xmlhttp.open('POST',url,true) 
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", dataSend.length);
		xmlhttp.setRequestHeader("Connection", "close");
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) {
				$('resultMail').innerHTML = '<iframe marginheight="0" scrolling="no" allowtransparency="true" class="frameMail" frameborder="0" id="frameSocial" src="../invitefriend/check_open_social.php"></iframe>';
			}
		}
		xmlhttp.send(dataSend);		
				
	}else{
		
		$('resultMail').innerHTML = myPre;
		var mailSend = document.emailer_sel.email_box.value;
		var pwdSend = document.emailer_sel.password_box.value;
		
		//var url='../invitefriend/check_open.php?mailBox='+mailSend+'&pwdBox='+pwdSend;
		var url='../invitefriend/check_open.php';
		var dataSend = 'mailBox='+mailSend+'&pwdBox='+pwdSend;
	}
	
	if(mode!=1 || mode==3){
		if(mailSend!='' && pwdSend!=''){
			if (xmlhttp==null){
				alert ("Your browser does not support XmlHttp!");
				return;
			}
			
			xmlhttp.open('POST',url,true) 
			xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlhttp.setRequestHeader("Content-length", dataSend.length);
			xmlhttp.setRequestHeader("Connection", "close");
	
			xmlhttp.onreadystatechange=function() {
				
				if (xmlhttp.readyState==4) {
					var reply=xmlhttp.responseText;
					
					//il risultato lo parso con la funzione di prima
					searchMail(reply);
					
				}
			
			}
			
			//xmlhttp.open("GET",url,true);
			xmlhttp.send(dataSend);		
			
		} else {
			alert('Devi inserire i dati corretti')
		}
	}
	
}
/*function send_invite(mode){
	
	xmlhttp=GetXmlHttpObject();
	
	var login=$('mailScreen').style;
	fadeScreen('block');
	login.display = 'block';
	
	var myPre = '<br />Stiamo procedendo alla ricerca dei tuoi contatti.<br /><br /><img src="img/loader.gif">';
	
	if(mode==3){
		var url='provapost.php';
		var params = 'mio=ciaooo';
	}
	
	if(mode!=1 || mode==3){
		
			if (xmlhttp==null){
				alert ("Your browser does not support !");
				return;
			}
	
			xmlhttp.onreadystatechange=function() {
				
				if (xmlhttp.readyState==4) {
					var reply=xmlhttp.responseText;
					
					//il risultato lo parso con la funzione di prima
					searchMail(reply);
					
				}
			
			}
			
			xmlhttp.open("POST",url,true);
			xmlhttp.send(params);		
			
	}
}*/



function openText(type){
	xmlhttp=GetXmlHttpObject()
	
	var url="../file_popup.php?type="+type;
	xmlhttp.onreadystatechange=function() {
		
		if (xmlhttp.readyState==4) {
			var reply=xmlhttp.responseText;
			
			var login=$('textScreen').style;
			fadeScreen('block');
			login.display = 'block';
			$('resultTxt').innerHTML = reply;
			
		}
	
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);

}
////////////////
////////////////
///invia il voto allo spiato per quella location
function voteSpied(id){
	xmlhttp=GetXmlHttpObject();
	if (xmlhttp==null){
		alert ("Your browser does not support XMLHTTP!");
		return;
	}
	
	var mydiv = 'vote_'+id;
	var num = $(mydiv).value;
	
	if(num>0){
		var url="http://www.vitespiate.com/ajax/vota_spiati.php?id="+id+'&num='+num;
		xmlhttp.onreadystatechange=function() {
			
			if (xmlhttp.readyState==4) {
				var reply=xmlhttp.responseText;
				
				var totCredit = reply.split('||')

				//svuoto il campo se andato a buon fine
				if(totCredit[0]=='1'){
					var myinput = 'vote_'+id
					$(myinput).value = ''
					//aggiorno i voti nella pagina senza refresh
					$('totCredits').innerHTML = totCredit[1]
				}
				
				if(totCredit[0]=='0'){
					// errore generico
					//alert('Attenzione: errore imprevisto, ritenta.')
					
					//fermo le votazioni per manutenzione
					var login=$('modalstopVote').style;
					fadeScreen('block');
					login.display = 'block';
					
				}else{
					xmlhttp1=GetXmlHttpObject();
					//mando il risultato alla pagina di risposta per avere il testo ok o no
					var url="http://www.vitespiate.com/ajax/voti_result.php?result="+reply;
					xmlhttp1.onreadystatechange=function() {
						
						if (xmlhttp1.readyState==4) {
							var replyCred=xmlhttp1.responseText;
							//crediti non sufficenti
							var login=$('responsvoti').style;
							fadeScreen('block');
							login.display = 'block';
							$('respvoti').innerHTML = replyCred
						}
						
					}
					
					xmlhttp1.open("GET",url,true);
					xmlhttp1.send(null);
				}
				
			}
		
		}
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}else{
		alert('Attenzione: devi inserire un valore di crediti corretto.')
	}
}


function isNumberKey(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57))
	if (charCode!=13)
	return false;
	
	return true;
}


/////////////////////
//get last vote user



function getvotes(metodo){
	document.modevot = metodo
	getvotes1()
}
function getvotes1(){
	xmlhttp=GetXmlHttpObject()
	
	// se arriva dalla pagina chat degli spiati
	switch(document.modevot){
		case '1':
			var url="http://www.vitespiate.com/get_last_user_vote.php?spiati=1";
			break;
		
		case '2':
			var url="http://www.vitespiate.com/get_last_user_vote.php?spiati=2";
			break;
		
		default:
			var url="http://www.vitespiate.com/get_last_user_vote.php";
	}
	
	//var url="../get_last_user_vote.php";
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			var reply=xmlhttp.responseText;
			$('getvotes').innerHTML = reply;
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
	//aggiorno la richiesta
	
	window.setTimeout('getvotes1('+document.modevot+')',10000);
}


//get last vote user
/////////////////////

function prenota(loc,type){
	xmlhttp=GetXmlHttpObject()
	if(type==0){
		var url="http://www.vitespiate.com/ajax/prenota.php?loc="+loc;
	}else{
		var url="http://www.vitespiate.com/ajax/prenota.php?ok=1&loc="+loc;
	}

	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			var reply=xmlhttp.responseText;
			var login=$('modalPrenota').style;
			fadeScreen('block');
			login.display = 'block';
			$('resultPren').innerHTML = reply;
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function chatupdus(tipo){
	xmlhttp=GetXmlHttpObject()
	var url="../maintenance/chatupd.php";
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			var reply=xmlhttp.responseText;
			if(reply==1){
				if(tipo){
					parent.location.href=tipo
				}else{
					top.location.reload(true);
				}
			}
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}

function reloadBann(start){
	var timereload = 20000
	if(start){
		window.location.reload()
	}
	setTimeout("reloadBann('1')", timereload)
	return
}

function sendSurvey(id){
	var xmlhttp=GetXmlHttpObject()
	var formm = document.forms['form_'+id].elements['check_'+id]
	
	for (var i=0; i < formm.length; i++){
		if (formm[i].checked){
			var rad_val = formm[i].value;
		}
	}
	if(!rad_val){
		alert('Attenzione devi selezionare almeno una risposta.')
	}else{
		//procedo se è stato selezionato un check
		var url="http://www.vitespiate.com/ajax/send_survey.php?ris="+rad_val+'&dom='+id;
		//alert(rad_val)
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4) {
				var reply=xmlhttp.responseText;
				
				if(reply==1){
					document.location = 'http://www.vitespiate.com/Sondaggi';
				}else if(reply==0){
					alert("Errore imprevisto, ritenta.")
				}else if(reply==2){
					var login=$('survey').style;
					fadeScreen('block');
					login.display = 'block';
				}
			}
		}
		xmlhttp.open("GET",url,true);
		xmlhttp.send(null);
	}
}
function checkRes(){
	//var myres=screen.width;
	
	if (parseInt(navigator.appVersion)>3) {
		var screenW = window.screen.width;
		//screenH = screen.height;
	}else if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)==3 && navigator.javaEnabled()) {
		var jToolkit = java.awt.Toolkit.getDefaultToolkit();
		var jScreenSize = jToolkit.getScreenSize();
		var screenW = jScreenSize.width;
		//screenH = jScreenSize.height;
	}
	if(screenW>=1280){
		document.getElementById('mybann_dir').style.display = 'block'
	}else{
		document.getElementById('mybann_dir').style.display = 'none'
	}
}

function giornaliero(myid,loc){
	var xmlhttp=GetXmlHttpObject()

	if(myid!=''){
		var url="http://www.vitespiate.com/ajax/get_giornaliero.php?id="+myid+"&loc="+loc;
	}else{
		var url="http://www.vitespiate.com/ajax/get_giornaliero.php?loc="+loc;
	}
	
	//alert(rad_val)
	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4) {
			var reply=xmlhttp.responseText;

			if(reply){
				document.getElementById('giornaliero').innerHTML = reply
			}
		}
	}
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);

}

////////////////////
///* BANNER ROTATOR
function rotatorBannerGen(numero,dimensioni,pos,div){
	
	if(div){
		document._numero=numero
		document._pos=pos
	
		document._dimensioni = dimensioni.split('*')
		document._div = div.split('|')
	}
	
	for(var i=0;i<=document._numero-1;i++){
		
		_dimfin = document._dimensioni[i].split('|')
		var _lung=_dimfin[0];
		var _larg=_dimfin[1];
		
		if(div){
			//document._lung=document._dimfin[0];
			//document._larg=document._dimfin[1];
			//document._pos=pos;
			//document._div=layer[i];
			document._num=numero;
		}
		
		document.getElementById(document._div[i]).innerHTML = '<iframe marginheight="0" scrolling="no" allowtransparency="true" width="'+_lung+'" height="'+_larg+'" frameborder="0" id="frameSocial" src="http://www.vitespiate.com/banner/'+_lung+'_'+_larg+document._pos+'.php"></iframe>'	
	
	}
	
	window.setTimeout("rotatorBannerGen()",20000);
	
}
////////////////////
/*
function getTime() {
	now = new Date();
	y2k = new Date("Jun 16 2010 16:00:00"); //inerisci la data di scadenza (tipo il latte!)
	days = (y2k - now) / 1000 / 60 / 60 / 24;
	daysRound = Math.floor(days);
	daysRound1 = Math.floor(days)+1;
	hours = (y2k - now) / 1000 / 60 / 60 - (24 * daysRound);
	hoursRound = Math.floor(hours);
	minutes = (y2k - now) / 1000 /60 - (24 * 60 * daysRound) -
	(60 * hoursRound);
	minutesRound = Math.floor(minutes);
	seconds = (y2k - now) / 1000 - (24 * 60 * 60 * daysRound)
	- (60 * 60 * hoursRound) - (60 * minutesRound);
	secondsRound = Math.round(seconds);
	sec = (secondsRound == 1) ? " secondi " : " secondi "; //  puoi cambiare il testo tra virgolette 
	min = (minutesRound == 1) ? " minuto " : " minuti "; //  puoi cambiare il testo tra virgolette 
	hr = (hoursRound == 1) ? " ora " : " ore "; //  puoi cambiare il testo tra virgolette 
	dy = (daysRound == 1) ? " giorno " : " giorni " //  puoi cambiare il testo tra virgolette 
	
	document.getElementById('countdown').innerHTML = " Mancano: <em class='treb20'>" + daysRound +"</em>"+ dy +"<em class='treb20'>"+ hoursRound +"</em>"+ hr +"<em class='treb20'>"+ minutesRound +"</em>"+ min +"<em class='treb20'>"+ secondsRound +"</em>"+ sec;
	
	//document.getElementById('coronahome').innerHTML = "-" + daysRound;
	
	newtime = window.setTimeout("getTime();", 1000);
}
*/