function log(v__msg)
{
	setTimeout(function() {
		throw new Error(v__msg);
	}, 0);
/*	netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
	var aConsoleService = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
	if (v__msg)
		aConsoleService.logStringMessage(v__msg);
	else
		aConsoleService.logStringMessage('....');
	netscape.security.PrivilegeManager.disablePrivilege('UniversalXPConnect');*/
}
function getHNMS()
{
	$.ajax({
		url: dirlevel + 'hnms.php',
		dataType: 'json',
		cache: false,
		success: function(data) {
/* with humidity
			if (data && data['symbol'] && data['time'] && data['temperature'] && data['temperatureF'] && data['humidity'])
				$('.weather').html('<span style="padding: 0; margin: 0; line-height: 13px;">Local Time: ' + data['time'] + '</span><br/><img src="' + data['symbol'] + '" />&nbsp;&nbsp;<span>' + data['temperature'] + '&nbsp;<sup>0</sup>C&nbsp;/&nbsp;' + data['temperatureF'] + '&nbsp;<sup>0</sup>F</span>&nbsp;&nbsp;<span>' + data['humidity'] + '%</span>');
*/
			if (data && data['symbol'] && data['time'] && data['temperature'] && data['temperatureF'])
				$('.weather').html('<ul><li>Local Time:</li><li>' + data['time'] + '</li><li><br\></li><li><img src="' + data['symbol'] + '" /></li><li><span>' + data['temperature'] + '<sup>0</sup>C&nbsp;/&nbsp;' + data['temperatureF'] + '<sup>0</sup>F</span></li></ul>');
//				$('.weather').html('<div><div class=\"wea1\">Local Time:</div><div class=\"wea2\">' + data['time'] + '</div></div><div><div class=\"wea3\"><img src="' + data['symbol'] + '" /></div><div  class=\"wea4\" style="padding-top:2px;"><span>' + data['temperature'] + '<sup>0</sup>C&nbsp;/&nbsp;' + data['temperatureF'] + '<sup>0</sup>F</span></div></div>');
			else
				$('.weather').html('<ul><li>Local Time:</li><li>' + data['time'] + '</li><li><br\></li><li>&nbsp;</li><li><span>&nbsp;</span></li></ul>');
//				$('.weather').html('<div><div class=\"wea1\">Local Time:</div><div class=\"wea2\">' + data['time'] + '</div></div><div><div class=\"wea3\">&nbsp;</div><div  class=\"wea4\" style="padding-top:2px;"><span>&nbsp;</span></div></div>');
//			setTimeout(function() { getHNMS(); }, 1200000);
		}
	});
}
function getLocalTime()
{
	$.ajax({
		url: dirlevel + 'localtime.php',
		dataType: 'json',
		cache: false,
		success: function(data) {
			if (data && data['time'])
				$('.weather li:eq(1)').html(data['time']);
//				$('.weather div:eq(0) div:eq(1)').html(data['time']);
			setTimeout(function() { getLocalTime(); }, 60000);
		}
	});
}

