// JavaScript Document

///////////////////////////Fonctions d'envoi de valeur par POST////////////////////////////////




function VersionNavigateur(Netscape, Explorer) {
  if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||      
      (navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
    return true;
else return false;
}


function ObjectDiv( div , content )
{
		if ( document.getElementById )
		{
				document.getElementById( div ).innerHTML = content;
		}
				else
		{
				if ( document.layers )
				{
						document.div.innerHTML = content;
				}
						else
				{
						document.all.div.innerHTML = content;
				}
		}
}

function Goto( FILE , METHOD , DATA , div )
{
		if( METHOD == 'GET' && DATA != null )
		{
				FILE += '?' + DATA;
				DATA = null;
		}

		var httpRequestM = null;   

				if( window.XMLHttpRequest )
				{   // Firefox   
					httpRequestM = new XMLHttpRequest();
				}
						else if( window.ActiveXObject )
				{   // Internet Explorer   
					httpRequestM = new ActiveXObject( "Microsoft.XMLHTTP" );
				}
						else
				{   // XMLHttpRequest non supporté par le navigateur   
					return "Votre navigateur semble vieux. Veuillez faire une mise à jour pour profiter pleinement du site web. Your browser seem to be old. Please upgrade to take benifit of the web site.";
				}   

						httpRequestM.open( METHOD , FILE , true );
						httpRequestM.onreadystatechange = function()
						{   
								if( httpRequestM.readyState == 4 )
								{
										ObjectDiv( div , httpRequestM.responseText );
								}
						}
		
				if( METHOD  == 'POST' )   
				{
						httpRequestM.setRequestHeader( "Content-type" , "application/x-www-form-urlencoded" );
				}

		 httpRequestM.send( DATA );   
}

function ViewContent( div , href , method , data )
{
		var wait = "<div align='center'>" +
				   "<b><font style='color:red;'>Chargement en cours.....</font></b><br><br>" +
				   "</div>";

		ObjectDiv( div , wait );
		Goto( href , method , data , div );
		return;
}

///////////////////////////FIN Fonctions d'envoi de valeur par POST////////////////////////////////

function goToLink(idUp, idDown){
	document.getElementById(idUp).scrollTop = document.getElementById(idDown).offsetTop;
}

	
	


function Video_Pop(URL){
	window.open(URL,"video","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,resizable=0");
}

<!-- Popup de nouvelles fenetres -->

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=765,height=300,left = 257.5,top = 362');");
}

function Press_Pop(URL) {
	window.open(URL,"video","toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,resizable=0");
}

function popUpPdf(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=1,left = 257.5,top = 362');");
}

function popCarte(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=840,height=630,left = 257.5,top = 362');");
}

function popAssemblee(URL) {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=1,resizable=0,width=840,height=1100,left = 900,top = 362');");
}

