function NewChildMakeNewChosen(ModelObj,AdultListID1)	
{						
//---------------------------------------------------------------		
ModelObj.options.length=1;		
//ModelObj.options[0]=new Option('0','Select Hotel');			


if(parseInt(AdultListID1) == 0)		
{			
ModelObj.options.length=1;	
ModelObj.options[0]=new Option('0','Select No. of Adults');	
return;		
}	
		

mainArr	= new Array(3);		

//-----------------------Adult 1-------------------------------------
mainArr[0] = new Array(1,1,'1') 
mainArr[1] = new Array(1,2,'2') 

//-----------------------Adult 2-------------------------------------
mainArr[2] = new Array(2,1,'1') 
//-----------------------Adult 3-------------------------------------


//Create Options To Specific Select Box		

with (ModelObj) 		
{			
var z=0;		
	for(j=0; j < 3; j++)		
    	{				
        jAdultListID1		=	mainArr[j][0]			
        jddl_Child_list1	=	mainArr[j][1]		
        jModelName	=	mainArr[j][2]			
        
        if(parseInt(AdultListID1) == parseInt(jAdultListID1))		
        		{			
                	z += 1				
                    options[z]=new Option(jModelName,jddl_Child_list1);	
                    				if(parseInt(jddl_Child_list1) == parseInt())		
                                    			{				
                                                		value = jddl_Child_list1;			
                                               	}	
                }	
           }	
 }
}


function NewChild2(ModelObj,AdultListID2)	
{						
//---------------------------------------------------------------		
ModelObj.options.length=1;		
//ModelObj.options[0]=new Option('0','Select Hotel');			


if(parseInt(AdultListID2) == 0)		
{			
ModelObj.options.length=1;	
ModelObj.options[0]=new Option('0','Select No. of Adults');	
return;		
}	
		

mainArr	= new Array(3);		

//-----------------------Adult 1-------------------------------------
mainArr[0] = new Array(1,1,'1') 
mainArr[1] = new Array(1,2,'2') 

//-----------------------Adult 2-------------------------------------
mainArr[2] = new Array(2,1,'1') 
//-----------------------Adult 3-------------------------------------


//Create Options To Specific Select Box		

with (ModelObj) 		
{			
var z=0;		
	for(j=0; j < 3; j++)		
    	{				
        jAdultListID2		=	mainArr[j][0]			
        jddl_Child_list2	=	mainArr[j][1]		
        jModelName	=	mainArr[j][2]			
        
        if(parseInt(AdultListID2) == parseInt(jAdultListID2))		
        		{			
                	z += 1				
                    options[z]=new Option(jModelName,jddl_Child_list2);	
                    				if(parseInt(jddl_Child_list2) == parseInt())		
                                    			{				
                                                		value = jddl_Child_list2;			
                                               	}	
                }	
           }	
 }
}



function NewChild3(ModelObj,AdultListID3)	
{						
//---------------------------------------------------------------		
ModelObj.options.length=1;		
//ModelObj.options[0]=new Option('0','Select Hotel');			


if(parseInt(AdultListID3) == 0)		
{			
ModelObj.options.length=1;	
ModelObj.options[0]=new Option('0','Select No. of Adults');	
return;		
}	
		

mainArr	= new Array(3);		

//-----------------------Adult 1-------------------------------------
mainArr[0] = new Array(1,1,'1') 
mainArr[1] = new Array(1,2,'2') 

//-----------------------Adult 2-------------------------------------
mainArr[2] = new Array(2,1,'1') 
//-----------------------Adult 3-------------------------------------


//Create Options To Specific Select Box		

with (ModelObj) 		
{			
var z=0;		
	for(j=0; j < 3; j++)		
    	{				
        jAdultListID3		=	mainArr[j][0]			
        jddl_Child_list3	=	mainArr[j][1]		
        jModelName	=	mainArr[j][2]			
        
        if(parseInt(AdultListID3) == parseInt(jAdultListID3))		
        		{			
                	z += 1				
                    options[z]=new Option(jModelName,jddl_Child_list3);	
                    				if(parseInt(jddl_Child_list3) == parseInt())		
                                    			{				
                                                		value = jddl_Child_list3;			
                                               	}	
                }	
           }	
 }
}


var xmlHttp

////Ajax Create opject
function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

