User:Drkdragonz66/Combat Arms Mainpage Source

var StartGameButton = null, loginCookie = $.cookie("CAPassport"), startPop = $.cookie("CAStartPop"), GamesBanner = $.flash.create({       swf: "http://nxcache.nexon.net/combatarms/modules/banner_nx_games.swf",        width: 259, height: 59, wmode: "transparent", bgcolor: "#191919",        allowScriptAccess: "always"    }), GameCardsBanner = $.flash.create({       swf: "http://nxcache.nexon.net/combatarms/modules/banner_nx_card.swf",        width: 259, height: 59, wmode: "transparent", bgcolor: "#191919",        allowScriptAccess: "always"    }), fun_stuff = { sub_categories: ["Movies", "Wallpapers", "Screenshots", "Polls"], urls: ["/FunStuff/Movies.aspx", "/FunStuff/Wallpaper.aspx", "/FunStuff/Screenshots.aspx", "/FunStuff/Poll.aspx"] },   site_map = [{ main_category: "News", sub_categories: ["News", "Content Preview", "Events", "Maintenance"], urls: ["/News/List.aspx?boardNo=101&pageIndex=1", "/News/List.aspx?boardNo=105&pageIndex=1", "/News/List.aspx?boardNo=103&pageIndex=1", "/News/List.aspx?boardNo=102&pageIndex=1"] }, { main_category: "Guides", sub_categories: ["Draft Notice", "Installation", "Starting A War", "Interface & Controls", "Clearance Levels", "War Zones", "Missions", "Player Customizations", "Community Features", "Video / Youtube", "Weapon Modification", "Achievements", "Gun Emporium"], urls: ["/Guides/DraftNotice.aspx", "/Guides/Installation.aspx", "/Guides/Starting.aspx", "/Guides/Interface.aspx", "/Guides/ClearanceLevels.aspx", "/Guides/WarZones.aspx", "/Guides/Missions.aspx", "/Guides/PlayerCustomization.aspx", "/Guides/CommunityFeatures.aspx", "/Guides/VideoYoutube.aspx", "/Guides/WeaponModification.aspx", "/Guides/Achievements.aspx", "/Guides/GunEmporium.aspx"] }, { main_category: "Clans&Rankings", sub_categories: ["Player Profile", "Ranks", "Rank Requirements", "Player Rankings", "Ranking Search", "Wall of Shame", "Clan Page", "Clan Search", "Clan Profile", "Clan Rankings", "Clan Match History"], urls: ["/ClansRankings/PlayerProfile.aspx", "/ClansRankings/Ranks.aspx", "/ClansRankings/RankRequirements.aspx", "/ClansRankings/PlayerRankings.aspx", "/ClansRankings/RankingSearch.aspx", "/ClansRankings/WallofShame.aspx", "/ClansRankings/Clan.aspx", "/ClansRankings/ClanSearch.aspx", "/ClansRankings/ClanProfile.aspx", "/ClansRankings/ClanRankings.aspx", "/ClansRankings/Match.aspx"] }, { main_category: "Shop", sub_categories: ["The Arsenal", "Weapons Mods", "Supply Cases", "Review Purchases"], urls: ["/Shop/Arsenal.aspx", "/Shop/WeaponMods.aspx", "/Shop/SupplyCases.aspx", "http://www.nexon.net/nx/review-purchases/"] }, { main_category: "Community", sub_categories: ["Combat Arms Forums", "Hall of Fame"], urls: ["http://forum.nexon.net/CombatArms", "/Community/HallofFame.aspx"] }, { main_category: "Support", sub_categories: ["Game Client & Updates", "FAQ", "User Abuse", "Security", "Customer Support"], urls: ["/Support/GameClient.aspx", "/Support/FAQ.aspx", "/Support/UserAbuse.aspx", "/Support/Security.aspx", "/Support/CustomerSupport.aspx"]}]; function killLoginPopup { $("#login-popup").hide } function hideStartPop(a) { a ? $.cookie("CAStartPop", "true", { expires: 365, path: "/", domain: "nexon.net" }) : $.cookie("CAStartPop", null, { path: "/", domain: "nexon.net" }) } function openPopup(a, c) { if (typeof a != "undefined") { c = typeof c == "undefined" ? "alert" : c;       window.open(a, c, "toolbars=0,menubars=0,status=0,scrollbars=auto,width=500,height=620") || alert("Your browser's pop-up blocker is currently enabled.  Please disable the pop-up blocker temporarily and try again.  Thank you.") } } function getQueryVariable(a) { for (var c = window.location.search.substring(1).split("&"), d = 0; d < c.length; d++) { var b = c[d].split("="); if (b[0] == a) return b[1] }   return null } function getDynamicHeight { var a = $(" ").html($(this).parents("div:eq(0)").html).appendTo($(this)), c = a.height; a.remove; return c } function startGameCheck { $.getScript("http://nxcache.nexon.net/publisher/combatarms/publisher_startGame.js", function {        if (typeof DATA_startGame == "undefined") return false;        var a = DATA_startGame;        if (a[0].content_category == "3" || a[0].content_category == "1" && a[0].progress_type == "1") {            $("#m-ticker").removeClass("dn").find("a").attr("href", a[0].content_text).html($(" ").text(" - " + a[0].content_title));            if (nexon.sso.isLoggedIn) {                $('.m-play-loggedin').addClass('maintenance');                $('.m-play-loggedin a:first').attr('href', );            } else {                $('.m-play-loggedout').addClass('maintenance');                $('.m-play-loggedout a:first').attr('href', );            }        }    }) } function CS { alert("Coming Soon!") } function navHelper(a) { var c = $(""); a.path.find("a:eq(1)").text(a.primaryText).attr("href", a.url); a.path.find("span").text(a.secondaryText); a.nav.html("").append($(" ").append($(" ").attr({       alt: a.headerAlt, src: a.headerImg    }))); for (var d = 0; d < a.categoryLength; d++) c.append($("").append($("").text(a.sub_categories[d]).attr("href", a.urls[d]))); c.appendTo(a.nav); a.nav.find("li:eq(" + a.index + ") a").active } function createSubNavAndBreadcrumbs { var a = location.pathname, c = $("#path").html('" src="http://nxcache.nexon.net/combatarms/icon/ico_path.gif"/> Home > @@@ > ### '), d = $("#m-subnav"); if (a.indexOf("FunStuff") > 0) { for (var b = 0, e = 0; e < fun_stuff.urls.length; e++) if (fun_stuff.urls[e] == a)               b = e;        navHelper({            path: c, nav: d, primaryText: "Fun Stuff",            url: fun_stuff.urls[0], secondaryText: fun_stuff.sub_categories[b],            headerAlt: "Fun Stuff",            headerImg: "http://nxcache.nexon.net/combatarms/titles/tit_fun_stuff.png",            categoryLength: fun_stuff.sub_categories.length,            sub_categories: fun_stuff.sub_categories,            urls: fun_stuff.urls, index: b        }) } else { b = [0, 0]; for (e = 0; e < site_map.length; e++) for (var f = 0; f < site_map[e].urls.length; f++) if (site_map[e].urls[f] == a)                   b = [e, f]; if (b.toString == "0,0" && getQueryVariable("boardNo") != null) switch (getQueryVariable("boardNo")) { case "101": b[1] = 0; break; case "102": b[1] = 3; break; case "103": case "104": b[1] = 2; break; case "105": b[1] = 1 }       else if (a.indexOf("ItemDetail") > 0) b[0] = 3; navHelper({           path: c,            nav: d,            primaryText: site_map[b[0]].main_category,            url: site_map[b[0]].urls[0],            secondaryText: site_map[b[0]].sub_categories[b[1]],            headerAlt: site_map[b[0]].main_category,            headerImg: "http://nxcache.nexon.net/combatarms/titles/tit_" + formatImageName(site_map[b[0]].main_category) + ".png",            categoryLength: site_map[b[0]].sub_categories.length,            sub_categories: site_map[b[0]].sub_categories,            urls: site_map[b[0]].urls, index: b[1]        }) } } var formatImageName = function (a) { return a.toLowerCase.replace(/\s|[-]/g, "_").replace(/[^\w_]/g, "") }, getDownloadLinks = function (a) { return $.getScript("http://nxcache.nexon.net/combatarms/downloads/download_data.js", function {        if (typeof dl == "undefined")            dl = { pandoLink: "#", fullVersionLink: "#", manualPatchLink: "#" };        a.apply(dl)    }) }; function NxLaunchGame { _gaq = (typeof _gaq != "undefined") ? _gaq : []; _gaq.push(["sdt._trackEvent", "CAWebLaunch", "StartGame"]); _gaq.push(["cdt._trackEvent", "CAWebLaunch", "StartGame"]); nexon.play("33563143"); } function DownloadGame { getDownloadLinks(function { location.href = this.pandoLink }) } function ManualDownload { location.href = "#" } function getCookie(a) { return $.cookie(a) != null ? $.cookie(a) : "" } function NxLaunchGameMain { $.getScript("http://nxcache.nexon.net/publisher/combatarms/publisher_startGame.js", function {            if (typeof DATA_startGame == "undefined")                return false;            var a = DATA_startGame;            switch (a[0].content_category) {                case "1":                    a[0].progress_type != "1" ? NxLaunchGame : alert(a[0].content_title);                    break;                case "2":                    NxLaunchGame;                    break;                case "3":                    alert(a[0].content_title)            }        }); } var objUpdateInterval = null; function onUpdateResponse(a) { if (a.ErrorCode == undefined) NgbLogin.Logout; else if (a.ErrorCode == CommonError.NoError) { window.clearInterval(objUpdateInterval); objUpdateInterval = setInterval("doUpdateSession", a.UpdateInterval * 1E3) } else { a.ErrorCode == AuthSystemError.Disconnected ? alert("You've logged in from another location. Please log in to continue.") : alert("Logged out for inactivity. Please log in to continue!"); NgbLogin.Logout } } function commaFormat(a) { a = a.toString; var c = a.length; if (c < 4) return a; var d = c % 3; c = Math.floor((c - 1) / 3); a = a.split(""); for (var b = 0; b < c; b++) if (d == 0 && b == 0) { a.splice(-3, 0, ","); a.splice(0, 0, " ") } else a.splice(b * 3 + d + b, 0, ","); return a = a.join("") } function meterTugOfWarEvent { $.getScript("http://nxcache.nexon.net/publisher/combatarms/publisher_TugOfWarMeter.js", function { if (typeof DATA_TugOfWarMeter == "undefined") return false; var a = DATA_TugOfWarMeter.split(":"); if (a.length != 2) return false; $(".nx-wrap").prepend($('  ')); $("#score-scorpions").text(a[0]); $("#score-spiders").text(a[1]) }) } function pageLoad { //gaLoad("UA-1376772-15"); startGameCheck; $("#m-startgame ul").login(       { checkbox: {            isChecked: function  { return $(this).attr("checked") },            toggle: function  { }        }        }); $("#funstuff").navBuilder(fun_stuff, { buildMenu: false }); $("#header-nav .nav .main").navBuilder(site_map); $("#funstuff div").expand({       showText: "",        hideText: "",        hideClass: "active", oHeight: 25, eHeight: 92    }); $("#funstuff").height(25); $("#header-nav .nav").hoverdropdown({       oHeight: 0,        eHeight: $("#header-nav .nav .drop").height + 34,        child: ".drop"    }); $("#header-nav .nav .drop").height(0); $("#header-nav .nav .drop .wrap").css({       position: "absolute",        top: "11px",        bottom: "15px"    }); $(".wrap li:first").addClass("first"); $(".nav .drop .wrap > li ").pseudohover({       hover: ".nav .drop .wrap > li",        pseudo: ".nav .main li",        className: "hover"    }); $(".main li").each(function {        $(this).addClass($(this).text.replace("&", "n"))    }); createSubNavAndBreadcrumbs; $("#freetoplay-trigger").freetoplay; $("#m-nxlinks li:eq(0)").html(GamesBanner); $("#m-nxlinks li:eq(1)").html(GameCardsBanner); $("#m-startgame").append($("")); };