var service;
var games;
var tiers;
var payment_terms;
var gf_games;
var gf_locations;
var qs_params = new Array();
function init_page()
{
service = new game_service( 500.00, 600.00, 0.00, 50, 50.00 );
games = new Array();
gf_games = new Array();
tiers = new Array();
gf_locations = new Array();
payment_terms = new Array();
currency_conversion_indexes = new Array();
payment_terms[ 1 ] = new payment_term( 1, 1.00000 );
payment_terms[ 3 ] = new payment_term( 3, 0.90000 );
payment_terms[ 6 ] = new payment_term( 6, 0.85000 );
payment_terms[ 12 ] = new payment_term( 12, 0.80000 );
currency_conversion_indexes["GBP-EUR"] = new currency_conversion_index( "GBP", "EUR", 1.30843 );
currency_conversion_indexes["GBP-USD"] = new currency_conversion_index( "GBP", "USD", 2.00337 );
service.add_option_discount( 391, 6, 0.28571 );
service.add_option_discount( 391, 12, 0.50000 );
service.add_option_discount( 391, 3, 0.28571 );
gf_locations.push( new gf_location( 8, 'Amsterdam' ) );
gf_locations.push( new gf_location( 3, 'London' ) );
temp = new game( "Half-Life", 44, 0, 2500.00, 500.00, 7, "", 0, 0, Array( '44' ), new Array( '' ) );
temp.add_price_band( 12, 24, 250.00 );
games[ "7" ] = temp;
temp = new game( "Half-Life: Team Fortress Classic", 44, 158, 1250.00, 250.00, 9, "", 0, 0, Array( '44' ), new Array( '158' ) );
temp.add_price_band( 12, 24, 125.00 );
games[ "9" ] = temp;
temp = new game( "Half-Life: Day of Defeat", 44, 158, 1250.00, 250.00, 10, "", 0, 0, Array( '44' ), new Array( '158' ) );
temp.add_price_band( 12, 24, 125.00 );
games[ "10" ] = temp;
temp = new game( "Medal of Honor: Allied Assault", 11, 0, 1000.00, 0.00, 11, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '11' ), new Array( '' ) );
temp.add_price_band( 12, 32, 100.00 );
games[ "11" ] = temp;
temp = new game( "Quake 3 Arena", 2, 0, 1000.00, 0.00, 12, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '2' ), new Array( '' ) );
temp.add_price_band( 12, 32, 100.00 );
games[ "12" ] = temp;
temp = new game( "Unreal Tournament (UT99)", 1, 0, 1000.00, 0.00, 15, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '1' ), new Array( '' ) );
temp.add_price_band( 12, 20, 100.00 );
games[ "15" ] = temp;
temp = new game( "Unreal Tournament 2003", 20, 0, 1000.00, 0.00, 20, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '20' ), new Array( '' ) );
temp.add_price_band( 8, 20, 125.00 );
games[ "20" ] = temp;
temp = new game( "Raven Shield", 22, 0, 1500.00, 0.00, 30, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '22' ), new Array( '' ) );
temp.add_price_band( 12, 16, 125.00 );
games[ "30" ] = temp;
temp = new game( "Soldier of Fortune 2", 19, 0, 1000.00, 0.00, 31, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '19' ), new Array( '' ) );
temp.add_price_band( 12, 24, 100.00 );
games[ "31" ] = temp;
temp = new game( "IGI2", 27, 0, 1500.00, 0.00, 41, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '27' ), new Array( '' ) );
temp.add_price_band( 12, 12, 125.00 );
games[ "41" ] = temp;
temp = new game( "Enemy Territory", 96, 0, 1000.00, 0.00, 47, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available..", 0, 0, Array( '96' ), new Array( '' ) );
temp.add_price_band( 12, 32, 100.00 );
games[ "47" ] = temp;
temp = new game( "Jedi Knight Academy", 52, 0, 1000.00, 0.00, 55, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '52' ), new Array( '' ) );
temp.add_price_band( 12, 18, 100.00 );
games[ "55" ] = temp;
temp = new game( "Halo", 54, 0, 1250.00, 250.00, 66, "", 0, 0, Array( '54' ), new Array( '' ) );
temp.add_price_band( 12, 16, 125.00 );
games[ "66" ] = temp;
temp = new game( "Savage: The Battle for Newerth", 57, 0, 1500.00, 500.00, 67, "", 0, 0, Array( '57' ), new Array( '' ) );
temp.add_price_band( 16, 32, 125.00 );
games[ "67" ] = temp;
temp = new game( "GTA: Vice City (MTA)", 60, 0, 1000.00, 0.00, 69, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '60' ), new Array( '' ) );
temp.add_price_band( 12, 26, 100.00 );
games[ "69" ] = temp;
temp = new game( "Medal of Honor: Allied Assault: Breakthrough", 51, 0, 1250.00, 250.00, 70, "", 0, 0, Array( '51' ), new Array( '' ) );
temp.add_price_band( 12, 32, 125.00 );
games[ "70" ] = temp;
temp = new game( "Unreal Tournament 2004", 67, 0, 1000.00, 0.00, 86, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '67' ), new Array( '' ) );
temp.add_price_band( 8, 20, 125.00 );
games[ "86" ] = temp;
temp = new game( "America's Army", 28, 0, 1500.00, 300.00, 87, "
Additional Information:
Unfortunately we are not able to provide honor servers. All our Americas Army servers are plain.", 0, 0, Array( '28' ), new Array( '' ) );
temp.add_price_band( 12, 20, 150.00 );
games[ "87" ] = temp;
temp = new game( "Call of Duty: United Offensive", 79, 0, 2500.00, 500.00, 150, "", 0, 0, Array( '79' ), new Array( '' ) );
temp.add_price_band( 12, 20, 250.00 );
games[ "150" ] = temp;
temp = new game( "Half-Life 2: Deathmatch", 76, 1084, 1250.00, 250.00, 151, "", 0, 0, Array( '76' ), new Array( '1084' ) );
temp.add_price_band( 12, 16, 150.00 );
games[ "151" ] = temp;
temp = new game( "Day of Defeat: Source ( HL2 engine )", 76, 3164, 1700.00, 300.00, 177, "", 0, 0, Array( '76' ), new Array( '3164' ) );
temp.add_price_band( 12, 32, 150.00 );
temp.add_addon( "Tick Rate 100", 177, 2835, 1100.00, "2835" );
games[ "177" ] = temp;
temp = new game( "Quake 4", 107, 0, 750.00, 250.00, 190, "", 0, 0, Array( '107' ), new Array( '' ) );
temp.add_price_band( 8, 16, 125.00 );
games[ "190" ] = temp;
temp = new game( "F.E.A.R", 105, 0, 1000.00, 200.00, 191, "", 0, 0, Array( '105' ), new Array( '' ) );
temp.add_price_band( 8, 16, 150.00 );
games[ "191" ] = temp;
temp = new game( "Red Orchestra", 113, 0, 2000.00, 0.00, 194, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '113' ), new Array( '' ) );
temp.add_price_band( 16, 32, 125.00 );
games[ "194" ] = temp;
temp = new game( "FarCry", 70, 0, 1300.00, 300.00, 195, "", 0, 0, Array( '70' ), new Array( '' ) );
temp.add_price_band( 8, 16, 200.00 );
games[ "195" ] = temp;
temp = new game( "Dark Messiah", 115, 4083, 1500.00, 300.00, 199, "", 0, 0, Array( '115' ), new Array( '4083' ) );
temp.add_price_band( 12, 24, 150.00 );
games[ "199" ] = temp;
temp = new game( "Warsow", 116, 0, 400.00, 0.00, 201, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '116' ), new Array( '' ) );
temp.add_price_band( 4, 16, 100.00 );
games[ "201" ] = temp;
temp = new game( "Battlefield Series ( 2142 and BF2 ranked, BF1942 and Vietnam )", 120, 0, 2800.00, 0.00, 212, "
Additional Information:
- Ranked servers must be open to the public, therefore the Private option (below) is not available for this game.
- The server may be passworded for matches only when run in unranked mode.
- Ranked servers must comply with the EA Terms and Conditions and Rules of Conduct.
- You may not impersonate an official EA server by putting EA UK in your server name.
", 1, 0, Array( '69', '97', '23', '120' ), new Array( '0' ) );
temp.add_price_band( 16, 64, 175.00 );
games[ "212" ] = temp;
temp = new game( "Counter-Strike ( Source, 1.6 or CZ )", 76, 399, 1200.00, 300.00, 222, "", 0, 0, Array( '44', '12', '76' ), new Array( '813', '106', '399' ) );
temp.add_price_band( 12, 32, 150.00 );
temp.add_addon( "Tick Rate 66", 222, 2834, 500.00, "0" );
temp.add_addon( "Tick Rate 100", 222, 2835, 1600.00, "0" );
games[ "222" ] = temp;
temp = new game( "Enemy Territory: Quake Wars - Official Ranked", 131, 0, 1120.00, 0.00, 233, "
Additional Information:- Servers will only be ranked and record stats whilst running between 16 and 24 slots. Servers less than 16 slots or greater than 24 slots will not record stats.
- This game may be passworded when running in unranked mode only. An additional discount for a permanently passworded server (the Private option below) is not available.
- This is a promotional launch price, and as such the discounts for longer rental periods do not apply.
", 1, 0, Array( '131' ), new Array( '' ) );
temp.add_price_band( 8, 32, 140.00 );
temp.add_alias( "Quake Wars" )
games[ "233" ] = temp;
temp = new game( "Call of Duty 1 & 2 ( excludes CoD:UO )", 106, 0, 1000.00, 0.00, 251, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 0, 0, Array( '59', '106' ), new Array( '' ) );
temp.add_price_band( 12, 64, 100.00 );
games[ "251" ] = temp;
temp = new game( "BattleField 2 - Modern Combat ( PlayStation 2 only )", 124, 0, 1000.00, 0.00, 252, "
NOTE: The private option is not available for this game.", 0, 0, Array( '124' ), new Array( '' ) );
temp.add_price_band( 8, 24, 125.00 );
games[ "252" ] = temp;
temp = new game( "Kingpin", 58, 0, 1000.00, 0.00, 253, "", 0, 0, Array( '58' ), new Array( '' ) );
temp.add_price_band( 12, 32, 100.00 );
games[ "253" ] = temp;
temp = new game( "Crysis (DX9 & DX10)", 132, 0, 1400.00, 1000.00, 254, "
Additional Information:- Both the DX9 and DX10 versions of the server are available. You can switch between either at will.
", 1, 0, Array( '132' ), new Array( '' ) );
temp.add_price_band( 8, 32, 300.00 );
games[ "254" ] = temp;
temp = new game( "Multiplay Orange Box (includes TF2, FF, CS:S[100TR], CS1.6 & CS:CZ)", 76, 5957, 1900.00, 500.00, 257, "
Note: 24 - 32 player support for TF2 is currently classed as BETA and as such may experience some stability issues.
The Multiplay Orange Box includes:- Team Fortress 2
- Fortress Forever
- Counter-Strike: Source (100 tick!)
- Counter-Strike 1.6
- Condition Zero
", 1, 0, Array( '44', '12', '76' ), new Array( '813', '106', '399', '5939', '5957' ) );
temp.add_price_band( 8, 32, 200.00 );
temp.add_alias( "Fortress Forever (Multiplay Orange Box)" )
temp.add_alias( "Team Fortress 2 (Multiplay Orange Box)" )
games[ "257" ] = temp;
temp = new game( "World In Conflict - Official Ranked", 137, 0, 1000.00, 0.00, 258, "
Additional Information:
This game may be passworded, however an additional discount for a permanently passworded server (the Private option below) is not available.", 1, 0, Array( '137' ), new Array( '' ) );
temp.add_price_band( 8, 16, 125.00 );
games[ "258" ] = temp;
temp = new game( "Unreal Tournament 3", 142, 0, 1100.00, 500.00, 389, "
Important Information
It is important to note that the Unreal Tournament 3 server code is not as reliable as that of the preceding UT games. There are numerous bugs, issues and missing or incomplete features which include above average crashing and limited rcon functionality.
Rental of these clanservers is on the understanding that you accept these flaws and that there is nothing Multiplay are able to do to improve the reliability and stability of the code.", 1, 0, Array( '142' ), new Array( '' ) );
temp.add_price_band( 8, 32, 200.00 );
games[ "389" ] = temp;
temp = new game( "Call of Duty 4 ( includes CoD 1 & 2 )", 143, 0, 1180.00, 500.00, 390, "
Additional Information:
- This package includes Call of Duty 1 and Call of Duty 2 as swappable games.
- Call of Duty: United Offensive is NOT included.
- Althought this game will allow servers up to 64 slots in size, it is highly recommended that servers remain 32 slots or less. The server code is known to be much less stable above this size. Multiplay can not accept any responsibility for the increased frequency of crashing this will result in.
", 2, 0, Array( '106', '59', '143' ), new Array( '' ) );
temp.add_price_band( 12, 64, 140.00 );
games[ "390" ] = temp;
temp = new game( "Haze", 136, 0, 1250.00, 250.00, 393, "", 0, 0, Array( '136' ), new Array( '' ) );
temp.add_price_band( 12, 16, 125.00 );
games[ "393" ] = temp;
gf_games[1] = new gf_game( 1, 'UnrealTournament' );
gf_games[1].add_mod( 1230, 'Excessive CTF', '', false );
gf_games[1].add_mod( 1231, 'CTF4', '', false );
gf_games[1].add_mod( 1232, 'Rocket Arena', '', false );
gf_games[1].add_mod( 1233, 'LastManStanding Score', '', false );
gf_games[1].add_mod( 1234, 'Excessive Deathmatch', '', false );
gf_games[1].add_mod( 1235, 'Excessive CTF4', '', false );
gf_games[1].add_mod( 1236, 'Assault (League)', '', false );
gf_games[1].add_mod( 1237, 'The Last Man Standing', '', false );
gf_games[1].add_mod( 1238, 'Bunnytrack', '', false );
gf_games[1].add_mod( 1314, 'StrikeForce', '', false );
gf_games[1].add_mod( 1315, 'TheThirdReich', '', false );
gf_games[1].add_mod( 1529, 'UnrealTournament', 'v436', true );
gf_games[1].add_mod( 1811, 'JailBreak', '', false );
gf_games[1].add_mod( 5161, 'Monster Hunt', '503', false );
gf_games[1].add_mod( 5763, 'Bunnytrack 2', '', false );
gf_games[1].add_mod( 6143, 'Onslaught', '1.0', false );
gf_games[1].add_mod( 6146, 'Onslaught', 'Final', false );
gf_games[1].add_mod( 6352, 'Pacman UT', '1.0', false );
gf_games[1].add_mod( 6353, 'UT Harvester', '1.0', false );
gf_games[1].add_mod( 6354, 'Harvester', '1.1', false );
gf_games[1].add_mod( 6355, 'Assassins', '1.0', false );
gf_games[1].add_mod( 6356, 'King of the Hill', '2.0', false );
gf_games[1].add_mod( 6357, 'Fragball', '1.0', false );
gf_games[2] = new gf_game( 2, 'Quake III Arena' );
gf_games[2].add_mod( 6, 'Rocket Arena 3', '', false );
gf_games[2].add_mod( 7, 'OSP', '', false );
gf_games[2].add_mod( 10, 'Challenge ProMode Arena', 'v1.46', false );
gf_games[2].add_mod( 21, 'Jailbreak', '', false );
gf_games[2].add_mod( 22, 'Threewave', '', false );
gf_games[2].add_mod( 23, 'Proball', '', false );
gf_games[2].add_mod( 32, 'Weapons Factory Arena', '', false );
gf_games[2].add_mod( 122, 'True Combat', '', false );
gf_games[2].add_mod( 145, 'Quake 3 Fortress', '', false );
gf_games[2].add_mod( 255, 'Urban Terror v3', '', false );
gf_games[2].add_mod( 642, 'InstaUnlagged', '', false );
gf_games[2].add_mod( 945, 'Quake 3', '', true );
gf_games[2].add_mod( 2464, 'Freeze Tag', 'v1.51b', false );
gf_games[2].add_mod( 2558, 'Ultra Freeze Tag', 'v1.2.58', false );
gf_games[2].add_mod( 3395, 'Unlagged', '', false );
gf_games[2].add_mod( 3536, 'Hunt', '', false );
gf_games[2].add_mod( 5375, 'Urban Terror v4', '4.1', false );
gf_games[2].add_mod( 6445, 'Excessive Plus Original', '1.03', false );
gf_games[2].add_mod( 6446, 'Excessive Plus', '1.03', false );
gf_games[2].add_mod( 6587, 'Challenge ProMode Arena', 'v1.46', false );
gf_games[2].add_mod( 6636, 'XoneXfer', '', false );
gf_games[11] = new gf_game( 11, 'Medal of Honor' );
gf_games[11].add_mod( 941, 'Allied Assault', '', true );
gf_games[19] = new gf_game( 19, 'Soldier of Fortune II' );
gf_games[19].add_mod( 63, 'OSP', 'v1.0h', false );
gf_games[19].add_mod( 83, 'International Crime Syndicate', '', false );
gf_games[19].add_mod( 138, 'Goldrush', '', false );
gf_games[19].add_mod( 805, 'Adminmod', '', false );
gf_games[19].add_mod( 949, 'Soldier of Fortune II', '', true );
gf_games[20] = new gf_game( 20, 'UnrealTournament 2003' );
gf_games[20].add_mod( 1239, 'Deathball', '', false );
gf_games[20].add_mod( 1240, 'RedOrchestra', '', false );
gf_games[20].add_mod( 1241, 'Frag.Ops', '', false );
gf_games[20].add_mod( 1242, 'SAS', '', false );
gf_games[20].add_mod( 1243, 'Tournament', '', false );
gf_games[20].add_mod( 1538, 'Default', '', true );
gf_games[22] = new gf_game( 22, 'Raven Shield' );
gf_games[22].add_mod( 394, 'AthenaSword', '', false );
gf_games[22].add_mod( 947, 'RavenShield', '', true );
gf_games[23] = new gf_game( 23, 'Battlefield 1942' );
gf_games[23].add_mod( 98, 'Desert Combat', '', false );
gf_games[23].add_mod( 99, 'Eve of Destruction', 'v0.46', false );
gf_games[23].add_mod( 100, 'The Road to Rome', '', false );
gf_games[23].add_mod( 125, 'Galactic Conquest', '', false );
gf_games[23].add_mod( 137, 'Pirates', 'v1.0', false );
gf_games[23].add_mod( 150, 'Secret Weapons of WWII', '', false );
gf_games[23].add_mod( 422, 'Forgotten Hope', 'v0.7', false );
gf_games[23].add_mod( 646, 'Infantry', '', false );
gf_games[23].add_mod( 780, 'Battlegroup 42', 'v1.32', false );
gf_games[23].add_mod( 876, 'Interstate \'82', '', false );
gf_games[23].add_mod( 889, 'BF1918', '2.7', false );
gf_games[23].add_mod( 918, 'Desert Combat Extended', '', false );
gf_games[23].add_mod( 931, 'BattleField 1942', '', true );
gf_games[23].add_mod( 981, 'Desert Combat Final', '', false );
gf_games[23].add_mod( 2462, 'Stunts', 'v0.2e', false );
gf_games[23].add_mod( 5788, 'Desert Combat Movie Edition', '1.1', false );
gf_games[27] = new gf_game( 27, 'IGI2: Covert Strike' );
gf_games[27].add_mod( 1542, 'Default', '', true );
gf_games[28] = new gf_game( 28, 'Americas Army' );
gf_games[28].add_mod( 1543, 'Default', '', true );
gf_games[44] = new gf_game( 44, 'Half-Life' );
gf_games[44].add_mod( 106, 'CounterStrike 1.6', '', false );
gf_games[44].add_mod( 108, 'Team Fortress Classic (Steam)', '', false );
gf_games[44].add_mod( 158, 'Day of Defeat (Steam)', '', false );
gf_games[44].add_mod( 159, 'Battlegrounds (Steam)', '', false );
gf_games[44].add_mod( 170, 'Firearms (Steam)', '', false );
gf_games[44].add_mod( 216, 'The Specialists (Steam)', '', false );
gf_games[44].add_mod( 247, 'Adrenalin Gamer (Steam)', '', false );
gf_games[44].add_mod( 251, 'Natural Selection', 'v3.2', false );
gf_games[44].add_mod( 397, 'Digital Paintball (Steam)', '', false );
gf_games[44].add_mod( 399, 'Condition Zero (Steam)', '', false );
gf_games[44].add_mod( 441, 'Front Line Force (Steam)', '', false );
gf_games[44].add_mod( 1557, 'Default', '', true );
gf_games[44].add_mod( 2150, 'Deathmatch Classic (Steam)', '', false );
gf_games[44].add_mod( 2151, 'Ricochet (Steam)', '', false );
gf_games[44].add_mod( 2152, 'StargateTC (Steam)', '', false );
gf_games[44].add_mod( 2153, 'Opposing Force (Steam)', '', false );
gf_games[44].add_mod( 3845, 'Brain Bread (Steam)', '', false );
gf_games[44].add_mod( 4652, 'Hostile Intent', 'v1.5', false );
gf_games[44].add_mod( 5229, 'Sven Coop (Steam)', '', false );
gf_games[51] = new gf_game( 51, 'Medal of Honor: Breakthrough' );
gf_games[51].add_mod( 391, '1936', '', false );
gf_games[51].add_mod( 942, 'Breakthrough', '', true );
gf_games[52] = new gf_game( 52, 'Jedi Academy' );
gf_games[52].add_mod( 202, 'FlibbleMod', '', false );
gf_games[52].add_mod( 203, 'Omni Mod', '', false );
gf_games[52].add_mod( 217, 'ReloadMod', '', false );
gf_games[52].add_mod( 228, 'JA Plus', '2.4', false );
gf_games[52].add_mod( 449, 'Lugormod', '0.9.82', false );
gf_games[52].add_mod( 837, 'JA Plus', '1.3', false );
gf_games[52].add_mod( 886, 'Dymerac', '', false );
gf_games[52].add_mod( 938, 'Jedi Academy', '', true );
gf_games[52].add_mod( 950, 'Lugormod', '0.9.70', false );
gf_games[52].add_mod( 963, 'Lugormod', '0.9.84', false );
gf_games[52].add_mod( 1075, 'Lugormod', '0.9.91', false );
gf_games[52].add_mod( 2446, 'Lugormod', '1.1', false );
gf_games[52].add_mod( 3223, 'Jedi Academy Empire', 'v4', false );
gf_games[52].add_mod( 3236, 'JA Plus', '1.9', false );
gf_games[52].add_mod( 3427, 'JA Plus', '2.3', false );
gf_games[52].add_mod( 3449, 'Lugormod', 't2', false );
gf_games[52].add_mod( 3559, 'Lugormod', '1.2.2', false );
gf_games[52].add_mod( 4554, 'Movie Battles', 'rc1 / Beta 19', false );
gf_games[52].add_mod( 5197, 'Lugormod', '1.2.2b', false );
gf_games[52].add_mod( 6140, 'LugormodU', '', false );
gf_games[54] = new gf_game( 54, 'Halo' );
gf_games[54].add_mod( 1565, 'Halo', '', true );
gf_games[57] = new gf_game( 57, 'Savage' );
gf_games[57].add_mod( 1568, 'Savage', 'v2.0', true );
gf_games[58] = new gf_game( 58, 'Kingpin' );
gf_games[58].add_mod( 940, 'Kingpin', '', true );
gf_games[58].add_mod( 5804, 'Monkey Mod', '', false );
gf_games[59] = new gf_game( 59, 'Call of Duty' );
gf_games[59].add_mod( 245, 'Heat of Battle', 'v3', false );
gf_games[59].add_mod( 393, 'Merciless', '', false );
gf_games[59].add_mod( 443, 'Revolt', 'v0.15', false );
gf_games[59].add_mod( 932, 'Call of Duty', '', true );
gf_games[59].add_mod( 1820, 'Heat of Battle', 'v1', false );
gf_games[59].add_mod( 2347, 'Heat of Battle', 'v4', false );
gf_games[59].add_mod( 2535, 'Breaking50', 'v1.3', false );
gf_games[59].add_mod( 5743, 'AWE', '2.2', false );
gf_games[60] = new gf_game( 60, 'Grand Theft Auto : Vice City' );
gf_games[60].add_mod( 1569, 'Default', '', true );
gf_games[67] = new gf_game( 67, 'UnrealTournament 2004' );
gf_games[67].add_mod( 1220, 'Deathball', '', false );
gf_games[67].add_mod( 1221, 'RedOrchestra', '', false );
gf_games[67].add_mod( 1222, 'Jail Break', '', false );
gf_games[67].add_mod( 1223, 'Alien Swarm', '', false );
gf_games[67].add_mod( 1224, 'FragOps', '2.16', false );
gf_games[67].add_mod( 1225, 'SAS', '', false );
gf_games[67].add_mod( 1226, 'Majestic12', '', false );
gf_games[67].add_mod( 1227, 'Neotokyo', '', false );
gf_games[67].add_mod( 1228, 'Car Ball', '', false );
gf_games[67].add_mod( 1229, 'UTXMP', '', false );
gf_games[67].add_mod( 1575, 'UnrealTournament 2004', '', true );
gf_games[67].add_mod( 2149, 'UnWheel', '', false );
gf_games[67].add_mod( 2302, '4 Way CTF & TDM', 'v1001', false );
gf_games[67].add_mod( 2424, 'Fraghouse Invasion', 'v3', false );
gf_games[67].add_mod( 3471, 'Fraghouse Invasion', 'v4.1', false );
gf_games[67].add_mod( 4766, 'Tactical Ops Crossfire', '1.6b', false );
gf_games[69] = new gf_game( 69, 'Battlefield Vietnam' );
gf_games[69].add_mod( 821, 'Gee\'s War', '', false );
gf_games[69].add_mod( 827, 'World War 2', '', false );
gf_games[69].add_mod( 843, 'Point of Existence', 'v0.4.4', false );
gf_games[69].add_mod( 929, 'BattleField Vietnam', '', true );
gf_games[69].add_mod( 982, 'Nightfighters 4 PoE', '', false );
gf_games[69].add_mod( 999, 'Eve of Destruction', '', false );
gf_games[69].add_mod( 1060, 'Dice City', 'v0.98', false );
gf_games[69].add_mod( 1061, 'Tour of Duty', '', false );
gf_games[69].add_mod( 2109, 'Jungle Fever', '', false );
gf_games[70] = new gf_game( 70, 'Farcry' );
gf_games[70].add_mod( 1577, 'Default', '', true );
gf_games[70].add_mod( 4279, 'Obsidian Edge', 'v1.1.038', false );
gf_games[76] = new gf_game( 76, 'Half-Life 2' );
gf_games[76].add_mod( 813, 'Counter Strike: Source', '', false );
gf_games[76].add_mod( 1084, 'Half-Life 2: Multiplayer', '', false );
gf_games[76].add_mod( 1580, 'Half-Life 2', '', true );
gf_games[76].add_mod( 3109, 'Dystopia (Demo)', '', false );
gf_games[76].add_mod( 3164, 'Day of Defeat: Source', 'Original', false );
gf_games[76].add_mod( 3229, 'Hidden-Source', 'Beta 4', false );
gf_games[76].add_mod( 3419, 'Half-Life 2: Assault', 'Beta 6b Windows Only', false );
gf_games[76].add_mod( 3672, 'Plan of Attack', 'Beta 4', false );
gf_games[76].add_mod( 4213, 'Battlegrounds 2', 'v0.16b', false );
gf_games[76].add_mod( 4286, 'GarrysMod', 'v9', false );
gf_games[76].add_mod( 4380, 'Empires', 'v1.06', false );
gf_games[76].add_mod( 5029, 'Goldeneye Source', 'Beta 1', false );
gf_games[76].add_mod( 5688, 'Zombie Master', 'Beta 110', false );
gf_games[76].add_mod( 5756, 'Insurgency', 'BETA 2.0e', false );
gf_games[76].add_mod( 5759, 'DragonBall Source', 'v0.1.24', false );
gf_games[76].add_mod( 5939, 'Fortress Forever', 'v2.0', false );
gf_games[76].add_mod( 5957, 'Team Fortress 2', '', false );
gf_games[76].add_mod( 6031, 'CS Pro Mod', '', false );
gf_games[76].add_mod( 6444, 'GarrysMod', 'v10', false );
gf_games[76].add_mod( 6551, 'Half-Life 2: Deathmatch Pro', '1.8.1', false );
gf_games[76].add_mod( 6582, 'Half-Life 2 TV', '', false );
gf_games[76].add_mod( 6600, 'Day of Defeat: Source', 'OrangeBox', false );
gf_games[76].add_mod( 6674, 'Science and Industry 2', '1.0', false );
gf_games[79] = new gf_game( 79, 'Call of Duty: United Offensive' );
gf_games[79].add_mod( 933, 'United Offensive', '', true );
gf_games[79].add_mod( 1363, 'Advanced War Effects', '', false );
gf_games[79].add_mod( 2311, 'Merciless UO', '3.04', false );
gf_games[79].add_mod( 2479, 'German Front', 'v2.0 beta', false );
gf_games[79].add_mod( 2968, 'Extreme', '', false );
gf_games[79].add_mod( 3162, 'Revolt', 'v1.0', false );
gf_games[96] = new gf_game( 96, 'Enemy Territory' );
gf_games[96].add_mod( 2569, 'Enemy Territory', '', true );
gf_games[96].add_mod( 2570, 'ET Pro', 'v3.2.6', false );
gf_games[96].add_mod( 2571, 'ET Pro Beta', '0', false );
gf_games[96].add_mod( 2572, 'Realism', '1.1', false );
gf_games[96].add_mod( 2573, 'Shrub Mod', '', false );
gf_games[96].add_mod( 2697, 'True Combat Elite', 'v049', false );
gf_games[96].add_mod( 2840, 'ETPub', 'v0.7.2', false );
gf_games[96].add_mod( 3152, 'Omnipub', '', false );
gf_games[96].add_mod( 3574, 'Jaymod', 'v2.1.7', false );
gf_games[96].add_mod( 4696, 'No Quarter', 'v1.1.1', false );
gf_games[97] = new gf_game( 97, 'Battlefield 2' );
gf_games[97].add_mod( 2768, 'BattleField 2', '', true );
gf_games[97].add_mod( 3204, 'Hover Jeeps', '', false );
gf_games[97].add_mod( 3251, 'BF2 Pro', 'v1.5', false );
gf_games[97].add_mod( 3366, 'Project Reality Mini-Mod', 'v0.756', false );
gf_games[97].add_mod( 3378, 'Stunts', 'v1.60', false );
gf_games[97].add_mod( 3386, 'BF2 Nights', 'v0.95', false );
gf_games[97].add_mod( 3421, 'BF1918 Airshow', 'v2', false );
gf_games[97].add_mod( 3425, 'Special Forces', '', false );
gf_games[97].add_mod( 3549, 'Allied Intent X', 'v1.0', false );
gf_games[97].add_mod( 3567, 'Codename Eagle: Legends', 'v0.3', false );
gf_games[97].add_mod( 3568, 'Tactical War', 'v0.1', false );
gf_games[97].add_mod( 3575, 'Air Maps', 'v6', false );
gf_games[97].add_mod( 3607, 'Operation Bravo', 'BETA', false );
gf_games[97].add_mod( 3644, 'Operation Bravo', 'v0.2', false );
gf_games[97].add_mod( 3647, 'Air Combat', 'v1.0', false );
gf_games[97].add_mod( 3649, 'Mercenaries', 'v8.0', false );
gf_games[97].add_mod( 3669, 'Battle Racer', 'v1.29', false );
gf_games[97].add_mod( 3708, 'Desert Conflict', 'v0.16b', false );
gf_games[97].add_mod( 3840, 'Infantry', 'v1.2', false );
gf_games[97].add_mod( 3923, 'Total Retardation 2', 'v0.05b', false );
gf_games[97].add_mod( 4005, 'Nations at War', 'v5.01', false );
gf_games[97].add_mod( 4086, 'Operation Peacekeeper', 'v0.18', false );
gf_games[97].add_mod( 4120, 'US Intervention', 'v0.11a', false );
gf_games[97].add_mod( 4156, 'Rise of Kobol', 'Beta 0.05', false );
gf_games[97].add_mod( 4191, 'BF2Max', '', false );
gf_games[97].add_mod( 4371, 'Medic vs Sniper', '', false );
gf_games[97].add_mod( 4373, 'Sir Mod', 'v0.8', false );
gf_games[97].add_mod( 4498, 'Point of Existence', 'v2.1', false );
gf_games[97].add_mod( 4606, 'Hard Justice', 'v1.2', false );
gf_games[97].add_mod( 4975, 'Badgers2', '', false );
gf_games[97].add_mod( 5173, 'Sandbox', '0.5d', false );
gf_games[97].add_mod( 5328, 'BattleShip', '0.31', false );
gf_games[97].add_mod( 5376, 'Eve of Destruction', 'v1.1', false );
gf_games[97].add_mod( 5674, 'BF2 Assault', 'BETA', false );
gf_games[97].add_mod( 5679, 'BF2 DeathMatch', 'v0.1', false );
gf_games[97].add_mod( 5681, 'Close Quarters Battle', 'v1.7', false );
gf_games[97].add_mod( 5709, 'Tactical Mod', '', false );
gf_games[97].add_mod( 5712, 'Project Reality Mini-Mod Open BETA', 'v0.607rc1', false );
gf_games[97].add_mod( 5716, 'Camobox', '1.51', false );
gf_games[97].add_mod( 5721, 'Stargate', '', false );
gf_games[97].add_mod( 5744, 'Black Ops Mercenaries', '1.41', false );
gf_games[97].add_mod( 5803, 'Vm Mod', '2.1', false );
gf_games[97].add_mod( 5962, 'Battlefield Pirates 2', '1.2', false );
gf_games[97].add_mod( 6030, 'Project Reality Filming Mod', 'v0.7', false );
gf_games[97].add_mod( 6039, 'BattleField 40k', 'Alpha', false );
gf_games[97].add_mod( 6132, 'Battlegroup Frontlines', 'v1.0', false );
gf_games[97].add_mod( 6153, 'Forgotton Hope', 'v2.1', false );
gf_games[97].add_mod( 6438, 'Wookie Sniper Mod', 'v101', false );
gf_games[105] = new gf_game( 105, 'F.E.A.R' );
gf_games[105].add_mod( 3230, 'Default', '', true );
gf_games[106] = new gf_game( 106, 'Call of Duty 2' );
gf_games[106].add_mod( 3237, 'Call of Duty 2', '', true );
gf_games[106].add_mod( 3434, 'AWE', 'v3b2', false );
gf_games[106].add_mod( 3460, 'AWE', 'v3b3', false );
gf_games[106].add_mod( 3534, 'AWE', 'v3b4', false );
gf_games[106].add_mod( 3620, 'AWE', 'v3b5', false );
gf_games[106].add_mod( 4049, 'AWE', 'v3b6', false );
gf_games[106].add_mod( 4265, 'AWE', 'v3b10b', false );
gf_games[106].add_mod( 4331, 'CoD Jumper', 'v1.8', false );
gf_games[106].add_mod( 4451, 'BJustReal', 'v2.2 - 2.1.2 client', false );
gf_games[106].add_mod( 4517, 'Merciless', 'v2.0', false );
gf_games[106].add_mod( 4626, 'WRM Admin', '', false );
gf_games[106].add_mod( 5640, 'AWE Community ED', '3.1', false );
gf_games[106].add_mod( 5695, 'AWE', 'v3.2.2', false );
gf_games[106].add_mod( 6059, 'Extreme', '2.2', false );
gf_games[106].add_mod( 6073, 'Extreme', 'MH3438', false );
gf_games[106].add_mod( 6646, 'AWE', 'v3.4', false );
gf_games[107] = new gf_game( 107, 'Quake 4' );
gf_games[107].add_mod( 3238, 'Quake 4', '', true );
gf_games[107].add_mod( 3357, 'Q4 Max', 'v0.82', false );
gf_games[107].add_mod( 3380, 'Battle', 'v0.23', false );
gf_games[107].add_mod( 3394, 'iQuake', 'v1.0 - Windows Only', false );
gf_games[107].add_mod( 3847, 'Rocket Arena 4', 'v0.5 BETA 3', false );
gf_games[107].add_mod( 3929, 'Quake 4 World', 'v3.0a', false );
gf_games[107].add_mod( 4012, 'GameType-Revolution', 'v0.17b', false );
gf_games[107].add_mod( 5362, 'Quake 4 TV', '', false );
gf_games[107].add_mod( 6104, 'Instagib', '1.3.2 BROKEN', false );
gf_games[107].add_mod( 6158, 'Phillips AMBX', 'v1', false );
gf_games[113] = new gf_game( 113, 'Red Orchestra' );
gf_games[113].add_mod( 3920, 'RedOrchestra', '', true );
gf_games[115] = new gf_game( 115, 'Dark Messiah' );
gf_games[115].add_mod( 4083, 'Might & Magic', '', true );
gf_games[116] = new gf_game( 116, 'Warsow' );
gf_games[116].add_mod( 4189, 'Warsow', '', true );
gf_games[120] = new gf_game( 120, 'Battlefield 2142' );
gf_games[120].add_mod( 4456, 'BattleField 2142', 'Retail', true );
gf_games[120].add_mod( 4771, 'ClanMod', 'v3.02', false );
gf_games[120].add_mod( 5764, 'Project Fubar Rally', '0.4', false );
gf_games[120].add_mod( 5825, 'Conflict 2142', '2.0', false );
gf_games[120].add_mod( 5863, 'Traction Wars', 'Alpha', false );
gf_games[120].add_mod( 5974, 'First Strike', 'v2.5', false );
gf_games[120].add_mod( 6080, 'Project Fubar', '1.00', false );
gf_games[120].add_mod( 6596, 'Copy of Conflict 2142', '2.6', false );
gf_games[120].add_mod( 6615, 'BattleField 2142', 'Demo', false );
gf_games[124] = new gf_game( 124, 'BattleField 2 Modern Combat' );
gf_games[124].add_mod( 4917, 'BattleField 2 Modern Combat', '', true );
gf_games[131] = new gf_game( 131, 'Enemy Territory : QuakeWars' );
gf_games[131].add_mod( 5666, 'Enemy Territory : QuakeWars', 'v1.4', true );
gf_games[131].add_mod( 5915, 'Enemy Territory : QuakeWars', 'Demo', false );
gf_games[131].add_mod( 6405, 'ETQWPro', 'v0.55b', false );
gf_games[131].add_mod( 6532, 'Wheels of War', '', false );
gf_games[132] = new gf_game( 132, 'Crysis' );
gf_games[132].add_mod( 5684, 'Crysis', '', true );
gf_games[136] = new gf_game( 136, 'Haze' );
gf_games[136].add_mod( 5765, 'Haze', '', true );
gf_games[137] = new gf_game( 137, 'World in Conflict' );
gf_games[137].add_mod( 5923, 'World in Conflict', 'Demo', false );
gf_games[137].add_mod( 5963, 'World in Conflict', 'Retail', true );
gf_games[142] = new gf_game( 142, 'UnrealTournament 3' );
gf_games[142].add_mod( 6021, 'UnrealTournament 3', '', true );
gf_games[143] = new gf_game( 143, 'Call of Duty 4' );
gf_games[143].add_mod( 6028, 'Call of Duty 4', '', true );
gf_games[143].add_mod( 6077, 'ModWarfare', 'Retail', false );
gf_games[143].add_mod( 6096, 'ModWarfare', 'Cure BETA', false );
gf_games[143].add_mod( 6114, 'ModWarfare', 'Remove SD Limits', false );
gf_games[143].add_mod( 6115, 'ModWarfare', 'DAMN - 0.31', false );
gf_games[143].add_mod( 6116, 'ModWarfare', 'Autochange', false );
gf_games[143].add_mod( 6117, 'ModWarfare', 'DAMN - No Cook', false );
gf_games[143].add_mod( 6131, 'ModWarfare', 'DAMN Multiplay TEST', false );
gf_games[143].add_mod( 6152, 'PAM D ', 'alpha 0.2', false );
gf_games[143].add_mod( 6156, 'Tactical Night', '1.3', false );
gf_games[143].add_mod( 6172, 'PAM4', '4.01', false );
gf_games[143].add_mod( 6211, 'AWE Mod', '1.3', false );
gf_games[143].add_mod( 6212, 'Extreme+', '1.0', false );
gf_games[143].add_mod( 6454, 'ACE Mod', '1.9', false );
gf_games[143].add_mod( 6509, 'LANPAM', 'i33', false );
gf_games[143].add_mod( 6513, 'Freezetag', '1.2', false );
gf_games[143].add_mod( 6531, 'Sniper Mod', '2', false );
gf_games[143].add_mod( 6549, 'Cod 4 Jumper', '2.0', false );
gf_games[143].add_mod( 6555, 'Zombie Mod', '1.1', false );
gf_games[143].add_mod( 6565, 'Frontlines', '2.1', false );
gf_games[143].add_mod( 6570, 'Zombiemod', '1.1', false );
gf_games[143].add_mod( 6601, 'Copy of AWE Mod', '1.3', false );
gf_games[143].add_mod( 6643, 'Extreme+', '2.0', false );
gf_games[143].add_mod( 6663, 'GunGame', '1.1', false );
gf_games[143].add_mod( 6664, 'Promod', '1.6 Beta', false );
gf_games[143].add_mod( 6671, 'Promod Beta', '1.05 Beta', false );
// Load QueryString
load_querystring();
// Populate select box
var temp = Array();
var pop_games = Array();
for ( var optionid in games )
{
temp.push ( " - " + games[optionid].name + " #:#" + optionid );
if ( 0 < games[optionid].aliases.length )
{
for ( i in games[optionid].aliases )
{
temp.push ( " - " + games[optionid].aliases[i] + " #:#" + optionid );
}
}
if ( games[optionid].promote )
{
var game_promote = 999 - games[optionid].promote;
pop_games.push( game_promote + "#:# - " + games[optionid].name + " #:#" + optionid );
}
}
// Sort the two arrays.
temp.sort();
pop_games.sort();
// Populate the list.
game_select = document.getElementById( "games" ).options;
j = 0;
// If we have popular games, add them on.
if ( 0 < pop_games.length )
{
// Add the header.
temp_option = new Option( "Popular Games", -1, 0, 0 );
game_select[j++] = temp_option;
// Add the games.
for ( i in pop_games )
{
data = String( pop_games[ i ] );
data = data.split( "#:#" );
temp_option = new Option( data[ 1 ], data[ 2 ], 0, 0 );
game_select[j++] = temp_option;
}
// Add a spacer.
temp_option = new Option( "", -1, 0, 0 );
game_select[j++] = temp_option;
// Add the next header.
temp_option = new Option( "All Games", -1, 0, 0 );
game_select[j++] = temp_option;
}
// Add the full games list.
for ( i in temp )
{
data = String( temp[ i ] );
data = data.split( "#:#" );
temp_option = new Option( data[ 0 ], data[ 1 ], 0, 0 );
game_select[j++] = temp_option;
}
// Select a parsed optionid if exists.
if ( qs_params['game'] )
{
var optionid = qs_params['game'];
for( var i = 0; i < game_select.length; i++ )
{
if ( game_select[i].value == optionid )
{
game_select[i].selected = true;
add_game();
break;
}
}
}
// Populate extra slots
es_select = document.getElementById( "extraslots" ).options;
for ( j = 0; j <= service.vc_extraslots_max; j++ )
{
temp_option = new Option( j, j, 0, 0 );
es_select[j] = temp_option;
}
populate_location();
update_game_info();
}
function add_game()
{
// Get optionid
sel_games = document.getElementById( "games" );
optionid = sel_games[ sel_games.selectedIndex ].value;
// Make sure a game is selected
if ( -1 == optionid )
{
alert( "Please select a game!" );
return false;
}
// Add game to service
service.add_game( optionid, games[ sel_games[ sel_games.selectedIndex ].value ].base_players );
// Change add button to remove
button = document.getElementById( "but_game_add" );
button.onclick = function () { remove_game( optionid, this ); };
button.firstChild.data = "Remove Game";
// Add the game option area
add_game_option( sel_games[ sel_games.selectedIndex ].value );
// Update the private box is not allowed
if ( games[ sel_games[ sel_games.selectedIndex ].value ].public_cost == 0 )
{
chkPrivate = document.getElementById( "private" );
chkPrivate.checked = false;
chkPrivate.disabled = true;
service.b_public = true;
lblPrivate = document.getElementById( "lbl_private" );
lblPrivate.firstChild.nodeValue = "Private - Unavailable due to game selection.";
}
// Update the price
update_price();
// Update the default mod list
populate_default_mod();
}
function add_game_option( key )
{
// Get game and player range
game = games[key];
min_max_players = game.min_max_players();
min_players = min_max_players[0];
max_players = min_max_players[1];
// Clone a template node
tempNode = document.getElementById( "template" ).cloneNode( 1 );
// Update new node with game info
tempNode.id = "game-" + key;
tempNodeTds = tempNode.getElementsByTagName( "td" )
tempNodeTds[0].appendChild( document.createTextNode( game.name ) );
// Add the player select box
player_select = tempNodeTds[1].childNodes[0];
player_select.id = "players-" + key;
player_select.name = "players-" + key;
var selected = 0;
for ( var i = min_players; i <= max_players; i++ )
{
if ( service.base_game != 0 && selected == 0 )
{
var game_cost = game.cost( i + 1 );
if ( service.b_public )
{
game_cost += game.public_cost;
}
var base_game_ids = service.base_game.split( '-' );
var base_game = service.get_game( base_game_ids[0], base_game_ids[1] );
if ( game_cost > base_game.cost || i == max_players )
{
selected = i - min_players;
}
}
temp = new Option( i, i, 0, 0 );
player_select[i - min_players] = temp;
}
player_select[selected].selected = true;
// Set onclick value on remove button
tempNodeTds[2].getElementsByTagName( "button" )[0].onclick = function() { remove_game( key ); };
// Add game addons
addonids = Array();
if ( game.addons.length > 0 )
{
tdNode = tempNode.getElementsByTagName( "td" )[0];
divNode = document.createElement( "div" );
divNode.setAttribute( "style", "font-style: italic; padding-left: 25px;" );
divNode.appendChild( document.createTextNode( "Addons: " ) );
tdNode.appendChild( divNode );
for ( i in game.addons )
{
addon = game.addons[ i ];
divNode = document.createElement( "div" );
divNode.setAttribute( "style", "padding-left: 50px;" );
inputNode = document.createElement( "input" );
inputNode.setAttribute( "type", "checkbox" );
inputNode.setAttribute( "name", "addons-" + addon.optionid + "[]" );
inputNode.setAttribute( "id", "addons-" + addon.addonid );
inputNode.setAttribute( "value", addon.addonid );
divNode.appendChild( inputNode )
divNode.appendChild( document.createTextNode( addon.name ) );
tdNode.appendChild( divNode );
addonids[ i ] = addon.addonid;
}
}
// Place node in DOM
insNode = document.getElementById( "game_options" );
insNode.insertBefore( tempNode, null );
// Add Customer Info
if ( "" != game.customer_info )
{
custInfoTr = document.createElement( "tr" );
custInfoTr.id = "game-custinfo-" + key;
custInfoTd = document.createElement( "td" );
custInfoTd.setAttribute( "colSpan", "3" );
custInfoTd.style.fontSize = "8pt";
custInfoTd.style.paddingBottom = "20px";
custInfoTd.innerHTML = game.customer_info;
custInfoTr.appendChild( custInfoTd );
insNode.insertBefore( custInfoTr, null );
}
for ( i in addonids )
{
document.getElementById( 'addons-' + i ).onclick = function() { toggleaddon( this ) };
}
}
function remove_game()
{
// Get game to remove
sel_games = document.getElementById( "games" );
if ( 1 == arguments.length )
{
optionid = arguments[0];
} else {
optionid = sel_games[ sel_games.selectedIndex ].value;
}
// Remove game from service
service.remove_game( optionid );
// Update buy/remove button
if ( optionid == sel_games[ sel_games.selectedIndex ].value )
{
button = document.getElementById( "but_game_add" );
button.onclick = function () { add_game( optionid, this ); };
button.firstChild.data = "Add Game";
}
// Remove game option area
remNode = document.getElementById( "game-" + optionid );
remNode.parentNode.removeChild( remNode );
// Remove customer info
if( null != document.getElementById( "game-custinfo-" + optionid ) )
{
remNode = document.getElementById( "game-custinfo-" + optionid );
remNode.parentNode.removeChild( remNode );
}
// Re-enable private option if no publiccost = 0 games
b_enable = true;
for( game in service.games )
{
var optionid = service.games[game].optionid;
if( games[ optionid ].public_cost == 0 )
{
b_enable = false;
break;
}
}
if ( b_enable )
{
chkPrivate = document.getElementById( "private" );
chkPrivate.disabled = false;
lblPrivate = document.getElementById( "lbl_private" );
lblPrivate.firstChild.nodeValue = "Private";
}
// Update price
update_price();
// Update the default mod list
populate_default_mod();
}
function check_for_game()
{
sel_games = document.getElementById( "games" );
optionid = sel_games[ sel_games.selectedIndex ].value;
button = document.getElementById( "but_game_add" );
if ( service.check_for_game( optionid ) )
{
button.onclick = function () { remove_game( optionid, this ); };
button.firstChild.data = "Remove Game";
} else {
button.onclick = function () { add_game( optionid, this ); };
button.firstChild.data = "Add Game";
}
}
function toggleaddon( input )
{
addonid = input.value;
temp = input.name.split( '-' );
temp = temp[1].split( '[' );
optionid = temp[0];
checked = ! input.checked;
service.toggle_game_addon( optionid, addonid, checked );
addon = games[optionid].addons[addonid];
for( top_i in games[optionid].addons )
{
cmp_addon = games[optionid].addons[top_i];
svc_game = service.get_game( optionid );
chkbox = document.getElementById( "addons-" + top_i );
if ( addon.group == cmp_addon.group && cmp_addon.cost < addon.cost && ! chkbox.checked )
{
service.toggle_game_addon( optionid, top_i, checked );
chkbox.checked = true;
}
else if( addon.group == cmp_addon.group && cmp_addon.cost > addon.cost && chkbox.checked )
{
service.toggle_game_addon( optionid, top_i, checked );
chkbox.checked = false;
}
}
update_price();
}
function update_game_info()
{
/*sel_games = document.getElementById( "games" );
txt_desc = document.getElementById( "game_desc" );
game = games[ sel_games[ sel_games.selectedIndex ].value ];
if ( "" != game.description )
{
txt_desc.innerHTML = "
" + game.description;
} else {
txt_desc.innerHTML = "";
}*/
}
function update_breakdown()
{
selected = document.getElementById( "breakdown" );
base_players = service.base_players();
temp = new Array();
for ( i in service.games )
{
game = service.games[i];
key = game.optionid;
min_max_players = games[ key ].min_max_players();
players = game.players;
game_cost = format_currency( Math.round( service.extra_game_cost ) / 100 );
key_game = 0;
sDiscount = '';
if ( service.base_game == game.optionid )
{
game_cost = game.cost;
if ( ! service.b_public )
{
game_cost += service.public_cost;
}
game_cost = format_currency( Math.round( game_cost ) / 100 );
key_game = 1;
// discount notification only applicable for key game!
optionid = games[key].optionid;
payment_term = service.payment_term;
if ( service.optionDiscounts[optionid] != undefined )
{
if ( service.optionDiscounts[optionid][payment_term] != undefined )
{
sDiscount = " - " + Math.round( service.optionDiscounts[optionid][payment_term] * 100 ) + "% Off";
}
}
}
sGameDesc = selected.innerHTML = games[ key ].name + " (" + players + " Players): £" + game_cost + sDiscount;
if ( key_game )
{
sGameDesc = "" + sGameDesc + "";
}
temp.push( sGameDesc + "
" );
}
temp.sort();
// *** OUTPUT DETAILS ***
selected.innerHTML = "";
for ( i in temp )
{
selected.innerHTML += temp[i];
}
if ( ! service.b_public )
{
selected.innerHTML += "Private: £" + format_currency( Math.round( -1 * service.public_cost ) / 100 ) + "
";
}
if ( service.debranded_cost > 0 )
{
selected.innerHTML += "Debranded: £" + format_currency( Math.round( service.debranded_cost ) / 100 ) + "
";
}
if ( service.vcserver )
{
selected.innerHTML += "Voice Comm Server ( " + service.vcservertype + " ): £" + format_currency( Math.round( service.vcserver_cost ) / 100 ) + "
";
}
if ( 0 < service.vcextraslots )
{
selected.innerHTML += "Voice Comm Extra Slots ( " + service.vcextraslots + " ): £" + format_currency( Math.round( service.extraslots_cost ) / 100 ) + "
";
}
}
function update_price()
{
if ( service.games.length > 0 )
{
service_cost = service.cost();
eur_cost = format_currency( Math.round( currency_conversion_indexes["GBP-EUR"].convertForwards( service_cost ) ) / 100 );
usd_cost = format_currency( Math.round( currency_conversion_indexes["GBP-USD"].convertForwards( service_cost ) ) / 100 );
run_total = document.getElementById( "running_total" );
run_total.innerHTML = "Total: £" + format_currency( Math.round( service_cost ) / 100 )
+ " (Approximately €" + eur_cost + " EUR / $" + usd_cost + " USD)*";
if ( service.discount_cost > 0 )
{
document.getElementById( "em_savings" ).innerHTML = "£" + format_currency( Math.round( service.discount_cost ) / 100 );
}
if ( service.payment_term > 1 )
{
document.getElementById( "em_monthly" ).innerHTML = "£" + format_currency( Math.round( service_cost / service.payment_term ) / 100 );
}
if ( service.discount_cost > 0 || service.payment_term > 1 )
{
document.getElementById( "extra_money_info" ).style.display = "block";
}
else
{
document.getElementById( "extra_money_info" ).style.display = "none";
}
update_breakdown();
} else {
document.getElementById( "breakdown" ).innerHTML = "";
document.getElementById( "running_total" ).innerHTML = "£0.00";
document.getElementById( "extra_money_info" ).innerHTML = "";
}
}
function update_players()
{
players = document.getElementById( "extraslots" );
extra_players = players[ players.selectedIndex ].value;
service.extra_players = extra_players;
}
function update_player_select()
{
max_players = 0;
max_min_players = 0;
for ( i in service.games )
{
key = service.games[ i ].optionid;
min_max_players = games[ key ].min_max_players();
if ( min_max_players[ 1 ] > max_players )
{
max_players = min_max_players[ 1 ];
}
if ( min_max_players[ 0 ] > max_min_players )
{
max_min_players = min_max_players[ 0 ];
}
}
range = max_players - max_min_players;
select = document.getElementById( "extraslots" );
if ( range < select.length )
{
for ( j = select.length; j > range; j-- )
{
select[j] = null;
}
select[range].selected = 1;
} else if ( range > select.length ) {
for ( j = select.length; j <= range; j++ )
{
temp = new Option( j, j, 0, 0 );
select[j] = temp;
}
}
}
function update_vc()
{
voicecomms = document.getElementById( "voicecomms" );
vcvalue = voicecomms[voicecomms.selectedIndex].value;
service.vcserver = ( "vcserver" == vcvalue.slice( 0, 8 ) ) ? 1 : 0;
if ( service.vcserver )
{
temp = vcvalue.split( "-" );
service.vcservertype = temp[1];
}
es = document.getElementById( "extraslots" );
if ( es[es.selectedIndex].value > 0 && vcvalue == '0' )
{
alert( 'Extra Slots can not be taken without \nchoosing a voice comm server type.' );
es[0].selected = true;
}
else
{
service.vcextraslots = es[es.selectedIndex].value;
}
}
function form_submit()
{
if ( service.games.length > 0 )
{
var chosen_games = Array();
for ( i in service.games )
{
var key = service.games[ i ].optionid;
chosen_games[ i ] = games[ key ].optionid;
}
oForm = document.getElementById( "actionForm" );
oHidden = document.createElement( "input" );
oHidden.type = "hidden";
oHidden.name = "gameids";
oHidden.value = chosen_games.join( "," );
oForm.appendChild( oHidden );
oForm.submit();
} else {
alert( "You must select at least one game." );
}
}
function contactid_onchange()
{
select = document.getElementById( "contactid" );
if ( select[ select.selectedIndex ].value == 0 )
{
document.getElementById( "newcontact" ).style.display = "";
} else {
document.getElementById( "newcontact" ).style.display = "none";
}
}
function format_currency( fAmount )
{
return fAmount.toFixed(2);
}
function load_querystring()
{
var query = window.location.search.substring(1);
var parms = query.split('&');
for ( var i = 0; i < parms.length; i++ )
{
var pos = parms[i].indexOf( '=' );
if ( pos > 0 )
{
var key = parms[i].substring( 0, pos );
var val = parms[i].substring( pos + 1 );
qs_params[key] = val;
}
}
// Fix for pretty urls passing gameid
if ( window.location.href.match( /buyclanserver\/(\d+)/ ) )
{
qs_params["game"] = RegExp.$1;
}
}
function populate_location()
{
// Do nothing as IE sucks and can't generate radio buttons on the fly, I've hardcoded them in now.
}
function populate_default_mod()
{
var mods_added = new Array();
var mod_list = new Array();
var primary_mod = 0;
// for each service option
for ( var i in service.games )
{
mod_games = new Array();
var service_option = service.games[i];
var option = games[service_option.optionid];
if ( 0 < option.default_modid )
{
primary_mod = option.default_modid;
}
else if ( 0 == option.modid )
{
var gf_game = gf_games[option.gameid];
if ( undefined != gf_game )
{
primary_mod = gf_game.default_mod;
}
}
else
{
primary_mod = option.modid;
}
// for each option mod
for ( var j in option.modids )
{
var modid = option.modids[j];
if ( undefined == mods_added[modid] && 0 < modid.length )
{
// Locate the gf_game_mod object
for ( var k in option.gameids )
{
var gameid = option.gameids[k];
var gf_game = gf_games[gameid];
if ( undefined != gf_game )
{
var gf_game_mod = gf_game.get_mod( modid );
if ( undefined != gf_game_mod )
{
break;
}
}
}
// Add this mod to the list.
if ( undefined != gf_game_mod )
{
var name = gf_game.name;
if ( gf_game.default_mod != gf_game_mod.modid )
{
name += " - " + gf_game_mod.get_name();
}
mod_list.push( name + " #:#" + modid );
mods_added[modid] = 1;
mod_games[gf_game.gameid] = 1;
}
}
}
// Loop through any games that aren't tied to a specified mod and add the default mod.
for ( var j in option.gameids )
{
var gameid = option.gameids[j];
var gf_game = gf_games[gameid];
if ( undefined != gf_game )
{
// Add the default mod if not already there
if ( undefined == mod_list[gf_game.default_mod] )
{
gf_game_mod = gf_game.mods[gf_game.default_mod];
mod_list.push( gf_game.name + " #:#" + gf_game_mod.modid );
}
}
}
}
// Update the select box.
var count = 0;
var default_mod_select = document.getElementById( "default_mod" );
var current_mod = default_mod_select.options[default_mod_select.selectedIndex].value;
if ( 0 == current_mod )
{
current_mod = primary_mod;
}
mod_list.sort();
if ( 0 == mod_list.length )
{
mod_list.push( 'Awaiting game selection...#:#0' );
}
for ( var i in mod_list )
{
var text_value = mod_list[i].split( "#:#" );
var option = new Option( text_value[0], text_value[1] );
default_mod_select.options[count++] = option;
}
while ( count < default_mod_select.options.length )
{
default_mod_select.options[count] = null;
}
// Select the previous one if still in list, have to set post adding due to IE
for ( var i = 0; i < default_mod_select.options.length; i++ )
{
if ( default_mod_select.options[i].value == current_mod )
{
default_mod_select.options[i].selected = true;
break;
}
}
}