function ResizeMenu(Screen,NbMenu)
{
	TailleElem=Screen/NbMenu;
	for(var i=1;i<=NbMenu;i++)
	{
		document.getElementById("Elem"+i).width=TailleElem;
	}
}
	
function timerlogs()
{
	updatelogs();
       	setTimeout('timerlogs()',30000);

}

function updatelogs()
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
	

    //on définit l'appel de la fonction au retour serveur
    xhr.onreadystatechange = function() { };
    
    //on appelle le fichier reponse.txt
    xhr.open("GET", "logs.php", true);
    xhr.send(null);
}




function UnMask(ID)
{
	string="Mail"+ID;
	MailDest="Mail_Dest."+ID;
	MailSubmit="NewsSubOK."+ID;
	document.getElementById(MailDest).style.visibility = "visible";
	document.getElementById(MailSubmit).style.visibility = "visible";
	document.getElementById(string).innerHTML = "<br />e_mail:";
//	break;
}

















var ds_i_date = new Date();
ds_c_month = ds_i_date.getMonth() + 1;
ds_c_year = ds_i_date.getFullYear();

// Get Element By Id
function ds_getel(id) {
	return document.getElementById(id);
}

// Get the left and the top of the element.
function ds_getleft(el) {
	var tmp = el.offsetLeft;
	el = el.offsetParent
	while(el) {
		tmp += el.offsetLeft;
		el = el.offsetParent;
	}
	return tmp;
}

function ds_gettop(el) {
	var tmp = el.offsetTop;
	el = el.offsetParent
	while(el) {
		tmp += el.offsetTop;
		el = el.offsetParent;
	}
	return tmp;
}

// Output Element
var ds_oe = ds_getel('ds_calclass');
// Container
var ds_ce = ds_getel('ds_conclass');

// Output Buffering
var ds_ob = ''; 
function ds_ob_clean() {
	ds_ob = '';
}
function ds_ob_flush() {
	ds_oe.innerHTML = ds_ob;
	ds_ob_clean();
}
function ds_echo(t) {
	ds_ob += t;
}

var ds_element; // Text Element...

var ds_monthnames = [
'Janvier', 'F&eacute;vrier', 'Mars', 'Avril', 'Mai', 'Juin',
'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'D&eacute;cembre'
];

var ds_daynames = [
'Dim', 'Lun', 'Mar', 'Me', 'Jeu', 'Ven', 'Sam'
]; // You can translate it for your language.

// Calendar template
function ds_template_main_above(t) {
	return '<table cellpadding="3" cellspacing="1" class="ds_tbl">'
	     + '<tr>'
		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_py();">&lt;&lt;</td>'
		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_pm();">&lt;</td>'
		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_hi();" colspan="3">[Fermer]</td>'
		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_nm();">&gt;</td>'
		 + '<td class="ds_head" style="cursor: pointer" onclick="ds_ny();">&gt;&gt;</td>'
		 + '</tr>'
	     + '<tr>'
		 + '<td colspan="7" class="ds_head">' + t + '</td>'
		 + '</tr>'
		 + '<tr>';
}

function ds_template_day_row(t) {
	return '<td class="ds_subhead">' + t + '</td>';
}

function ds_template_new_week() {
	return '</tr><tr>';
}

function ds_template_blank_cell(colspan) {
	return '<td colspan="' + colspan + '"></td>'
}

function ds_template_day(d, m, y) {
	return '<td class="ds_cell" onclick="ds_onclick(' + d + ',' + m + ',' + y + ')">' + d + '</td>';
	// Define width the day row.
}

function ds_template_main_below() {
	return '</tr>'
	     + '</table>';
}

