//$(document).ready(function(){
//    $("#photo_images").click(function(){
//        $("#photo_images").hide();
//    });
//});

function photo_next()
{
	total = $("#photo_images").width();
	total = -total+150;
	margin = $("#photo_images").css("margin-left");
	margin = parseInt(margin);
	margin = margin-150;
	if (total < margin)
		$("#photo_images").css("margin-left",margin+"px");
}

function photo_previous()
{
	total = $("#photo_images").width();
	total = total-150;
	margin = $("#photo_images").css("margin-left");
	margin = parseInt(margin);
	margin = margin+150;
	if (margin <= 0)
		$("#photo_images").css("margin-left",margin+"px");
}

function show_photo(id,id_gallery,id_client)
{
    $("#block").html(" ");
    $("#paginator").html(" ");
    $("#comment_top").html(" ");
    
    $("#photo_detail").show();
    element = "photo_detail";
    if (id=="")
      {
      document.getElementById(element).innerHTML="";
      return;
      } 
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById(element).innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET","utils/ajax/photo_gallery.php?id="+id+"&id_gallery="+id_gallery+"&id_client="+id_client,true);
    xmlhttp.send();
	
}

function show_insert_comment()
{
	$("#comment_write").slideDown();
}
