
<!-- hide from old timers

	to = 0;
	from = 0;
	money = 0;
	salaryDiff = 0;
	percentDiff = 0;
	i=0;


// construct city-factor arrays
function makeArray() {
	args = makeArray.arguments;
	this.size = args.length;
	for (i = 0; i < args.length; i++) {
		this[i] = args[i];
		}
	this.length = args.length;
	}

// load cities
cityFactor = new makeArray(
"Select a city", 0,
"Abilene TX", 94.5,
"Aiken GA", 94.9,
"Akron OH", 100.2,
"Albany NY", 110.2,
"Albuquerque NM", 101.1,
"Alexandria LA", 95.4,
"Allen Co. IN", 96.0,
"Altoona PA", 100.8,
"Amarillo TX", 94.0,
"Americus GA", 96.6,
"Ames IA", 97.8,
"Anchorage AK", 112.0,
"Anderson IN", 97.3,
"Anderson SC", 98.3,
"Ann Arbor MI", 111.1,
"Anniston AL", 92.2,
"Appleton WI", 102.8,
"Ardmore OK", 90.6,
"Arlington TX", 95.7,
"Asheville NC", 101.9,
"Atlanta GA", 103.0,
"Augusta GA", 94.9,
"Aurora CO", 105.2,
"Austin TX", 98.4,
"Bainbridge GA", 94.0,
"Bakersfield CA", 127.0,
"Baltimore MD", 97.7,
"Barre VT", 102.0,
"Bartlesville OK", 94.2,
"Baton Rouge LA", 99.4,
"Beaufort SC", 102.7,
"Beaumont TX", 94.5,
"Bellingham WA", 107.7,
"Beloit WI", 104.1,
"Benton Harbor Ml", 106.0,
"Bergen Co. NJ", 124.3,
"Berkeley Co. WV", 93.1,
"Billings MT", 99.3,
"Biloxi/Gulfport MS", 97.3,
"Binghamton/Broome Co. NY", 102.0,
"Birmingham AL", 96.9,
"Bismarck ND", 100.3,
"Bloomington IL", 101.3,
"Bloomington IN", 97.3,
"Boca Raton FL", 109.2,
"Boise ID", 98.3,
"Bossier City LA", 94.5,
"Boston MA", 128.9,
"Boulder CO", 115.7,
"Bowling Green KY", 95.0,
"Bozeman MT", 101.0,
"Bradenton FL", 102.1,
"Bremerton WA", 104.1,
"Bristol VA", 93.4,
"Brownsville TX", 93.8,
"Bryan TX", 92.5,
"Buffalo/Niagara Falls NY", 101.7,
"Burlington NC", 94.5,
"Burlington VT", 112.0,
"Camden SC", 99.8,
"Carbondale IL", 98.3,
"Carlisle PA", 98.6,
"Carlsbad NM", 94.7,
"Cedar Falls IA", 97.8,
"Cedar Rapids IA", 96.6,
"Champaign IL", 104.6,
"Chapel Hill NC", 99.9,
"Charleston SC", 102.9,
"Charleston WV", 97.7,
"Charlotte NC", 100.3,
"Chattanooga TN", 92.7,
"Cherry Hill NJ", 114.6,
"Cheyenne WY", 100.0,
"Chicago IL", 110.0,
"Chittenden Co. VT", 112.0,
"Christiansburg VA", 97.2,
"Cincinnati OH", 100.6,
"Clarksville TN", 92.3,
"Clearwater FL", 104.2,
"Cleveland OH", 110.3,
"College Station TX", 92.4,
"Colorado Springs CO", 99.3,
"Columbia MO", 97.2,
"Columbia SC", 97.8,
"Columbus GA", 96.6,
"Columbus OH", 101.1,
"Conroe TX", 94.9,
"Cookeville TN", 90.1,
"Corning NY", 109.3,
"Corvallis OR", 107.0,
"Covington KY", 95.7,
"Cullman Co. AL", 97.2,
"Cumberland MD", 101.0,
"Dallas TX", 100.1,
"Danville KY", 94.5,
"Dare County NC", 101.3,
"Daytona Beach FL", 96.3,
"Dayton OH", 100.5,
"Decatur IL", 95.9,
"DeKalb IL", 102.1,
"Denver CO", 106.0,
"Des Moines IA", 97.7,
"Detroit/Oakland Co. Ml", 110.1,
"Dixon IL", 98.2,
"Dodge City KS", 97.8,
"Douglas GA", 93.0,
"Dover DE", 99.8,
"Durham NC", 99.9,
"East Lansing MI", 106.1,
"Eau Claire WI", 103.1,
"Edinburg TX", 92.7,
"Elkhart IN", 97.2,
"Elko NV", 106.6,
"Elmira NY", 109.1,
"El Paso TX", 96.0,
"Enid OK", 93.3,
"Erie PA", 101.7,
"Eugene OR", 104.9,
"Evansville IN", 98.9,
"Fargo ND", 98.1,
"Farmington NM", 101.5,
"Fayetteville AR", 90.8,
"Findlay OH", 102.0,
"Fitchburg/Leominster MA", 103.1,
"Flagstaff AZ", 108.1,
"Florence AL", 94.8,
"Fond du Lac WI", 103.4,
"Fort Collins CO", 100.8,
"Fort Lauderdale FL", 107.5,
"Fort Myers FL", 100.8,
"Fort Smith AR", 89.6,
"Fort Walton Beach FL", 100.0,
"Fort Wayne IN", 96.0,
"Fort Worth TX", 94.4,
"Framingham MA", 116.2,
"Fredericksburg VA", 102.4,
"Fresno CA", 123.5,
"Gadsden AL", 92.8,
"Gainesville FL", 100.7,
"Garden City KS", 99.2,
"Gastonia NC", 97.2,
"Georgetown TX", 96.3,
"Gillette WY", 95.2,
"Glens Falls NY", 106.5,
"Glenwoood Springs CO", 105.8,
"Goldsboro NC", 97.8,
"Goshen IN", 97.2,
"Grand Junction CO", 101.7,
"Grand Rapids MI", 103.7,
"Great Falls MT", 100.1,
"Greeley CO", 103.0,
"Green Bay WI", 100.1,
"Greensboro NC", 94.7,
"Greenville NC", 97.1,
"Greenville TX", 93.8,
"Gunnison CO", 103.6,
"Hagerstown MD", 98.3,
"Hamilton Co. IN", 99.9,
"Hanover PA", 98.9,
"Harlingen TX", 93.6,
"Harrisburg PA", 98.6,
"Hartford CT", 119.6,
"Hartselle AL", 94.0,
"Hastings NE", 95.0,
"Hattiesburg MS", 94.9,
"Hays KS", 99.8,
"Hazelton PA", 95.7,
"Helena MT", 103.7,
"Henderson KY", 92.2,
"Hickory NC", 95.5,
"High Point NC", 94.6,
"Hilton Head Island SC", 109.1,
"Holland MI", 103.7,
"Honolulu HI", 131.8,
"Hopkinsville KY", 94.9,
"Houston TX", 95.9,
"Huntsville AL", 91.7,
"Hutchinson KS", 95.9,
"Indiana Co. PA", 97.7,
"Indianapolis IN", 97.8,
"Indian River FL", 102.6,
"Iowa City IA", 97.9,
"Jackson MS", 92.6,
"Jackson/Madison Co. TN", 95.6,
"Jacksonville FL", 97.9,
"Jefferson City MO", 95.2,
"Johnson City TN", 92.7,
"Jonesboro AR", 90.5,
"Joplin MO", 88.6,
"Kansas City MO", 98.2,
"Kennett MO", 88.3,
"Kennewick WA", 100.1,
"Killeen TX", 97.2,
"Kingsport TN", 92.9,
"Klamath Falls OR", 101.8,
"Knoxville TN", 94.3,
"Lafayette IN", 98.1,
"Lafayette LA", 98.9,
"LaGrange/Troup Co. GA", 96.8,
"Lake Charles LA", 97.2,
"Lake Havasu City AZ", 101.1,
"Lancaster PA", 103.6,
"Lansing MI", 106.3,
"Laramie WY", 103.5,
"Las Cruces NM", 101.4,
"Las Vegas NV", 104.9,
"Lawrence KS", 100.3,
"Lawton OK", 91.4,
"Lexington KY", 96.8,
"Lima OH", 97.9,
"Lincoln NE", 99.8,
"Lincoln Co. OR", 107.7,
"Little Rock AR", 95.2,
"Lompoc CA", 110.4,
"Long Beach CA", 155.9,
"Longmont CO", 115.4,
"Los Alamos NM", 118.0,
"Los Angeles CA", 158.1,
"Louisville KY", 97.2,
"Loveland CO", 96.9,
"LubbockTX", 92.6,
"Lufkin TX", 93.4,
"Madison WI", 109.1,
"Manchester NH", 106.5,
"Mandan ND", 100.3,
"Manhattan KS", 96.3,
"Mansfield OH", 98.6,
"Marietta/Cobb Co. GA", 100.8,
"Marinette WI", 100.4,
"Marion/McDowell Co. NC", 95.5,
"Marshall Co. AL", 91.2,
"Marshfield WI", 99.6,
"Mason City IA", 97.5,
"McAllen TX", 92.9,
"Memphis TN", 93.3,
"Menlo Park CA", 121.5,
"Mesa AZ", 101.8,
"Meriden CT", 119.3,
"Miami/Dade Co. FL", 105.3,
"Midland TX", 91.4,
"Milwaukee WI", 108.0,
"Minneapolis MN", 106.0,
"Mission TX", 94.9,
"Missoula MT", 102.2,
"Mobile AL", 94.0,
"Monroe LA", 96.3,
"Montgomery AL", 97.6,
"Montpelier VT", 102.0,
"Morristown/Morris Co. NJ", 116.2,
"Muncie IN", 98.6,
"Murfreesboro TN", 94.6,
"Murray KY", 92.7,
"Muskegon MI", 105.6,
"Muskogee OK", 89.0,
"Myrtle Beach SC", 99.7,
"Nashville TN", 97.3,
"Nassau Co. NY", 134.8,
"Neenah WI", 102.8,
"Nevada MO", 93.0,
"Newark DE", 105.0,
"New Orleans LA", 97.8,
"New Haven CT", 117.3,
"Newport News VA", 97.1,
"New York NY", 204.1,
"Norfolk VA", 97.2,
"North Charleston SC", 102.5,
"Odessa TX", 91.2,
"Ogden UT", 105.0,
"Oklahoma City OK", 93.3,
"Olympia WA", 107.5,
"Omaha NE", 96.3,
"OrlandoFL", 102.1,
"Oshkosh WI", 102.7,
"Owensboro KY", 95.5,
"Paducah KY", 94.4,
"Palm Springs CA", 143.8,
"Palo Alto CA", 155.2,
"Panama City FL", 100.3,
"Paris TX", 88.5,
"Pasco WA", 100.4,
"Pensacola FL", 98.7,
"Peoria/Pekin IL", 104.4,
"Philadelphia PA", 116.8,
"Phoenix AZ", 102.2,
"Pikeville/Pike Co. KY", 96.5,
"Pittsburgh PA", 107.6,
"Pleasanton CA", 145.1,
"Pocatello ID", 100.4,
"Port Arthur TX", 93.6,
"Porterville CA", 106.2,
"Portland OR", 109.4,
"Poughkeepsie NY", 110.0,
"Prescott/Pres. Valley AZ", 106.9,
"Provo UT", 96.9,
"Pryor Creek OK", 90.9,
"Pueblo CO", 92.4,
"Pullman WA", 102.6,
"Quad-Cities IL/IA", 99.9,
"Quincy IL", 96.7,
"Raleigh NC", 100.1,
"Rapid City SD", 96.5,
"Reading PA", 108.5,
"Reno NV", 107.5,
"Richland WA", 100.1,
"Richmond VA", 102.9,
"Riverside City CA", 109.0,
"RoanokeVA", 96.9,
"Rochester MN", 108.9,
"Rochester NY", 105.8,
"Rockford IL", 97.7,
"Rogers AR", 96.8,
"Roswell NM", 96.4,
"Sacramento CA", 132.3,
"Salem OR", 102.8,
"Salina KS", 91.8,
"Salinas/Monterey CA", 172.6,
"Salt Lake City UT", 105.5,
"San Angelo TX", 93.9,
"San Antonio TX", 91.8,
"San Diego CA", 160.3,
"San Francisco/Oakland CA", 170.2,
"San Jose CA", 164.9,
"San Marcos TX", 94.1,
"Santa Barbara CA", 146.0,
"Santa Fe NM", 110.7,
"Santa Maria CA", 144.4,
"Sarasota FL", 105.2,
"Savannah GA", 100.4,
"Scottsdale AZ", 107.1,
"Scranton PA", 95.7,
"Seattle WA", 109.7,
"Sheboygan WI", 101.7,
"Sherman-Denison TX", 93.6,
"Shreveport LA", 94.7,
"Sierra Vista AZ", 101.0,
"Sioux Falls SD", 95.1,
"South Bend IN", 94.7,
"Sparks NV", 108.0,
"Spartanburg SC", 98.3,
"Spokane WA", 105.7,
"Springdale AR", 90.6,
"Springfield IL", 100.6,
"Springfield MA", 114.5,
"Springfield MO", 93.7,
"Springfield OH", 100.1,
"Stillwater OK", 93.2,
"St. Cloud MN", 103.2,
"St. George UT", 100.1,
"St. Joseph MI", 106.0,
"St. Joseph MO", 97.3,
"St. Louis MO", 97.2,
"St. Paul MN", 105.5,
"St. Petersburg FL", 104.2,
"Sumter SC", 93.5,
"Syracuse NY", 103.7,
"Tacoma WA", 105.0,
"Tallahassee FL", 103.3,
"Tampa FL", 104.4,
"Temple TX", 97.5,
"Texarkana TX", 91.4,
"Tifton GA", 93.5,
"Toledo OH", 102.5,
"Tucson AZ", 100.1,
"Tulare CA", 106.2,
"Tulsa OK", 96.6,
"Twin Falls ID", 100.1,
"Tyler TX", 94.1,
"Urbana IL", 104.3,
"Valdosta GA", 96.0,
"Vancouver WA", 104.4,
"Vermillion SD", 99.8,
"Vero Beach FL", 102.6,
"Vicksburg MS", 97.2,
"Victoria TX", 90.5,
"Virginia Beach VA", 97.3,
"Visalia CA", 106.2,
"Waco TX", 91.9,
"Washington DC/MD/VA", 121.1,
"Warner Robins GA", 98.1,
"Waterloo IA", 96.7,
"Watertown NY", 102.4,
"Wausau WI", 101.3,
"Weatherford TX", 93.9,
"Wenatchee WA", 104.4,
"Westchester Co. NY", 122.5,
"West Palm Beach FL", 109.5,
"White Plains NY", 121.6,
"Wichita KS", 97.8,
"Wichita Falls TX", 93.7,
"Wilkes Barre PA", 95.7,
"Williamsport PA", 100.9,
"Wilmington DE", 106.9,
"Wilmington NC", 101.9,
"Winston-Salem NC", 97.6,
"Worcester County MD", 103.3,
"Yakima WA", 106.3,
"York PA", 101.4,
"Youngstown-Warren OH", 94.9,
"Yuma AZ", 103.0);


