// JavaScript Document
// JavaScript Document
//活动站JS
var siteUrl = "http://www.91.com/activity/";
var oCurTd = '';
//数据导入
var gameLogo = new Array(
"<a href='http://jz.91.com/' target='_blank'><img src='http://image.91.com/www91/images/activity/logo_jz_1.gif' width='50' height='29' align='absmiddle'></a> ",
"<a href='http://my.91.com/' target='_blank'><img src='http://image.91.com/www91/images/activity/logo_my.gif' width='50' height='29' align='absmiddle'></a> ",
"<a href='http://zf.91.com/' target='_blank'><img src='http://image.91.com/www91/images/activity/logo_zf_1.gif' width='50' height='29' align='absmiddle'></a> ",
"<a href='http://kx.91.com/' target='_blank'><img src='http://image.91.com/www91/images/activity/logo_kx_1.gif' width='50' height='29' align='absmiddle'></a> ",
"<a href='http://www.91.com/' target='_blank'><img src='http://image.91.com/www91/images/activity/logo_91_1.gif' width='50' height='29' align='absmiddle'></a> ",
"<a href='http://shop.91.com' target='_blank'><img src='http://image.91.com/www91/images/activity/logo_buy.gif' width='50' height='29' align='absmiddle'></a> "
);

var gameName = new Array();
gameName[0] = "91 Community Events";
gameName[1] = "Conquer Online Events";
gameName[2] = "The Warlords Events";
gameName[3] = "Eudemons Online Events";
gameName[4] = "Zero Online Events";
gameName[5] = "Crazy Tao Events";


//
//定义二维数组，用来存放相关游戏的logo, url和说明
//
var gameText = new Array();
gameText[0] = new Array();	  //91 Community Events
gameText[1] = new Array();	  //Conquer Online Events
gameText[2] = new Array();    //The Warlords Events
gameText[3] = new Array();    //Eudemons Online Events
gameText[4] = new Array();    //Zero Online Events
gameText[5] = new Array();    //Crazy Tao Events

//91 Community Events

gameText[0][0] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-04-27/20090427012650530.shtml'>91 Photo Center Hit 40000 Mark!","0422","0429",0);//0102
gameText[0][1] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-04-27/20090427233104885.shtml'>91 Screenshot Center Hit 20000 Mark!","0501","0508",0); 

gameText[0][2] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-04-24/20090424015455339.shtml'>[WL]Celebrate Open Beta, Upload Screenshots/Photos to Earn Shells ","0424","0507",0); //0126
gameText[0][3] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-04-16/20090416200229249.shtml'>[WL]Who is the Rising Star - Screenshot/Photo Contest","0417","0423",1);//0126
gameText[0][4] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-05-19/20090519184147742.shtml'>WL Open Beta Quiz Event ","0520","0523",0);
gameText[0][5] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-05-26/20090526230030095.shtml'>[91]EO Divine Path Quiz Show","0603","0606",0);
gameText[0][6] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-06-09/20090609190308349.shtml'>[91]ZO Expanding Horizon Quiz Show! ","0610","0613",0);
gameText[0][7] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-06-19/20090619023502975,1.shtml'>Father's Album ","0619","0625",0);
gameText[0][8] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-06-18/20090618193332419.shtml'>Father's Day, Win Mysterious Prize","0619","0625",0);
gameText[0][9] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-07-16/20090716235008843.shtml'>CO Raiding Clans Expansion Screenshot Contest ","0717","0724",0);
gameText[0][10] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-08-27/20090827005230229.shtml'>[Event] Who is the 30000th lucky player?  ","0827","0901",0);
gameText[0][11] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-08-25/20090825192928945.shtml'>[Forum] The Entertainment Board---To be discovered ","0827","0924",0);
gameText[0][12] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-9/20090830223005992,1.shtml'>[Event] 91 Carnival [9.1-9.30] ","0901","0930",0);
gameText[0][13] = new Array(gameLogo[0],"<a target='_blank' href='http://points.91.com/?controller=activity&type=lottery&name=91carnival'>Wheel of Fortune ","0901","0930",0);
gameText[0][14] = new Array(gameLogo[0],"<a target='_blank' href='http://points.91.com/?controller=Activity'>Shoot Balloons to Win Point Cards","0924","0930",0);
gameText[0][15] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-9/20090830223005992,4.shtml#f'>Challenge the Champion","0901","0928",0);
gameText[0][16] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-9/20090830223005992,4.shtml#h'>You'll Reap What You've Sown","0901","0927",0);
gameText[0][17] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-9/20090830223005992,5.shtml#j'>Guild Party[Update]","0901","0928",0);
gameText[0][18] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-9/20090830223005992,5.shtml#k'>You'll Reap What You've Sown","0901","0927",0);
gameText[0][19] = new Array(gameLogo[0],"<a target='_blank' href='http://forum.91.com/topics/627/200908/31/11,1.html'>Strive for 100 Posts","0901","0930",0);
gameText[0][20] = new Array(gameLogo[0],"<a target='_blank' href='http://forum.91.com/topics/627/200909/09/16,1.html'>Be Quick and Sharp!","0914","0928",0);
gameText[0][21] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-9/20090830223005992,7.shtml'>Double MPs Event","0901","0930",0);
gameText[0][22] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-10-27/20091027221511680,1.shtml'>Halloween Event- Shoot Skeletons for Point Cards","1028","1103",0);
gameText[0][23] = new Array(gameLogo[0],"<a target='_blank' href='http://news.us.91.com/content/2009-11-09/20091109230345419,1.shtml'>[Contest]Classic CO Nostalgic Screenshot & Article Contest","1110","1210",0);







