function getPaymentMethodValue()
{
	
	var formElements = document.forms["checkout_form"].elements["SelectedGateway"];
	var lenght = formElements.length;
	var i = 0;
	var elementHide;
	var returnValue;
	
	for (i;i<lenght;i++)
	{
		if (formElements[i].checked) returnValue = formElements[i].value;
		else
		{
			hideLayer('pay_'+formElements[i].value);
		}
	}	
	
	return returnValue; 
	
}

function checkElement(elementName)
{
	document.getElementById(elementName).checked = true;
}

function checkForm(form)
{
	alert("Tikrinam forma");
	return false;
}

function stepNext()
{
	alert("Step next clicked");
	return false;
}

function hideLayer(whichLayer) {
			if (document.getElementById) {
				// this is the way the standards work
				document.getElementById(whichLayer).style.display = "none";		
			}
			else if (document.all) {
				// this is the way old msie versions work
				document.all[whichlayer].style.display = "none";
			}
			else if (document.layers) {
				// this is the way nn4 works
				document.layers[whichLayer].display = "none";
			}
		}
		
function showLayer(whichLayer) {
		
		if (document.getElementById) {
			// this is the way the standards work
			document.getElementById(whichLayer).style.display = "block";
		}
		else if (document.all) {
			// this is the way old msie versions work
			document.all[whichlayer].style.display = "block";
		}
		else if (document.layers) {
			// this is the way nn4 works
			document.layers[whichLayer].display = "block";
		}
}

function aggree(value)
{
	if (value == true)
	{
		document.getElementById("confirm_order_button").disabled = false;
	}
		else
	{
		document.getElementById("confirm_order_button").disabled = true;
	}

}