﻿// JScript File

var xmlHttp;
function search1(str)
{
  
 
 if(str!="select")
 {

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  
var url="programe.aspx?time=" + str + ""  

url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(true);
document.location.href="#time";

}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
 

//document.getElementById('locality3').innerHTML="hi this is test"
document.getElementById('rpt').innerHTML=xmlHttp.responseText;


}

}

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 search2(id)
{
 
 
 if(id!="select")
 {
 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  
var url="/ajax/showprograme.aspx?id=" + id + ""  
 
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(true);
refreshwindow();


}


function refreshwindow()
{
   
   document.location.href="#time";
//   alert("Are u sure");
   window.location = window.location;
   //alert('window has been refreshed');
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
 

//document.getElementById('locality3').innerHTML="hi this is test"
document.getElementById('show').innerHTML=xmlHttp.responseText;

}


}

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;

}
}



