	//On load page, init the timer which check if the there are anchor changes each 300 ms
	document.observe("dom:loaded", function() {
		setInterval("checkAnchor(document.location.hash)", 300);  
	});
	
	var currentAnchor = null;
	
	//Function which chek if there are anchor changes, if there are, sends the ajax petition
	function checkAnchor(){
		//Check if it has changes
		if(currentAnchor != document.location.hash){
			currentAnchor = document.location.hash;
			//if there is not anchor, the loads the default section
			if(!currentAnchor)
				myparam = 16;
			else
			{
				if (currentAnchor == "#web-engineering"){
					myparam = 17;
				}
				else if (currentAnchor == "#home") 
				{
					myparam = 16;
				}
				else if (currentAnchor == "#digital-survey-system") 
				{
					myparam = 18;
				}
				else if (currentAnchor == "#site-tracker") 
				{
					myparam = 19;
				}
			}
			//Send the petition
			getpage(myparam);
		}
	}

	function getpage(myparam)
	{ 
			var req = null; 
			var url = "/our-tools/" + myparam;
	
			/* document.getElementById("zone").innerHTML = "Started..."; */
	
	 
			if (window.XMLHttpRequest)
			{
				req = new XMLHttpRequest();
				if (req.overrideMimeType) 
				{
					req.overrideMimeType('text/xml');
				}
			} 
			else if (window.ActiveXObject) 
			{
				try {
					req = new ActiveXObject("Msxml2.XMLHTTP");
				} catch (e)
				{
					try {
						req = new ActiveXObject("Microsoft.XMLHTTP");
					} catch (e) {}
				}
					}
	
	
	
			req.onreadystatechange = function()
			{ 
				/* document.getElementById("zone").innerHTML = "Wait server..."; */
				if(req.readyState == 4)
				{
					if(req.status == 200)
					{
						/* document.getElementById("zone").innerHTML  = "Received:" + req.responseText;	*/
						document.getElementById("zone").innerHTML  = req.responseText;	
					}	
					else	
					{
						document.getElementById("zone").innerHTML="Error: returned status code " + req.status + " " + req.statusText;
					}	
				} 
			}; 
			req.open("GET", url, true); 
			req.send(null); 
			//alert(currentAnchor);
	} 