﻿var webJson = "";
$(document).ready(function () {
    if (other == "s")
        createnoNavFlash();
    else
        createNavFlash();
    tb_Loading();
    createlogoFlash();
    createFlash();
    createmusicFlash();
    createsalontopFlash();
    createhelpycFlash();
    GetWebSiteContent();
    createVedioFlash();

    mloadflash = true;
    if ($.trim(clubs) == "clubs") {
        Switchtabes("clubs", 3);
    }
    if ($.trim(gameshow) == "true") {
        Switchtabes("gamelogin", "1");
    }
    if (musicflash && mloadflash) {
        musicPlayHandler();
    }
    window.setTimeout(timeroutinsert, 3000);
});
window.onload = function() {
    tb_remove();
    tb_Notice();
    if (getVersion() < 10) {
        tb_Flash();
    } else {
        if (gamepath != "")
            GetgameLogindefault(gamepath);

    }
};
function CreateImage() {
    $("#code").attr("src", "Images.aspx?code=1&c=" + Math.floor(Math.random() * 9000 + 1000) + "&id=" + Math.floor(Math.random() * 100));
}

var musicflash = false, mloadflash = false;
function getMusicUrl() {
    return "music/IntroMusic0106.mp3";
}
function getvolume() {
    return 50;
}
function getloop() {
    return false;
}

function isReady() {
    musicflash = true
    if (musicflash && mloadflash) {
        musicPlayHandler();
    }
}

function musicPlayHandler() {
    try {
        if (getbrowser()) {
            __flash__addCallback(getswf("flashview"), "musicPlay");
        }
        getswf("flashview").musicPlay();
    } catch (err) { }
}

function musicStopHandler() {
    try {
        if (getbrowser()) {
            __flash__addCallback(getswf("flashview"), "musicStop");
        }
        getswf("flashview").musicStop();
    } catch (err) { }
}

function musicAddplayHandler(musicURL, mloop) {
    try {
        if (getbrowser()) {
            __flash__addCallback(getswf("flashview"), "musicAddplay");
        }
        getswf("flashview").musicAddplay(musicURL, mloop);
    } catch (err) { }
}
function timeroutinsert() {
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-18944960-1']);
    _gaq.push(['_setDomainName', 'none']);
    _gaq.push(['_setAllowLinker', true]);
    _gaq.push(['_trackPageview']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
    //var fileref = document.createElement('script')
    //fileref.setAttribute("type", "text/javascript")
    //fileref.setAttribute("src", "http://js.tongji.linezing.com/1574158/tongji.js")
    //document.getElementsByTagName("head")[0].appendChild(fileref)
    
}
