/*
|--------------------------------------------------------------------------
| Mazuma PUBLIC Javascript Helpers File - Sticky New Media - v3 Aug 09
|--------------------------------------------------------------------------
|
| These are used throughout the PUBLIS website for sending form values and 
| variables to AJAX queries, also manipulating submit buttons etc.. 
|
*/

function editQty()
{
	xajax.$('submitButton').disabled=true;
	xajax.$('submitButton').value="Processing...";
	xajax_editQuantity(xajax.getFormValues('editItem'));
	return false;
}

function alertDeleteHandsets($fonID)
{
input_box = confirm("Remove this mobile from your order?");
	if (input_box == true)
	{
	xajax_deleteHandsets($fonID);
	}
}

function alertDelOrder()
{
input_box = confirm("Are you sure you want to delete this entire order?");
	if (input_box == true)
	{
	xajax_emptyBasketAtCheckout();
	}
}

function tcAlertBacs()
{
	input_box = confirm("You must verify you bank details to proceed.");
}
    
function tcAlert()
{
	input_box = confirm("You must tick terms and conditions box to proceed.");
}
    
function addHandsetNew()
{
	xajax_addMobileOnly(xajax.getFormValues('fone'));
	return false;
}

function addCartItems()
{
	xajax_addToCart(xajax.getFormValues('fonIMEI'));
	return false;
}

function listPhones()
{
	xajax.$('submitButton').disabled=true;
	xajax.$('submitButton').value="Searching...";
	xajax_showPhones(xajax.getFormValues('manufactrs'));
	return false;
}

function editAccDetails()
{
	xajax.$('submitButton').disabled=true;
	xajax.$('submitButton').value="Processing...";
	xajax_editAccountDetails(xajax.getFormValues("editDetails"));
	return false;
}

function editPassword()
	{
	//xajax.$('submitButton').disabled=true;
	//xajax.$('submitButton').value="Processing...";
	xajax_editAccountPass(xajax.getFormValues("editPass"));
	return false;
}

function lostPassword()
	{
	//xajax.$('submitButton').disabled=true;
	//xajax.$('submitButton').value="Processing...";
	xajax_resetPassword(xajax.getFormValues("lostPass"));
	return false;
}

function lostPassword09()
	{
	xajax_resetPassword09(xajax.getFormValues("lostPass"));
	return false;
}

function changeCondition()
{
	xajax_setHandsetCondition09(xajax.getFormValues('conditionForm'));
	return false;
}
