// +++++++++++++++++  AJAX สำหรับ อ่านข้อมุล  +++++++++++++++++ \\
function showContent(page) 
{ 	
	//addShowLoading('showContentx', 'showLoadingX');
	
	if($('inputSubject').value=='') {
		alert('Please complete all required field(s) '); // Please complete all input form
		//js3_tabs.showTab(1);
		$('inputSubject').focus();
		return false;
	}
	
	if($('inputMessage').value=='') {
		alert('Please complete all required field(s) '); // Please complete all input form
		//js3_tabs.showTab(1);
		$('inputMessage').focus();
		return false;
	}
	if($('inputFName').value=='') {
		alert('Please complete all required field(s) '); // Please complete all input form
		//js3_tabs.showTab(1);
		$('inputFName').focus();
		return false;
	}
	if($('inputLName').value=='') {
		alert('Please complete all required field(s) '); // Please complete all input form
		//js3_tabs.showTab(1);
		$('inputLName').focus();
		return false;
	}
	if($('inputEmail').value=='') {
		alert('Please complete all required field(s) '); // Please complete all input form
		//js3_tabs.showTab(1);
		$('inputEmail').focus();
		return false;
	}
	
	if($('inputKeyCode').value=='') {
		alert('Please complete all required field(s) '); // Please complete all input form
		//js3_tabs.showTab(1);
		$('inputKeyCode').focus();
		return false;
	}

	
	var fileName = 'contactus-content.php';
	var js_vars =  $('myAJAXForm').toQueryString();
	
	addShowLoading('showContent', 'showLoading');
	js_vars+='&JS_Action=festival&JS_Page='+page;
	new ajax(fileName , { method: 'get', postBody: js_vars, update: 'showContent'}).request();
	//new ajax(fileName , { method: 'get', update: 'from_sendfeedback'}).request();
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function mod_ajax_loadAmphur(JS_ProvinceID) {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		//addShowLoading('area_province', 'select_loading');
		var fileName = 'index-content.php?JS_Action=loadAmphur&JS_ProvinceID='+JS_ProvinceID;
		new ajax(fileName , { method: 'get', update: 'area_amphur'}).request();
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function mod_ajax_loadLocation(JS_ProvinceID, JS_AmphurID) {
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		//addShowLoading('area_province', 'select_loading');
		var fileName = 'index-content.php?JS_Action=loadLocation&JS_ProvinceID='+JS_ProvinceID+'&JS_AmphurID='+JS_AmphurID;
		new ajax(fileName , { method: 'get', update: 'area_location'}).request();
}

function addShowLoading(div1 , div2)
{
		$(''+div1).innerHTML=$(''+div2).innerHTML;
}
// +++++++++++++++++++++++++++++++++++++++++++++++++++++ \\

function onpageclick(page){
		addShowLoading('areaData', 'showLoading');
		var js_vars =  $('myAJAXForm').toQueryString();
		
		var fileName = 'index-content.php?JS_Action=festival&JS_Page='+page+"&"+js_vars;
		//alert(fileName);
		new ajax(fileName , { method: 'get', update: 'showContent'}).request();
		
}