﻿// JScript File
function showImage(ctrl,showTitle)
{
	if (showTitle == null)
		showTitle = false;
    
	var imgPreloader = new Image();
	imgPreloader.onload = function() {
		var imageWidth = imgPreloader.width;
		var imageHeight = imgPreloader.height;

		jQuery("#fullImage").attr("src", jQuery(ctrl).attr('rel'));
		jQuery("#fullImage").attr("width", imageWidth);
		jQuery("#fullImage").attr("height", imageHeight);
		if (jQuery(ctrl).attr('alt'))
		{
			jQuery("#fullImage").attr("alt", jQuery(ctrl).attr('alt'));
		}
		jQuery("#fullImage").show();
		imgPreloader.onload = function() {};
  
		if (jQuery("#imgTitle") && jQuery(ctrl).attr('alt') && showTitle)
		{
			jQuery("#imgTitle").text(jQuery(ctrl).attr("alt"));
		}
	}
	imgPreloader.src = jQuery(ctrl).attr('rel');
}