// Generate city select dropdowns
document.write('<table cellpadding="3" cellspacing="3" width="100%">');
document.write('<tr><td align="center" valign="top" width="50%">');

document.write('<form name="compareCity" onSubmit="showDiff()">\n')
document.write('<font face="arial,helvetica" size="-1"><b>Select the city you\'re moving from</font></b><br>');
document.write('<select name="fromCity" onChange="showDiff()">\n');
	for (i = 0; i < cityFactor.length; i=i+2) {
		document.write ('<option value=' + i + '>' + cityFactor[i] + '\n')
		}
	document.write('</select><p>');

document.write('</td><td align="center" valign="top" width="50%">');

document.write('<font face="arial,helvetica" size="-1"><b>Select the city you\'re moving to</font></b><br>');
document.write('\n\n<select name="toCity" onChange="showDiff()">\n');
	for (i = 0; i < cityFactor.length; i=i+2) {
		document.write ('<option value=' + i + '>' + cityFactor[i] + '\n')
		}
	document.write('</select>');
	document.write('</form>');

document.write('</td></tr></table>');


// Validate salary entry  
function valSalary() {
	money = document.getInfo.salary.value;
	checkSal = parseInt(money, 10);
        if (checkSal != money){
 		alert("Income must be a number.  Do not include \"$\" or \".\"");
		money = 0; 
               document.getInfo.salary.focus();
                document.getInfo.salary.select();
               return false;
            } else {
		return showDiff();
		}
}



