//############### FUNCTION CHANGERESOLUTION() USED IN STATE BUNDLE  #####################
//#######################################################################################
function changeresolution()
{

var totalmiles=0;
var mfactor2=0;
var filesize=0;

var states="";
var calc=0

if(document.Map.resolution[0].checked)
{
	if (document.all) 
		{
		Cost1.innerHTML="[$12,958]";
		Cost2.innerHTML="[$22,803]";
		Cost3.innerHTML="[$13,265]";
		Cost4.innerHTML="[$23,757]";
		Cost5.innerHTML="[$20,800]";
		Cost6.innerHTML="[$4,268]";
		Cost7.innerHTML="[$2,049]";
		Cost8.innerHTML="[$14,727]";
		Cost9.innerHTML="[$14,740]";
		Cost10.innerHTML="[$16,633]";
		Cost11.innerHTML="[$14,069]";
		Cost12.innerHTML="[$12,631]";
		Cost13.innerHTML="[$14,051]";
		
		Cost14.innerHTML="[$16,449]";
		Cost14.innerHTML="[$10,114]";
		Cost16.innerHTML="[$11,988]";
		Cost17.innerHTML="[$11,530]";
		Cost18.innerHTML="[$6,735]";
		Cost19.innerHTML="[$7,028]";
		Cost20.innerHTML="[$14,478]";
		Cost21.innerHTML="[$16,848]";
		Cost22.innerHTML="[$11,956]";
		Cost23.innerHTML="[$13,941]";
		Cost24.innerHTML="[$22,008]";
		Cost25.innerHTML="[$15,453]";
		Cost26.innerHTML="[$22,097]";

		Cost27.innerHTML="[$6,041]";
		Cost28.innerHTML="[$6,629]";
		Cost29.innerHTML="[$24,324]";
		Cost30.innerHTML="[$12,250]";
		Cost31.innerHTML="[$13,178]";
		Cost32.innerHTML="[$14,092]";
		Cost33.innerHTML="[$10,325]";
		Cost34.innerHTML="[$13,995]";
		Cost35.innerHTML="[$19,379]";
		Cost36.innerHTML="[$11,314]";
		Cost37.innerHTML="[$1,209]";
		Cost38.innerHTML="[$10,897]";
		Cost39.innerHTML="[$15,338]";

		Cost40.innerHTML="[$10,537]";
		Cost41.innerHTML="[$26,689]";
		Cost42.innerHTML="[$16,965]";
		Cost43.innerHTML="[$6,248]";
		Cost44.innerHTML="[$10,168]";
		Cost45.innerHTML="[$13,594]";
		Cost46.innerHTML="[$8,462]";
		Cost47.innerHTML="[$13,978]";
		Cost48.innerHTML="[$19,527]";
		Cost49.innerHTML="[$71]"; 
				
		}
	else if (document.getElementById)
		{
		document.getElementById("Cost1").innerHTML="[$12,958]";
		document.getElementById("Cost2").innerHTML="[$22,803]";
		document.getElementById("Cost3").innerHTML="[$13,265]";
		document.getElementById("Cost4").innerHTML="[$23,757]";
		document.getElementById("Cost5").innerHTML="[$20,800]";
		document.getElementById("Cost6").innerHTML="[$4,268]";
		document.getElementById("Cost7").innerHTML="[$2,049]";
		document.getElementById("Cost8").innerHTML="[$14,727]";
		document.getElementById("Cost9").innerHTML="[$14,740]";
		document.getElementById("Cost10").innerHTML="[$16,633]";
		document.getElementById("Cost11").innerHTML="[$14,069]";
		document.getElementById("Cost12").innerHTML="[$12,631]";
		document.getElementById("Cost13").innerHTML="[$14,051]";
		
		document.getElementById("Cost14").innerHTML="[$16,449]";
		document.getElementById("Cost15").innerHTML="[$10,114]";
		document.getElementById("Cost16").innerHTML="[$11,988]";
		document.getElementById("Cost17").innerHTML="[$11,530]";
		document.getElementById("Cost18").innerHTML="[$6,735]";
		document.getElementById("Cost19").innerHTML="[$7,028]";
		document.getElementById("Cost20").innerHTML="[$14,478]";
		document.getElementById("Cost21").innerHTML="[$16,848]";
		document.getElementById("Cost22").innerHTML="[$11,956]";
		document.getElementById("Cost23").innerHTML="[$13,941]";
		document.getElementById("Cost24").innerHTML="[$22,008]";
		document.getElementById("Cost25").innerHTML="[$15,453]";
		document.getElementById("Cost26").innerHTML="[$22,097]";

		document.getElementById("Cost27").innerHTML="[$6,041]";
		document.getElementById("Cost28").innerHTML="[$6,629]";
		document.getElementById("Cost29").innerHTML="[$24,324]";
		document.getElementById("Cost30").innerHTML="[$12,250]";
		document.getElementById("Cost31").innerHTML="[$13,178]";
		document.getElementById("Cost32").innerHTML="[$14,092]";
		document.getElementById("Cost33").innerHTML="[$10,325]";
		document.getElementById("Cost34").innerHTML="[$13,995]";
		document.getElementById("Cost35").innerHTML="[$19,379]";
		document.getElementById("Cost36").innerHTML="[$11,314]";
		document.getElementById("Cost37").innerHTML="[$1,209]";
		document.getElementById("Cost38").innerHTML="[$10,897]";
		document.getElementById("Cost39").innerHTML="[$15,338]";

		document.getElementById("Cost40").innerHTML="[$10,537]";
		document.getElementById("Cost41").innerHTML="[$26,689]";
		document.getElementById("Cost42").innerHTML="[$16,965]";
		document.getElementById("Cost43").innerHTML="[$6,248]";
		document.getElementById("Cost44").innerHTML="[$10,168]";
		document.getElementById("Cost45").innerHTML="[$13,594]";
		document.getElementById("Cost46").innerHTML="[$8,462]";
		document.getElementById("Cost47").innerHTML="[$13,978]";
		document.getElementById("Cost48").innerHTML="[$19,527]";
		document.getElementById("Cost49").innerHTML="[$71]";
				
		}
	else if (document.layers)
		{ // do nothing
		}
}
else
{
	if (document.all) 
		{ 
			Cost1.innerHTML="[$2,073]";
			Cost2.innerHTML="[$3,420]";
			Cost3.innerHTML="[$2,122]";
			Cost4.innerHTML="[$4,751]";
			Cost5.innerHTML="[$3,120]";
			Cost6.innerHTML="[$652]";
			Cost7.innerHTML="[$307]";
			Cost8.innerHTML="[$2,356]";
			Cost9.innerHTML="[$2,358]";
			Cost10.innerHTML="[$2,499]";
			Cost11.innerHTML="[$2,251]";
			Cost12.innerHTML="[$2,165]";
			Cost13.innerHTML="[$2,248]";

			Cost14.innerHTML="[$2,467]";
			Cost15.innerHTML="[$1,618]";
			Cost16.innerHTML="[$1,918]";
			Cost17.innerHTML="[$1,976]";
			Cost18.innerHTML="[$1,036]";
			Cost19.innerHTML="[$1,074]";
			Cost20.innerHTML="[$2,316]";
			Cost21.innerHTML="[$2,727]";
			Cost22.innerHTML="[$1,912]";
			Cost23.innerHTML="[$2,091]";
			Cost24.innerHTML="[$4,401]";
			Cost25.innerHTML="[$2,317]";
			Cost26.innerHTML="[$3,314]";

			Cost27.innerHTML="[$929]";
			Cost28.innerHTML="[$1,013]";
			Cost29.innerHTML="[$3,648]";
			Cost30.innerHTML="[$1,960]";
			Cost31.innerHTML="[$2,108]";
			Cost32.innerHTML="[$2,113]";
			Cost33.innerHTML="[$1,651]";
			Cost34.innerHTML="[$2,099]";
			Cost35.innerHTML="[$2,906]";
			Cost36.innerHTML="[$1,810]";
			Cost37.innerHTML="[$181]";
			Cost38.innerHTML="[$1,868]";
			Cost39.innerHTML="[$2,308]";

			Cost40.innerHTML="[$1,685]";
			Cost41.innerHTML="[$5,337]";
			Cost42.innerHTML="[$2,544]";
			Cost43innerHTML="[$961]";
			Cost44.innerHTML="[$1,626]";
			Cost45.innerHTML="[$2,039]";
			Cost46.innerHTML="[$1,450]";
			Cost47.innerHTML="[$2,236]";
			Cost48.innerHTML="[$2,929]";
			Cost49.innerHTML="[$10]";
		}
	else if (document.getElementById)
		{
			document.getElementById("Cost1").innerHTML="[$2,073]";
			document.getElementById("Cost2").innerHTML="[$3,420]";
			document.getElementById("Cost3").innerHTML="[$2,122]";
			document.getElementById("Cost4").innerHTML="[$4,751]";
			document.getElementById("Cost5").innerHTML="[$3,120]";
			document.getElementById("Cost6").innerHTML="[$652]";
			document.getElementById("Cost7").innerHTML="[$307]";
			document.getElementById("Cost8").innerHTML="[$2,356]";
			document.getElementById("Cost9").innerHTML="[$2,358]";
			document.getElementById("Cost10").innerHTML="[$2,499]";
			document.getElementById("Cost11").innerHTML="[$2,251]";
			document.getElementById("Cost12").innerHTML="[$2,165]";
			document.getElementById("Cost13").innerHTML="[$2,248]";

			document.getElementById("Cost14").innerHTML="[$2,467]";
			document.getElementById("Cost15").innerHTML="[$1,618]";
			document.getElementById("Cost16").innerHTML="[$1,918]";
			document.getElementById("Cost17").innerHTML="[$1,976]";
			document.getElementById("Cost18").innerHTML="[$1,036]";
			document.getElementById("Cost19").innerHTML="[$1,074]";
			document.getElementById("Cost20").innerHTML="[$2,316]";
			document.getElementById("Cost21").innerHTML="[$2,727]";
			document.getElementById("Cost22").innerHTML="[$1,912]";
			document.getElementById("Cost23").innerHTML="[$2,091]";
			document.getElementById("Cost24").innerHTML="[$4,401]";
			document.getElementById("Cost25").innerHTML="[$2,317]";
			document.getElementById("Cost26").innerHTML="[$3,314]";

			document.getElementById("Cost27").innerHTML="[$929]";
			document.getElementById("Cost28").innerHTML="[$1,013]";
			document.getElementById("Cost29").innerHTML="[$3,648]";
			document.getElementById("Cost30").innerHTML="[$1,960]";
			document.getElementById("Cost31").innerHTML="[$2,108]";
			document.getElementById("Cost32").innerHTML="[$2,113]";
			document.getElementById("Cost33").innerHTML="[$1,651]";
			document.getElementById("Cost34").innerHTML="[$2,099]";
			document.getElementById("Cost35").innerHTML="[$2,906]";
			document.getElementById("Cost36").innerHTML="[$1,810]";
			document.getElementById("Cost37").innerHTML="[$181]";
			document.getElementById("Cost38").innerHTML="[$1,868]";
			document.getElementById("Cost39").innerHTML="[$2,308]";

			document.getElementById("Cost40").innerHTML="[$1,685]";
			document.getElementById("Cost41").innerHTML="[$5,337]";
			document.getElementById("Cost42").innerHTML="[$2,544]";
			document.getElementById("Cost43").innerHTML="[$961]";
			document.getElementById("Cost44").innerHTML="[$1,626]";
			document.getElementById("Cost45").innerHTML="[$2,039]";
			document.getElementById("Cost46").innerHTML="[$1,450]";
			document.getElementById("Cost47").innerHTML="[$2,236]";
			document.getElementById("Cost48").innerHTML="[$2,929]";
			document.getElementById("Cost49").innerHTML="[$10]";
			}
		else if (document.layers)
			{ // do Nothing
			}
}

if(document.Map.resolution[0].checked)
{

// **********INSIDE IF ********************

//*********** ALL IFS ************************
if(document.Map.FullUS.value==1)
{
	states = states +"<a href=javascript:coststate('FullUS',110000) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Full US ($49,000)<br>";
	calc=calc+49000;
	totalmiles=totalmiles+3013008;
}
if(document.Map.Alabama.value==1)
{
	states = states +"<a href=javascript:coststate('Alabama',12958) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Alabama ($12,958)<br>";
	calc=calc+12958;
	totalmiles=totalmiles+51833;		
}
if(document.Map.Arizona.value==1)
{
	states = states +"<a href=javascript:coststate('Arizona',22803) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arizona ($22,803)<br>";
	calc=calc+22803;
	totalmiles=totalmiles+114016;
}
if(document.Map.Arkansas.value==1)
{
	states = states +"<a href=javascript:coststate('Arkansas',13265) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arkansas ($13,265)<br>";
	calc=calc+13265;
	totalmiles=totalmiles+53058;
}
if(document.Map.California.value==1)
{
	states = states +"<a href=javascript:coststate('California',23757) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;California ($23,757)<br>";
	calc=calc+23757;
	totalmiles=totalmiles+158381;
}
if(document.Map.Colorado.value==1)
{
	states = states +"<a href=javascript:coststate('Colorado',20800) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Colorado ($20,800)<br>";
	calc=calc+20800;
	totalmiles=totalmiles+104002;
}
if(document.Map.Connecticut.value==1)
{
	states = states +"<a href=javascript:coststate('Connecticut',4268) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Connecticut ($4,268)<br>";
	calc=calc+4268;
	totalmiles=totalmiles+5022;
}
if(document.Map.Delaware.value==1)
{
	states = states +"<a href=javascript:coststate('Delaware',2049) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Delaware ($2,049)<br>";
	calc=calc+2049;
	totalmiles=totalmiles+2049;
}
if(document.Map.Florida.value==1)
{
	states = states +"<a href=javascript:coststate('Florida',14727) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Florida ($14,727)<br>";
	calc=calc+14727;
	totalmiles=totalmiles+58907;
}
if(document.Map.Georgia.value==1)
{
	states = states +"<a href=javascript:coststate('Georgia',14740) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Georgia ($14,740)<br>";
	calc=calc+14740;
	totalmiles=totalmiles+58959;
}
if(document.Map.Idaho.value==1)
{
	states = states +"<a href=javascript:coststate('Idaho',16633) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Idaho ($16,633)<br>";
	calc=calc+16633;
	totalmiles=totalmiles+83313;
}
if(document.Map.Illinois.value==1)
{
	states = states +"<a href=javascript:coststate('Illinois',14069) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Illinois ($14,069)<br>";
	calc=calc+14069;
	totalmiles=totalmiles+56276;
}
if(document.Map.Indiana.value==1)
{
	states = states +"<a href=javascript:coststate('Indiana',12631) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Indiana ($12,631)<br>";  
	calc=calc+12631;
	totalmiles=totalmiles+36089;
}
if(document.Map.Iowa.value==1)
{
	states = states +"<a href=javascript:coststate('Iowa',14051) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Iowa ($14,051)<br>";  
	calc=calc+14051;
	totalmiles=totalmiles+56204;
}
if(document.Map.Kansas.value==1)
{
	states = states +"<a href=javascript:coststate('Kansas',16449) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kansas ($16,449)<br>";  
	calc=calc+16449;
	totalmiles=totalmiles+82247;
}
if(document.Map.Kentucky.value==1)
{
	states = states +"<a href=javascript:coststate('Kentucky',10114) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kentucky ($10,114)<br>"; 
	calc=calc+10114;
	totalmiles=totalmiles+40455;
}
if(document.Map.Lousiana.value==1)
{
	states = states +"<a href=javascript:coststate('Lousiana',11988) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Lousiana ($11,988)<br>"; 
	calc=calc+11988;
	totalmiles=totalmiles+47951;
}
if(document.Map.Maine.value==1)
{
	states = states +"<a href=javascript:coststate('Maine',11530) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maine ($11,530)<br>"; 
	calc=calc+11530;
	totalmiles=totalmiles+32942;
} 
if(document.Map.Maryland.value==1)
{
	states = states +"<a href=javascript:coststate('Maryland',6735) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maryland ($6,735)<br>"; 
	calc=calc+6735;
	totalmiles=totalmiles+10261;
}
if(document.Map.Massachusetts.value==1)
{
	states = states +"<a href=javascript:coststate('Massachusetts',7028) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Massachusetts ($7,028)<br>";  
	calc=calc+7028;
	totalmiles=totalmiles+8268;
}
if(document.Map.Michigan.value==1)
{
	states = states +"<a href=javascript:coststate('Michigan',14478) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Michigan ($14,478)<br>"; 
	calc=calc+14478;
	totalmiles=totalmiles+57912;
}
if(document.Map.Minnesota.value==1)
{
	states = states +"<a href=javascript:coststate('Minnesota',16848) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Minnesota ($16,848)<br>";  
	calc=calc+16848;
	totalmiles=totalmiles+84240;
}
if(document.Map.Mississippi.value==1)
{
	states = states +"<a href=javascript:coststate('Mississippi',11956) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Mississippi ($11,956)<br>";  
	calc=calc+11956;
	totalmiles=totalmiles+47825;
}
if(document.Map.Missouri.value==1)
{
	states = states +"<a href=javascript:coststate('Missouri',13941) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Missouri ($13,941)<br>";   
	calc=calc+13941;
	totalmiles=totalmiles+69707;
}
if(document.Map.Montana.value==1)
{
	states = states +"<a href=javascript:coststate('Montana',22008) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Montana ($22,008)<br>";   
	calc=calc+22008;
	totalmiles=totalmiles+146721;
}
if(document.Map.Nebraska.value==1)
{
	states = states +"<a href=javascript:coststate('Nebraska',15453) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nebraska ($15,453)<br>";  
	calc=calc+15453;
	totalmiles=totalmiles+77266;
}
if(document.Map.Nevada.value==1)
{
	states = states +"<a href=javascript:coststate('Nevada',22097) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nevada ($22,097)<br>";
	calc=calc+22097;
	totalmiles=totalmiles+110485;
}
if(document.Map.NewHampshire.value==1)
{
	states = states +"<a href=javascript:coststate('NewHampshire',6041) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Hampshire ($6,041)<br>";  
	calc=calc+6041;
	totalmiles=totalmiles+9294;
}
if(document.Map.NewJersey.value==1)
{
	states = states +"<a href=javascript:coststate('NewJersey',6629) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Jersey ($6,629)<br>";  
	calc=calc+6629;
	totalmiles=totalmiles+7799;
}
if(document.Map.NewMexico.value==1)
{
	states = states +"<a href=javascript:coststate('NewMexico',24324) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Mexico ($24,324)<br>";
	calc=calc+24324;
	totalmiles=totalmiles+121718;
}
if(document.Map.NewYork.value==1)
{
	states = states +"<a href=javascript:coststate('NewYork',12250) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New York ($12,250)<br>";
	calc=calc+12250;
	totalmiles=totalmiles+49001;
}
if(document.Map.NorthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('NorthCarolina',13178) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Carolina ($13,178)<br>";     
	calc=calc+13178;
	totalmiles=totalmiles+52712;
}
if(document.Map.NorthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('NorthDakota',14092) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Dakota ($14,092)<br>";   
	calc=calc+14092;
	totalmiles=totalmiles+70462;
}
if(document.Map.Ohio.value==1)
{
	states = states +"<a href=javascript:coststate('Ohio',10325) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Ohio ($10,325)<br>";
	calc=calc+10325;
	totalmiles=totalmiles+41299;
}
if(document.Map.Oklahoma.value==1)
{
	states = states +"<a href=javascript:coststate('Oklahoma',13995) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oklahoma ($13,995)<br>";   
	calc=calc+13995;
	totalmiles=totalmiles+69974;
}
if(document.Map.Oregon.value==1)
{
	states = states +"<a href=javascript:coststate('Oregon',19379) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oregon ($19,379)<br>";   
	calc=calc+19379;
	totalmiles=totalmiles+96896;
}
if(document.Map.Pennsylvania.value==1)
{
	states = states +"<a href=javascript:coststate('Pennsylvania',11314) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Pennsylvania ($11,314)<br>"; 
	calc=calc+11314;
	totalmiles=totalmiles+45257;
}
if(document.Map.RhodeIsland.value==1)
{
	states = states +"<a href=javascript:coststate('RhodeIsland',1209) ><img src/=geoorthoimages/remove.jpg alt='Delete State' Border=0></a>&nbsp;Rhode Island ($1,209)<br>";  
	calc=calc+1209;
	totalmiles=totalmiles+1209;
}
if(document.Map.SouthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('SouthCarolina',10897) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Carolina ($10,897)<br>";   
	calc=calc+10897;
	totalmiles=totalmiles+31135;
}
if(document.Map.SouthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('SouthDakota',15338) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Dakota ($15,338)<br>"; 
	calc=calc+15338;
	totalmiles=totalmiles+76942;
}
if(document.Map.Tennessee.value==1)
{
	states = states +"<a href=javascript:coststate('Tennessee',10537) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Tennessee ($10,537)<br>";  
	calc=calc+10537;
	totalmiles=totalmiles+42149;
}
if(document.Map.Texas.value==1)
{
	states = states +"<a href=javascript:coststate('Texas',26689) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Texas ($26,689)<br>";  
	calc=calc+26689;
	totalmiles=totalmiles+51833;266893
}
if(document.Map.Utah.value==1)
{
	states = states +"<a href=javascript:coststate('Utah',16965) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Utah ($16,965)<br>";   
	calc=calc+16965;
	totalmiles=totalmiles+84824;
}
if(document.Map.Vermont.value==1)
{
	states = states +"<a href=javascript:coststate('Vermont',6248) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Vermont ($6,248)<br>";   
	calc=calc+6248;
	totalmiles=totalmiles+9613;
}
if(document.Map.Virginia.value==1)
{
	states = states +"<a href=javascript:coststate('Virginia',10168) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Virginia ($10,168)<br>";  
	calc=calc+10168;
	totalmiles=totalmiles+40670;
}
if(document.Map.Washington.value==1)
{
	states = states +"<a href=javascript:coststate('Washington',13594) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington ($13,594)<br>";   
	calc=calc+13594;
	totalmiles=totalmiles+67972;
}
if(document.Map.WestVirginia.value==1)
{
	states = states +"<a href=javascript:coststate('WestVirginia',8462) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;West Virginia ($8,468)<br>";  
	calc=calc+8462;
	totalmiles=totalmiles+24179;
}
if(document.Map.Wisconsin.value==1)
{
	states = states +"<a href=javascript:coststate('Wisconsin',13978) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wisconsin ($13,978)<br>";   
	calc=calc+13978;
	totalmiles=totalmiles+77913;
}
if(document.Map.Wyoming.value==1)
{
	states = states +"<a href=javascript:coststate('Wyoming',19527) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wyoming ($19,527)<br> ";    
	calc=calc+19527;
	totalmiles=totalmiles+97637;
}
if(document.Map.WashingtonDC .value==1)
{
	states = states +"<a href=javascript:coststate('WashingtonDC',71) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington DC ($71)<br>";   
	calc=calc+71;
	totalmiles=totalmiles+71;
}

//************** END OF IF ******************
 
}


else
{



if(document.Map.FullUS.value==1)
{
	states = states +"<a href=javascript:coststate('FullUS',16000) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Full US ($1,600)<br>";
	calc=calc+16000;
	totalmiles=totalmiles+3013008;
}
if(document.Map.Alabama.value==1)
{
	states = states +"<a href=javascript:coststate('Alabama',2073) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Alabama ($2,073)<br>";
	calc=calc+2073;
	totalmiles=totalmiles+51833;
}
if(document.Map.Arizona.value==1)
{
	states = states +"<a href=javascript:coststate('Arizona',3420) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arizona ($3,420)<br>";
	calc=calc+3420;
	totalmiles=totalmiles+114016;
}
if(document.Map.Arkansas.value==1)
{
	states = states +"<a href=javascript:coststate('Arkansas',2122) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arkansas ($2,122)<br>";
	calc=calc+2122;
	totalmiles=totalmiles+53058;
}
if(document.Map.California.value==1)
{
	states = states +"<a href=javascript:coststate('California',4751) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;California ($4,751)<br>";
	calc=calc+4751;
	totalmiles=totalmiles+158381;
}
if(document.Map.Colorado.value==1)
{
	states = states +"<a href=javascript:coststate('Colorado',3120) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Colorado ($3,120)<br>";
	calc=calc+3120;
	totalmiles=totalmiles+104002;
}
if(document.Map.Connecticut.value==1)
{
	states = states +"<a href=javascript:coststate('Connecticut',652) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Connecticut ($652)<br>";
	calc=calc+652;
	totalmiles=totalmiles+5022;
}
if(document.Map.Delaware.value==1)
{
	states = states +"<a href=javascript:coststate('Delaware',307) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Delaware ($307)<br>";
	calc=calc+307;
	totalmiles=totalmiles+2049;
}
if(document.Map.Florida.value==1)
{
	states = states +"<a href=javascript:coststate('Florida',2356) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Florida ($2,356)<br>";
	calc=calc+2356;
	totalmiles=totalmiles+58907;
}
if(document.Map.Georgia.value==1)
{
	states = states +"<a href=javascript:coststate('Georgia',2358) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Georgia ($2,358)<br>";
	calc=calc+2358;
	totalmiles=totalmiles+58959;
}
if(document.Map.Idaho.value==1)
{
	states = states +"<a href=javascript:coststate('Idaho',2499) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Idaho ($2,499)<br>";
	calc=calc+2499;
	totalmiles=totalmiles+83313;
}
if(document.Map.Illinois.value==1)
{
	states = states +"<a href=javascript:coststate('Illinois',2251) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Illinois ($2,251)<br>";
	calc=calc+2251;
	totalmiles=totalmiles+56276;
}
if(document.Map.Indiana.value==1)
{
	states = states +"<a href=javascript:coststate('Indiana',2165) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Indiana ($2,165<br>";  
	calc=calc+2165;
	totalmiles=totalmiles+36089;
}
if(document.Map.Iowa.value==1)
{
	states = states +"<a href=javascript:coststate('Iowa',2248) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Iowa ($2,248)<br>";  
	calc=calc+2248;
	totalmiles=totalmiles+56204;
}
if(document.Map.Kansas.value==1)
{
	states = states +"<a href=javascript:coststate('Kansas',2467) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kansas ($2,467)<br>";  
	calc=calc+2467;
	totalmiles=totalmiles+82247;
}
if(document.Map.Kentucky.value==1)
{
	states = states +"<a href=javascript:coststate('Kentucky',1618) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kentucky ($1,618)<br>"; 
	calc=calc+1618;
	totalmiles=totalmiles+40455;
}
if(document.Map.Lousiana.value==1)
{
	states = states +"<a href=javascript:coststate('Lousiana',1918) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Lousiana ($1,918)<br>"; 
	calc=calc+1918;
	totalmiles=totalmiles+47951;
}
if(document.Map.Maine.value==1)
{
	states = states +"<a href=javascript:coststate('Maine',1976) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maine ($1,976)<br>"; 
	calc=calc+1976;
	totalmiles=totalmiles+32942;
} 
if(document.Map.Maryland.value==1)
{
	states = states +"<a href=javascript:coststate('Maryland',1036) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maryland ($1,036)<br>"; 
	calc=calc+1036;
	totalmiles=totalmiles+10361;
}
if(document.Map.Massachusetts.value==1)
{
	states = states +"<a href=javascript:coststate('Massachusetts',1074) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Massachusetts ($1,074)<br>";  
	calc=calc+1074;
	totalmiles=totalmiles+8268;
}
if(document.Map.Michigan.value==1)
{
	states = states +"<a href=javascript:coststate('Michigan',2316) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Michigan ($2,316)<br>"; 
	calc=calc+2316;
	totalmiles=totalmiles+57912;
}
if(document.Map.Minnesota.value==1)
{
	states = states +"<a href=javascript:coststate('Minnesota',2527) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Minnesota ($2,527)<br>";  
	calc=calc+2527;
	totalmiles=totalmiles+84240;
}
if(document.Map.Mississippi.value==1)
{
	states = states +"<a href=javascript:coststate('Mississippi',1912) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Mississippi ($1,912)<br>";  
	calc=calc+1912;
	totalmiles=totalmiles+47825;
}
if(document.Map.Missouri.value==1)
{
	states = states +"<a href=javascript:coststate('Missouri',2091) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Missouri ($2,091)<br>";   
	calc=calc+2091;
	totalmiles=totalmiles+69707;
}
if(document.Map.Montana.value==1)
{
	states = states +"<a href=javascript:coststate('Montana',4401) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Montana ($4,401)<br>";   
	calc=calc+4401;
	totalmiles=totalmiles+146721;
}
if(document.Map.Nebraska.value==1)
{
	states = states +"<a href=javascript:coststate('Nebraska',2317) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nebraska ($2,317)<br>";  
	calc=calc+2317;
	totalmiles=totalmiles+77266;
}
if(document.Map.Nevada.value==1)
{
	states = states +"<a href=javascript:coststate('Nevada',3314) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nevada ($3,314)<br>";
	calc=calc+3314;
	totalmiles=totalmiles+110485;
}
if(document.Map.NewHampshire.value==1)
{
	states = states +"<a href=javascript:coststate('NewHampshire',929) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Hampshire ($929)<br>";  
	calc=calc+929;
	totalmiles=totalmiles+9294;
}
if(document.Map.NewJersey.value==1)
{
	states = states +"<a href=javascript:coststate('NewJersey',1013) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Jersey ($1,013)<br>";  
	calc=calc+1013;
	totalmiles=totalmiles+7799;
}
if(document.Map.NewMexico.value==1)
{
	states = states +"<a href=javascript:coststate('NewMexico',3648) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Mexico ($3,648)<br>";
	calc=calc+3648;
	totalmiles=totalmiles+121618;
}
if(document.Map.NewYork.value==1)
{
	states = states +"<a href=javascript:coststate('NewYork',1960) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New York ($1,960)<br>";
	calc=calc+1960;
	totalmiles=totalmiles+49001;
}
if(document.Map.NorthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('NorthCarolina',2108) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Carolina ($2,108)<br>";     
	calc=calc+2108;
	totalmiles=totalmiles+52712;
}
if(document.Map.NorthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('NorthDakota',2113) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Dakota ($2,113)<br>";   
	calc=calc+2113;
	totalmiles=totalmiles+70462;
}
if(document.Map.Ohio.value==1)
{
	states = states +"<a href=javascript:coststate('Ohio',1651) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Ohio ($1,651)<br>";
	calc=calc+1651;
	totalmiles=totalmiles+41299;
}
if(document.Map.Oklahoma.value==1)
{
	states = states +"<a href=javascript:coststate('Oklahoma',2099) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oklahoma ($2,099)<br>";   
	calc=calc+2099;
	totalmiles=totalmiles+69974;
}
if(document.Map.Oregon.value==1)
{
	states = states +"<a href=javascript:coststate('Oregon',2906) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oregon ($2,906)<br>";   
	calc=calc+2906;
	totalmiles=totalmiles+96896;
}
if(document.Map.Pennsylvania.value==1)
{
	states = states +"<a href=javascript:coststate('Pennsylvania',1810) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Pennsylvania ($1,810)<br>"; 
	calc=calc+1810;
	totalmiles=totalmiles+45257;
}
if(document.Map.RhodeIsland.value==1)
{
	states = states +"<a href=javascript:coststate('RhodeIsland',181) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Rhode Island ($181)<br>";  
	calc=calc+181;
	totalmiles=totalmiles+1209;
}
if(document.Map.SouthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('SouthCarolina',1868) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Carolina ($1,868<br>";   
	calc=calc+1868;
	totalmiles=totalmiles+31135;
}
if(document.Map.SouthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('SouthDakota',2308) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Dakota ($2,308)<br>"; 
	calc=calc+2308;
	totalmiles=totalmiles+76942;
} 
if(document.Map.Tennessee.value==1)
{
	states = states +"<a href=javascript:coststate('Tennessee',1685) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Tennessee ($1,685)<br>";  
	calc=calc+1685;
	totalmiles=totalmiles+42149;
}
if(document.Map.Texas.value==1)
{
	states = states +"<a href=javascript:coststate('Texas',5337) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Texas ($5,337)<br>";  
	calc=calc+5337;
	totalmiles=totalmiles+266893;
}
if(document.Map.Utah.value==1)
{
	states = states +"<a href=javascript:coststate('Utah',2544) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Utah ($2,544)<br>";   
	calc=calc+2544;
	totalmiles=totalmiles+84824;
}
if(document.Map.Vermont.value==1)
{
	states = states +"<a href=javascript:coststate('Vermont',961) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Vermont ($961)<br>";   
	calc=calc+961;
	totalmiles=totalmiles+9613;
}
if(document.Map.Virginia.value==1)
{
	states = states +"<a href=javascript:coststate('Virginia',1626) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Virginia ($1,626)<br>";  
	calc=calc+1626;
	totalmiles=totalmiles+40670;
}
if(document.Map.Washington.value==1)
{
	states = states +"<a href=javascript:coststate('Washington',2039) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington ($2,039)<br>";   
	calc=calc+2039;
	totalmiles=totalmiles+67972;
}
if(document.Map.WestVirginia.value==1)
{
	states = states +"<a href=javascript:coststate('WestVirginia',1450) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;West Virginia ($1,450)<br>";  
	calc=calc+1450;
	totalmiles=totalmiles+24179;
}
if(document.Map.Wisconsin.value==1)
{
	states = states +"<a href=javascript:coststate('Wisconsin',2236) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wisconsin ($2,236)<br>";   
	calc=calc+2236;
	totalmiles=totalmiles+55913;
}
if(document.Map.Wyoming.value==1)
{
	states = states +"<a href=javascript:coststate('Wyoming',2929) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wyoming ($2,929)<br> ";    
	calc=calc+2929;
	totalmiles=totalmiles+97637;
}
if(document.Map.WashingtonDC .value==1)
{
	states = states +"<a href=javascript:coststate('WashingtonDC',10) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington DC ($10)<br>";   
	calc=calc+10;
	totalmiles=totalmiles+71;
}

//************* END OF ELSE *************************
 
}


if (document.Map.resolution[0].checked)
mfactor2=2;
else
mfactor2=0.12;

if(document.Map.format[2].checked)
mfactor2=mfactor2/9;
else if (document.Map.format[0].checked) 
mfactor2=mfactor2/5.587;

filesize=(totalmiles*mfactor2);

	if (document.all) 
		States.innerHTML=states;
	else if (document.getElementById)
		document.getElementById("States").innerHTML=states;
	else if (document.layers)
	{
		document.layers['StatesNet4'].visibility='show';
		document.layers['StatesNet4'].left=600;
		document.layers['StatesNet4'].top=75;
 		document.layers['StatesNet4'].document.open();
		document.layers['StatesNet4'].document.write(states);
 		document.layers['StatesNet4'].document.close();
	}

if((document.Map.projection[0].checked)&&(document.Map.datum[2].checked)&&(document.Map.format[0].checked))
{	
	if (document.all) 
		TotalCost.innerHTML="$"+number_format(calc);
	else if (document.getElementById)
		document.getElementById("TotalCost").innerHTML="$"+number_format(calc);
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=830;
		document.layers['TotalCostNet4'].top=75;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(calc);
 		document.layers['TotalCostNet4'].document.close();
	}
}
else
{	
	if (document.all) 
		TotalCost.innerHTML="$"+number_format(Math.floor(calc*1.3));
	else if (document.getElementById)
		document.getElementById("TotalCost").innerHTML="$"+number_format(Math.floor(calc*1.3));
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=830;
		document.layers['TotalCostNet4'].top=75;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(calc*1.3);
 		document.layers['TotalCostNet4'].document.close();
	}
}

