#!/bin/sh

accuuser=username
accupwd=password
timeHH=`date | cut -b 12,13`
timeMM=`date | cut -b 15,16`
header="AccuWeather(r) nexrad radar script by Patrick Heaslet"
email="kerensky@hotmail.com [1;37mv1.1[0m"
line="-------------------------------------------------------------------------------"

rm .ynbin .dynbin .tmpbin 1> /dev/null 2> /dev/null
clear
echo "${header} ${email}"
echo "${line}"
echo "Code:        Description: "
echo "R1     -     Base reflectivity 0.5 degree tilt"
echo "R2     -     Base reflectivity 1.5 degree tilt"
echo "R3     -     Base reflectivity 2.5 degree tilt"
echo "R4     -     Base reflectivity 3.5 degree tilt"
echo "RE     -     Extended base reflectivity"
echo "CR     -     Composite reflectivity"
echo "LL     -     Layer composite reflectivity  SFC - 24K ft.     (LOW)"
echo "LM     -     Layer composite reflectivity  24K ft. - 33K ft. (MID)"
echo "LH     -     Layer composite reflectivity  33K ft. - 60K ft. (HIGH)"
echo "V1     -     Radial wind velocity 0.5 degree tilt"
echo "V2     -     Radial wind velocity 1.5 degree tilt"
echo "V3     -     Radial wind velocity 2.5 degree tilt"
echo "V4     -     Radial wind velocity 3.5 degree tilt"
echo "S1     -     Storm-relative radial velocity 0.5 degree tilt"
echo "S2     -     Storm-relative radial velocity 2.5 degree tilt"
echo "SP     -     Storm total surface rainfall accumulation"
echo "OP     -     One hour surface rainfall accumulation"
echo "TP     -     Three hour surface rainfall accumulation"
echo "VL     -     Vertically integrated liquid"
echo "ET     -     Echo tops"
echo "${line}"
echo -n "Select code: "
read product
if [ "$product" = r1 ]; then
	img="R1"
	des="Base reflectivity 0.5 deg tilt"
fi
if [ "$product" = r2 ]; then
	img="R2"
	des="Base reflectivity 1.5 deg tilt"
fi
if [ "$product" = r3 ]; then
	img="R3"
	des="Base reflectivity 2.5 deg tilt"
fi
if [ "$product" = r4 ]; then
	img="R4"
	des="Base reflectivity 3.5 deg tilt"
fi
if [ "$product" = re ]; then
	img="RE"
	des="Extended base reflectivity"
fi
if [ "$product" = cr ]; then
	img="CR"
	des="Composite reflectivity"
fi
if [ "$product" = ll ]; then
	img="LL"
	des="Layer composite reflectivity  SFC - 24K ft."
fi
if [ "$product" = lm ]; then
	img="LM"
	des="Layer composite reflectivity  24K ft. - 33K ft."
fi
if [ "$product" = lh ]; then
	img="LH"
	des="Layer composite reflectivity  33K ft. - 60K ft."
fi
if [ "$product" = v1 ]; then
	img="V1"
	des="Radial wind velocity 0.5 deg tilt"
fi
if [ "$product" = v2 ]; then
	img="V2"
	des="Radial wind velocity 1.5 deg tilt"
fi
if [ "$product" = v3 ]; then
	img="V3"
	des="Radial wind velocity 2.5 deg tilt"
fi
if [ "$product" = v4 ]; then
	img="V4"
	des="Radial wind velocity 3.5 deg tilt"
fi
if [ "$product" = s1 ]; then
	img="S1"
	des="Storm-relative radial velocity 0.5 deg tilt"
fi
if [ "$product" = s2 ]; then
	img="S2"
	des="Storm-relative radial velocity 1.5 deg tilt"
fi
if [ "$product" = sp ]; then
	img="SP"
	des="Storm total surface rainfall accumulation"
fi
if [ "$product" = op ]; then
	img="OP"
	des="One hour surface rainfall accumulation"
fi
if [ "$product" = tp ]; then
	img="TP"
	des="Three hour surface rainfall accumulation"
fi
if [ "$product" = vl ]; then
	img="VL"
	des="Vertically intregrated liquid"
fi
if [ "$product" = et ]; then
	img="ET"
	des="Echo tops"
fi

