var modPhotoGallery_itemLargeImg_load  = new Image();
var modPhotoGallery_itemLargeImg_prev  = 1;

function j_module_photogallery_public_items_showMedium( cID, urlMed, urlBig) {
	
	if (modPhotoGallery_itemLargeImg_prev == cID) {
		return true;
	}
	
	var obj = j_common_getElement ('modPhotoGallery_bigImage_Enlarge_loading');
	
	if (obj) {
		obj.style.visibility = 'visible';
	}
	

	modPhotoGallery_itemLargeImg_load.src = urlMed;
	modPhotoGallery_itemLargeImg_load.onload = j_module_photogallery_public_items_showMedium_loaded;	

	var obj = j_common_getElement ('modPhotoGallery_bigImage_Enlarge');
	
	if (obj) {
		obj.href = urlBig;
	}
	
	
	obj = j_common_getElement ('modPhotoGallery_bigImage_Enlarge_'+cID);
		
	if (obj) {
		obj.rel="lightbox[mod_photogallery_items_bypass]";
	}
		
	obj = j_common_getElement ('modPhotoGallery_bigImage_Enlarge_'+modPhotoGallery_itemLargeImg_prev);
		
	if (obj) {
		obj.rel="lightbox[mod_photogallery_items]";
	}
		
	modPhotoGallery_itemLargeImg_prev = cID;
}

function j_module_photogallery_public_items_showMedium_loaded () {
	
	j_public_imageSlideEffect ( 'modPhotoGallery_mediumImage' , modPhotoGallery_itemLargeImg_load.src , 1 );
	var obj = j_common_getElement ('modPhotoGallery_bigImage_Enlarge_loading');
	if (obj) {
		obj.style.visibility = 'hidden';
	}	
}