//Conquer Online Events

gameText[1][0] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/prodigalson.shtml'>Mother's Day Event - The Prodigal Son","0508","0511",1);
gameText[1][1] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-04-01/20090401013712714.shtml'>Ninja Facebook Promotion Event","0402","0502",0);//0126
gameText[1][2] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-03-31/20090331171900756.shtml'>Easter Online Events","0410","0412",1);//
gameText[1][3] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-05-22/20090522201748947.shtml'>CO Dance Contest: Round 1 - Tried and True","0522","0612",0);//
gameText[1][4] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/dragonboat.shtml'>Dragon boat Festival","0528","0530",1);//
gameText[1][5] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-06-01/20090601015304127.shtml'>CO Children's Day Off-line Event Opening!","0602","0616",0);//
gameText[1][6] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-06-03/20090603020224956.shtml'>3 Days Meteor Shower Event","0605","0607",0);//
gameText[1][7] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/childrenday.shtml'>The Children's Day Online Event ","0612","0614",1);//
gameText[1][8] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/fathersday.shtml'>Father's Day Online Event","0619","0624",1);//
gameText[1][9] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-06-18/20090618190812880.shtml'>CO 2009 Father's Day Event Opens!","0619","0703",0);//
gameText[1][10] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/dance2/index.shtml'>CO Dance Contest Round 2 - Virtual Party","0626","0731",0);//
gameText[1][11] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/mountswarpaint/cnow.php'>Players' Recruitment","0703","0831",0);//
gameText[1][12] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/mountswarpaint/index.php'>CO Mount's Warpaint Competition","0703","0831",0);//
gameText[1][13] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/runningbull.shtml'>Running-Bull Festival","0704","0711",1);//
gameText[1][14] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/gourmet.shtml'>Gourmet Festival","0711","0725",1);//
gameText[1][15] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-07-19/20090719214903583.shtml'>CO Mounts Beauty Pageant","0720","0831",0);//
gameText[1][16] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/greattomatoday.shtml'>Great Tomato Day","0801","0803",1);//
gameText[1][17] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/twincitycarnival,1.shtml'>Twin City Carnival","0807","0811",1);//
gameText[1][18] = new Array(gameLogo[1],"<a target='_blank' href='http://news.us.91.com/content/2009-08-05/20090805203333461.shtml'>CO Carnival - Super Imitation Event ","0810","0823",1);//
gameText[1][19] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/valentine,1.shtml'>Chinese Valentine’s Day Online Event ","0822","0827",1);//
gameText[1][19] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/mapgiefestival/'>Mapgie Festival","0825","0908",0);//
gameText[1][20] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/09ghost.shtml'>Chinese Ghost Festival","0912","0918",1);//
gameText[1][21] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/kungfututorial/index.html'>Conquer Kung-Fu Tutorial","0908","1008",0);//
gameText[1][22] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/moonfestival/'>Mid-Autumn Lanterns Quiz","0928","1012",1);//
gameText[1][23] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/guide/quests/09midautumn.shtml'>Mid-Autumn Festival","1001","1006",1);//
gameText[1][24] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-10-18/20091018235524571.shtml'>Autumn Shopping Rush Round 2","1021","1025",1);//
gameText[1][25] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/content/2009-10-18/20091018222118338.shtml'>SGW Screenshot & Article Contest","1017","1115",0);//
gameText[1][26] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/guildreturn/'>Lost Guild Members Return","1016","1115",0);//
gameText[1][27] = new Array(gameLogo[1],"<a target='_blank' href='http://co.91.com/activity/the4thsuperguildwar/'>The 4th Super Guild War","1017","1115",1);//
gameText[1][28] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/pvpvideocontest/'>PvP Video Contest","1014","1130",0);//
gameText[1][29] = new Array(gameLogo[1],"<a target='_blank' href='http://contest.co.91.com/pumpkinsmash/'>Do the Pumpkin Smash","1030","1201",0);//



