function sendContactForm(evt) {
	Event.stop(evt);
	formData = $('contactForm').serialize();
	new Ajax.Request($('contactForm').action, {
		method: 'post',
		postBody: formData,
		onComplete: function(resp) {
			txt = resp.responseText;
			if(txt=="Good"){
				$('formError').innerHTML="ההודעה נשלחה בהצלחה";
			}
			else 
			{
				error="התרחשה שגיאה : ";
				if(txt=="Error Name")
				{
					$('formError').innerHTML=error+"אנא הזן שם פרטי";
				}
				if(txt=="Error Email")
				{
					$('formError').innerHTML=error+"אנא הזן אימייל";
				}
				if(txt=="Error Text")
				{
					$('formError').innerHTML=error+"אנא הזן הערות";
				}
				if(txt=="Error Phone")
				{
					$('formError').innerHTML=error+"אנא הזן טלפון";
				}
				if(txt=="Error Lastname")
				{
					$('formError').innerHTML=error+"אנא הזן שם משפחה";
				}
				if(txt=="Error Fax")
				{
					$('formError').innerHTML=error+"אנא הזן פקס";
				}
				if(txt=="Error Subject")
				{
					$('formError').innerHTML=error+"אנא הזן נושא";
				}
				if(txt=="Error Text")
				{
					$('formError').innerHTML=error+"אנא הזן הודעה";
				}
				/*if(txt=="Error Captcha")
				{
					$('formError').innerHTML=error+"אנא הזן את התווים";
				}*/
			}
		}
	});
}
function sendContactEnForm(evt) {
	Event.stop(evt);
	formData = $('contactenForm').serialize();
	new Ajax.Request($('contactenForm').action, {
		method: 'post',
		postBody: formData,
		onComplete: function(resp) {
			txt = resp.responseText;
			if(txt=="Good"){
				$('formError').innerHTML="Msg Sent";
			}
			else 
			{
				error="Error : ";
				if(txt=="Error Name")
				{
					$('formError').innerHTML=error+"Enter Name";
				}
				if(txt=="Error Email")
				{
					$('formError').innerHTML=error+"Enter Email";
				}
				if(txt=="Error Text")
				{
					$('formError').innerHTML=error+"Enter Remarks";
				}
				if(txt=="Error Phone")
				{
					$('formError').innerHTML=error+"Enter Phone";
				}
				if(txt=="Error Lastname")
				{
					$('formError').innerHTML=error+"Enter Family Name";
				}
				/*
				if(txt=="Error Captcha")
				{
					$('formError').innerHTML=error+"Enter Digits";
				}*/
			}
		}
	});
}
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('site').offsetHeight;
			var footerElement = document.getElementById('footer');
			var footerHeight  = footerElement.offsetHeight;
			if (windowHeight - (contentHeight + footerHeight) >= 0) {
				footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
			}
			else {
				footerElement.style.top = '0px';
			}
		}
	}
}


