function cartwin(url)
{window.name="Main";
var wcart=window.open(url,"Cart","scrollbars,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,width=750,height=550,top=50,left=50,screenx=50,screeny=50");}

function checkwin()
{window.open("https://www.chestnutridge.com/cart/cartcheck.asp","Main");
window.close();}

function locate(){for(var i=0;i<document.images.length;i++)document.images[i].onmousedown=NoCopy;}

function NoCopy(e){
var copy="Image Copyright © --->Chestnut Ridge Supply";
var isIE=(navigator.appName.indexOf("Microsoft")!=-1);
var isNav=(navigator.appName.indexOf("Netscape")!=-1);
if(isIE){if(event.button==2|event.button==3){alert(copy);return false;}}
if(isNav){if(e.which==2|e.which==3){alert(copy);return false;}}}

function Validator(theForm)
{if (theForm.QTY.value == ""){alert("Please enter a value for the \"QTY\" field.");
theForm.QTY.focus();
return (false);}
if (theForm.QTY.value.length < 1){alert("Please enter at least 1 characters in the \"QTY\" field.");
theForm.QTY.focus();
return (false);}
if (theForm.QTY.value.length > 3){alert("Please enter at most 3 characters in the \"QTY\" field.");
theForm.QTY.focus();
return (false);}
var checkOK = "0123456789-";
var checkStr = theForm.QTY.value;
var allValid = true;
var decPoints = 0;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++){ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)if (ch == checkOK.charAt(j))break;
if (j == checkOK.length){allValid = false;break;}
allNum += ch;}
if (!allValid)
{alert("Please enter only digit characters in the \"QTY\" field.");
theForm.QTY.focus();
return (false);}
var chkVal = allNum;
var prsVal = parseInt(allNum);
if (chkVal != "" && !(prsVal > "0")){alert("Please enter a value greater than \"0\" in the \"QTY\" field.");
theForm.QTY.focus();
return (false);}
return (true);}