function getAgentsFromProvince(id)
{
	advAJAX.get
	({
	    url: "ajax/ajaxAgents.php",
	    parameters : 
	    {
	    	'action' : 'getAgentsFromProvince',
	    	'id' : id
	    },
	    onLoading : function(obj)
	    {
	    	//showLoading();
	    },
	    onError : function(obj) 
	    {
	    	alert(obj.status);
	    },
	    onSuccess : function(obj) 
	    {
	    	//hideLoading();
	    	
	    	//showGalleryDetails(currentGallery);
	    	document.getElementById('province').innerHTML = obj.responseText; 
	    }
	    
	});
}

function getAgentsFromWorld(id)
{
	advAJAX.get
	({
	    url: "ajax/ajaxAgents.php",
	    parameters : 
	    {
	    	'action' : 'getAgentsFromCountry',
	    	'id' : id
	    },
	    onLoading : function(obj)
	    {
	    	//showLoading();
	    },
	    onError : function(obj) 
	    {
	    	alert(obj.status);
	    },
	    onSuccess : function(obj) 
	    {
	    	//hideLoading();
	    	
	    	//showGalleryDetails(currentGallery);
	    	document.getElementById('country').innerHTML = obj.responseText; 
	    }
	    
	});
}

function showGalleryDetails(id)
{
	advAJAX.get
	({
	    url: "ajax/ajaxGallery.php",
	    parameters : 
	    {
	    	'action' : 'galleryDetails',
	    	'id' : id
	    },
	    onLoading : function(obj)
	    {
	    	
	    },
	    onError : function(obj) 
	    {
	    	alert(obj.status);
	    },
	    onSuccess : function(obj) 
	    {
	    	document.getElementById('gallery').style.display = 'none';
	    	document.getElementById('galleryContent').innerHTML = obj.responseText;	 
	    	//currentGallery = id;
	    	initLightbox(); 
	    	
	    }
	    
	});
}

function showGallery()
{
	document.getElementById('galleryContent').innerHTML = '';
	document.getElementById('gallery').style.display = 'block';
}