clear
echo ""
echo "${header}"
echo "${line}"
echo "${des}"
echo "${line}"
echo "(AL) Alabama              (AZ) Arizona              (AR) Arkansas"
echo "(CA) California           (DE) Delaware             (FL) Florida"
echo "(GA) Georgia              (ID) Idaho                (IL) Illinois"
echo "(IN) Indiana              (IA) Iowa                 (KS) Kansas"
echo "(KY) Kentucky             (LA) Loiusiana            (ME) Maine"
echo "(MA) Massachusetts        (MI) Michigan             (MN) Minnesota"
echo "(MO) Missouri             (MS) Mississippi          (MT) Montana"
echo "(NE) Nebraska             (NV) Nevada               (NM) New_Mexico"
echo "(NY) New_york             (ND) North_Dakota         (OH) Ohio"
echo "(NC) North_Carolina       (OK) Oklahoma             (OR) Oregon"
echo "(PA) Pennsylvania         (SC) South_Carolina       (SD) South_Dakota"
echo "(TN) Tennessee            (TX) Texas                (UT) Utah"
echo "(VT) Vermont              (VA) Virginia             (WA) Washington"
echo "(WV) West_Virginia        (WI) Wisconsin            (WY) Wyoming"
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}-"
echo -n "Select state: "
read state
clear
if [ "$state" = alabama -o "$state" = al ]; then
	st="Alabama"
        echo "${header} "
	echo "${line}"
	echo "${des}, ${st}"
	echo "${line}"
	echo "1: Birmingham"
        echo "2: Huntsville"
        echo "3: Fort_rucker"
        echo "4: Maxwell_AFB"
        echo "5: Mobile"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = birmingham -o "$city" = 1 ]; then
		cty="kBHM"
		cy="Birmingham"
		echo ""
	fi
	if [ "$city" = huntsville -o "$city" = 2 ]; then
		cty="kHTX"
		cy="Huntsville"
		echo ""
	fi
	if [ "$city" = fort_rucker -o "$city" = 3 ]; then
		cty="kLOR"
		cy="Fort_Rucker"
		echo ""
	fi
	if [ "$city" = maxwell_afb -o "$city" = 4 ]; then
		cty="kMAX"
		cy="Maxwell_AFB"
		echo ""
	fi
	if [ "$city" = mobile -o "$city" = 5 ]; then
		cty="kMOB"
		cy="Mobile"
		echo ""
	fi
clear
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" >> .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi
exit
fi

if [ "$state" = arizona -o "$state" = az ]; then
	st="Arizona"
	echo "${header} "
	echo "${line}"
	echo "${des}, ${st}"
	echo "${line}"
	echo "1: Flagstaff"
	echo "2: Phoenix"
	echo "3: Tucson"
	echo "4: Yuma"
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo -n "Select city: "
	read city
	if [ "$city" = flagstaff -o "$city" = 1 ]; then
		cty="kFLG"
		cy="Flagstaff"
		echo ""
	fi
	if [ "$city" = phoenix -o "$city" = 2 ]; then
		cty="kPHX"
		cy="Phoenix"
		echo ""
	fi
	if [ "$city" = tucson -o "$city" = 3 ]; then
		cty="kTUS"
		cy="Tucson"
		echo ""
	fi
	if [ "$city" = yuma -o "$city" = 4 ]; then
		cty="kYUM"
		cy="Yuma"
		echo ""
	fi
clear
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = arkansas -o "$state" = ar ]; then
        st="Arkansas"
        echo "${header} "
        echo "${line}"
        echo "${st}"
        echo "${line}"
        echo "1: Little_rock"
        echo "2: Fort_Smith"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city "
	read city
	if [ "$city" = little_rock -o "$city" = 1 ]; then
		cty="kLIT"
		cy="Little_Rock"
		echo ""
	fi
	if [ "$city" = fort_smith -o "$city" = 2 ]; then
		cty="kSRX"
		cy="Fort_Smith"
		echo ""
	fi
