function doSend () {	
	var msg = "";
	contact_frm = document.getElementById('cntFrm');
	var fname = contact_frm.fname.value;
	var doal_temp_21 = contact_frm.doal_temp_21.value;
	var phone = contact_frm.phone.value;
	var subject = contact_frm.subject.value;
	var content = contact_frm.content.value;
	var ref = contact_frm.ref.value;
	//var rndchk = contact_frm.rndchk.value;
	//var rnd = contact_frm.rnd.value;
	if (fname == "") msg += "&bull;&nbsp;יש להזין שם מלא<br />";
	if (!IsEmail(doal_temp_21)) msg += "&bull;&nbsp;כתובת אימייל אינה תקינה<br />";
	if (!IsPhone(phone)) msg += "&bull;&nbsp;טלפון לא תקין<br />";
	if (subject == "") msg += "&bull;&nbsp;יש להזין נושא<br />";
	//if (rndchk == "") msg += "&bull;&nbsp;יש להזין קוד אבטחה<br /><br />";
	if(msg == "") {
		document.getElementById('errMsg').innerHTML = "";
		document.getElementById('alertMsg').style.display='none';
		doAjax('contact.ajax.php',contact_sent, "&fname="+fname+"&doal_temp_21="+doal_temp_21+"&phone="+phone+"&subject="+subject+"&content="+content+"&ref="+ref);//+"&rndchk="+rndchk+"&rnd="+rnd);
	} else {
		document.getElementById('alertMsg').style.display='block';
		document.getElementById('errMsg').innerHTML = "<span style='color: #FE8336;'>הטופס אינו תקין:</span><br />"+msg;
	}
}

function contact_sent(data){
	document.getElementById('alertMsg').style.display='block';
	if(data.indexOf('<ok/>') >= 0){
		contact_frm = document.getElementById('cntFrm');
		contact_frm.fname.value = "";
		contact_frm.doal_temp_21.value = "";
		contact_frm.phone.value = "";
		contact_frm.subject.value = "";
		contact_frm.content.value = "";
		//contact_frm.rndchk.value = "";
		document.getElementById('ggl_contact_after').src = '/ggl_track.php';
		//try{ pageTracker._trackPageview("/contact-after"); }catch(e){ }
	}
	document.getElementById('errMsg').innerHTML = data;
}

function doPrint(){
	var win = window.open("map.html", "map");
	win.print();
}