<!-- ############################################################################ -->
<!-- ## StorePerfect v.1.0 for Amazon.com Web Services                         ## -->
<!-- ## Copyright (c) WebWin Solutions, Inc. All rights reserved.              ## -->
<!-- ############################################################################ -->


var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4)
{
	isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
	isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}

function emailListmania(url)
{
	winEmail = window.open(url, 'winEmail', 'width=470px,height=470px');
	winEmail.focus();
}

function emailThisPage(type, itemID)
{
	winEmail = window.open("../shop/email.aspx?type=" + type + "&id=" + itemID,'EmailThisPage','width=475,height=360,scrollbars=yes');
	winEmail.focus();
}

function printPage()
{
	browserV = parseInt(navigator.appVersion);

	if (browserV >= 4)
	{
		window.print();
	}
}

function clearText(theText) {
	if (theText.value == theText.defaultValue)
	{
		try
		{
		// Clear the textbox
        theText.value = "";
		}
		catch(error){}
    }
 }

function addToCart(asin)
{
	window.location = "../shop/addtocart.aspx?asin=" + asin;
}

//===============================================================================

// Resize window to image height and width
function fitWindowSize()
{
	if (isNav4) 
	{
		window.innerWidth = document.layers[0].document.images[0].width;
		window.innerHeight = document.layers[0].document.images[0].height;
	}
	if (isIE4) {
		if(document.images[0].width != 1)
		{
			window.resizeTo(500, 500);
			width = 500 - (document.body.clientWidth -  document.images[0].width);
			height = 500 - (document.body.clientHeight -  document.images[0].height);
			window.resizeTo(width + 10, height + 50);
		}
		else
		{
			// Amazon.com sent us a blank image, display a "No Image" message to the client
			document.write("<font face=\"Arial, Helvetica, sans-serif\" size=\"2\">");
			document.write("A large image is not available for this product.<br><br>");
			document.write("<a href='javascript:window.close();'>Close Window</a>");
			document.write("</font>");

			window.resizeTo(350, 100);
		}
	}
}

//===============================================================================
function zoomImage(imgUrl, path)
{
	if (isIE4) {
		win = window.open(path + imgUrl, "ProductImage", "width=400, height=300,left=0px, top=0px");
		win.focus();
	}
	else 
	{
		win = window.open(path + imgUrl, "ProductImage", "resizable=yes, scrollbars=yes,width=450, height=400,left=0px, top=0px, ");
		win.focus();
	}
}
//===============================================================================

function popUp(URL,NAME) 
{
	amznwin=window.open(URL,NAME,'location=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes,width=380,height=450,screenX=10,screenY=10,top=10,left=10');
	amznwin.focus();
}


