// JavaScript Document
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
function update(){
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		$.fx.speeds._default = 500;
		$(function() {

		$("#update").dialog({
			modal: true,
			show: 'bounce',
			width: 800,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
					$("#dialog").dialog('close');
					//alert('table');
				}
			}
		});
	});
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////		
}

// JavaScript Document
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
function changeonsdestyle(chemin,style){
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		var extension = '.css';
		var css = chemin + style + extension;
	
		document.getElementById('css').href = css;
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////		
		////////////////////////////////////////////////////////////////////////////////////////////////////////////////////		
}



// -->
// JavaScript Document
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
function changeonsdepage(div){
	ajaxRequest = "";  // The variable that makes Ajax possible!
	
					try{
						// Opera 8.0+, Firefox, Safari
						ajaxRequest = new XMLHttpRequest();
					}
					catch (e)
					{
						// Internet Explorer Browsers
						try
						{
							ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
						}
						catch (e)
						{
							try
							{
								ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
							}
							catch (e)
							{
								// Something went wrong
								alert("Navigateur non compatible");
								return false;
							}
						}
					}
					
					
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function()
{
	if (ajaxRequest.readyState == 1)
	{
	$(function() {
		
		// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
		$( "#dialog2" ).dialog({
			height: 140,
			modal: true,
			resizable: false
		});
	});
	}
	
	if(ajaxRequest.readyState == 4 && ajaxRequest.status == 200)
	{
	$(function() {
		
		// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
		$( "#dialog2" ).dialog('close');
	});
		var ajaxDisplay = document.getElementById('right');
		ajaxDisplay.innerHTML = ajaxRequest.responseText;
		
	}
}
emplacement = 'pages/';
nom_fichier = div;
extension = '.php';
nom_div =  emplacement + nom_fichier + extension ;
	// Affiche le nom ou la propriété name de l'élément l
	// ************************************************************************************************************************
	// ************************************************************************************************************************
	// ************************************************************************************************************************
	// ************************************************************************************************************************
	//alert(queryString);
	var queryString = 'ok';
	ajaxRequest.open("POST", nom_div, true);
	ajaxRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	ajaxRequest.send(queryString);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////


