
     function validate_form ( ) 
	 {
	 
   
	if ( document.prices.level.selectedIndex == 0 )
    {
        alert ( "Please select your Class Type." );
        return false;
    }
	if ( document.prices.duration.selectedIndex == 0 )
    {
        alert ( "Please select your Duration." );
        return false;
    }
	if ( document.prices.place.selectedIndex == 0 )
    {
        alert ( "Please select your Accommodation Type." );
        return false;
    }
	if ( document.prices.board.selectedIndex == 0 )
    {
        alert ( "Please select your Board Type." );
        return false;
    }
	if ( document.prices.room.selectedIndex == 0 )
    {
        alert ( "Please select your Room Type." );
        return false;
    }
	if ( document.prices.season.selectedIndex == 0 )
    {
        alert ( "Please select the Season ." );
        return false;
    }
	if ( document.prices.currency.selectedIndex == 0 )
    {
        alert ( "Please select the currency you intend to pay with." );
        return false;
    }
	return true;
}      

      function GetXmlHttpObject(){

      var xmlHttp = false;

      try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP") //For Old Microsoft Browsers
      }
      catch(e){

      try{
      xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")//For Microsoft IE 6.0+
      }
      catch(e2){
	  
      xmlHttp = false;

      }

      }

      if (!xmlHttp && typeof XMLHttpRequest != 'undefined'){
      xmlHttp = new XMLHttpRequest();//For Mozilla, Opera Browsers
 
      }

      if(!xmlHttp) { alert("Browser does not support HTTP Request"); }
      return xmlHttp;
  
      }

	
      //*********************************************************************
	  
	  
	  
	  function getNextMenu(x){

      var xmlhttp = GetXmlHttpObject();

	 
	  
      if(!xmlhttp){ return; }
	  
      var menus = [
 
      [ 'language' , 'findcity.php' ],
      [ 'school' , 'findage.php' ],
      [ 'age' , 'findlevel.php' ],
      [ 'level' , 'getduration.php' ],
      [ 'duration' , 'findplace.php' ],
      [ 'place' , 'findboard.php' ],
      [ 'board' , 'findroom.php' ],
      [ 'room' , 'findseason.php' ],
      [ 'season' , 'findagegroup.php' ],
	  [ 'agegroup' , '' ]
	  ];

      //1. Compose url - we can now do this by looping through the menus array.

      var queryString = [];
	  
      for(var i=0; i<menus.length; i++){
	  
      var menu = document.getElementById(menus[i][0]);
	  
	  
      if(menu && !menu.getAttribute('disabled')){
	  
      queryString.push(menu.name + '=' + menu[menu.selectedIndex].value);

	  
	 
      }

      }

      url = menus[x][1] + '?' + queryString.join('&');
		
      //2. Establish AJAX response handler

      xmlhttp.onreadystatechange = function(){
      var menu, menuContainer, cloned;
      if (xmlhttp.readyState == 4){

      //2a. Set options for next menu in the cascade.

      menu = document.getElementById(menus[x+1][0]);

      if(menu){

      menuContainer = menu.parentNode;

      if(!menuContainer.getAttribute('cloned')){

      menuContainer.nullClone = menu.cloneNode(true);//clone the "null" menu and stash it away (invisibly) as an attribute of the menu's container.

      menuContainer.setAttribute('cloned', 1);

      }

      menuContainer.innerHTML = xmlhttp.responseText;
	  
	 

      }

      //2b. User may go back, higher in the cascade, and se-select from a menu.

      // This will invalidate all subordinate menus in the cascade.

      // Therefore reset all subordinate menus to "null" settings.

      for(var i=x+2; i<menus.length; i++){
 
      menu = document.getElementById(menus[i][0]);

      if(menu){

      menuContainer = menu.parentNode;

      if(menuContainer && menuContainer.getAttribute('cloned')){

      menuContainer.replaceChild(menuContainer.nullClone.cloneNode(true), menu);

      }
 
      }

      }
 
      }

      };

      xmlhttp.open("GET",url,true);

      xmlhttp.send(null);

      }
	  
	   //*********************************************************************
	  
	   function getNextDrop(x){

      var xmlhttp = GetXmlHttpObject();

	 	  
      if(!xmlhttp){ return; }
	  
      var menus = [
 
      [ 'language' , 'findcitynew.php' ],
      [ 'school' , 'findagenew.php' ],
      [ 'age1' , 'findlevelnew.php' ],
      [ 'level1' , 'getdurationnew.php' ],
      [ 'duration' , 'findplacenew.php' ],
      [ 'place' , 'findboardnew.php' ],
      [ 'board' , 'findroomnew.php' ],
      [ 'room' , 'findseasonnew.php' ],
      [ 'season' , 'findagegroup.php' ],
	  [ 'agegroup' , '' ]
	  ];

      //1. Compose url - we can now do this by looping through the menus array.

      var queryString = [];
	  
	  
	  
      for(var i=0; i<menus.length; i++){
	  
      var menu = document.getElementById(menus[i][0]);
	  
	  
      if(menu && !menu.getAttribute('disabled')){
	  
      queryString.push(menu.name + '=' + menu[menu.selectedIndex].value);

	  
	 
      }

      }

      url = menus[x][1] + '?' + queryString.join('&');
		
		
      //2. Establish AJAX response handler

      xmlhttp.onreadystatechange = function(){
      var menu, menuContainer, cloned;
      if (xmlhttp.readyState == 4){

      //2a. Set options for next menu in the cascade.

      menu = document.getElementById(menus[x+1][0]);

      if(menu){

      menuContainer = menu.parentNode;

      if(!menuContainer.getAttribute('cloned')){

      menuContainer.nullClone = menu.cloneNode(true);//clone the "null" menu and stash it away (invisibly) as an attribute of the menu's container.

      menuContainer.setAttribute('cloned', 1);

      }

      menuContainer.innerHTML = xmlhttp.responseText;
	  
	 

      }

      //2b. User may go back, higher in the cascade, and se-select from a menu.

      // This will invalidate all subordinate menus in the cascade.

      // Therefore reset all subordinate menus to "null" settings.

      for(var i=x+2; i<menus.length; i++){
 
      menu = document.getElementById(menus[i][0]);

      if(menu){

      menuContainer = menu.parentNode;

      if(menuContainer && menuContainer.getAttribute('cloned')){

      menuContainer.replaceChild(menuContainer.nullClone.cloneNode(true), menu);

      }
 
      }

      }
 
      }

      };

      xmlhttp.open("GET",url,true);

      xmlhttp.send(null);

      }