//The Warlords Events
gameText[2][0] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-04-27/20090427224605776.shtml'>WL May Events","0515","0516",1);
gameText[2][1] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-04-27/20090427224605776.shtml'>WL May Events","0501","0502",1);
gameText[2][2] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-04-27/20090427224605776.shtml'>WL May Events","0508","0509",1);
gameText[2][3] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-04-27/20090427224605776.shtml'>WL May Events","0522","0523",1);
gameText[2][4] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-04-27/20090427224605776.shtml'>WL May Events","0529","0530",1);
gameText[2][5] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-05-14/20090514235720330.shtml'>Forum Discussion Event","0515","0615",0);
gameText[2][6] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-05-22/20090522232044374.shtml'>WL Writing Contest: My Siblings & I","0523","0623",0);
gameText[2][7] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-05-19/20090519222646737.shtml'>WL June Events","0601","0630",0);
gameText[2][8] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/guide/quest/dragon_boat.shtml'>Dragon Boat Festival","0528","0531",1);
gameText[2][9] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-06-04/20090604213807821.shtml'>WL Facebook Event","0608","0708",0);
gameText[2][10] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-06-05/20090605010240310.shtml'>Warlords Trivia Event","0615","0622",1);
gameText[2][11] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/guide/quest/horse_race.shtml'>Horse Race Event","0608","0612",1);
gameText[2][12] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-06-19/20090619012736431.shtml'>WL Wish Wall Event","0619","0719",0);
gameText[2][13] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-06-22/20090622015648894.shtml'>3 Days Double Exp Event","0623","0625",1);
gameText[2][14] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-06-30/20090630003455194.shtml'>WL Screenshot Contest ","0701","0801",0);
gameText[2][15] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/guide/quest/mysterious_abyss.shtml'>Mysterious Abyss","0717","0721",1);
gameText[2][16] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-07-28/20090728221713950.shtml'>Flash Game Event Begins","0730","0817",0);
gameText[2][17] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-08-20/20090820234404338.shtml'>Vows of Love! WL QiXi Festival Event Opening!","0820","0831",0);
gameText[2][18] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/guide/quest/hero_vault.shtml'>Hero's Vault","0904","0927",1);
gameText[2][19] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/guide/quest/moon_veranda.shtml'>Moon Festival Events","1001","1007",1);
gameText[2][20] = new Array(gameLogo[2],"<a target='_blank' href='http://wl.91.com/content/2009-09-22/20090922004902029.shtml'>WL Events Preview: October","1001","1031",1);





