function FeedBackApp() {
    $('#feedBackApp').toggle('normal');
    $('#feedAppbutton').toggleClass("appFeedBackActive");
    $('#feedAppbutton').toggleClass("appFeedBackInactive");

}

function toggleCalVisibility(calId, hiddenCalStateId) {
    var cal = document.getElementById(calId);
    var hid = document.getElementById(hiddenCalStateId);
    if (cal.style.visibility == "" || cal.style.visibility.toLocaleString() == "visible") {
        cal.style.visibility = "hidden";
        hid.value = "hidden";
    } else {
        cal.style.visibility = "visible";
        hid.value = "visible";
    }
};
function noenter() {
    return !(window.event && window.event.keyCode == 13);
};
function app() {
    $('#app').toggle('normal');
    $('#appbutton<%=EPiServer.Globalization.ContentLanguage.PreferredCulture.Name.ToString() %>').toggleClass("appactive");
    $('#appbutton<%=EPiServer.Globalization.ContentLanguage.PreferredCulture.Name.ToString() %>').toggleClass("appinactive");
}
function RemoveFavorite(id, divid, confirmtext) {
    if (confirm(confirmtext)) {
        var fav = new Array();
        if ($.cookie("strommafavorites") != null)
            fav = $.cookie("strommafavorites").split(",");

        // Ta bort id
        fav = $.grep(fav, function(value) {
            return value != id;
        });

        // Göm
        $(divid).slideUp('slow');

        // Sätt kaka igen
        if (fav.length > 0) {
            $.cookie("strommafavorites", fav.join(","), { path: '/', expires: 1000 });
        } else { // inga favoriter, ingen kaka
            $.cookie("strommafavorites", null, { path: '/' });
            $('#FavoritesModule').slideUp('slow');
        }
    }
} 



