/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*						FUNZIONE CHE SI INTERFACCIA CON IL FLASH					*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function goPage(pageName, menuName, page)
{
	parent.SISAL.GNTN.SIG.eraseAllCookie();
	//eraseCookie('_sezione');
	parent.SISAL.unsetCookie('_sezione');
	parent.SISAL.setCookie('_assvirt',{ value: page, days: 5});
	//setCookie('_assvirt', page, '5');
	//setCookie('_sezione', 'PAGE_'+page, '5');
	parent.SISAL.setCookie('_sezione',{ value: 'PAGE_'+page, days: 5});

	parent.location.href="/portal/page/portal/SitoGioco/"+pageName+"?_menutop=MENU_"+menuName+"&_sezione=PAGE_"+page+"&_assvirt="+page+"&_boxinfo="+page+"&_boxpromo="+page+"&_boxinfosmall="+page+"";
}



/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*				BOX 	INFORMAZIONI ULTIMO CONCORSO PAGINA VINCITE DENTRO INFO		*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function Hide_Concorso()
{
	var div = 'UltimoConcorsoInfo_boxRoot_';
	var number = 0;
	for (number=1; number<=3; number++)
	{
		document.getElementById(div + number).style.display = 'none';
	}
}
function Show_Concorso(number)
{
	var div = 'UltimoConcorsoInfo_boxRoot_';
	var elementDiv = document.getElementById(div + number);
	Hide_Concorso();
	elementDiv.style.display = 'block';
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*					FUNZIONI PER LA GESTIONE DEL SALDO DENTRO IL LOGIN PORTLET		*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function getSaldo(_refresh)
{
	if (elementIsNotNull('portalIFrame_PortletLogin'))
		iframeWindow(document.getElementById('portalIFrame_PortletLogin')).getSaldo(_refresh);
}
function isSaldoOpen()
{
	if (elementIsNotNull('portalIFrame_PortletLogin'))
		alert(iframeWindow(document.getElementById('portalIFrame_PortletLogin')).VARshowSaldo);
}
function refreshSaldo()
{
	if (isSaldoOpen)
	{
		getSaldo(true);
	}
}


/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*								REFRESH DEL PORTLET DI LOGIN						*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*
function controlloSessioneScaduta()
{
	filename = "/PVD/pubblico/sessioneScadutaHTML.jsp";
	stringa = filename + "";
	simpleAjaxCall(stringa, 'divControlloSessioneScaduta');
}
*/

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*								REFRESH DEL PORTLET DI LOGIN						*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function refreshPortletLogin()
{
	//var Uri = returnHttpsUrl('/portal/page/portal/SitoGioco_DocLib/ADMIN_page/ssologin');
	//var Uri = returnHttpsUrl('/PVD/pubblico/loginDirettoShow.jsp');
	var Uri = returnUrlWithProtocol('/portal/page/portal/SitoGioco_DocLib/ADMIN_page/ssologin');
	//var refUri = escape(returnHttpsLocation(location.href));
	var refUri = escape(location.href);
	
	if (elementIsNotNull('portalIFrame_PortletLogin'))
		document.getElementById('portalIFrame_PortletLogin').src = Uri + "?refUri=" + refUri;
}


/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*					FUNZIONI PER LA GESTIONE COMPLETA E MOLTO DI PIù DEI MENU						*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var MenuLiv3_explose = '';
function Nascondi_MenuLiv3()
{
	if(!SISAL.isNullOrEmpty(SISAL.getCookie('_sezione')))
	{
		var selectedObject = SISAL.getCookie('_sezione').replace('PAGE_', 'DIV_') + '_href';
	}
	
	LI_element = GetElement('v_mnu_01').getElementsByTagName('a');
	for (i = 0; i < LI_element.length; i++)
	{
		// apre il menu di secondo livello se è stata selezionata una voce di terzo livello
		var Stringa = GetElement(LI_element[i].id).parentNode.parentNode.parentNode.id;
		if (Stringa.search('DIV_') == -1) // selezionata voce di terzo livello
		{
			if (selectedObject == LI_element[i].id)
				GetElement(LI_element[i].id).style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv2_right.png)"; // freccia grigia destra
		}
	}
	
	
	LI_element = GetElement('v_mnu_01').getElementsByTagName('div');
	MenuLiv3_explose = '';
	if(!SISAL.isNullOrEmpty(SISAL.getCookie('_sezione')))
	{
		var selectedObject = SISAL.getCookie('_sezione').replace('PAGE_', 'DIV_');
	}
	
	for (i = 0; i < LI_element.length; i++) // VEDI CICLO
	{
		
		//  nascondo il div del menu di terzo livello
		GetElement(LI_element[i].id).style.display="none";		

		// cambio la grafica del menu di secondo livello mettendo la freccia a destra
		GetElement(LI_element[i].id+'_href').style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv2_right.png)"; // freccia aranzione 2liv destra
		
		// cambio la grafica dei menu di terzo livello relativi al menu selezionato
		LIV3_element = LI_element[i].getElementsByTagName('a');
		for (j = 0; j < LIV3_element.length; j++) // VEDI CICLO
		{
			GetElement(LIV3_element[j].id).style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv3_right.png)"; // freccia arancione 3liv destra
		}
		
	}
}
function Mostra_MenuLiv3(nome)
{
	if (nome.search('DIV_') != -1)
	{
		var DIVnome = nome;
	}
	else
	{
		var DIVnome = 'DIV_'+nome;
	}
	
	if (GetElement(DIVnome) != undefined && MenuLiv3_explose != DIVnome)
	{
		//if (DIVnome != 'DIV_GiochiVirtuali') // da togliere se si vuole nascondere il MENU
			//Nascondi_MenuLiv3();
		MenuLiv3_explose = DIVnome;
		GetElement(DIVnome).style.display = "block";
	}
		else
	{
		//Nascondi_MenuLiv3(); // da togliere per bloccare il menu una volta aperto
	}
}
function ControlloCookie_MenuLiv1(_menu, href, _sezione, _content, _assvirt)
{	
	if (GetElement(_menu).className != 'current')
	{
		//setCookie('_sezione', _sezione, '5');
		SISAL.setCookie('_sezione',{ value: _sezione, days: 5});
		//setCookie('_assvirt', _assvirt, '5');
		SISAL.setCookie('_assvirt',{ value: _assvirt, days: 5});
		//eraseCookie('_BoxInformativo');
		SISAL.unsetCookie('_BoxInformativo');
		//eraseCookie('_BoxPromo');
		SISAL.unsetCookie('_BoxPromo');
		//eraseCookie('_BoxInfoSmall');
		SISAL.unsetCookie('_BoxInfoSmall');
		
		return href + "&_visibleAssVirt=" + SISAL.getCookie('visibleAssVirt');
	}
	
	return ('javascript: void 0;');
}

var DIVbackgroundImage = '';
function SetImage_MenuLiv2(object, nome)
{
	/*
	var PAGEnome = 'PAGE_'+nome;
	var DIVnome = 'DIV_'+nome;
	var DIVHREFnome = 'DIV_'+nome+'_href';
	
	if (GetElement(DIVnome) != undefined)
	{
		LI_element = GetElement(DIVnome).getElementsByTagName('li');
		
		if (LI_element.length > 0)
		{
			// per Internet Explorer ->> illumina le voci selezionate del menu di secondo e terzo livello
				//object.style.color = "#d91117";
		}
	}
	else	
	{
		// per Internet Explorer ->> illumina le voci selezionate del menu di secondo e terzo livello
			//GetElement(DIVHREFnome).style.color = "#d91117";
	}
	*/
}
function ResetImage_MenuLiv2(object, nome)
{
	var PAGEnome = 'PAGE_'+nome;
	var DIVnome = 'DIV_'+nome;
	var DIVHREFnome = 'DIV_'+nome+'_href';
	
	// per Internet Explorer ->> illumina le voci selezionate del menu di secondo e terzo livello
		//GetElement(DIVHREFnome).style.color = "#5c5c5c";
		//object.style.color = "#5c5c5c";
	
}

// Seleziona il link scelto dall'utente del menu di livello 1 TOP
var IdSelected_forMenu = "";
function Select_MenuLiv3_FromName(_menuname)
{
	// nasconde tutti i menu di liv3
	Nascondi_MenuLiv3();
	
	//alert("verifico: " + IdSelected_forMenu.id);
	if (IdSelected_forMenu.id != "undefined")
	{
		//alert("spengo: " + IdSelected_forMenu.id);
		IdSelected_forMenu.className = "v_mnu_01";
	}
	
	// apre il menu di secondo livello se è stata selezionata una voce di terzo livello
	var Stringa = GetElement(_menuname).parentNode.parentNode.parentNode.parentNode.id;
	if (Stringa != '')
	{
		// illumino la voce di secondo livello se selezionata una voce di terzo livello
		if (Stringa != 'v_mnu_01')
		{
			GetElement(Stringa+'_href').style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv2_downC.png)"; // freccia rossa basso
		}
		Mostra_MenuLiv3(Stringa);
	}
	
	// apre il menu di secondo livello se è stata visualizzata una voce di secondo livello che contiene anche terzi livelli
	var DIVnome = 'DIV_'+_menuname.substr(5,_menuname.length);
	if (GetElement(DIVnome) != undefined)
	{
		LI_element = GetElement(DIVnome).getElementsByTagName('li');
		
		if (LI_element.length > 0)
		{
			
			Mostra_MenuLiv3(DIVnome);
		}
	}
	
	if (GetElement(_menuname) != null)
	{
		IdSelected_forMenu = GetElement(_menuname);
		// se il parente è un "LI" significa che stò guardando un menu di terzo livello
		if (GetElement(_menuname).parentNode.parentNode.nodeName == "LI")
		{
			GetElement(_menuname).className = "v_mnu_02_sel";
			
			// illumina la freccia di arancione per il menu di terzo livello..
			var DIVHREFnome = 'DIV_'+_menuname.replace('PAGE_','')+'_href';
			GetElement(DIVHREFnome).style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv3_rightC.png)"; // freccia aranzione destra
		}
		else
		{
			GetElement(_menuname).className = "v_mnu_01_sel";
			
			// illumina la freccia di rosso per il menu di secondo livello..
			var DIVHREFnome = 'DIV_'+_menuname.replace('PAGE_','')+'_href';
			GetElement(DIVHREFnome).style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv2_rightC.png)"; // freccia rossa destra
		}
	}
	
	
}

