function galleryimage_getImage(galleryName)
{
    jQuery.get(code_path + '/galeria_imagen.php?gallery=' + galleryName, function(data) {
		galleryimage_setImage(data);
    });
};

function galleryimage_setImage(data)
{
// Simply add all items at once and set the size accordingly.
	if( data != '' ) {
		var reg = data.split('||');	//divido los registros por doble pipe
		var imagenLink;
		var imagenTitle;
		var imagenFile;
		var html = "";

		for( i = 0 ; i < reg.length ; i++ ) {
			var item = reg[i].split('|');	//dentro del registro, divido los campos por pipe simple

			imagenLink = item[0];	
			imagenTitle = item[1];	
			imagenFile = item[2];	

			html += galleryimage_setImageHTML(imagenLink, imagenTitle, imagenFile);
		}

		var thumbnail = document.getElementById("thumbnail");

		thumbnail.innerHTML = html;
	}
};

function galleryimage_setImageHTML(url, title, imagesrc)
{
	var html;

	html = '<a href="' + url + '" rel="lyteshow[galeria]" class="thumbnail" title="' + title + '">';
	html += imagesrc + '</a>';

	return html;
};

function intropage_getImage(galleryName)
{
    jQuery.get(code_path + '/galeria_imagen.php?gallery=' + galleryName + '&path=' + code_path, function(data) {
		intropage_setImage(data);
    });
};

function intropage_setImage(data)
{
// Simply add all items at once and set the size accordingly.
	if( data != '' ) {
		var reg = data.split('||');	//divido los registros por doble pipe

		var qty = albumImage.length;

		for( var j = 0 ; j < reg.length ; j++ ) {
			var item = reg[j].split('|');	//dentro del registro, divido los campos por pipe simple

			imagenLink = relative_path + "/" + item[0];	

			MM_preloadImages(imagenLink);

			albumImage[qty++] = imagenLink;
		}
	}
};

