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]=68.88;signArray[0][1]=68.88;signArray[0][2]=68.88;signArray[0][3]=68.88;signArray[0][4]=68.88;signArray[0][5]=68.88;signArray[0][6]=68.88;signArray[0][7]=68.88;signArray[0][8]=68.88;signArray[0][9]=68.88;signArray[1][0]=128.88;signArray[1][1]=128.88;signArray[1][2]=128.88;signArray[1][3]=128.88;signArray[1][4]=128.88;signArray[1][5]=128.88;signArray[1][6]=128.88;signArray[1][7]=128.88;signArray[1][8]=128.88;signArray[1][9]=128.88;signArray[2][0]=(pm==1)?40.26+grommets:47.26;signArray[2][1]=(pm==1)?40.54+grommets:47.54;signArray[2][2]=(pm==1)?41.10+grommets:48.10;signArray[2][3]=(pm==1)?41.38+grommets:48.38;signArray[2][4]=(pm==1)?41.84+grommets:48.84;signArray[2][5]=(pm==1)?42.78+grommets:57.78;signArray[2][6]=(pm==1)?43.48+grommets:65.48;signArray[2][7]=(pm==1)?46.98+grommets:68.98;signArray[2][8]=(pm==1)?53.98+grommets:75.98;signArray[2][9]=(pm==1)?67.98+grommets:89.98;signArray[3][0]=(pm==1)?77.61+grommets:84.61;signArray[3][1]=(pm==1)?77.89+grommets:84.89;signArray[3][2]=(pm==1)?78.45+grommets:85.45;signArray[3][3]=(pm==1)?78.73+grommets:85.73;signArray[3][4]=(pm==1)?79.20+grommets:86.20;signArray[3][5]=(pm==1)?80.13+grommets:101.13;signArray[3][6]=(pm==1)?80.83+grommets:122.83;signArray[3][7]=(pm==1)?84.33+grommets:126.33;signArray[3][8]=(pm==1)?91.33+grommets:133.33;signArray[3][9]=(pm==1)?105.33+grommets:147.33;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 4' 1 Side"&&bl==true)
{intRow=0;theForm.p1.value="4' x 4' Black on White 1 Side";}
else if(theForm.f1.value=="4' x 4' 2 Sides"&&bl==true)
{intRow=1;theForm.p1.value="4' x 4' Black on White 2 Sides";}
else if(theForm.f1.value=="4' x 4' 1 Side"&&fu==true)
{intRow=2;theForm.p1.value="4' x 4' Full Color 1 Side";}
else if(theForm.f1.value=="4' x 4' 2 Sides"&&fu==true)
{intRow=3;theForm.p1.value="4' x 4' 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 4' 1 Side";else if(z==1)
document.getElementById('designopt').value="4' x 4' 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/ip4x410mil.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/ip4x44mil.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;}}