var header_arr  = new Array();
var path_bg     = "http://files.gamezhero.com/images/pro/";
var path_header = "http://files.gamezhero.com/images/pro/header/";
var game_path   = "http://www.gamezhero.com/online-games/"; 
var alt         = "play free online games at gamezhero.com";

header_arr.push({"kof":1, "name":"uforacing",        "alt":alt,  "img_url_top":path_header+"hero12_1.jpg", "img_url_bottom":path_header+"hero12_2.jpg", "link":game_path+"sports-games/uforacing-freeonlinegames.html", "img_url_cover":path_bg+"pro1.jpg"});
header_arr.push({"kof":0, "name":"captainzorrolostfactory", "alt":alt,  "img_url_top":path_header+"hero54_1.jpg", "img_url_bottom":path_header+"hero54_2.jpg", "link":game_path+"puzzle-games/captainzorrolostfactory-games.html", "img_url_cover":path_bg+"pro41.jpg"});
header_arr.push({"kof":0, "name":"captainzorrolasthope", "alt":alt,  "img_url_top":path_header+"hero45_1.jpg", "img_url_bottom":path_header+"hero45_2.jpg", "link":game_path+"action-games/captainzorrolasthope-games.html", "img_url_cover":path_bg+"pro32.jpg"});
header_arr.push({"kof":0, "name":"captainzorro",     "alt":alt,  "img_url_top":path_header+"hero14_1.jpg", "img_url_bottom":path_header+"hero14_2.jpg", "link":game_path+"shooting-games/captainzorro-arcadeonlinegame.html", "img_url_cover":path_bg+"pro3.png"});
header_arr.push({"kof":0, "name":"lasttouchdown",    "alt":alt,  "img_url_top":path_header+"hero15_1.jpg", "img_url_bottom":path_header+"hero15_2.jpg", "link":game_path+"sports-games/lasttouchdown-freeonlinegames.html", "img_url_cover":path_bg+"pro4.png"});
header_arr.push({"kof":0, "name":"spidermandarkside","alt":alt,  "img_url_top":path_header+"hero16_1.jpg", "img_url_bottom":path_header+"hero16_2.jpg", "link":game_path+"action-games/spidermandarkside-superherogame.html", "img_url_cover":path_bg+"pro5.png"});
header_arr.push({"kof":0, "name":"doctorzed",        "alt":alt,  "img_url_top":path_header+"hero17_1.jpg", "img_url_bottom":path_header+"hero17_2.jpg", "link":game_path+"arcade-games/doctorzed-onlinegames.html", "img_url_cover":path_bg+"pro6.png"});
header_arr.push({"kof":0, "name":"aliencraft",       "alt":alt,  "img_url_top":path_header+"hero19_1.jpg", "img_url_bottom":path_header+"hero19_2.jpg", "link":game_path+"strategy-games/aliencraft-games.html", "img_url_cover":path_bg+"pro7.png"});
header_arr.push({"kof":0, "name":"rapidwars",        "alt":alt,  "img_url_top":path_header+"hero20_1.jpg", "img_url_bottom":path_header+"hero20_2.jpg", "link":game_path+"shooting-games/rapidwars-games.html", "img_url_cover":path_bg+"pro8.jpg"});
header_arr.push({"kof":0, "name":"ninjaglove",       "alt":alt,  "img_url_top":path_header+"hero21_1.jpg", "img_url_bottom":path_header+"hero21_2.jpg", "link":game_path+"action-games/ninjaglove-games.html", "img_url_cover":path_bg+"pro9.png"});
header_arr.push({"kof":0, "name":"ghostcastle",      "alt":alt,  "img_url_top":path_header+"hero22_1.jpg", "img_url_bottom":path_header+"hero22_2.jpg", "link":game_path+"puzzle-games/ghostcastle-games.html", "img_url_cover":path_bg+"pro10.jpg"});
header_arr.push({"kof":0, "name":"mindtheblox",      "alt":alt,  "img_url_top":path_header+"hero23_1.jpg", "img_url_bottom":path_header+"hero23_2.jpg", "link":game_path+"puzzle-games/mindtheblox-games.html", "img_url_cover":path_bg+"pro11.jpg"});
header_arr.push({"kof":0, "name":"warlordsheroes",   "alt":alt,  "img_url_top":path_header+"hero24_1.jpg", "img_url_bottom":path_header+"hero24_2.jpg", "link":game_path+"adventure-games/warlordsheroes-games.html", "img_url_cover":path_bg+"pro12.jpg"});
header_arr.push({"kof":0, "name":"coignofvantage",   "alt":alt,  "img_url_top":path_header+"hero25_1.png", "img_url_bottom":path_header+"hero25_2.png", "link":game_path+"sports-games/coignofvantage-games.html", "img_url_cover":path_bg+"pro13.png"});
header_arr.push({"kof":0, "name":"strawhatsamurai",  "alt":alt,  "img_url_top":path_header+"hero26_1.png", "img_url_bottom":path_header+"hero26_2.png", "link":game_path+"action-games/strawhatsamurai-games.html", "img_url_cover":path_bg+"pro14.jpg"});
header_arr.push({"kof":0, "name":"kullors",          "alt":alt,  "img_url_top":path_header+"hero27_1.png", "img_url_bottom":path_header+"hero27_2.png", "link":game_path+"puzzle-games/kullors-games.html", "img_url_cover":path_bg+"pro15.png"});
header_arr.push({"kof":0, "name":"nanofarm",         "alt":alt,  "img_url_top":path_header+"hero28_1.jpg", "img_url_bottom":path_header+"hero28_2.jpg", "link":game_path+"puzzle-games/nanofarm-games.html", "img_url_cover":path_bg+"pro16.jpg"});
header_arr.push({"kof":0, "name":"sketchamatch",     "alt":alt,  "img_url_top":path_header+"hero29_1.jpg", "img_url_bottom":path_header+"hero29_2.jpg", "link":game_path+"sports-games/sketchamatch-games.html", "img_url_cover":path_bg+"pro17.jpg"});
header_arr.push({"kof":0, "name":"tarnation",        "alt":alt,  "img_url_top":path_header+"hero30_1.jpg", "img_url_bottom":path_header+"hero30_2.jpg", "link":game_path+"action-games/tarnation-games.html", "img_url_cover":path_bg+"pro18.jpg"});
header_arr.push({"kof":0, "name":"blockular",        "alt":alt,  "img_url_top":path_header+"hero31_1.jpg", "img_url_bottom":path_header+"hero31_2.jpg", "link":game_path+"puzzle-games/blockular-games.html", "img_url_cover":path_bg+"pro19.png"});
header_arr.push({"kof":1, "name":"cakemaster",       "alt":alt,  "img_url_top":path_header+"hero32_1.jpg", "img_url_bottom":path_header+"hero32_2.jpg", "link":game_path+"girl-games/cakemaster-games.html", "img_url_cover":path_bg+"pro20.jpg"});
header_arr.push({"kof":0, "name":"hannainachoppa",   "alt":alt,  "img_url_top":path_header+"hero33_1.jpg", "img_url_bottom":path_header+"hero33_2.jpg", "link":game_path+"action-games/hannainachoppa-games.html", "img_url_cover":path_bg+"pro21.png"});
header_arr.push({"kof":0, "name":"santastowerredbeardattack",   "alt":alt,  "img_url_top":path_header+"hero34_1.jpg", "img_url_bottom":path_header+"hero34_2.jpg", "link":game_path+"action-games/santastowerredbeardattack-freeonlinegame.html", "img_url_cover":path_bg+"pro2.png"});
header_arr.push({"kof":0, "name":"santaquest",       "alt":alt,  "img_url_top":path_header+"hero35_1.jpg", "img_url_bottom":path_header+"hero35_2.jpg", "link":game_path+"puzzle-games/santaquest-games.html", "img_url_cover":path_bg+"pro22.jpg"});
header_arr.push({"kof":0, "name":"psyline",          "alt":alt,  "img_url_top":path_header+"hero36_1.jpg", "img_url_bottom":path_header+"hero36_2.jpg", "link":game_path+"sports-games/psyline-games.html", "img_url_cover":path_bg+"pro23.png"});
header_arr.push({"kof":1, "name":"incablocks",       "alt":alt,  "img_url_top":path_header+"hero37_1.jpg", "img_url_bottom":path_header+"hero37_2.jpg", "link":game_path+"sports-games/incablocks-games.html", "img_url_cover":path_bg+"pro24.jpg"});
header_arr.push({"kof":0, "name":"spacetrip",        "alt":alt,  "img_url_top":path_header+"hero38_1.png", "img_url_bottom":path_header+"hero38_2.png", "link":game_path+"sports-games/spacetrip-games.html", "img_url_cover":path_bg+"pro25.png"});
header_arr.push({"kof":0, "name":"cursorchaos",     "alt":alt,  "img_url_top":path_header+"hero39_1.png", "img_url_bottom":path_header+"hero39_2.png", "link":game_path+"action-games/cursorchaos-games.html", "img_url_cover":path_bg+"pro26.jpg"});
header_arr.push({"kof":0, "name":"bowja3ninjakami", "alt":alt,  "img_url_top":path_header+"hero40_1.jpg", "img_url_bottom":path_header+"hero40_2.jpg", "link":game_path+"adventure-games/bowja3ninjakami-games.html", "img_url_cover":path_bg+"pro27.jpg"});
header_arr.push({"kof":0, "name":"offbalance",      "alt":alt,  "img_url_top":path_header+"hero41_1.png", "img_url_bottom":path_header+"hero41_2.png", "link":game_path+"sports-games/offbalance-games.html", "img_url_cover":path_bg+"pro28.png"});
header_arr.push({"kof":0, "name":"deathvsmonstars", "alt":alt,  "img_url_top":path_header+"hero42_1.jpg", "img_url_bottom":path_header+"hero42_2.jpg", "link":game_path+"shooting-games/deathvsmonstars-games.html", "img_url_cover":path_bg+"pro29.png"});
header_arr.push({"kof":0, "name":"d403journeyofaservicedroid", "alt":alt,  "img_url_top":path_header+"hero43_1.png", "img_url_bottom":path_header+"hero43_2.png", "link":game_path+"arcade-games/d403journeyofaservicedroid-games.html", "img_url_cover":path_bg+"pro30.png"});
header_arr.push({"kof":0, "name":"reactortwist3d", "alt":alt,  "img_url_top":path_header+"hero44_1.png", "img_url_bottom":path_header+"hero44_2.png", "link":game_path+"action-games/reactortwist3d-games.html", "img_url_cover":path_bg+"pro31.jpg"});
header_arr.push({"kof":0, "name":"impulsej4summer", "alt":alt,  "img_url_top":path_header+"hero46_1.png", "img_url_bottom":path_header+"hero46_2.png", "link":game_path+"sports-games/impulsej4summer-games.html", "img_url_cover":path_bg+"pro33.png"});
header_arr.push({"kof":1, "name":"botracing", "alt":alt,  "img_url_top":path_header+"hero47_1.png", "img_url_bottom":path_header+"hero47_2.png", "link":game_path+"sports-games/botracing-games.html", "img_url_cover":path_bg+"pro34.jpg"});
header_arr.push({"kof":0, "name":"returnofthesquid", "alt":alt,  "img_url_top":path_header+"hero48_1.png", "img_url_bottom":path_header+"hero48_2.png", "link":game_path+"shooting-games/returnofthesquid-games.html", "img_url_cover":path_bg+"pro35.jpg"});
header_arr.push({"kof":1, "name":"bulletchaos", "alt":alt,  "img_url_top":path_header+"hero49_1.png", "img_url_bottom":path_header+"hero49_2.png", "link":game_path+"action-games/bulletchaos-games.html", "img_url_cover":path_bg+"pro36.jpg"});
header_arr.push({"kof":0, "name":"skyshippepelac", "alt":alt,  "img_url_top":path_header+"hero50_1.jpg", "img_url_bottom":path_header+"hero50_2.jpg", "link":game_path+"sports-games/skyshippepelac-games.html", "img_url_cover":path_bg+"pro37.jpg"});
header_arr.push({"kof":0, "name":"spacevoyageinvasion", "alt":alt,  "img_url_top":path_header+"hero51_1.jpg", "img_url_bottom":path_header+"hero51_2.jpg", "link":game_path+"shooting-games/spacevoyageinvasion-games.html", "img_url_cover":path_bg+"pro38.jpg"});
header_arr.push({"kof":0, "name":"tornadorace", "alt":alt,  "img_url_top":path_header+"hero52_1.png", "img_url_bottom":path_header+"hero52_2.png", "link":game_path+"sports-games/tornadorace-games.html", "img_url_cover":path_bg+"pro39.jpg"});
header_arr.push({"kof":0, "name":"pointix", "alt":alt,  "img_url_top":path_header+"hero53_1.jpg", "img_url_bottom":path_header+"hero53_2.jpg", "link":game_path+"puzzle-games/pointix-games.html", "img_url_cover":path_bg+"pro40.jpg"});
header_arr.push({"kof":1, "name":"pinkypopfirstjourney", "alt":alt,  "img_url_top":path_header+"hero55_1.jpg", "img_url_bottom":path_header+"hero55_2.jpg", "link":game_path+"sports-games/pinkypopfirstjourney-games.html", "img_url_cover":path_bg+"pro42.jpg"});
header_arr.push({"kof":1, "name":"seabedcleaner", "alt":alt,  "img_url_top":path_header+"hero56_1.jpg", "img_url_bottom":path_header+"hero56_2.jpg", "link":game_path+"puzzle-games/seabedcleaner-games.html", "img_url_cover":path_bg+"pro43.jpg"});
header_arr.push({"kof":1, "name":"pinkypophalloweenparty", "alt":alt,  "img_url_top":path_header+"hero57_1.jpg", "img_url_bottom":path_header+"hero57_2.jpg", "link":game_path+"sports-games/pinkypophalloweenparty-games.html", "img_url_cover":path_bg+"pro44.jpg"});

