var cat = [];
cat[0] = "Action"
cat[1] = "Puzzle"
cat[3] = "Shoot'em up"
cat[4] = "Sports"
cat[5] = "Adult-fun"
cat[6] = "Racing"
cat[7] = "Arcade"
cat[8] = "Platform"

var chn = [];
chn[0] = "Ping Pong";
chn[1] = "Monkey Kick Off";
chn[2] = "UFO Joe";
chn[3] = "Twiddlestix";
chn[4] = "Surf's Up";
chn[5] = "Space Escape";
chn[6] = "Shove It";
chn[7] = "";
chn[8] = "Presidential Paintball";
chn[9] = "Red Beard";
chn[10] = "W-one";
chn[11] = "More Bloons";
chn[12] = "Shoot-em-In";
chn[13] = "18 Wheeler";
chn[14] = "PacMan";
chn[15] = "Raiden X";
chn[16] = "Tower Blaster";
chn[17] = "Dirt Bike";
chn[18] = "Bubble Shooter";
chn[19] = "Lust For Bust";
chn[20] = "Kick Off";
chn[21] = "Zit Popping Game";
chn[22] = "A.L.I.A.S";
chn[23] = "Bubble Bobble rev.";
chn[24] = "Dirt Bike 2";
chn[25] = "Planet Racer";
chn[26] = "Dune Bashing in Dubai";
chn[27] = "Conquer Antarctica";
chn[28] = "Amazon Quest";
chn[29] = "Gem Mine";
chn[30] = "Star Ball";
chn[31] = "Penguin Push";
chn[32] = "Pac-Xon";
chn[33] = "Real Pool";
chn[34] = "";
chn[35] = "Galaxy invaders";
chn[36] = "Pang";
chn[37] = "Bloons";
chn[38] = "Sonic the Hedgehog";
chn[39] = "Adrenaline Challenge";
chn[40] = "Kitten Cannon";
chn[41] = "Fast Food Fiasco";
chn[42] = "TGFG Bowling";
chn[43] = "Bomb Jack";
chn[44] = "Drift Battle";
chn[45] = "F/A-18 Hornet";
chn[46] = "Counter-Strike";
chn[47] = "Crazy Bomberman";
chn[48] = "Flash Poker";
chn[49] = "Mario";
chn[50] = "Frogger";
chn[51] = "Deep Freeze";
chn[52] = "Snow Line";
chn[53] = "Acid factory";

var chanch=8;

var clength = 54;

