// JavaScript Document
var xmlHttp;
				
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 signup_newsletter(name,email)
{
	  xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
     	document.getElementById('msg_Subscribe').innerHTML=xmlHttp.responseText;
      }
	 
    }
	var url="ajax.php?action=subscribe&name="+name+"&email="+email;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function contact(name,email,tel,query)
{
	  xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		//  alert(xmlHttp.responseText);
     	document.getElementById('msg_Contact').innerHTML=xmlHttp.responseText;
      }
	 
    }
	var url="ajax.php?action=contact&name="+name+"&email="+email+"&tel="+tel+"&query="+query;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function load_pg(pagename)
{
	showdiv('DIV_ContactUs');
		  xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		  alert(xmlHttp.responseText);
     	document.getElementById('DIV_Gallery').innerHTML=xmlHttp.responseText;

      }
	 
    }
	var url=pagename;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);

}
function book(txtDate,seltime,selseats,txtname,txtemail,txtphone)
{
	  xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
     	document.getElementById('msg_Book').innerHTML=xmlHttp.responseText;
	
      }
	 
    }
	var url="ajax.php?action=booking&txtDate="+txtDate+"&seltime="+seltime+"&selseats="+selseats+"&txtname="+txtname+"&txtemail="+txtemail+"&txtphone="+txtphone;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function change_menu1(menuid,count)
{
	alert(menuid);
	for(i=1;i<=count;i++)
	{
		if(i!=parseInt(menuid))
		{
			document.getElementById('DIVMenu_content_'+menuid).style.visibility="hidden";
		}
		else
		{
		alert('show!!'+i);
		document.getElementById('DIVMenu_content_'+i).style.visibility="visible";
		}
	}/* xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
     	document.getElementById('DIVMenu_content').innerHTML=xmlHttp.responseText;
	
      }
	 
    }
	var url="menu_detail.php?catid="+menuid+"&name="+name;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);*/
}
function get_menu(menuid)
{
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
     	document.getElementById('DIVMenu_content').innerHTML=xmlHttp.responseText;
	
      }
	 
    }
//	var url="menu_detail.php?catid="+menuid+"&name="+name;
	var url="scroll2.php";
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function get_award(award_id) {
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		
		
     	document.getElementById('Award_DIV').innerHTML=xmlHttp.responseText;
		
      }
	 
    }
	var url='subaward_detail.php?id='+award_id;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function get_page(divname,pgname)
{
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		//  alert(xmlHttp.responseText);
		//alert(document.getElementById(divname).innerHTML);
     	document.getElementById(divname).innerHTML=xmlHttp.responseText;
		if(divname=='DIV_ContactUs')
		{
			document.getElementById('map_canvas').style.visibility="visible";
		}
	  }
	 
    }
	var url=pgname;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function get_gallery(id)
{
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		
		
     	document.getElementById('Gallary_DIV').innerHTML=xmlHttp.responseText;
		
      }
	 
    }
	var url='gallery_detail.php?id='+id;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function get_menu(id,catid)
{
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		
		
     	document.getElementById('Menu_DIV').innerHTML=xmlHttp.responseText;
		
      }
	 
    }
	var url='submenu_detail.php?id='+id+'&catid='+catid;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
	
}
function change_menu_div(catid)
{
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		
		
     	document.getElementById('MenuCat_DIV').innerHTML=xmlHttp.responseText;
		
      }
	 
    }
	var url='catmenu_detail.php?catid='+catid;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
function get_content(id,title,divname)
{
	xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
		 {
				alert ("Browser does not support HTTP Request");
				return;
		 }
	xmlHttp.onreadystatechange=function() 
		{ 
    if(xmlHttp.readyState==4)
      {
		
		
     	document.getElementById(divname).innerHTML=xmlHttp.responseText;
		
		
      }
	 
    }
	var url='page_detail.php?id='+id+"&title="+title+"&divname="+divname;
	
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null);
}