clear
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = california -o "$state" = ca ]; then
	st="California"
	echo "${header} "
	echo "${line}"
	echo "{st}"
	echo "${line}"
	echo "1: Beale_AFB"
	echo "2: Edwards_AFB"
	echo "3: Eureka"
	echo "4: Fresno"
	echo "5: Los_Angeles"
	echo "6: Riverside"
	echo "7: Sacramento"
	echo "8: San_diego"
	echo "9: San_francisco"
	echo "10: Lompoc"
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo -n "Select city "
	read city
	if [ "$city" = beale_afb ]; then
		cty="kBAB"
		cy="Beale_AFB"
		echo ""
	fi
	if [ "$city" = edwards_afb ]; then
		cty="kVCV"
		cy="Edwards_AFB"
		echo ""
	fi
	if [ "$city" = eureka ]; then
		cty="kEKA"
		cy="Eureka"
		echo ""
	fi
	if [ "$city" = fresno ]; then
		cty="kFAT"
		cy="Fresno"
		echo ""
	fi
	if [ "$city" = los_angeles ]; then
		cty="kLAX"
		cy="Los_Angeles"
		echo ""
	fi
	if [ "$city" = riverside ]; then
		cty="kRIV"
		cy="Riverside"
		echo ""
	fi
	if [ "$city" = sacramento ]; then
		cty="kSAC"
		cy="Sacramento"
		echo ""
	fi
	if [ "$city" = san_diego ]; then
		cty="kSAN"
		cy="San_Diego"
		echo ""
	fi
	if [ "$city" = san_francisco ]; then
		cty="kFSO"
		cy="San_Francisco"
		echo ""
	fi
	if [ "$city" = lompoc ]; then
		cty="kVBG"
		cy="Lompoc"
		echo ""
	fi
clear
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = colorado -o "$state" = co ]; then
        st="Colorado"
        echo "${header} "
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Denver"
        echo "2: Grand_junction"
        echo "3: Pueblo"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city "
        read city
	if [ "$city" = denver -o "$state" = 1 ]; then
		cty="kDEN"
		cy="Denver"
		echo ""
	fi
	if [ "$city" = grand_junction -o "$state" = 2 ]; then
		cty="kGJT"
		cy="Grand_Junction"
		echo ""
	fi
	if [ "$city" = pueblo -o "$state" = 3 ]; then
		cty="kPUB"
		cy="Pueblo"
		echo ""
	fi
clear
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = delaware -o "$state" = de ]; then
        st="Delaware"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Dover"
        echo ""
	echo ""
        echo ""
	echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
        read city
	if [ "$city" = dover -o "$city" = 1 ]; then
		cty="kDOV"
		cy="Dover"
		echo ""
	fi
