﻿// JScript File For HTML Link Page  Which Check Login of user,Load City Name on Left Side ,And Cost Details Of Tour...//


//**************| Check User Session(Check Login of user) |**********************// 
function UserSession(tblLogin, tblAccount, Hidden1)
{
        xmlHttp=GetXmlHttpObject();//Calling To Check Browser Support AJEX or Not..
	        if(xmlHttp==null)
	        {
		        alert("Your browser does not support AJAX!");
		        return;
	        }
	    var url="HTMLValidateUserSession.aspx";
        xmlHttp.onreadystatechange=function() 
			{ 
				    if (xmlHttp.readyState==1){}
					if (xmlHttp.readyState==2){}
					if (xmlHttp.readyState==3){}
					if (xmlHttp.readyState==4)
					{ 
						    if(xmlHttp.responseText!="InValidUser")
						    {
    					        document.getElementById(tblLogin).style.display='none';
					            document.getElementById(tblAccount).style.display='';
					            document.getElementById(Hidden1).innerText=xmlHttp.responseText;
					            
    					    }
					        else
					        {
    					        document.getElementById(tblLogin).style.display='';
					            document.getElementById(tblAccount).style.display='none';
					            
    					    }
				   }
				
			}
	xmlHttp.open("GET",url,true);
    xmlHttp.send(null);
    
}
	 
	
//**************| Check Our Browser Support AJEX or Not |**********************// 	
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;
}
//*****************************End Of Java Script File***********************************