//**********************************************************************************************************
// Select Date From Trip
//**********************************************************************************************************
function ChangeselectComboRight(theForm,TypeDis,catid,strAdultNo)
{ 

	if (TypeDis=="Destination")
 	 {
  
 		 if (theForm.selectComboCountry.options.selectedIndex==0)
 			 {
  				  alert("Please Select a departure city");
   				 theForm.selectComboCountry.focus();
					document.getElementById("DisplayRightMenuDestination").innerHTML= "<select id='selectComboDestinations'  name='selectComboDestinations'><Option value='0'>Select a departure city</Option>	</select></div>"
   				 return (false);
  			}	
  
	str = theForm.selectComboCountry.value
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  {
	  alert ("Your browser does not support AJAX!");
	  return;
	  }
  document.getElementById("DisplayRightMenuDestination").innerHTML="";

	var url="../../../Booking_Cruises_PerCruise_SendDetailsAjax.asp"; 
	url=url+"?catid="+str;
	url=url+"&TypeDis="+TypeDis;
	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedRightMenuBrands;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
 	 }



//**********************************************************************************************************	  
// Select No. of Rooms	  
//**********************************************************************************************************	  
	  
	  if (TypeDis=="Rooms")
 	 {
  	
 	
 		 if (theForm.noofrooms.options.selectedIndex==0)
 			 {
  				  alert("Please select No. of Rooms");
   				 theForm.noofrooms.focus();
					document.getElementById("DisplayRoomDeatils").innerHTML= ""
   				 return (false);
  			}	
  
		str = theForm.noofrooms.value
		
	
		xmlHttp=GetXmlHttpObject();
			if (xmlHttp==null)
	 			 {
	 				 alert ("Your browser does not support AJAX!");
	  				return;
				  }

  		document.getElementById("DisplayRoomDeatils").innerHTML="";

		var url="../../../Booking_Cruises_PerCruise_SendDetailsAjax.asp"; 
		url=url+"?catid="+str;
		url=url+"&TypeDis="+TypeDis;
		url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedRooms;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
 	 }

}



function stateChangedRightMenuBrands() 
{ 
	if (xmlHttp.readyState==4 && xmlHttp.status == 200)
	{ 
	document.getElementById("DisplayRightMenuDestination").innerHTML=xmlHttp.responseText;
	}
}

function stateChangedRooms() 
{ 
	if (xmlHttp.readyState==4 && xmlHttp.status == 200)
	{ 
	document.getElementById("DisplayRoomDeatils").innerHTML=xmlHttp.responseText;
	}
}



  
function FrontPage_Cruises_Validator(theForm)
{

if (theForm.selectComboCountry.value== 0) 
	{
		alert("Please select Departure City.");
		theForm.selectComboCountry.focus();
		return false;
	}


if (theForm.selectComboDestinations.value== 0) 
	{
		alert("Please select Departure Day.");
		theForm.selectComboDestinations.focus();
		return false;
	}



if (theForm.noofrooms.value== 0) 
	{
		alert("Please select Number Of Room.");
		theForm.noofrooms.focus();
		return false;
	}

if (theForm.noofrooms.value== 1) 
{

	if (theForm.AdultListID1.value== 0) 
		{
			alert("Please enter number of adults for cabin 1");
			theForm.AdultListID1.focus();
			return false;
		}
}

if (theForm.noofrooms.value== 2) 
{

		if (theForm.AdultListID1.value== 0) 
			{
				alert("Please enter number of adults for cabin 1");
				theForm.AdultListID1.focus();
				return false;
			}

		if (theForm.AdultListID2.value== 0)
			{
			alert("Please enter number of adults for cabin 2");
			theForm.AdultListID2.focus();
			return false;
			}
}



if (theForm.noofrooms.value== 3) 
{

	if (theForm.AdultListID1.value== 0)
		 {
			alert("Please enter number of adults for cabin 1");
			theForm.AdultListID1.focus();
			return false;
		}
	if (theForm.AdultListID2.value== 0)
		 {
			alert("Please enter number of adults for cabin 2");
			theForm.AdultListID2.focus();
			return false;
		}

	if (theForm.AdultListID3.value== 0) 
		{
			alert("Please enter number of adults for cabin 3");
			theForm.AdultListID3.focus();
			return false;
		}
}





if 
(theForm.txt_currency_id.value == 1)
{
theForm.action="../../../Egyptian_Booking_Cruises_Results.asp";
} 
else
{ 
theForm.action="../../../Booking_Cruises_Results.asp";
}



}




