function tdOnMouseOver(obj, bgcolor, color)
{
 obj.style.background = bgcolor;
 obj.style.color = color;
 //obj.className = "bold_black";
 obj.style.cursor = "hand";
}

function tdOnMouseOut(obj, bgcolor, color)
{
 obj.style.background = bgcolor;
 obj.style.color = color;
 //obj.className = "bold_lightgrey";
}

function hmOnMouseOver(obj)
{
//	obj.style.cursor = "hand";
 tdOnMouseOver(obj, "#FF0000", "#FFFFFF");
}

function hmOnMouseOut(obj)
{
 tdOnMouseOut(obj, "#FFFFFF", "#FF0000");
} 				 
 
function hlMouseOver(obj)
{
//#c00
//AA1110
 obj.style.background = "#6699cc";
 obj.style.color = "#FFFFFF";
 //obj.className = "bold_black";
 //obj.style.font = "bold";
 obj.style.cursor = "hand";
}

function hlMouseOut(obj)
{
 obj.style.background = "#19057C";
 obj.style.color = "#FFFFFF";
 //obj.style.font = "normal";
} 
function goTo(item)
{
	if (item == "aboutus")
		window.location.href = "aboutus.html";
	else if (item == "contactus")
		window.location.href = "contactus.html";
//	else if (item == "products")
//		window.location.href = "/products/potteries/";
	else
		window.location.href = "index.html";
}

function openThumbnails(imgId, winName, w, h)
{
// 	showDetailPage("/images/pottery/catalog/set1/dscn" + imgId + "_web.jpg", "_cp1", 400, 500);
	displayDetailPage("thumb_" + imgId + ".html", winName, w, h, false);  
}

function showDetailPage(href, winname, width, height)
{
	displayDetailPage(href, winname, width, height, false);
}

function displayDetailPage(href, winname, width, height, scrollable)
{
   var test = "resizable=0,";

   if( winname == "" ){
		winname = "_detailView";
	}

    test += (scrollable) ? "scrollbars=1," : "";

	if (document.all)
		var maxWidth = screen.width, maxHeight = screen.height;
	else
		if (document.layers)
			var maxWidth = window.outerWidth, maxHeight = window.outerHeight;
		else
			var maxWidth = 640, maxHeight = 480;

	var left = (maxWidth - width)/2, top = (maxHeight - height)/2;
	winname = cleanWinName(winname);

	var newWindow = window.open(href, winname, test + "width=" + width+ ",height=" + height + ",screenX= " + left + ",screenY=" + top + ",top=" + top + ",left=" + left);

	newWindow.focus();
}

// Prepares a string to be passed as the windowName parameter
// to window.open();
function cleanWinName( str )
{
	if (str.length == 0)
		return str;
	return str.replace(/[\s,]/g, "");
}
