

/*! Initialize the systemDB global variable. */

 
        var shortName = 'WeatherElements';
        var version = '1.0';
        var displayName = 'Weather Elements';
        var maxSize = 65536; // in bytes
        var myDB = openDatabase(shortName, version, displayName, maxSize);


/////////////////////////////////////////////////////////////////////////////////////////////////////////

function getLocationData()
{
 
    myDB.transaction(function (transaction)
 {
        transaction.executeSql("SELECT * from files;",
            [ ],
            function (transaction, results) {
				
for (var i=0; i<results.rows.length; i++) {
                    var row = results.rows.item(i);
				  	locationCode = row['zipcodefield'];
					gpsCode = row['gpsCords'];
				  
					if(row['isCelsius'] == "true"){
						isCelsius = true;
					}else{
						isCelsius = false;
					};
				
					if(row['showRealFeel'] == "true"){
						showRealFeel = true;
					}else{
						showRealFeel = false;
					};

					if(row['useRealFeel'] == "true"){
						useRealFeel = true;
						
					}else{
						useRealFeel = false;
					};
					
					if(row['useGPS'] == "true"){
						useGPS = true;
					}else{
						useGPS = false;
					};	

					language = row['language'];

					updateInterval = row['updateInterval'];
			
					weatherDataObj = row['weatherData'];

					lastUpdated = row['lastUpdated'];
onLoad();

}

},
		function (transaction, error) {});
});
}