clear
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = florida -o "$state" = fl ]; then
        st="Florida"
	echo "${header}"
	echo "${line}"
	echo "${des}, ${st}"
	echo "${line}"
	echo "1: Jacksonville"
	echo "2: Key_West"
	echo "3: Melbourne"
	echo "4: Miami"
	echo "5: Tallahassee"
	echo "6: Tampa"
	echo "7: Eglin_AFB"
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = jacksonville -o "$city" = 1 ]; then
		cty="kJAX"
		cy="Jacksonville"
		echo ""
	fi
	if [ "$city" = key_west -o "$city" = 2 ]; then
		cty="kEYW"
		cy="Key_West"
		echo ""
	fi
	if [ "$city" = melbourne -o "$city" = 3 ]; then
		cty="kMLB"
		cy="Melbourne"
		echo ""
	fi
	if [ "$city" = miami -o "$city" = 4 ]; then
		cty="kMIA"
		cy="Miami"
		echo ""
	fi
	if [ "$city" = tallahassee -o "$city" = 5 ]; then
		cty="kTLH"
		cy="Tallahassee"
		echo ""
	fi
	if [ "$city" = tampa -o "$city" = 6 ]; then
		cty="kTPA"
		cy="Tampa"
		echo ""
	fi
	if [ "$city" = eglin_afb -o "$city" = 7 ]; then
		cty="kVPS"
		cy="Eglin_AFB"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = georgia -o "$state" = ga ]; then
        st="Georgia"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Atlanta"
        echo "2: Valdosta"
        echo "3: Macon"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = atlanta -o "$city" = 1 ]; then
		cty="kATL"
		cy="Atlanta"
		echo ""
	fi
	if [ "$city" = valdosta -o "$city" = 2 ]; then
		cty="kVAD"
		cy="Valdosta"
		echo ""
	fi
	if [ "$city" = macon -o "$city" = 3 ]; then
		cty="kWRB"
		cy="Macon"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = idaho -o "$state" = id ]; then
        st="Idaho"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Boise"
        echo "2: Pocatello"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = boise -o "$city" = 1 ]; then
		cty="kBOI"
		cy="Boise"
		echo ""
	fi
	if [ "$city" = pocatello -o "$city" = 2 ]; then
		cty="kPIH"
		cy="Pocatello"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = illinois -o "$state" = il ]; then
        st="Illinois"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Chicago"
        echo "2: Lincoln"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""                
        echo -n "Select city: "
	read city
	if [ "$city" = chicago -o "$city" = 1 ]; then
		cty="kCHI"
		cy="Chicago"
		echo ""
	fi
	if [ "$city" = lincoln -o "$city" = 2 ]; then
		cty="k3LC"
		cy="Lincoln"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = indiana -o "$state" = in ]; then
        st="Indiana"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
	echo "1: Indianapolis"
	echo "2: Fort_Wayne"
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo -n "Select city: "
	read city
	if [ "$city" = indianapolis -o "$city" = 1 ]; then
		cty="kIND"
		cy="Indianapolis"
		echo ""
	fi
	if [ "$city" = fort_wayne ]; then
		cty="kIWX"
		cy="Fort_Wayne"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = iowa -o "$state" = ia ]; then
        st="Iowa"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Des_Moines"
        echo "2: Quad_Cities"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
	echo -n "Select city: "
	read city
	if [ "$city" = des_moines -o "$city" = 1 ]; then
		cty="kDSM"
		cy="Des_Moines"
		echo ""
	fi
	if [ "$city" = quad_cities -o "$city" = 2 ]; then
		cty="kDVN"
		cy="Quad_Cities"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = kansas -o "$state" = ks ]; then
        st="Kansas"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Goodland"
        echo "2: Dodge_City"
        echo "3: Topeka"
        echo "4: Wichita"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = goodland -o "$city" = 1 ]; then
		cty="kGLD"
		cy="Goodland"
		echo ""
	fi
	if [ "$city" = dodge_city -o "$city" = 2 ]; then
		cty="kDDC"
		cy="Dodge_City"
		echo ""
	fi
	if [ "$city" = topeka -o "$city" = 3 ]; then
		cty="kTOP"
		cy="Topeka"
		echo ""
	fi
	if [ "$city" = wichita -o "$city" = 4 ]; then
		cty="kICT"
		cy="Wichita"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = kentucky -o "$state" = ky ]; then
        st="Kentucky"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Jackson"
        echo "2: Louisville"
        echo "3: Paducah"
        echo "4: Fort_Campbell"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = jackson -o "$city" = 1 ]; then
		cty="kJKL"
		cy="Jackson"
		echo ""
	fi
	if [ "$city" = louisville -o "$city" = 2 ]; then
		cty="kSDF"
		cy="Louisville"
		echo ""
	fi
	if [ "$city" = paducah -o "$city" = 3 ]; then
		cty="kPAH"
		cy="Paducah"
		echo ""
	fi
	if [ "$city" = fort_campbell -o "$city" = 4 ]; then
		cty="kXRW"
		cy="Fort_Campbell"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = louisiana -o "$state" = la ]; then
        st="Louisiana"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Lake_Charles"
        echo "2: New_Orleans"
        echo "3: Fort_Polk"
        echo "4: Shreveport"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = lake_charles -o "$city" = 1 ]; then
		cty="kLCH"
		cy="Lake_Charles"
		echo ""
	fi
	if [ "$city" = new_orleans -o "$city" = 2 ]; then
		cty="kNEW"
		cy="New_Orleans"
		echo ""
	fi
	if [ "$city" = fort_polk -o "$city" = 3 ]; then
		cty="kPOE"
		cy="Fort_Polk"
		echo ""
	fi
	if [ "$city" = shreveport -o "$city" = 4 ]; then
		cty="kSRV"
		cy="Shreveport"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = maine -o "$state" = me ]; then
        st="Maine"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Caribou"
	echo "2: Portland"
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo -n "Select city: "
	read city
	if [ "$city" = caribou -o "$city" = 1 ]; then
		cty="kLIZ"
		cy="Caribou"
		echo ""
	fi
	if [ "$city" = portland -o "$city" = 2 ]; then
		cty="kPWM"
		cy="Portland"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = massachusetts -o "$state" = ma ]; then
        st="Massachusetts"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Boston"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = boston -o "$city" = 1 ]; then
		cty="kBOS"
		cy="Boston"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = michigan  -o "$state" = mi ]; then
        st="Michigan"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Alpena"
        echo "2: Grand_Rapids"
        echo "3: Marquette"
        echo "4: Detroit"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = alpena -o "$city" = 1 ]; then
		cty="kAPN"
		cy="Alpena"
		echo ""
	fi
	if [ "$city" = grand_rapids -o "$city" = 2 ]; then
		cty="kGRR"
		cy="Grand_Rapids"
		echo ""
	fi
	if [ "$city" = marquette -o "$city" = 3 ]; then
		cty="kMQT"
		cy="Marquette"
		echo ""
	fi
	if [ "$city" = detroit -o "$city" = 4 ]; then
		cty="kPTK"
		cy="Detroit"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = minnesota -o "$state" = mn ]; then
        st="Minnesota"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Duluth"
        echo "2: Minneapolis"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = duluth -o "$city" = 1 ]; then
		cty="kDLH"
		cy="Duluth"
		echo ""
	fi
	if [ "$city" = minneapolis -o "$city" = 2 ]; then
		cty="kMSP"
		cy="Minneapolis"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi
