﻿/* Footer Section scripts */
function FranchiseHover(link) {
    link.className = "FranchiseHover";
}
function FranchiseOut(link) {
    link.className = "Franchise";
}
function FranchiseClick(link) {
    link.className = "FranchiseSelected";
}

function PrivacyHover(link) {
    link.className = "PrivacyHover";
}
function PrivacyOut(link) {
    link.className = "Privacy";
}
function PrivacyClick(link) {
    link.className = "PrivacySelected";
}

function ContactUsHover(link) {
    link.className = "ContactUsHover";
}
function ContactUsOut(link) {
    link.className = "ContactUs";
}
function ContactUsClick(link) {
    link.className = "ContactUsSelected";
}

function AboutUsHover(link) {
    link.className = "AboutUsHover";
}
function AboutUsOut(link) {
    link.className = "AboutUs";
}
function AboutUsClick(link) {
    link.className = "AboutUsSelected";
}

function WorkWithUsHover(link) {
    link.className = "WorkWithUsHover";
}
function WorkWithUsOut(link) {
    link.className = "WorkWithUs";
}
function WorkWithUsClick(link) {
    link.className = "WorkWithUsSelected";
}

function FAQHover(link) {
    link.className = "FAQHover";
}
function FAQOut(link) {
    link.className = "FAQ";
}
function FAQClick(link) {
    link.className = "FAQSelected";
}


/* Menu scripts */
function ChangeMouseOnHoverClubs() {
    document.getElementById("clubs").className = "ClubsHover";
}
function ChangeMouseOnClubsOut() {
    document.getElementById("clubs").className = "Clubs";
}
function ChangeMouseOnHoverEvents() {
    document.getElementById("Events").className = "EventsHover";
}
function ChangeMouseOnEventsOut() {
    document.getElementById("Events").className = "Events";
}
function ChangeMouseOnHoverFeedBack() {
    document.getElementById("FeedBack").className = "FeedBackHover";
}
function ChangeMouseOnFeedbackOut() {
    document.getElementById("FeedBack").className = "FeedBack";
}
function ChangeMouseOnHoverGallery() {
    document.getElementById("Gallery").className = "GalleryHover";
}
function ChangeMouseOnGalleryOut() {
    document.getElementById("Gallery").className = "Gallery";
}
function ChangeMouseOnHoverGames() {
    document.getElementById("Games").className = "GamesHover";
}
function ChangeMouseOnGamesOut() {
    document.getElementById("Games").className = "Games";
}

function ChangeMouseOnHoverNews() {
    document.getElementById("News").className = "NewsHover";
}
function ChangeMouseOnNewsOut() {
    document.getElementById("News").className = "News";
}
function ChangeMouseOnHoverPartyRequest() {
    document.getElementById("PartyRequest").className = "PartyRequestHover";
}
function ChangeMouseOnPartyRequestOut() {
    document.getElementById("PartyRequest").className = "PartyRequest";
}
function ChangeMouseOnHoverPromos() {
    document.getElementById("Promos").className = "PromosHover";
}
function ChangeMouseOnPromosOut() {
    document.getElementById("Promos").className = "Promos";
}
function ChangeMouseOnHoverStore() {
    document.getElementById("StoreLoactor").className = "StoreLocatorHover";
}
function ChangeMouseOnStoreOut() {
    document.getElementById("StoreLoactor").className = "StoreLocator";
}
function ChangeMouseOnHoverTimeZone() {
    document.getElementById("MyTimeZone").className = "MyTimeZoneHover";
}
function ChangeMouseOnTimeZoneOut() {
    document.getElementById("MyTimeZone").className = "MyTimeZone";
}

function ChangeMouseOnHoverGiftRequest() {
    document.getElementById("GiftRequest").className = "GiftRequestHover";
}
function ChangeMouseOnGiftRequestOut() {
    document.getElementById("GiftRequest").className = "GiftRequest";
}