var chs = [];
chs[0] = "http://www.miniclip.com/swfcontent/freegames/pingpong.swf";
chs[1] = "http://www.miniclip.com/swfcontent/freegames/monkeykickoff.swf";
chs[2] = "http://www.miniclip.com/swfcontent/freegames/ufojoe.swf";
chs[3] = "http://www.miniclip.com/swfcontent/freegames/twiddlestix.swf";
chs[4] = "http://www.miniclip.com/swfcontent/freegames/surfs-up.swf";
chs[5] = "http://www.miniclip.com/swfcontent/freegames/spaceescape.swf";
chs[6] = "http://www.miniclip.com/swfcontent/freegames/shoveitdemo.swf";
chs[7] = "http://www.miniclip.com/swfcontent/freegames/battle-pong.swf";
chs[8] = "http://www.miniclip.com/swfcontent/freegames/loader.swf?url=presidentialpaintball_v2_counter.swf&name=Presidential Paintball&icon=%2Fimages%2Ficons%2Fpresidentialpaintballmedicon.jpg";
chs[9] = "http://www.miniclip.com/swfcontent/freegames/redbeard.swf";
chs[10] = "http://www.gadgetgamez.com/games/wone.swf";
chs[11] = "http://www.gamecodecity.com/swf/game_590.swf";
chs[12] = "http://www.gadgetgamez.com/games/20539.swf";
chs[13] = "http://files.freeonlinegames.com/13858/games/18wheeler/218wheeler.swf";
chs[14] = "http://www.flashstash.com/media/swf/pac-man.swf";
chs[15] = "http://www.flashstash.com/media/swf/raidenx.swf";
chs[16] = "http://www.flashstash.com/media/swf/towerblaster.swf";
chs[17] = "http://www.freeonlinegames.com/exgames/dirtbike/2dirtbike.swf";
chs[18] = "http://www8.agame.com/mirror/flash/b/bubble_shooter.swf";
chs[19] = "http://www.gamecodecity.com/swf/game_275.swf";
chs[20] = "http://www.gamecodecity.com/swf/game_36.swf";
chs[21] = "http://www.arcadeboredom.com/games/files/acne_zit_popper_popping.swf";
chs[22] = "http://www.razoric.com/games/files/alias.swf";
chs[23] = "http://files.freeonlinegames.com/exgames/bubblebobbletherevival/2bubblebobbletherevival.swf";
chs[24] = "http://www.freeonlinegames.com/exgames/dirtbike2/2dirtbike2.swf";
chs[25] = "http://files.freeonlinegames.com/exgames/planetracer/2planetracer.swf";
chs[26] = "http://files.freeonlinegames.com/exgames/dunebashingindubai/2dunebashingindubai.swf";
chs[27] = "http://www.freeonlinegames.com/exgames/conquerantarctica/2conquerantarctica.swf";
chs[28] = "http://www.gametop.com/online_free_puzzle/amazon_quest/amazon_quest.swf";
chs[29] = "http://www.gametop.com/online_free_puzzle/gem_mine/gem_mine.swf";
chs[30] = "http://www.gametop.com/online_free_arcade/star_ball/star_ball.swf";
chs[31] = "http://www.miniclip.com/swfcontent/freegames/pengiunpush.swf";
chs[32] = "http://www.gametop.com/online_free_arcade/pacxon/pacxon.swf";
chs[33] = "http://www.gametop.com/online_free_sport/real_pool/real_pool.swf";
chs[34] = "http://www.gametop.com/online_free_sport/microracers/microracers.swf";
chs[35] = "http://www.gametop.com/online_free_shooting/galaxy_invaders/galaxy_invaders.swf";
chs[36] = "http://www.gametheflash.net/flash2006/692.swf";
chs[37] = "http://www.diggygames.com/swf/bloons.swf";
chs[38] = "http://www.diggygames.com/swf/sonicthehedgehog.swf";
chs[39] = "http://www.diggygames.com/swf/adrenaline.swf";
chs[40] = "http://www.gamecodecity.com/swf/game_267.swf";
chs[41] = "http://www.mypuzzlesgames.com/images/files/fastfoodfiasco-game.swf";
chs[42] = "http://www.player51.com/files/swf/51059.swf";
chs[43] = "http://files.rategame.net/295.swf";
chs[44] = "http://files.rategame.net/269.swf";
chs[45] = "http://www.freegames4u.biz/swf/game_491.swf";
chs[46] = "http://files.rategame.net/243.swf";
chs[47] = "http://files.freeonlinegames.com/13858/games/crazybomberman/crazybomberman.swf";
chs[48] = "http://www.thegameblazer.com/flashfiles/boardgames/flashpoker.swf";
chs[49] = "http://blinkyou.com/codes/flash/mario.swf";
chs[50] = "http://www.shockinglyfun.com/game_swf/frogger.swf";
chs[51] = "http://www.miniclip.com/swfcontent/freegames/deepfreeze.swf";
chs[52] = "http://www.miniclip.com/swfcontent/freegames/snowline.swf";
chs[53] = "http://www.miniclip.com/swfcontent/freegames/acidfactory.swf";

