/* Créé par Ling pour Multiple-Media.com le 25 avril 2007, gabarit 1 */

function ClearContent(para, remind){

	obj = document.getElementById("SearchField");
	if (para == 0){
	   if (obj.value==remind)
	     obj.value="";
	}
	else
	{
		 if (obj.value==""){
	     obj.value=remind;
	     obj.select();
	   }
	}
}

function highlightItem(index)
{  document.getElementById("menuTop_" + index).className="TabItemHighlight";
   document.getElementById("imgTop_" + index).className="tabPointerVisible";
   document.getElementById("txtTop_" + index).className="MenuHighlight";
}
function normalItem(index)
{  document.getElementById("menuTop_" + index).className="TabItem";
   document.getElementById("imgTop_" + index).className="tabPointerHidden";
   document.getElementById("txtTop_" + index).className="Menu";
}

var SearchButton = "../files/images/template/search-button.gif";
var SearchButtonHighlight = "../files/images/template/search-button-highlight.gif";
var LearnMore = "../files/images/template/learn-more.gif";
var LearnMoreHighlight = "../files/images/template/learn-more-highlight.gif";
var LearnMoreFr = "../files/images/template/learn-more-fr.gif";
var LearnMoreHighlightFr = "../files/images/template/learn-more-highlight-fr.gif";

function highlightButton(index)
{
	 if (index == 0)
	   document.getElementById("Bouton" + index).src=SearchButtonHighlight;
	 else if (index == 1)
     document.getElementById("Bouton" + index).src=LearnMoreHighlight;
   else if (index == 2)
     document.getElementById("Bouton" + index).src=LearnMoreHighlightFr;
}
function normalButton(index)
{
	 if (index == 0)
	   document.getElementById("Bouton" + index).src=SearchButton;
	 else if (index == 1)
     document.getElementById("Bouton" + index).src=LearnMore;
	 else if (index == 2)
     document.getElementById("Bouton" + index).src=LearnMoreFr;
}


function showDetail() {
	document.getElementById('modalWin').style.width = document.body.clientWidth + 'px';
	document.getElementById('modalWin').style.height = window.screen.height + 'px';
	document.getElementById('modalWin').className='modalWin';
}


var xmlhttp;
function loadXMLDoc(url)
{
xmlhttp=null;
if (window.XMLHttpRequest)
  {// code for IE7, Firefox, Opera, etc.
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
if (xmlhttp!=null)
  {
 // xmlhttp.setRequestHeader("Content-Type", "application/x-javascript; charset=ISO-8859-1");  
  
  xmlhttp.onreadystatechange=state_Change;						  
  xmlhttp.open("GET",url,true);						  
  xmlhttp.send(null);
  }
else
  {
  alert("Your browser does not support XMLHTTP.");
  }
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
	{// 200 = "OK"
	//alert(xmlhttp.responseText);	
	document.getElementById('modalWin').innerHTML=xmlhttp.responseText;							
	showDetail();
	}
  else
	{
	alert("Problem retrieving XML data:" + xmlhttp.statusText);
	}
  }
}
						
						


function ReportErrors(responseText) {
	alert("Error:" + responseText);
}


function ProcessResults(responseText) {
	document.getElementById('modalWin').innerHTML = responseText;
	showDetail();
}


