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 skirtArray=new Array(3);for(var i=0;i<=3;i++)
skirtArray[i]=new Array(4);var signQty;var strPartno;var intRow=0,intColumn=3,intMapRow=0;intSkirtRow=0;var pm=document.getElementById('pmate').value;signQty=theForm.Qty.value;tqty=myform1.toolqty.value;if(tqty==0||tqty==null)
myform1.toolt.value=0;else
myform1.toolt.value=1;var tq=myform1.toolt.value;var flags=(theForm.p6.value*0.49)/signQty;var grommets=0;if(document.getElementById('p7').value=='2 on Top')
{grommets=0.50;}
else if(document.getElementById('p7').value=='4 Corners')
grommets=1;else
grommets=0;if(pm==1)
theForm.Weight.value=2.5;else
theForm.Weight.value=4.5;signArray[2][0]=(pm==1)?19.92+flags+grommets:23.77+flags;signArray[2][1]=(pm==1)?20.20+flags+grommets:24.05+flags;signArray[2][2]=(pm==1)?20.76+flags+grommets:24.61+flags;signArray[2][3]=(pm==1)?21.04+flags+grommets:24.89+flags;signArray[2][4]=(pm==1)?21.51+flags+grommets:25.36+flags;signArray[2][5]=(pm==1)?22.44+flags+grommets:26.29+flags;signArray[2][6]=(pm==1)?23.14+flags+grommets:26.99+flags;signArray[2][7]=(pm==1)?26.64+flags+grommets:30.49+flags;signArray[2][8]=(pm==1)?33.64+flags+grommets:37.49+flags;signArray[2][9]=(pm==1)?47.64+flags+grommets:48.49+flags;signArray[3][0]=(pm==1)?38.59+flags+grommets:42.44+flags;signArray[3][1]=(pm==1)?38.87+flags+grommets:42.72+flags;signArray[3][2]=(pm==1)?39.43+flags+grommets:43.28+flags;signArray[3][3]=(pm==1)?39.71+flags+grommets:43.56+flags;signArray[3][4]=(pm==1)?40.18+flags+grommets:44.03+flags;signArray[3][5]=(pm==1)?41.11+flags+grommets:44.96+flags;signArray[3][6]=(pm==1)?41.81+flags+grommets:45.66+flags;signArray[3][7]=(pm==1)?45.31+flags+grommets:49.16+flags;signArray[3][8]=(pm==1)?52.31+flags+grommets:56.16+flags;signArray[3][9]=(pm==1)?66.31+flags+grommets:70.16+flags;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]=8;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;skirtArray[0][0]=0;skirtArray[0][1]=0;skirtArray[0][2]=0;skirtArray[0][3]=0;skirtArray[0][4]=0;skirtArray[0][5]=0;skirtArray[0][6]=0;skirtArray[0][7]=0;skirtArray[0][8]=0;skirtArray[0][9]=0;skirtArray[1][0]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][1]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][2]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][3]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][4]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][5]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][6]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][7]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][8]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);skirtArray[1][9]=(tq==0)?5.70:5.70+((tqty*4.50)/signQty);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 fu=document.getElementById('full').checked;if(theForm.f1.value=="2' x 4' 1 Side"&&fu==true)
{intRow=2;theForm.p1.value="2' x 4' Full Color 1 Side";}
else if(theForm.f1.value=="2' x 4' 2 Sides"&&fu==true)
{intRow=3;theForm.p1.value="2' x 4' Full Color 2 Sides";}
else
{event.returnValue=false;}
switch(theForm.p4.value){case"No Skirt Stand":intSkirtRow=0;break;case"Skirt Stand 16 x 12":intSkirtRow=1;break;}
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.t4.value="d-Stand;"+theForm.p4.value+":price=+"+skirtArray[intSkirtRow][intColumn];theForm.t3.value="d-Photo/Map;"+theForm.p3.value+":price=+"+mapArray[intMapRow][intColumn];}
function screenopt1()
{document.getElementById('p10mil').checked=true;document.getElementById('ones').checked=true;document.getElementById('tenm').checked=true;document.getElementById('full').checked=true;if(myform1.p4.selectedIndex==1)
{myform1.p4.value='Skirt Stand 16 x 12';document.getElementById('tool').disabled=false;myform1.toolqty.disabled=false;document.getElementById('tool').style.borderColor="#000000";}
else{myform1.p4.value='No Skirt Stand';document.getElementById('tool').disabled=true;myform1.toolqty.disabled=true;document.getElementById('tool').style.borderColor="#cccccc";}
document.getElementById('pr10mil').style.display='block';thick();if(document.getElementById('pmate').value==1)
myform1.p4.disabled=true;}
function makeFormsUnique(){var p13s=document.getElementsByName('p13');for(i=0;i<p13s.length;i++){var date=new Date();p13s[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="2' x 4' 1 Side";else if(z==1)
document.getElementById('designopt').value="2' x 4' 2 Sides";}
function thick()
{kd=document.getElementById('tenm').checked;if(kd==true)
{myform1.p2.value="10 mil";myform1.p4.disabled=false;document.getElementById('mytest1').disabled=false;document.getElementById('p7').disabled=true;document.getElementById('photo').src="images/ip2x410mil.jpg";document.getElementById('grommets').disabled=true;document.getElementById('p10mil').checked='checked';document.getElementById('pmate').value=0;}
else if(kd==false){myform1.p2.value="4 mil";myform1.p4.disabled=true;myform1.p4.value="No Skirt Stand";document.getElementById('mytest1').disabled=true;document.getElementById('p7').disabled=false;document.getElementById('grommets').disabled=false;document.getElementById('photo').src="images/ip2x44mil.jpg";document.getElementById('p4mil').checked='checked';document.getElementById('pmate').value=1;}}
function tool()
{if(myform1.p4.selectedIndex==1)
{document.getElementById('tool').disabled=false;myform1.toolqty.disabled=false;document.getElementById('tool').style.borderColor="#000000";}
else{document.getElementById('tool').disabled=true;myform1.toolqty.disabled=true;document.getElementById('tool').style.borderColor="#cccccc";}}
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=""}}