// JScript File
 var obj;
   var type;
	function GetDataViaAJAX()
	{ 
        alert("getdataviaajax");
        if(window.ActiveXObject)
        {    
            try
            {
                obj = new ActiveXObject("Msxml2.XMLHTTP");
            }
            catch(e)
            {
                try
                {
	                obj = new ActiveXObject("Microsoft.XMLHTTP");
                }
                catch(e1)
                {
	                obj = null;
                }
            }
        }  
         else if(window.XMLHttpRequest)
         {
            try
            {
                obj = new XMLHttpRequest("Msxml2.XMLHTTP");
            }
            catch(e)
            {
                try
                {
	                obj = new XMLHttpRequest("Microsoft.XMLHTTP");
                }
                catch(e1)
                {
	                obj = null;
                }
            }
          }  
//	    try
//	    {
//		    obj = new ActiveXObject("Msxml2.XMLHTTP");
//	    }
//	    catch(e)
//	    {
//		    try
//		    {
//			    obj = new ActiveXObject("Microsoft.XMLHTTP");
//		    }
//		    catch(e1)
//		    {
//			    obj = null;
//		    }
//	    }
	if(obj!=null)
	{
		var url;
		if(document.aspnetForm.ddl_Pattern.value != "-Select-" )
		{
		    if(window.ActiveXObject)
            {
		        obj.onreadystatechange = ProcessResponse;
		        url=geturl();
		        obj.open("POST", url,  true);
		        obj.send(null); 
		    }
		    else if(window.XMLHttpRequest)
            {
		        url=geturl();
		        obj.open("POST", url,  false);
		        obj.send(null);
		        obj.onreadystatechange = ProcessResponse();
            }    
	    }
	    else
	    {
	         alert("Please Select Pattern Type");
	         document.getElementById('div__Pattern').innerHTML='';
	    }
	}
	return false;
	}
  function geturl()
  {
    var str;
    str="TA_UI_Master_ShiftRemote.aspx?Pattern=" + document.aspnetForm.ddl_Pattern.value
    return str;
  }      
  function ProcessResponse()
   {
	if(obj.readyState == 4)
	{
		if(obj.status == 200)
		{
		   var te=obj.responseText;
		   document.getElementById('div__Pattern').innerHTML=te;
		}
		else
		{
			alert("Error retrieving data!" );
		}
	}
}
