		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}

		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('container').offsetHeight;
					var footerElement = document.getElementById('footer');
					var footerHeight  = footerElement.offsetHeight;
					alert(footerHeight);
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.position = 'relative';
						footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
					}
					else {
						footerElement.style.position = 'static';
					}
				}
			}
		}

		function copyDetail()
		{
      $('detail_postal_name').value =  $('detail_billing_name').value;
      $('detail_postal_country').selectedIndex =   $('detail_billing_country').selectedIndex;
      $('detail_postal_isz').value =   $('detail_billing_isz').value;
      $('detail_postal_varos').value = $('detail_billing_varos').value;
      $('detail_postal_cim').value =   $('detail_billing_cim').value;
		}

    function copyDetailPda()
    {
      form = document.detailform;
      form.detail_postal_name.value =  form.detail_billing_name.value;
      form.detail_postal_country.selectedIndex =   form.detail_billing_country.selectedIndex;
      form.detail_postal_isz.value =   form.detail_billing_isz.value;
      form.detail_postal_varos.value = form.detail_billing_varos.value;
      form.detail_postal_cim.value =  form.detail_billing_cim.value;
    }

		function showBillings()
		{
		  if ($('detail_is_want_invoice').checked) $('billing_details').style.display='block';
		    else $('billing_details').style.display='none';
		}

		function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
			return true;
    else
			return false;
    }