//Eudemons Online Events
gameText[3][0] = new Array(gameLogo[3],"<a target='_blank' href='http://contest.eo.91.com/card/'>Happy Mother's Day - Mom, Thank You!","0508","0522",0);//0126
gameText[3][1] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/saint_eu.shtml'>Saint Eudemons","0401","0601",1);
gameText[3][2] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/demon_rebon.shtml'>Demon Reborn","0401","0601",1);
gameText[3][3] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/celebrity_quest.shtml'>Celebrity Hall Quest","0401","0601",1);
gameText[3][4] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/celebrity_quest.shtml'>The Recruit Quests ","0401","0601",1);
gameText[3][5] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/content/2009-05-13/20090513203528019.shtml'>The Divine Path Screenshot Contest","0514","0613",0);
gameText[3][6] = new Array(gameLogo[3],"<a target='_blank' href='http://contest.eo.91.com/handinhand/index.php'>Hand in Hand (3rd Phase) Starts","0525","0530",0);
gameText[3][7] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/3nd_1.shtml'>Saraph Celebration (June 2nd - 7th)","0602","0607",1);
gameText[3][8] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/content/2009-05-31/20090531231827112.shtml'>EO Children's Day Off-line Event Opening","0602","0616",0);
gameText[3][9] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/content/2009-06-12/20090612003239446.shtml'>Astral Eudemons Offline Event! ","0612","0712",0);
gameText[3][10] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/content/2009-06-18/20090618002717962.shtml'>EO Father's Day Double-Exp Weekend Event!","0620","0621",1);
gameText[3][11] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/content/2009-06-15/20090615001640018.shtml'>The New Eudemons Screenshot Contest","0615","0715",0);
gameText[3][12] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/flower_card.shtml'>Flower Cards Drop Again","0704","0705",1);
gameText[3][13] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/military_exercise.shtml'>Military Exercise","0718","0719",1);
gameText[3][14] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/mj_memorial.shtml'>Michael Jackson Memorial","0720","0726",1);
gameText[3][15] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/content/2009-07-20/20090720225852745.shtml'>EO Facebook Event","0724","0824",0);
gameText[3][16] = new Array(gameLogo[3],"<a target='_blank' href='http://eo.91.com/guide/task/spirit_rescue.shtml'>Divine EXP - Spirit Rescue","0825","1130",0);
gameText[3][17] = new Array(gameLogo[3],"<a target='_blank'http://eo.91.com/content/2009-11-05/20091105003331302.shtml'>Prospective Quest III - Scar of Cronus","1106","1112",0);






 //Zero Online Events
gameText[4][0] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-05-08/20090508034148283.shtml'>Write a Letter to Your Dear Mother ","0508","0522",0);
gameText[4][1] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-04-28/20090428231559858.shtml'>Galaxy City - Crystal Treasure Event ","0502","0503",1);//
gameText[4][2] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-04-17/20090417011839230.shtml'>Academy Recruitment Event Begins on April 17 ","0417","0515",1);
gameText[4][3] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-04-13/20090413003025559.shtml'>The Return of the Veterans ","0423","0522",1);
gameText[4][4] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-05-21/20090521204342207.shtml'>Academy Recruitment Returns (May 22- June 19) ","0522","0619",1);
gameText[4][5] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-05-23/20090523004733109.shtml'>Expansion Themed Contests (May 23 - June 23) ","0523","0623",0);
gameText[4][6] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-06-23/20090623215317386.shtml'>Zero Quiz Contest ","0624","0724",1);
gameText[4][7] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-06-23/20090623190300113.shtml'>Tell Your Friends-3rd Round Released ","0625","0725",0);
gameText[4][8] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-06-28/20090628170211997.shtml'>Q&A Contest (Tell Your Friends 3 Round)","0625","0725",0);
gameText[4][9] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-06-30/20090630002056797.shtml'>ZO Double EXP/Crystal Event Announced ","0704","0705",1);
gameText[4][10] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-07-14/20090714194619512.shtml'>New ZO Facebook Page and Event Released ","0715","0815",0);
gameText[4][11] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-07-14/20090714235203530.shtml'>Alliance Carnival Event","0718","0719",1);
gameText[4][12] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-07-15/20090715230156795.shtml'>ZO Wiki Event","0717","0724",0);
gameText[4][13] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/content/2009-08-24/20090824015253360.shtml'>Who Wants to Be the King or Queen? ","0825","0925",0);
gameText[4][14] = new Array(gameLogo[4],"<a target='_blank' href='http://zo.91.com/activity/09carnival/'>Carnival Online Events","1010","1016",1);
gameText[4][15] = new Array(gameLogo[4],"<a target='_blank' href='http://contest.zo.91.com/activity/summonback/'>Spin and win gift packs","0925","1025",1);
gameText[4][16] = new Array(gameLogo[4],"<a target='_blank' href='http://contest.zo.91.com/activity/unitspainting/'>Units Painting Event","1029","1129",0);



