function setPaymentInfo(isChecked)
{
	with (window.document.frmCheckout) {
		if (txtBillingCountry.value != "IL")
		{
			alert("You can only ship to an Israel address");
		}else{
			if (isChecked) {
				txtShippingPostalCode.value = txtBillingPostalCode.value;
				txtShippingFirstName.value  = txtBillingFirstName.value;
				txtShippingLastName.value   = txtBillingLastName.value;
				txtShippingAddress.value   = txtBillingAddress.value;
				txtShippingCity.value       = txtBillingCity.value;
				txtShippingPhone.value = txtBillingPhone.value;
				if(txtBillingEmail)
					txtShippingEmail.value = txtBillingEmail.value;
				else if(txtBillingEmail1)
					txtShippingEmail.value = txtBillingEmail1.value;
			} else {
				txtShippingFirstName.value  = '';
				txtShippingLastName.value   = '';
				txtShippingAddress.value   = '';
				txtShippingCity.value       = '';
				txtShippingPhone.value = '';
				txtShippingPostalCode.value = '';
				txtShippingEmail.value = '';
			}
		}
	}
}
var defaultCityVal ='';
function setShippingInfo(isChecked)
{
	with (window.document.frmRegistry) {
			if (isChecked) {
				defaultCityVal = txtRegShippingCity.value
				txtRegFnameShipping.value  = '';
				txtRegLnameShipping.value   = '';
				txtRegShippingAddress.value   = '';
				txtRegShippingCity.options[txtRegShippingCity.selectedIndex].value      = '';
				txtRegShippingCity.options[txtRegShippingCity.selectedIndex].text      = 'Select City';
				txtRegShippingZip.value = '';
				txtRegShippingCellPhone.value = '';
				txtRegShippingHomePhone.value = '';
				txtRegShippingEmail.value = '';
			}
			else
			{	txtRegShippingCity.options[txtRegShippingCity.selectedIndex].value = defaultCityVal
				txtRegShippingCity.options[txtRegShippingCity.selectedIndex].text = defaultCityVal
				txtRegFnameShipping.value  = txtRegFnameShipping.defaultValue;
				txtRegLnameShipping.value   = txtRegLnameShipping.defaultValue;
				txtRegShippingAddress.value   = txtRegShippingAddress.defaultValue;
				txtRegShippingCity.value       = txtRegShippingCity.defaultValue;
				txtRegShippingZip.value = txtRegShippingZip.defaultValue;
				txtRegShippingCellPhone.value = txtRegShippingCellPhone.defaultValue;
				txtRegShippingHomePhone.value = txtRegShippingHomePhone.defaultValue;
				txtRegShippingEmail.value = txtRegShippingEmail.defaultValue;
			}
	}
}
function checkShippingAndPayment()
{
	with (window.document.frmCheckout) {
		if (isEmpty(txtShippingFirstName, 'Enter first name')) {
			return;
		} else if (isEmpty(txtShippingLastName, 'Enter last name')) {
			
		}
	}
}
function checkLoginRegister()
{
	theForm = window.document.frmLogin;
	
	if (isEmpty(theForm.txtBillingFirstName, 'Enter Product name')) {
		return;
	} else {
		theForm.submit();
	}
}

function toggleCheck(val, id, ee)
{
	if(val == true)
	{
		if(document.getElementById(id).checked == true)
			document.getElementById(id).checked = false
		document.getElementById("cards_selected1").disabled = false
		document.getElementById("cards_selected2").disabled = false
	}
	else
	{
		if(ee)
		{
			document.getElementById("cards_selected1").disabled = true
			document.getElementById("cards_selected2").disabled = true
		}
	}
}
function getCheckbox()
{
	l1 = document.getElementById("cards_mail").checked
	l2 = document.getElementById("cards_email").checked
	if(l1)
	{
		ls1 = document.getElementById("cards_selected1").checked
		ls2 = document.getElementById("cards_selected2").checked
		if(ls1 || ls2)
			return true
		else
		{
			alert('Please choose a style of printed announcement card by clicking on your favorite design');
			return false
		}
	}
	else if(l2)
	{
		ls1 = document.getElementById("cards_selected3").checked
		ls2 = document.getElementById("cards_selected4").checked
		if(ls1 || ls2)
			return true
		else
		{
			alert('Please choose a style of announcement ecard by clicking on your favorite design');
			return false
		}
	}
	else
		return true
	
}
function showHideDiv(val, nam)
{
	if(val)
		document.getElementById(nam).style.display = "block";
	else
		document.getElementById(nam).style.display = "none";
}
