﻿/* Positionnement central de la fenêtre */
$(window).load(function() {
    /*Probleme d'affichage de la frame avec show clip*/
    if ($('#allContenu').css('display') == 'none') {
        if (document.getElementById('frameReservation') != null)
            $('#allContenu').show();
        else
            $('#allContenu').show("clip");
    }
});

$(function() {
    initSlide();
    $("#wrap-head").slideDown(500, function() {
        $("#content").css({ display: "block" });
        $("#content").dialog({
            height: 310,
            maxHeight: 310,
            minHeight: 307,
            width: 670,
            maxWidth: 670,
            minWidth: 670,
            draggable: false,
            resizable: false,
            show: 'clip',
            closeText: 'hide',
            closeOnEscape: false
        }, onContentLoaded());
    });
    /* Tabs pour la master page TabContent */
    $(function($) {
        $('#mainTab').tabs();
    });
    /* affichage div resizable particulier */
});

function initSlide() {
    $('#background').css('top', '0px');
    $('#background').css('left', '0px');
    if ($('#background img.bgslide').length > 1) {
        $('#background img.bgslide').maxImage({
            isBackground: true,
            slideShow: true,
            slideShowTitle: false,
            slideDelay: 7,
            maxFollows: 'both',
            resizeMsg: { show: false }
        });
    }
    else if ($('#background img.bgslide').length == 1) {
        $('#background img.bgslide').maxImage({
            isBackground: true,
            slideShow: false,
            slideShowTitle: false,
            slideDelay: 7,
            maxFollows: 'both',
            resizeMsg: { show: false }
        });
    }
}

function onContentLoaded() {
    // Si la fonction mapIlRisto_Map existe, elle sera lancée
    try {
        mapIlRisto_Map();
    }
    catch (error) {
    }
}

