function changeFlyerCity()
{
	var xmlHttp = GetXmlHttpObject();
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	document.getElementById('flyer_showtimes').innerHTML = '<img src="../images/bigWaiting.gif" width="32" height="32" border="0" style="padding-top:10px;" />';
	
	var city_movie_info = document.getElementById('city_movie_info').value;
	
	var city_movie_info_array 	= city_movie_info.split("~");
	var city_num 				= city_movie_info_array[0];
	var theater_num 			= city_movie_info_array[1];
	var movie_num 				= city_movie_info_array[2];
	
	var url = "../includes/change_movie_flyer_city.php"; 
	url = url+"?city_num="+city_num;
	url = url+"&theater_num="+theater_num;
	url = url+"&movie_num="+movie_num;
	url = url+"&sid="+Math.random();
	//prompt("",url);
  
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState == 4)
		{ 
			var result = xmlHttp.responseText;
			document.getElementById('flyer_showtimes').innerHTML = result;
		}
	}
	 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function changeFlyerDate(my_values)
{
	var xmlHttp = GetXmlHttpObject();
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	document.getElementById('flyer_showtimes').innerHTML = '<img src="../../../../images/bigWaiting.gif" width="32" height="32" border="0" style="padding-top:10px;" />';
	 
	var date_movie_info_array = my_values.split("~");
	var theater_num = date_movie_info_array[0];
	var movie_num = date_movie_info_array[1];
	var view_date = date_movie_info_array[2];
	
	var url = "../../../../includes/change_movie_flyer_date.php"; 
	url = url+"?theater_num="+theater_num;
	url = url+"&movie_num="+movie_num;
	url = url+"&view_date="+view_date;
	url = url+"&sid="+Math.random();
	//prompt("",url);
  
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState == 4)
		{ 
			var result = xmlHttp.responseText;
			document.getElementById('flyer_showtimes').innerHTML = result;
		}
	}
	 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function getShowtimes(theater_id,view_date,movie_id)
{
	var xmlHttp = GetXmlHttpObject();
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	var url = "../../../../includes/ticket_showtimes.php"; 
	url = url+"?theater_id="+theater_id;
	url = url+"&view_date="+view_date;
	url = url+"&movie_id="+movie_id;
	url = url+"&sid="+Math.random();
	//prompt("",url);
  
	xmlHttp.onreadystatechange = function()
	{
		if(xmlHttp.readyState == 4)
		{ 
			var result = xmlHttp.responseText;
			document.getElementById('container_buy_tickets').innerHTML = result;
		}
	}
	 
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function GetXmlHttpObject(){ var xmlHttp=null; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try  { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlHttp; }