// This one draws calendar...
function ds_draw_calendar(m, y) {
	// First clean the output buffer.
	ds_ob_clean();
	// Here we go, do the header
	ds_echo (ds_template_main_above(ds_monthnames[m - 1] + ' ' + y));
	for (i = 0; i < 7; i ++) 
	{
		ds_echo (ds_template_day_row(ds_daynames[i]));
	}
	// Make a date object.
	var ds_dc_date = new Date();
	ds_dc_date.setMonth(m - 1);
	ds_dc_date.setFullYear(y);
	ds_dc_date.setDate(1);
	if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) {
		days = 31;
	} else if (m == 4 || m == 6 || m == 9 || m == 11) {
		days = 30;
	} else {
		days = (y % 4 == 0) ? 29 : 28;
	}
	var first_day = ds_dc_date.getDay();
	var first_loop = 1;
	// Start the first week
	ds_echo (ds_template_new_week());
	// If sunday is not the first day of the month, make a blank cell...
	if (first_day != 0) {
		ds_echo (ds_template_blank_cell(first_day));
	}
	var j = first_day;
	for (i = 0; i < days; i ++) {
		// Today is sunday, make a new week.
		// If this sunday is the first day of the month,
		// we've made a new row for you already.
		if (j == 0 && !first_loop) {
			// New week!!
			ds_echo (ds_template_new_week());
		}
		// Make a row of that day!
		ds_echo (ds_template_day(i + 1, m, y));
		// This is not first loop anymore...
		first_loop = 0;
		// What is the next day?
		j ++;
		j %= 7;
	}
	// Do the footer
	ds_echo (ds_template_main_below());
	// And let's display..
	ds_ob_flush();
	// Scroll it into view.
	ds_ce.scrollIntoView();
}

// A function to show the calendar.
// When user click on the date, it will set the content of t.
function ds_sh(t) {
	// Set the element to set...
	ds_element = t;
	// Make a new date, and set the current month and year.
	var ds_sh_date = new Date();
	ds_c_month = ds_sh_date.getMonth() + 1;
	ds_c_year = ds_sh_date.getFullYear();
	// Draw the calendar
	ds_draw_calendar(ds_c_month, ds_c_year);
	// To change the position properly, we must show it first.
	ds_ce.style.display = '';
	// Move the calendar container!
	the_left = ds_getleft(t);
	the_top = ds_gettop(t) + t.offsetHeight;
	ds_ce.style.left = the_left + 'px';
	ds_ce.style.top = the_top + 'px';
	// Scroll it into view.
	ds_ce.scrollIntoView();
}

// Hide the calendar.
function ds_hi() {
	ds_ce.style.display = 'none';
}

// Moves to the next month...
function ds_nm() {
	// Increase the current month.
	ds_c_month ++;
	// We have passed December, let's go to the next year.
	// Increase the current year, and set the current month to January.
	if (ds_c_month > 12) {
		ds_c_month = 1; 
		ds_c_year++;
	}
	// Redraw the calendar.
	ds_draw_calendar(ds_c_month, ds_c_year);
}

// Moves to the previous month...
function ds_pm() {
	ds_c_month = ds_c_month - 1; // Can't use dash-dash here, it will make the page invalid.
	// We have passed January, let's go back to the previous year.
	// Decrease the current year, and set the current month to December.
	if (ds_c_month < 1) {
		ds_c_month = 12; 
		ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid.
	}
	// Redraw the calendar.
	ds_draw_calendar(ds_c_month, ds_c_year);
}

// Moves to the next year...
function ds_ny() {
	// Increase the current year.
	ds_c_year++;
	// Redraw the calendar.
	ds_draw_calendar(ds_c_month, ds_c_year);
}

// Moves to the previous year...
function ds_py() {
	// Decrease the current year.
	ds_c_year = ds_c_year - 1; // Can't use dash-dash here, it will make the page invalid.
	// Redraw the calendar.
	ds_draw_calendar(ds_c_month, ds_c_year);
}

// Format the date to output.
function ds_format_date(d, m, y) {
	// 2 digits month.
	m2 = '00' + m;
	m2 = m2.substr(m2.length - 2);
	// 2 digits day.
	d2 = '00' + d;
	d2 = d2.substr(d2.length - 2);
	// YYYY-MM-DD
	return y + '-' + m2 + '-' + d2;
//	return d2 + '-' + m2 + '-' + y;
}