var chntx = [];
chntx[0] = "Bounce the ball as many times as you can. How long can you go?";
chntx[1] = "Kick the ball as far as you can!";
chntx[2] = "Collect mysterious creatures for the alien zoo!";
chntx[3] = "Navigate your way safely through the waterways!";
chntx[4] = "Surf for all you're worth. Pull off jumps & tricks.";
chntx[5] = "Guide your space ship cross the obstacle filled courses.";
chntx[6] = "Help Vincent to get all the blue blocks onto the yellow spots.";
chntx[7] = "";
chntx[8] = "Hillary, Obama, Giuliani & more play paintball for the USA Presidency!";
chntx[9] = "Help Red Beard to collect all of the gold.";
chntx[10] = "Control the spinning wheel and collect all the barrels, then find the exit";
chntx[11] = "Pop as many balloons as you can with your darts.";
chntx[12] = "Move the player inside the half-circle with the mouse and click to shoot";
chntx[13] = "Put your truck driving skills to the test. How quick can you park the 18 wheeler?";
chntx[14] = "Guide Pacman around the maze using the arrow keys. Eat the pills, and avoid the ghosts.";
chntx[15] = "Fly around in your spaceship, destroying tanks and helicopters with lasers and missiles.";
chntx[16] = "Line up the blocks in the correct order and conquer the Vikings...";
chntx[17] = "Ride your dirt bike on unusually challenging obstacle courses";
chntx[18] = "Shoot bubbles and match 3 or more bubbles to knock them out.";
chntx[19] = "Try and sneak-a-peek at your buddy's hot sister. Use the mouse to look, but don't get caught!";
chntx[20] = "Aim and position your ball shoot it in the goal then defend your goal from soccer balls.";
chntx[21] = "Pop the zits before the time runs out.";
chntx[22] = "Artificial Lifeform Intended for Assassination and Sabotage has decided to escape he needs your help.";
chntx[23] = "Blow bubbles on your enemies and blast them to move on to the next level.";
chntx[24] = "Ride your dirt bike through a challenging rocky terrain";
chntx[25] = "Drag Race on different moons and planets, win money, build reputation, mod your car and challenge the King!";
chntx[26] = "Take this challenging journey through the massive sand dunes of Dubai riding a quad bike";
chntx[27] = "A gang of penguins aspire to conquer the Antarctic ice territory! Help them to defeat all the rival gangs";
chntx[28] = "Line up three or more artifacts to remove the puzzle board";
chntx[29] = "Switch the gems to match 3 in a row to make them disappear";
chntx[30] = "Destroy bricks using a custom spaceship equipped with gravity shields and weaponry.";
chntx[31] = "Push all the ice blocks into the yellow holes.";
chntx[32] = "Fill empty space and capture ghosts by building wall.";
chntx[33] = "Pot all balls from the assigned group of balls (pot all solids or pot all stripes), and then pot the eight ball.";
chntx[34] = "";
chntx[35] = "";
chntx[36] = "Shoot down the bubbles with your harpoon and travel the map";
chntx[37] = "Pop as many balloons as you can with your darts.";
chntx[38] = "Play sonic online! Use the arrow keys to move and spacebar to jump.";
chntx[39] = "The bike stunts game... ";
chntx[40] = "Shoot the kitten out of the cannon and see how far he will go! Position the cannon (arrow keys) and push the space bar to shoot the kitten ...";
chntx[41] = "Try and make rows or columns of 3 pieces of identical food";
chntx[42] = "Power up your angle and let go of the button to shoot the ball knock over pins. Hit strikes and spares!";
chntx[43] = "Earn points by collecting items and avoiding being bombed.";
chntx[44] = "Cruise through some curvy mountains! Pick your vehicle and drift down the hill.";
chntx[45] = "Use your mouse to guide the F/A-18 along the path of the lead plane for as long as you can.";
chntx[46] = "";
chntx[47] = "Bomb your way through and pop your enemies.";
chntx[48] = "Assemble the best five-card poker hand from the cards that are dealt.";
chntx[49] = "Play the flash clone of Super Mario";
chntx[50] = "Frog It, Help the frog cross the road without being run over.";
chntx[51] = "Freeze your enemies with your water gun.";
chntx[52] = "Help Santa Claus collect the presents.";
chntx[53] = "Help harry escape the horrors of his acid-flooded factory.";

