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 != window.location.hash){
		currentAnchor = window.location.hash;
		//if there is not anchor, the loads the default section
		if(!currentAnchor)
			{
			query = './pages/home.php';
			ajaxpage(query,'content');
			}
		else
		{
			//Creates the  string callback. This converts the url URL/#main&id=2 in URL/?section=main&id=2
			var splits = currentAnchor.substring(1).split('_');
			//Get the section
			var section = splits[0];
			delete splits[0];
			//Create the params string
			var params = splits.join('c=');
			var query = './pages/' + section +'.php?' + params;
			ajaxpage(query,'content');
		}
		//alert (query);
	}
}
