function resetScrollPane(){
                    return;
						$c = $('#gallery-contents');
						$c.css({'overflow':'auto'});
						
						var wid='';
						wid=$c.width()-74;
						$('#gallery-foot').css('width',wid);
                        
						//$c.height($c.height()-40);
            try{
						$c.jScrollPane({reinitialiseOnImageLoad: false,wheelSpeed: 52});
						
						var dims=$c.jScrollPane({reinitialiseOnImageLoad: false,wheelSpeed: 52});
						if($c[0])
							{
							$c[0].scrollTo(0);
							
							
							}
            }catch(ex){}
            
						if($('#gallery-image').is(":visible")){
							$c=$('#gallery>.jScrollPaneContainer');
							$i=$('#gallery-image');
							$i.height($c.height()-40);
							$i.width($c.width()-40);
							var wid=$c.width()-74;
							$('#gallery-foot').css('width',wid);

						}
	
}

function resetPrev(){
	$('#nav_previous').empty();
	$('#nav_previous').removeAttr('go');
	$('#nav_previous').removeAttr('elid');
	$('#nav_previous').unbind('click');
	$('#nav_previous_bx').hide();

}

function resetNext(){
	$('#nav_next').empty();
	$('#nav_next').removeAttr('go');
	$('#nav_next').removeAttr('elid');
	$('#nav_next').unbind('click');
	$('#nav_next_bx').hide();

}

function resetPrevNext(){
resetPrev();
resetNext();
}

function getNextImg(){

//alert( "getNextImg..." );
try{
	nextimgid='gallery-thumbs-'+currGal+'_thumb_'+currX+'_'+(parseInt(currY)+1);//+'_img';
	
	//alert( "nextimgid: " + nextimgid);
	if($('#'+nextimgid).length<1) {
		//alert( "nextimgid length < 1" );
		nextimgid='gallery-thumbs-'+currGal+'_thumb_'+(parseInt(currX)+1);//+'_0_img';
	}
	if($('#'+nextimgid).length<1) {
		nextimgid='';
	}
}catch(ex){
	nextimgid='';
	
	}
return nextimgid;
}

function getPrevImg(){
try{
	previmgid='gallery-thumbs-'+currGal+'_thumb_'+currX+'_'+(parseInt(currY)-1);//+'_img';
	
	if($('#'+previmgid).length<1)
		previmgid='gallery-thumbs-'+currGal+'_thumb_'+(parseInt(currX)-1)+'_'+(gallery_data['gallery-thumbs-'+currGal]["images"][parseInt(currX)-1].length-1);//+'_img';
	
	if($('#'+previmgid).length<1)
		previmgid='';
}catch(ex){
	previmgid='';
	
	}

return previmgid;	
}
