
function showbox(img,link,side) {

	// set HTML
	var newHTML;
	newHTML = '<img src="/design_page_2010/design_map/designbox_top.png" width="380" height="15" alt="" />';
	newHTML = newHTML + '<div class="mid">';
	newHTML = newHTML + '<img src="' + img + '" width="360" height="300" border="0"><br />';
	newHTML = newHTML + '<h3>http://' + link + '</h3></div>';
	newHTML = newHTML + '<img src="/design_page_2010/design_map/designbox_bot.png" width="380" height="15" alt="" />';

	// generate preview box
	var thisbox = document.getElementById( 'designbox' );
	thisbox.style.display = 'block';
	thisbox.innerHTML = newHTML;

	// determine browser width: create variables
	var browserwidth;
	var browserheight;

	// determine browser width: standards-compliant browsers
	if (typeof window.innerWidth != 'undefined')
	{
		browserwidth = window.innerWidth;
		browserheight = window.innerHeight;
	}
	// determine browser width: IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	else if (typeof document.documentElement != 'undefined'
		&& typeof document.documentElement.clientWidth !=
		'undefined' && document.documentElement.clientWidth != 0)
	{
		browserwidth = document.documentElement.clientWidth;
		browserheight = document.documentElement.clientHeight;
	}
	// determine browser width: older versions of IE
	else
	{
		browserwidth = document.getElementsByTagName('body')[0].clientWidth;
		browserheight = document.getElementsByTagName('body')[0].clientHeight;
	}

	// set placement variables
	var boxwidth = 380;
	var boxheight = 360;
	var boxleft;
	var thumbnailwidth = 90;

	// determine the y-position of the preview box
	thisbox.style.top = (browserheight - boxheight)/2 + "px";

	// determine the x-position of the preview box
	if (side == 'left') {
		boxleft = (browserwidth)/2 + (thumbnailwidth)/2 + 20;	
	} else {
		boxleft = (browserwidth)/2 - boxwidth - (thumbnailwidth)/2 - 30;	
	}
	// set the left position of the box
	thisbox.style.left = boxleft + "px";
}

function hidebox() {
	var thisbox = document.getElementById( 'designbox' );
	thisbox.style.display = 'none';
}
