//==================================================================
// iPhone Loading Bar
// Timur Prokopiev 2011
//==================================================================


function setDefaultValues() {
  var values = new Array();
  
// Action
  values.push({ name:"Action", type:"text", value:"Downloading"});

// Current
  values.push({ name:"Current", type:"text", value:"10"});

// Of
  values.push({ name:"Of", type:"text", value:"52"});

Widget.elem.customData["currentValues"] = values;

}

function applyCurrentValues() {
  var values = Widget.elem.customData["currentValues"];

Widget.GetObjectByName("text").textChars = values[0].value + ' ' + values[1].value + ' ' + 'of' + ' ' + values[2].value;

}

switch (Widget.opCode)
{
	case 1: setDefaultValues();   break;
	case 2: applyCurrentValues(); break;
}