
	var handlerSwapImage = function SwapImage_Callback(str) {   	
   		document.getElementById('mainphotodiv').innerHTML = str.responseText;
  	}
	

	function SwapImage(pid,setid)
	{
		document.getElementById('mainphoto').src = 'images/loading.gif';
		//document.getElementById('mainphoto').align = 'absmidddle';
    	//document.getElementById('mainphotodiv').innerHTML = 'Loading...';
    	new Ajax.Updater('mainphotodiv','/plugins/pictures/ajaxPhoto.php?pid='+pid+'&setids='+setid+'', { method:'get', asynchronous:true,  onSuccess:handlerSwapImage });
	}
	
	function SwapImage3(pid)
	{
		document.getElementById('mainphoto').src = 'images/loading.gif';
		//document.getElementById('mainphoto').align = 'absmidddle';
    	//document.getElementById('mainphotodiv').innerHTML = 'Loading...';
    	new Ajax.Updater('mainphotodiv','/plugins/pictures/ajaxPhoto.php?action=mainphoto&pid='+pid+'', { method:'get', asynchronous:true,  onSuccess:handlerSwapImage });
	}
	
	var handlerNextImage = function NextImage_Callback(str) {   	
   		document.getElementById('thumbs').innerHTML = str.responseText;
  	}
  	
	function NextImage(action)
	{
		new Ajax.Updater('thumbs','/plugins/pictures/ajaxPhoto.php?action=thumbs&go='+action, { method:'get', asynchronous:true,  onSuccess:handlerNextImage });
	}
	
	var handlerNextImage_big = function NextImage_big_Callback(str) {   	
   		document.getElementById('mainphotodiv').innerHTML = str.responseText;
  	}
  	
	function NextImage_big(action)
	{
		new Ajax.Updater('mainphotodiv','/plugins/pictures/ajaxPhoto.php?action=big&go='+action, { method:'get', asynchronous:true,  onSuccess:handlerNextImage_big });
	
	}
	
	
	// Portfolio tags...:
	
	function SwapImage2(pid,tag)
	{
		document.getElementById('mainphoto').src = 'images/loading.gif';
		//document.getElementById('mainphoto').align = 'absmidddle';
    	//document.getElementById('mainphotodiv').innerHTML = 'Loading...';
    	new Ajax.Updater('mainphotodiv','/plugins/pictures/ajaxPhoto.php?pid='+pid+'&tag='+tag+'', { method:'get', asynchronous:true,  onSuccess:handlerSwapImage });
   	 	
	}