if(filesize<1024)
{
	if (document.all) Totalmiles.innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.ceil(filesize))+"-MB</font>";
	else if (document.getElementById) document.getElementById("Totalmiles").innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.ceil(filesize))+"-MB</font>";
	else if (document.layers)
	{
		document.layers['TotalmilesNet4'].visibility='show';
		document.layers['TotalmilesNet4'].left=730;
		document.layers['TotalmilesNet4'].top=45;
 		document.layers['TotalmilesNet4'].document.open();
		document.layers['TotalmilesNet4'].document.write("<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.ceil(filesize))+"-MB</font>");
 		document.layers['TotalmilesNet4'].document.close();
	}
}
else
{	
	if (document.all) Totalmiles.innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(round(filesize/1024,2))+"-GB</font>";
	else if (document.getElementById) document.getElementById("Totalmiles").innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(round(filesize/1024,2))+"-GB</font>";
	else if (document.layers)
		{
		document.layers['TotalmilesNet4'].visibility='show';
		document.layers['TotalmilesNet4'].left=730;
		document.layers['TotalmilesNet4'].top=45;
 		document.layers['TotalmilesNet4'].document.open();
		document.layers['TotalmilesNet4'].document.write("<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(round(filesize/1024,2))+"-GB</font>");
 		document.layers['TotalmilesNet4'].document.close();
		}
}
document.Map.totalcost.value=calc;

}

