function innerCreateGift ()
			{
				
				var rndClass=type[Common.rand_one(0, type.length-1)];
				
				var oGift=document.createElement('li');
				
				oGift.className=rndClass;
				
				switch(rndClass)
				{
					case 'bullet_gift':
						oGift.giftType=0;
						break;
					case 'bomb_gift':
						oGift.giftType=1;
						break;
					default:
						alert(rndClass+'类名错误');
						break;
				}
				
				objects.oPlayBox.appendChild(oGift);
				
				oGift.style.left=Common.rand_one(0, objects.oPlayBox.offsetWidth-oGift.offsetWidth)+'px';
				oGift.style.top=-oGift.offsetHeight+'px';
				
				gift_fns.gift_move_level_1(oGift);
				
				clearTimeout(gift_fns.create_gift.timer);
				gift_fns.create_gift.timer=setTimeout(innerCreateGift, Common.rand_one(20000, 30000));
			
			}
			gamesLi_onclick:	function (ev, index)
			{
				var objects=new Objects();
				
				//记录当前是哪个游戏页面
				window.nowGameIndex=index;
				
				//更换背景
				//objects.oPlaneBg.style.background='url(../../img/game_plan/background_2.png) 0 0 repeat';
				
				
				var oEvent=ev||event;
				var src=oEvent.srcElement||oEvent.target;
				if(src.className.indexOf('startGame')!=-1)
				{
					
					objects.aStartGame[index].style.display='none';
					
					objects.oShowWindow.style.overflow='visible';
					
					Common.startMove(
						objects.aGames[index], 
						{
							width: objects.aGames[index].bigWidth, height: objects.aGames[index].bigHeight, 
							left: (objects.oShowWindow.offsetWidth-objects.aGames[index].bigWidth)/2, 
							marginTop: -Common.getPos(objects.aGames[index]).top+10
						}, 
						{
							end: function ()
								{
									games_act_fns.after_gamesLi_turn_bigger(index);
								}
						});
				}	
			},
								(function (index)
								{
									Common.addEvent(aCont[i], 'mouseover', function (ev)
									{
										var oEvent=ev||event;
										var from=oEvent.fromElement||oEvent.relatedTarget;
										
										if(Common.isChild(aCont[index], from))
											return;
										
										clearInterval(timer);
									});
									
									Common.addEvent(aCont[i], 'mouseout', function (ev)
									{
										var oEvent=ev||event;
										var to=oEvent.toElement||oEvent.relatedTarget;
										
										if(Common.isChild(aCont[index], to))
											return;
											
										clearInterval(timer);
										timer=setInterval(autoShow, 3000);
									});
								})(i);
																		(function (index)
																		{
																			//aWorkItem[index].downTime=0;
																			Common.addEvent(aWorkItem[i], 'mousedown', function
																			()
																			{
																		
																				var oDate=new Date();
																				aWorkItem[index].downTime=oDate.getTime();
																				
																				
																			});
																			
																			
																			Common.addEvent(aWorkItem[i], 'mouseup', function
																			()
																			{
																				var oDate=new Date();
																				
																				if((oDate.getTime()-aWorkItem[index].downTime)<200)
																				{
																				
																					move(oWorks, {opacity: 0}, {end: function 
																					()
																					{
																						oWorks.style.display='none';
																						
																						//对应的Item详细内容显示
																						for(var j=0; j<aWorkDetail.length; j++)
																						{
																							if(aWorkDetail[j].index==aWorkItem[index].contIndex)
																							{
																								aWorkDetail[j].style.display='block';
																								move(aWorkDetail[j], {opacity: 100});
																							}
																						}
																					
																					}});
																				}
																				
																				
																			});	
																			
																			Common.addEvent(aWorkItem[i], 'mouseover', function ()
																			{
																				oWorkListTips.style.display='block';
																				oWorkListTips.style.left=aWorkItem[index].offsetLeft+aWorkItem[index].offsetWidth/2+'px';
																				oWorkListTips.style.top=aWorkItem[index].offsetTop-oWorkListTips.offsetHeight-10+'px';
																			});
																			
																			Common.addEvent(aWorkItem[i], 'mouseout', function ()
																			{
																				oWorkListTips.style.display='none';
																			
																			});
																			
																		})(i);
		move_hero_remove:	function ()
		{
			var objects=new Objects();	
			if(objects.oHero)
			{
				clearInterval(objects.oHero.move_timer);
			}
			Common.removeEvent(document, 'keydown', hero_fns.move_hero_add.prototype.keydown);
			Common.removeEvent(document, 'keyup', hero_fns.move_hero_add.prototype.keyup);
		},
			Common.loadImg(aUrlGame[i], function ()
			{
				//加载结束时间
				loadImgEnd=(new Date()).getTime();
				if((loadImgEnd-loadImgStart)>400000)
				{
					if(!loadImgFailed)
					{
						loadImgFailed=true;
					
						alert('游戏加载失败,请检查您的网络状况');
						Common.startMove(objects.oProgress, {opacity: 0}, {end: function ()
						{
							objects.oProgress.style.display='none';
						
							//退出游戏
							plane_gameover_clearAll(0, games_act_fns.gamesLi_turn_smaller);
								
						}});
					}
					
					return;
				}
				else
				{
					count++;
							
					objects.oProgressSpan.style.width=(count/aUrlGame.length)*objects.oProgress.offsetWidth+'px';
					objects.oProgressTxt.innerHTML='已加载'+((count/aUrlGame.length)*100).toFixed(0)+'%';
					
					if(count==aUrlGame.length)
					{
						objects.aCloseGame[0].display='block';
						Common.startMove(objects.aCloseGame[0], {opacity: 100});
						
						Common.startMove(objects.oProgress, {opacity: 0}, {end: function ()
						{
							objects.oProgress.style.display='none';
							
							//图片载入完成后
							plane_init(function ()
							{
								gift_fns.create_gift();
								hero_fns.hero_fire();
								enemy_fns.enemy_act();
							});
						}});
						
						
					}
				}
				
				
				
			});
	var plane_gameover_clearAll=function (index, end)
	{
		var objects=new Objects();
							
		objects.oLoading.style.display='none';
		objects.oHero.style.display='none';
		objects.oBombIcon.style.display='none';
		objects.oBombNum.style.display='none';
		objects.oPlayBox.style.display='none';
		objects.oPause.style.display='none';
		objects.oScore.style.display='none';
		
		window.loadImgFailed=false;
		
		objects.oHero.style.background='';
		
		objects.aAskIfGameover[window.nowGameIndex].style.opacity=0;
		objects.aAskIfGameover[window.nowGameIndex].style.filter='alpha(opacity: 0)';
		
		//删除绑定事件
		Common.removeEvent(objects.oPause, 'click', pause_fns.pause);
		Common.removeEvent(document, 'keydown', pause_fns.document_keydown_pause_act);
		Common.addEvent(objects.oBombIcon, 'click', bomb_fns.bomb_click);
		
		objects.oScore.score=0;
		objects.oScore.innerHTML=0;
		
		objects.oHero.blowup_i=0;
		
		hero_fns.hero_fire_remove();
		hero_fns.move_hero_remove();
		
		fly_fns.all_fly_remove();
		
		pause_fns.pause_click_remove();
	
		gift_fns.remove_create_gift();
		gift_fns.remove_gift_move();
		gift_fns.remove_all_gifts();
		gift_fns.remove_hero_changeBulletTimeout();
		
		bullet_fns.remove_all_bullets();
		
		blowup_fns.all_blowup_remove();
		
		enemy_fns.all_enemy_move_remove();
		enemy_fns.remove_enemy_act();
		enemy_fns.remove_all_enemy();
		
		bomb_fns.remove_bomb_click();
				
		//clearAll处理结束
		end&&end(index);
	};
							Common.startMove(oAskIfQuit, {opacity: 0}, {end: function ()
							{
								objects.aCloseGame[index].style.display='block';
								Common.startMove(objects.aCloseGame[index], {opacity: 100});
								
								oAskIfQuit.style.display='none';
								
								(!objects.oPause.clickPause)&&(pause_fns.pause_off());
								
								Common.removeEvent(back_to_game, 'click', after_backToGame_click);
							}});
				(function (index)
				{
					Common.addEvent(aA[i], 'mouseover', function ()
					{
						aA[index].className='active';
					});
					Common.addEvent(aA[i], 'mouseout', function ()
					{
						aA[index].className='';
					});
				})(i);				
			enemy.move_timer=setInterval(function ()
			{
				var aBullet=bullet_fns.get_all_bullet();
				for(var i=0; i<aBullet.length; i++)
				{
					if(Common.collTest(aBullet[i], enemy)&&enemy.life)
					{
						(aBullet[i].parentNode)&&(aBullet[i].parentNode.removeChild(aBullet[i]));
						
						aBullet[i].bulletType_liu==0?(enemy.life--):(enemy.life-=2);
							
					}
				}
				
				if(Common.collTest(enemy, objects.oHero))//&&!enemy.collisioned)
				{
					//enemy.collisioned=true;
					enemy.life-=2;
					objects.oHero.life-=2;
				
				}
				
				if(enemy.life<=0)
				{	
					enemy.life=0;
					enemy.blowup=true;
					blowup_fns.blowup_one({obj: enemy, className: enemy.className});
					clearInterval(enemy.move_timer);
				}
				else
				{
					if(enemy.offsetTop>=enemy.parentNode.offsetHeight)
					{
						clearInterval(enemy.move_timer);
						(enemy.parentNode)&&(enemy.parentNode.removeChild(enemy));
					}
					else
					{
						enemy.style.top=enemy.offsetTop+speed+'px';
					}
				}
				
				if(objects.oHero.life<=0)
				{
					clearInterval(enemy.move_timer);
					
					blowup_fns.blowup_one({obj: objects.oHero, className: objects.oHero.className, end: function ()
					{
						hero_fns.after_hero_destroied();
					}});
				}
				
			}, 30);
			after_gameBg_appear:	function (index)
			{
				var objects=new Objects();
				
				objects.aCloseGame[index].style.display='block';
				Common.startMove(objects.aCloseGame[index], {opacity: 100});
				
				Common.startMove(objects.aTitle[index], {opacity: 0}, {end: function ()
				{
					objects.aTitle[index].style.display='none';	
				}});
				
				games_act_fns.begin_one_game(index);
			},
				(function (index)
				{
					Common.addEvent(objects.aCloseGame[i], 'click', function ()
					{	
						games_act_fns.aCloseGame_onclick(index);
					});
				})(i);
							function clockHide ()
							{
								if(document.documentElement.clientWidth-180-900<=oClock.offsetWidth)
								{
									Common.startMove(oClock, {right: -oClock.offsetWidth});
								}
							}
		all_bullet_move_agian: function ()
		{
			var objects=new Objects();
		
			var aBullet1=Common.getByClass(objects.oPlayBox, 'bullet1');
			var aBullet2=Common.getByClass(objects.oPlayBox, 'bullet2');
			
			for(var i=0; i<aBullet1.length; i++)
			{
				bullet_fns.move_bullet_liu(aBullet1[i]);
			}
			for(var i=0; i<aBullet2.length; i++)
			{
				bullet_fns.move_bullet_liu(aBullet2[i]);
			}
		},
				(function (index)
				{
					Common.addEvent(objects.aGames[i], 'mouseover', function ()
					{
						games_act_fns.gamesLi_mouseover(index);
					});
					
					Common.addEvent(objects.aGames[i], 'mouseout', function () 
					{
						games_act_fns.gamesLi_mouseout(index);
					});
					
					Common.addEvent(objects.aGames[i], 'click',function (ev) 
					{
						games_act_fns.gamesLi_onclick(ev, index);
					});
				})(i);
									(function (index)
									{
										aNav[i].className='';
										Common.startMove(aCont[i], {opacity: 0}, {time: 400, end: function ()
										{
											aCont[index].style.display='none';
										}});
									})(i);
											Common.startMove(aClose[index].parentNode, {opacity: 0}, {time: 400, end: function ()
											{
												aClose[index].parentNode.style.display='none';
												
												oWorks.style.display='block';
												
												Common.startMove(oWorks, {opacity: 100});
											}});
		all_bullets_pause:	function ()
		{
			var objects=new Objects();
		
			var aBullet1=Common.getByClass(objects.oPlayBox, 'bullet1');
			var aBullet2=Common.getByClass(objects.oPlayBox, 'bullet2');
			
			for(var i=0; i<aBullet1.length; i++)
			{
				clearInterval(aBullet1[i].move_timer);	//子弹静止
			}
			for(var i=0; i<aBullet2.length; i++)
			{
				clearInterval(aBullet2[i].move_timer);
			}
			
		},
			function randCreateEnemy ()
			{
				var randIndex=Common.rand_one(0, aEnemy.length-1);
				
				var oEnemy=enemy_fns.createEnemy(aEnemy[randIndex]);
				enemy_fns.moveEnemy(oEnemy);
	
			}
		remove_all_bullets:	function ()
		{
			var objects=new Objects();
			
			var aBullet1=Common.getByClass(objects.oPlayBox, 'bullet1');
			var aBullet2=Common.getByClass(objects.oPlayBox, 'bullet2');
			
			while(aBullet1.length)
			{
				(aBullet1[0].parentNode)&&(aBullet1[0].parentNode.removeChild(aBullet1[0]));
			}
			
			while(aBullet2.length)
			{
				(aBullet2[0].parentNode)&&(aBullet2[0].parentNode.removeChild(aBullet2[0]));
			}
		},
							Common.startMove(oAskIfQuit, {opacity: 0}, {end: function ()
							{
								oAskIfQuit.style.display='none';
								
								//退出游戏
								plane_gameover_clearAll(index, games_act_fns.gamesLi_turn_smaller);
								
								Common.removeEvent(quit_game, 'click', after_quitGame_click);
							}});
				Common.startMove(objects.oGameDire, {opacity: 0}, {time: 100, end: function ()
				{
					objects.oGameDire.style.display='none';
					
					Common.startMove(objects.aGames[index], {width: objects.aGames[index].oldWidth, height: objects.aGames[index].oldHeight, left: objects.aGames[index].oldLeft, marginTop: 0}, {end: function ()
					{	
						games_act_fns.after_gamesLi_turn_smaller(index);
					}});
				}});
									Common.addEvent(aCont[i], 'mouseover', function (ev)
									{
										var oEvent=ev||event;
										var from=oEvent.fromElement||oEvent.relatedTarget;
										
										if(Common.isChild(aCont[index], from))
											return;
										
										clearInterval(timer);
									});
		games_act:	function ()
		{
			var objects=new Objects();
				
			objects.oUl.style.marginTop=-objects.oUl.offsetHeight/2+'px';
			objects.oUl.style.height=0;
			
			//转换布局
			Common.changeStyle2Absolute(objects.aGames);
			
			//记录每个游戏要放大的大小和位置
			for(var i=0; i<objects.aGames.length; i++)
			{
				objects.aGames[i].bigWidth=480;//可能会变
				objects.aGames[i].bigHeight=document.documentElement.clientHeight-20;
				objects.aGames[i].oldLeft=objects.aGames[i].offsetLeft;
				objects.aGames[i].oldWidth=objects.aGames[i].offsetWidth;
				objects.aGames[i].oldHeight=objects.aGames[i].offsetHeight;
				
			}
			
			
			for(var i=0; i<objects.aGames.length; i++)
			{
				(function (index)
				{
					Common.addEvent(objects.aGames[i], 'mouseover', function ()
					{
						games_act_fns.gamesLi_mouseover(index);
					});
					
					Common.addEvent(objects.aGames[i], 'mouseout', function () 
					{
						games_act_fns.gamesLi_mouseout(index);
					});
					
					Common.addEvent(objects.aGames[i], 'click',function (ev) 
					{
						games_act_fns.gamesLi_onclick(ev, index);
					});
				})(i);
			}
			
			
			for(var i=0; i<objects.aCloseGame.length; i++)
			{
				(function (index)
				{
					Common.addEvent(objects.aCloseGame[i], 'click', function ()
					{	
						games_act_fns.aCloseGame_onclick(index);
					});
				})(i);
			}
		},
			Common.addEvent(quit_game, 'click', function ()
			{
				Common.startMove(oAsk, {opacity: 0}, {end: function ()
				{
					//游戏结束
					oAsk.style.display='none';
					
					plane_gameover_clearAll(window.nowGameIndex, games_act_fns.gamesLi_turn_smaller);
					
				}});
			});
				Common.startMove(objects.oGameBg, {opacity: 0}, {end: function ()
				{
					objects.oGameBg.style.display='none';
					objects.aGames[index].style.zIndex=0;
					
					objects.aTitle[index].style.display='block';
					Common.startMove(objects.aTitle[index], {opacity: 100});
					
					objects.oShowWindow.style.overflow='hidden';
					objects.aStartGame[index].style.display='block';
				}});
									Common.addEvent(aNav[i], 'mouseout', function (ev)
									{
										var oEvent=ev||event;
										var to=oEvent.toElement||oEvent.relatedTarget;
										
										if(Common.isChild(aNav[index], to))
											return;
											
											
										clearInterval(timer);
										timer=setInterval(autoShow, 3000);
									});
			after_gamesLi_turn_bigger: function (index)
			{
				
				var objects=new Objects();
				
				//添加背景层
				objects.oGameBg.style.display='block';
				objects.aGames[index].style.zIndex=1;//window.zIndex+1;
				
				Common.startMove(objects.oGameBg, {opacity: 90}, { end: function ()
				{
					games_act_fns.after_gameBg_appear(index);
				}});	
				
				objects.oGameDire.style.display='block';
				objects.oGameDire.style.zIndex=objects.aGames[index].style.zIndex;
				objects.oGameDire.style.left=objects.aGames[0].offsetLeft-objects.oGameDire.offsetWidth+'px';
				objects.oGameDire.style.top=objects.oPlayBox.offsetTop+'px';
				
				Common.startMove(objects.oGameDire, {opacity: 100});
			},
				Common.startMove(oAsk, {opacity: 0}, {end: function ()
				{
					objects.aAskIfGameover[window.nowGameIndex].askingIfGameOver=false;
					
					oAsk.style.display='none';
					
					//objects.oHero.style.background='';
					
					plane_gameover_clearAll(window.nowGameIndex, plane_game_start);
					
					objects.aCloseGame[0].style.display='block';
					Common.startMove(objects.aCloseGame[0], {opacity: 100});
					
				}});
			after_gamesLi_turn_smaller: function (index) 
			{
				var objects=new Objects();
				
				Common.startMove(objects.oGameBg, {opacity: 0}, {end: function ()
				{
					objects.oGameBg.style.display='none';
					objects.aGames[index].style.zIndex=0;
					
					objects.aTitle[index].style.display='block';
					Common.startMove(objects.aTitle[index], {opacity: 100});
					
					objects.oShowWindow.style.overflow='hidden';
					objects.aStartGame[index].style.display='block';
				}});
			},