function refreshPage(obj, PageName, idName, _menutop, _assvirt, _BoxInformativo, _BoxPromo, _BoxInfoSmall, menu2liv, numeroconto, pageprofile)
{	
	// seleziona la voce sul menu
	Select_MenuLiv3_FromName('PAGE_'+idName);
		
	// setto il contenuto che voglio visualizzare
	//setCookie('_sezione', 'PAGE_'+idName, '5');
	SISAL.setCookie('_sezione',{ value: 'PAGE_'+idName, days: 5});
	// setto il contenuto che voglio visualizzare
	//setCookie('_BoxInformativo', _BoxInformativo, '5');
	SISAL.setCookie('_BoxInformativo',{ value: _BoxInformativo, days: 5});
	// setto il contenuto dell'assistente virtuale che voglio visualizzare
	//setCookie('_assvirt', _assvirt, '5');
	SISAL.setCookie('_assvirt',{ value: _assvirt, days: 5});
	// setto il contenuto che voglio visualizzare
	//setCookie('_BoxPromo', _BoxPromo, '5');
	SISAL.setCookie('_BoxPromo',{ value: _BoxPromo, days: 5});
	// setto il contenuto che voglio visualizzare
	//setCookie('_BoxInfoSmall', _BoxInfoSmall, '5');
	SISAL.setCookie('_BoxInfoSmall',{ value: _BoxInfoSmall, days: 5});

	/*
	if (menu2liv != '')
	{
		var PageName = menu2liv + ' <span class="menu_pagepath"> > </span> ' + PageName;
	} else
	{
		var PageName = PageName;
	}
	// cambio il nome della pagina all'interno del pagepath
	if (elementIsNotNull('pagepath_pagename'))
	{
		document.getElementById('pagepath_pagename').innerHTML = PageName;
		var PageName_Padre = '';
		try
		{
			document.getElementById('pagepath_pagename_padre').innerHTML = PageName_Padre;
		}
		catch (oException)
	   {
			//Non trova l'elemento ma vado avanti lo stesso
	   }
	}
	*/
	
	var pagepath_pagename = document.getElementById('pagepath_pagename');
	if (menu2liv != '')
	{
		var PagePath_text = '<span id="pagepath_pagename_padre" class="menu_pagepath_nolink">'+menu2liv+'</span><img alt=">" src="/sitogioco/Immagini/Comune/pagePath_separator.gif" style="border:0px;vertical-align:middle;"><span class="menu_pagepath_nolink">'+PageName+'</span></span>';
	} else
	{
		var PagePath_text = '<span class="menu_pagepath_nolink">'+PageName+'</span>';
	}
	// cambio il nome della pagina all'interno del pagepath
	if (elementIsNotNull('pagepath_pagename'))
		pagepath_pagename.innerHTML = PagePath_text;
	

	// aggiorno l'iFrame per le FAQcorrelate
	if (elementIsNotNull("portalIFrame_FAQcorrelate"))
	{
		document.getElementById("portalIFrame_FAQcorrelate").src = '/portal/page/portal/SitoGioco_DocLib/Contenuti/FAQcorrelate?FAQcorrelata=' + idName;
	}

	// refresh del contenuto centrale (Box Informativo) della paginas
	if (_BoxInformativo != '' && elementIsNotNull("portalIFrame_BoxInformativo"))
	{
		if ((numeroconto!= '') && (pageprofile == 1))
			document.getElementById("portalIFrame_BoxInformativo").src = "/portal/page/portal/SitoGioco_DocLib/Contenuti/BoxInformativo/"+_BoxInformativo+"p?numeroconto="+numeroconto;
		else
			document.getElementById("portalIFrame_BoxInformativo").src = "/portal/page/portal/SitoGioco_DocLib/Contenuti/BoxInformativo/"+_BoxInformativo+"?numeroconto="+numeroconto;
			
		document.getElementById("portalIFrame_BoxInformativo").height = getDIMENSIONE_BOX('info', _BoxInformativo);
	}
	else
		if (elementIsNotNull("portalIFrame_BoxInformativo"))
			document.getElementById("portalIFrame_BoxInformativo").src = "/images/pobtrans.gif";
	
	// refresh del contenuto centrale (Box Promo) della pagina
	if (_BoxPromo != '' && elementIsNotNull("portalIFrame_BoxPromo"))
	{
		if ((numeroconto!= '') && (pageprofile == 1))
			document.getElementById("portalIFrame_BoxPromo").src = "/portal/page/portal/SitoGioco_DocLib/Contenuti/BoxPromo/"+_BoxPromo+"p";
		else 
			document.getElementById("portalIFrame_BoxPromo").src = "/portal/page/portal/SitoGioco_DocLib/Contenuti/BoxPromo/"+_BoxPromo;
		//document.getElementById("portalIFrame_BoxPromo").height = getDIMENSIONE_BOX('promo', _BoxPromo);
	}
	else
		if (elementIsNotNull("portalIFrame_BoxPromo"))
			document.getElementById("portalIFrame_BoxPromo").src = "/images/pobtrans.gif";
	
	// refresh del contenuto centrale (Box Info Small) della pagina
	if (_BoxInfoSmall != '' && elementIsNotNull("portalIFrame_BoxInfoSmall"))
	{
		if ((numeroconto!= '') && (pageprofile == 1))
			document.getElementById("portalIFrame_BoxInfoSmall").src = "/portal/page/portal/SitoGioco_DocLib/Contenuti/BoxInfoSmall/"+_BoxInfoSmall+"p";
		else
			document.getElementById("portalIFrame_BoxInfoSmall").src = "/portal/page/portal/SitoGioco_DocLib/Contenuti/BoxInfoSmall/"+_BoxInfoSmall;
		
		document.getElementById("portalIFrame_BoxInfoSmall").height = getDIMENSIONE_BOX('infosmall', _BoxInfoSmall);
	}
	else
		if (elementIsNotNull("portalIFrame_BoxInfoSmall"))
			document.getElementById("portalIFrame_BoxInfoSmall").src = "/images/pobtrans.gif";
	
	var _visibleAssVirt = SISAL.getCookie("visibleAssVirt");
	
	
/*
	var pageURL_Login = new Array();
	pageURL_Login["MENU_SUPERENALOTTOSUPERSTAR"] =	"javascript:refreshPortlet('1061_824616_1061_756799_756799-1061_803460_1061_803408_803408','http%3A%2F%2Fassvil01.sisal.it%3A7777%2Fportal%2Fpage%2Fportal%3F_esiReqType%3D3%26_mode%3D10%26_cpage_id%3D756799%26_csite_id%3D1061%26_cstyle_id%3D1%26_cstyle_site_id%3D1061%26_ccalledfrom%3D1%26_cmode%3D3%26_ctabstring%3D%26_cdisplay_name%3Dsuperenalottosuperstar%26token%3D%26numeroconto%3D%26logout%3D%26_provider_id%3D654991380%26_portlet_id%3D824613%26_has_title_region%3D0%26_has_border%3D0%26_refresh_url%3D%26_curl%3Dhttp%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fsuperenalottosuperstar%26_pref%3D1061_824616_1061_756799_756799%26_reference_path%3D784691_824613_654991380%26_show_edit_link%3D1%26_details%3D1%26_help%3D1%26_about%3D1%26_refresh_portlet%3D1%26_remove%3D0%26_collapse%3D0%26_collapsed%3D0%26_cpp._assvirt%3DSchedina%26_cpp._visibleAssVirt%3D%26_cpp._boxinfo%3DSchedina%26_cpp._boxpromo%3DSchedina%26_cpp._boxinfosmall%3DSchedina%26_cpp._menutop%3DMENU_SUPERENALOTTOSUPERSTAR%26_cpp._sezione%3DPAGE_Schedina');";
	pageURL_Login["MENU_INFO"] =					"javascript:refreshPortlet('1061_824616_1061_756787_756787-1061_803460_1061_803408_803408','http%3A%2F%2Fassvil01.sisal.it%3A7777%2Fportal%2Fpage%2Fportal%3F_esiReqType%3D3%26_mode%3D10%26_cpage_id%3D756787%26_csite_id%3D1061%26_cstyle_id%3D1%26_cstyle_site_id%3D1061%26_ccalledfrom%3D1%26_cmode%3D3%26_ctabstring%3D%26_cdisplay_name%3Dinfo%26token%3D%26numeroconto%3D%26logout%3D%26_provider_id%3D654991380%26_portlet_id%3D824613%26_has_title_region%3D0%26_has_border%3D0%26_refresh_url%3D%26_curl%3Dhttp%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Finfo%26_pref%3D1061_824616_1061_756787_756787%26_reference_path%3D784691_824613_654991380%26_show_edit_link%3D1%26_details%3D1%26_help%3D1%26_about%3D1%26_refresh_portlet%3D1%26_remove%3D0%26_collapse%3D0%26_collapsed%3D0%26_cpp._assvirt%3D%26_cpp._visibleAssVirt%3D%26_cpp._boxinfo%3DIlGioco%26_cpp._boxpromo%3DIlGioco%26_cpp._boxinfosmall%3DIlGioco%26_cpp._menutop%3DMENU_INFO%26_cpp._sezione%3DPAGE_IlGioco');";
	pageURL_Login["MENU_SERVIZI"] = 				"javascript:refreshPortlet('1061_824616_1061_756790_756790-1061_803460_1061_803408_803408','http%3A%2F%2Fassvil01.sisal.it%3A7777%2Fportal%2Fpage%2Fportal%3F_esiReqType%3D3%26_mode%3D10%26_cpage_id%3D756790%26_csite_id%3D1061%26_cstyle_id%3D1%26_cstyle_site_id%3D1061%26_ccalledfrom%3D1%26_cmode%3D3%26_ctabstring%3D%26_cdisplay_name%3Dservizi%26token%3D%26numeroconto%3D%26logout%3D%26_provider_id%3D654991380%26_portlet_id%3D824613%26_has_title_region%3D0%26_has_border%3D0%26_refresh_url%3D%26_curl%3Dhttp%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fservizi%26_pref%3D1061_824616_1061_756790_756790%26_reference_path%3D784691_824613_654991380%26_show_edit_link%3D1%26_details%3D1%26_help%3D1%26_about%3D1%26_refresh_portlet%3D1%26_remove%3D0%26_collapse%3D0%26_collapsed%3D0%26_cpp._assvirt%3D%26_cpp._visibleAssVirt%3D%26_cpp._boxinfo%3DRSS%26_cpp._boxpromo%3DRSS%26_cpp._boxinfosmall%3DRSS%26_cpp._menutop%3DMENU_SERVIZI%26_cpp._sezione%3DPAGE_RSS');";
	pageURL_Login["MENU_PROMONLINE"] = 				"javascript:refreshPortlet('1061_824616_1061_756793_756793-1061_803460_1061_803408_803408','http%3A%2F%2Fassvil01.sisal.it%3A7777%2Fportal%2Fpage%2Fportal%3F_esiReqType%3D3%26_mode%3D10%26_cpage_id%3D756793%26_csite_id%3D1061%26_cstyle_id%3D1%26_cstyle_site_id%3D1061%26_ccalledfrom%3D1%26_cmode%3D3%26_ctabstring%3D%26_cdisplay_name%3Dpromonline%26token%3D%26numeroconto%3D%26logout%3D%26_provider_id%3D654991380%26_portlet_id%3D824613%26_has_title_region%3D0%26_has_border%3D0%26_refresh_url%3D%26_curl%3Dhttp%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fpromonline%26_pref%3D1061_824616_1061_756793_756793%26_reference_path%3D784691_824613_654991380%26_show_edit_link%3D1%26_details%3D1%26_help%3D1%26_about%3D1%26_refresh_portlet%3D1%26_remove%3D0%26_collapse%3D0%26_collapsed%3D0%26_cpp._assvirt%3D%26_cpp._visibleAssVirt%3D%26_cpp._boxinfo%3DPromo1%26_cpp._boxpromo%3DPromo1%26_cpp._boxinfosmall%3DPromo1%26_cpp._menutop%3DMENU_PROMONLINE%26_cpp._sezione%3DPAGE_Promo1');";
	pageURL_Login["MENU_COMMUNITY"] = 				"";
	pageURL_Login["MENU_ISTITUZIONALE"] = 			"javascript:refreshPortlet('1061_824616_1061_756759_756759-1061_803460_1061_803408_803408','http%3A%2F%2Fassvil01.sisal.it%3A7777%2Fportal%2Fpage%2Fportal%3F_esiReqType%3D3%26_mode%3D10%26_cpage_id%3D756759%26_csite_id%3D1061%26_cstyle_id%3D1%26_cstyle_site_id%3D1061%26_ccalledfrom%3D1%26_cmode%3D3%26_ctabstring%3D%26_cdisplay_name%3Dpagineistituzionali%26token%3D%26numeroconto%3D%26logout%3D%26_provider_id%3D654991380%26_portlet_id%3D824613%26_has_title_region%3D0%26_has_border%3D0%26_refresh_url%3D%26_curl%3Dhttp%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fpagineistituzionali%26_pref%3D1061_824616_1061_756759_756759%26_reference_path%3D784691_824613_654991380%26_show_edit_link%3D1%26_details%3D1%26_help%3D1%26_about%3D1%26_refresh_portlet%3D1%26_remove%3D0%26_collapse%3D0%26_collapsed%3D0%26_cpp._boxinfo%3DChiSiamo%26_cpp._boxpromo%3DChiSiamo%26_cpp._boxinfosmall%3DChiSiamo%26_cpp._menutop%3DMENU_ISTITUZIONALE%26_cpp._sezione%3DPAGE_ChiSiamo%26_portletRefresh%3D1061_824616_1061_756759_756759-1061_803460_1061_803408_803408');";
	obj.href = pageURL_Login[_menutop];
*/

	// gestione del refresh del portletLogin
		login.controlloSessioneScaduta()
		if (elementIsNotNull('portalIFrame_PortletLogin'))
		{
			var portalIFrame_PortletLogin = document.getElementById('portalIFrame_PortletLogin');
			portalIFrame_PortletLogin.src = portalIFrame_PortletLogin.src;
		}
	
	// riferimenti della pagina all'assistente virtuale
	//var pageURL_ARRAYassvirt = new Array();
//	pageURL_ARRAYassvirt["MENU_SUPERENALOTTOSUPERSTAR"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756799&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=8._SUPERENALOTTO_SUPERSTAR&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_SUPERENALOTTOSUPERSTAR&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Schedina&_provider_id=654991380&_portlet_id=805901&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F8._SUPERENALOTTO_SUPERSTAR&_pref=1061_805904_1061_756799_756799&_reference_path=775639_805901_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Schedina&_cpp._visibleAssVirt=&_cpp._boxinfo=Schedina&_cpp._boxpromo=Schedina&_cpp._boxinfosmall=Schedina&_cpp._menutop=MENU_SUPERENALOTTOSUPERSTAR&_cpp._sezione=PAGE_Schedina&_portletRefresh=1061_805904_1061_756799_756799-1061_756697_1061_756805_756805";
	/*pageURL_ARRAYassvirt["MENU_SUPERENALOTTOSUPERSTAR"] = "/portal/page/portal%3F_esiReqType=3&_mode=10&_cpage_id=898444&_csite_id=1477&_cstyle_id=1&_cstyle_site_id=1477&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=superenalottosuperstar&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_SUPERENALOTTOSUPERSTAR&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Schedina&_provider_id=40027210&_portlet_id=899673&_has_title_region=0&_has_border=0&_refresh_url=&_curl=https%253A%252F%252Fstage-portal.superenalotto.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fsuperenalottosuperstar&_pref=1477_899676_1477_898444_898444&_reference_path=886529_899673_40027210&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Schedina&_cpp._visibleAssVirt=&_cpp._boxinfo=Schedina&_cpp._boxpromo=Schedina&_cpp._boxinfosmall=Schedina&_cpp._menutop=MENU_SUPERENALOTTOSUPERSTAR&_cpp._sezione=PAGE_Schedina&_reference_path=1477_899676_1477_898444_898444-1477_899661_1477_898452_898452";
	pageURL_ARRAYassvirt["MENU_INFO"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756787&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=2._INFO&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_INFO&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_IlGioco&_provider_id=654991380&_portlet_id=805759&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F2._INFO&_pref=1061_805762_1061_756787_756787&_reference_path=775633_805759_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=&_cpp._visibleAssVirt=&_cpp._boxinfo=IlGioco&_cpp._boxpromo=IlGioco&_cpp._boxinfosmall=IlGioco&_cpp._menutop=MENU_INFO&_cpp._sezione=PAGE_IlGioco&_portletRefresh=1061_805762_1061_756787_756787-1061_756697_1061_756817_756817";
	pageURL_ARRAYassvirt["MENU_SERVIZI"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756790&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=3._SERVIZI&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_SERVIZI&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_RSS&_provider_id=654991380&_portlet_id=805838&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F3._SERVIZI&_pref=1061_805841_1061_756790_756790&_reference_path=775636_805838_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=&_cpp._visibleAssVirt=&_cpp._boxinfo=RSS&_cpp._boxpromo=RSS&_cpp._boxinfosmall=RSS&_cpp._menutop=MENU_SERVIZI&_cpp._sezione=PAGE_RSS&_portletRefresh=1061_805841_1061_756790_756790-1061_756697_1061_756814_756814";
	pageURL_ARRAYassvirt["MENU_PROMONLINE"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756793&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=4._PROMONLINE&_assvirt=&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_PROMONLINE&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Promo1&_provider_id=654991380&_portlet_id=805894&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F4._PROMONLINE&_pref=1061_805897_1061_756793_756793&_reference_path=775638_805894_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=&_cpp._visibleAssVirt=&_cpp._boxinfo=Promo1&_cpp._boxpromo=Promo1&_cpp._boxinfosmall=Promo1&_cpp._menutop=MENU_PROMONLINE&_cpp._sezione=PAGE_Promo1&_portletRefresh=1061_805897_1061_756793_756793-1061_756697_1061_756811_756811";
	pageURL_ARRAYassvirt["MENU_COMMUNITY"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756796&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=5._COMMUNITY&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_COMMUNITY&_provider_id=654991380&_portlet_id=759663&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F5._COMMUNITY&_pref=1061_759666_1061_756796_756796&_reference_path=752117_759663_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Community1&_cpp._visibleAssVirt=&_cpp._boxinfo=Community1&_cpp._boxpromo=Community1&_cpp._boxinfosmall=Community1&_cpp._menutop=MENU_COMMUNITY&_portletRefresh=1061_759666_1061_756796_756796-1061_756697_1061_756808_756808";
	pageURL_ARRAYassvirt["MENU_ISTITUZIONALE"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756759&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=1._PAGINE_ISTITUZIONALI&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_ISTITUZIONALE&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Contatti&_provider_id=654991380&_portlet_id=805885&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F1._PAGINE_ISTITUZIONALI&_pref=1061_805888_1061_756759_756759&_reference_path=775637_805885_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Contatti&_cpp._boxinfo=Contatti&_cpp._boxpromo=Contatti&_cpp._boxinfosmall=Contatti&_cpp._menutop=MENU_ISTITUZIONALE&_cpp._sezione=PAGE_Contatti&_portletRefresh=1061_805888_1061_756759_756759-1061_756697_1061_773455_773455";
	*/
	
	var pageURL_ARRAYassvirt = new Array();
	pageURL_ARRAYassvirt["MENU_SUPERENALOTTOSUPERSTAR"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=808852&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=8._SUPERENALOTTO_SUPERSTAR&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_SUPERENALOTTOSUPERSTAR&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Schedina&_provider_id=992045631&_portlet_id=809494&_has_title_region=0&_has_border=0&_refresh_url=&_curl=https%253A%252F%252Ftestgntn.sisal.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F8._SUPERENALOTTO_SUPERSTAR&_pref=53_810083_53_808852_808852&_reference_path=806507_809494_992045631&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Schedina&_cpp._visibleAssVirt=&_cpp._boxinfo=Schedina&_cpp._boxpromo=Schedina&_cpp._boxinfosmall=Schedina&_cpp._menutop=MENU_SUPERENALOTTOSUPERSTAR&_cpp._sezione=PAGE_Schedina&_portletRefresh=53_810083_53_808852_808852-53_808682_53_808860_808860&_portletRefresh=53_810083_53_808852_808852-53_808682_53_808860_808860";
	pageURL_ARRAYassvirt["MENU_INFO"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=808840&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=2._INFO&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_INFO&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_IlGioco&_provider_id=992045631&_portlet_id=812158&_has_title_region=0&_has_border=0&_refresh_url=&_curl=https%253A%252F%252Ftestgntn.sisal.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F2._INFO&_pref=53_812161_53_808840_808840&_reference_path=807530_812158_992045631&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=&_cpp._visibleAssVirt=&_cpp._boxinfo=IlGioco&_cpp._boxpromo=IlGioco&_cpp._boxinfosmall=IlGioco&_cpp._menutop=MENU_INFO&_cpp._sezione=PAGE_IlGioco&_portletRefresh=53_812161_53_808840_808840-53_808682_53_808874_808874";
	pageURL_ARRAYassvirt["MENU_SERVIZI"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=808843&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=3._SERVIZI&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_SERVIZI&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_RSS&_provider_id=992045631&_portlet_id=812163&_has_title_region=0&_has_border=0&_refresh_url=&_curl=https%253A%252F%252Ftestgntn.sisal.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F3._SERVIZI&_pref=53_810109_53_808843_808843&_reference_path=806510_812163_992045631&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=&_cpp._visibleAssVirt=&_cpp._boxinfo=RSS&_cpp._boxpromo=RSS&_cpp._boxinfosmall=RSS&_cpp._menutop=MENU_SERVIZI&_cpp._sezione=PAGE_RSS&_portletRefresh=53_810109_53_808843_808843-53_808682_53_808869_808869";
	pageURL_ARRAYassvirt["MENU_PROMONLINE"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=808846&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=4._PROMONLINE&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_PROMONLINE&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Promo1&_provider_id=992045631&_portlet_id=810111&_has_title_region=0&_has_border=0&_refresh_url=&_curl=https%253A%252F%252Ftestgntn.sisal.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F4._PROMONLINE&_pref=53_812166_53_808846_808846&_reference_path=807531_810111_992045631&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=&_cpp._visibleAssVirt=&_cpp._boxinfo=Promo1&_cpp._boxpromo=Promo1&_cpp._boxinfosmall=Promo1&_cpp._menutop=MENU_PROMONLINE&_cpp._sezione=PAGE_Promo1&_portletRefresh=53_812166_53_808846_808846-53_808682_53_808866_808866";
	pageURL_ARRAYassvirt["MENU_CONCORSIVINCITE"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=1701757&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=vincite&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_CONCORSIVINCITE&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_Vincite&_provider_id=992045631&_portlet_id=1703258&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fwww.superenalotto.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fvincite&_pref=53_1701759_53_1701757_1701757&_reference_path=872041_1703258_992045631&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Vincite&_cpp._visibleAssVirt=&_cpp._boxinfo=Vincite&_cpp._boxpromo=Vincite&_cpp._boxinfosmall=Vincite&_cpp._menutop=MENU_CONCORSIVINCITE&_cpp._sezione=PAGE_Vincite&_portletRefresh=53_1701759_53_1701757_1701757-53_808682_53_1703257_1703257";
//	pageURL_ARRAYassvirt["MENU_DIAMOINUMERI"] = "/portal/page/portal%3F_esiReqType=3&_mode=10&_cpage_id=8550533&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=numeri&_sys_cache=1&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_DIAMOINUMERI&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_SestineEstratte&_provider_id=992045631&_portlet_id=8551777&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fwww.superenalotto.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252Fnumeri&_pref=53_9356332_53_8550533_8550533&_reference_path=878031_8551777_992045631&_show_edit_link=0&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=0&_collapse=0&_collapsed=0&_cpp._assvirt=SestineEstratte&_cpp._visibleAssVirt=&_cpp._boxinfo=Top10Sestine&_cpp._boxpromo=&_cpp._boxinfosmall=&_cpp._menutop=MENU_DIAMOINUMERI&_cpp._sezione=PAGE_SestineEstratte&_pid=53%2C8551776&_sys_cache=1&_portletRefresh=53_9356332_53_8550533_8550533-53_808682_53_8551776_8551776";
	pageURL_ARRAYassvirt["MENU_DIAMOINUMERI"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=8550533&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=11.NUMERI&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_DIAMOINUMERI&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_SestineEstratte&_provider_id=992045631&_portlet_id=8551777&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fwww.superenalotto.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F11.NUMERI&_pref=53_9356332_53_8550533_8550533&_reference_path=878031_8551777_992045631&_show_edit_link=0&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=0&_collapse=0&_collapsed=0&_cpp._assvirt=SestineEstratte&_cpp._visibleAssVirt=&_cpp._boxinfo=Top10Sestine&_cpp._boxpromo=&_cpp._boxinfosmall=&_cpp._menutop=MENU_DIAMOINUMERI&_cpp._sezione=PAGE_SestineEstratte&_pid=53%2C8551776&_portletRefresh=53_9356332_53_8550533_8550533-53_808682_53_8551776_8551776";
	// non aggiornato
	pageURL_ARRAYassvirt["MENU_COMMUNITY"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756796&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=5._COMMUNITY&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_COMMUNITY&_provider_id=654991380&_portlet_id=759663&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F5._COMMUNITY&_pref=1061_759666_1061_756796_756796&_reference_path=752117_759663_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._assvirt=Community1&_cpp._visibleAssVirt=&_cpp._boxinfo=Community1&_cpp._boxpromo=Community1&_cpp._boxinfosmall=Community1&_cpp._menutop=MENU_COMMUNITY&_portletRefresh=1061_759666_1061_756796_756796-1061_756697_1061_756808_756808";
	pageURL_ARRAYassvirt["MENU_ISTITUZIONALE"] = "/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=808828&_csite_id=53&_cstyle_id=1&_cstyle_site_id=53&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=1._PAGINE_ISTITUZIONALI&_assvirt=" + _assvirt + "&_visibleAssVirt=" + _visibleAssVirt + "&_boxinfo=" +_BoxInformativo+ "&_boxpromo=" +_BoxPromo+ "&_boxinfosmall=" +_BoxInfoSmall+ "&_menutop=MENU_ISTITUZIONALE&token=&numeroconto=&CATEGopen=&FAQopen=&_rss=&_sezione=PAGE_ChiSiamo&_provider_id=992045631&_portlet_id=810124&_has_title_region=0&_has_border=0&_refresh_url=&_curl=https%253A%252F%252Ftestgntn.sisal.it%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F1._PAGINE_ISTITUZIONALI&_pref=53_810127_53_808828_808828&_reference_path=806512_810124_992045631&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=1&_collapse=1&_collapsed=0&_cpp._boxinfo=ChiSiamo&_cpp._boxpromo=ChiSiamo&_cpp._boxinfosmall=ChiSiamo&_cpp._menutop=MENU_ISTITUZIONALE&_cpp._sezione=PAGE_ChiSiamo&_portletRefresh=53_810127_53_808828_808828-53_808682_53_808939_808939";

	if(!SISAL.isNullOrEmpty(document.getElementById("portalIFrame_AssVirt")))
	{
		document.getElementById("portalIFrame_AssVirt").src = pageURL_ARRAYassvirt[_menutop]; // assistente virtuale
	}
	
	// refresh del boxLogin
	/*
	var pageURL_Login = '/portal/page/portal?_esiReqType=3&_mode=10&_cpage_id=756799&_csite_id=1061&_cstyle_id=1&_cstyle_site_id=1061&_ccalledfrom=1&_cmode=3&_ctabstring=&_cdisplay_name=8._SUPERENALOTTO_SUPERSTAR&token=&numeroconto=&logout=&_provider_id=654991380&_portlet_id=750890&_has_title_region=0&_has_border=0&_refresh_url=&_curl=http%253A%252F%252Fassvil01.sisal.it%253A7777%252Fportal%252Fpage%252Fportal%252FSitoGioco%252F8._SUPERENALOTTO_SUPERSTAR&_pref=1061_756684_1061_756799_756799&_reference_path=751020_748725_654991380&_show_edit_link=1&_details=1&_help=1&_about=1&_refresh_portlet=1&_remove=0&_collapse=0&_collapsed=0&_cpp._assvirt=Schedina&_cpp._visibleAssVirt=&_cpp._boxinfo=Schedina&_cpp._boxpromo=Schedina&_cpp._boxinfosmall=Schedina&_cpp._menutop=MENU_SUPERENALOTTOSUPERSTAR';
	document.getElementById("portalIFrame").src = pageURL_Login; // assistente virtuale
	*/
	
	// gestione dell'illuminazione della freccia per il menu di secondo livello
	var PAGEnome = 'PAGE_'+idName;
	var DIVnome = 'DIV_'+idName;
	var DIVHREFnome = 'DIV_'+idName+'_href';

	// apre il menu di secondo livello se è stata selezionata una voce di terzo livello
	var Stringa = GetElement(PAGEnome).parentNode.parentNode.parentNode.parentNode.id;
	if (Stringa.search('DIV_') == -1) // selezionata voce di terzo livello
	{
		GetElement(DIVHREFnome).style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv2_rightC.png)"; // freccia rossa destra
		
		if (elementIsNotNull(DIVnome))
		{
			LI_element = GetElement(DIVnome).getElementsByTagName('li');
			
			if (LI_element.length > 0)
			{
				//DIVbackgroundImage = object.style.backgroundImage;
				//object.style.backgroundImage = "url(/portal/page/portal/53D9A720A3461AFDE040080A0C030F5E)";
				GetElement(DIVHREFnome).style.backgroundImage = "url(/sitogioco/Immagini/Top/menu_liv2_downC.png)"; // freccia rossa basso
			}		
		}
	}
}
// Seleziona il link scelto dall'utente del menu di livello 1 TOP
function Select_MenuLiv1(_menuparam)
{	if (GetElement(GetParameters(_menuparam)) != null)
		GetElement(GetParameters(_menuparam)).className = GetElement(GetParameters(_menuparam)).className + " current";
}

function controlla(form, id)
{
	var flag=true;
	// colore x etichetta campo compilato
	var okHex='#ffffff';
	// colore x etichetta campo non compilato
	var noHex='#f37d16';
	var campi;
	
	var campiContatti=new Array('nome','mail','cognome','oggetto');
	var campiAlert = new Array('nome','mail');
	var campiOroscopo = new Array('mail1','mail2','oggetto');
	
	if (id == 'contatti')
		campi = campiContatti;
	else if (id == 'alert')
		campi = campiAlert;
	else if (id == 'oroscopo')
		campi = campiOroscopo;
		
		
	for(var k=0;k<campi.length;k++)
	{
	if(form.elements[campi[k]].value==""||form.elements[campi[k]].value.match(/^\s+$/))
		{
			document.getElementById(campi[k]).style.backgroundColor=noHex;
			if(flag)
			{
				with(document.getElementById(id))
				{
					style.backgroundColor=okHex;
				}
				flag=false;
			}
		} 
		else
		{
			document.getElementById(campi[k]).style.backgroundColor=okHex;
		}	
	}
}

function controllamail(mail){
	var espressione = /^[_a-z0-9+-]+(\.[_a-z0-9+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$/;
	if (!espressione.test(mail) || (!mail.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi)))
	{
	    return true;
	}
}

//Controllo che i campi del box CONTATTI non siano nulli
function Contatti_CheckAccept(formContatti)
{
	var conto = formContatti.conto.value;
	var richiesta = formContatti.richiesta.value;
	var nome = formContatti.nome.value;
	var cognome = formContatti.cognome.value;
	var email = formContatti.mail.value;
	var oggetto = formContatti.oggetto.value;

	controlla(formContatti, 'contatti');
	
	if (parent.get_nls_language() == 'i')
	{
		var CampiObbligatori = "Compilare tutti i campi obbligatori";
		var ValidMail = "Inserisci un indirizzo e-mail valido";
		var RequestOK = "Grazie per aver contattato il nostro call center.<br>Gestiremo la tua richiesta nel minor tempo possibile.";
		var Attenzione = "Attenzione";
		var RequestOKtitle = "Richiesta inoltrata";
	}
	if (parent.get_nls_language() == 'us')
	{
		var CampiObbligatori = "All fields are required";
		var ValidMail = "Please enter a valid e-mail address";
		var RequestOK = "Thank you for contacting our call center.<br>Handle your request as quickly as possible.";
		var Attenzione = "Caution";
		var RequestOKtitle = "Request sent";
	}
		
	if (formContatti.nome.value == "" || formContatti.cognome.value == "" || formContatti.mail.value == "" || formContatti.oggetto.value == "" || formContatti.accept.checked == false)
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//parent.Dialog.alert(CampiObbligatori, {width:350, height:110,title:Attenzione});
			//formContatti.nome.focus();
		}

	else 
		if (controllamail(email))
			{
				SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : ValidMail, "{buttonclick}" : '<hideThis>', width : '350px'});				
				//parent.Dialog.alert(ValidMail, {width:350, height:110,title:Attenzione});
				formContatti.mail.style.backgroundColor= '#f37d16';
				//formContatti.mail.focus();
			}
	else
		{
			var urlBase = '/portal/page/portal/SitoGioco_DocLib/ADMIN_page/CONTATTI_INVIADATI';
			document.getElementById("portalIFrame_Contatti").src = urlBase+"?conto="+conto+"&nome="+nome+"&cognome="+cognome+"&email="+email+"&richiesta="+richiesta+"&oggetto="+oggetto;
			formContatti.nome.style.backgroundColor= '#ffffff';
			formContatti.cognome.style.backgroundColor= '#ffffff';
			formContatti.mail.style.backgroundColor= '#ffffff';
			formContatti.oggetto.style.backgroundColor= '#ffffff';
			formContatti.nome.value = '';
			formContatti.cognome.value = '';
			formContatti.mail.value = '';
			formContatti.conto.value = '';
			formContatti.richiesta.selectedIndex = 0;
			formContatti.oggetto.value = '';
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : RequestOK, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//parent.Dialog.alert(RequestOK, {width:350, height:110,title:RequestOKtitle});
		}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*						FUNZIONI PER IL CAMBIAMENTO DELLA LINGUA - cambialingua.js						*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function GetLanguageUrl(lingua, url)
{
	return GetUrlByLanguage(lingua) + ParseUrl(url);
}
function GetUrlByLanguage(lingua)
{
	var host = location.host;
	var hostname = location.hostname;
	if (location.port != '')
		var port = '%3A' + location.port;
	else
		var port = '';
	
	var protocol = location.protocol.substr(0,location.protocol.length-1);
	
	var content = 'portal/pls/portal/PORTAL.wwctx_app_language.set_language';

	switch (lingua)
	{
		case ('d'):
		{
			return protocol+'://'+host+'/'+content+'?p_http_language=de-de&p_nls_language=d&p_nls_territory=GERMANY&p_requested_url='+protocol+'%3A%2F%2F'+hostname+port+'%2Fportal%2Fpls%2Fportal%2FPORTAL.wwctx_app_language.set_language%3Fp_http_language%3Dde-de%26p_nls_language%3Dd%26p_nls_territory%3DGERMANY%26p_requested_url%3D';
			//return 'http://'+host+'/'+content+'?p_http_language=de-de&p_nls_language=d&p_nls_territory=GERMANY&p_requested_url=http://'+hostname+':'+port+'/portal/pls/portal/PORTAL.wwctx_app_language.set_language?p_http_language=de-de&p_nls_language=d&p_nls_territory=GERMANY&p_requested_url=';
		}
		case ('us'):
		{
			return protocol+'://'+host+'/'+content+'?p_http_language=en-us&p_nls_language=us&p_nls_territory=AMERICA&p_requested_url='+protocol+'%3A%2F%2F'+hostname+port+'%2Fportal%2Fpls%2Fportal%2FPORTAL.wwctx_app_language.set_language%3Fp_http_language%3Den-us%26p_nls_language%3Dus%26p_nls_territory%3DAMERICA%26p_requested_url%3D';
			//Sreturn 'http://'+host+'/'+content+'?p_http_language=en-us&p_nls_language=us&p_nls_territory=AMERICA&p_requested_url=http://'+hostname+':'+port+'/portal/pls/portal/PORTAL.wwctx_app_language.set_language?p_http_language=en-us&p_nls_language=us&p_nls_territory=AMERICA&p_requested_url=';
		}
		case ('e'):
		{
			return protocol+'://'+host+'/'+content+'?p_http_language=es-es&p_nls_language=e&p_nls_territory=SPAIN&p_requested_url='+protocol+'%3A%2F%2F'+hostname+port+'%2Fportal%2Fpls%2Fportal%2FPORTAL.wwctx_app_language.set_language%3Fp_http_language%3Des-es%26p_nls_language%3De%26p_nls_territory%3DSPAIN%26p_requested_url%3D';
			//return 'http://'+host+'/'+content+'?p_http_language=es-es&p_nls_language=e&p_nls_territory=SPAIN&p_requested_url=http://'+hostname+':'+port+'/portal/pls/portal/PORTAL.wwctx_app_language.set_language?p_http_language=es-es&p_nls_language=e&p_nls_territory=SPAIN&p_requested_url=';
		}
		case ('f'):
		{
			return protocol+'://'+host+'/'+content+'?p_http_language=fr-fr&p_nls_language=f&p_nls_territory=FRANCE&p_requested_url='+protocol+'%3A%2F%2F'+hostname+port+'%2Fportal%2Fpls%2Fportal%2FPORTAL.wwctx_app_language.set_language%3Fp_http_language%3Dfr-fr%26p_nls_language%3Df%26p_nls_territory%3DFRANCE%26p_requested_url%3D';
			//return 'http://'+host+'/'+content+'?p_http_language=fr-fr&p_nls_language=f&p_nls_territory=FRANCE&p_requested_url=http://'+hostname+':'+port+'/portal/pls/portal/PORTAL.wwctx_app_language.set_language?p_http_language=fr-fr&p_nls_language=f&p_nls_territory=FRANCE&p_requested_url=';
		}
		case ('i'):
		{
			return protocol+'://'+host+'/'+content+'?p_http_language=it-it&p_nls_language=i&p_nls_territory=ITALY&p_requested_url='+protocol+'%3A%2F%2F'+hostname+port+'%2Fportal%2Fpls%2Fportal%2FPORTAL.wwctx_app_language.set_language%3Fp_http_language%3Dit-it%26p_nls_language%3Di%26p_nls_territory%3DITALY%26p_requested_url%3D'
			//return 'http://'+host+'/'+content+'?p_http_language=it-it&p_nls_language=i&p_nls_territory=ITALY&p_requested_url=http://'+hostname+':'+port+'/portal/pls/portal/PORTAL.wwctx_app_language.set_language?p_http_language=it-it&p_nls_language=i&p_nls_territory=ITALY&p_requested_url=';
		}
	}
	
	return -1;
}
function ParseUrl(url)
{
	/*
		?	=	%253F
		=	=	%253D
		&	=	&
		:	=	%253A
		/	=	%252F
	*/
	while (url.indexOf(":") != -1)
	{
		url = url.replace(":", "%253A");
	}
	while (url.indexOf("/") != -1)
	{
		url = url.replace("/", "%252F");
	}
	while (url.indexOf("?") != -1)
	{
		url = url.replace("?", "%253F");
	}
	while (url.indexOf("=") != -1)
	{
		url = url.replace("=", "%253D");
	}
	while (url.indexOf("&") != -1)
	{
		url = url.replace("&", "%2526");
	}

	return url;
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/*	NON modificare				FUNZIONI PER LA GESTIONE DI AJAX ALL'INTERNO DEGLI RSS					*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''
var marqueeheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
else
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee")
cross_marquee.style.top=0
marqueeheight=document.getElementById("NEWSsmall_marqueecontainer").offsetHeight
actualheight=cross_marquee.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px"
cross_marquee.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",60)', delayb4scroll)
}
/* // PERMETTE DI CARICARE LO SCROLL DELLE NEWS AL LOAD DELLA FINESTRA
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
*/


/** FUNZIONI PER LA GESTIONE DI AJAX E DELLA VISUALIZZAZIONE DELLE NEWS **/

	var rowforpage = 10; // numero righe per pagina
	var pageForRow = 10; // numero di pagine per riga
	var pageView = -1; // pagina attualmente visualizzata
	var numrows = 0; // numero totale delle righe
	var numpages = Math.ceil(numrows/rowforpage); // numero totale delle pagine
	var pageForRow_max = 1; // numero massimo di righe di pagina
	var pageForRow_view = 1; // numero massimo di righe di pagina
	
// funzione per prendere un elemento con id univoco
	function prendiElementoDaId(id_elemento) {
		var elemento;
		if(document.getElementById)
			elemento = document.getElementById(id_elemento);
		else
			elemento = document.all[id_elemento];
		return elemento;
	};
// funzione per assegnare un oggetto XMLHttpRequest
	function assegnaXMLHttpRequest() {
		var
			XHR = null,
			browserUtente = navigator.userAgent.toUpperCase();
		if(typeof(XMLHttpRequest) === "function" || typeof(XMLHttpRequest) === "object")
			XHR = new XMLHttpRequest();
		else if(window.ActiveXObject && browserUtente.indexOf("MSIE 4") < 0) {
			if(browserUtente.indexOf("MSIE 5") < 0)
				XHR = new ActiveXObject("Msxml2.XMLHTTP");
			else
				XHR = new ActiveXObject("Microsoft.XMLHTTP");
		}
		return XHR;
	};
/** OGGETTI / ARRAY */
// oggetto di verifica stato
	var readyState = {
		INATTIVO:	0,
		INIZIALIZZATO:	1,
		RICHIESTA:	2,
		RISPOSTA:	3,
		COMPLETATO:	4
	};
// array descrittivo dei codici restituiti dal server
// [la scelta dell' array è per evitare problemi con vecchi browsers]
	var statusText = new Array();
	statusText[100] = "Continue";
	statusText[101] = "Switching Protocols";
	statusText[200] = "OK";
	statusText[201] = "Created";
	statusText[202] = "Accepted";
	statusText[203] = "Non-Authoritative Information";
	statusText[204] = "No Content";
	statusText[205] = "Reset Content";
	statusText[206] = "Partial Content";
	statusText[300] = "Multiple Choices";
	statusText[301] = "Moved Permanently";
	statusText[302] = "Found";
	statusText[303] = "See Other";
	statusText[304] = "Not Modified";
	statusText[305] = "Use Proxy";
	statusText[306] = "(unused, but reserved)";
	statusText[307] = "Temporary Redirect";
	statusText[400] = "Bad Request";
	statusText[401] = "Unauthorized";
	statusText[402] = "Payment Required";
	statusText[403] = "Forbidden";
	statusText[404] = "Not Found";
	statusText[405] = "Method Not Allowed";
	statusText[406] = "Not Acceptable";
	statusText[407] = "Proxy Authentication Required";
	statusText[408] = "Request Timeout";
	statusText[409] = "Conflict";
	statusText[410] = "Gone";
	statusText[411] = "Length Required";
	statusText[412] = "Precondition Failed";
	statusText[413] = "Request Entity Too Large";
	statusText[414] = "Request-URI Too Long";
	statusText[415] = "Unsupported Media Type";
	statusText[416] = "Requested Range Not Satisfiable";
	statusText[417] = "Expectation Failed";
	statusText[500] = "Internal Server Error";
	statusText[501] = "Not Implemented";
	statusText[502] = "Bad Gateway";
	statusText[503] = "Service Unavailable";
	statusText[504] = "Gateway Timeout";
	statusText[505] = "HTTP Version Not Supported";
	statusText[509] = "Bandwidth Limit Exceeded";
// funzioni per la visualizzazione degli RSS del sito
function caricaXML(nomeFile, box)
{
	var 	ajax = assegnaXMLHttpRequest(),
		elemento = prendiElementoDaId("RSScontent"),
		usaLink = true;
	if(ajax) {
		usaLink = false;
		ajax.open("get", nomeFile, true);
		ajax.setRequestHeader("connection", "close");
		ajax.onreadystatechange = function() {
			if(ajax.readyState === readyState.COMPLETATO) {
				if(statusText[ajax.status] === "OK") {
					if(ajax.responseXML)
					{
						if (box == 'big')
						{
							elemento.innerHTML = ReadNews_BoxBig(ajax.responseXML);
							// esplode la news selezionata
							var NEWSopen = parent.GetParameters("NEWSopen");
							if (NEWSopen == null || NEWSopen == 'null')
							{
								NEWS_ShowHide_news('1');
							}
							var page = Math.ceil((NEWSopen)/rowforpage);
							if (page <= 0)
								page = 1;
							
							NEWS_ShowHide_news(NEWSopen); // mostra la news esplosa
							ShowRowsByPage(page); // apre la prima pagina
							
							parent.changeHeightIframe(parent.document.getElementById('portalIFrame_BoxInformativo'));
						}	
						else
							if (box == 'small')
							{
								elemento.innerHTML = ReadNews_BoxSmall(ajax.responseXML);
								initializemarquee();
							}
					}
					else
						elemento.innerHTML =
						"L'XML restituito dalla richiesta non è valido.<br />" +
						ajax.responseText.split('<').join("&lt;").split('>').join("&gt;");
				}					
				else
					elemento.innerHTML =
					"Impossibile effettuare l'operazione richiesta.<br />" +
					"Errore riscontrato: " + statusText[ajax.status];
			};
		};
		ajax.send(null);
	};
	return usaLink;
};
function leggiContenuto(item, nomeNodo)
{
	var contenuto = item.getElementsByTagName(nomeNodo).item(0).firstChild.nodeValue;
	return contenuto;
};
function getDateNum(_num)
{
	if (_num < 10)
		return '0'+_num;
	return _num;
};
function getDate(_date)
{
	var month=new Array(12);
	
	if (parent.get_nls_language() == 'i')
	{
		month[0]="gennaio";
		month[1]="febbraio";
		month[2]="marzo";
		month[3]="aprile";
		month[4]="maggio";
		month[5]="giugno";
		month[6]="luglio";
		month[7]="agosto";
		month[8]="settembre";
		month[9]="ottobre";
		month[10]="novembre";
		month[11]="dicembre";
	}
	if (parent.get_nls_language() == 'us')
	{
		month[0]="january";
		month[1]="february";
		month[2]="march";
		month[3]="april";
		month[4]="may";
		month[5]="june";
		month[6]="july";
		month[7]="august";
		month[8]="september";
		month[9]="october";
		month[10]="november";
		month[11]="december";
	}
	//	05/09/2008  -  12.23
		var Data = getDateNum(_date.getDate()) + '/' + getDateNum(_date.getMonth()) + '/' + _date.getFullYear() + '&nbsp;&nbsp;-&nbsp;&nbsp;' + getDateNum(_date.getHours()) + ':' + getDateNum(_date.getMinutes());
	//	5 settembre 2008
		var Data = _date.getDate() + ' ' + month[_date.getMonth()] + ' ' + _date.getFullYear();
	return Data;
};
function NEWS_ShowHide_news(FAQid)
{
	var elemento = document.getElementById('NEWS_desc'+FAQid);
	
	if (elemento != 'null' && elemento != null && elemento != 'undefined')
		switch(elemento.style.display)
		{
			case 'block':
			{
				// nascondi la risposta dell'elemento selezionato
				elemento.style.display = "none";
				document.getElementById('NEWS_freccia'+FAQid).src = '/sitogioco/Immagini/Comune/frecciaDown.png';
				break;
			}
			default:
			{
				// mostra la risposta dell'elemento selezionato
				//document.getElementById("portalIFrame_FAQ_COUNTER").src = "/portal/page/portal/SitoGioco_DocLib/ADMIN_page/FAQ_COUNTER?FAQid="+FAQid;
				elemento.style.display = "block";
				document.getElementById('NEWS_freccia'+FAQid).src = '/sitogioco/Immagini/Comune/frecciaUp.png';
				break;
			}
		}
}	
function ReadNews_BoxBig(xml)
{
	var	items = xml.getElementsByTagName("item"),
		risultato = "",
		nodoItem = new Object(),
		datoTemporaneo;
	for(var a = 0, b = items.length; a < b; a++) {
		if(items[a].getElementsByTagName("author").length === 1) {
			//datoTemporaneo = leggiContenuto(items[a], "category");
			if(!nodoItem[datoTemporaneo])
				nodoItem[datoTemporaneo] = new Array();
			nodoItem[datoTemporaneo][nodoItem[datoTemporaneo].length] = ({
				titolo:	leggiContenuto(items[a], "title"),
				link:	leggiContenuto(items[a], "guid"),
				data:	leggiContenuto(items[a], "pubDate"),
				autore:	leggiContenuto(items[a], "author"),
				descrizione: leggiContenuto(items[a], "description")
				//,categoria: leggiContenuto(items[a], "category")
			});
		}
	};
	
	numrows = items.length; // numero totale delle righe
	numpages = Math.ceil(numrows/rowforpage); // numero totale delle pagine
	
	// visualizzazione dell'RSS
	// a: visualizza la categoria selezionata se esistente
	risultato =
		"<div id='NEWS_boxRoot'>" +
		"<div class='pagineInterne_mainTitle'>News</div><br />";
		
	for(var a in nodoItem)
	{
		
		
		//risultato += "<li><strong>" + a + "</strong><ul>";
		for(var b = 0, c = nodoItem[a].length; b < c; b++) 
		{
			var myDate = getDate(new Date(nodoItem[a][b].data));
			
			risultato +=
				"<div id='news_"+(b+1)+"' style='margin-top: 16px; display: none;' align='justify'>" +
				"	<table width='100%' style='cursor:pointer;' border=0 cellpadding=0 cellspacing=0  onClick=NEWS_ShowHide_news('"+(b+1)+"');changeHeightIframe(parent.document.getElementById('portalIFrame_BoxInformativo'));><tr>" +
				"	<td align='left' style='cursor:pointer;' class='NEWS_DomandeDate'>"+myDate+"<br><font class='NEWS_DomandeTitle'>"+nodoItem[a][b].titolo+"</font></td><td width='20px' align='right'><img id='NEWS_freccia"+(b+1)+"' src='/sitogioco/Immagini/Comune/frecciaDown.png' /></td></tr></table>" +
				"	<div class='pagineInterne_defaultTratteggio'></div>";
			risultato +=
				"	<div id='NEWS_desc"+(b+1)+"' class='PagineInterne_defaultText' style='display:none;'>" +
						nodoItem[a][b].descrizione +
				"	</div>";
			risultato +=
				"</div>";
				
			
			
			/*
			risultato +=
			"<li>" +
			"<a onClick=parent.eraseCookie('_BoxInformativo'); target='_parent' href='" + nodoItem[a][b].link +	"'>" +	nodoItem[a][b].titolo +	"</a>, di " + nodoItem[a][b].autore + "<br />" +
			"<span>" + myDate + "</span>" + "<br />" +
			"<span>" + nodoItem[a][b].descrizione + "</span>" +
			"</li>";
			*/
			
		};
		//risultato += "</ul></li>";
		
	};
	risultato +=
		"</div>";
		
	// mostra le pagine
	var k = 1;
	risultato += '<center>';
	risultato += '<table cellspacing=0 cellpadding=0 align="right"><tr><td width="26px">';
	//risultato += '<table id="page_1" style="display:block;"><tr>';
	risultato += '<table cellspacing=0 cellpadding=0 align="right" id="page_1" style="display:block;"><tr><td width="26px"><div id="pageFrecciaSingolaIndietro_1"><font class="ElencoListaPagine_pageStyle"><a onclick=ShowRowsByPage(pageView*1-1);changeHeightIframe(parent.document.getElementById("portalIFrame_BoxInformativo")); ><</a></font><label class="ElencoListaPagine_pageStyle_separatore">&nbsp;&nbsp;</label></div></td>';
	risultato += '<td nowrap>';
	for (i=1; i<=numpages; i++)
	{
		risultato += '<a id="ShowRowsByPage_dato'+i+'" onClick=ShowRowsByPage("'+i+'");changeHeightIframe(parent.document.getElementById("portalIFrame_BoxInformativo")); class="ElencoListaPagine_pageStyle">';
		risultato += i;
		risultato += '</a>';
		
		if ((k % pageForRow != 0) && (i != numpages))
		{
			risultato += '<label class="ElencoListaPagine_pageStyle_separatore">&nbsp;-&nbsp;</label>';
			k++;
		}
		else
		{
		//	risultato += '<label class="ElencoListaPagine_pageStyle_separatore">&nbsp;&nbsp;</label>';
			k=1;

			risultato += '</td>';
			risultato += '<td width="26px" class="ElencoListaPagine_pageStyle_separatore"><div id="pageFrecciaSingolaAvanti_'+pageForRow_max+'"><label>&nbsp;&nbsp;</label><font class="ElencoListaPagine_pageStyle"><a onclick=ShowRowsByPage(pageView*1+1);changeHeightIframe(parent.document.getElementById("portalIFrame_BoxInformativo"));>></a></font></div></td></tr></table>';
			
		}
		
		if (i % pageForRow == 0)
		{
			
			if (numpages >= 2)
			{	
				pageForRow_max++;
				risultato += '<table cellspacing=0 cellpadding=0 align="right" id="page_'+pageForRow_max+'" style="display:none;"><tr><td width="26px"><div id="pageFrecciaSingolaIndietro_'+pageForRow_max+'"><font class="ElencoListaPagine_pageStyle"><a onclick=ShowRowsByPage(pageView*1-1);changeHeightIframe(parent.document.getElementById("portalIFrame_BoxInformativo"));><</a></font><label class="ElencoListaPagine_pageStyle_separatore">&nbsp;&nbsp;</label></div></td>';
				risultato += '<td>';
			}
		}
		
		/*
		if (i % pageForRow == 0)
		{																																						
			risultato += '</td>';
			risultato += '<td width="26px" class="ElencoListaPagine_pageStyle_separatore"><label>&nbsp;&nbsp;</label><font class="ElencoListaPagine_pageStyle"><a onclick="ShowPageBlock('+(pageForRow_max + 1)+');">>></a></font></td></tr></table>';
		}
		if (i % pageForRow == 0)
		{		
		
			pageForRow_max++;
			risultato += '<table align="right" id="page_'+pageForRow_max+'" style="display:none;"><tr><td width="26px"><font class="ElencoListaPagine_pageStyle"><a onclick="ShowPageBlock('+(pageForRow_max-1)+');"><<</a></font><label class="ElencoListaPagine_pageStyle_separatore">&nbsp;&nbsp;</label></td>';
			risultato += '<td>';
		}
		*/
	}
	risultato += '</td>';
	risultato += '</tr></table>';
	risultato += '</td></tr></table>';
	risultato += '</center>';
	//risultato += '<h3 id="pageText" class=PortletText1>Page: </h3>';
	
	return risultato;
};
	// nasconde tutte le righe della pagina attualmente visualizzata
	function HideRowsByPage()
	{
		//alert(pageView);
		if (pageView != -1)
		{
			document.getElementById('ShowRowsByPage_dato'+pageView).className = 'ElencoListaPagine_pageStyle';
			pageNum = pageView;
			var rowmax = pageNum * rowforpage;
			var rowmin = rowmax - (rowforpage-1);
			for (i=rowmin; i<=rowmax; i++)
			{
				element = document.getElementById('news_'+i);
				if (element != 'null' && element != null && element != 'undefined')
					element.style.display = "none";
			}
		}
	};
	// mostra le N righe della pagina selezionata
	function ShowRowsByPage(pageNum)
	{
		HideRowsByPage();

		document.getElementById('ShowRowsByPage_dato'+pageNum).className = 'ElencoListaPagine_pageStyleSEL';	
		
		var rowmax = pageNum * rowforpage;
		var rowmin = rowmax - (rowforpage-1);
		for (i=rowmin; i<=rowmax; i++)
		{
			element = document.getElementById('news_'+i);
			if (element != 'null' && element != null && element != 'undefined')
			{
				element.style.display = "";
			}
		}
		
		// mostra nasconde la freccia singola all'inizio e alla fine
		if (pageNum < 2)
		{
			var page = Math.ceil((pageNum)/pageForRow);
			document.getElementById('pageFrecciaSingolaIndietro_'+page).style.display = "none";
		} else
		{
			var page = Math.ceil((pageNum)/pageForRow);
			document.getElementById('pageFrecciaSingolaIndietro_'+page).style.display = "";
		}
		if (pageNum >= numpages)
		{
			var page = Math.ceil((pageNum)/pageForRow);
			document.getElementById('pageFrecciaSingolaAvanti_'+page).style.display = "none";
		} else
		{
			var page = Math.ceil((pageNum)/pageForRow);
			document.getElementById('pageFrecciaSingolaAvanti_'+page).style.display = "";
		}

		// manda avanti e indietro le freccie singole
		var pageAvanti = pageNum*1-1;
		var pageIndietro = pageNum*1;
		if (pageView <= pageNum)
			var pageTry = pageAvanti;
		else
			var pageTry = pageIndietro;
		if ((pageTry % pageForRow == 0))
		{
			var page = Math.ceil((pageNum)/(pageForRow));
			ShowPageBlock(page);
		}
		
		pageView = pageNum; // setta la nuova pagina visualizzata
		//document.getElementById('pageText').innerHTML = "Page: "+pageNum+"/"+numpages;
	};
	function HidePageBlock()
	{
		for (i=1; i<=pageForRow_max; i++)
		{
			element = document.getElementById('page_'+i);
			if (element != 'null' && element != null && element != 'undefined')
			{
				element.style.display = "none";
			}
		}
	};
	function ShowPageBlock(blockNum)
	{
		HidePageBlock();
		pageForRow_view = blockNum;
		element = document.getElementById('page_'+blockNum);
		if (element != 'null' && element != null && element != 'undefined')
		{
			element.style.display = "block";
		}
	};
function ReadNews_BoxSmall(xml)
{
	var	items = xml.getElementsByTagName("item"),
		risultato = "",
		nodoItem = new Object(),
		datoTemporaneo;
	for(var a = 0, b = items.length; a < b; a++) {
		if(items[a].getElementsByTagName("author").length === 1) {
			//datoTemporaneo = leggiContenuto(items[a], "category");
			if(!nodoItem[datoTemporaneo])
				nodoItem[datoTemporaneo] = new Array();
			nodoItem[datoTemporaneo][nodoItem[datoTemporaneo].length] = ({
				titolo:	leggiContenuto(items[a], "title"),
				link:	leggiContenuto(items[a], "guid"),
				data:	leggiContenuto(items[a], "pubDate"),
				autore:	leggiContenuto(items[a], "author"),
				descrizione: leggiContenuto(items[a], "description")
				//,categoria: leggiContenuto(items[a], "category")
			});
		}
	};
	
	// visualizzazione dell'RSS
	for(var a in nodoItem)
	{
		for(var b = 0, c = nodoItem[a].length; b < c; b++) 
		{
			var myDate = getDate(new Date(nodoItem[a][b].data));
			var URLnews = '/portal/page/portal/SitoGioco/servizi?_menutop=MENU_SERVIZI&_sezione=PAGE_RSS&_boxinfo=RSS&_boxpromo=RSS&_boxinfosmall=RSS';
			risultato +=
				"<div id='NEWS_data"+b+"' class='NEWSsmall_data'>" + myDate + "</div>" +
				"<div id='NEWS_titolo"+b+"' class='NEWSsmall_titolo'><a href='"+URLnews+"&NEWSopen="+(b+1)+"' target='_parent' onClick=EraseAllCookie();SISAL.setCookie('_sezione',{value: 'PAGE_RSS', days : 5});>" + nodoItem[a][b].titolo + "</a></div>" +
				"<br />";
		};
	};
	return risultato;
};

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*									FUNZIONI PER LA GESTIONE DI AJAX							*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
// Funzioni AJAX crea un oggetto di tipo XMLHttpRequest
function createHttpRequest()
{
   if (typeof XMLHttpRequest != "undefined") //Il browser non è IE
   {
		   return new XMLHttpRequest();
   }
   else if (window.ActiveXObject) // E' IE
   {
		   var sVersions = [ "MSXML2.XMLHttp.5.0",
		   "MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0",
		   "MSXML2.XMLHttp","Microsoft.XMLHttp"
		   ];

		   //Cerca di istanziare la versione più recente.
		   //Se non è disponibile prova via via con quelle più datate
		   for (var i = 0; i <sVersions.length; i++)
		   {
				   try
				   {
						   var ret = new ActiveXObject(sVersions[i]);
						   return ret;
				   }
				   catch (oException)
				   {
						   //Non fa niente. Va avanti tentando con le altre versioni
				   }
		   }
   }
   //Se arriva quì allora l'oggetto XMLHttpRequest non è disponibile per il browser in uso
   alert( "La versione del browser installata non supporta questa funzione" );
}

var http_request = false;

function makePOSTRequest(url, parameters) {
	//crea l'oggetto XMLHttp
	http_request = createHttpRequest(); 
	//prepara la richiesta
	//nota: il terzo parametro indica se la richiesta deve essere asincrona o meno
	http_request.open('POST', url, true);
	//prepara i campi per header http
	http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http_request.setRequestHeader("Content-length", parameters.length);
	http_request.setRequestHeader("Connection", "close");	
	//funzione di callback
	http_request.onreadystatechange = alertErrors;        
	//invia la richiesta
	http_request.send(parameters);   
}

var httpRequestForProvinces = false;

function makeGETRequest(url) {
	//crea l'oggetto XMLHttp
	httpRequestForProvinces = createHttpRequest();
	//prepara la richiesta
	//nota: il terzo parametro indica se la richiesta deve essere asincrona o meno
	httpRequestForProvinces.open("GET", url , true);
	//funzione di callback
	httpRequestForProvinces.onreadystatechange = alertContents;
	//invia la richiesta
	httpRequestForProvinces.send(null);
}

function initializeAjax(url,combo,comuniVett,capVett,cfVett) {

	document.getElementById('attendi').innerHTML = '<font class="strip">ATTENDERE... CARICAMENTO COMUNI IN CORSO</font>';
	document.getElementById('attendi').style.visibility = 'visible';  
	_combo = combo;
	_vett = comuniVett;
	_cap = capVett;
	_cf = cfVett;
	makeGETRequest(url);

}

function startupAjax ( loadDiv, url, combo, comuniVett, capVett, cfVett ) {
	if ( loadDiv != '' ) {
		document.getElementById( loadDiv ).style.display = 'inline';
	}
	_combo = combo;
	_vett  = comuniVett;
	_cap   = capVett;
	_cf    = cfVett;
	makeGETRequest( url );
}

function analizzaForm(obj){

	var getstr = "";
	var input = obj.getElementsByTagName('input');
	for (i=0;i<input.length;i++){
		actual = input.item(i);
		if (actual.type.toUpperCase() == "TEXT" || actual.type.toUpperCase() == "HIDDEN") {
			   getstr += actual.name + "=" + encodeURI(actual.value) + "&";
		}
		else if (actual.type.toUpperCase() == "CHECKBOX") {
					if (actual.checked) {
					  getstr += actual.name + "=" + encodeURI(actual.value)+ "&";
					} 
					else {
						getstr += actual.name + "=&";
					}
		}else if (actual.type.toUpperCase() == "RADIO") {
				if (actual.checked) {
						getstr += actual.name + "=" + encodeURI(actual.value) + "&";
				}
			}
	}
	
	var sel = obj.getElementsByTagName('select');
	
	for (i=0;i<sel.length;i++){
		actual = sel.item(i);
		getstr += actual.name + "=" + encodeURI(actual.options[actual.selectedIndex].value) + "&";
	}
	
	return (getstr);
	
}
function validateAjax(obj,url) {
	document.getElementById('attendi').innerHTML = '<font class="strip">ATTENDERE... VALIDAZIONE FORM IN CORSO</font>';
	document.getElementById('attendi').style.visibility = 'visible';   
	makePOSTRequest(url,analizzaForm(obj));
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*						FUNZIONI PER LA GESTIONE DELL'ASSISTENTE VIRTUALE							*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function Mostra_AssistenteVirtuale()
{
	//setCookie('visibleAssVirt', 'show', '5');
	SISAL.setCookie('visibleAssVirt',{ value: 'show', days: 5});
	GetElement("DYN_ASSISTENTEVIRTUALE_-").style.display="none";
	GetElement("DYN_ASSISTENTEVIRTUALE_+").style.display="block";
}
function Nascondi_AssistenteVirtuale()
{
	//setCookie('visibleAssVirt', 'hide', '5');
	SISAL.setCookie('visibleAssVirt',{ value: 'hide', days: 5});	
	GetElement("DYN_ASSISTENTEVIRTUALE_-").style.display="block";
	GetElement("DYN_ASSISTENTEVIRTUALE_+").style.display="none";
}
function Elimina_AssistenteVirtuale()
{
	GetElement("DYN_ASSISTENTEVIRTUALE_-").style.display="none";
	GetElement("DYN_ASSISTENTEVIRTUALE_+").style.display="none";
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*							FUNZIONI PER LA GESTIONE DELLE FAQ DEL SITO							*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function FAQ_ShowHide_categoria(CATEGid)
{
	var elemento = document.getElementById('FAQ_categ'+CATEGid);
	
	if (elemento != 'null' && elemento != null && elemento != 'undefined')
		switch(elemento.style.display)
		{
			case 'block':
			{
				// nascondi la risposta dell'elemento selezionato
				elemento.style.display = "none";
				document.getElementById('FAQ_freccia'+CATEGid).src = '/sitogioco/Immagini/Comune/frecciaDown.png';
				break;
			}
			default:
			{
				// mostra la risposta dell'elemento selezionato
				elemento.style.display = "block";
				document.getElementById('FAQ_freccia'+CATEGid).src = '/sitogioco/Immagini/Comune/frecciaUp.png';
				break;
			}
		}
}
function FAQ_ShowHide_domanda(FAQid)
{
	var elemento = document.getElementById('FAQ_ris'+FAQid);
	
	if (elemento != 'null' && elemento != null && elemento != 'undefined')
		switch(elemento.style.display)
		{
			case 'block':
			{
				// nascondi la risposta dell'elemento selezionato
				elemento.style.display = "none";
				break;
			}
			default:
			{
				// mostra la risposta dell'elemento selezionato
				document.getElementById("portalIFrame_FAQ_COUNTER").src = "/portal/page/portal/SitoGioco_DocLib/ADMIN_page/FAQ_COUNTER?FAQid="+FAQid;
				elemento.style.display = "block";
				break;
			}
		}
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*					FUNZIONI PER LA GESTIONE DELLE FORM DEL SITO					*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
function contentNumber(sText)
{
	var ValidChars = "0123456789";
	var IsNumber=false;
	var Char;

	for (i = 0; i < sText.length && IsNumber == false; i++) 
	{ 
		Char = sText.charAt(i); 
		if (ValidChars.indexOf(Char) != -1) 
		{
			IsNumber = true;
		}
	}
	
	return IsNumber;
}
function formRegistraCommunity_select(formCommunity)
{
	var email = formCommunity.mail.value;
	
	if (parent.get_nls_language() == 'i')
		var CampiObbligatori = "Compilare tutti i campi obbligatori";
	if (parent.get_nls_language() == 'us')
		var CampiObbligatori = "All fields are required";
	
	if (formCommunity.nome.value == "")
		{
			
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert(CampiObbligatori, {width:350, height:110,title:'Attenzione'});
			//formCommunity.nome.select();
		}
	else if (formCommunity.cognome.value == "")
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert(CampiObbligatori, {width:350, height:110,title:'Attenzione'});
			//formCommunity.cognome.select();
		}
	else if (formCommunity.password.value == "")
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert(CampiObbligatori, {width:350, height:110,title:'Attenzione'});
			//formCommunity.password.select();
		}
	else if (contentNumber(formCommunity.password.value) == false)
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : "La password deve contenere almeno un numero da 0 a 9", "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert("La password deve contenere almeno un numero da 0 a 9", {width:350, height:110,title:'Attenzione'});
			//formCommunity.password.select();
		}
	else if (formCommunity.password.value != formCommunity.confpassword.value)
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : "La password di conferma non corrisponde", "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert("La password di conferma non corrisponde", {width:350, height:110,title:'Attenzione'});
			//formCommunity.confpassword.select();
		}
	else if (email.value == "")
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert(CampiObbligatori, {width:350, height:110,title:'Attenzione'});
			//formCommunity.email.select();
		}
	else if (email.lastIndexOf ('@') == -1 || email.lastIndexOf (".") == -1)
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : "Inserisci un indirizzo e-mail valido", "{buttonclick}" : '<hideThis>', width : '350px'});						
			//Dialog.alert("Inserisci un indirizzo e-mail valido", {width:350, height:110,title:'Attenzione'});
			//formCommunity.mail.select();
		}
	else if (formCommunity.accept.checked == false)
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : "Accettare il modulo per il trattamento dati personali", "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert("Accettare il modulo per il trattamento dati personali", {width:350, height:110,title:'Attenzione'});
			//formCommunity.accept.focus();
		}
	else
		formCommunity.submit();
}
function formLoginCommunity_select(formCommunity)
{
	if (parent.get_nls_language() == 'i')
		var CampiObbligatori = "Compilare tutti i campi obbligatori";
	if (parent.get_nls_language() == 'us')
		var CampiObbligatori = "All fields are required";
		
	if (formCommunity.ssousername.value == "")
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert(CampiObbligatori, {width:350, height:110,title:'Attenzione'});
			//formCommunity.ssousername.select();
		}
	else if (formCommunity.password.value == "")
		{
			SISAL.FX.showOnElement_TemplatePopup('body', 'gntn.alert.buttonok.html', {"{title}" : "Attenzione", "{content}" : CampiObbligatori, "{buttonclick}" : '<hideThis>', width : '350px'});				
			//Dialog.alert(CampiObbligatori, {width:350, height:110,title:'Attenzione'});
			//formCommunity.password.select();
		}
	else
		formCommunity.submit();
}

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/*				FUNZIONI PER LA GESTIONE DEL BOX HOMEPAGE NELL'HOMEPAGE				*/
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
var VARscrollboxHomePage_interval = '';
var VARscrollboxHomePage_indice = 1;

