function galleryView(image) {
	var win = window.open('galleryview.cfm?image=' + image + '', 'newwin', 'width=642,height=392');
}

function replaceWineCat(str) {
	/* */
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="45">');
	document.write('<param name="movie" value="includes/winecat.swf">');
	document.write('<param name="quality" value="high">');
	document.write('<param name="scale" value="noscale">');
	document.write('<param name="salign" value="LT">');
	document.write('<param name="flashvars" value="&flashtext=' + str + '">');
	document.write('<embed src="includes/winecat.swf" quality="high" scale="noscale" salign="LT" flashvars="&flashtext=' + str + '" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="45"></embed>');
	document.write('</object>');
}

function getWidth() {
	if(document.all)
		return document.body.scrollWidth;
	else
		return window.innerWidth;
}

var old_index = 0;
var timeout_id;

function clear_timeouts() {
	if(document.getElementById) {
		if(timeout_id != null)
			self.clearTimeout(timeout_id);
	}
}

function popupon(index, top) {
	if(document.getElementById) {
		if(timeout_id != null) {
			self.clearTimeout(timeout_id);
		}
		if(old_index != 0) {
			document.getElementById(old_index).style.display = "none";
		}
		document.getElementById(index).style.top = top;
		document.getElementById(index).style.left = ((getWidth() - 716) / 2) + 140;
		document.getElementById(index).style.display = "inline";
		document.getElementById(index + "Nav").className = "navon";
		old_index = index;
	}
}

function popupoff() {
	if(document.getElementById) {
		if(old_index != 0)
			timeout_id = setTimeout("document.getElementById(old_index).style.display = 'none';document.getElementById(old_index + 'Nav').className = 'navoff';", 25);
	}
}