/* Background theme scripts */
function Change(color) {
    setCookie("BgColor", color, 365);
    switch (color) {

        case "#A31724":

            //  document.body.style.backgroundImage='url("@Url.Content("~/Content/Images/bg2.jpg")")';
            document.body.style.background = "url('../../Content/Images/bg2.jpg')";
            document.body.style.backgroundPosition = "center";
            document.body.style.backgroundRepeat = "no-repeat";
            this.document.bgColor = color;
            document.body.style.backgroundColor = color;

            break;

        case "#FA9F1B":

            // document.body.style.backgroundImage='url("@Url.Content("~/Content/Images/bg1.jpg")")';
            document.body.style.background = "url('../../Content/Images/bg1.jpg')";
            document.body.style.backgroundPosition = "center";
            document.body.style.backgroundRepeat = "no-repeat";
            this.document.bgColor = color;
            document.body.style.backgroundColor = color;

            break;
        case "#423386":

            //document.body.style.backgroundImage='url("@Url.Content("~/Content/Images/bg3.jpg")")';
            document.body.style.background = "url('../../Content/Images/bg3.jpg')";
            document.body.style.backgroundPosition = "center";
            document.body.style.backgroundRepeat = "no-repeat";
            this.document.bgColor = color;
            document.body.style.backgroundColor = color;
            break;

    }
    //            document.body.style.background = "url('../../Content/Images/bg1.jpg')";


}


function getCookie(c_name) {

    var i, x, y, ARRcookies = document.cookie.split(";");
    for (i = 0; i < ARRcookies.length; i++) {
        x = ARRcookies[i].substr(0, ARRcookies[i].indexOf("="));
        y = ARRcookies[i].substr(ARRcookies[i].indexOf("=") + 1);
        x = x.replace(/^\s+|\s+$/g, "");
        if (x == c_name) {
            return unescape(y);
        }
    }
}


function setCookie(c_name, value, exdays) {
    var exdate = new Date();
    exdate.setDate(exdate.getDate() + exdays);
    // alert(value);
    var c_value = escape(value) + ((exdays == null) ? "" : "; expires=" + exdate.toUTCString());
    document.cookie = c_name + "=" + c_value + "; path=/";
}

function checkCookie() {

    var color = getCookie("BgColor");
    if (color != null && color != "") {

        switch (color) {

            case "#A31724":
                //document.body.style.backgroundImage='url("@Url.Content("~/Content/Images/bg2.jpg")")';
                document.body.style.background = "url('../../Content/Images/bg2.jpg')";
                document.body.style.backgroundPosition = "center";
                document.body.style.backgroundRepeat = "no-repeat";
                this.document.bgColor = color;
                document.body.style.backgroundColor = color;
                break;

            case "#FA9F1B":
                //document.body.style.backgroundImage='url("@Url.Content("~/Content/Images/bg1.jpg")")';
                document.body.style.background = "url('../../Content/Images/bg1.jpg')";
                document.body.style.backgroundPosition = "center";
                document.body.style.backgroundRepeat = "no-repeat";
                this.document.bgColor = color;
                document.body.style.backgroundColor = color;

                break;
            case "#423386":
                //   document.body.style.backgroundImage='url("@Url.Content("~/Content/Images/bg3.jpg")")'";
                document.body.style.background = "url('../../Content/Images/bg3.jpg')";
                document.body.style.backgroundPosition = "center";
                document.body.style.backgroundRepeat = "no-repeat";
                this.document.bgColor = color;
                document.body.style.backgroundColor = color;

                break;

        }
    }
    else {
        color = "#423386"
        if (color != null && color != "") {
            setCookie("BgColor", color, 365);
            //document.body.style.backgroundImage = 'url("@Url.Content("~/Content/Images/bg3.jpg")")';
            document.body.style.background = "url('../../Content/Images/bg3.jpg')";
            document.body.style.backgroundPosition = "center";
            document.body.style.backgroundRepeat = "no-repeat";
            this.document.bgColor = color;
            document.body.style.backgroundColor = color;


        }
    }
    return color;
}

/* Home Flash Javascript calls */

function GotoNews() {
    window.location = "News";
}
function GotoEvents() {
    window.location = "Events";
}
function GotoPromos() {
    window.location = "Promo";
}
function GotoPartyRequest() {
    window.location = "PartyRequest";
}
function GotoGames() {
    window.location = "Games";
}
function GotoGallery() {
    window.location = "Gallery";
}
function GotoMyTimezone() {
    window.location = "MyTimeZone";
}
function GotoFeedback() {
    window.location = "Feedback";
}
function GotoStoreLocater() {
    window.location = "Store";
}
function GotoRecharge() {

    window.location = "RechargeProduct";
}
function GotoGiftRequest() {
    window.location = "GiftRequest";
}

function GotoClub() {
    window.location = "Clubs"
}
