/*
function loadXMLDocOld(){
	var $docname = "carlos_pedroza_tutorials.xml";
	//var $docname = "note.xml";
var $xmlDoc;
// code for IE

if (window.ActiveXObject)
{
$xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
}

// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation && document.implementation.createDocument)
{
	//document.write("Got here!!!");
$xmlDoc=document.implementation.createDocument("","",null);
}
else
{
alert('Your browser cannot handle this script');
}

$xmlDoc.async=false;
$xmlDoc.load($docname);
return($xmlDoc);
 
}
*/
function loadXMLDoc(){
	var docname = "carlos_pedroza_tutorials.xml";
	//var $docname = "note.xml";
var xmlDoc;

if (window.XMLHttpRequest)
	{// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp=new XMLHttpRequest()
	}
	
else // Internet Explorer// code for IE6, IE5
	{
	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
xmlhttp.open("GET","carlos_pedroza_tutorials.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;


return(xmlDoc);
 
}
//---------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------
function getLinks($category){
var $xmlDoc= loadXMLDoc();	
var $linksArray = $xmlDoc.getElementsByTagName("tutorial");
var $numberOfLinksItems = $linksArray.length;

 for($i=0 ;$i< $numberOfLinksItems;$i++)
 	{
 	var $currentLink = $linksArray[$i];
 	var $currentLinkName =  $currentLink.getElementsByTagName("name")[0].childNodes[0].nodeValue ;	
 	var $currentLinkURL =  $currentLink.getElementsByTagName("url")[0].childNodes[0].nodeValue ;
 	var $currentLinkDescription =  $currentLink.getElementsByTagName("description")[0].childNodes[0].nodeValue ;
 	var $currentLinkCategory =  $currentLink.getElementsByTagName("category")[0].childNodes[0].nodeValue ; 
 		
 	if ($category == $currentLinkCategory)
 	{
 	 var $linksSectionHTML ="<table width='80%'><tr>" ;	
	 $linksSectionHTML = $linksSectionHTML+="<td width='135' valign='top' align='right'><span >"; 
	 $linksSectionHTML = $linksSectionHTML+="<a  target='_top' class='linkNameStyle' href='" + $currentLinkURL + "'>"; 
	 $linksSectionHTML = $linksSectionHTML+=$currentLinkName  + "</a></span></td>"; 
	 		
 	 //$linksSectionHTML = $linksSectionHTML+="<td width='160' valign='top'><span class='newsHeaderStyle'>" +  $currentLinkURL  + "</span></td>";	
 	 $linksSectionHTML = $linksSectionHTML+="<td width='350' valign='top'><span class='newsBodyStyle'>" +  $currentLinkDescription  + "</span></td>";
 	 $linksSectionHTML = $linksSectionHTML+="</tr></table>";				
			
 	document.write($linksSectionHTML);
 	}	
 	}	
	
}	
//--------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------
	
