NAME = Sprite

CAN_EDIT_STYLE = 1
CAN_EDIT_STYLE_COND = 1
CAN_EDIT_BACKGROUND_IMAGE = [$DEFINITION]/background.png
CAN_ADD_IMAGES = 1
CAN_ADD_TEXT = 1
IS_WEATHER = 1

BEGIN_BODY_ONLOAD

	<div id="[$DEF_name]Div" onClick="[$DEF_name]Click(); return false" style="display: none;
	-webkit-perspective: 1000px;
	-webkit-transform-origin: 50% 50% 50%;
	-webkit-transform-style: preserve-3d;
	-webkit-transform: perspective(0);
	[$STYLE_background]
	[$STYLE_background-color]
	[$STYLE_height]
	[$STYLE_width]
	[$STYLE_margin]
	[$STYLE_padding]
	[$STYLE_border]
	[$STYLE_border-top]
	[$STYLE_border-bottom]
	[$STYLE_border-left]
	[$STYLE_border-right]
	[$STYLE_position_element]
	[$STYLE_transform]
	min-height: 1px;
	">

		<div id="[$DEF_name]Content1" style="
		-webkit-transform-style: preserve-3d;
		-webkit-backface-visibility: visible;
		position: absolute; top: 0px; left: 0px;
		width: 100%;
		height: 100%;
		">

			<div id="[$DEF_name]Text" style="
			-webkit-transform-style: preserve-3d;
			-webkit-backface-visibility: visible;
			width: 100%;
			height: 100%;
			[$STYLE_color]
			[$STYLE_font-style]
			[$STYLE_font-family]
			[$STYLE_font-weight]
			[$STYLE_font-size]
			[$STYLE_text-shadow]
			[$STYLE_text-align]
			[$STYLE_text-indent]
			[$STYLE_text-transform]
			[$STYLE_text-decoration]
			[$STYLE_word-spacing]
			[$STYLE_line-height]
			[$STYLE_position_content]
			[$STYLE_reflection]
			">
			</div>

		</div>

		<div id="[$DEF_name]Content2" style="
		-webkit-transform-style: preserve-3d;
		-webkit-backface-visibility: visible;
		position: absolute; top: 0px; left: 0px;
		width: 100%;
		height: 100%;
		">

			<img id="[$DEF_name]Image" src="[$DEFINITION]/image 0.png[$IMGVERSION]" style="
			-webkit-transform-style: preserve-3d;
			-webkit-backface-visibility: visible;
			width: 100%;
			height: 100%;
			[$STYLE_reflection]
			">
		
		</div>

	</div>

END_BODY_ONLOAD

BEGIN_ONLOAD
END_ONLOAD

BEGIN_DEFINITION

	//-------------------------------------------------------------

	function [$DEF_name]Click()
	{
		[$DEF_name]Clicked = 1;
	}

	//-------------------------------------------------------------

	function [$DEF_name]LoadWeather(sync)
	{
		var globalObj = [$DEF_name]Global;
		
		globalObj.waitForWeather = 1;
		
		url = "http://apple.accuweather.com/adcbin/apple/Apple_Weather_Data.asp?zipcode=[$DEF_postal]";

		var xmlReq = new XMLHttpRequest();
		xmlReq.onreadystatechange = function(e){[$DEF_name]WeatherCallback(e, xmlReq);}
		xmlReq.overrideMimeType("text/xml");
		
		if (sync)	xmlReq.open("GET", url, false);
		else		xmlReq.open("GET", url);
		
		xmlReq.setRequestHeader("Cache-Control", "no-cache");
		xmlReq.setRequestHeader("wx", "385");
		xmlReq.send(null); 
	}

	//-------------------------------------------------------------

	function [$DEF_name]WeatherCallback(event, xmlReq)
	{
		var globalObj = [$DEF_name]Global;
		
		if (xmlReq.readyState != 4)						return;
		if (xmlReq.status != 200 && xmlReq.status != 0)	return;
		if (!xmlReq.responseXML)						return;
		
		var weatherObj = new Object();
		var	oldObj;
		
		parseWeatherInfo(xmlReq.responseXML, weatherObj);
		widgetTransferWeatherInfo(weatherObj, globalObj);

		oldObj = globalObj.weatherObj;
		globalObj.weatherObj = weatherObj;
		globalObj.LastWeatherUpdate = globalObj.CurrentRealTime;
		
		try
		{
			if (oldObj)	
			{
				if (oldObj.forecast)
				{
					for (i = 0; i <= 6; ++i)
						if (oldObj.forecast[i])
							delete oldObj.forecast[i];
				}
				
				delete oldObj;
			}
		}
		
		catch(err)
		{}
	}
	
	//-------------------------------------------------------------


