﻿// JScript 文件
var image_Country = new Array();
image_Country[0] = "http://pics.goldsoon.com/C1/templates/images/enflag(1).gif";
image_Country[1] = "http://pics.goldsoon.com/C1/templates/images/enflag_gray.gif";
image_Country[2] = "http://pics.goldsoon.com/C1/templates/images/deflag.gif";
image_Country[3] = "http://pics.goldsoon.com/C1/templates/images/deflag_gray.gif";
image_Country[4] = "http://pics.goldsoon.com/C1/templates/images/frflag.gif";
image_Country[5] = "http://pics.goldsoon.com/C1/templates/images/frflag_gray.gif";
image_Country[6] = "http://pics.goldsoon.com/C1/templates/images/esflag.gif";
image_Country[7] = "http://pics.goldsoon.com/C1/templates/images/esflag_gray.gif";
image_Country[8] = "http://pics.goldsoon.com/C1/templates/images/icon_all.gif";
image_Country[9] = "http://pics.goldsoon.com/C1/templates/images/icon_all_gray.gif";
image_Country[10] = "http://pics.goldsoon.com/C1/templates/images/ruflag.gif";
image_Country[11] = "http://pics.goldsoon.com/C1/templates/images/ruflag_gray.gif";
//------------NEW GAME Dofus start------------------------------
image_Country[12] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/en_02.gif";
image_Country[13] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/de_02.gif";
image_Country[14] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/es_02.gif";
image_Country[15] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/fr_02.gif";
image_Country[16] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/it_02.gif";
image_Country[17] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/nl_02.gif";
image_Country[18] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/pt_02.gif";
image_Country[19] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/us_02.gif";
image_Country[20] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/int_02.gif";
image_Country[21] = "http://pics.goldsoon.com/C1/templates/images/icon_all_gray.gif";
image_Country[22] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/BR_02.gif";
image_Country[23] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/ro_02.gif";
image_Country[24] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/ru_02.gif";
image_Country[25] = "http://pics.goldsoon.com/C1/templates/images/countrylogo/pl_02.gif";
//--------------------end---------------------------------------
function setCountryFlag() {
    try {
        var img_all = document.getElementById("img_all");
        var img_en = document.getElementById("img_en");
        var img_de = document.getElementById("img_de");
        var img_fr = document.getElementById("img_fr");
        var img_es = document.getElementById("img_es");
        var img_ru = document.getElementById("img_ru");
        var CountryStr = document.getElementById("CountryStr");
        var Country = document.getElementById("ServerLists1_txt_Country").value;
        var GameID = document.getElementById("ServerLists1_txt_GameID").value;
        //--------add new game dofus start --------------
        //        var countrydofus = $("countryDofus");
        //        var imgdofus_en = $("dofus_uk");
        //        var imgdofus_de = $("dofus_de");
        //        var imgdofus_es = $("dofus_es");
        //        var imgdofus_fr = $("dofus_fr");
        //        var imgdofus_it = $("dofus_it");
        //        var imgdofus_pt = $("dofus_pt");
        //        var imgdofus_nl = $("dofus_nl");
        //        var imgdofus_br = $("dofus_br");
        //        var imgdofus_int = $("dofus_int");
        //        var imgdofus_us = $("dofus_us");
        //        var imgdofus_all = $("dofus_all");
        //        var imgdofus_br = $("dofus_br");
        //------------------end------------------------------------
        if (GameID == 1) {
            CountryStr.style.display = "block";
            if (Country != "") {
                if (Country.toLowerCase() == "en") {

                }
                else if (Country.toLowerCase() == "de") {
                    img_en.src = image_Country[1];
                    img_de.src = image_Country[2];
                }
                else if (Country.toLowerCase() == "fr") {
                    img_en.src = image_Country[1];
                    img_fr.src = image_Country[4];
                }
                else if (Country.toLowerCase() == "es") {
                    img_en.src = image_Country[1];
                    img_es.src = image_Country[6];
                }
                else if (Country.toLowerCase() == "ru") {
                    img_en.src = image_Country[1];
                    img_ru.src = image_Country[10];
                }
            }
            else {
                img_all.src = image_Country[8];
                img_en.src = image_Country[1];
            }
        }
        //--------add by jasonli 20100525 add new game dofus start-------------
        else if (GameID == 51 || GameID == 52) {
            if (GameID == 51) {
                $('countryDofus').style.display = "block";
            } else { $('CountryRunes').style.display = "block"; }
            if (Country != "") {
                var lowerCaseCountry = Country.toLowerCase();
                if (lowerCaseCountry == "uk"||lowerCaseCountry=="en") {
                    //imgdofus_en.src = image_Country[12];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[12];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                    //imgdofus_all.src = image_Country[21];
                }
                else if (lowerCaseCountry == "de") {
                    //imgdofus_de.src = image_Country[13];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[13];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "es") {
                    //imgdofus_es.src = image_Country[14];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[14];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "fr") {
                    //imgdofus_fr.src = image_Country[15];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[15];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "nl") {
                    //imgdofus_nl.src = image_Country[17];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[17];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "it") {
                    //imgdofus_it.src = image_Country[16];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[16];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "pt") {
                    // imgdofus_pt.src = image_Country[18];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[18];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "us") {
                    //imgdofus_us.src = image_Country[19];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[19];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "int") {
                    //imgdofus_int.src = image_Country[20];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[20];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "br") {
                    //imgdofus_br.src = image_Country[22];
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[22];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "ro") {
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[23];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "ru") {
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[24];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else if (lowerCaseCountry == "pl") {
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[25];
                    //imgdofus_all.src = image_Country[21];
                    $(GetGameImgId(GameID, "all")).src = image_Country[21];
                }
                else {
                    $(GetGameImgId(GameID, lowerCaseCountry)).src = image_Country[8];
                }
            }
            else {
                $(GetGameImgId(GameID, "all")).src = image_Country[8];
            }
        }
        //-------------------------end-----------------------------------------
        else {
            CountryStr.style.display = "none";
        }
    }
    catch (e) {
    }
}
function $(id) {
    return document.getElementById(id);
}
function showGameTips() {
    var arrayTips = {};
    arrayTips["Game1"] = "<table class='serverlist'><tr><td class='tdL'><img alt='wow (EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_woweu.gif' /></td><td class='tdR'><ul><li>Face to face trading, safe and soon. </li><li>There is a full stock in all of servers, face to face trading, makes everything soon beyond your imagination.</li></ul></td></tr></table>";
    arrayTips["Game15"] = "<table class='serverlist'><tr><td class='tdL'><img alt='wow (USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_wowus.gif' /></td><td class='tdR'><ul><li>Face to face trading, safe and soon. </li><li>Deliver the gold to you soon beyond your imagination.</li></ul></td></tr></table>";
    arrayTips["Game30"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Game CD-Key & Time Card' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_gamecard.gif' /></td><td class='tdR'><ul><li>Instant delivery! We will send card key or code to your email after you pay, make sure your email address is right.</li></ul></td></tr></table>";
    arrayTips["Game28"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Age of Conan (USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_conus.gif' /></td><td class='tdR'><ul><li>we will mail the gold to you as soon as possible while you are offline in the game.</li></ul></td></tr></table>";
    arrayTips["Game29"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Age of Conan (EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_coneu.gif' /></td><td class='tdR'><ul><li>we will mail the gold to you as soon as possible while you are offline in the game.</li></ul></td></tr></table>";
    arrayTips["Game27"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Final Fantasy XI' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_f.gif' /></td><td class='tdR'><ul><li>Final mission: deliver gold face to face quickly. Mail gold 1M by 1M.</li></ul></td></tr></table>";
    arrayTips["Game20"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Eve Online' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_eve.gif' /></td><td class='tdR'><ul><li>Fast delivery .we mail the gold often.</li></ul></td></tr></table>";
    arrayTips["Game17"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Guild Wars' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_gwars.gif' /></td><td class='tdR'><ul><li>ONLY mail the gold! Just check the gold in your ingame mail box after you paid. So simple.</li></ul></td></tr></table>";
    arrayTips["Game24"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Lord of Rings (USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_ringsus.gif' /></td><td class='tdR'><ul><li>Unique deliver team, you will get your gold soon beyond your imagination.</li></ul></td></tr></table>";
    arrayTips["Game19"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Lord of Rings (EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_ringseu.gif' /></td><td class='tdR'><ul><li>Unique deliver team, you will get your gold soon beyond your imagination.</li></ul></td></tr></table>";
    arrayTips["Game16"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Vanguard' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_van.gif' /></td><td class='tdR'><ul><li>short of demand, full of stock for you.</li></ul></td></tr></table>";
    arrayTips["Game31"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Warhammer Online(USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_wus.gif' /></td><td class='tdR'><ul><li>we have sufficient gold. Always ready to deliver the gold. Gold will be arrived at soon.</li></ul></td></tr></table>";
    arrayTips["Game32"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Warhammer Online(EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_weu.gif' /></td><td class='tdR'><ul><li>we have sufficient gold. Always ready to deliver the gold. Gold will be arrived at soon.</li></ul></td></tr></table>";
    arrayTips["Game45"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Aion Online(USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_Aionus.gif' /></td><td class='tdR'><ul><li>Catch the Hottest Sale.</li><li>Ingame mail, Soon and Safe.</li><li>Enjoy your exciting game journey now!</li></ul></td></tr></table>";
    arrayTips["Game46"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Aion Online(EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_Aioneu.gif' /></td><td class='tdR'><ul><li>Catch the Hottest Sale.</li><li>Ingame mail, Soon and Safe.</li><li>Enjoy your exciting game journey now!</li></ul></td></tr></table>";
    arrayTips["Game47"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Star Trek online(EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_StarTrek_eu.gif' /></td><td class='tdR'><ul><li>Credits is full in stock now!We are ready for your demand!</li></ul></td></tr></table>";
    arrayTips["Game48"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Star Trek online(USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/logo_StarTrek_us.gif' /></td><td class='tdR'><ul><li>Credits is full in stock now!We are ready for your demand!</li></ul></td></tr></table>";
    arrayTips["Game49"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Allods OL(USA)' src='http://pics.goldsoon.com/C1/templates/images/logo/usa_aol.gif' /></td><td class='tdR'><ul><li>Does the stingy NPC in Allods OL always leaves you penniless? Don’t worry! Goldsoon prepares enough gold for you to spend freely. </li></ul></td></tr></table>";
    arrayTips["Game50"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Allods OL(EUR)' src='http://pics.goldsoon.com/C1/templates/images/logo/eur_aol.gif' /></td><td class='tdR'><ul><li>Does the stingy NPC in Allods OL always leaves you penniless? Don’t worry! Goldsoon prepares enough gold for you to spend freely. </li></ul></td></tr></table>";
    // ----   Add NewGame DOFUS Start----
    arrayTips["Game51"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Dofus Kamas' src='http://pics.goldsoon.com/C1/templates/images/logo/dofus.jpg' /></td><td class='tdR'><ul><li>Instant delivery of dofus kamas.Guaranteed Simple, Secure and Fast Transactions.</li></ul></td></tr></table>";
    // ----  Add NewGame DOFUS END-------
    arrayTips["Game52"] = "<table class='serverlist'><tr><td class='tdL'><img alt='Runes of magic' src='http://pics.goldsoon.com/C1/templates/images/logo/Runes-of-magic.gif' /></td><td class='tdR'><ul><li>We offer you the cheapest gold of Runes of magic!</li><li> Becoming our member and enjoy our excellent service!</li></ul></td></tr></table>";
    arrayTips["Game53"] = "<table class='serverlist'><tr><td class='tdL'><img alt='metin2yang' src='http://pics.goldsoon.com/C1/templates/images/logo/metin2yang.jpg' /></td><td class='tdR'><ul><li>We have the world's largest suppliers for Metin2 yang，and we can server you any time.</li></ul></td></tr></table>";

    var GameID = document.getElementById("ServerLists1_txt_GameID").value;
    var obj = "Game" + GameID;
    document.getElementById("div_gametips").innerHTML = arrayTips[obj];
    if (GameID == 53) {
        $("Metin2").style.display = "block";
        $("Gameword").style.display = "none";
    }
    else {
        $("Gameword").style.display = "block";
        $("Metin2").style.display = "none";
    }
}
function GetGameImgId(gameid, country) {
    /// <summary>
    /// 获取游戏对应国家站点图片名称
    /// </summary>
    var pre = "";
    if (gameid == 51) {
        pre = "dofus";
    }
    else if (gameid == 52) {
        pre = "runes";
    }
    return pre + "_" + country;
}