//Crazy Tao Events
gameText[5][0] = new Array(gameLogo[5],"<a target='_blank' href='http://ct.91.com/content/2009-01-21/20090121220151411.shtml'>Spring Festival Event","0125","0127",1);
gameText[5][1] = new Array(gameLogo[5],"<a target='_blank' href='http://ct.91.com/content/2009-02-06/20090206004850732.shtml'>Valentine's Day Contest - 10000 TPs in Prizes!","0206","0221",0);
gameText[5][2] = new Array(gameLogo[5],"<a target='_blank' href='http://ct.91.com/content/2009-04-08/20090408190455916.shtml'>Easter Event","0410","0412",1);
gameText[5][3] = new Array(gameLogo[5],"<a target='_blank' href='http://ct.91.com/content/2009-05-27/20090527013906939.shtml'>Children's Day Event","0601","0601",1);
gameText[5][4] = new Array(gameLogo[5],"<a target='_blank' href='http://ct.91.com/content/2009-07-30/20090730220319963.shtml'>Miner Dig Deep Event","0801","0831",1);


//日历
var today = null;
var iCurId = -1;
function beginTime(vYear, vMonth, vDay){ //调用参数：年，月，日；，默认则为取客户端当前日期
	var dayValue = null;
	var err = null;
	try{ dayValue = (vYear != null && vMonth != null && vDay != null) ? new Date(vYear, vMonth - 1, vDay) : null; }catch(err){ dayValue = null; }
	today = (dayValue == null) ? new getToday() : new getToday(dayValue);
	var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31,30, 31, 30, 31);
	var months = new Array("Jan", "Feb", "Mar","Apr", "May", "Jun", "Jul", "Aug", "Sep","Oct", "Nov", "Dec");
	var days = getDays(today.month, today.year);
	var newCal = new Date(today.year, today.month, 1).getDay();
	var title = '<div style="text-align:center; font-size:13px;"><a href="javascript:;" onclick="lastMonth();"  title="last month">< last month</a> <span id="calendar_txt" style="display:none;"></span>' + today.year + ' ' + months[today.month] + ' ' + today.day + ' <a href="javascript:;" onclick="nextMonth()";  title="next month">next month ></a></div>';
	//2parts combines now...
	document.getElementById("timeValueDiv").innerHTML = title + display(today, newCal, 0, 1, days) ;
	
	//每次显示日历时，都将当前日期置为当前对象(需要进行色彩处理用)
	oCurTd = document.getElementById(iCurId);
	oCurTd.style.backgroundColor = "#5fc5e6";
	
	function bb(){if(this.className != "timeTD1" && this.id != today.year + "-" + (today.month + 1) + "-" + today.day){var obj=this;setTimeout(function(){obj.className = "";},100);}}

	//获取某月中的天数
	function getDays(month, year) {
		if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) ||(0 == year % 400) ? 29 : 28;

		else return daysInMonth[month];
	}

	//当前day对象
	function getToday(nowValue) {
		this.now = (nowValue == null) ? new Date() : nowValue;
		this.year = this.now.getFullYear();
		this.month = this.now.getMonth();
		this.day = this.now.getDate();	//月中的日期值
		this.week = this.now.getDay();	//一周中的日期值
	}

	function display(today,newCal, tds, day, days){
		var inner = '';
		inner += '<table width="100%" border="0" cellspacing="5" cellpadding="0" style="line-height:25px;" class="tb1">';
		for(var i = 0; i < 6; i++){
			inner += "<tr>";
			for(var j = 0; j < 7; j++){
				if(tds < newCal || day > days)
				inner += "<td ><\/td>";
				else{
					if (today.day == day) {
						iCurId = today.year + "-" + (today.month + 1) + "-" + day;
						inner += "<td id=\"" + today.year + "-" + (today.month + 1) + "-" + day + "\" onclick='timeActive(this);' onmouseover='mover(this);' onmouseout='mout(this)'>" + day + "<\/td>";
					} else {
						inner += "<td id=\"" + today.year + "-" + (today.month + 1) + "-" + day + "\"  onclick='timeActive(this);' onmouseover='mover(this);' onmouseout='mout(this)'> " + day + "<\/td>";
					}
					day++;
				}
				tds++;
			}
			inner += "</tr>";
		}
		inner += "</table>";
		return inner;
	}
}
function mover(obj) {
	obj.style.backgroundColor = "#36b4e6";
	obj.style.cursor='pointer';

}

function mout(obj) {
	if (obj == oCurTd) {
		return;
	}
	obj.style.backgroundColor = "#373737";
}