END_DEFINITION

BEGIN_DEF
DEF_name = W2010061616135901
DEF_format = []
DEF_interval = 300
DEF_description = Fly2
DEF_location = San Diego, CA
DEF_postal = 92101
DEF_iconSet = Accu1
DEF_iconSize = 24
END_DEF

BEGIN_STYLE_COND
COND = [00[1][01[109][02[2][03[0][04[98][05[0][06[][07[26][08[57][09[0][10[][11[0.000][12[0.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[1][02[0][03[0][04[][05[0][06[][07[1010][08[48][09[0][10[10][11[-9999.000][12[9999.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[1][02[0][03[0][04[][05[0][06[][07[1008][08[48][09[0][10[20][11[-9999.000][12[9999.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[1][02[0][03[0][04[][05[0][06[][07[1047][08[48][09[0][10[][11[0.000][12[0.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[1][02[0][03[0][04[][05[0][06[][07[1056][08[48][09[0][10[][11[0.000][12[0.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[1][02[0][03[0][04[][05[0][06[][07[1028][08[48][09[0][10[][11[0.000][12[0.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[1][02[0][03[0][04[][05[0][06[][07[1036][08[48][09[0][10[5][11[-9999.000][12[9999.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
COND = [00[1][01[44][02[7][03[0][04[20][05[0][06[120][07[45][08[57][09[0][10[][11[0.000][12[0.000][13[1000][14[48][15[0][16[][17[0.000][18[0.000][19[0][20[0][21[0][
END_STYLE_COND

BEGIN_IMAGE_LIST
IMAGE_image 0.png
END_IMAGE_LIST

BEGIN_TEXT_LIST
TEXT [[
My Text
]]
END_TEXT_LIST

BEGIN_STYLE
STYLE_width = 45px;
STYLE_height = 62px;
STYLE_position_element = absolute; top: 210px; left: 137px;
STYLE_margin = 0px 0px 0px 0px;
STYLE_background = none;
STYLE_background-color = none;
STYLE_border = 
STYLE_position_content = relative; top: 0px; left: 0px;
STYLE_padding = 0px 0px 0px 0px;
STYLE_color = rgba(255, 128, 128, 1.000000);
STYLE_font-family = Helvetica;
STYLE_font-size = 16px;
STYLE_text-shadow = 4px 4px 4px rgba(0, 0, 0, 0.750000);
STYLE_text-align = center;
STYLE_font-weight = bold;
STYLE_font-style = normal;
STYLE_line-height = none;
STYLE_word-spacing = 0px;
STYLE_text-indent = 0px;
STYLE_text-transform = none;
STYLE_text-decoration = none;
STYLE_border-top = 
STYLE_border-bottom = 
STYLE_border-left = 
STYLE_border-right = 
STYLE_reflection = none;
STYLE_transform = none;
END_STYLE
ENABLE = 1
SEQNO = 1
HDRFLAGS = 010000000000000000000000000000
TEST_CONDITION = 0
USE_TEXT = 0
USE_WEATHER = 0
EVAL_INTERVAL = 100
