﻿function searchvalidation()
{
var txtsearch=document.getElementById("searchtext");
    if(txtsearch.value==""||txtsearch.value=="Search")
    {
        txtsearch.value="Please enter text";
        return false;
    }
    return true;
}


    function changeyear()
      {
      var ctrl=document.getElementById("ddyear");
        window.location="pressroom.aspx?year="+ctrl.options[ctrl.selectedIndex].value;
     }
     
     
     
      function getsearchdata()
      {
        var stext=document.getElementById("txtsearchtext").value;
        var btype=1;
        if(document.getElementById("rdExactMatch").checked==true)
        {
            btype=0;
        }
        else if(document.getElementById("rdAllWord").checked==true)
        {
          btype=2;
        }
        window.location="search.aspx?searchtext="+stext+"&typeofsearch="+btype;
      //ajaxRequest(null,'true','GET','','search.aspx?searchtext='+stext+'&typeofsearch='+btype+'&pagenumber=0&strip=strip&test=test','myspan');
      return false;
      }
      
function querySt(ji) {

hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
if(ft[1]!=null)
{
return ft[1];
}else
{return 1;}
}
}


return 1;
}
