package birthnumerology.findyourfate.com;

import java.text.SimpleDateFormat;

import java.util.Calendar;
import java.util.Locale;

import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.google.android.gms.ads.InterstitialAd;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.text.Html;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TextView;

@SuppressLint("NewApi")

public class dateofbirth extends Activity{
	 EditText dat;
	 TextView btn;
	DatePicker  pickerDate;
	TextView info;
	 int d,m,y;
	 int sum;
	 int num=0;
	

	 
	@SuppressLint("NewApi")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.enterdob);
		
		 
	      
	      
	   dat=(EditText)findViewById(R.id.dateofbirth);
	    btn = (TextView)findViewById(R.id.next);
	    final Calendar myCalendar = Calendar.getInstance();
          final DatePickerDialog.OnDateSetListener date = new DatePickerDialog.OnDateSetListener() {

        	  
	       @Override
	       public void onDateSet(DatePicker view, int year, int monthOfYear,
	                    int dayOfMonth) {
	           // TODO Auto-generated method stub
	           myCalendar.set(Calendar.YEAR, year);
	           myCalendar.set(Calendar.MONTH, monthOfYear);
	           myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);
	            y=myCalendar.get(Calendar.YEAR);
	            m= myCalendar.get(Calendar.MONTH) + 1 ;
	        	d=  myCalendar.get(Calendar.DAY_OF_MONTH);
	                updateLabel();
      }
	             private void updateLabel() {

		            String myFormat = "dd/MM/yyyy"; //In which you need put here
		            SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
		            	dat.setText(sdf.format(myCalendar.getTime()));
		            	run(); 
		            }
		       	 };
		      dat.setOnClickListener(new OnClickListener() {
	        	 @Override
	             public void onClick(View v) {
	                 // TODO Auto-generated method stub
	                    new DatePickerDialog(dateofbirth.this, date, myCalendar
	                   .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),
	                    myCalendar.get(Calendar.DAY_OF_MONTH)).show();
	              
	                 }
	            });
      	}
	    public void run()
	    {
	     	int k=0;
			int num=0;
			 
			int num1=0;
			
			
	    while(d!=0)
			{
				k=d%10;
				num=num+k;
				d=(d/10);
			}
			if(num>=10)
			{
				 num1 = num;
				 int s=0;
				while(num1!=0)
				{
					k=num1%10;
					s=s+k;
					num1=num1/10;
				}
				num=s;
	    	   	 	 //Toast.makeText(dateofbirth.this, "date:"+d+"/"+m+"/"+y+num, Toast.LENGTH_LONG).show();
				}
	    	 	
	 		if(m==1)
			{
				if(d>=20)
				{
					if(num==1)
					{
						Intent intent=new Intent(dateofbirth.this,curlaq1.class);
						startActivity(intent);
					}
					else if(num==2)
					{
						Intent intent=new Intent(dateofbirth.this,curlaq2.class);
						startActivity(intent);
					}
					else if(num==3)
					{
						Intent intent=new Intent(dateofbirth.this,curlaq3.class);
						startActivity(intent);
					}
				    else if(num==4)	
				    {
				    	Intent intent=new Intent(dateofbirth.this,curlaq4.class);
						startActivity(intent);
				    }
				    else if(num==5)
				    {
				    	Intent intent=new Intent(dateofbirth.this,curlaq5.class);
						startActivity(intent);
				    }
					else if(num==6)	
					{
						Intent intent=new Intent(dateofbirth.this,curlaq6.class);
						startActivity(intent);
					}
					else if(num==7)
					{
						Intent intent=new Intent(dateofbirth.this,curlaq7.class);
						startActivity(intent);
					}
					else if(num==8)
					{
						Intent intent=new Intent(dateofbirth.this,curlaq8.class);
						startActivity(intent);
					}
					else if(num==9)	
					{
						Intent intent=new Intent(dateofbirth.this,curlaq9.class);
						startActivity(intent);
					}
				}
			}
			if(m==2)
			{
				    if(d <=18)
				    {
				    	if(num==1)
						{
							Intent intent=new Intent(dateofbirth.this,curlaq1.class);
							startActivity(intent);
						}
						else if(num==2)
						{
							Intent intent=new Intent(dateofbirth.this,curlaq2.class);
							startActivity(intent);
						}
						else if(num==3)
						{
							Intent intent=new Intent(dateofbirth.this,curlaq3.class);
							startActivity(intent);
						}
					    else if(num==4)	
					    {
					    	Intent intent=new Intent(dateofbirth.this,curlaq4.class);
							startActivity(intent);
					    }
					    else if(num==5)
					    {
					    	Intent intent=new Intent(dateofbirth.this,curlaq5.class);
							startActivity(intent);
					    }
						else if(num==6)	
						{
							Intent intent=new Intent(dateofbirth.this,curlaq6.class);
							startActivity(intent);
						}
						else if(num==7)
						{
							Intent intent=new Intent(dateofbirth.this,curlaq7.class);
							startActivity(intent);
						}
						else if(num==8)
						{
							Intent intent=new Intent(dateofbirth.this,curlaq8.class);
							startActivity(intent);
						}
						else if(num==9)	
						{
							Intent intent=new Intent(dateofbirth.this,curlaq9.class);
							startActivity(intent);
						}
				    }
			}
			if(m==3)
			{
				    if(d>=21)
				    {
				     	if(num==1)
				     	{
				     		Intent intent=new Intent(dateofbirth.this,CurlAries1.class);
							startActivity(intent);
				     	}
				    		
						else if(num==2)	
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries2.class);
							startActivity(intent);
						}
					    else if(num==3)
					    {
					    	Intent intent=new Intent(dateofbirth.this,CurlAries3.class);
							startActivity(intent);
					    }
						else if(num==4)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries4.class);
							startActivity(intent);
						}
				        else if(num==5)	
				    	{
				        	Intent intent=new Intent(dateofbirth.this,CurlAries5.class);
							startActivity(intent);
				    	}
						else if(num==6)
				    	{
							Intent intent=new Intent(dateofbirth.this,CurlAries6.class);
							startActivity(intent);
				    	}
						else if(num==7)	
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries7.class);
							startActivity(intent);
				    	}
					   else if(num==8)
					   {
							Intent intent=new Intent(dateofbirth.this,CurlAries8.class);
							startActivity(intent);
				    	}
					
						else if(num==9)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries9.class);
							startActivity(intent);
					    }
						
				    }
			 }
			if(m==4)
				{
				    if(d<=19)
				    {
				    	if(num==1)
				    	{
				    		Intent intent=new Intent(dateofbirth.this,CurlAries1.class);
							startActivity(intent);
						}
				    	else if(num==2)
						{
				    		Intent intent=new Intent(dateofbirth.this,CurlAries2.class);
				    		startActivity(intent);
						}
					    else if(num==3)  	
					    {
					    	Intent intent=new Intent(dateofbirth.this,CurlAries3.class);
							startActivity(intent);
					    }
						else if(num==4)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries4.class);
							startActivity(intent);
						}
				        else if(num==5)
				        {
				        	Intent intent=new Intent(dateofbirth.this,CurlAries5.class);
							startActivity(intent);
				        }
						else if(num==6)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries6.class);
							startActivity(intent);
						}
						else if(num==7)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries7.class);
							startActivity(intent);
				    	}
						else if(num==8)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries8.class);
							startActivity(intent);
				    	}
						else if(num==9)
						{
							Intent intent=new Intent(dateofbirth.this,CurlAries9.class);
							startActivity(intent);
				    	}
				    }
				}
			 if(m==6)
			 {
				 if(d>=22)
					  {	
						if(num==1)	
						{
							Intent intent=new Intent(dateofbirth.this,Curlcancer1.class);
							startActivity(intent);
						}
							else if(num==2)	
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer2.class);
								startActivity(intent);
							}
								
						    else if(num==3)	
						    {
						    	Intent intent=new Intent(dateofbirth.this,Curlcancer3.class);
								startActivity(intent);
						    }
					    		
							else if(num==4)
							{
								Intent intent=new Intent(dateofbirth.this,CurlCancer4.class);
								startActivity(intent);
							}
					    		
					        else if(num==5)
					        {
					        	Intent intent=new Intent(dateofbirth.this,Curlcancer5.class);
								startActivity(intent);
					        }
					    		
							else if(num==6)
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer6.class);
								startActivity(intent);
							}
					    		
							else if(num==7)
							{
								Intent intent=new Intent(dateofbirth.this,CurlCancer7.class);
								startActivity(intent);
							}
					    		
							else if(num==8)
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer8.class);
								startActivity(intent);
							}
					    		
							else if(num==9)
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer9.class);
								startActivity(intent);
							}
					    		
					  }
			 }
			 if(m==7)
			 {
			  if(d<=22)
			  {
				    if(num==1)
					{
					 Intent intent=new Intent(dateofbirth.this,Curlcancer1.class);
					 startActivity(intent);
					}
							else if(num == 2)
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer2.class);
								startActivity(intent);
							}
					       else if(num==3)
					      	{
					    	  Intent intent=new Intent(dateofbirth.this,Curlcancer3.class);
								startActivity(intent);
					      	}
							else if(num == 4)
							{
								Intent intent=new Intent(dateofbirth.this,CurlCancer4.class);
								startActivity(intent);
							}
					        else if(num==5)	
					        {
					        	Intent intent=new Intent(dateofbirth.this,Curlcancer5.class);
								startActivity(intent);
					        }
							else if(num==6)
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer6.class);
								startActivity(intent);
							}
							else if(num==7)
							{
								Intent intent=new Intent(dateofbirth.this,CurlCancer7.class);
								startActivity(intent);
							}
							else if(num==8)	
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer8.class);
								startActivity(intent);
							}
							else if(num==9)	
							{
								Intent intent=new Intent(dateofbirth.this,Curlcancer9.class);
								startActivity(intent);
							}
			  		}
			 	}
			 if(m==12)
			 {
				    if (d>=22)
				    {
						if(num ==1)
						{
							Intent intent=new Intent(dateofbirth.this,curlcap1.class);
							startActivity(intent);
						 }
							else if(num==2)
							{
								Intent intent=new Intent(dateofbirth.this,curlcap2.class);
								startActivity(intent);
							}
						    else if(num==3)	
						    {
						    	Intent intent=new Intent(dateofbirth.this,curlcap3.class);
								startActivity(intent);
						    }
							else if(num==4)	
							{
								Intent intent=new Intent(dateofbirth.this,curlcap4.class);
								startActivity(intent);
							}
					    	
					        else if(num==5)
					        {
					        	Intent intent=new Intent(dateofbirth.this,curlcap5.class);
								startActivity(intent);
					        }
							else if(num==6)	
							{
								Intent intent=new Intent(dateofbirth.this,curlcap6.class);
								startActivity(intent);
							}
							else if(num==7 )
							{
								Intent intent=new Intent(dateofbirth.this,curlcap7.class);
								startActivity(intent);
							}
							else if(num==8)	
							{
								Intent intent=new Intent(dateofbirth.this,curlcap8.class);
								startActivity(intent);
							}
							else if(num==9)
							{
								Intent intent=new Intent(dateofbirth.this,curlcap9.class);
								startActivity(intent);
							}
				    }
			 }
			 if(m==1)
			 {
					    if(d<=19)
					    {
					    	if(num ==1)
							{
								Intent intent=new Intent(dateofbirth.this,curlcap1.class);
								startActivity(intent);
							 }
								else if(num==2)
								{
									Intent intent=new Intent(dateofbirth.this,curlcap2.class);
									startActivity(intent);
								}
							    else if(num==3)	
							    {
							    	Intent intent=new Intent(dateofbirth.this,curlcap3.class);
									startActivity(intent);
							    }
								else if(num==4)	
								{
									Intent intent=new Intent(dateofbirth.this,curlcap4.class);
									startActivity(intent);
								}
						    	
						        else if(num==5)
						        {
						        	Intent intent=new Intent(dateofbirth.this,curlcap5.class);
									startActivity(intent);
						        }
								else if(num==6)	
								{
									Intent intent=new Intent(dateofbirth.this,curlcap6.class);
									startActivity(intent);
								}
								else if(num==7 )
								{
									Intent intent=new Intent(dateofbirth.this,curlcap7.class);
									startActivity(intent);
								}
								else if(num==8)	
								{
									Intent intent=new Intent(dateofbirth.this,curlcap8.class);
									startActivity(intent);
								}
								else if(num==9)
								{
									Intent intent=new Intent(dateofbirth.this,curlcap9.class);
									startActivity(intent);
								}
			}
		}
			
			 
			 if(m==5)
			 {
					    if(d>=21)
					    {
					    	if(num == 1 )
					    	{
								Intent intent=new Intent(dateofbirth.this,Curlgemin1.class);
								startActivity(intent);
					    	}
							else if(num == 2)	
							{
								Intent intent=new Intent(dateofbirth.this,Curlgemin2.class);
								startActivity(intent);
							}
						    else if(num == 3)
						    {
						    	Intent intent=new Intent(dateofbirth.this,Curlgemin3.class);
								startActivity(intent);
						    }
							else if(num == 4)
							{
								Intent intent=new Intent(dateofbirth.this,Curlgemin4.class);
								startActivity(intent);
							}
					        else if(num == 5)
					        {
					        	Intent intent=new Intent(dateofbirth.this,Curlgemin5.class);
								startActivity(intent);
					        }
							else if(num == 6)
							{
								Intent intent=new Intent(dateofbirth.this,Curlgemin6.class);
								startActivity(intent);
							}
					    		
							else if(num == 7)	
							{
								Intent intent=new Intent(dateofbirth.this,Curlgemin7.class);
								startActivity(intent);
							}
					    		
							else if(num == 8)
							{
								Intent intent=new Intent(dateofbirth.this,Curlgemin8.class);
								startActivity(intent);
							}
					    		
							else if(num==9)
							{
								Intent intent=new Intent(dateofbirth.this,Curlgemin9.class);
								startActivity(intent);
							}
					    			 
					    }
			 }
			 if(m==6)
			 {
				if(d <=21)
				{
					if(num == 1 )
			    	{
						Intent intent=new Intent(dateofbirth.this,Curlgemin1.class);
						startActivity(intent);
			    	}
					else if(num == 2)	
					{
						Intent intent=new Intent(dateofbirth.this,Curlgemin2.class);
						startActivity(intent);
					}
				    else if(num == 3)
				    {
				    	Intent intent=new Intent(dateofbirth.this,Curlgemin3.class);
						startActivity(intent);
				    }
					else if(num == 4 )
					{
						Intent intent=new Intent(dateofbirth.this,Curlgemin4.class);
						startActivity(intent);
					}
				    else if(num == 5)
				    {
				    	Intent intent=new Intent(dateofbirth.this,Curlgemin5.class);
						startActivity(intent);
				    }
					else if(num == 6)	
					{
						Intent intent=new Intent(dateofbirth.this,Curlgemin6.class);
						startActivity(intent);
					}
					else if(num == 7)	
					{
						Intent intent=new Intent(dateofbirth.this,Curlgemin7.class);
						startActivity(intent);
					}
			       else if(num == 8)
			       {
			    	   Intent intent=new Intent(dateofbirth.this,Curlgemin8.class);
					   startActivity(intent);
			       }
					else if(num == 9)
					{
						Intent intent=new Intent(dateofbirth.this,Curlgemin9.class);
						startActivity(intent);
					}
					   
					}
			 	}
			 if(m==7)
				 {
				    if(d >=23 )
				    {
				    	if(num == 1)
				    	{
							Intent intent=new Intent(dateofbirth.this,Curleo1.class);
							startActivity(intent);	
						}
						else if(num == 2)
						{
							 Intent intent=new Intent(dateofbirth.this,Curleo2.class);
							startActivity(intent);	
						}
				       else if(num == 3)
				       {
				    	   Intent intent=new Intent(dateofbirth.this,curleo3.class);
							startActivity(intent);	
				       }
				       else if(num == 4)	
				       {
				    	 Intent intent=new Intent(dateofbirth.this,Curleo4.class);
						startActivity(intent);	
				       }
				        else if(num == 5)
				        { 
				         Intent intent=new Intent(dateofbirth.this,Curleo5.class);
						 startActivity(intent);	
				        }
				        else if(num == 6)		  		
				        {
				  		 Intent intent=new Intent(dateofbirth.this,Curleo6.class);
						startActivity(intent);	
				        }
				        else if(num ==7)
				        {
				   		Intent intent=new Intent(dateofbirth.this,Curleo7.class);
						startActivity(intent);	
				        }
				        else if(num == 8)	
				        {
				    	Intent intent=new Intent(dateofbirth.this,Curleo8.class);
						startActivity(intent);	
				        }
				        else if(num == 9)
				        {	
				    	Intent intent=new Intent(dateofbirth.this,Curleo1.class);
						startActivity(intent);	
				        }
				 }
			}
			 if(m==8)
				 {
				  if(d <=22)
				  {
					  if(num == 1)
				    	{
							Intent intent=new Intent(dateofbirth.this,Curleo1.class);
							startActivity(intent);	
						}
						else if(num == 2)
						{
							 Intent intent=new Intent(dateofbirth.this,Curleo2.class);
							startActivity(intent);	
						}
				       else if(num == 3)
				       {
				    	   Intent intent=new Intent(dateofbirth.this,curleo3.class);
							startActivity(intent);	
				       }
				       else if(num == 4)	
				       {
				    	 Intent intent=new Intent(dateofbirth.this,Curleo4.class);
						startActivity(intent);	
				       }
				        else if(num == 5)
				        { 
				         Intent intent=new Intent(dateofbirth.this,Curleo5.class);
						 startActivity(intent);	
				        }
				        else if(num == 6)		  		
				        {
				  		 Intent intent=new Intent(dateofbirth.this,Curleo6.class);
						startActivity(intent);	
				        }
				        else if(num ==7)
				        {
				   		Intent intent=new Intent(dateofbirth.this,Curleo7.class);
						startActivity(intent);	
				        }
				        else if(num == 8)	
				        {
				    	Intent intent=new Intent(dateofbirth.this,Curleo8.class);
						startActivity(intent);	
				        }
				        else if(num == 9)
				        {	
				    	Intent intent=new Intent(dateofbirth.this,Curleo1.class);
						startActivity(intent);	
				        }
				  }
				 }
			 if(m==9)
				 {
					    if(d >=23)
					    {
							if(num == 1)	
								  if(num == 1)
							    	{
										Intent intent=new Intent(dateofbirth.this,curlibra1.class);
										startActivity(intent);	
									}
									else if(num == 2)
									{
										 Intent intent=new Intent(dateofbirth.this,curlibra2.class);
										startActivity(intent);	
									}
							       else if(num == 3)
							       {
							    	   Intent intent=new Intent(dateofbirth.this,curlibra3.class);
										startActivity(intent);	
							       }
							       else if(num == 4)	
							       {
							    	 Intent intent=new Intent(dateofbirth.this,curlibra4.class);
									startActivity(intent);	
							       }
							        else if(num == 5)
							        { 
							         Intent intent=new Intent(dateofbirth.this,curlibra5.class);
									 startActivity(intent);	
							        }
							        else if(num == 6)		  		
							        {
							  		 Intent intent=new Intent(dateofbirth.this,curlibra6.class);
									startActivity(intent);	
							        }
							        else if(num ==7)
							        {
							   		Intent intent=new Intent(dateofbirth.this,curlibra7.class);
									startActivity(intent);	
							        }
							        else if(num == 8)	
							        {
							    	Intent intent=new Intent(dateofbirth.this,curlibra8.class);
									startActivity(intent);	
							        }
							        else if(num == 9)
							        {	
							    	Intent intent=new Intent(dateofbirth.this,curlibra9.class);
									startActivity(intent);	
							        }
				 }
			}
			 if(m==10)
			 {
					    if(d <=22)
					    {
					    	  if(num == 1)
						    	{
									Intent intent=new Intent(dateofbirth.this,curlibra1.class);
									startActivity(intent);	
								}
								else if(num == 2)
								{
									 Intent intent=new Intent(dateofbirth.this,curlibra2.class);
									startActivity(intent);	
								}
						       else if(num == 3)
						       {
						    	   Intent intent=new Intent(dateofbirth.this,curlibra3.class);
									startActivity(intent);	
						       }
						       else if(num == 4)	
						       {
						    	 Intent intent=new Intent(dateofbirth.this,curlibra4.class);
								startActivity(intent);	
						       }
						        else if(num == 5)
						        { 
						         Intent intent=new Intent(dateofbirth.this,curlibra5.class);
								 startActivity(intent);	
						        }
						        else if(num == 6)		  		
						        {
						  		 Intent intent=new Intent(dateofbirth.this,curlibra6.class);
								startActivity(intent);	
						        }
						        else if(num ==7)
						        {
						   		Intent intent=new Intent(dateofbirth.this,curlibra7.class);
								startActivity(intent);	
						        }
						        else if(num == 8)	
						        {
						    	Intent intent=new Intent(dateofbirth.this,curlibra8.class);
								startActivity(intent);	
						        }
						        else if(num == 9)
						        {	
						    	Intent intent=new Intent(dateofbirth.this,curlibra9.class);
								startActivity(intent);	
						        }
					    }
			 }
			 if(m==2)
			 {
					    if(d >=19)
					    {
						
								if(num == 1)	
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces1.class);
									startActivity(intent);	
								}
								else if(num == 2)	
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces2.class);
									startActivity(intent);	
								}
							    else if(num == 3)	
							    {
							    	Intent intent=new Intent(dateofbirth.this,curlpisces3.class);
									startActivity(intent);	
							    }
								else if(num == 4)	
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces4.class);
									startActivity(intent);	
								}
						        else if(num == 5)	
						        {
						        	Intent intent=new Intent(dateofbirth.this,curlpisces5.class);
									startActivity(intent);	
						        }
								else if(num==6)	
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces6.class);
									startActivity(intent);	
								}
								else if(num == 7)
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces7.class);
									startActivity(intent);	
								}
								else if(num==8)
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces8.class);
									startActivity(intent);	
								}
								else if(num==9)
								{
									Intent intent=new Intent(dateofbirth.this,curlpisces9.class);
									startActivity(intent);	
								}		
					    }
			    }
			 if(m==3)
			 {
					    if(d <=20)
					    {

							if(num == 1)	
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces1.class);
								startActivity(intent);	
							}
							else if(num == 2)	
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces2.class);
								startActivity(intent);	
							}
						    else if(num == 3)	
						    {
						    	Intent intent=new Intent(dateofbirth.this,curlpisces3.class);
								startActivity(intent);	
						    }
							else if(num == 4)	
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces4.class);
								startActivity(intent);	
							}
					        else if(num == 5)	
					        {
					        	Intent intent=new Intent(dateofbirth.this,curlpisces5.class);
								startActivity(intent);	
					        }
							else if(num==6)	
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces6.class);
								startActivity(intent);	
							}
							else if(num == 7)
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces7.class);
								startActivity(intent);	
							}
							else if(num==8)
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces8.class);
								startActivity(intent);	
							}
							else if(num==9)
							{
								Intent intent=new Intent(dateofbirth.this,curlpisces9.class);
								startActivity(intent);	
							}					
				 }
	 }
			 if(m==11) 
			 {
				if(d>=22)
				{
					if(num==1)
			    	{
			    		Intent intent=new Intent(dateofbirth.this,curlsagg1.class);
						startActivity(intent);	
			    	}
					else if(num==2)	
					{
						Intent intent=new Intent(dateofbirth.this,curlsagg2.class);
						startActivity(intent);	
					}
				    else if(num==3)	
				    {
				    	Intent intent=new Intent(dateofbirth.this,curlsagg3.class);
						startActivity(intent);	
				    }
					else if(num == 4)	
					{
						Intent intent=new Intent(dateofbirth.this,curlsagg4.class);
						startActivity(intent);	
					}
			        else if(num == 5)
			        {
			        	Intent intent=new Intent(dateofbirth.this,curlsagg5.class);
						startActivity(intent);	
			        }
					else if(num==6)	
					{
						Intent intent=new Intent(dateofbirth.this,curlsagg6.class);
						startActivity(intent);	
					}
					else if(num==7)
					{
						Intent intent=new Intent(dateofbirth.this,curlsagg7.class);
						startActivity(intent);	
					}
					else if(num==8)	
					{
						Intent intent=new Intent(dateofbirth.this,curlsagg8.class);
						startActivity(intent);	
					}
					else if(num==9)
					{
						Intent intent=new Intent(dateofbirth.this,curlsagg9.class);
						startActivity(intent);	
					}
				}
			 }
			if(m==12) 
			 {
				 if(d <=21)
					 {
					    if(num==1)
					    	{
					    		Intent intent=new Intent(dateofbirth.this,curlsagg1.class);
								startActivity(intent);	
					    	}
							else if(num==2)	
							{
								Intent intent=new Intent(dateofbirth.this,curlsagg2.class);
								startActivity(intent);	
							}
						    else if(num==3)	
						    {
						    	Intent intent=new Intent(dateofbirth.this,curlsagg3.class);
								startActivity(intent);	
						    }
							else if(num == 4)	
							{
								Intent intent=new Intent(dateofbirth.this,curlsagg4.class);
								startActivity(intent);	
							}
					        else if(num == 5)
					        {
					        	Intent intent=new Intent(dateofbirth.this,curlsagg5.class);
								startActivity(intent);	
					        }
							else if(num==6)	
							{
								Intent intent=new Intent(dateofbirth.this,curlsagg6.class);
								startActivity(intent);	
							}
							else if(num==7)
							{
								Intent intent=new Intent(dateofbirth.this,curlsagg7.class);
								startActivity(intent);	
							}
							else if(num==8)	
							{
								Intent intent=new Intent(dateofbirth.this,curlsagg8.class);
								startActivity(intent);	
							}
							else if(num==9)
							{
								Intent intent=new Intent(dateofbirth.this,curlsagg9.class);
								startActivity(intent);	
							}
					    }
					  }
			 if (m==10)
			 {
				 if(d >=23)
				 {
					    	if(num == 1)
					    	{
					    		Intent intent=new Intent(dateofbirth.this,curlscor1.class);
								startActivity(intent);	
					    	}
					    	
							else if(num == 2)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor2.class);
								startActivity(intent);	
							}
					    	
						    else if(num == 3)	
						    {
						    	Intent intent=new Intent(dateofbirth.this,curlscor3.class);
								startActivity(intent);	
						    }
							else if(num == 4)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor4.class);
								startActivity(intent);	
							}
					        else if(num == 5)	
					        {
					        	Intent intent=new Intent(dateofbirth.this,curlscor5.class);
								startActivity(intent);	
					        }
							else if(num == 6)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor6.class);
								startActivity(intent);	
							}
							else if(num==7)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor7.class);
								startActivity(intent);	
							}
							else if(num==8)
					    	{
								Intent intent=new Intent(dateofbirth.this,curlscor8.class);
								startActivity(intent);	
					    	}
							else if(num == 9)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor9.class);
								startActivity(intent);	
							}
					    }
			 }
			 if(m==11)
			 {
					    if(d <=21)
					    {
					    	if(num == 1)
					    	{
					    		Intent intent=new Intent(dateofbirth.this,curlscor1.class);
								startActivity(intent);	
					    	}
					    	
							else if(num == 2)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor2.class);
								startActivity(intent);	
							}
					    	
						    else if(num == 3)	
						    {
						    	Intent intent=new Intent(dateofbirth.this,curlscor3.class);
								startActivity(intent);	
						    }
							else if(num == 4)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor4.class);
								startActivity(intent);	
							}
					        else if(num == 5)	
					        {
					        	Intent intent=new Intent(dateofbirth.this,curlscor5.class);
								startActivity(intent);	
					        }
							else if(num == 6)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor6.class);
								startActivity(intent);	
							}
							else if(num==7)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor7.class);
								startActivity(intent);	
							}
							else if(num==8)
					    	{
								Intent intent=new Intent(dateofbirth.this,curlscor8.class);
								startActivity(intent);	
					    	}
							else if(num == 9)	
							{
								Intent intent=new Intent(dateofbirth.this,curlscor9.class);
								startActivity(intent);	
							}
					    }
			 }
			 if(m==4)
			 {
					    if(d >= 20)
					    {
					    	if(num == 1)	
					    	{
				    		 	Intent intent=new Intent(dateofbirth.this,Curltaur1.class);
				    		 	startActivity(intent);
				    		}
					    	else if(num == 2 )	
					    	{
				    		 	Intent intent=new Intent(dateofbirth.this,Curltaur2.class);
				    		 	startActivity(intent);	
							}
					    	else if(num == 3)	
							{
				    		 	Intent intent=new Intent(dateofbirth.this,Curltaur3.class);
				    		 	startActivity(intent);
							}
							else if(num == 4)	
							{
				    		 	Intent intent=new Intent(dateofbirth.this,CurlTaur4.class);
				    		 	startActivity(intent);
							}
							else if(num == 5)	
					        {
				    		 	Intent intent=new Intent(dateofbirth.this,Curltaur5.class);
				    		 	startActivity(intent);
							}
							else if(num == 6)	
							{
				    		 	Intent intent=new Intent(dateofbirth.this,Curltaur6.class);
				    		 	startActivity(intent);
							}
							else if(num == 7)
							{
								Intent intent=new Intent(dateofbirth.this,Curltaur7.class);
								startActivity(intent);
							}
							else if(num == 8)	
							{
								Intent intent=new Intent(dateofbirth.this,Curltaur8.class);
								startActivity(intent);
							}
							else if(num == 9)	
					    	{
								Intent intent=new Intent(dateofbirth.this,Curltaur9.class);
								startActivity(intent);
					    	}
					    }
			 	}
			 if(m==5)
			 {
					if(d <= 20 )
					    {
					     if(num==1)
						{
						    Intent intent=new Intent(dateofbirth.this,Curltaur1.class);
						    startActivity(intent);
						}
						else if(num == 2)
						{
						   Intent intent=new Intent(dateofbirth.this,Curltaur2.class);
						    startActivity(intent);
						}
					  else if(num == 3)
						{
						    Intent intent=new Intent(dateofbirth.this,Curltaur3.class);
						    startActivity(intent);
							}
					  else if(num==4)	
						{
						    Intent intent=new Intent(dateofbirth.this,CurlTaur4.class);
						    startActivity(intent);
						 }
					 else if(num == 5)
						 {
					    	Intent intent=new Intent(dateofbirth.this,Curltaur5.class);
					    	startActivity(intent);
						 }
					else if(num == 6)	
						{
						    Intent intent=new Intent(dateofbirth.this,Curltaur6.class);
						    startActivity(intent);
						}
					else if(num == 7)
						{
							Intent intent=new Intent(dateofbirth.this,Curltaur7.class);
							startActivity(intent);
					    }
					else if(num == 8)	
					    {
							Intent intent=new Intent(dateofbirth.this,Curltaur8.class);
							startActivity(intent);
					    }
					else if(num==9)	
						{
							Intent intent=new Intent(dateofbirth.this,Curltaur9.class);
							startActivity(intent);
						}
					     
					   }
			      }
				 if(m==8)
					 {
						if(d >=23)
					    {
							  if(num==1)
								{
								    Intent intent=new Intent(dateofbirth.this,curlvirgo1.class);
								    startActivity(intent);
								}
								else if(num == 2)
								{
								   Intent intent=new Intent(dateofbirth.this,curlvirgo2.class);
								    startActivity(intent);
								}
							  else if(num == 3)
								{
								    Intent intent=new Intent(dateofbirth.this,curlvirgo3.class);
								    startActivity(intent);
								}
							  else if(num==4)	
								{
								    Intent intent=new Intent(dateofbirth.this,curlvirgo4.class);
								    startActivity(intent);
								 }
							 else if(num == 5)
								 {
							    	Intent intent=new Intent(dateofbirth.this,curlvirgo5.class);
							    	startActivity(intent);
								 }
							else if(num == 6)	
								{
								    Intent intent=new Intent(dateofbirth.this,curlvirgo6.class);
								    startActivity(intent);
								}
							else if(num == 7)
								{
									Intent intent=new Intent(dateofbirth.this,curlvirgo7.class);
									startActivity(intent);
							    }
							else if(num == 8)	
							    {
									Intent intent=new Intent(dateofbirth.this,curlvirgo8.class);
									startActivity(intent);
							    }
							else if(num==9)	
								{
									Intent intent=new Intent(dateofbirth.this,curlvirgo9.class);
									startActivity(intent);
								}
					    }
					 }
					 if(m==9)
						 {
					    if(d <=22) 
					    {
					    	if(num==1)
							{
							    Intent intent=new Intent(dateofbirth.this,curlvirgo1.class);
							    startActivity(intent);
							}
							else if(num == 2)
							{
							   Intent intent=new Intent(dateofbirth.this,curlvirgo2.class);
							    startActivity(intent);
							}
						  else if(num == 3)
							{
							    Intent intent=new Intent(dateofbirth.this,curlvirgo3.class);
							    startActivity(intent);
							}
						  else if(num==4)	
							{
							    Intent intent=new Intent(dateofbirth.this,curlvirgo4.class);
							    startActivity(intent);
							 }
						 else if(num == 5)
							 {
						    	Intent intent=new Intent(dateofbirth.this,curlvirgo5.class);
						    	startActivity(intent);
							 }
						else if(num == 6)	
							{
							    Intent intent=new Intent(dateofbirth.this,curlvirgo6.class);
							    startActivity(intent);
							}
						else if(num == 7)
							{
								Intent intent=new Intent(dateofbirth.this,curlvirgo7.class);
								startActivity(intent);
						    }
						else if(num == 8)	
						    {
								Intent intent=new Intent(dateofbirth.this,curlvirgo8.class);
								startActivity(intent);
						    }
						else if(num==9)	
							{
								Intent intent=new Intent(dateofbirth.this,curlvirgo9.class);
								startActivity(intent);
							}
					    }
			          } 
				//	 mAdview.loadAd(new AdRequest.Builder().build()); 
	    } 
	    	
	   
	  
	   
	   public void onBackPressed() {
		     //  this.finish();
			 dateofbirth.this.finish();
	    	 
		}
	 

