function StoreAction(obj) {
	obj.action = "http://order.store.yahoo.net/cgi-bin/wg-order?yhst-1545183683317+" + Product_Id.value

	return true;
}

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 proclink(info) {
   parent.location = rot13('znvygb:') + rot13(info);
}

function rot13(text) {
   var S2b='';
   for(var J7=0;J7<text.length;J7++) {
      var C6=text.charCodeAt(J7);
      if(Math.abs(16-Math.abs(C6-93.5))<=13) {
         W8b=(C6<91)?65:97;
         S2b+=String.fromCharCode(((C6-W8b+13)%26)+W8b);
      } else {
         S2b+=text.charAt(J7);
      }
   }
   return S2b;
}

function copyrightdates() {
	var strReturn = '<span style="font-size: 7.2pt">Copyright &copy; 2009 by East Valley Feed & Tack. All Rights Reserved. Site Design by MicroArtisans.</span>';
	return strReturn;
}

function OpenPicture(Link, Width, Height) {
	var newWindow, newWidth, newHeight;
	var newLeft, newTop;
	
	newWidth = (window.screen.availWidth * 5) / 10;
	newHeight = (window.screen.availHeight * 5) / 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;
	}
	
	if (navigator.appName == "Microsoft Internet Explorer") {
		newWindow = window.open("", "sub", "resizable='yes',location='yes',status='no',titlebar='no',Height=" + newHeight + ",Width=" + newWidth);
		newWindow.focus();

		newWindow.moveTo(newLeft, newTop);
	} else {
		newWindow = window.open("", "sub", "resizable='yes',location='yes',status='no',titlebar='no',innerHeight=" + newHeight + ",innerWidth=" + newWidth);
		newWindow.focus();

		newWindow.innerHeight = newHeight;
		newWindow.innerWidth = newWidth;
		newWindow.moveTo(newLeft, newTop);
	}

	var newContent = "<html><head><title>Photograph " + navigator.appName + "</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();
}
