function SetAlternateViews(ZOOM_WIDTH_FRAME, FRAME_WIDTH, FRAME_HEIGHT, IMAGE_SOURCE) {

//	var ZOOM_WIDTH_FRAME = $!imgWidthLarge;
//	var FRAME_WIDTH = $!imgWidthAlt;
//	var FRAME_HEIGHT = $!imgHeightAlt;
//	var IMAGE_SOURCE = "$!imgAlt";

	var img = new Image();
	img.onload = function() {
		// need to remove these in of case img-element has set width and height
		//$(this).removeAttr("width").removeAttr("height");

		var pic_real_width = this.width;
		var pic_real_height = this.height;
		var count = pic_real_width / FRAME_WIDTH;
		
		if (count > 1)	$("#prodcut-alternate-views").fadeIn('slow');

		var i = 1;
		for (i = 1; i < count; i++) {
			var thumb = document.createElement("a");
			$(thumb)
			.attr({ spriteLeft: 0 - i * ZOOM_WIDTH_FRAME + "px" })
			.mouseover(function() { $("#swapper").css("left", $(this).attr("spriteLeft")); })
			.mouseout(function() { $("#swapper").css("left", "0px"); })
			.appendTo($("#prodcut-alternate-views-inner"));
			var thumbimg = document.createElement("div");
			$(thumbimg).css({ "width": FRAME_WIDTH, "height": pic_real_height, "background": "url('" + img.src + "') no-repeat " + (0 - i * FRAME_WIDTH) + "px 0" })
			.appendTo($(thumb));
			$(thumb).fadeIn('slow');
		}
	};

	img.src = IMAGE_SOURCE; // Trigger onload event if image is cached
}
