// JavaScript Document w0d | Lab Test AJAX
var xmlhttp
var url
var tag
// Chargement des donnés, document à charger, TAG où doivent être chargé les données. 
function loadXMLDoc(url,tag)
	{
	
	document.getElementById(tag).innerHTML= "Chargement..."
	
	// code for Mozilla, etc.
	if (window.XMLHttpRequest)
		{
		xmlhttp=new XMLHttpRequest()
		xmlhttp.onreadystatechange=state_Change
		xmlhttp.open("GET",url,true)
		xmlhttp.send(null)
  
  		}
	// code for IE
	else if (window.ActiveXObject)
		{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
   		if (xmlhttp)
    		{
			xmlhttp.onreadystatechange=state_Change
			xmlhttp.open("GET",url,true)
    		xmlhttp.send()
    		}
 		}
		
	// Chargement du DIV
	function state_Change()
		{
		// if xmlhttp shows "loaded"
		if (xmlhttp.readyState==0)
			{
   			document.getElementById(tag).innerHTML = "Connexion..."
  			}
 		if (xmlhttp.readyState==4)
 			{
 			// if "OK"
 			if (xmlhttp.status==200)
 			{
  			document.getElementById(tag).innerHTML= xmlhttp.responseText
   			}
  		else
  			{
  			document.getElementById(tag).innerHTML= xmlhttp.statusText
  			}
  		}  
  	}
}

function fermer(tagid)
	{
		if (tagid=="Tutor")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Scripts et outils divers   </font>"
		}
		
		if (tagid=="Inspiration")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Sites qui inspire  </font>"
		}
		if (tagid=="funnystuff")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Funny stuff</font>"
		}
		
	if (tagid=="DayTrader")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;March&eacute; boursier, Cote, forums, blogs</font>"
		}
	if (tagid=="FTA")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;FTA, Forums, Tutorials, keys.</font>"
		}
	if (tagid=="Onlineshop")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Magasins en ligne.</font>"
		}
	
 	if (tagid=="MODS")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Electronique, Ordinateurs </font>"
		}
if (tagid=="google")
		{
		document.getElementById(tagid).innerHTML= "google"
		}
 	if (tagid=="PokerBlog")
		{
		document.getElementById(tagid).innerHTML= "<font color='#000000' size='1'><a href='http://www.fullcontactpoker.com/' class='style28'><font color='#000000'>&nbsp;Full Contact Poker</font></a></font>"
		}
	if (tagid=="PokerRoom")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Online poker room </font>"
		}
	if (tagid=="Clients")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Sites Clients </font>"
		}
		
	if (tagid=="Local")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Sites Clients &nbsp;sur serveur local</font>"
		}
	if (tagid=="webradio")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Radio paradise, webmaster radio..</font>"
		}
	if (tagid=="TV")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Bell, tv hebdo, SRC, TVA... </font>"
		}
	if (tagid=="BANK")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;MC, Neteller, Desjardins, TD</font>"
		}
	if (tagid=="Podcast")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;SEO, Poker, Tech</font>"
		}
	if (tagid=="PokerNews")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Sites de nouvelles</font>"
		}
	if (tagid=="cloud")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Sites non classé</font>"
		}
	
	if (tagid=="Bookmarks")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Liens divers</font>"
		}
	if (tagid=="admin")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'>&nbsp;Autocollant, comptable, d-link</font>"
		}
	if (tagid=="partenaires")
		{
		document.getElementById(tagid).innerHTML= "<font color='#999999'></font>"
		}
	}
// ****************************************************************************************


// JavaScript Document w0d | Lab Test AJAX

// Chargement des donnés, document à charger, TAG où doivent être chargé les données. 
function LoadNEWS()


	{
	url = "../feeds/newsFEED.aspx"
	
	document.getElementById('date').innerHTML= "Chargement..."
	
	// code for Mozilla, etc.
	if (window.XMLHttpRequest)
		{
		xmlhttp=new XMLHttpRequest()
		xmlhttp.onreadystatechange=state_ChangeB
		xmlhttp.open("GET",url,true)
		xmlhttp.send(null)
  
  		}
	// code for IE
	else if (window.ActiveXObject)
		{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
   		if (xmlhttp)
    		{
			xmlhttp.onreadystatechange=state_ChangeB
			xmlhttp.open("GET",url,true)
    		xmlhttp.send()
    		}
 		}
		
	// Chargement du DIV
	function state_ChangeB()
		{
		// if xmlhttp shows "loaded"
		if (xmlhttp.readyState==0)
			{
   			document.getElementById('date').innerHTML = "Connexion..."
  			}
 		if (xmlhttp.readyState==4)
 			{
 			// if "OK"
 			if (xmlhttp.status==200)
 			{
				document.getElementById('date').innerHTML = "Connexion..."
			results = xmlhttp.responseText.split(",");

 		   document.getElementById('date').innerHTML = results[0];

   			document.getElementById('titre').innerHTML = results[1];
			
   			document.getElementById('lien').innerHTML = results[2];
   			}
  		else
  			{
  			document.getElementById(tag).innerHTML= xmlhttp.statusText
  			}
  		}  
  	}
}