// Do the math
function showDiff() {

	to = document.compareCity.toCity.options.selectedIndex * 2;
	from = document.compareCity.fromCity.options.selectedIndex * 2;


	money = Math.round(money);
	fromMult = from + 1;
	toMult = to + 1;
	salaryDiff = Math.round(money/cityFactor[fromMult]*cityFactor[toMult]);
	percentDiff = Math.round((money - salaryDiff)/money*100);

	if (percentDiff < 0) {
		percentDiff = percentDiff * (-1);
		}

	if (money <= 0 || from == "" || to == "") {
		tellCompare = "";
		this.message = "";
		} else {

	tellCompare = "A $" + money + " income in " + cityFactor[from] + " is equivalent to a $" + salaryDiff + " income in " + cityFactor[to] + "\n\n";

	if ((money > salaryDiff) && (percentDiff >= 1)) {
		this.message = "You can take a decrease of " + percentDiff + "% and maintain your standard of living.";
		} else if ((money < salaryDiff)  && (percentDiff >= 1)) {
		this.message = "You will need an increase of " + percentDiff + "% to maintain your standard of living.";
		} else if ((money == salaryDiff)  || (percentDiff < 1)) {
		this.message = "You will need to match your present income to maintain your standard of living";
		} else {
		this.message = "from="+from+" to="+to+" money="+money;
		}
		}

	document.getInfo.showInfo.value = tellCompare + this.message;
//return;
	}// end function showDiff

//-->