﻿function SetMenu(TdColor, LiMenu) {
    PageAtt = LiMenu;
    ColorAtt = TdColor;
    document.getElementById("Menu_" + PageAtt).style.backgroundImage = "url(images/BaseMenu.png)";
    if (LiMenu > 0) {
        document.getElementById("Menu_0").style.backgroundImage = "url(images/DivMenu0.png)";
    }
    document.getElementById("TD_Menu").style.backgroundColor = "#" + TdColor;
    document.getElementById("news-feed").style.backgroundColor = "#" + TdColor;
    $('#slides').stop().animate({ marginLeft: -positions[PageAtt] + 'px' }, 450);
}

function MenuOver(NumMenu, TdColor) {
    document.getElementById("Menu_" + PageAtt).style.backgroundImage = "url(images/DivMenu.png)";
    document.getElementById("Menu_" + NumMenu).style.backgroundImage = "url(images/BaseMenu.png)";
    if (NumMenu > 0) {
        document.getElementById("Menu_0").style.backgroundImage = "url(images/DivMenu0.png)";
    }
    document.getElementById("TD_Menu").style.backgroundColor = "#" + TdColor;
    document.getElementById("news-feed").style.backgroundColor = "#" + TdColor;
    $('#slides').stop().animate({ marginLeft: -positions[NumMenu] + 'px' }, 450);
    document.body.style.cursor = 'pointer';
}

function MenuOut(NumMenu) {
    if (NumMenu == 0) {
        document.getElementById("Menu_" + NumMenu).style.backgroundImage = "url(images/DivMenu0.png)";
    } else {
        document.getElementById("Menu_" + NumMenu).style.backgroundImage = "url(images/DivMenu.png)";
    }
    document.getElementById("Menu_" + PageAtt).style.backgroundImage = "url(images/BaseMenu.png)";
    document.getElementById("TD_Menu").style.backgroundColor = "#" + ColorAtt;
    document.getElementById("news-feed").style.backgroundColor = "#" + ColorAtt;
    $('#slides').stop().animate({ marginLeft: -positions[PageAtt] + 'px' }, 450);
    document.body.style.cursor = 'auto';
}

function MenuClic(link) {
    window.location = link;
}

function NewsOver() {
    document.body.style.cursor = 'pointer';
}

function NewsOut() {
    document.body.style.cursor = 'auto';
}

function NewsClic(Num) {
    window.location = "promozione.aspx?id=" + Num;
}




function callMenu(str) {
    //document.MenuFlash.setAttribute('movie','flash/Menu01_HG_1.swf?sez=' + str);
    document.MenuFlash.setVariable('sez', str);
    document.getElementById("FrameCentro").src = str + ".aspx";
    document.getElementById("ImgMenuSx").src = "Images/" + str + ".jpg";
    var alt = 0;
    if (str == "home") {
        alt = 230;
    }
    else {
        alt = 62;
    }
    document.MenuFlash.setAttribute('height', alt);
}

function callJavaScript(str) {
    document.MenuFlash.setAttribute('height', str.replace(" ", ""));
    return "x";
}
function callJavaScript_color(str) {
    document.getElementById("Tr_menu_sx").style.backgroundColor = str;
    document.getElementById("Tr_menu_dx").style.backgroundColor = str;
    document.getElementById("TD_Base").style.backgroundColor = str;
    return "x";
}
function callJavaScript_link(str) {
    document.getElementById("FrameCentro").src = str + ".aspx";
    document.getElementById("ImgMenuSx").src = "Images/" + str + ".jpg";
    return "x";
}
function callJavaScript_link_02(str) {
    document.getElementById("FrameCentro").src = str;
    document.getElementById("ImgMenuSx").src = "Images/promozioni.jpg";

    document.MenuFlash.setVariable('sez', "promozioni");
    var alt = 62;
    document.MenuFlash.setAttribute('height', alt)

    return "x";
}
function callJavaScript_link_int(str, color) {
    document.getElementById("FrameCentro").src = str + ".aspx";
    document.getElementById("ImgMenuSx").src = "Images/" + str + ".jpg";
    document.getElementById("Tr_menu_sx").style.backgroundColor = color;
    document.getElementById("Tr_menu_dx").style.backgroundColor = color;
    document.getElementById("TD_Base").style.backgroundColor = color;
}
function callJavaScript_link_home() {
    var IE = navigator.appName.indexOf("Microsoft") != -1;
    var filmato = IE ? window.mainMovie : window.document.MenuFlash;
    filmato.Play();
    document.getElementById("FrameCentro").src = "home.aspx";
    document.getElementById("ImgMenuSx").src = "Images/home.jpg";
}
