// JScript File

 var obj;
   var type;
	function GetDataViaAJAX()
	{ 
        alert("getdataviaajax");
        
            
	    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-" )
		{
		    obj.onreadystatechange = ProcessResponse;
		    url=geturl();
		    obj.open("POST", url,  true);
		    obj.send(null);     
	    }
	    
	    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!" );
		}
	}
}
