var lists = new Array();

// First set of text and values
lists['Arkansas']    = new Array();
lists['Arkansas'][0] = new Array(
	'Little Rock'

);
lists['Arkansas'][1] = new Array(
	'Little Rock'

);

// Second set of text and values
lists['Oklahoma']    = new Array();
lists['Oklahoma'][0] = new Array(
	'Oklahoma City',
	'Tulsa'
);
lists['Oklahoma'][1] = new Array(
	'Oklahoma City',
	'Tulsa'
);


// Second set of text and values
lists['Texas']    = new Array();
lists['Texas'][0] = new Array(
	'Arlington',
	'Austin',
	'Baytown',
'Beaumont',
'Bellmead',
'Brownsville',
'Bryan',
'Conroe',
'Corpus Christi',
'Cypress',
'Dallas',
'Deer Park',
'Del Rio',
'DeSoto',
'Duncanville',
'Edinburg',
'El Paso',
'Fort Worth',
'Harlingen',
'Houston',
'Humble',
'Huntsville',
'Katy',
'Kingwood',
'Lake Jackson',
'Laredo',
'Longview',
'McAllen',
'Mesquite',
'Mission',
'Pharr',
'Plano',
'Port Arthur',
'Richardson',
'Round Rock',
'San Antonio',
'San Marcos',
'Stafford',
'Sugar Land',
'Temple',
'The Woodlands',
'Tomball',
'Tyler',
'Weslaco'



);
lists['Texas'][1] = new Array(
	'Arlington',
	'Austin',
	'Baytown',
'Beaumont',
'Bellmead',
'Brownsville',
'Bryan',
'Conroe',
'Corpus Christi',
'Cypress',
'Dallas',
'Deer Park',
'Del Rio',
'DeSoto',
'Duncanville',
'Edinburg',
'El Paso',
'Fort Worth',
'Harlingen',
'Houston',
'Humble',
'Huntsville',
'Katy',
'Kingwood',
'Lake Jackson',
'Laredo',
'Longview',
'McAllen',
'Mesquite',
'Mission',
'Pharr',
'Plano',
'Port Arthur',
'Richardson',
'Round Rock',
'San Antonio',
'San Marcos',
'Stafford',
'Sugar Land',
'Temple',
'The Woodlands',
'Tomball',
'Tyler',
'Weslaco'


);



// This function goes through the options for the given
// drop down box and removes them in preparation for
// a new set of values

function emptyList( box ) {
	// Set each option to null thus removing it
	while ( box.options.length ) box.options[0] = null;
}

// This function assigns new drop down options to the given
// drop down box from the list of lists specified

function fillList( box, arr ) {
	// arr[0] holds the display text
	// arr[1] are the values

	for ( i = 0; i < arr[0].length; i++ ) {

		// Create a new drop down option with the
		// display text and value from arr

		option = new Option( arr[0][i], arr[1][i] );

		// Add to the end of the existing options

		box.options[box.length] = option;
	}

	// Preselect option 0

	box.selectedIndex=0;
}

// This function performs a drop down list option change by first
// emptying the existing option list and then assigning a new set

function changeList( box ) {
	// Isolate the appropriate list by using the value
	// of the currently selected option

	list = lists[box.options[box.selectedIndex].value];

	// Next empty the slave list

	emptyList( box.form.City );

	// Then assign the new list values

	fillList( box.form.City, list );
}


function checkoutfields1 (form)
	{
	  return  (
			    checkIfEmpty (form.elements["City"]) 
			  )
	}


function checkoutfields (form)
	{
	  return  (
			   checkZIPCode (form.elements["ZipCode"],false) 
			  )
	}
function warnInvalid (theField, s)
{   theField.focus()
    theField.select()
    alert(s)
    return false
}
function isFloat (s)
{   var i;
    var seenDecimalPoint = false;
    if ((s == null) || (s.length == 0)) 
        return false;
 //      if (isFloat.arguments.length == 1) return false;
 //      else return (isFloat.arguments[1] == true);
    if (s == ".") return false;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);

        if ((c == ".") && !seenDecimalPoint) seenDecimalPoint = true;
        else if (!((c >= "0") && (c <= "9"))) return false;
    }
    // All characters are numbers.
    return true;
}