/**
* 点日期后的实现功能块，可以根据取到的ID值的日期字符，搞东搞西
*/
function timeActive(thiss){
	var bb = null;
	if(typeof(thiss) == "undefined") {
		var aa = new Date();
		var mm = parseInt(aa.getMonth()) + 1;
		bb = aa.getFullYear()+"-"+mm+"-"+aa.getDate();
	} else {
		bb = thiss.id;
		if (oCurTd != '') {
			oCurTd.style.backgroundColor = "#373737";
		}
		oCurTd = thiss;
		oCurTd.style.backgroundColor = "#5fc5e6";
	}
//	var oCurDay = new Date();
//	var todayId = oCurDay.getFullYear() + '-' + parseInt(oCurDay.getMonth()+1) + '-' + oCurDay.getDate();
//	if (bb != todayId) {
//		document.getElementById(todayId).style.backgroundColor = "#373737";
//	}
	var gametime = bb.split("-");
	var month ;
	var day;
	//活动月
	if(gametime[1]<10) {
		month ="0"+gametime[1];
	} else {
		month = gametime[1];
	}
	//活动日
	
	if(gametime[2]<10){
		day = "0"+gametime[2];
	} else {
		day = gametime[2];
	}
		
	var gettime =month+day;
	var gameMonth;
	switch(gametime[1]){
		case "1": gameMonth = "Jan";break;
		case "2": gameMonth = "Feb";break;
		case "3": gameMonth = "Mar";break;
		case "4": gameMonth = "Apr";break;
		case "5": gameMonth = "May";break;
		case "6": gameMonth = "Jun";break;
		case "7": gameMonth = "Jul";break;
		case "8": gameMonth = "Aug";break;
		case "9": gameMonth = "Sep";break;
		case "10":gameMonth = "Oct";break;
		case "11":gameMonth = "Nov";break;
		case "12":gameMonth = "Dec";break;
		default:gameMonth ="";break;
	}
	document.getElementById("gameday").innerHTML = gametime[0] + " " +gameMonth + " " + day + " - Events";
	//改变日历上面的显示
	var oChgedDay = document.getElementById('calendar_txt');
	if (oChgedDay != null) {
		oChgedDay.innerHTML = gametime[0] + " " +  gameMonth + " " + day ;
	}
	var g = new Array();
	var inner = "";
	var n = 0;
	var curNum = 0;
	var onlineText;
	//各项活动分类
	for (var i = 0; i < gameName.length; i++) {
		//对相应分类活动下的每个活动对象进行处理
		//gameText[i][j]为当前活动对象。
		curNum = parseInt(i+1);
		innerItems = '';
		var itemNum = 0;
		for (var j = 0; j < gameText[i].length; j++) {
			if ((gettime >= gameText[i][j][2]) && (gettime <= gameText[i][j][3])) {
				innerItems += '<li >' + gameText[i][j][1] ;
				onlineText = (gameText[i][j][4] == 1) ?  '(Online)' : '(Offline)';
				innerItems += onlineText + '</a>';
				innerItems += '</li>';
				itemNum++;
			}
		}
		if (itemNum === 0)
			continue;
		inner += '<h5>' + gameName[i] + '</h5>' // output category name
		inner += '<div class="con fix_' + curNum + '" id="list_txt' + curNum + '"><ul>';
		inner += innerItems; // output events
		inner += '</ul></div>';
	}
	document.getElementById("day_act_list").innerHTML = inner;
}

function lastMonth(){
	if(today != null)
	{
		beginTime(today.year, today.month,today.day);
	}
}

function nextMonth(){
	if(today != null)
	{
		beginTime(today.year, (today.month + 2),today.day);
	}
}

//获取elementbyid对象
function $()
{

	var elements = new Array();
	for (var i = 0; i < arguments.length; i++)
	{
		var element = arguments[i];
		if (typeof element == 'string')
		element = document.getElementById(element);
		if (arguments.length == 1)
		return element;
		elements.push(element);
	}
	return elements;
}

//获取class属性对象
document.getElementsByClassName = function(cl) {
	var retnode = [];
	var myclass = new RegExp('\\b'+cl+'\\b');
	var elem = this.getElementsByTagName('*');
	for (var j = 0; j < elem.length; j++) {
		var classes = elem[j].className;
		if (myclass.test(classes)) retnode.push(elem[j]);
	}
	return retnode;
}