var chnim = [];
chnim[0] = "pingpongsmallicon.jpg";
chnim[1] = "monkeykickoffsmallicon.jpg";
chnim[2] = "ufojoesmallicon.jpg";
chnim[3] = "twiddlestixsmallicon.jpg";
chnim[4] = "surfsmallicon.jpg";
chnim[5] = "spaceescapesmallicon.jpg";
chnim[6] = "shoveitsmallicon.jpg";
chnim[7] = "";
chnim[8] = "presidentialpaintballsmallicon.jpg";
chnim[9] = "redbeardsmallicon.jpg";
chnim[10] = "wone.jpg";
chnim[11] = "bloons.gif";
chnim[12] = "shootemin.png";
chnim[13] = "18wheeler.jpg";
chnim[14] = "pacman.jpg";
chnim[15] = "raidenx.jpg";
chnim[16] = "towerblaster.jpg";
chnim[17] = "dirtbike.jpg";
chnim[18] = "bubbleshooter.jpg";
chnim[19] = "lustforbust.jpg";
chnim[20] = "kickoff.jpg";
chnim[21] = "zitpop.jpg";
chnim[22] = "alias.jpg";
chnim[23] = "bubblebobble.jpg";
chnim[24] = "dirtbike2.jpg";
chnim[25] = "planetracer.jpg";
chnim[26] = "dunebashing.jpg";
chnim[27] = "conquerantarctica.jpg";
chnim[28] = "amazonquest.jpg";
chnim[29] = "gemmine.jpg";
chnim[30] = "star_ball.jpg";
chnim[31] = "penguinpushsmallicon.jpg";
chnim[32] = "pac_xon.jpg";
chnim[33] = "real_pool.jpg";
chnim[34] = "";
chnim[35] = "galaxy_invaders.jpg";
chnim[36] = "pang.jpg";
chnim[37] = "bloons.gif";
chnim[38] = "sonic.jpg";
chnim[39] = "adrenaline.gif";
chnim[40] = "kitten.jpg";
chnim[41] = "fastfood.jpg";
chnim[42] = "tgfbowling.jpg";
chnim[43] = "bombjack.jpg";
chnim[44] = "driftbattle.jpg";
chnim[45] = "fa18.jpg";
chnim[46] = "";
chnim[47] = "crazybomberman.jpg";
chnim[48] = "flashpoker.jpg";
chnim[49] = "mario.jpg";
chnim[50] = "frogger.jpg";
chnim[51] = "deepfreezesmallicon.jpg";
chnim[52] = "snowlinesmallicon.jpg";
chnim[53] = "acidfactorysmallicon.jpg";

imgame = "http://camdex.be/games/";

var tcat = [];
tcat[0]="22,27,45,";
tcat[1]="13,28,37,41,18,29,32,11,31,52,6,5,30,16,3,2,";
tcat[3]="35,8,15,";
tcat[4]="39,17,24,48,1,20,40,0,33,12,4,42,10,";
tcat[5]="19,21,";
tcat[6]="44,26,25,";
tcat[7]="47,50,36,14,";
tcat[8]="53,43,23,51,49,9,38,";


function fillCategory(){ 
     // this function is used to fill the category list on load
    addOption(document.drop_list.Category, "0", cat[0]);
    addOption(document.drop_list.Category, "5", cat[5]);
    addOption(document.drop_list.Category, "7", cat[7]);
    addOption(document.drop_list.Category, "8", cat[8]);
    addOption(document.drop_list.Category, "1", cat[1]);
    addOption(document.drop_list.Category, "6", cat[6]);
    addOption(document.drop_list.Category, "3", cat[3]);
    addOption(document.drop_list.Category, "4", cat[4]);
}
    

function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}

function SelectSubCat(){
      var str='';
      str+='<table height="500" style="margin:0 0 10px 0; width:270px; height:500px; background:#fff; border:1px solid #ccc;" cellspacing="0" cellpadding="0">';
      
      var arn=document.drop_list.Category.value;
      var tstr="";

      for (var i=0; i<tcat[arn].length;i++){
       if (tcat[arn].charAt(i) != ",")
       		 tstr = tstr + tcat[arn].charAt(i);
       else{
       		 var nr = parseInt(tstr);
      		 tstr="";
      		 str+='<tr><td style="font-family:verdana; font-size:11px; color:#000; padding:5px 10px;"><a href="javascript:switchChannel(' + nr + ')" style="display:block; text-decoration:none;"><img src="' + imgame + chnim[nr] + '" width="70" height="59" align="left" style="margin-right:5px; border:0;" \/>';
           str+='<strong style="color:#000; border:none; text-decoration:underline;">' + chn[nr] + '<\/strong><p style="margin:0; clear:none; text-decoration:none; color:#000;">' + chntx[nr]  + '<\/p><\/a><\/td><\/tr>';
           str+='<\/td><\/tr>';
      	}	 
      }
      str+='<\/table><\/div>';
      document.getElementById("Gameplay").innerHTML=str;
}