function showPic (whichpic, number, postId) {
	var jsonRequest = new Request.JSON({url: "libs/desc.json.php", onComplete: function(data){
   showDescription(data.desc, number);
	}}).get({'id': postId});

	
  if ($('placeholder'+number)!=null) {
  $('placeholder'+number).src = whichpic.href;
  return false;
 }
else
{
	return true;
}
	
}

function showDescription(desc, number){
	$('desc'+number).set('html', desc);

	
}

function nextPic(wich, holder){
	
	var linkClass = $(wich).get('class');
	var nextPicId = parseInt((linkClass.substr(1, linkClass.length)))+1;
	var nextLink = $('h'+holder+'-i'+nextPicId);
	if(nextLink == null){
		nextPicId = 1;
		nextLink = $('h'+holder+'-i'+nextPicId);
	}
	if(nextLink == null) return false;
	var action = nextLink.get('onclick');
	eval(action.substr(7, action.length));
	$(wich).set('class', 'p'+nextPicId);
	$(wich).href = nextLink.href;
	$('placeholder'+holder).src = nextLink.href;

	return false;
}