exit
fi

if [ "$state" = mississippi -o "$state" = ms ]; then
        st="Mississippi"
        echo "${header}"
        echo "${line}"
	echo "${des}, ${st}"
        echo "${line}"
	echo "1: Columbus_AFB"
        echo "2: Jackson"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = columbus_afb -o "$city" = 1 ]; then
		cty="kCBN"
		cy="Columbus_AFB"
		echo ""
	fi
	if [ "$city" = jackson -o "$city" = 2 ]; then
		cty="kJAN"
		cy="Jackson"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = missouri -o "$state" = mo ]; then
        st="Missouri"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Kansas_City"
        echo "2: Springfield"
        echo "3: St_Louis"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = kansas_city -o "$city" = 1 ]; then
		cty="kMKC"
		cy="Kansas_City"
		echo ""
	fi
	if [ "$city" = springfield -o "$city" = 2 ]; then
		cty="kSGF"
		cy="Springfield"
		echo ""
	fi
	if [ "$city" = st_louis -o "$city" = 3 ]; then
		cty="kSTL"
		cy="St_Louis"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = montana -o "$state" = mt ]; then
        st="Montana"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Billings"
        echo "2: Glasglow"
        echo "3: Great_Falls"
        echo "4: Missoula_County"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = billings -o "$city" = 1 ]; then
		cty="kBIL"
		cy="Billings"
		echo ""
	fi
	if [ "$city" = glasglow -o "$city" = 2 ]; then
		cty="kGGW"
		cy="Glasglow"
		echo ""
	fi
	if [ "$city" = great_falls -o "$city" = 3 ]; then
		cty="kGTF"
		cy="Great_Falls"
		echo ""
	fi
	if [ "$city" = missoula_County -o "$city" = 4 ]; then
		cty="kMSO"
		cy="Missoula_County"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = nebraska -o "$state" = ne ]; then
        st="Nebraska"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Hastings"
        echo "2: North_Platte"
        echo "3: Omaha"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = hastings -o "$city" = 1 ]; then
		cty="kHSI"
		cy="Hastings"
		echo ""
	fi
	if [ "$city" = north_platte -o "$city" = 2 ]; then
		cty="kLBF"
		cy="North_Platte"
		echo ""
	fi
	if [ "$city" = omaha -o "$city" = 3 ]; then
		cty="kOMA"
		cy="Omaha"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = nevada -o "$state" = nv ]; then
        st="Nevada"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Elko"
        echo "2: Las_Vegas"
        echo "3: Reno"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = elko -o "$city" = 1 ]; then
		cty="kEKO"
		cy="Elko"
		echo ""
	fi
	if [ "$city" = las_vegas -o "$city" = 2 ]; then
		cty="kLAS"
		cy="Las_Vegas"
		echo ""
	fi
	if [ "$city" = reno -o "$city" = 3 ]; then
		cty="kRNO"
		cy="Reno"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = new_mexico -o "$state" = nm ]; then
        st="New_Mexico"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Albuquerque"
        echo "2: Cannon_AFB"
        echo "3: Alamogordo"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = albuquerque -o "$city" = 1 ]; then
		cty="kABQ"
		cy="Albuquerque"
		echo ""
	fi
	if [ "$city" = cannon_afb -o "$city" = 2 ]; then
		cty="kCVS"
		cy="Cannon_AFB"
		echo ""
	fi
        if [ "$city" = alamogordo -o "$city" = 3 ]; then
		cty="kHMN"
		cy="Alamogordo"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = new_york -o "$state" = ny ]; then
        st="New_York"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Albany"
        echo "2: Binghamton"
        echo "3: Buffalo"
        echo "4: NYC"
        echo "5: Griffiss_AFB"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = albany -o "$city" = 1 ]; then
		cty="kALB"
		cy="Albany"
		echo ""
	fi
	if [ "$city" = binghamton -o "$city" = 2 ]; then
		cty="kBGM"
		cy="Binghamton"
		echo ""
	fi
	if [ "$city" = buffalo -o "$city" = 3 ]; then
		cty="kBUF"
		cy="Buffalo"
		echo ""
	fi
	if [ "$city" = nyc -o "$city" = 4 ]; then
		cty="kNYC"
		cy="New_York_City"
		echo ""
	fi
	if [ "$city" = griffis_afb -o "$city" = 5 ]; then
		cty="kRME"
		cy="Griffis_AFB"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = north_carolina -o "$state" = nc ]; then
        st="North_Carolina"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Morehead_City"
        echo "2: Raleigh-Durham"
        echo "3: Wilmington"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = morehead_city -o "$city" = 1 ]; then
		cty="kMRH"
		cy="Morehead_City"
		echo ""
	fi
	if [ "$city" = raleigh-durham -o "$city" = 2 ]; then
		cty="kRDU"
		cy="Raleigh-Durham"
		echo ""
	fi
	if [ "$city" = wilmington -o "$city" = 3 ]; then
		cty="kILM"
		cy="Wilmington"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = north_dakota -o "$state" = nd ]; then
        st="North_Dakota"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Bismarck"
        echo "2: Fargo"
        echo "3: Minot_AFB"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = bismarck -o "$city" = 1 ]; then
		cty="kBIS"
		cy="Bismarck"
		echo ""
	fi
	if [ "$city" = fargo -o "$city" = 2 ]; then
		cty="kFAR"
		cy="Fargo"
		echo ""
	fi
	if [ "$city" = minot_afb -o "$city" = 3 ]; then
		cty="kMIB"
		cy="Minot_AFB"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = ohio -o "$state" = oh ]; then
        st="Ohio"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Cincinnati"
        echo "2: Cleveland"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = cincinnati -o "$city" = 1 ]; then
		cty="kCVG"
		cy="Cincinnati"
		echo ""
	fi
	if [ "$city" = cleveland -o "$city" = 2 ]; then
		cty="kCLE"
		cy="Cleveland"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = oklahoma -o "$state" = ok ]; then
        st="Oklahoma"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Enid"
        echo "2: Frederick"
        echo "3: Oklahoma_City"
        echo "4: Tulsa"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = enid -o "$city" = 1 ]; then
		cty="kEND"
		cy="Enid"
		echo ""
	fi
	if [ "$city" = frederick -o "$city" = 2 ]; then
		cty="kFDR"
		cy="Frederick"
		echo ""
	fi
	if [ "$city" = oklahoma_city -o "$city" = 3 ]; then
		cty="kOKC"
		cy="Oklahoma_City"
		echo ""
	fi
	if [ "$city" = tulsa -o "$city" = 4 ]; then
		cty="kTUL"
		cy="Tulsa"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = oregon -o "$state" = or ]; then
        st="Oregon"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Medford"
        echo "2: Pendleton"
        echo "3: Portland"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = medford -o "$city" = 1 ]; then
		cty="kMFR"
		cy="Medford"
		echo ""
	fi
	if [ "$city" = pendleton -o "$city" = 2 ]; then
		cty="kPDT"
		cy="Pendleton"
		echo ""
	fi
	if [ "$city" = portland -o "$city" = 3 ]; then
		cty="kPDX"
		cy="Portland"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = pennsylvania -o "$state" = pa ]; then
        st="Pennsylvania"
	echo "${header}"
	echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
	echo "1: Philadelphia"
	echo "2: Pittsburgh"
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
	echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = philadelphia -o "$city" = 1 ]; then
		cty="kPHL"
		cy="Philadelphia"
		echo ""
	fi
	if [ "$city" = pittsburgh -o "$city" = 2 ]; then
		cty="kPIT"
		cy="Pittsburgh"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = south_carolina -o "$state" = sc ]; then
        st="South_Carolina"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Charleston"
        echo "2: Columbia"
        echo "3: Greenville"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = charleston -o "$city" = 1 ]; then
		cty="kCHS"
		cy="Charleston"
		echo ""
	fi
	if [ "$city" = columbia -o "$city" = 2 ]; then
		cty="kCAE"
		cy="Columbia"
		echo ""
	fi
	if [ "$city" = greenville -o "$city" = 3 ]; then
		cty="kGSP"
		cy="Greenville"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = south_dakota -o "$state" = sd ]; then
        st="South_Dakota"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Aberdeen"
        echo "2: Rapid_City"
        echo "3: Sioux_Falls"
        echo ""
        echo ""
	echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = aberdeen -o "$city" = 1 ]; then
		cty="kABR"
		cy="Aberdeen"
		echo ""
	fi
	if [ "$city" = rapid_city -o "$city" = 2 ]; then
		cty="kRAP"
		cy="Rapid_City"
		echo ""
	fi
	if [ "$city" = sioux_falls -o "$city" = 3 ]; then
		cty="kFSD"
		cy="Sioux_Falls"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = tennessee -o "$state" = tn ]; then
        st="Tennessee"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Memphis"
        echo "2: Tri_City"
        echo "3: Nashville"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = memphis -o "$city" = 1 ]; then
		cty="kMEM"
		cy="Memphis"
		echo ""
	fi
	if [ "$city" = tri_city -o "$city" = 2 ]; then
		cty="kMOR"
		cy="Tri_City"
		echo ""
	fi
	if [ "$city" = nashville -o "$city" = 3 ]; then
		cty="kBNA"
		cy="Nashville"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = texas -o "$state" = tx ]; then
        st="Texas"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Amarillo"
        echo "2: Brownsville"
        echo "3: Corpus_Christi"
        echo "4: Dyess_AFB"
        echo "5: El_Paso"
        echo "6: Dallas"
        echo "7: Austin"
        echo "8: Houston"
        echo "9: Laughlin_AFB"
        echo "10: Lubbock"
        echo "11: Midland"
        echo "12: San_Angelo"
        echo "13: San_Antonio"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
	echo -n "Select city: "
	read city
	if [ "$city" = amarillo -o "$city" = 1 ]; then
		cty="kAMA"
		cy="Amarillo"
		echo ""
	fi
	if [ "$city" = brownsville -o "$city" = 2 ]; then
		cty="kBRO"
		cy="Brownsville"
		echo ""
	fi
	if [ "$city" = corpus_christi -o "$city" = 3 ]; then
		cty="kCRP"
		cy="Corpus_Christi"
		echo ""
	fi
	if [ "$city" = dyess_afb -o "$city" = 4 ]; then
		cty="kDYS"
		cy="Dyess_AFB"
		echo ""
	fi
	if [ "$city" = el_paso -o "$city" = 5 ]; then
		cty="kELP"
		cy="El_Paso"
		echo ""
	fi
	if [ "$city" = dallas -o "$city" = 6 ]; then
		cty="kFTW"
		cy="Dallas"
		echo ""
	fi
	if [ "$city" = austin -o "$city" = 7 ]; then
		cty="kHOO"
		cy="Austin"
		echo ""
	fi
	if [ "$city" = houston -o "$city" = 8 ]; then
		cty="kHOU"
		cy="Houston"
		echo ""
	fi
	if [ "$city" = laughlin_afb -o "$city" = 9 ]; then
		cty="kDLF"
		cy="Laughlin_AFB"
		echo ""
	fi
	if [ "$city" = lubbock -o "$city" = 10 ]; then
		cty="kLBB"
		cy="Lubbock"
		echo ""
	fi
	if [ "$city" = midland -o "$city" = 11 ]; then
		cty="kMAF"
		cy="Midland"
		echo ""
	fi
	if [ "$city" = san_angelo -o "$city" = 12 ]; then
		cty="kSJT"
		cy="San_Angelo"
		echo ""
	fi
	if [ "$city" = san_antonio -o "$city" = 13 ]; then
		cty="kSAT"
		cy="San_Antonio"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = utah -o "$state" = ut ]; then
        st="Utah"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Cedar_City"
        echo "2: Salt_Lake_City"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = cedar_city -o "$city" = 1 ]; then
		cty="kCDC"
		cy="Cedar_City"
		echo ""
	fi
	if [ "$city" = salt_lake_city -o "$city" = 2 ]; then
		cty="kSLC"
		cy="Salt_Lake_City"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = vermont -o "$state" = vt ]; then
        st="Vermont"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Burlington"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = burlington -o "$city" = 1 ]; then
		cty="kBTV"
		cy="Burlington"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = virginia -o "$state" = va ]; then
        st="Virginia"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Norfolk"
        echo "2: Roanoke"
        echo "3: Sterling"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = norfolk -o "$city" = 1 ]; then
		cty="kORF"
		cy="Norfolk"
		echo ""
	fi
	if [ "$city" = roanoke -o "$city" = 2 ]; then
		cty="kROA"
		cy="Roanoke"
		echo ""
	fi
	if [ "$city" = sterling -o "$city" = 3 ]; then
		cty="kWBC"
		cy="Sterling"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = washington -o "$state" = wa ]; then
        st="Washington"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Seattle"
        echo "2: Spokane"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = seattle -o "$city" = 1 ]; then
		cty="kSEA"
		cy="Seattle"
		echo ""
	fi
	if [ "$city" = Spokane -o "$city" = 2 ]; then
		cty="kGEG"
		cy="Spokane"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = west_virginia -o "$state" = wv ]; then
        st="West_Virginia"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Charleston"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = chaleston -o "$city" = 1 ]; then
		cty="kCRW"
		cy="Charleston"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = wisconsin -o "$state" = wi ]; then
        st="Wisconsin"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Green_Bay"
        echo "2: La_Crosse"
        echo "3: Milwaukee"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = green_bay -o "$city" = 1 ]; then
		cty="kGRB"
		cy="Green_Bay"
		echo ""
	fi
	if [ "$city" = la_crosse -o "$city" = 2 ]; then
		cty="kLSE"
		cy="La_Crosse"
		echo ""
	fi
	if [ "$city" = milwaukee -o "$city" = 3 ]; then
		cty="kMKE"
		cy="Milwaukee"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

