function changeRows()
				{
					var count=document.forms[0].no_ofrooms[document.forms[0].no_ofrooms.selectedIndex].value;

					if(count==1)
					{						
						document.getElementById("row1").style.display="";						
						document.getElementById("row2").style.display="none";						
						document.getElementById("row3").style.display="none";						
						document.getElementById("row4").style.display="none";
						document.getElementById("row1").style.visibility="";	
						document.getElementById("row2").style.visibility="hidden";			
						document.getElementById("row3").style.visibility="hidden";						
						document.getElementById("row4").style.visibility="hidden";					
					}
					else if(count==2)
					{						
						document.getElementById("row1").style.display="";						
						document.getElementById("row2").style.display="";	
						document.getElementById("row3").style.display="none";						
						document.getElementById("row4").style.display="none";
						document.getElementById("row1").style.visibility="";
						document.getElementById("row2").style.visibility="";
						document.getElementById("row3").style.visibility="hidden";						
						document.getElementById("row4").style.visibility="hidden";						
					}
					else if(count==3)
					{						
						document.getElementById("row1").style.display="";						
						document.getElementById("row2").style.display="";						
						document.getElementById("row3").style.display="";						
						document.getElementById("row4").style.display="none";
						document.getElementById("row1").style.visibility="";
						document.getElementById("row2").style.visibility="";
						document.getElementById("row3").style.visibility="";
						document.getElementById("row4").style.visibility="hidden";						
					}
					else if(count==4)
					{						
						document.getElementById("row1").style.display="";						
						document.getElementById("row2").style.display="";						
						document.getElementById("row3").style.display="";						
						document.getElementById("row4").style.display="";
						document.getElementById("row1").style.visibility="";
						document.getElementById("row2").style.visibility="";
						document.getElementById("row3").style.visibility="";
						document.getElementById("row4").style.visibility="";						
					}
				}	
							
				function showRoomsChildren()
				{						 
						document.getElementById("chld1").style.display="none";										 
						document.getElementById("chld2").style.display="none";						 
						document.getElementById("child11").style.display="none";						 
						document.getElementById("child12").style.display="none";						 
						document.getElementById("child21").style.display="none";						 
						document.getElementById("child22").style.display="none";						 
						document.getElementById("child31").style.display="none";						 
						document.getElementById("child32").style.display="none";						 
						document.getElementById("child41").style.display="none";						 
						document.getElementById("child42").style.display="none";						 
						
						document.getElementById("chld1").style.visibility="hidden";										 
						document.getElementById("chld2").style.visibility="hidden";						 
						document.getElementById("child11").style.visibility="hidden";						 
						document.getElementById("child12").style.visibility="hidden";						 
						document.getElementById("child21").style.visibility="hidden";						 
						document.getElementById("child22").style.visibility="hidden";						 
						document.getElementById("child31").style.visibility="hidden";						 
						document.getElementById("child32").style.visibility="hidden";						 
						document.getElementById("child41").style.visibility="hidden";						 
						document.getElementById("child42").style.visibility="hidden";
				}
				
				function showchildHeading()
				{
					var count4=document.forms[0].str_ChildrenRoom4[document.forms[0].str_ChildrenRoom4.selectedIndex].value;
					var count3=document.forms[0].str_ChildrenRoom3[document.forms[0].str_ChildrenRoom3.selectedIndex].value;
					var count2=document.forms[0].str_ChildrenRoom2[document.forms[0].str_ChildrenRoom2.selectedIndex].value;
					var count1=document.forms[0].str_ChildrenRoom1[document.forms[0].str_ChildrenRoom1.selectedIndex].value;
					if((count1==2)||(count2==2)||(count3==2)||(count4==2))
					{						 
						document.getElementById("chld1").style.display="";						 
						document.getElementById("chld2").style.display="";	
						document.getElementById("chld1").style.visibility="";						 
						document.getElementById("chld2").style.visibility="";					 
					}
					else if((count1==1)||(count2==1)||(count3==1)||(count4==1))
					{						 
						document.getElementById("chld1").style.display="";						 
						document.getElementById("chld2").style.display="none";	
						document.getElementById("chld1").style.visibility="";						 
						document.getElementById("chld2").style.visibility="hidden";	
					}
					else if((count1==0)||(count2==0)||(count3==0)||(count4==0))
					{						 
						document.getElementById("chld1").style.display="none";						 
						document.getElementById("chld2").style.display="none";	
						document.getElementById("chld1").style.visibility="hidden";						 
						document.getElementById("chld2").style.visibility="hidden";	
					}
				}		
						
				function showRoomsChildren1()
				{
					var count1=document.forms[0].str_ChildrenRoom1[document.forms[0].str_ChildrenRoom1.selectedIndex].value;
					var countadult1=document.forms[0].str_AdultsRoom1[document.forms[0].str_AdultsRoom1.selectedIndex].value;		
					showchildHeading();	
					if(count1==0)
					{			 
						document.getElementById("child11").style.display="none";						 
						document.getElementById("child12").style.display="none";						 
						document.getElementById("child11").style.visibility="hidden";						 
						document.getElementById("child12").style.visibility="hidden";
						document.forms[0].str_AgeChild1Room1.value="-1"											
						document.forms[0].str_AgeChild2Room1.value="-1"
					}
					else if(count1==1)
					{ 
						document.getElementById("child11").style.display="";						 
						document.getElementById("child12").style.display="none";
						document.getElementById("child11").style.visibility="";						 
						document.getElementById("child12").style.visibility="hidden";
						document.forms[0].str_AgeChild2Room1.value="-1"					 
					}
					else if(count1==2)
					{					 
						document.getElementById("child11").style.display="";						 
						document.getElementById("child12").style.display="";
						document.getElementById("child11").style.visibility="";						 
						document.getElementById("child12").style.visibility="";	
					}
										
				}	
							
				function showRoomsChildren2()
				{
					var count2=document.forms[0].str_ChildrenRoom2[document.forms[0].str_ChildrenRoom2.selectedIndex].value;
					showchildHeading();
				
				    if(count2==0)
					{					 
						document.getElementById("child21").style.display="none";					 
						document.getElementById("child22").style.display="none";						 
						document.getElementById("child21").style.visibility="hidden";					 
						document.getElementById("child22").style.visibility="hidden";
						document.forms[0].str_AgeChild1Room2.value="-1"											
						document.forms[0].str_AgeChild2Room2.value="-1" 
					}
					else if(count2==1)
					{			 
						document.getElementById("child21").style.display="";					 
						document.getElementById("child22").style.display="none";						 
						document.getElementById("child21").style.visibility="";					 
						document.getElementById("child22").style.visibility="hidden";
						document.forms[0].str_AgeChild2Room2.value="-1"					
					}
					else if(count2==2)
					{			 
						document.getElementById("child21").style.display="";					 
						document.getElementById("child22").style.display="";						 
						document.getElementById("child21").style.visibility="";					 
						document.getElementById("child22").style.visibility="";						
					}
										
				}
								
				function showRoomsChildren3()
				{					
					var count3=document.forms[0].str_ChildrenRoom3[document.forms[0].str_ChildrenRoom3.selectedIndex].value;
					showchildHeading();
					if(count3==0)
					{						 
						document.getElementById("child31").style.display="none";						 
						document.getElementById("child32").style.display="none";						 
						document.getElementById("child31").style.visibility="hidden";						 
						document.getElementById("child32").style.visibility="hidden"; 
						document.forms[0].str_AgeChild1Room3.value="-1"											
						document.forms[0].str_AgeChild2Room3.value="-1" 		
					}
					else if(count3==1)
					{				 
						document.getElementById("child31").style.display="";						 
						document.getElementById("child32").style.display="none";						 
						document.getElementById("child31").style.visibility="";						 
						document.getElementById("child32").style.visibility="hidden";
						document.forms[0].str_AgeChild2Room3.value="-1"		
					}
					else if(count3==2)
					{			 
						document.getElementById("child31").style.display="";						 
						document.getElementById("child32").style.display="";						 
						document.getElementById("child31").style.visibility="";						 
						document.getElementById("child32").style.visibility="";		
					}
										
				}
				
				function showRoomsChildren4()
				{			
					var count4=document.forms[0].str_ChildrenRoom4[document.forms[0].str_ChildrenRoom4.selectedIndex].value;
					showchildHeading();
					if(count4==0)
					{ 
						document.getElementById("child41").style.display="none";						 
						document.getElementById("child42").style.display="none";						 
						document.getElementById("child41").style.visibility="hidden"						 
						document.getElementById("child42").style.visibility="hidden"
						document.forms[0].str_AgeChild1Room4.value="-1"											
						document.forms[0].str_AgeChild2Room4.value="-1" 					
					}
					else if(count4==1)
					{					
						document.getElementById("child41").style.display="";						 
						document.getElementById("child42").style.display="none";						 
						document.getElementById("child41").style.visibility=""						 
						document.getElementById("child42").style.visibility="hidden" 	
						document.forms[0].str_AgeChild2Room4.value="-1" 										
					}
					else if(count4==2)
					{		 
						document.getElementById("child41").style.display="";						 
						document.getElementById("child42").style.display="";						 
						document.getElementById("child41").style.visibility=""						 
						document.getElementById("child42").style.visibility="" 						
					}
										
				}
				
				
				

				function startsearch()
				{
					var count=0;
	
					var count1=document.forms[0].str_ChildrenRoom1[document.forms[0].str_ChildrenRoom1.selectedIndex].value;
					var countadult1=document.forms[0].str_AdultsRoom1[document.forms[0].str_AdultsRoom1.selectedIndex].value;
					count=parseInt(count1)+parseInt(countadult1);
					if(parseInt(count1)>1&&parseInt(countadult1)>2)
					{
						alert("No of passengers can't be more than (2 adults and 2 children) OR (3 adults and 1 children)OR (3 adults)in single room");
						return false;
					}
					//suraj 
					//alert(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value);
					if(parseInt(count1)==1)
					{//alert(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value);
						if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
						{
							alert("Please Select age of child");
							return false;
						}
					}
					if(parseInt(count1)==2)
					{//alert(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value);
						if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
						{
							alert("Please Select age of child");
							return false;
						}
						if(document.forms[0].str_AgeChild2Room1[document.forms[0].str_AgeChild2Room1.selectedIndex].value=="-1")
						{
							alert("Please Select age of child");
							return false;
						}
					}
					//suraj
					var count2=document.forms[0].str_ChildrenRoom2[document.forms[0].str_ChildrenRoom2.selectedIndex].value;
					var countadult2=document.forms[0].str_AdultsRoom2[document.forms[0].str_AdultsRoom2.selectedIndex].value
				
					count=parseInt(count2)+parseInt(countadult2);
					if(parseInt(count2)>1&&parseInt(countadult2)>2)
					{
						alert("No of passengers can't be more than (2 adults and 2 children) OR (3 adults and 1 children)OR (3 adults)in single room");
						return false;
					}
					//suraj 
					if(parseInt(document.forms[0].no_ofrooms[document.forms[0].no_ofrooms.selectedIndex].value)==2)
					{
						if(parseInt(count)<1)
						{
							alert("Please Select atleast one passenger in the Second Row OR Decrease the No. of Rooms");
							return false;
						}
						if(parseInt(count1)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count1)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room1[document.forms[0].str_AgeChild2Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count2)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count2)==2)
						{
						if(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room2[document.forms[0].str_AgeChild2Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
					}
				
					var count3=document.forms[0].str_ChildrenRoom3[document.forms[0].str_ChildrenRoom3.selectedIndex].value;
					var countadult3=document.forms[0].str_AdultsRoom3[document.forms[0].str_AdultsRoom3.selectedIndex].value
				
					count=parseInt(count3)+parseInt(countadult3);
					if(parseInt(count3)>1&&parseInt(countadult3)>2)
					{
						alert("No of passengers can't be more than (2 adults and 2 children) OR (3 adults and 1 children)OR (3 adults)in single room");
						return false;
					}
					if(parseInt(document.forms[0].no_ofrooms[document.forms[0].no_ofrooms.selectedIndex].value)==3)
					{
						if(parseInt(count)<1)
						{
							alert("Please Select atleast one passenger in each Row OR Decrease the No. of Rooms");
							return false;
						}
						if(parseInt(count1)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count1)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room1[document.forms[0].str_AgeChild2Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count2)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count2)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room2[document.forms[0].str_AgeChild2Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count3)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room3[document.forms[0].str_AgeChild1Room3.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count3)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room3[document.forms[0].str_AgeChild1Room3.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room3[document.forms[0].str_AgeChild2Room3.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
					}
					var count4=document.forms[0].str_ChildrenRoom4[document.forms[0].str_ChildrenRoom4.selectedIndex].value;
					var countadult4=document.forms[0].str_AdultsRoom4[document.forms[0].str_AdultsRoom4.selectedIndex].value
							
					count=parseInt(count4)+parseInt(countadult4);
					if(parseInt(count4)>1&&parseInt(countadult4)>2)
					{
						alert("No of passengers can't be more than (2 adults and 2 children) OR (3 adults and 1 children)OR (3 adults)in single room");
						return false;
					}
					if(parseInt(document.forms[0].no_ofrooms[document.forms[0].no_ofrooms.selectedIndex].value)==4)
					{
						if(parseInt(count)<1)
						{
							alert("Please Select atleast one passenger in Each Row OR Decrease the No. of Rooms");
							return false;
						}
						if(parseInt(count1)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count1)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room1[document.forms[0].str_AgeChild1Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room1[document.forms[0].str_AgeChild2Room1.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count2)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count2)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room2[document.forms[0].str_AgeChild2Room2.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count3)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room3[document.forms[0].str_AgeChild1Room3.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count3)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room3[document.forms[0].str_AgeChild1Room3.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room3[document.forms[0].str_AgeChild2Room3.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count4)==1)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room4[document.forms[0].str_AgeChild1Room4.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
						if(parseInt(count4)==2)
						{//alert(document.forms[0].str_AgeChild1Room2[document.forms[0].str_AgeChild1Room2.selectedIndex].value);
							if(document.forms[0].str_AgeChild1Room4[document.forms[0].str_AgeChild1Room4.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
							if(document.forms[0].str_AgeChild2Room4[document.forms[0].str_AgeChild2Room4.selectedIndex].value=="-1")
							{
								alert("Please Select age of child");
								return false;
							}
						}
					}
					var d=document.forms[0].check_Inhotel.value;
					var r=document.forms[0].check_Outhotel.value;
					var serverDate=document.forms[0].currentdate.value;
					var serdat;
					var city =  document.forms[0].strcity.value;
					if( city == "" )
					{
						alert("Please select city");
						document.forms[0].strcity.focus();
						return false;
					}
					
					if(city=="line")
					{
						alert("Select valid city location");
						document.forms[0].strcity.focus();
						return false;
					}
					 var arr= new Array(12); 
					 arr[0]="Jan";
					 arr[1]="Feb";
					 arr[2]="Mar";
					 arr[3]="Apr";
					 arr[4]="May";
					 arr[5]="Jun";
					 arr[6]="Jul";
					 arr[7]="Aug";
					 arr[8]="Sep";
					 arr[9]="Oct";
					 arr[10]="Nov";
					 arr[11]="Dec";
					
					
					 arrdepart=d.split("-");
					 mm=arrdepart[1];
					 dd = arrdepart[0];
					 yy=arrdepart[2];
					 arrreturn=r.split("-");
					 mm1=arrreturn[1];
			
					 dd1= arrreturn[0];
					 yy1=arrreturn[2];
					 dd = parseFloat(dd);
					 dd1= parseFloat(dd1);
					
					 document.forms[0].depart1.value=d;
					 document.forms[0].return1.value=r;


					 serdat=serverDate.split("-");
					 mm2=serdat[1];
					 dd2=serdat[0];
					 yy2=serdat[2];
					
					 var h=serdat[3];
    				 var m=serdat[4];
	    			 var s=serdat[5];
					
  		 		    for (var iCharCounter1=0;iCharCounter1<12;iCharCounter1++)
  		 		    {
  		 				  var charVal = arr[iCharCounter1];
  		 				
  		 				  if (charVal==mm)
  		 				 {
  		 				     mm=iCharCounter1+1;
  		 				 }
  		 				 if (charVal==mm1)
  		 				 {
  		 				    mm1=iCharCounter1+1;
  		 			     }
  		 				
  		 	 			if (charVal==mm2)
  		 	 			{
  		 	 			    mm2=iCharCounter1+1;
  		 	 			}                                                                                               
  		  		   }       
					
					
   					var now = new Date();
   					servdate = new Date(yy2,mm2-1,dd2);
	 				tmpDate = new Date(yy,mm-1,dd);
	 				
  	 				var checkdate = new Date(servdate.getTime()+((1000*60*60*24)*1));
  	 				
 	 				if(((mm1==04) || (mm1==02) || (mm1==06) || (mm1==09) || (mm1==11)) && (dd1==31))
  	 				{
	   					alert("Invalid CheckOut Date...");
  	 					return false;
  	 				}
  	 				if((mm1==02) && (dd1==30))
  	 				{
  	  					alert("Invalid CheckOut Date...");
  	 					return false;
  	 				}
	 				
  	 				if(((mm==04) || (mm==02) || (mm==06) || (mm==09) || (mm==11)) && (dd==31))
  	 				{
  	 					alert("Invalid Checkin Date... ");
  	 					return false;
  	 				}
  	 				if((mm==02) && (dd==30))
  	 				{
  	 					alert("Invalid Checkin Date... ");
  	 					return false;
  	 				}
	 				

		 			
 	 	 			if (dd == dd1 && mm == mm1 && yy==yy1)
 	 	 			{
 	 	 				if ((parseInt(h) + 8) >= 24) 
		 				{
		 					alert("Checkin and CheckOut Date can't be same \n Please select another date");
							return false;
						}
					}
					
					
  	  	   		   if(tmpDate < servdate)
  	  	 			 {
  	  	 			 	alert("Check-In Date cannot be before Today's Date");
  	  	 			  	return false;
  	  	 			 }
					
	 	 			
  	  	 	 		tmpDate1 = new Date(yy1,mm1-1,dd1);
	  
  	  	 	 		diffr=tmpDate1.getTime()-tmpDate.getTime();
  	  	 	 		var tempdiff=diffr/86400000;
  		 			
  	  	 	 		if(diffr<=0)
  	  	 	 		{
  	   	 	 			alert("Check-out Date cannot be before Check-in Date.");
  	 	  	 			return false;
  	 	   	 		}
  	 	  	 		if(tempdiff > 31)
 		 			{
 						alert("Number of booking days should not be more than 30 days");
 						return false;
					}
						
					if(document.forms[0].c_urrency[1].checked == true)
					{
						alert("Search available only for Indian Resident");
						return false;
					}
					else
					{





					MyWindow=window.open('http://src.ematravels.com/hotel/HotelSearchProgress.do?partnerid='+document.forms[0].partnerid.value+
					'&depart1='+document.forms[0].depart1.value+
					'&return1='+document.forms[0].return1.value+
					'&strcity='+document.forms[0].strcity.value+
					'&check_Inhotel='+document.forms[0].check_Inhotel.value+
					'&check_Outhotel='+document.forms[0].check_Outhotel.value+
					'&no_ofrooms='+document.forms[0].no_ofrooms.value+
					'&str_AdultsRoom1='+document.forms[0].str_AdultsRoom1.value+
					'&str_ChildrenRoom1='+document.forms[0].str_ChildrenRoom1.value+
					'&str_AgeChild1Room1='+document.forms[0].str_AgeChild1Room1.value+
					'&str_AgeChild2Room1='+document.forms[0].str_AgeChild2Room1.value+
					'&str_AdultsRoom2='+document.forms[0].str_AdultsRoom2.value+
					'&str_ChildrenRoom2='+document.forms[0].str_ChildrenRoom2.value+
					'&str_AgeChild1Room2='+document.forms[0].str_AgeChild1Room2.value+
					'&str_AgeChild2Room2='+document.forms[0].str_AgeChild2Room2.value+
					'&str_AdultsRoom3='+document.forms[0].str_AdultsRoom3.value+
					'&str_ChildrenRoom3='+document.forms[0].str_ChildrenRoom3.value+
					'&str_AgeChild1Room3='+document.forms[0].str_AgeChild1Room3.value+
					'&str_AgeChild2Room3='+document.forms[0].str_AgeChild2Room3.value+
					'&str_AdultsRoom4='+document.forms[0].str_AdultsRoom4.value+
					'&str_ChildrenRoom4='+document.forms[0].str_ChildrenRoom4.value+
					'&str_AgeChild1Room4='+document.forms[0].str_AgeChild1Room4.value+
					'&str_AgeChild2Room4='+document.forms[0].str_AgeChild2Room4.value+
					'&currency=true',
					'_parent',
					'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=1024,height=1024');	


					 
					} 
				}
	
				function onBodyLoad()
				{
					//if (document.cookie == "") 
					//{
					//	alert("cookies are Disabled , Make sure that Cookies are Enabled to use RecentSearches");
					//}
					changeRows();
					showRoomsChildren();
					showRoomsChildren1();
					showRoomsChildren2();
					showRoomsChildren3();
					showRoomsChildren4();					
				}
				
				
				function dateStatusHandler(date, y, m, d) 
				{
				  var dt = new Date();
				  var time = date.getTime();
				  var currtime = dt.getTime() - Date.DAY ;
				  if (time >= currtime)
   				   return false;
				  else
				   return true;
				    // return true above if you want to disable other dates
				}
				
				
				function MM_swapImgRestore() 
				{ //v3.0
				  var i,x,a=document.MM_sr; 
				  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
				   x.src=x.oSrc;
				}
				
				function MM_preloadImages() 
				{ //v3.0
				  var d=document; 
				  if(d.images)
				  { 
				  	if(!d.MM_p) 
				  		d.MM_p=new Array();
				    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
				    for(i=0; i<a.length; i++)
				    {
				    	if (a[i].indexOf("#")!=0)
				    	{ 
				    		d.MM_p[j]=new Image; 
				    		d.MM_p[j++].src=a[i];
				    	}
				    }
				   }
				}
				
				function MM_findObj(n, d) { //v4.01
				  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
				    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
				  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
				  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
				  if(!x && d.getElementById) x=d.getElementById(n); return x;
				}
				
				function MM_swapImage() { //v3.0
				  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
				   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
				}

