function CalcForm(obj) {
	if (isNaN(obj.amount.value) || obj.amount.value <= 0 
		|| isNaN(obj.shipping.value) || obj.shipping.value <= 0 
		|| isNaN(obj.shipping2.value) || obj.shipping2.value <= 0
		|| isNaN(obj.qty.value) || obj.qty.value < 0) {
		return False;
	}
	return true;
}

function OpenPicture(Link, Width, Height) {
	var newWindow, newWidth, newHeight;
	var newLeft, newTop;
	
	newWidth = (window.screen.availWidth * 9) / 10;
	newHeight = (window.screen.availHeight * 9) / 10;
	
	if ((Height <= newHeight) && (Width <= newWidth)) {
		newLeft = (window.screen.availWidth - newWidth) / 2;
		newTop = (window.screen.availHeight - newHeight) / 2;
		newWidth = Width;
		newHeight= Height;
	} else if ((newHeight / Height) < (newWidth / Width)) {
		newTop = (window.screen.availHeight - newHeight) / 2;
		newWidth = (Width * newHeight) / Height;
		newLeft = (window.screen.availWidth - newWidth) / 2;
	} else {
		newLeft = (window.screen.availWidth - newWidth) / 2;
		newHeight = (Height * newWidth) / Width;
		newTop = (window.screen.availHeight - newHeight) / 2;
	}
	
	newWindow = window.open("", "sub", "resizable,innerHeight=" + newHeight + ",innerWidth=" + newWidth);
	newWindow.focus();
	newWindow.resizeTo(newWidth, newHeight);
	newWindow.moveTo(newLeft, newTop);
	
	var newContent = "<html><head><title>Photograph</title></head>\n";
	newContent += "<body leftmargin=0 bottommargin=0 topmargin=0 rightmargin=0>\n";
	newContent += "<img src='" + Link + "' border=0 width=" + newWidth + " height=" + newHeight + " align=center>\n";
	newContent += "</body>\n</html>\n";
	newWindow.document.write(newContent);
	newWindow.document.close();
}
