/* Change Flow Starts */
function NextFlowStatus(form_id,status)
{	
	$("nextflowstatus").value=status;	
	$(form_id).submit();
}
/* Change Flow Ends */

/* Tour Detapture Price Calculation Starts */
function doCalculateTourDetapture()
	{	
		var totald2;
		
		totald2 = NumericCheck((NumericCheck($("tour_departure_cost").value)+NumericCheck($("tour_departure_taxes").value)));		
		totald2=parseFloat(totald2);
				
		var w= new String(totald2);
		
		var d=w.length;
		var t= w.indexOf('.');
		//alert(t)
		var minus = d-t;
		
		if(minus>10)
		{	
			$("tour_departure_total_cost").value = totald2.toFixed(2);			
		}
		else
		{		
			$("tour_departure_total_cost").value =totald2;
		}
				
	}
	function changeTourDetaptureFee()
	{	
		if($("tour_departure_cost").value=="")
		{
			$("tour_departure_cost").value=0;
			
		}
		else
		{
			var due=parseFloat($("tour_departure_cost").value);
			$("tour_departure_cost").value =due;
		}
		
		if($("tour_departure_taxes").value=="")
		{			
			$("tour_departure_taxes").value=0;
		}
		else
		{
			var due=parseFloat($("tour_departure_taxes").value);
			$("tour_departure_taxes").value=due;
		}		
		if($("tour_departure_total_cost").value=="")
		{
			$("tour_departure_total_cost").value=0;	
			
		}
		else
		{
			var due=parseFloat($("tour_departure_total_cost").value);
			$("tour_departure_total_cost").value=due;
		}
				
	}
/* Tour Detapture Price Calculation Ends */

/* Tour Template Details Starts */
function getTemplateDetails(sel)
{	
	var TemplateID = sel.options[sel.selectedIndex].value;
	window.location.href="nl_send_email.php?nl_tab_id=4&selected_template_id="+TemplateID;
	
}
/* Tour Template Details Ends */

/* Gallery Ecard Cancel Starts */
function BookingQueryCancel()
{
	$('query_content').style.display = 'none';
	$('query_errmsg').innerHTML = '';
	$('BookingQuery').value = '';	
}
/* Gallery Ecard Cancel Ends */
function nondeletemsg()
 {
	alert("This customer group can not be deleted...");
	return false;
 }






function order_update(id,text_id)
{
var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      
	  	alert('Order Updated');
	  //document.myForm.time.value=xmlHttp.responseText;
      }
    }
  
  
  var value=document.getElementById(text_id).value;
  
  var url='process_change_order.php?txt_value='+value+'&cms_id='+id;
  
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
  }
