//Copyright © 2007 paulgrant.ca
//http://actionfigurechecklist.com

var giWapIdx	= 0;
var sImgDir		= "/Images/Demo/DemoWap/";

var gaWap = new Array(
  new Array("Action_Figure_WAP_WML_01.gif", "View your Action Figure Checklist on the Go!<br/><br/>Go to actionfigurechecklist.com on your cellphone.<br/><br/>Take your collection wireless!")
, new Array("Action_Figure_WAP_WML_02.gif", "Scroll down, enter your Member Name and click Go.")
, new Array("Action_Figure_WAP_WML_03.gif", "On the Member screen, choose from available action figures.")
, new Array("Action_Figure_WAP_WML_04.gif", "On the Group Selection screen, choose from available groups. &nbsp; Usually the action figure lines are divided into groups by year or series.")
, new Array("Action_Figure_WAP_WML_05.gif", "A check means you have that figure. &nbsp; If your phone can't view images (wbmp) (wireless bitmaps) then you should see an X if you have it and an _ (underscore) if you dont.")
, new Array("Action_Figure_WAP_WML_06.gif", "At the bottom of most screens will be some navigation links. &nbsp; Depending on what part of the site you're in, you will see a combination of links to the current and preceding pages.")
);

function PreloadWap()
{
	for(var i = 0; i < gaWap.length; i++)
	{
		var aWap = gaWap[ i ];
		if(!aWap)
			break;

		aWap[ 2 ] = new Image();
		aWap[ 2 ].src = sImgDir + aWap[ 0 ];
	}

	return true;
}

function DoMove(bDirection, iIdx)
{
	if(iIdx != null)
	{
		giWapIdx = iIdx;
	}
	else
	{
		if(bDirection == false)
			giWapIdx--;
		else
			giWapIdx++;

		if(giWapIdx < 0)
			giWapIdx = gaWap.length -1;
		else if(giWapIdx >= gaWap.length)
			giWapIdx = 0;
	}

	var oImage = document.images.imgWap;
	if(!oImage)
		return false;

	var oDiv = document.getElementById("divWap");
	if(!oDiv)
		return false;

	var aWap = gaWap[ giWapIdx ];
	if(!aWap)
		return false;

	oImage.src = sImgDir + aWap[ 0 ];
	oDiv.innerHTML = "[" + (giWapIdx+1) + "] " + aWap[ 1 ];

	return true;
}

PreloadWap();

//End.

