function make_fisheye(options)	{
	// make sure options are sufficient
	if(	options == null ||
		options.base_width == null ||
		options.magnification == null ||
		options.link_list == null ||
		options.image_list == null ||
		options.label_list == null ||
		options.link_list.length != options.image_list.length ||
		options.label_list.length != options.link_list.length
	)	{
		alert('Incomplete parameter list.');
		return 0;
	}
	
	var fisheye_element = document.createElement('div');
	fisheye_element.innerHTML = '';
	for(var i = 0; i < options.image_list.length; i++)	{
		fisheye_element.innerHTML += '<img src="' + options.image_list[i] + '" onclick="window.location = \'' + options.link_list[i] + '\';" alt="' + options.label_list[i] + '"/>';
	}
	fisheye_element.style.position = 'absolute';
	fisheye_element.style.left = '0px';
	fisheye_element.style.top = options.base_top + 'px';
	fisheye_element.style.display = 'none';
	fisheye_element.slide_fx = new Fx.Styles(fisheye_element, {duration: 500, transition: Fx.Transitions.backOut});	
	fisheye_element.options = options;
	
	/*fisheye_element.onmousemove = function(evt)	{
		var mouse_offset = getMousePos(evt).split(',')[1] - this.options.base_top;
		var icons = this.getElementsByTagName('img');
		icon_number = parseInt(mouse_offset / this.options.base_width);
		// icons[icon_number].style.width = parseInt(this.options.base_width * this.options.magnification - mouse_offset) + 'px';
		// icons[icon_number].style.height = parseInt(this.options.base_width * this.options.magnification - mouse_offset) + 'px';
		
		for(var i = 0; i < icons.length; i++)	{
			icon_center = this.options.base_width * (i + 0.5);
			mouse_distance = Math.abs(mouse_offset - icon_center);
			magnification = Math.max(this.options.magnification / (mouse_distance + 1), 1);
			icons[i].style.width = magnification * this.options.base_width + 'px';
			icons[i].style.height = magnification * this.options.base_width + 'px';
		}
		$('title').innerHTML = icon_center + ',' + mouse_offset + ',' + icon_number + ',' + (options.base_width * options.magnification - mouse_offset);			
	}*/
	
	document.body.appendChild(fisheye_element);
	
	// clean out useless stuff
	fisheye_element.cleanWhitespace();	
	
	// make sure we got a div full of imgs
	var fisheye_images = fisheye_element.getElementsByTagName('img');
	var tooltip;
	for(var i = 0; i < fisheye_images.length; i++)	{
		fisheye_images[i].style.display = 'block';	
		fisheye_images[i].style.border = 'none';	
		fisheye_images[i].style.cursor = 'pointer';	
		fisheye_images[i].style.height = options.base_width + 'px';	
		fisheye_images[i].style.width = options.base_width + 'px';	
		fisheye_images[i].style.position = 'relative';	
		fisheye_images[i].style.top = 0;
		fisheye_images[i].ordinal = i;		
		// fisheye_images[i].style.opacity = .75;
		// fisheye_images[i].style.filter = 'alpha(opacity=75)';		
		// tooltip stuff
		tooltip = document.createElement('div');
		tooltip.innerHTML = '<a href="' + options.link_list[i] + '">' + options.label_list[i] + '</a>';
		tooltip.style.fontVariant = 'small-caps';
		// tooltip.style.position = 'absolute';
		tooltip.style.padding = 0;
		tooltip.style.fontWeight = 'bold';
		tooltip.style.margin = 0;
		tooltip.style.fontSize = '11px';
		tooltip.style.textAlign = 'left';
		tooltip.style.filter = 'alpha(opacity=65)';
		// tooltip.style.opacity = .65;
		fisheye_element.insertBefore(tooltip, fisheye_images[i].nextSibling);
		
		// the following code only will execute in internet explorer 6 and below -----
		/*@cc_on
		// if(@_jscript_version <= 5.6)	{
			fisheye_images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + fisheye_images[i].src + "', sizingMethod='scale')";
			fisheye_images[i].src = 'images/blank.gif';
		// }
		@*/
		// end ie-only code ----------------------------------------------------------		
	}
	
	for(var i = 0; i < fisheye_images.length; i++)	{
		fisheye_images[i].style.width = options.base_width + 'px';
		fisheye_images[i].zoom_fx = new Fx.Styles(fisheye_images[i], {duration: 500, transition: Fx.Transitions.backOut});	
		fisheye_images[i].onmouseover = fisheye_mouseover;
		fisheye_images[i].onmouseout = fisheye_mouseout;
		if(options.link_list[i].indexOf('javascript:') == -1)
			Event.observe(fisheye_images[i], 'click', fisheye_onclick, false);
	}
	
	fisheye_element.style.display = 'block';
}				

function fisheye_onclick()	{
	// disabled temp
	return 0;
	
	if(this && this.parentNode)	{
		var fisheye_images = this.parentNode.getElementsByTagName('img');
		for(var i = 0; i < fisheye_images.length; i++)	{
			if(	fisheye_images[i] != this)	{
				fisheye_images[i].zoom_fx.clearTimer();
				fisheye_images[i].zoom_fx.custom({
					'opacity' : [1, 0]
				});
				fisheye_images[i].nextSibling.style.visibility = 'hidden';
			}
		}
	}
}

