/* 
 This file was generated by Dashcode.  
 You may edit this file to customize your widget or web page 
 according to the license.txt file included in the project.
 */

//
// Function: load()
// Called by HTML body element's onload event when the web application is ready to start
//
function load()
{
    dashcode.setupParts();
}

function formClickHandler(event)
{
	//alert('submitted');
	document.forms.frmSearch.submit();
}

function makeChangeHandler(event)
{
	var popupValue = document.getElementById("popupMake");	// replace with ID of popup
	popupValue = popupValue.value;
}

//	var stackLayout = document.getElementById('stackLayout').object; // Replace with id of StackLayout
//	stackLayout.setCurrentView('list'); // Replace with id of new view (or the view element itself)

var initialPagePosition = 0;
var lastPagePosition = 0;

function pageTouchstartHandler(event)
{
	var touch = event.touches[0];
	initialPageTouchPosition = touch.pageX;
}

function pageTouchendHandler(event)
{
	var touch = event.touches[0];
	if ((lastPagePosition-initialPageTouchPosition) > 200)
	{
	    //history.go(-1)
	}
	if ((initialPageTouchPosition-lastPagePosition) > 200)
	{
	    //history.go(1) //Commented on 5/5/2010
	}
}

function pageTouchcancelHandler(event)
{
	// Nothing
}

function pageTouchmoveHandler(event)
{
	var touch = event.touches[0];
	lastPagePosition = touch.pageX;
}