//############### FUNCTION COSTSTATE() USED IN STATE BUNDLE  ############################
//#######################################################################################
function coststate(stat,cost)
{

var calc=0;
var totalmiles=0;
var mfactor2=0;
var filesize=0;

var states="";


var mapobj=(eval("document.Map." + stat));

if((eval("document.Map." + stat+".value"))==0)
{
mapobj.value=1;
}
else
{
mapobj.value=0;
}




if(document.Map.resolution[0].checked)
{

//*********** ALL IFS ************************
if(document.Map.FullUS.value==1)
{
	states = states +"<a href=javascript:coststate('FullUS',49000) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Full US ($49,000)<br>";
	calc=calc+49000;
	totalmiles=totalmiles+3013008;
}
if(document.Map.Alabama.value==1)
{
	states = states +"<a href=javascript:coststate('Alabama',12958) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Alabama ($12,958)<br>";
	calc=calc+12958;
	totalmiles=totalmiles+51833;		
}
if(document.Map.Arizona.value==1)
{
	states = states +"<a href=javascript:coststate('Arizona',22803) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arizona ($22,803)<br>";
	calc=calc+22803;
	totalmiles=totalmiles+114016;
}
if(document.Map.Arkansas.value==1)
{
	states = states +"<a href=javascript:coststate('Arkansas',13265) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arkansas ($13,265)<br>";
	calc=calc+13265;
	totalmiles=totalmiles+53058;
}
if(document.Map.California.value==1)
{
	states = states +"<a href=javascript:coststate('California',23757) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;California ($23,757)<br>";
	calc=calc+23757;
	totalmiles=totalmiles+158381;
}
if(document.Map.Colorado.value==1)
{
	states = states +"<a href=javascript:coststate('Colorado',20800) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Colorado ($20,800)<br>";
	calc=calc+20800;
	totalmiles=totalmiles+104002;
}
if(document.Map.Connecticut.value==1)
{
	states = states +"<a href=javascript:coststate('Connecticut',4268) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Connecticut ($4,268)<br>";
	calc=calc+4268;
	totalmiles=totalmiles+5022;
}
if(document.Map.Delaware.value==1)
{
	states = states +"<a href=javascript:coststate('Delaware',2049) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Delaware ($2,049)<br>";
	calc=calc+2049;
	totalmiles=totalmiles+2049;
}
if(document.Map.Florida.value==1)
{
	states = states +"<a href=javascript:coststate('Florida',14727) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Florida ($14,727)<br>";
	calc=calc+14727;
	totalmiles=totalmiles+58907;
}
if(document.Map.Georgia.value==1)
{
	states = states +"<a href=javascript:coststate('Georgia',14740) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Georgia ($14,740)<br>";
	calc=calc+14740;
	totalmiles=totalmiles+58959;
}
if(document.Map.Idaho.value==1)
{
	states = states +"<a href=javascript:coststate('Idaho',16633) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Idaho ($16,633)<br>";
	calc=calc+16633;
	totalmiles=totalmiles+83313;
}
if(document.Map.Illinois.value==1)
{
	states = states +"<a href=javascript:coststate('Illinois',14069) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Illinois ($14,069)<br>";
	calc=calc+14069;
	totalmiles=totalmiles+56276;
}
if(document.Map.Indiana.value==1)
{
	states = states +"<a href=javascript:coststate('Indiana',12631) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Indiana ($12,631)<br>";  
	calc=calc+12631;
	totalmiles=totalmiles+36089;
}
if(document.Map.Iowa.value==1)
{
	states = states +"<a href=javascript:coststate('Iowa',14051) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Iowa ($14,051)<br>";  
	calc=calc+14051;
	totalmiles=totalmiles+56204;
}
if(document.Map.Kansas.value==1)
{
	states = states +"<a href=javascript:coststate('Kansas',16449) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kansas ($16,449)<br>";  
	calc=calc+16449;
	totalmiles=totalmiles+82247;
}
if(document.Map.Kentucky.value==1)
{
	states = states +"<a href=javascript:coststate('Kentucky',10114) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kentucky ($10,114)<br>"; 
	calc=calc+10114;
	totalmiles=totalmiles+40455;
}
if(document.Map.Lousiana.value==1)
{
	states = states +"<a href=javascript:coststate('Lousiana',11988) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Lousiana ($11,988)<br>"; 
	calc=calc+11988;
	totalmiles=totalmiles+47951;
}
if(document.Map.Maine.value==1)
{
	states = states +"<a href=javascript:coststate('Maine',11530) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maine ($11,530)<br>"; 
	calc=calc+11530;
	totalmiles=totalmiles+32942;
} 
if(document.Map.Maryland.value==1)
{
	states = states +"<a href=javascript:coststate('Maryland',6735) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maryland ($6,735)<br>"; 
	calc=calc+6735;
	totalmiles=totalmiles+10261;
}
if(document.Map.Massachusetts.value==1)
{
	states = states +"<a href=javascript:coststate('Massachusetts',7028) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Massachusetts ($7,028)<br>";  
	calc=calc+7028;
	totalmiles=totalmiles+8268;
}
if(document.Map.Michigan.value==1)
{
	states = states +"<a href=javascript:coststate('Michigan',14478) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Michigan ($14,478)<br>"; 
	calc=calc+14478;
	totalmiles=totalmiles+57912;
}
if(document.Map.Minnesota.value==1)
{
	states = states +"<a href=javascript:coststate('Minnesota',16848) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Minnesota ($16,848)<br>";  
	calc=calc+16848;
	totalmiles=totalmiles+84240;
}
if(document.Map.Mississippi.value==1)
{
	states = states +"<a href=javascript:coststate('Mississippi',11956) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Mississippi ($11,956)<br>";  
	calc=calc+11956;
	totalmiles=totalmiles+47825;
}
if(document.Map.Missouri.value==1)
{
	states = states +"<a href=javascript:coststate('Missouri',13941) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Missouri ($13,941)<br>";   
	calc=calc+13941;
	totalmiles=totalmiles+69707;
}
if(document.Map.Montana.value==1)
{
	states = states +"<a href=javascript:coststate('Montana',22008) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Montana ($22,008)<br>";   
	calc=calc+22008;
	totalmiles=totalmiles+146721;
}
if(document.Map.Nebraska.value==1)
{
	states = states +"<a href=javascript:coststate('Nebraska',15453) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nebraska ($15,453)<br>";  
	calc=calc+15453;
	totalmiles=totalmiles+77266;
}
if(document.Map.Nevada.value==1)
{
	states = states +"<a href=javascript:coststate('Nevada',22097) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nevada ($22,097)<br>";
	calc=calc+22097;
	totalmiles=totalmiles+110485;
}
if(document.Map.NewHampshire.value==1)
{
	states = states +"<a href=javascript:coststate('NewHampshire',6041) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Hampshire ($6,041)<br>";  
	calc=calc+6041;
	totalmiles=totalmiles+9294;
}
if(document.Map.NewJersey.value==1)
{
	states = states +"<a href=javascript:coststate('NewJersey',6629) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Jersey ($6,629)<br>";  
	calc=calc+6629;
	totalmiles=totalmiles+7799;
}
if(document.Map.NewMexico.value==1)
{
	states = states +"<a href=javascript:coststate('NewMexico',24324) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Mexico ($24,324)<br>";
	calc=calc+24324;
	totalmiles=totalmiles+121718;
}
if(document.Map.NewYork.value==1)
{
	states = states +"<a href=javascript:coststate('NewYork',12250) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New York ($12,250)<br>";
	calc=calc+12250;
	totalmiles=totalmiles+49001;
}
if(document.Map.NorthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('NorthCarolina',13178) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Carolina ($13,178)<br>";     
	calc=calc+13178;
	totalmiles=totalmiles+52712;
}
if(document.Map.NorthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('NorthDakota',14092) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Dakota ($14,092)<br>";   
	calc=calc+14092;
	totalmiles=totalmiles+70462;
}
if(document.Map.Ohio.value==1)
{
	states = states +"<a href=javascript:coststate('Ohio',10325) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Ohio ($10,325)<br>";
	calc=calc+10325;
	totalmiles=totalmiles+41299;
}
if(document.Map.Oklahoma.value==1)
{
	states = states +"<a href=javascript:coststate('Oklahoma',13995) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oklahoma ($13,995)<br>";   
	calc=calc+13995;
	totalmiles=totalmiles+69974;
}
if(document.Map.Oregon.value==1)
{
	states = states +"<a href=javascript:coststate('Oregon',19379) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oregon ($19,379)<br>";   
	calc=calc+19379;
	totalmiles=totalmiles+96896;
}
if(document.Map.Pennsylvania.value==1)
{
	states = states +"<a href=javascript:coststate('Pennsylvania',11314) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Pennsylvania ($11,314)<br>"; 
	calc=calc+11314;
	totalmiles=totalmiles+45257;
}
if(document.Map.RhodeIsland.value==1)
{
	states = states +"<a href=javascript:coststate('RhodeIsland',1209) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Rhode Island ($1,209)<br>";  
	calc=calc+1209;
	totalmiles=totalmiles+1209;
}
if(document.Map.SouthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('SouthCarolina',10897) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Carolina ($10,897)<br>";   
	calc=calc+10897;
	totalmiles=totalmiles+31135;
}
if(document.Map.SouthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('SouthDakota',15338) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Dakota ($15,338)<br>"; 
	calc=calc+15338;
	totalmiles=totalmiles+76942;
}
if(document.Map.Tennessee.value==1)
{
	states = states +"<a href=javascript:coststate('Tennessee',10537) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Tennessee ($10,537)<br>";  
	calc=calc+10537;
	totalmiles=totalmiles+42149;
}
if(document.Map.Texas.value==1)
{
	states = states +"<a href=javascript:coststate('Texas',26689) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Texas ($26,689)<br>";  
	calc=calc+26689;
	totalmiles=totalmiles+51833;266893
}
if(document.Map.Utah.value==1)
{
	states = states +"<a href=javascript:coststate('Utah',16965) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Utah ($16,965)<br>";   
	calc=calc+16965;
	totalmiles=totalmiles+84824;
}
if(document.Map.Vermont.value==1)
{
	states = states +"<a href=javascript:coststate('Vermont',6248) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Vermont ($6,248)<br>";   
	calc=calc+6248;
	totalmiles=totalmiles+9613;
}
if(document.Map.Virginia.value==1)
{
	states = states +"<a href=javascript:coststate('Virginia',10168) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Virginia ($10,168)<br>";  
	calc=calc+10168;
	totalmiles=totalmiles+40670;
}
if(document.Map.Washington.value==1)
{
	states = states +"<a href=javascript:coststate('Washington',13594) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington ($13,594)<br>";   
	calc=calc+13594;
	totalmiles=totalmiles+67972;
}
if(document.Map.WestVirginia.value==1)
{
	states = states +"<a href=javascript:coststate('WestVirginia',8462) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;West Virginia ($8,468)<br>";  
	calc=calc+8462;
	totalmiles=totalmiles+24179;
}
if(document.Map.Wisconsin.value==1)
{
	states = states +"<a href=javascript:coststate('Wisconsin',13978) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wisconsin ($13,978)<br>";   
	calc=calc+13978;
	totalmiles=totalmiles+77913;
}
if(document.Map.Wyoming.value==1)
{
	states = states +"<a href=javascript:coststate('Wyoming',19527) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0 ></a>&nbsp;Wyoming ($19,527)<br> ";    
	calc=calc+19527;
	totalmiles=totalmiles+97637;
}
if(document.Map.WashingtonDC .value==1)
{
	states = states +"<a href=javascript:coststate('WashingtonDC',71) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0 ></a>&nbsp;Washington DC ($71)<br>";   
	calc=calc+71;
	totalmiles=totalmiles+71;
}

//************** END OF ALL IFS ******************
 
}


else
{

// ************* ALL IFS ***********************


if(document.Map.FullUS.value==1)
{
	states = states +"<a href=javascript:coststate('FullUS',16000) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Full US ($1,600)<br>";
	calc=calc+16000;
	totalmiles=totalmiles+3013008;
}
if(document.Map.Alabama.value==1)
{
	states = states +"<a href=javascript:coststate('Alabama',2073) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Alabama ($2,073)<br>";
	calc=calc+2073;
	totalmiles=totalmiles+51833;
}
if(document.Map.Arizona.value==1)
{
	states = states +"<a href=javascript:coststate('Arizona',3420) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arizona ($3,420)<br>";
	calc=calc+3420;
	totalmiles=totalmiles+114016;
}
if(document.Map.Arkansas.value==1)
{
	states = states +"<a href=javascript:coststate('Arkansas',2122) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Arkansas ($2,122)<br>";
	calc=calc+2122;
	totalmiles=totalmiles+53058;
}
if(document.Map.California.value==1)
{
	states = states +"<a href=javascript:coststate('California',4751) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;California ($4,751)<br>";
	calc=calc+4751;
	totalmiles=totalmiles+158381;
}
if(document.Map.Colorado.value==1)
{
	states = states +"<a href=javascript:coststate('Colorado',3120) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Colorado ($3,120)<br>";
	calc=calc+3120;
	totalmiles=totalmiles+104002;
}
if(document.Map.Connecticut.value==1)
{
	states = states +"<a href=javascript:coststate('Connecticut',652) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Connecticut ($652)<br>";
	calc=calc+652;
	totalmiles=totalmiles+5022;
}
if(document.Map.Delaware.value==1)
{
	states = states +"<a href=javascript:coststate('Delaware',307) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Delaware ($307)<br>";
	calc=calc+307;
	totalmiles=totalmiles+2049;
}
if(document.Map.Florida.value==1)
{
	states = states +"<a href=javascript:coststate('Florida',2356) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Florida ($2,356)<br>";
	calc=calc+2356;
	totalmiles=totalmiles+58907;
}
if(document.Map.Georgia.value==1)
{
	states = states +"<a href=javascript:coststate('Georgia',2358) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Georgia ($2,358)<br>";
	calc=calc+2358;
	totalmiles=totalmiles+58959;
}
if(document.Map.Idaho.value==1)
{
	states = states +"<a href=javascript:coststate('Idaho',2499) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Idaho ($2,499)<br>";
	calc=calc+2499;
	totalmiles=totalmiles+83313;
}
if(document.Map.Illinois.value==1)
{
	states = states +"<a href=javascript:coststate('Illinois',2251) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Illinois ($2,251)<br>";
	calc=calc+2251;
	totalmiles=totalmiles+56276;
}
if(document.Map.Indiana.value==1)
{
	states = states +"<a href=javascript:coststate('Indiana',2165) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Indiana ($2,165<br>";  
	calc=calc+2165;
	totalmiles=totalmiles+36089;
}
if(document.Map.Iowa.value==1)
{
	states = states +"<a href=javascript:coststate('Iowa',2248) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Iowa ($2,248)<br>";  
	calc=calc+2248;
	totalmiles=totalmiles+56204;
}
if(document.Map.Kansas.value==1)
{
	states = states +"<a href=javascript:coststate('Kansas',2467) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kansas ($2,467)<br>";  
	calc=calc+2467;
	totalmiles=totalmiles+82247;
}
if(document.Map.Kentucky.value==1)
{
	states = states +"<a href=javascript:coststate('Kentucky',1618) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Kentucky ($1,618)<br>"; 
	calc=calc+1618;
	totalmiles=totalmiles+40455;
}
if(document.Map.Lousiana.value==1)
{
	states = states +"<a href=javascript:coststate('Lousiana',1918) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Lousiana ($1,918)<br>"; 
	calc=calc+1918;
	totalmiles=totalmiles+47951;
}
if(document.Map.Maine.value==1)
{
	states = states +"<a href=javascript:coststate('Maine',1976) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maine ($1,976)<br>"; 
	calc=calc+1976;
	totalmiles=totalmiles+32942;
} 
if(document.Map.Maryland.value==1)
{
	states = states +"<a href=javascript:coststate('Maryland',1036) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Maryland ($1,036)<br>"; 
	calc=calc+1036;
	totalmiles=totalmiles+10361;
}
if(document.Map.Massachusetts.value==1)
{
	states = states +"<a href=javascript:coststate('Massachusetts',1074) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Massachusetts ($1,074)<br>";  
	calc=calc+1074;
	totalmiles=totalmiles+8268;
}
if(document.Map.Michigan.value==1)
{
	states = states +"<a href=javascript:coststate('Michigan',2316) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Michigan ($2,316)<br>"; 
	calc=calc+2316;
	totalmiles=totalmiles+57912;
}
if(document.Map.Minnesota.value==1)
{
	states = states +"<a href=javascript:coststate('Minnesota',2527) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Minnesota ($2,527)<br>";  
	calc=calc+2527;
	totalmiles=totalmiles+84240;
}
if(document.Map.Mississippi.value==1)
{
	states = states +"<a href=javascript:coststate('Mississippi',1912) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Mississippi ($1,912)<br>";  
	calc=calc+1912;
	totalmiles=totalmiles+47825;
}
if(document.Map.Missouri.value==1)
{
	states = states +"<a href=javascript:coststate('Missouri',2091) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Missouri ($2,091)<br>";   
	calc=calc+2091;
	totalmiles=totalmiles+69707;
}
if(document.Map.Montana.value==1)
{
	states = states +"<a href=javascript:coststate('Montana',4401) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Montana ($4,401)<br>";   
	calc=calc+4401;
	totalmiles=totalmiles+146721;
}
if(document.Map.Nebraska.value==1)
{
	states = states +"<a href=javascript:coststate('Nebraska',2317) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nebraska ($2,317)<br>";  
	calc=calc+2317;
	totalmiles=totalmiles+77266;
}
if(document.Map.Nevada.value==1)
{
	states = states +"<a href=javascript:coststate('Nevada',3314) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Nevada ($3,314)<br>";
	calc=calc+3314;
	totalmiles=totalmiles+110485;
}
if(document.Map.NewHampshire.value==1)
{
	states = states +"<a href=javascript:coststate('NewHampshire',929) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Hampshire ($929)<br>";  
	calc=calc+929;
	totalmiles=totalmiles+9294;
}
if(document.Map.NewJersey.value==1)
{
	states = states +"<a href=javascript:coststate('NewJersey',1013) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Jersey ($1,013)<br>";  
	calc=calc+1013;
	totalmiles=totalmiles+7799;
}
if(document.Map.NewMexico.value==1)
{
	states = states +"<a href=javascript:coststate('NewMexico',3648) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New Mexico ($3,648)<br>";
	calc=calc+3648;
	totalmiles=totalmiles+121618;
}
if(document.Map.NewYork.value==1)
{
	states = states +"<a href=javascript:coststate('NewYork',1960) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;New York ($1,960)<br>";
	calc=calc+1960;
	totalmiles=totalmiles+49001;
}
if(document.Map.NorthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('NorthCarolina',2108) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Carolina ($2,108)<br>";     
	calc=calc+2108;
	totalmiles=totalmiles+52712;
}
if(document.Map.NorthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('NorthDakota',2113) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;North Dakota ($2,113)<br>";   
	calc=calc+2113;
	totalmiles=totalmiles+70462;
}
if(document.Map.Ohio.value==1)
{
	states = states +"<a href=javascript:coststate('Ohio',1651) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Ohio ($1,651)<br>";
	calc=calc+1651;
	totalmiles=totalmiles+41299;
}
if(document.Map.Oklahoma.value==1)
{
	states = states +"<a href=javascript:coststate('Oklahoma',2099) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oklahoma ($2,099)<br>";   
	calc=calc+2099;
	totalmiles=totalmiles+69974;
}
if(document.Map.Oregon.value==1)
{
	states = states +"<a href=javascript:coststate('Oregon',2906) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Oregon ($2,906)<br>";   
	calc=calc+2906;
	totalmiles=totalmiles+96896;
}
if(document.Map.Pennsylvania.value==1)
{
	states = states +"<a href=javascript:coststate('Pennsylvania',1810) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Pennsylvania ($1,810)<br>"; 
	calc=calc+1810;
	totalmiles=totalmiles+45257;
}
if(document.Map.RhodeIsland.value==1)
{
	states = states +"<a href=javascript:coststate('RhodeIsland',181) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Rhode Island ($181)<br>";  
	calc=calc+181;
	totalmiles=totalmiles+1209;
}
if(document.Map.SouthCarolina.value==1)
{
	states = states +"<a href=javascript:coststate('SouthCarolina',1868) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Carolina ($1,868<br>";   
	calc=calc+1868;
	totalmiles=totalmiles+31135;
}
if(document.Map.SouthDakota.value==1)
{
	states = states +"<a href=javascript:coststate('SouthDakota',2308) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;South Dakota ($2,308)<br>"; 
	calc=calc+2308;
	totalmiles=totalmiles+76942;
} 
if(document.Map.Tennessee.value==1)
{
	states = states +"<a href=javascript:coststate('Tennessee',1685) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Tennessee ($1,685)<br>";  
	calc=calc+1685;
	totalmiles=totalmiles+42149;
}
if(document.Map.Texas.value==1)
{
	states = states +"<a href=javascript:coststate('Texas',5337) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Texas ($5,337)<br>";  
	calc=calc+5337;
	totalmiles=totalmiles+266893;
}
if(document.Map.Utah.value==1)
{
	states = states +"<a href=javascript:coststate('Utah',2544) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Utah ($2,544)<br>";   
	calc=calc+2544;
	totalmiles=totalmiles+84824;
}
if(document.Map.Vermont.value==1)
{
	states = states +"<a href=javascript:coststate('Vermont',961) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Vermont ($961)<br>";   
	calc=calc+961;
	totalmiles=totalmiles+9613;
}
if(document.Map.Virginia.value==1)
{
	states = states +"<a href=javascript:coststate('Virginia',1626) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Virginia ($1,626)<br>";  
	calc=calc+1626;
	totalmiles=totalmiles+40670;
}
if(document.Map.Washington.value==1)
{
	states = states +"<a href=javascript:coststate('Washington',2039) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington ($2,039)<br>";   
	calc=calc+2039;
	totalmiles=totalmiles+67972;
}
if(document.Map.WestVirginia.value==1)
{
	states = states +"<a href=javascript:coststate('WestVirginia',1450) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;West Virginia ($1,450)<br>";  
	calc=calc+1450;
	totalmiles=totalmiles+24179;
}
if(document.Map.Wisconsin.value==1)
{
	states = states +"<a href=javascript:coststate('Wisconsin',2236) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wisconsin ($2,236)<br>";   
	calc=calc+2236;
	totalmiles=totalmiles+55913;
}
if(document.Map.Wyoming.value==1)
{
	states = states +"<a href=javascript:coststate('Wyoming',2929) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Wyoming ($2,929)<br> ";    
	calc=calc+2929;
	totalmiles=totalmiles+97637;
}
if(document.Map.WashingtonDC.value==1)
{
	states = states +"<a href=javascript:coststate('WashingtonDC',10) ><img src=/Images/Common/remove.jpg alt='Delete State' Border=0></a>&nbsp;Washington DC ($10)<br>";   
	calc=calc+10;
	totalmiles=totalmiles+71;
}

//************* END OF ALL IFS *************************
 
}
	if (document.all) States.innerHTML=states;
	else if (document.getElementById) document.getElementById("States").innerHTML=states;
	else if (document.layers)
	{
		document.layers['StatesNet4'].visibility='show';
		document.layers['StatesNet4'].left=600;
		document.layers['StatesNet4'].top=75;
 		document.layers['StatesNet4'].document.open();
		document.layers['StatesNet4'].document.write(states);
 		document.layers['StatesNet4'].document.close();
	}

if((document.Map.projection[0].checked)&&(document.Map.datum[2].checked)&&(document.Map.format[0].checked))
	{
	if (document.all) TotalCost.innerHTML="$"+number_format(calc);
	else if (document.getElementById) document.getElementById("TotalCost").innerHTML="$"+number_format(calc);
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=830;
		document.layers['TotalCostNet4'].top=75;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(calc);
 		document.layers['TotalCostNet4'].document.close();
	}
	}