// When the user clicks the day.
function ds_onclick(d, m, y) {
	// Hide the calendar.
	ds_hi();
	// Set the value of it, if we can.
	if (typeof(ds_element.value) != 'undefined') 
	{
		ds_element.value = ds_format_date(d, m, y);
	// Maybe we want to set the HTML in it.
	} 
	else if (typeof(ds_element.innerHTML) != 'undefined') 
	{
		///ds_element.innerHTML = ds_format_date(d, m, y);
		ds_element.innerHTML = ds_format_date(d, m, y);
	// I don't know how should we display it, just alert it to user.
	} 
	else 
	{
		alert (ds_format_date(d, m, y));
	}
}






 // args : string moncontroletexte, int nbcar, string moncontroledecompte
 // return : aucun
 // Affecte  certains vnements d'un textarea, le contrle de la longueur de son contenu
 function LimiterTextArea(nom_controletexte, nbcar, nom_controledecompte)
 {
 var moncontroletexte = document.getElementById(nom_controletexte);

 var moncontroledecompte = document.getElementById(nom_controledecompte);

 if (moncontroletexte && moncontroledecompte)
 {

 moncontroletexte.onclick = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};
 /*moncontroletexte.onblur = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};*/
 moncontroletexte.onkeyup = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};
 moncontroletexte.onkeypress = function(){TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)};

 // *** Affichage du nombre de caractres restant
 if(moncontroledecompte.type)
 moncontroledecompte.value = "["+NbCarRestant(moncontroletexte, nbcar)+"]"; // Pour un input de formulaire
 else
 moncontroledecompte.innerHTML = "["+NbCarRestant(moncontroletexte, nbcar)+"]"; // Pour un lment HTML

 }
 }

 // TextAreaEstRempli
 // args : textarea moncontroletexte, int nbcar, element_HTML moncontroledecompte
 // return : bool
 // Renvoie vrai si le nombre de caractres maximum du textarea n'est pas atteint
 function TextAreaEstRempli(moncontroletexte, nbcar, moncontroledecompte)
 {
 if (moncontroletexte)
 {
 if (moncontroletexte.value.length <= nbcar)
 {
 //alert("pas rempli");
 // mes actions ...

 // *** Affichage du nombre de caractres restant
 if(moncontroledecompte.type)
 moncontroledecompte.value = "["+NbCarRestant(moncontroletexte, nbcar)+"]";
 else
 moncontroledecompte.innerHTML = "["+NbCarRestant(moncontroletexte, nbcar)+"]";

 return true;
 }
 else
 {
 //alert("rempli");
 // mes actions ...

 // Affichage du nombre de caractres restant
 moncontroletexte.value = moncontroletexte.value.substr(0, nbcar);

 // *** Affichage du nombre de caractres restant
 if(moncontroledecompte.type)
 moncontroledecompte.value = "["+NbCarRestant(moncontroletexte, nbcar)+"]";
 else
 moncontroledecompte.innerHTML = "["+NbCarRestant(moncontroletexte, nbcar)+"]";

 return false;
 }
 }
 }

 // NbCarRestant
 // args : textarea moncontroletexte, int nbcar
 // return : int
 // Renvoie le nombre de caractre  saisir
 function NbCarRestant(moncontroletexte, nbcar)
 {
 if (moncontroletexte.value.length)
 return new Number(nbcar - moncontroletexte.value.length);
 else
 return new Number(nbcar);
 }



function GetId(id)
{
return document.getElementById(id);
}
var i=false; // La variable i nous dit si la bulle est visible ou non

function move(e) {
  if(i) {  // Si la bulle est visible, on calcul en temps reel sa position ideale
	if (navigator.appName!="Microsoft Internet Explorer") { // Si on est pas sous IE
	GetId("curseur").style.left=e.pageX + 5+"px";
	GetId("curseur").style.top=e.pageY + 10+"px";
	}
	else { // Modif propos par TeDeum, merci  lui
	if(document.documentElement.clientWidth>0) {
		GetId("curseur").style.left=20+event.x+document.documentElement.scrollLeft+"px";
		GetId("curseur").style.top=10+event.y+document.documentElement.scrollTop+"px";
	}
	else {
		GetId("curseur").style.left=20+event.x+document.body.scrollLeft+"px";
		GetId("curseur").style.top=10+event.y+document.body.scrollTop+"px";
	}
	}
  }
}

function montre(text) 
{
  if(i==false) 
  {
	  GetId("curseur").style.visibility="visible"; // Si il est cacher (la verif n'est qu'une securit) on le rend visible.
	  GetId("curseur").innerHTML = text; // Cette fonction est a amliorer, il parait qu'elle n'est pas valide (mais elle marche)
	  i=true;
  }
}
function cache() 
{
	if(i==true) 
	{
		GetId("curseur").style.visibility="hidden"; // Si la bulle etais visible on la cache
		i=false;
	}
}
document.onmousemove=move; // des que la souris bouge, on appelle la fonction move pour mettre a jour la position de la bulle.




