window.addEvent('domready', function() {
		
	//We can use one Request object many times.
	// This is a comment for nothing
	var req_accueil = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/accueil.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').start('text', 'The request failed.');
		}
	});
	
	$('makeRequestAccueil').addEvent('click', function() {
		req_accueil.send();
	});
	
	var req_comites = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/comites.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestComites').addEvent('click', function() {
		req_comites.send();
	});
	

	var req_programme = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/programme.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestProgramme').addEvent('click', function() {
		req_programme.send();
	});
	

	var req_appelacom = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/appelacom.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestAppelacom').addEvent('click', function() {
		req_appelacom.send();
	});

	var req_soumettre = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/soumettre.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestSoumettre').addEvent('click', function() {
		req_soumettre.send();
	});

	var req_resumes = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/resumes.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{
				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestResumes').addEvent('click', function() {
		req_resumes.send();
	});

	var req_prixdethese = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/prixdethese.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{
				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestPrixDeThese').addEvent('click', function() {
		req_prixdethese.send();
	});

	var req_inscription = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/inscription.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{
				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestInscription').addEvent('click', function() {
		req_inscription.send();
	});

	var req_contacts = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/contacts.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestContacts').addEvent('click', function() {
		req_contacts.send();
	});

	var req_hebergements = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/hebergements.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestHebergements').addEvent('click', function() {
		req_hebergements.send();
	});

	var req_infos = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/infos.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed');
		}
	});
	
	$('makeRequestInfos').addEvent('click', function() {
		req_infos.send();
	});

	var req_festif = new Request.HTML({url:'http://www.cnge.fr/congres_toulouse/programme_festif.html', 
		onSuccess: function(html) {
			//Clear the text currently inside the results div.
			$('result').set('text', '');
			//Inject the new DOM elements into the results div.
			$('result').adopt(html);
			//Get the new height and adjust the menu size consequently
			var newResultHeight = $('result').getStyle('height'),
				menuEnd = $('menu_end');

			var i = 0;
			var s = '';
			while (newResultHeight.charAt(i) != 'p')
			{

				s = s + newResultHeight.charAt(i);
				i = i + 1;
			}
			if (newResultHeight > s)
			{
				newResultHeight = s - 562;
			}
			var menuEndFx = new Fx.Tween(menuEnd);
			menuEndFx.start('height',newResultHeight);
		},
		//Our request will most likely succeed, but just in case, we'll add an
		//onFailure method which will let the user know what happened.
		onFailure: function() {
			$('result').set('text', 'The request failed.');
		}
	});
	
	$('makeRequestFestif').addEvent('click', function() {
		req_festif.send();
	});

});