else
	{
	if (document.all) TotalCost.innerHTML="$"+number_format(Math.floor(calc*1.3));
	else if (document.getElementById) document.getElementById("TotalCost").innerHTML="$"+number_format(Math.floor(calc*1.3));
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=830;
		document.layers['TotalCostNet4'].top=75;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(calc*1.3);
 		document.layers['TotalCostNet4'].document.close();
		}
	}

if (document.Map.resolution[0].checked) mfactor2=2;
else mfactor2=0.12;

if(document.Map.format[2].checked) mfactor2=mfactor2/9;
else if (document.Map.format[0].checked) 
mfactor2=mfactor2/5.587;
filesize=(totalmiles*mfactor2);
if(filesize<1024)
{
	if (document.all) 
		Totalmiles.innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.ceil(filesize))+"-MB</font>";
	else if (document.getElementById)
		document.getElementById("Totalmiles").innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(round(filesize))+"-MB</font>";
	else if (document.layers)
	{
		document.layers['TotalmilesNet4'].visibility='show';
		document.layers['TotalmilesNet4'].left=730;
		document.layers['TotalmilesNet4'].top=45;
 		document.layers['TotalmilesNet4'].document.open();
		document.layers['TotalmilesNet4'].document.write("<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(round(filesize))+"-MB</font>");
 		document.layers['TotalmilesNet4'].document.close();
	}
}
else
{
	if (document.all) Totalmiles.innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.floor(filesize/1024,2))+"-GB</font>";
	else if (document.getElementById) document.getElementById("Totalmiles").innerHTML="<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.floor(filesize/1024,2))+"-GB</font>";
	else if (document.layers)
	{
		document.layers['TotalmilesNet4'].visibility='show';
		document.layers['TotalmilesNet4'].left=710;
		document.layers['TotalmilesNet4'].top=45;
 		document.layers['TotalmilesNet4'].document.open();
		document.layers['TotalmilesNet4'].document.write("<font face=verdana size=2 color=black>Total File Size: <b>"+number_format(Math.floor(filesize/1024,2))+"-GB</font>");
 		document.layers['TotalmilesNet4'].document.close();
	}
}
document.Map.totalcost.value=calc;
 
}

