function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		//Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}


function fill_country(tmp_fldName,divname,CategoryId,CountryId,tmp_is_add_edit)
{
	
	var fldName;
	var fldName=eval(tmp_fldName);
	fldName.options.length=0;
	if(CategoryId>0)
	{
		xmlHttp=GetXmlHttpObject();
		if(xmlHttp==null)
		{
			alert("Browser does not support HTTP request");
			return
		}
		
		var url="fill_pcountry.php";
		url+="?countryId="+CountryId;
		url+="&categoryId="+CategoryId;
		url+="&ddName="+tmp_fldName;
		url+="&is_add_edit="+tmp_is_add_edit;
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				//alert(xmlHttp.responseText);
				eval(xmlHttp.responseText);
			}
		}
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
	else
	{
		document.getElementById(divname).innerHTML="Please select the Country for Package";
		document.getElementById(divname).style.display="block";
		fldName.options.length=0;
		fldName.options[0] = new Option('Please select','0');
		
	}
}


function fill_city(tmp_fldName,divname,CountryId,CityId,tmp_is_add_edit)
{
	
	var fldName;
	var fldName=eval(tmp_fldName);
	fldName.options.length=0;
	if(CountryId>0)
	{
		xmlHttp=GetXmlHttpObject();
		if(xmlHttp==null)
		{
			alert("Browser does not support HTTP request");
			return
		}
		
		var url="fill_pcity.php";
		url+="?cityId="+CityId;
		url+="&countryId="+CountryId;
		url+="&ddName="+tmp_fldName;
		url+="&is_add_edit="+tmp_is_add_edit;
		xmlHttp.onreadystatechange=function()
		{
			if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				//alert(xmlHttp.responseText);
				eval(xmlHttp.responseText);
			}
		}
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
	}
	else
	{
		document.getElementById(divname).innerHTML="Please select the City for Package";
		document.getElementById(divname).style.display="block";
		fldName.options.length=0;
		fldName.options[0] = new Option('Please select','0');
		
	}
}

function call_cal(selMonth,selYear)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="ajax_eve_cal.php"
	url=url+"?selMonth="+selMonth;
	url=url+"&selYear="+selYear;
	xmlHttp.onreadystatechange=function()
	{
		
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
			if(xmlHttp.responseText)
			{	
				//alert(xmlHttp.responseText);
				document.getElementById("CalAjax").innerHTML	=  xmlHttp.responseText;
				
			}
		}else
		{
				document.getElementById("CalAjax").innerHTML	 = "<div align='center' style='padding-bottom:10px; padding-top:10px;'><img src='images/spinner.gif'></div>";
		}
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function call_eachday_cal(selMonth,selYear)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="ajax_eachday_eve_cal.php"
	url=url+"?selMonth="+selMonth;
	url=url+"&selYear="+selYear;
	xmlHttp.onreadystatechange=function()
	{
		
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
			if(xmlHttp.responseText)
			{	
				//alert(xmlHttp.responseText);
				document.getElementById("CalAjax").innerHTML	=  xmlHttp.responseText;
				
			}
		}else
		{
				document.getElementById("CalAjax").innerHTML	 = "<div align='center' style='padding-bottom:10px; padding-top:10px;'><img src='images/spinner.gif'></div>";
		}
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function call_ajax_home_cal(selMonth,selYear)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	var url="page_include/eve_right_cal.php"
	//alert("I m here");
	url=url+"?selMonth="+selMonth;
	url=url+"&selYear="+selYear;
	
	xmlHttp.onreadystatechange=function()
	{
		
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{
			if(xmlHttp.responseText)
			{	
				//alert(xmlHttp.responseText);
				document.getElementById("mDiv").innerHTML	=  xmlHttp.responseText;
				
			}
		}else
		{
				document.getElementById("mDiv").innerHTML	 = "<img src='images/spinner.gif'>";
		}
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