function Start_scrollboxHomePage()
{
	var table = 'table';
	var content = 'Contenuto';
	var div = 'div_BoxHomePage';
	
	VARscrollboxHomePage_indice++;
	if (VARscrollboxHomePage_indice > 3)
		VARscrollboxHomePage_indice = 1;
		
	scrollboxHomePage(table+VARscrollboxHomePage_indice, div+VARscrollboxHomePage_indice);
}

function Stop_scrollboxHomePage()
{
	clearInterval(VARscrollboxHomePage_interval);
}

// es:. id = table1; content = Contenuto1
function scrollboxHomePage(id, div)
{	
	// ripristina il colore originale dei box
	for (i=1; i<=3; i++)
	{
		if (elementIsNotNull('table'+i))
			document.getElementById('table'+i).style.backgroundImage  = "url(/sitogioco/Immagini/HomePage/Box_Home_Page_Arancione_H81_W197.jpg)";	
	
		if (elementIsNotNull('div_BoxHomePage'+i))
			document.getElementById('div_BoxHomePage'+i).style.display = "none";
	}
	// illumina il box selezionato
	if (elementIsNotNull(div))
			document.getElementById(div).style.display = "block";
	// illumina il box selezionato
	if (elementIsNotNull(id))
		document.getElementById(id).style.backgroundImage  = "url(/sitogioco/Immagini/HomePage/Box_Home_Page_Rosso_H81_W197.jpg)";	
}


