function initcalc(){shape();xp=document.getElementById("width").value;yp=document.getElementById("projection").value;validform()}function shape(){fyreR=document.getElementById("shape_rnd").checked?"semiround":document.getElementById("shape_rec").checked?"rectangle":"none"}


function validform(){""==xp?alert("Please Enter A Width Measurement!"):isNaN(parseInt(xp))?alert("Please Enter a Whole Number for the Width!"):x=parseInt(xp);""==yp?alert("Please Enter A Projection Measurement!"):isNaN(parseInt(yp))?alert("Please Enter a Whole Number for the Projection!"):y=parseInt(yp);"none"==fyreR?alert("Please Choose A Shape!"):rx41x14()}
function rx41x14(){41>=x&&14>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84_90&product_id=67"):rx41x26()}function rx41x26(){41>=x&&26>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=75"):rx44x38()}function rx44x38(){44>=x&&38>=y&&26<y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=73"):rx45x26()}
function rx45x26(){45>=x&&26>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=77"):rx45x42()}function rx45x42(){45>=x&&42>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=88"):rx45x50()}function rx45x50(){45>=x&&50>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=90"):rx48x21()}
function rx48x21(){48>=x&&21>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84_90&product_id=71"):rx53x25()}function rx53x25(){53>=x&&25>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=76"):rx53x37()}function rx53x37(){53>=x&&37>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=78"):rx57x42()}
function rx57x42(){57>=x&&42>=y&&26<y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=79"):rx57x50()}function rx57x50(){57>=x&&50>=y&&26<y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=89"):rx58x21()}function rx58x21(){58>=x&&21>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84_90&product_id=72"):rx58x26()}
function rx58x26(){58>=x&&26>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=80"):rx61x38()}function rx61x38(){61>=x&&38>=y&&26<y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=84"):rx61x48()}function rx61x48(){61>=x&&48>=y&&38<y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=85"):rx66x26()}
function rx66x26(){66>=x&&26>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=81"):rx69x42()}function rx69x42(){69>=x&&42>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=82"):rx69x50()}function rx69x50(){69>=x&&50>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84&product_id=83"):rx70x21()}
function rx70x21(){70>=x&&21>=y&&"rectangle"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84_90&product_id=74"):semi()}function semi(){sx41x19()}function sx41x19(){41>=x&&19>=y&&"semiround"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84_92&product_id=51"):sx48x23()}
function sx48x23(){48>=x&&23>=y&&"semiround"==fyreR?window.open("http://windowwellusa.com/index.php?route=product/product&path=84_92&product_id=52"):(alert("Your entry does not fit any of our stock covers. Please call us for custom sized covers at 877-467-2122"),window.open("http://windowwellusa.com/index.php?route=information/contact"))};

