function validateSign20(theForm){var signArray=new Array(10);for(var i=0;i<=10;i++)
signArray[i]=new Array(10);var mapArray=new Array(3);for(var i=0;i<=3;i++)
mapArray[i]=new Array(4);var signQty;var strPartno;var intRow=0,intColumn=3,intMapRow=0;var pm=document.getElementById('pmate').value;if(pm==1)
theForm.Weight.value=4;else
theForm.Weight.value=8;var grommets=0;if(document.getElementById('p5').value=='2 on Top')
grommets=0.50;else if(document.getElementById('p5').value=='4 Corners')
grommets=1;else if(document.getElementById('p5').value=='4 on Top and Bottom')
grommets=2;else
grommets=0;signArray[0][0]=98.88;signArray[0][1]=98.88;signArray[0][2]=98.88;signArray[0][3]=98.88;signArray[0][4]=98.88;signArray[0][5]=98.88;signArray[0][6]=98.88;signArray[0][7]=98.88;signArray[0][8]=98.88;signArray[0][9]=98.88;signArray[1][0]=178.88;signArray[1][1]=178.88;signArray[1][2]=178.88;signArray[1][3]=178.88;signArray[1][4]=178.88;signArray[1][5]=178.88;signArray[1][6]=178.88;signArray[1][7]=178.88;signArray[1][8]=178.88;signArray[1][9]=178.88;signArray[2][0]=(pm==1)?70.63+grommets:93.72;signArray[2][1]=(pm==1)?70.90+grommets:94.02;signArray[2][2]=(pm==1)?71.46+grommets:94.62;signArray[2][3]=(pm==1)?71.74+grommets:94.92;signArray[2][4]=(pm==1)?72.20+grommets:95.42;signArray[2][5]=(pm==1)?73.13+grommets:96.42;signArray[2][6]=(pm==1)?73.82+grommets:107.17;signArray[2][7]=(pm==1)?77.30+grommets:117.45;signArray[2][8]=(pm==1)?84.25+grommets:124.95;signArray[2][9]=(pm==1)?98.15+grommets:139.95;signArray[3][0]=(pm==1)?129.16+grommets:173.76;signArray[3][1]=(pm==1)?129.44+grommets:174.06;signArray[3][2]=(pm==1)?129.99+grommets:174.66;signArray[3][3]=(pm==1)?130.27+grommets:174.96;signArray[3][4]=(pm==1)?130.73+grommets:175.46;signArray[3][5]=(pm==1)?131.66+grommets:176.46;signArray[3][6]=(pm==1)?132.36+grommets:186.21;signArray[3][7]=(pm==1)?135.83+grommets:200.96;signArray[3][8]=(pm==1)?142.78+grommets:208.46;signArray[3][9]=(pm==1)?156.68+grommets:223.46;mapArray[0][0]=0;mapArray[0][1]=0;mapArray[0][2]=0;mapArray[0][3]=0;mapArray[0][4]=0;mapArray[0][5]=0;mapArray[0][6]=0;mapArray[0][7]=0;mapArray[0][8]=0;mapArray[0][9]=0;mapArray[1][0]=8;mapArray[1][1]=8;mapArray[1][2]=8;mapArray[1][3]=8;mapArray[1][4]=8;mapArray[1][5]=8;mapArray[1][6]=8;mapArray[1][7]=10;mapArray[1][8]=18;mapArray[1][9]=35;mapArray[2][0]=8;mapArray[2][1]=8;mapArray[2][2]=8;mapArray[2][3]=8;mapArray[2][4]=8;mapArray[2][5]=8;mapArray[2][6]=8;mapArray[2][7]=19;mapArray[2][8]=38;mapArray[2][9]=75;signQty=theForm.Qty.value;if(signQty==1)
intColumn=9;else if(signQty<=3)
intColumn=8;else if(signQty<=7)
intColumn=7;else if(signQty<=9)
intColumn=6;else if(signQty<=14)
intColumn=5;else if(signQty<=19)
intColumn=4;else if(signQty<=24)
intColumn=3;else if(signQty<=49)
intColumn=2;else if(signQty<=99)
intColumn=1;else if(signQty>=100)
intColumn=0;else{theForm.Qty.focus();}
var bl=document.getElementById('black').checked;var fu=document.getElementById('full').checked;if(theForm.f1.value=="4' x 8' 1 Side" && bl==true)
{intRow=0;theForm.p1.value="4' x 8' Black on White 1 Side";}
else if(theForm.f1.value=="4' x 8' 2 Sides" && bl==true)
{intRow=1;theForm.p1.value="4' x 8' Black on White 2 Sides";}
else if(theForm.f1.value=="4' x 8' 1 Side" && fu==true)
{intRow=2;theForm.p1.value="4' x 8' Full Color 1 Side";}
else if(theForm.f1.value=="4' x 8' 2 Sides" && fu==true)
{intRow=3;theForm.p1.value="4' x 8' Full Color 2 Sides";}
else
{alert("Not yet setup");event.returnValue=false;}
switch(theForm.p3.value){case"No Photo/Map":intMapRow=0;break;case"Personal Photo":intMapRow=1;break;case"Map or Property Photo":intMapRow=2;break;}
theForm.t1.value="d-Sign Type;"+theForm.p1.value+":partno="+strPartno+",price=+"+signArray[intRow][intColumn];theForm.t3.value="d-Photo/Map;"+theForm.p3.value+":price=+"+mapArray[intMapRow][intColumn];if(theForm.p4.value=="No Post Kit"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+0.00";}
else if(theForm.p4.value=="Standard Post Kit w/Flat Caps - $84.88 (+$25 shipping)"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+109.88";}
else if(theForm.p4.value=="Standard Post Kit w/Gothic Caps - $99.88 (+$25 shipping)"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+124.88";}
else if(theForm.p4.value=="Self Standing Post Kit w/Flat Caps - $144.88 (+$35 shipping)"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+179.88";}
else if(theForm.p4.value=="Self Standing Post Kit w/Gothic Caps -$159.88 (+$35 shipping)"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+194.88";}
else if(theForm.p4.value=="Arrow Post Kit w/Flat Caps* - $154.88 (+$35 shipping)"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+94.94";}
else if(theForm.p4.value=="Arrow Post Kit w/Gothic Caps* -$179.88 (+$35 shipping)"){theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+107.44";}
else{theForm.t4.value="d-Post Kit;"+theForm.p4.value+":price=+0.00";}}
function screenopt1()
{document.getElementById('p10mil').checked=true;document.getElementById('ones').checked=true;document.getElementById('tenm').checked=true;document.getElementById('full').checked=true;thick();colorbox();if(document.getElementById('pmate').value==1)
myform1.p4.disabled=true;document.getElementById('pr10mil').style.display='block';ss=document.getElementById('p10mil').checked;if(ss==true){document.getElementById('pr10mil').style.display='block';document.getElementById('pr4mil').style.display='none';}
else{document.getElementById('pr4mil').style.display='block';document.getElementById('pr10mil').style.display='none';}document.getElementById('signside').value=0;sides();}
function makeFormsUnique(){var p11s=document.getElementsByName('p11');for(i=0;i<p11s.length;i++){var date=new Date();p11s[i].value=date.getTime();}}
function mypopups(popname,popheight,popwidth,ptop,pleft,pfire)
{mypop=document.getElementById('pop32');mypop.src=popname;mypop.style.visibility='visible';mypop.style.height=popheight;mypop.style.width=popwidth;mypop.style.top=ptop;mypop.style.marginLeft=pleft;var is_firefox=navigator.userAgent.toLowerCase().indexOf('firefox')>-1;if(is_firefox==true)
mypop.style.marginLeft=pfire;}
function closeIframe(){document.getElementById('pop32').style.visibility='hidden';}
function sides(){var z=document.getElementById('signside').value;if(z==0)
document.getElementById('designopt').value="4' x 8' 1 Side";else if(z==1)
document.getElementById('designopt').value="4' x 8' 2 Sides";}
function thick()
{kd=document.getElementById('tenm').checked;if(kd==true)
{document.getElementById('p8').value="10 mil";myform1.p4.disabled=false;document.getElementById('bw').disabled=false;document.getElementById('photo').src="images/ip4x810mil.jpg";document.getElementById('p5').disabled=true;document.getElementById('grommets').disabled=true;document.getElementById('black').disabled=false;document.getElementById('mytest1').disabled=false;document.getElementById('p10mil').checked='checked';document.getElementById('pmate').value=0;}
else if(kd==false){document.getElementById('p8').value="4 mil";myform1.p4.disabled=true;document.getElementById('bw').disabled=true;document.getElementById('black').disabled=true;document.getElementById('photo').src="images/ip4x84mil.jpg";document.getElementById('p5').disabled=false;document.getElementById('grommets').disabled=false;document.getElementById('mytest1').disabled=true;document.getElementById('full').checked=true;document.getElementById('p4mil').checked='checked';document.getElementById('pmate').value=1;}}
function prpop()
{if(document.getElementById('sno').value==39)
{document.getElementById('sno').value=0;calc();}
else if(document.getElementById('sno').value==40)
{document.getElementById('sno').value=0;calc();}}
function SelectedColor1(SColor,SerialNoColor)
{var SelColor;var SNoColor;var len;var i;var CurSNo;var z;z=0;var x=0;x=document.getElementById("cpno").value;var txt=new Array();txt[1]="txt1";txt[2]="txt2";txt[3]="txt3";txt[4]="txt4";txt[5]="txt5";txt[6]="txt6";txt[7]="txt7";txt[8]="txt8";txt[9]="txt9";SelColor=document.getElementById(txt[x]).value;SNoColor=SerialNoColor;if((SelColor=="")||(SelColor==null))
{SelColor=SColor;}
else
{SelColor=SelColor+","+SColor;SNoColor=SNoColor+document.getElementById("temptext").value;}
len=SNoColor.length;for(i=1;i<=len;i++)
{CurSNo=SNoColor.substr(i,1);if(SerialNoColor==CurSNo)
{alert("This color has already been selected.");z=1;}}
if(z==0)
{document.getElementById('temptext').value=SNoColor;document.getElementById(txt[x]).value=SelColor;}}
function doClear(theText)
{if(theText.value==theText.defaultValue)
{theText.value=""}}
function colorbox()
{if(document.getElementById('black').checked==true){myform1.p7.disabled=true;document.getElementById('colorbox').style.display='none';}
else{myform1.p7.disabled=false;document.getElementById('colorbox').style.display='block';}}
function rectarrowflatcap1()
{var value=document.getElementById('qty').value;if(!(value%2==0)&&document.getElementById('postkit4x8').selectedIndex>4)
{alert("Signs must be ordered in multiples of 2 when selecting the Arrow Post Kit.");document.getElementById('postkit4x8').value='No Post Kit';return true;}
else
{return false;}}
function rectarrowflatcap(postkit)
{value=document.getElementById('qty').value;if(!(value%2==0))
{alert("Signs must be ordered in multiples of 2 when selecting the Arrow Post Kit.");return false;}
else
{document.getElementById('postkit4x8').value=postkit;return true;}}