// *************************** INIZIO MODIFICA *************************** //
// 21-04-2009 MB-PS aggiunta gestione AJAX per visualizzazione JSP dirette
// *********************************************************************** //


// funzione per il recupero dell'oggetto XMLHttpRequest o equivalente
function getXmlHttpObject(logger)
{
    var xmlHttp = null;
    
    try
    {
        // Firefox, Opera 8.0+, Safari (anche Internet Explorer 7)
        xmlHttp = new XMLHttpRequest();
    }
    catch (e)
    {
        // Internet Explorer
        try
        {
            xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            try
            {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch (e)
            {
                alert("Il tuo browser non supporta AJAX!");
            }
        }
    }
    
    return xmlHttp;
}

// funzione per l'interazione asincrona (versione semplificata)
// parametri:
// action l'url da richiamare
// id l'id dell'elemento che include il contenuto da aggiornare
function simpleAjaxCall(action, id)
{  
	try
	{
		// recupero l'oggetto XMLHttpRequest o equivalente
		var xmlHttp = getXmlHttpObject();
		if (xmlHttp == null)
		{
		return;
		}
		
		// gestisco l'esito della chiamata ajax asincrona
		xmlHttp.onreadystatechange = function()
		{
			if(xmlHttp.readyState == 4)
			{
				if (xmlHttp.status == 200)
				{
					var ajaxDiv = document.getElementById(id);
					if (ajaxDiv != null)
					{
						ajaxDiv.innerHTML = execJS(xmlHttp.responseText);
						
						
						if (elementIsNotNull('logout'))
							checkTelephoneLogin();
						
						/*
						var f = document.getElementById('logout');
						if (f != 'undefined' && f != null && f != 'null')
						{
							checkTelephoneLogin();
							sessioneScaduta(f.session_js.value,f.url_js.value);
						}
						*/
					}
				}
			}
		}
		
		// eseguo la chiamata ajax
		xmlHttp.open("POST", action,true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.send("");
		delete xmlHttp;
	}
	catch(e)
	{

	}
}


// funzione per l'interazione asincrona (versione semplificata)
// parametri:
// action l'url da richiamare
// id l'id dell'elemento che include il contenuto da aggiornare
function AjaxCall(action, id, onComplete)
{  
	try
	{
		// recupero l'oggetto XMLHttpRequest o equivalente
		var xmlHttp = getXmlHttpObject();
		if (xmlHttp == null)
		{
		return;
		}
		
		// gestisco l'esito della chiamata ajax asincrona
		xmlHttp.onreadystatechange = function()
		{
			if(xmlHttp.readyState == 4)
			{
				if (xmlHttp.status == 200)
				{
					var ajaxDiv = document.getElementById(id);
					if (ajaxDiv != null)
					{
						ajaxDiv.innerHTML = execJS(xmlHttp.responseText);
						var f = document.getElementById('logout');
						if (f != 'undefined' && f != null && f != 'null')
						{
							sessioneScaduta(f.session_js.value,f.url_js.value);
						}
					}
				}
			}
		}
		
		// eseguo la chiamata ajax
		xmlHttp.open("POST", action,true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.send("");
		delete xmlHttp;
	}
	catch(e)
	{

	}
}

// funziona che stampa l'allert sul log
function alertLog(testo)
{
	if (debugMode != null && debugMode != undefined)
		if (debugMode == true)
		{
			filename = "/sitogioco/log/log.php";
			stringa = filename + "?l=" + testo;
			simpleAjaxCall(stringa, '');
		}
}

/*
	*****************************************************************************************************************
*/

var hoCliccatoSulSito = false;
var controlloSessioneScaduta_onClickVar = false;
var controlloSessioneScaduta_interval = null;
//var controlloSessioneScaduta_timer = 540000;
//var controlloSessioneScaduta_timer = 60000;
var controlloSessioneScaduta_timer = 1000*60*5;

// funzione che permette di controllare se far scadere la sessione o meno..
function controlloSessioneScaduta_click()
{
	if (hoCliccatoSulSito == true)
	{
		controlloSessioneScaduta();
		hoCliccatoSulSito = false;
		controlloSessioneScaduta_onClickVar = false;
		clearInterval(controlloSessioneScaduta_interval);
		controlloSessioneScaduta_interval = setInterval( controlloSessioneScaduta_click , controlloSessioneScaduta_timer);
	} else
		controlloSessioneScaduta_onClickVar = true;
}

function controlloSessioneScaduta_onClick(e)
{
	if (parent.parent.controlloSessioneScaduta_onClickVar == false)
		parent.parent.hoCliccatoSulSito = true;
	else
	{
		parent.parent.controlloSessioneScaduta();
		parent.parent.hoCliccatoSulSito = false;
		parent.parent.controlloSessioneScaduta_onClickVar = false;
		parent.parent.clearInterval(parent.parent.controlloSessioneScaduta_interval);
		parent.parent.controlloSessioneScaduta_interval = parent.parent.setInterval( parent.parent.controlloSessioneScaduta_click , parent.parent.controlloSessioneScaduta_timer);
	}
}

/*
	*****************************************************************************************************************
*/

// *********************************************************************** //
// **************************** FINE MODIFICA **************************** //
// *********************************************************************** //