//########################### FUNCTION REPROJ() USED IN STATE PAGE FOR REPROJ COST ####################
//#####################################################################################################

function reproj()
{

changeresolution();
totalcost=round(parseFloat(document.Map.totalcost.value),2);

if((document.Map.projection[0].checked)&&(document.Map.datum[2].checked)&&(document.Map.format[0].checked))
{

	if (document.all) TotalCost.innerHTML="$"+number_format(totalcost);
	else if (document.getElementById) document.getElementById("TotalCost").innerHTML="$"+number_format(totalcost);
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=830;
		document.layers['TotalCostNet4'].top=75;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(totalcost);
 		document.layers['TotalCostNet4'].document.close();
	}
}
else
{
	if (document.all) TotalCost.innerHTML="$"+number_format(Math.floor(totalcost*1.3));
	else if (document.getElementById) document.getElementById("TotalCost").innerHTML="$"+number_format(Math.floor(totalcost*1.3));
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=830;
		document.layers['TotalCostNet4'].top=75;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(totalcost*1.3);
 		document.layers['TotalCostNet4'].document.close();
	}
}
}


//############### FUNCTION FILESIZE() USED IN COUNTY BUNDLES  ############################
//#######################################################################################
function filesize()
{
var totalmiles=0;
var mfactor2=0;
var filesize=0; 
totalmiles=round(parseFloat(document.Map.hid.value),2);

if (document.Map.onefour[0].checked) mfactor2=2;
else mfactor2=0.12;

if(document.Map.format[1].checked) mfactor2=mfactor2/9;

filesize=(totalmiles*mfactor2);
	if(filesize<1024)
	{
		if (document.all) document.getElementById("filesize").innerHTML=number_format(Math.ceil(filesize))+"-MB";	 
		else if (document.getElementById) document.getElementById("filesize").innerHTML=number_format(Math.ceil(filesize))+"-MB";
		else if (document.layers)
		{
		var temp=""
		temp=number_format(Math.ceil(filesize))+"-MB";
		document.layers['filesizeNet4'].visibility='show';
		document.layers['filesizeNet4'].left=310;
		document.layers['filesizeNet4'].top=410;
 		document.layers['filesizeNet4'].document.open();
		document.layers['filesizeNet4'].document.write(temp);
 		document.layers['filesizeNet4'].document.close();
		}
	}
	else
	{
		if (document.all) document.getElementById("filesize").innerHTML=number_format(round(filesize/1024,2))+"-GB"; 
		else if (document.getElementById) document.getElementById("filesize").innerHTML=number_format(round(filesize/1024,2))+"-GB";
		else if (document.layers)
		{
		var temp=""
		temp=number_format(round(filesize/1024,2))+"-GB";
		document.layers['filesizeNet4'].visibility='show';
		document.layers['filesizeNet4'].left=310;
		document.layers['filesizeNet4'].top=410;
 		document.layers['filesizeNet4'].document.open();
		document.layers['filesizeNet4'].document.write(temp);
 		document.layers['filesizeNet4'].document.close();
		}
	}
}

