﻿$(document).ready(function () {
    $("#trBreadCrumbs").show();
    $("#trNostreProposte").hide();
});

function ChangeVisibility() {
    if ($("#trNostreProposte").css("display") == "none") {
        $("#trBreadCrumbs").hide();
        $("#trNostreProposte").show();
    }
    else {
        $("#trBreadCrumbs").show();
        $("#trNostreProposte").hide();
    }
}

function openWindow(url, width, height, moss) {
    var piecesOfUrl = url.split("/");
    var urlEdited = "/detail?docLib=" + piecesOfUrl[3] + "&imgName=" + piecesOfUrl[4] + "&extension=jpg&moss=1";
    var sFeatures = "dialogHeight: " + height + "; dialogWidth: "+ width + "; resizable: yes; status: no;";

    if (moss == true)
        window.showModalDialog(urlEdited, "", sFeatures);
    else
        window.showModalDialog("/detail?url=" + url + "&moss=0", "", sFeatures);
        
}

function scrollerNews() {
    $('#scroller').SetScroller({
        velocity: 60,
        direction: 'vertical',
        startfrom: 'right',
        loop: 'infinite',
        movetype: 'linear',
        onmouseover: 'pause',
        onmouseout: 'play',
        onstartup: 'play',
        cursor: 'pointer'
    });
}