exit
fi

if [ "$state" = wyoming -o "$state" = wy ]; then
        st="Wyoming"
        echo "${header}"
        echo "${line}"
        echo "${des}, ${st}"
        echo "${line}"
        echo "1: Cheyenne"
        echo "2: Riverton"
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo ""
        echo -n "Select city: "
	read city
	if [ "$city" = cheyenne -o "$city" = 1 ]; then
		cty="kCYS"
		cy="Cheyenne"
		echo ""
	fi
	if [ "$city" = riverton -o "$city" = 2 ]; then
		cty="kRIW"
		cy="Riverton"
		echo ""
	fi
echo "${header}"
echo "${line}"
echo "$des, $cy, $st"
echo "${line}"
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo ""
echo "${line}"
echo "wget --http-user=${accuuser} --http-passwd=${accupwd} http://personal.accuweather.com/weather/nxind/${img}/${cty}/map.gif" > .tmpbin
chmod +x .tmpbin
echo "Recieving image..."
./.tmpbin 1> /dev/null 2> /dev/null
mv map.gif ${img}_${st}_${cy}_${timeHH}${timeMM}.gif
echo "Done! " ; echo "Saved file as ${img}_${st}_${cy}_${timeHH}${timeMM}.gif"
rm .tmpbin
echo -n "Would you like to view this image? [y/n]: "
read yn
if [ "$yn" = y -o "$yn" = Y ]; then
	echo "zgv -j ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .ynbin
	chmod +x .ynbin
	./.ynbin ; rm ./.ynbin
	echo -n "Would you like to delete this image? [y/n]: "
	read dyn
	if [ "$dyn" = y -o "$dyn" = Y ]; then
		echo "rm ${img}_${st}_${cy}_${timeHH}${timeMM}.gif" > .dynbin
		chmod +x .dynbin
		./.dynbin ; rm ./.dynbin
	
fi

if [ $"yn" = n -o "$yn" = N ]; then
	exit	
	fi
fi

fi
exit
rm .dynbin

# Nothing else to see... go home!
# Patrick Heaslet
# kerensky@hotmail.com
# http://www.digital-galaxy.net/~patt