//############### FUNCTION CALCOST() USED IN COUNTY BUNDLES  ############################
//#######################################################################################
function calcost(fips,stat,mile)
{
miles=Math.ceil(mile);
totalmiles=Math.ceil(parseFloat(document.Map.hid.value));
totalcount=Math.ceil(parseFloat(document.Map.count.value));
nam=document.Map.name.value;
fipsvalue=document.Map.countyfips.value;

if((eval("document.Map."+stat+".checked"))==1)
{
	nam=nam+(eval("document.Map."+stat+".value"))+", ";
	totalcount=totalcount+1;
	totalmiles =totalmiles+miles;
	fipsvalue=fipsvalue+fips;
}
else
{
	nam=nam.replace(stat+",",'');
	totalcount=totalcount-1;
	totalmiles = totalmiles-miles;
	fipsvalue=fipsvalue.replace(fips,'');
}


	if (document.all) 
	{ 
		TotalCounty.innerHTML=totalcount;
		TotalMiles.innerHTML=number_format(totalmiles);
	}
	else if (document.getElementById)
	{
		document.getElementById("TotalCounty").innerHTML=totalcount;
		document.getElementById("TotalMiles").innerHTML=number_format(totalmiles);
	}
	else if (document.layers)
	{
		document.layers['TotalCountyNet4'].visibility='show';
		document.layers['TotalCountyNet4'].left=60;
		document.layers['TotalCountyNet4'].top=410;
 		document.layers['TotalCountyNet4'].document.open();
		document.layers['TotalCountyNet4'].document.write(totalcount);
 		document.layers['TotalCountyNet4'].document.close();
		document.layers['TotalMilesNet4'].visibility='show';
		document.layers['TotalMilesNet4'].left=160;
		document.layers['TotalMilesNet4'].top=410;
 		document.layers['TotalMilesNet4'].document.open();
		document.layers['TotalMilesNet4'].document.write(number_format(totalmiles));
 		document.layers['TotalMilesNet4'].document.close();
	}
document.Map.hid.value=totalmiles;
document.Map.count.value=totalcount;

filesize();
var mul=0;
if(document.Map.onefour[0].checked)
{
	if(totalmiles<=15) mul=2.00;
	else if(totalmiles<=60) mul=1.85;
	else if(totalmiles<=250) mul=1.50;
	else if(totalmiles<=1000) mul=1.25;
	else if(totalmiles<=3000) mul=1.00;
	else if(totalmiles<=9000) mul=0.85;
	else if(totalmiles<=12000) mul=0.65;
	else if(totalmiles<=40000) mul=0.35;
	else if(totalmiles<=65000) mul=0.25;
	else if(totalmiles<=125000) mul=0.20;
	else if(totalmiles<=200000) mul=0.15;
	else if(totalmiles<=1000000) mul=0.10;
	else if(totalmiles<=2000000) mul=0.08;
	else if(totalmiles<=3018003) mul=0.06;
}
else
{
	if(totalmiles<=15) mul=0.30;
	else if(totalmiles<=60) mul=0.28;
	else if(totalmiles<=250)  mul=0.23;
	else if(totalmiles<=1000) mul=0.19;
	else if(totalmiles<=3000) mul=0.13;
	else if(totalmiles<=12000) mul=0.10;
	else if(totalmiles<=40000) mul=0.06;
	else if(totalmiles<=65000) mul=0.04;
	else if(totalmiles<=125000) mul=0.03;
	else if(totalmiles<=200000) mul=0.03;
	else if(totalmiles<=1000000) mul=0.02;
	else if(totalmiles<=2000000) mul=0.02;
	else if(totalmiles<=3018003) mul=0.01;
}

	if (document.all) TotalCost.innerHTML="$"+number_format(Math.ceil(totalmiles*mul));
	else if (document.getElementById)
	{
		document.getElementById("TotalCost").innerHTML="$"+number_format(Math.ceil(totalmiles*mul));
	}
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=250;
		document.layers['TotalCostNet4'].top=410;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(Math.ceil(totalmiles*mul));
 		document.layers['TotalCostNet4'].document.close();
	}
