public void handleCapturedPokemon()
	{
		if(Battle.caughtPokemon!=null)
		{
			do
			{
				if(Battle.caughtPokemon.nickname==null||Battle.caughtPokemon.nickname.equals(""))
					Battle.caughtPokemon.nickname=""+Battle.caughtPokemon.species;

				Battle.caughtPokemon.nickname =(JOptionPane.showInputDialog(null, "Give "+Battle.caughtPokemon.nickname+" a Nickname? (<10 Chars)", Battle.caughtPokemon.nickname));
			}
			while(Battle.caughtPokemon.nickname==null||Battle.caughtPokemon.nickname.equals(""));

			Battle.caughtPokemon.setNickname(Battle.caughtPokemon.nickname);

			for(int i=0; i<partyPokemon.length; i++)
			{
				if(partyPokemon[i]==null)
				{
					partyPokemon[i]=Battle.caughtPokemon;
					return;
				}
			}

			for(int i=0; i<pcPokemon.length; i++)
			{
				if(pcPokemon[i]==null)
				{
					pcPokemon[i]=Battle.caughtPokemon;
					repaint();
					messageBox=new ErrorWindow();
					messageBox.addMessage(Battle.caughtPokemon.nickname+" was sent to Box "+((i/12)+1)+" in the PC!","Sent to PC!");

					messageBox.repaint();
					while(messageBox.isVisible())
					{
						try
						{
							Thread.sleep(10);
						}
						catch(Exception e){e.printStackTrace();}
					}

					return;
				}
			}

			messageBox=new ErrorWindow();
			messageBox.addMessage(Battle.caughtPokemon.nickname+" was released to the wild.","No more room!");

			messageBox.repaint();
			while(messageBox.isVisible())
			{
				try
				{
					Thread.sleep(10);
				}
				catch(Exception e){e.printStackTrace();}
			}

		}
	}