﻿// File JScript
function GetObject(ID)
{
	return (document.getElementById) ? document.getElementById(ID) : eval('document.all.' + ID);
}

function ApriCaricamento(dvContenuto, dvCaricamento)
{
    if (dvCaricamento == null) dvCaricamento = "divCaricamento";
    $("#" + dvContenuto).hide();
    $("#" + dvCaricamento).fadeIn("slow");
}

function NascondiCaricamento(dvContenuto, dvCaricamento)
{
    if (dvCaricamento == null) dvCaricamento = "divCaricamento";
    $("#" + dvCaricamento).hide();
    $("#" + dvContenuto).show();
}

function ChkDatePrenotazioneAndBack(dvContenuto, dvCaricamento)
{
    if (dvCaricamento == null) dvCaricamento = "divCaricamento";
    var retval = SBJS_ChkDatePrenotazione();
    if (!retval)
    {
        $("#" + dvContenuto).show();
        $("#" + dvCaricamento).hide();
    }
    return retval;        
}

function ApriInfinestra (larghezza, altezza, url, titolo)
{
    var wndParams = '';
    wndParams += 'toolbar=no,';
    wndParams += 'status=no,';
    wndParams += 'menubar=no,';
    wndParams += 'scrollbars=yes,';
    wndParams += 'resizable=no,';
    wndParams += 'width=' + larghezza + ',';
    wndParams += 'height=' + altezza;
    window.open(url, titolo, wndParams);
}

function ApriGestioneModifiche(Guid, codLingua)
{
    var url = 'https://www.simplebooking.it/booking.aspx';
    url += "?GUID=" + Guid;
    url +=  "&LANG=" + codLingua;
    url += "&CTRL=CANC";
    ApriInfinestra(650, 435, url, 'GestionePrenotazioni');
}    

function ApriCCV2()
{
    var url = '/Inclusioni/Popup/info_ccv2.aspx';
	ApriInfinestra(450, 435, url, 'InfoCCV2');
}

function ApriPacchetti()
{
    GetObject('dvPkgClosed').style.display ='none'; 
    GetObject('dvPkgOpened').style.display ='block'; 
    $("#Elenco_Outer").slideDown("normal");
}
function ChiudiPacchetti()
{
    GetObject('dvPkgOpened').style.display ='none'; 
    GetObject('dvPkgClosed').style.display ='block';
    $("#Elenco_Outer").slideUp("normal");
}





/*function ShowPrivacy()
{
	var wndParams = '';
	wndParams += 'toolbar=no,';
	wndParams += 'status=no,';
	wndParams += 'menubar=no,';
	wndParams += 'scrollbars=yes,';
	wndParams += 'resizable=no,';
	wndParams += 'width=450,';
	wndParams += 'height=300';
	window.open('/Inclusioni/Popup/info_privacy.aspx','InfoPrivacy',wndParams);
}*/




//function ApriDescrCamera(IDA, IDC)
//{
//	var wndParams = '';
//	wndParams += 'toolbar=no,';
//	wndParams += 'status=no,';
//	wndParams += 'menubar=no,';
//	wndParams += 'scrollbars=yes,';
//	wndParams += 'resizable=yes,';
//	wndParams += 'width=450,';
//	wndParams += 'height=400';
//	var Url = '/Inclusioni/Popup/descrizione_camera.aspx';
//	Url += '?IDA=' + IDA;
//	Url += '&IDC=' + IDC;
//	window.open(Url,'InfoPrivacy',wndParams);
//}