@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
	//MenuInflater inflater = getMenuInflater();
	inflater.inflate(R.menu.main, menu); 
	 return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// toggle nav drawer on selecting action bar app icon/title
		 

		if(item.getItemId() ==android.R.id.home)
		{
        	Intent in=new Intent(dateofbirth.this,MainActivity.class);
        	in.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        	startActivity(in);
		}

		else if(item.getItemId() == R.id.share)
		 		{
				 Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
	     	     emailIntent.setType("text/plain");
	     	     emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Birthday Numerology - findyourfate.com");
	             emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,"Hi,\n I would like to suggest, this Birthday Numerology App to you. \n\n  Click this Download app \" http://goo.gl/VfJLbc \"\n\n Regards");
	     	     startActivity(emailIntent);
		 		}
	     	 	else  if (item.getItemId() == R.id.exit)
		     	{
		 	       	AlertDialog.Builder builder = new AlertDialog.Builder(this);
				    builder.setMessage("Are you sure  want to exit?")
				           .setCancelable(false)
				           .setPositiveButton("Yes", new DialogInterface.OnClickListener() {
				               public void onClick(DialogInterface dialog, int id) {
				            	   Intent intent = new Intent(Intent.ACTION_MAIN);
				   		    	intent.addCategory(Intent.CATEGORY_HOME);
				   		    	intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
				   		    	startActivity(intent);
				               }
				           })
				           .setNegativeButton("No", new DialogInterface.OnClickListener() {
				               public void onClick(DialogInterface dialog, int id) {
				                    dialog.cancel();
				               }
				           });
				    AlertDialog alert = builder.create();
				    alert.show();
		     		  }
			 else if (item.getItemId() == R.id.in)
     		  {
     			 AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(dateofbirth.this);
     			 alertDialogBuilder.setTitle("Numerology Calculator");
     			 alertDialogBuilder.setMessage("This app need to enter the birth date and the complete name of an individual to unlock all of the secrets that the numbers hold and then the future course of the individual can be derived from it.");
     			 alertDialogBuilder.setPositiveButton("Open",new DialogInterface.OnClickListener() {
     			 public void onClick(DialogInterface dialog,int id) {
     			  final String appPackageName = "numerology.findyourfate.com"; // getPackageName() from Context or Activity object
     			    try {
     			         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
     			        } catch (android.content.ActivityNotFoundException anfe) {
     			         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName)));
     			        	     }
     			        }
     			     });
     			   alertDialogBuilder.setNeutralButton("Already/Never",new DialogInterface.OnClickListener() {
     			      public void onClick(DialogInterface dialog,int id) {	  
     			         //  MainActivity.this.finish();
     			       dialog.cancel();
     			                  }
     			             });
     			          // set negative button: No message
     				alertDialogBuilder.setNegativeButton("Later",new DialogInterface.OnClickListener() {
     		        public void onClick(DialogInterface dialog,int id) {
     			                      // cancel the alert box and put a Toast to the user
     			         dialog.cancel();                    
     			                  }
     			          });
     			           AlertDialog alertDialog = alertDialogBuilder.create();
     			           // show alert
     			           alertDialog.show();			  
     			      }
     		return  true;
		}

}