header_arr2 = new Array();
for (var i=0;i<header_arr.length;i++){
       for (var j=0;j<header_arr[i]["kof"];j++){
           header_arr2.push(i);
       }
       if (String(document.location.href).indexOf(header_arr[i]["name"])!=-1){
           header_arr2 = new Array();
           header_arr2.push(i);
           break;
       }
}

var header_indx = Math.round(Math.random()*(header_arr2.length-1));
var header =  header_arr[header_arr2[header_indx]];
function putHeader(country){
               
       var header1 = document.getElementById("header_top");
       var header2 = document.getElementById("header_bottom");
       var sufix   = "?utm_campaign=header_game&utm_source=header_game&utm_medium="+header['name'];

       switch(country){
           case "UxS":
                   header1.innerHTML = '<img src="'+path_bg+'intergi/iceage/h_iceage_1.jpg" width="450" height="35" border="0" alt="" />';
                   header2.innerHTML = '<img src="'+path_bg+'intergi/iceage/h_iceage_2.jpg" width="445" height="85" border="0" alt="" />';
           break
           default:
                   header1.innerHTML = '<a title="'+header['alt']+'" target="_blank" href="'+header['link']+sufix+'"><img src="'+header['img_url_top']+'" width="450" height="35" border="0" alt="'+header['alt']+'" /></a>';
                   header2.innerHTML = '<a title="'+header['alt']+'" target="_blank"  href="'+header['link']+sufix+'"><img src="'+header['img_url_bottom']+'" width="445" height="85" border="0" alt="'+header['alt']+'" /></a>';
       }
       putCover(country);

}
function putCover(country){
       /*
       if (document.location.href!="http://www.gamezhero.com/"){
           country = "XX";
       }
       */

       switch(country){
           case "UxS":
                document.write('<style>');
                document.writeln('body {  background-color: #000000; margin: 0px; padding: 0px; color:#FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-image:none; }');
                document.writeln('#pro {  background-image: url(http://files.gamezhero.com/images/pro/intergi/iceage/iceage.jpg); background-repeat: no-repeat; background-position: center 0px;}');
                document.write('</style>');

                var obj = document.getElementById("l_r_ad");
                //var url =  "http://www.gamezhero.com/"
                //obj.innerHTML =  '<a class="adleft" href="'+url+'"></a>'
                //obj.innerHTML += '<a class="adrigth" href="'+url+'"></a>'

                obj.innerHTML = '<IMG height="0" width="0" SRC="http://cgm.adbureau.net/iserver/SITE=GAMEZHERO.COM/AREA=ONLINE/AAMSZ=1X1/CCID=11302/">';

                
                
           break
           default:
                document.write('<style>');
                //document.writeln('body {  background-color: #000000; margin: 0px; padding: 0px; color:#FFFFFF; font-family: Arial, Helvetica, sans-serif; font-size: 12px; background-image:none; }');
                document.writeln('#pro {  background-image: url('+header['img_url_cover']+'); background-repeat: no-repeat; background-position: center 130px;}');
                document.write('</style>');
       }
}