function checkSendFile() {
	var format_mail=/^([a-zA-Z0-9\_\-\.]{3,})+@([a-zA-Z0-9\-]{3,})+.+([a-zA-Z]{2,}|.+([a-zA-Z]{2,}))$/;

	if (document.getElementById('sender_name').value.length == 0) {
		alert('กรุณากรอกชื่อผู้ส่ง');
		document.getElementById('sender_name').focus();
		return false;
	} // end if
	if (!(format_mail.test(document.getElementById('email').value))) {
		alert('Email ไม่ถูกต้อง');
		document.getElementById('email').focus();
		return false;
	} // end if
	if (document.getElementById('tel').value.length == 0) {
		alert('กรุณากรอกเบอร์โทรศัพท์');
		document.getElementById('tel').focus();
		return false;
	} // end if
	
	return;
} // end function

function saveClickBanner(id){
		var url = '/ajaxFile/saveClickBanner.php';
		new Ajax.Request(url,
			{
				method: "POST",
				parameters: "id="+id,
				onComplete: callBackSaveClickBanner
			}
		);
	}

function callBackSaveClickBanner(data){
}

<!--
function popup(theURL,winName,htmlName,features) { 
	winName=window.open(theURL,htmlName,features);
	//eval(winName+"=window.open('"+theURL+"','"+htmlName+"','"+features+"')");
	}
//-->


function saveMobile(mem_id){	
		if ( ($('mem_telephone').value.length == 0) && (!$('not_now').checked) ) {
			alert('Please fill your mobile Or Select no thank');
			$('mem_telephone').focus();
			return false;
		}

		 if( ($('mem_telephone').value.length > 0) && (isNaN($('mem_telephone').value) || ($('mem_telephone').value.length != 10)) ) {
			alert('Mobile Invalid');
			$('mem_telephone').focus();
			return false;
		 }

		var url = '/ajaxFile/saveMobile.php';
		var not_now = '0';
		if ($('not_now').checked)
			not_now = 1;



		new Ajax.Request(url,
			{
				method: "POST",
				parameters: "mem_id="+mem_id+"&mem_telephone="+$('mem_telephone').value+"&not_now="+not_now,
				onComplete: callBackSaveMobile,
				onInteractive: waitSaveMobile
			}
		);
	}

function callBackSaveMobile(data){
	if (data.responseText == "\nsuccess") {
		alert('Thank you For Your Information');
	} // end if

	$('light').style.display = 'none';
	$('fade').style.display = 'none';

	return false;

} // end function

function waitSaveMobile(){
	$('light').innerHTML = '<div align="center" style="padding:100px"><img src="/images/loading.gif" border="0"></div>';

	return false;
} // end function
