function MM_openBrWindow(theURL,winName,features) {
	smallWin=window.open(theURL,winName,features);
}


function tellAFriend () {
	var href = document.location.href;
	var baseRef = href.substring(href.lastIndexOf("/") + 1);
	baseRef = baseRef.substring(0, baseRef.lastIndexOf("."));
	var URL = "/tellafriend.html?item=" + baseRef;
	MM_openBrWindow(URL,'tellAFriend','scrollbars=no,resizable=yes,width=453,height=447,left=200,top=50');
}

var myPopup;
function popup(id, width, height)
{
	if(!width && !height){
		width = 550;
		height = 600;
	}

	if (id.indexOf("/") != 0) {
		if (id.indexOf("http://") != 0) {
			id = "/" + id;
		}
	}
	
	if (id.indexOf(".html") == -1) {
		id = id + ".html";
	}

	myWindow = window.open(id, 'popupwind','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+ width + ', height=' + height + '', false);
	
	myWindow.focus();
	void('');
}

function imgswap(id, img){
	var item = document.getElementById(id);
	//alert(PATH + img);
	if(item != null)
		item.src = PATH + img;
}