function fisheye_mouseover()	{
	options = this.parentNode.options;
	
	/*this.parentNode.slide_fx.clearTimer();
	this.parentNode.slide_fx.custom({
		'right' : [options.right_offset, options.right_offset - options.base_width * options.magnification * 1.5]
	});*/
	
	this.parentNode.slide_fx.clearTimer();
	this.parentNode.slide_fx.custom({
		'top' : [this.parentNode.offsetTop, options.base_top - options.base_width * options.magnification / 4 - Math.min(1, this.ordinal) * options.base_width * options.magnification / 2 * 3/5 - (options.base_width * options.magnification - options.base_width) / 4]
	});
	
	this.zoom_fx.clearTimer();
	this.zoom_fx.custom({
		'width' : [this.offsetWidth, options.base_width * options.magnification],
		'height' : [this.offsetWidth, options.base_width * options.magnification]
	});
	
	if(this.nextSibling != null && this.nextSibling.nextSibling != null)	{
		this.nextSibling.nextSibling.zoom_fx.clearTimer();
		this.nextSibling.nextSibling.zoom_fx.custom({
			'width' : [this.nextSibling.nextSibling.offsetWidth, options.base_width * options.magnification * 3/5],
			'height' : [this.nextSibling.nextSibling.offsetWidth, options.base_width * options.magnification * 3/5]
		});
	}
	if(this.previousSibling != null && this.previousSibling.previousSibling != null)	{
		this.previousSibling.previousSibling.zoom_fx.clearTimer();
		this.previousSibling.previousSibling.zoom_fx.custom({
			'width' : [this.previousSibling.previousSibling.offsetWidth, options.base_width * options.magnification * 3/5],
			'height' : [this.previousSibling.previousSibling.offsetWidth, options.base_width * options.magnification * 3/5]
		});
	}
	/*for(var i = 0; i < this.parentNode.childNodes.length; i++)	{
		if(	this.parentNode.childNodes[i] == this)	{
			target_offset_adjustment = options.base_width * options.magnification * 1 / 8;
		}
		else	{
			target_offset_adjustment = (
					(this.nextSibling != null && this.parentNode.childNodes[i] == this.nextSibling) || 
					(this.previousSibling != null && this.parentNode.childNodes[i] == this.previousSibling)
				) ? -1 * options.base_width * options.magnification * 1 / 4 : options.base_width - options.magnification * options.base_width;
		}
		offset = parseInt(this.parentNode.childNodes[i].style.right.substring(0, this.parentNode.childNodes[i].style.right.length - 2));
		this.parentNode.childNodes[i].vertical_fx.clearTimer();
		this.parentNode.childNodes[i].vertical_fx.custom({
			'right' : [offset, target_offset_adjustment]
		})
	}*/
	
	// if(this.tooltip != null)
	//	this.parentNode.insertBefore(this.tooltip, this.nextSibling.nextSibling);
}
		
function fisheye_mouseout()	{
	options = this.parentNode.options;

	/*this.parentNode.slide_fx.clearTimer();
	this.parentNode.slide_fx.custom({
		'right' : [options.right_offset - options.base_width * options.magnification * 1.5, options.right_offset]
	});*/
	
	this.parentNode.slide_fx.clearTimer();
	this.parentNode.slide_fx.custom({
		'top' : [this.parentNode.offsetTop, this.parentNode.options.base_top]
	});
	
	
	// if(this.tooltip != null)
	//	this.parentNode.removeChild(this.nextSibling.nextSibling);
	
	this.zoom_fx.clearTimer();
	this.zoom_fx.custom({
		'width' : [this.offsetWidth, options.base_width],
		'height' : [this.offsetWidth, options.base_width]
	});
	if(this.nextSibling != null && this.nextSibling.nextSibling != null)	{
		this.nextSibling.nextSibling.zoom_fx.clearTimer();
		this.nextSibling.nextSibling.zoom_fx.custom({
			'width' : [this.nextSibling.nextSibling.offsetWidth, options.base_width],
			'height' : [this.nextSibling.nextSibling.offsetWidth, options.base_width]
		});
	}
	if(this.previousSibling != null && this.previousSibling.previousSibling != null)	{
		this.previousSibling.previousSibling.zoom_fx.clearTimer();
		this.previousSibling.previousSibling.zoom_fx.custom({
			'width' : [this.previousSibling.previousSibling.offsetWidth, options.base_width],
			'height' : [this.previousSibling.previousSibling.offsetWidth, options.base_width]
		});
	}
	
	/*for(var i = 0; i < this.parentNode.childNodes.length; i++)	{
		this.parentNode.childNodes[i].vertical_fx.clearTimer();
		offset = parseInt(this.parentNode.childNodes[i].style.right.substring(0, this.parentNode.childNodes[i].style.right.length - 2));
		this.parentNode.childNodes[i].vertical_fx.custom({
			'right' : [offset, 0]
		})
	}*/
}
