// JScript File
// Author : Kumuthini.L
//--------------- Entrance IN Details -----------------
var objEntranceIn;
var objEntranceOut;
function changeEntranceIN(DdlNo, NewValue)
{
    if(window.ActiveXObject)
    {    
        try
        {
	        objEntranceIn = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
	        try
	        {
		        objEntranceIn = new ActiveXObject("Microsoft.XMLHTTP");
	        }
	        catch(e1)
	        {
		        objEntranceIn = null;
	        }
        }
    }  
     else if(window.XMLHttpRequest)
     {
        try
        {
	        objEntranceIn = new XMLHttpRequest("Msxml2.XMLHTTP");
        }
        catch(e)
        {
	        try
	        {
		        objEntranceIn = new XMLHttpRequest("Microsoft.XMLHTTP");
	        }
	        catch(e1)
	        {
		        objEntranceIn = null;
	        }
        }
    }    
//    try
//    {
//        objEntranceIn = new ActiveXObject("Msxml2.XMLHTTP");
//    }
//    catch(e)
//    {
//        objEntranceIn = new XMLHttpRequest();
//    }
    var link = "EntranceServer.aspx?ddlno="+DdlNo+"&newvalue="+document.getElementById(NewValue)[document.getElementById(NewValue).selectedIndex].value+"&type=In";
    if(window.ActiveXObject)
    {
        objEntranceIn.open("POST", link , true);
        objEntranceIn.onreadystatechange = HandleEntranceInResponse;
        objEntranceIn.send(null);
    }
    else if(window.XMLHttpRequest)
    {
        objEntranceIn.open("POST", link , false);
        objEntranceIn.send(null);
        objEntranceIn.onreadystatechange = HandleEntranceInResponse();
    }
}
function HandleEntranceInResponse()
{    
    if(objEntranceIn.readyState == 200 && objEntranceIn.status == 4)
    {
    }   
}
//--------------- Entrance OUT Details -----------------
function changeEntranceOUT(DdlNo, NewValue)
{ 
   if(window.ActiveXObject)
    {    
        try
        {
	        objEntranceOut = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
	        try
	        {
		        objEntranceOut = new ActiveXObject("Microsoft.XMLHTTP");
	        }
	        catch(e1)
	        {
		        objEntranceOut = null;
	        }
        }
    }  
     else if(window.XMLHttpRequest)
     {
        try
        {
	        objEntranceOut = new XMLHttpRequest("Msxml2.XMLHTTP");
        }
        catch(e)
        {
	        try
	        {
		        objEntranceOut = new XMLHttpRequest("Microsoft.XMLHTTP");
	        }
	        catch(e1)
	        {
		        objEntranceOut = null;
	        }
        }
    }       
//    try
//    {
//        objEntranceOut = new ActiveXObject("Msxml2.XMLHTTP");
//    }
//    catch(e)
//    {
//        objEntranceOut = new XMLHttpRequest();
//    }
    var link = "EntranceServer.aspx?ddlno="+DdlNo+"&newvalue="+document.getElementById(NewValue)[document.getElementById(NewValue).selectedIndex].value+"&type=Out";
    if(window.ActiveXObject)
    {
        objEntranceOut.open("POST", link , true);
        objEntranceOut.onreadystatechange = HandleEntranceOutResponse;
        objEntranceOut.send(null);
    }
    else if(window.XMLHttpRequest)
    {
        objEntranceOut.open("POST", link , false);
        objEntranceOut.send(null);
        objEntranceOut.onreadystatechange = HandleEntranceOutResponse();
    }
}
function HandleEntranceOutResponse()
{    
    if(objEntranceOut.readyState == 200 && objEntranceOut.status == 4)
    {
    }   
}