var picCounter=1;
$(function(){
if($("#picContainer").length>0)getPic(0);		   
  $(".arrowLeft").click(function(){
			getPic(0)}).css("cursor","pointer");		
					
  $(".arrowRight").click(function(){
	        getPic(1)})	.css("cursor","pointer");
					
		   })
function getPic(d){
	$("#picContainer").html('<img src="/images/loader.gif"  style="margin-top:155px"/>');
  if(d){
	if ( picCounter<totalPics) {
		picCounter++;
	}else{
		picCounter=1;
	}
  }else{
	  if(picCounter>1){
		  picCounter--;
	  }else{
		  picCounter=totalPics;
	  }
  }
$("#picContainer").load('/getPic.asp',{"picNo":picCounter,"folder_id":folder_id,"h":dx},function (){
	 
});
}
$(function(){adjustHeights();});
$(window).resize(function(){adjustHeights();});
function adjustHeights(){
	var nh=$(window).height()-($("#header").height()+$("#footer").height());
         if((h&&nh>650)||(!h&&nh>500)) $("#container").height(nh);
}
$(function(){
		   var mail=$(".email").attr("href");
		   mail=mail.replace("x","@");
		   mail=mail.replace("y",".");
		   $(".email").attr("href",mail);
		   })