function get_all_data(id_form){	var m_check=false;  var c_form = document.getElementById(id_form);  var m_type, m_value, m_name;  var m_data = '', m_file_name='';  var all_item = c_form.elements.length;  for(var i = 0; i < all_item; i ++ ){		m_name    = c_form.elements[i].name;		m_type    = c_form.elements[i].type;		m_value   = c_form.elements[i].value;		m_check=check_type(m_type,c_form.elements[i]);		if(m_check==true){// m_value = encodeURI(m_value);			if(m_data != "") m_data += '&';			m_data += m_name + "=" + m_value;		}  }// -- end for --  return m_data;  //alert(m_data);}// -- end function ------------------------------------------------------------function check_type(m_type,m_object){//   alert(m_type);   switch (m_type){      case "text":      case "textarea":      case "select-one":      case "hidden":      case "password":      	return true;      break;      case "checkbox":      case "radio":        return (m_object.checked)?true:false;      break;   }// -- end switch --   return false;}// -- end function ------------------------------------------------------------/***For update new***/function status_update_news(m_txt){return true;}/*function sub_menu_left(obj,m_id_sub,id_pro){	var id_sub=document.getElementById(m_id_sub);	if(!obj.value) obj.value='none';	obj.value=(obj.value=='none')?'block':'none';	id_sub.style.display=obj.value;	if(id_pro){		show_customer_data('&n=ppro&pages=1&ploai='+id_pro,'id_center_pages');	}}//--end function--*//*****For Calendar******/function ShowDate(CurrDay,month,year){	//alert(CurrDay);	var m_data='selday='+CurrDay+"&selmonth="+month+"&selyear="+year;	postDataReturnText(INDEX_PAGE+"?special=0&n=cal",m_data,status_calendar,'id_tour_calendar');}function SendDataLocal(Go2Page,month,year,mStyle){	month=parseInt(month); year=parseInt(year);	switch(mStyle){		case "Back":    	if(month>1) month=month-1;      else if(month<=1){month=12;year=year-1;}		break;		case "Next":		 	if(month<12) month=month+1;		  else if(month>=12){month=1;year=year+1;}		break;	}//--end switch--	var m_data="selmonth="+month+"&selyear="+year;	postDataReturnText(INDEX_PAGE+"?special=0&"+Go2Page,m_data,status_calendar,'id_tour_calendar');}//--end function--function status_calendar(m_txt,m_des){	//alert(m_des);	var obj=document.getElementById(m_des);	obj.innerHTML=m_txt;}//--end function--function RowOver(Rowid){	var tmp=eval("document.getElementById('"+Rowid+"')");	tmp.className="st2";}function RowOut(Rowid){	var tmp=eval("document.getElementById('"+Rowid+"')");	tmp.className="st1";}/*****For Calendar******//* function for my data */function show_customer_data(m_url,m_id_des,m_obj){	//alert(m_url);	if(document.getElementById(m_id_des)){		getDataReturnText(INDEX_PAGE+'?special=1'+m_url,status_customer_data,m_id_des);	}	/*if(m_obj){		set_links('r_menu',m_obj,'#ba9698','#ED630B');		set_links('r_menu_sub',m_obj,'#ED630B','#ba9698');	}*/}//--end function--function show_customer_data2(m_url,m_id_des,m_obj){	if(document.getElementById(m_id_des)){		getDataReturnText(INDEX_PAGE+'?special=1'+m_url,status_customer_data,m_id_des);	}}//--end function--function post_customer_data(m_url,m_data,m_id_des,my_var){	if(document.getElementById(m_id_des)){		postDataReturnText(INDEX_PAGE+'?special=1'+m_url,m_data,status_pos_customer_data,m_id_des,my_var);	}}//--end function--function status_customer_data(m_txt,m_id){	//alert(m_txt);	//document.getElementById('id_result_ajax').innerText=m_txt;	var obj=document.getElementById(m_id);	if(obj){		obj.innerHTML=m_txt;		//window.location.href="#top";	}}//--end function--function status_pos_customer_data(m_txt,m_id,m_var){	//alert(m_txt);	//document.getElementById('id_result_ajax').innerText=m_txt;	var obj=document.getElementById(m_id);	if(obj){		obj.innerHTML=m_txt;	}	if(m_var){		window.location.href=m_var;	}}//--end function--/* function for advertisement */function show_advertisement(m_id,m_pos){	if(document.getElementById(m_id)){		getDataReturnText(INDEX_PAGE+'?n=get_adv&special=1&char='+m_pos,status_get_advertise,m_id);	}}//--end function--function status_get_advertise(m_txt, m_id){	var obj=document.getElementById(m_id);	if(obj){		obj.innerHTML=m_txt;	}}//--end function--/******FUNCTION FOR MENU LEFT AND READ ARTICLE*************/function read_once_article(m_path,tbl_key){	show_customer_data(m_path,'id_content_article');}//--end function--function go_to_article(m_path,tbl_key){	show_customer_data(m_path,'main_center_main');}//--end function--/*******PRODUCT***************************************************/function AddToCart(id_pro,id_quantity){	var id_tmp=document.getElementById(id_quantity);	if(id_tmp){		id_tmp=parseInt(id_tmp.value);		if(id_tmp>0){			var m_data="idpro="+id_pro+"&pro_quantity="+id_tmp;			postDataReturnText(INDEX_PAGE+'?n=acart&special=1',m_data,status_add_cart);		}else{			window.alert(LIST_MESSAGE['msg_num_quantity'][CURRENT_LANGUAGE]);		}	}else{		window.alert(LIST_MESSAGE['not_add_cart'][CURRENT_LANGUAGE]);	}}//--end function--function status_add_cart(m_txt){	//alert(m_txt);	switch(m_txt){		case "added":			window.alert(LIST_MESSAGE['added_cart'][CURRENT_LANGUAGE]);		break;		case "ready":			window.alert(LIST_MESSAGE['ready_product'][CURRENT_LANGUAGE]);		break;		case "not_register":			window.location.href=INDEX_PAGE+'?n=login&error=add_cart';		break;		default:			window.alert(LIST_MESSAGE['not_add_cart'][CURRENT_LANGUAGE]);		break;	}//--end switch--}//--end function--function StartSearch(obj){	if(obj.value=='Search...'){		obj.value='';	}else{		frm_mysearch.submit();	}}//--end function--function sub_menu_left(obj,m_id_sub){	var id_sub=document.getElementById(m_id_sub);	var m_value='none';	if(id_sub.style.display=='' || id_sub.style.display=='undefined' || id_sub.style.display=='none'){		m_value='block';	}else{		m_value='none';	}	id_sub.style.display=m_value;}//--end function--