var Tablo = new Array();
function CheckFormulaire2(What,Code)
{	
	if(What=='Image'&& MD5(document.getElementById(What).value,false,false)!=Code)
	{
		document.getElementById(What).style.borderColor = "#FF1100";
		document.getElementById(What).style.backgroundColor = "#FFB7B7";
		document.getElementById(What+"1").innerHTML = "&nbsp;<img height='18px' src='Images/NoValid.png' alt='Valid' />";
		Tablo[What]='False';
	}
	else
	{
		document.getElementById(What).style.borderColor = "#11FF00";
		document.getElementById(What).style.backgroundColor = "#B7FFB7";
		document.getElementById(What+"1").innerHTML = "&nbsp;<img height='18px' src='Images/Valid.png' alt='Valid' />";
		Tablo[What]='True';
	}
}

function CheckFormulaire(What)
{
	if(What=='Email')
	{
		adresse = document.getElementById(What).value;
		var place = adresse.indexOf("@",1);
		var point = adresse.indexOf(".",place+1);
		if ((place > -1)&&(adresse.length >2)&&(point > 1))
		{
			document.getElementById(What).style.borderColor = "#11FF00";
			document.getElementById(What).style.backgroundColor = "#B7FFB7";
			document.getElementById(What+"1").innerHTML = "&nbsp;<img height='18px' src='Images/Valid.png' alt='Valid' />";
			Tablo[What]='True';
		}
		else
		{
			document.getElementById(What).style.borderColor = "#FF1100";
			document.getElementById(What).style.backgroundColor = "#FFB7B7";
			document.getElementById(What+"1").innerHTML = "&nbsp;<img height='18px' src='Images/NoValid.png' alt='Valid' />";
			Tablo[What]='False';
		}
		return true;
	}
	if(What!='Email' && document.getElementById(What).value=='')
	{
		document.getElementById(What).style.borderColor = "#FF1100";
		document.getElementById(What).style.backgroundColor = "#FFB7B7";
		document.getElementById(What+"1").innerHTML = "&nbsp;<img height='18px' src='Images/NoValid.png' alt='Valid' />";
		Tablo[What]='False';
	}
	else
	{
		document.getElementById(What).style.borderColor = "#11FF00";
		document.getElementById(What).style.backgroundColor = "#B7FFB7";
		document.getElementById(What+"1").innerHTML = "&nbsp;<img height='18px' src='Images/Valid.png' alt='Valid' />";
		Tablo[What]='True';
	}
}

function Checkout()
{
	for(elem in Tablo)
	{
		if(Tablo[elem]=='True')
		{
			continue;
		}
		if(Tablo[elem]=='False')
		{
			return false;
		}
	}
	document.getElementById('Flag').value = 'True';
}

var OldSizeX;
function ResizeFlash()
{
	EcranLarg = document.width;
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		EcranLarg = document.body.clientWidth;
	}
	if(EcranLarg!=OldSizeX)
	{
		document.getElementById('FlashDest').innerHTML='';
		FlashX=EcranLarg-420;
		FlashY=FlashX*170/800;
		if(EcranLarg>1080)
		{
			Flash='	<object type="application/x-shockwave-flash" data="Flash/test1.swf" width="800" height="170" title="McConsort">';
			Flash+='	  <param name="movie" value="Flash/test1.swf" />';
			Flash+='	  <param name="quality" value="high" />';
			Flash+='	  alt : <a href="Flash/test1.swf">Flash/test1.swf</a>';
			Flash+='	</object>';
		}
		else
		{
			Flash='	<object type="application/x-shockwave-flash" data="Flash/test1.swf" width="'+FlashX+'" height="'+FlashY+'" title="McConsort">';
			Flash+='	  <param name="movie" value="Flash/test1.swf" />';
			Flash+='	  <param name="quality" value="high" />';
			Flash+='	  alt : <a href="Flash/test1.swf">Flash/test1.swf</a>';
			Flash+='	</object>';
		}
		document.getElementById('FlashDest').innerHTML=Flash;
		OldSizeX=EcranLarg;
	}
	setTimeout("ResizeFlash()", 2000);
}

pos=0;
var texte;
function titredefile(texte)
{
	this.texte=texte;
	titredefilant();
}
function titredefilant()
{
	titre=texte.substring(pos, texte.length) + texte.substring(0, pos);pos++
	window.document.title=titre;
	if(pos>texte.length) pos=0;
	window.setTimeout('titredefilant();', 500);
}