document.Map.totalcost.value=Math.ceil(totalmiles*mul); 
document.Map.name.value=nam;
document.Map.countyfips.value=fipsvalue;
}


//############### FUNCTIONS USED IN COUNTY WHEN RESOLUTION CHANGES##########################
//####################################################################################### 
function changetype()
{
totalmiles=0
totalcount=0
totalmiles=Math.ceil(parseFloat(document.Map.hid.value));
totalcount=Math.ceil(parseFloat(document.Map.count.value));
var mul
if(document.Map.onefour[0].checked) {

	if(totalmiles<=15) mul=2.00;
	else if(totalmiles<=60) mul=1.85;
	else if(totalmiles<=250) mul=1.50;
	else if(totalmiles<=1000) mul=1.25;
	else if(totalmiles<=3000) mul=1.00
	else if(totalmiles<=9000) mul=0.85;
	else if(totalmiles<=12000) mul=0.65;
	else if(totalmiles<=40000) mul=0.35;
	else if(totalmiles<=65000) mul=0.25;
	else if(totalmiles<=125000) mul=0.20;
	else if(totalmiles<=200000) mul=0.15;
	else if(totalmiles<=1000000) mul=0.10;
	else if(totalmiles<=2000000) mul=0.08;
	else if(totalmiles<=3018003) mul=0.06;
}
else
{
	if (totalmiles<=15)	mul=0.30;
	else if(totalmiles<=60)	mul=0.28;
	else if(totalmiles<=250)	mul=0.23;
	else if(totalmiles<=1000)	mul=0.19;
	else if(totalmiles<=3000)	mul=0.15;
	else if(totalmiles<=9000)	mul=0.13;
	else if(totalmiles<=12000)	mul=0.10;
	else if(totalmiles<=40000)	mul=0.06;
	else if(totalmiles<=65000)	mul=0.04;
	else if(totalmiles<=125000)	mul=0.03;
	else if(totalmiles<=200000)	mul=0.03;
	else if(totalmiles<=1000000)	mul=0.02;
	else if(totalmiles<=2000000)	mul=0.02;	
	else if(totalmiles<=3018003)	mul=0.01;
}

document.Map.totalcost.value=Math.ceil(totalmiles*mul);
	filesize();
	if (document.all) TotalCost.innerHTML="$"+number_format(Math.ceil(totalmiles*mul));
	else if (document.getElementById)
	{

		document.getElementById("TotalCost").innerHTML="$"+number_format(Math.ceil(totalmiles*mul));
	}
	else if (document.layers)
	{
		document.layers['TotalCostNet4'].visibility='show';
		document.layers['TotalCostNet4'].left=250;
		document.layers['TotalCostNet4'].top=410;
 		document.layers['TotalCostNet4'].document.open();
		document.layers['TotalCostNet4'].document.write(Math.ceil(totalmiles*mul));
 		document.layers['TotalCostNet4'].document.close();
	}
	if (document.all) 
	{ 
		TotalCounty.innerHTML=totalcount;
		TotalMiles.innerHTML=number_format(totalmiles);
	}
	else if (document.getElementById)
	{
		document.getElementById("TotalCounty").innerHTML=totalcount;
		document.getElementById("TotalMiles").innerHTML=number_format(totalmiles);
	}
	else if (document.layers)
	{
		document.layers['TotalCountyNet4'].visibility='show';
		document.layers['TotalCountyNet4'].left=60;
		document.layers['TotalCountyNet4'].top=410;
 		document.layers['TotalCountyNet4'].document.open();
		document.layers['TotalCountyNet4'].document.write(totalcount);
 		document.layers['TotalCountyNet4'].document.close();
		document.layers['TotalMilesNet4'].visibility='show';
		document.layers['TotalMilesNet4'].left=160;
		document.layers['TotalMilesNet4'].top=410;
 		document.layers['TotalMilesNet4'].document.open();
		document.layers['TotalMilesNet4'].document.write(number_format(totalmiles));
 		document.layers['TotalMilesNet4'].document.close();
	}
	if(document.Map.media_type[0].checked)
		{
		document.Map.shipping_method[0].disabled=true;
		document.Map.shipping_method[1].disabled=true;
		document.Map.shipping_method[2].disabled=true;
		}
		else
		{
		document.Map.shipping_method[0].disabled=false;
		document.Map.shipping_method[1].disabled=false;
		document.Map.shipping_method[2].disabled=false;
		}
}

function mediatype()
{
	if(document.Map.media_type[0].checked)
	{
		document.Map.shipping_method[0].disabled=true;
		document.Map.shipping_method[1].disabled=true;
		document.Map.shipping_method[2].disabled=true;
	}
	else
	{
		document.Map.shipping_method[0].disabled=false;
		document.Map.shipping_method[1].disabled=false;
		document.Map.shipping_method[2].disabled=false;
	}
}

function number_format(n) {
  var arr=new Array('0'), i=0; 
  while (n>0) 
    {arr[i]=''+n%1000; n=Math.floor(n/1000); i++;}
  arr=arr.reverse();
  for (var i in arr) if (i>0) //padding zeros
    while (arr[i].length<3) arr[i]='0'+arr[i];
  return arr.join();
}



function Proj_Datum()
{
	if(document.Map.projection[0].checked)
	{
		document.Map.datum[2].disabled=false;
		
	}
	else
	{
		document.Map.datum[2].disabled=true;
		document.Map.datum[1].checked=true;
		
	}
}

