function new_xhr(){
	  var xhr_object = null;
	  if(window.XMLHttpRequest) // Firefox et autres
	     xhr_object = new XMLHttpRequest();
	  else if(window.ActiveXObject){ // Internet Explorer
	   try {
                xhr_object = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
            }
	  }
	  else { // XMLHttpRequest non supporté par le navigateur
	   alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
	   xhr_object = false;
	  }
	  return xhr_object;
	}
	
	var globaleval =  function(script)
	{
		if(window.execScript)
		{
			return window.execScript(script);
		} 
		else if(navigator.userAgent.indexOf('KHTML') != -1)
		{ //safari, konqueror..
			var s = document.createElement('script');
			s.type = 'text/javascript';
			s.innerHTML = script;
			document.getElementsByTagName('head')[0].appendChild(s);
		} 
		else
		{
			return window.eval(script);
		}
	}
	
	
function getWindowHeight() {
    var windowHeight=0;
    if (typeof(window.innerHeight)=='number') {
        windowHeight=window.innerHeight;
    }
    else {
     if (document.documentElement&&
       document.documentElement.clientHeight) {
         windowHeight = document.documentElement.clientHeight;
    }
    else {
     if (document.body&&document.body.clientHeight) {
         windowHeight=document.body.clientHeight;
      }
     }
    }	
	//alert(windowHeight);
    return windowHeight;
}

function setContent_contentSize()
{	
		var windowHeight=getWindowHeight();	
		var contenuPrincipal = document.getElementById('content').offsetHeight;
		//alert(contenuPrincipal);
		//alert(windowHeight);
		
		if((contenuPrincipal+280) < windowHeight)
		{
			document.getElementById('content').style.height = (windowHeight - 280) +'px';//alert((windowHeight - 274));
		}
		/*
		if(contenuPrincipal>520 && windowHeight>770)
		{
			var taille;
			if(contenuPrincipal<windowHeight)
			{
				taille = windowHeight-(windowHeight-contenuPrincipal+42);
				document.getElementById('content_content').style.height = taille +'px';
			}
			//else{taille = contenuPrincipal-42}
			//document.getElementById('content_content').style.height = taille +'px';//alert((windowHeight - 274));
		}
		if(contenuPrincipal>520 && windowHeight<770)
		{
			document.getElementById('content_content').style.height = contenuPrincipal-42 +'px';//alert((windowHeight - 274));
		}
		if(contenuPrincipal<520 && windowHeight<770)
		{
			document.getElementById('content_content').style.height = 520 - 42 +'px';//alert((windowHeight - 274));
		}
		*/
}

window.onload = function() {
setContent_contentSize();
}

window.onresize = function() {
setContent_contentSize();
}