function MD5(message, upper_case, unicode) 
{
	
	//misc functions
	
	var add = function(x, y) {
		var lsw = (x & 0xFFFF) + (y & 0xFFFF);
		var msw = (x >>> 16) + (y >>> 16) + (lsw >>> 16);
		return (msw << 16) | (lsw & 0xFFFF);
	}
	
	var rol = function(x, y){
		return (x << y) | (x >>> (32 - y));
	}
	
	var hex = function(abcd) {
		var hex_string = "";
		var hex_buffer = "0123456789abcdef";
								   
		if(upper_case) hex_buffer = hex_buffer.toUpperCase();
		
		for(var i = 0; i < abcd.length; i++) for(var j = 0; j < 32; j += 8)
			hex_string += hex_buffer.charAt( (abcd[i] >> (j+4)) & 0xF) + hex_buffer.charAt( (abcd[i] >> j) & 0xF);
		
		return hex_string;
	}
	
	//md5 functions
	
	var xx = function(q, a, b, x, s, ac) {
		return add(rol(add(add(a, q), add(x, ac)), s),b);
	}
	
	var ff = function(a, b, c, d, x, s, ac) {
		return xx((b & c) | ((~b) & d), a, b, x, s, ac);
	}
	
	var gg = function(a, b, c, d, x, s, ac) {
		return xx((b & d) | (c & (~d)), a, b, x, s, ac);
	}
	
	var hh = function(a, b, c, d, x, s, ac) {
		return xx(b ^ c ^ d, a, b, x, s, ac);
	}
	
	var ii = function(a, b, c, d, x, s, ac) {
		return xx(c ^ (b | (~d)), a, b, x, s, ac);
	}
	
	//message digest buffer
	
	message = message.toString();
	
	var i;
	var buffer = [];
	var char_size = unicode ? 16 : 8;
	var char_mask = (1 << char_size) - 1;
	
	for(i = 0; i < message.length * char_size; i += char_size)
		buffer[i >> 5] |= (message.charCodeAt(i / char_size) & char_mask) << (i & 0x1F);
	
	//message digest padding
	
	buffer[i >> 5] |= 0x80 << (i & 0x1F);
	buffer[(((i + 64) >>> 5) & ~0xF) + 14] = i;
	
	//message digest loop
	
	var a = 0x67452301;
	var b = 0xEFCDAB89;
	var c = 0x98BADCFE;
	var d = 0x10325476;
	
	for(i = 0; i < buffer.length; i += 16) {
		var temp_a = a;
		var temp_b = b;
		var temp_c = c;
		var temp_d = d;
		
		a = ff(a, b, c, d, buffer[i+ 0],  7, 0xD76AA478);
		d = ff(d, a, b, c, buffer[i+ 1], 12, 0xE8C7B756);
		c = ff(c, d, a, b, buffer[i+ 2], 17, 0x242070DB);
		b = ff(b, c, d, a, buffer[i+ 3], 22, 0xC1BDCEEE);
		a = ff(a, b, c, d, buffer[i+ 4],  7, 0xF57C0FAF);
		d = ff(d, a, b, c, buffer[i+ 5], 12, 0x4787C62A);
		c = ff(c, d, a, b, buffer[i+ 6], 17, 0xA8304613);
		b = ff(b, c, d, a, buffer[i+ 7], 22, 0xFD469501);
		a = ff(a, b, c, d, buffer[i+ 8],  7, 0x698098D8);
		d = ff(d, a, b, c, buffer[i+ 9], 12, 0x8B44F7AF);
		c = ff(c, d, a, b, buffer[i+10], 17, 0xFFFF5BB1);
		b = ff(b, c, d, a, buffer[i+11], 22, 0x895CD7BE);
		a = ff(a, b, c, d, buffer[i+12],  7, 0x6B901122);
		d = ff(d, a, b, c, buffer[i+13], 12, 0xFD987193);
		c = ff(c, d, a, b, buffer[i+14], 17, 0xA679438E);
		b = ff(b, c, d, a, buffer[i+15], 22, 0x49B40821);
		
		a = gg(a, b, c, d, buffer[i+ 1],  5, 0xF61E2562);
		d = gg(d, a, b, c, buffer[i+ 6],  9, 0xC040B340);
		c = gg(c, d, a, b, buffer[i+11], 14, 0x265E5A51);
		b = gg(b, c, d, a, buffer[i+ 0], 20, 0xE9B6C7AA);
		a = gg(a, b, c, d, buffer[i+ 5],  5, 0xD62F105D);
		d = gg(d, a, b, c, buffer[i+10],  9, 0x02441453);
		c = gg(c, d, a, b, buffer[i+15], 14, 0xD8A1E681);
		b = gg(b, c, d, a, buffer[i+ 4], 20, 0xE7D3FBC8);
		a = gg(a, b, c, d, buffer[i+ 9],  5, 0x21E1CDE6);
		d = gg(d, a, b, c, buffer[i+14],  9, 0xC33707D6);
		c = gg(c, d, a, b, buffer[i+ 3], 14, 0xF4D50D87);
		b = gg(b, c, d, a, buffer[i+ 8], 20, 0x455A14ED);
		a = gg(a, b, c, d, buffer[i+13],  5, 0xA9E3E905);
		d = gg(d, a, b, c, buffer[i+ 2],  9, 0xFCEFA3F8);
		c = gg(c, d, a, b, buffer[i+ 7], 14, 0x676F02D9);
		b = gg(b, c, d, a, buffer[i+12], 20, 0x8D2A4C8A);
		
		a = hh(a, b, c, d, buffer[i+ 5],  4, 0xFFFA3942);
		d = hh(d, a, b, c, buffer[i+ 8], 11, 0x8771F681);
		c = hh(c, d, a, b, buffer[i+11], 16, 0x6D9D6122);
		b = hh(b, c, d, a, buffer[i+14], 23, 0xFDE5380C);
		a = hh(a, b, c, d, buffer[i+ 1],  4, 0xA4BEEA44);
		d = hh(d, a, b, c, buffer[i+ 4], 11, 0x4BDECFA9);
		c = hh(c, d, a, b, buffer[i+ 7], 16, 0xF6BB4B60);
		b = hh(b, c, d, a, buffer[i+10], 23, 0xBEBFBC70);
		a = hh(a, b, c, d, buffer[i+13],  4, 0x289B7EC6);
		d = hh(d, a, b, c, buffer[i+ 0], 11, 0xEAA127FA);
		c = hh(c, d, a, b, buffer[i+ 3], 16, 0xD4EF3085);
		b = hh(b, c, d, a, buffer[i+ 6], 23, 0x04881D05);
		a = hh(a, b, c, d, buffer[i+ 9],  4, 0xD9D4D039);
		d = hh(d, a, b, c, buffer[i+12], 11, 0xE6DB99E5);
		c = hh(c, d, a, b, buffer[i+15], 16, 0x1FA27CF8);
		b = hh(b, c, d, a, buffer[i+ 2], 23, 0xC4AC5665);
		
		a = ii(a, b, c, d, buffer[i+ 0],  6, 0xF4292244);
		d = ii(d, a, b, c, buffer[i+ 7], 10, 0x432AFF97);
		c = ii(c, d, a, b, buffer[i+14], 15, 0xAB9423A7);
		b = ii(b, c, d, a, buffer[i+ 5], 21, 0xFC93A039);
		a = ii(a, b, c, d, buffer[i+12],  6, 0x655B59C3);
		d = ii(d, a, b, c, buffer[i+ 3], 10, 0x8F0CCC92);
		c = ii(c, d, a, b, buffer[i+10], 15, 0xFFEFF47D);
		b = ii(b, c, d, a, buffer[i+ 1], 21, 0x85845DD1);
		a = ii(a, b, c, d, buffer[i+ 8],  6, 0x6FA87E4F);
		d = ii(d, a, b, c, buffer[i+15], 10, 0xFE2CE6E0);
		c = ii(c, d, a, b, buffer[i+ 6], 15, 0xA3014314);
		b = ii(b, c, d, a, buffer[i+13], 21, 0x4E0811A1);
		a = ii(a, b, c, d, buffer[i+ 4],  6, 0xF7537E82);
		d = ii(d, a, b, c, buffer[i+11], 10, 0xBD3AF235);
		c = ii(c, d, a, b, buffer[i+ 2], 15, 0x2AD7D2BB);
		b = ii(b, c, d, a, buffer[i+ 9], 21, 0xEB86D391);
		
		a = add(a, temp_a);
		b = add(b, temp_b);
		c = add(c, temp_c);
		d = add(d, temp_d);
	}
	
	return hex( [a, b, c, d] );
}




function FindLanguage()
{
	if (navigator.appName == 'Netscape')
	{
		var language = navigator.language;
	}
	else
	{
		var language = navigator.browserLanguage;
	}
	var code = language.substring(0,2);

	if(code == 'fr' || language=="fr_FR" ) return "French";
	if(code == 'en' || language=="en_US" ) return "French"; /* A RECHANGER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
	if(code == 'nl') return "Nederland";
	
	else
	{
		return "French";
	}

}


function GetXY()
{
	document.location.href="/XY-"+screen.width+"-"+screen.height+"-"+FindLanguage()+".html";
}
