﻿
function archiveSearch(e)
{ 
	
//  var  sKeyword = e;	
//    //alert(e);
//  //  reader.disabled ='true';
//	window.location="index.aspx?keyWord="+sKeyword ;
//    if(window.ActiveXObject)
//		  {
//	       e.returnValue = false;
//		  }
//		  else
//		  {
//           e.preventDefault();
//		  }
		
		//alert(e);
	myLightWindow.activateWindow(e);
		
}



//function __onPrevPage (var Pages)
//{
//var MaxPage=Pages+1;
//alert(MaxPage);
//    for (var i=2; i<MaxPage; i++) 
//    {
//    if (document.getElementById ('Page' + i).style.display == 'block')
//     {
//    document.all('Page' + i).style.display = 'none';
//    document.all('Page' + (i - 1)).style.display = 'block';
//    break;
//    }
//    }
//}

//function __onNextPage (var Pages)
//{
//alert(Pages);
//for (var i=1; i<Pages; i++) 
//{
// if (document.getElementById ('Page' + i).style.display == 'block')
//  {
//    document.all('Page' + i).style.display = 'none';
//    document.all('Page' + (i + 1)).style.display = 'block';
//    break;
//  }
//}
//}
//function __onClose () 
//{
//document.getElementById ('main_div').style.display = 'none'; 
//}
//var xmlHttp;
//function archiveSearch(e)
//{
////alert("test");
//	var sKeyword="";
//	sKeyword = e;
//	var perUrl = "archiveResults.aspx?keyWord=" + sKeyword ;
//	alert(perUrl);
//	jsRemoteCall(perUrl);
//}
//	


//function archiveSearch(e)
//{
//alert("test");
//	var sKeyword="";
//	sKeyword = e;
//	var perUrl = "archiveResults.aspx?keyWord=" + sKeyword ;
//	//alert(perUrl);
//	jsRemoteCall(perUrl);
//}
		

//function jsRemoteCall9(TargetUrl)
//{

//alert(TargetUrl);
//}
//function jsRemoteCall(TargetUrl)
//{
//	alert(TargetUrl)	;
//try {
//	if (window.XMLHttpRequest)
//	    {
//	    alert("XMLHttpRequest");
//			xmlHttp = new XMLHttpRequest();
//			xmlHttp.open("get",TargetUrl,true);
//			xmlHttp.onreadystatechange = displayResults;
//			xmlHttp.send();
//	    }
//	 
//	 else
//	 {
//	 if (window.ActiveXObject)
//	                 {
//	                   alert("ActiveXObject");
//					   xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
//					     	xmlHttp.onreadystatechange = displayResults;
//					     	xmlHttp.open("post",TargetUrl,true);
//					    	xmlHttp.send();
//					}
//	}
//}
//	catch(e)
//	 {
//	   alert(e)
//	 }
//		
//}
//		
//	 function jsRemoteCall(TargetUrl) {
//try {
//if (window.XMLHttpRequest){
//alert("firstIE");
//xmlHttp = new XMLHttpRequest();
//xmlHttp.open("get",TargetUrl,true);
//xmlHttp.onreadystatechange = onRequestChange;
//xmlHttp.send(null);
//} else {
//if (window.ActiveXObject) {
//xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
//xmlHttp.onreadystatechange = onRequestChange;
//xmlHttp.open("post",TargetUrl,true);
//xmlHttp.send();
//}
//}
//} catch(e) {
//alert(e)
//}
//}
//	
//function onRequestChange()
//{
//var restxt=xmlHttp.responseText;



//	if (xmlHttp.readyState == 4)
//	 {
//		
//		if (xmlHttp.status == 200)
//		 {
//		
//			
//		    document.getElementById('resdiv').innerText=restxt;
//			
//		} 
//	  
//		else 
//		{
//		alert("There was some problem retrieving the page \n" + xmlHttp.statusText + xmlHttp.status);
//		}	
//	}
//}
//		

//function __onPrevPage (var MaxPage)
// {
//  for (var i=2; i< MaxPage  i++)
//   {
//    if (document.getElementById ('Page' + i).style.display == 'block')
//     {
//     document.all('Page' + i).style.display = 'none';
//     document.all('Page' + (i - 1)).style.display = 'block';
//    // document.getElementById ('lblsrchResults').InnerText  = 'Showing Results ' ;
//     break;;
//     }
//   }
//   
// }
//   
//        //Next Page
//    function __onNextPage ( var MaxPage);
//    {
//    for (var i=1; i< Pages  i++){
//     if (document.getElementById ('Page' + i).style.display == 'block')
//     {
//    document.all('Page' + i).style.display = 'none';;
//     document.all('Page' + (i + 1)).style.display = 'block';;
//   // document.getElementById ('lblsrchResults').InnerText  = 'Showing Results ' ;;
//     break;;
//   }
//   }
//   }

//        //First Page
//    function __onFirstPage (var MaxPage);
//   {
//    for (var i=2; i< MaxPage  i++)
//    {
//     if (document.getElementById ('Page' + i).style.display == 'block')
//     {
//     document.all('Page' + i).style.display = 'none';;
//     document.all('Page' + (1)).style.display = 'block';;
//     break;
//   }
//   }
//   }

//        //Jump Page
//    function __onJumpPage (iPage);
//   {
//    for (var i=1; i< MaxPage  i++){
//     if (document.getElementById ('Page' + i).style.display == 'block'){
//    document.getElementById('Page' + i).style.display = 'none';;
//     document.getElementById('Page'+iPage).style.display = 'block';;
//     break;;
//   }
//   }
//   }

//        //Last Page
//    function __onLastPage (var MaxPage);
//   {
//    for (var i=1; i< MaxPage  i++)
//    {
//     if (document.getElementById ('Page' + i).style.display == 'block')
//     {
//    document.all('Page' + i).style.display = 'none';;
//     document.all('Page Pages + "').style.display = 'block';;
//     break;;
//      }
//   }
//   }

//    function __onClose () ;
//   {
//    document.getElementById ('main_div').style.display = 'none';");
//   }







































/*********************************************************************************************************************
.js file for the Search, containing the following functions.
	
	1.  jsChangeDay					- 
	2.  jsShowImage					- 
	3.  jsArchives					- 
	4.  jsShowBorder				- 
	5.  jsSlideShow					- 
	6.  jsASSearch					- 
	7.  jsAdvanceSearch				-
	8.	jsReset						-
	9.	jsASNext					-	
	10.	jsASPrevious				-
	11.	jsSearch					-
	12. jsNewSearch					-
	13.	jsShowNext					-
	14.	jsShowPrevious				-
**********************************************************************************************************************/


//function jsChangeDay(ToDID) {
//	window.location.href= "login.aspx" ;
//	return false;
//}
//function jsShowImage(ImageType,ImageName,ImageWidth ,ImageHeight){
//	if (ImageType == 'picture') openArticle("ArticleImageEx.aspx",ImageName,ImageWidth,ImageHeight,2)
//	else openArticle("ArticleImageEx.aspx",ImageName,ImageWidth,ImageHeight,1)
//}
//function jsArchives(){
//	alert("Archives Coming soon...");
//}
//function jsShowBorder(ctl,status){
//	if (status == 1)
//		ctl.border=1
//	else if (status ==0)
//		ctl.border=0
//}


//function jsSlideShow(ShowFor,SearchDate,SearchToDate){
//	//window.open("viewslideshow.aspx?SlideShowFor=" + ShowFor + "&'urrentDay=" + sCurrentPage,"vss","fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=1,height=700,width=650");
//	window.open("viewslideshow.aspx?SlideShowFor=" + ShowFor + "&CurrentDay=" + sCurrentPage + "&SearchStDate=" + SearchDate + "&SearchEndDate=" + SearchToDate,"vss","fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=1,resizable=1,height=700,width=650");
//}
//// Advance search BEGIN
///* Advance search article - called on the submit button	*/
//function jsASSearch(SearchFor,sNPQS) {
//	
//	var iSearch = 0;
//	var sKeyWord = "";
//	var sAuthor="";
//	var sPageNumber="";
//	var sLocation="";
//	var sColumnTitle="";
//	var sStartDate="";
//	var sEndDate="";
//	var perUrl="";
//		
//	//validate the control and send the search
//	if (sNPQS == undefined)
//		sNPQS="";
//		
//	if (document.getElementById('rdAll').checked == true)
//		iSearch = 0;
//	else
//		iSearch = 1;
//			
//	sKeyWord = document.getElementById('txtASKeyWord').value;
//	//alert(SearchFor);
//	sAuthor=document.getElementById('txtASAuthor').value;
//	sPageNumber=document.getElementById('txtASPageNumber').value;
//	sLocation=document.getElementById('txtASLocation').value;
//	sColumnTitle =document.getElementById('txtASColumnTitle').value;
//	//sStartDate=document.getElementById('selFrom').options[document.getElementById('selFrom').selectedIndex].value;
//	//---------sStartDate=document.getElementById('selFrom').value;
//	//sEndDate=document.getElementById('selTo').options[document.getElementById('selTo').selectedIndex].value;
//	//----------sEndDate=document.getElementById('selTo').value;
//	
//	sStartDate=document.getElementById('txtStartDate').value;
//	//sEndDate=document.getElementById('selTo').options[document.getElementById('selTo').selectedIndex].value;

//	sEndDate=document.getElementById('txtEndDate').value;
//		
//	if (sKeyWord=="" && sAuthor=="" && sPageNumber=="" && sLocation=="" && sColumnTitle=="" && sStartDate=="" && sEndDate=="") {
//		alert("Enter one or more search options");
//		return;
//	}
//		
//	if (SearchFor == 'article'){
//		perUrl = "AdvanceSearch.aspx?Show=RESULT&SearchFor=" + SearchFor + "&KeyWords=" + sKeyWord + "&Author=" + sAuthor 
//			+ "&PageNumber=" + sPageNumber + "&Location=" + sLocation + "&ColumnTitle=" + sColumnTitle + "&StartDate=" + sStartDate
//			+ "&EndDate=" + sEndDate + "&SearchType=" + iSearch + sNPQS;
//	}
//	//alert(perUrl);
//	displayLoading();
//	dispflash(perUrl)
//	jsRemoteCall(perUrl);
//}
//	
///* called to show the advance search UI option for article,image,advertisement */
//function jsAdvanceSearch(SearchFor){
//	if (chck == "False") {
//		window.location.href = "Login.aspx";
//		return false;
//	}
//	var perUrl="";
//	perUrl = "AdvanceSearch.aspx?Show=UI&SearchFor=" + SearchFor
//	displayLoading();
//	jsRemoteCall(perUrl);
//}	
//function jsReset(){
//    
//   	document.getElementById('txtASKeyWord').value = "";
//	document.getElementById('txtASAuthor').value ="";
//	document.getElementById('txtASPageNumber').value="";
//	document.getElementById('txtASLocation').value="";
//	document.getElementById('txtASColumnTitle').value="";
//	//document.getElementById('txtStartDate').value="";
//	//document.getElementById('txtEndDate').value="";
//	document.getElementById('selFrom').selectedIndex=0;
//	document.getElementById('selTo').selectedIndex=document.getElementById('selTo').length -1;
//}
//function jsASNext() {
//	var iPrevious=0;
//	var iNoOfRecords=0;
//	var iLastEndID=0;
//	var iLastStartID=0;
//	var iStartID=0;
//	var iRecShown=0;
//	var iCurrentPage="0";
//	if (document.getElementById('hidNoOfRecords'))
//		//iNoOfRecords=hidNoOfRecords.value;
//		iNoOfRecords=document.getElementById('hidNoOfRecords').value;
//	if (document.getElementById('hidLastEndID'))
//		//iLastEndID=hidLastEndID.value;			
//		iLastEndID=document.getElementById('hidLastEndID').value;			
//	if (document.getElementById('hidLastStartID'))
//		//iLastStartID=hidLastStartID.value;
//		iLastStartID=document.getElementById('hidLastStartID').value;
//	if (document.getElementById('hidStartID'))
//		//iStartID=hidStartID.value;
//		iStartID=document.getElementById('hidStartID').value;
//	if (document.getElementById('hidRecsShown'))
//		//iRecShown = hidRecsShown.value;
//		iRecShown = document.getElementById('hidRecsShown').value;
//	if (iLastEndID.split(",").length == iRecShown){
//		return;
//	}
//	if (document.getElementById('hidCurrentPage'))
//		//iCurrentPage = parseInt(hidCurrentPage.value) + 1;	
//		iCurrentPage = parseInt(document.getElementById('hidCurrentPage').value) + 1;	
//	var QS =  "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&CurrentPage=" + iCurrentPage		
//	jsASSearch('article',QS) ;
//}
//	
//function jsASPrevious() {
//	var iPrevious=1;
//	var iNoOfRecords=0;
//	var iLastEndID=0;
//	var iLastStartID=0;
//	var iStartID=0;
//	var iRecShown=0;
//	var iCurrentPage="0";
//		
//	if (document.getElementById('hidNoOfRecords'))
//		//iNoOfRecords=hidNoOfRecords.value;
//		iNoOfRecords=document.getElementById('hidNoOfRecords').value;
//	if (document.getElementById('hidLastEndID'))
//		//iLastEndID=hidLastEndID.value;			
//		iLastEndID=document.getElementById('hidLastEndID').value;			
//	if (document.getElementById('hidLastStartID'))
//		//iLastStartID=hidLastStartID.value;
//		iLastStartID=document.getElementById('hidLastStartID').value;
//	if (document.getElementById('hidStartID'))
//		//iStartID=hidStartID.value;
//		iStartID=document.getElementById('hidStartID').value;
//	if (document.getElementById('hidRecsShown'))
//		//iRecShown = hidRecsShown.value;
//		iRecShown = document.getElementById('hidRecsShown').value;
//	if (iLastEndID.split(",").length == 1)
//		return;
//	if (document.getElementById('hidCurrentPage'))
//		//iCurrentPage = hidCurrentPage.value - 1;
//			iCurrentPage = document.getElementById('hidCurrentPage').value - 1;
//	var QS =  "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&CurrentPage=" + iCurrentPage		
//	jsASSearch('article',QS) ;
//}
//	
//// Advance Search END

//// General & New Search Begin
//function jsSearch(SearchFor,remotPage,sPage) {//alert('in js serach');
//	var sKeyword="";
//		
//	if (SearchFor == "article")	{
//		sKeyword = document.getElementById('txtArticleKeyword').value;	
//		alert(sKeyword);
//		if (sKeyword == "" || sKeyword =="Enter Keywords..."){
//			alert("Enter a keyword to search");
//			return;
//			
//		}
//		//alert('hi');
//		//window.location.href="ArticleSearchUI.aspx?keyWord="+sKeyword+"";
//		//window.location.href="ArticleSearchUI.aspx?keyWord="+sKeyword + "&pubId=" + sPage;
//		
//		//window.open("ArticleSearchUI.aspx?keyWord="+sKeyword + "&pubId=" + sPage);
//        //window.open("SearchResults.aspx?keyWord="+sKeyword + "&pubId=" + sPage);
//         
//		//alert(window.location.href);
//		window.location="SearchResults.aspx?keyWord="+sKeyword + "&pubId=" + sPage;
//		if(window.ActiveXObject){
//		  //alert(hi);
//		  e.returnValue = false;
//		  }else{//alert(e);
//             e.preventDefault();
//		     }
//		
//	//	window.location.replace("SearchResults.aspx?keyWord="+sKeyword + "&pubId=" + sPage +"");
//		//alert(hi);
//		//"Search Result","left=0,top=0,width=580,height=520,toolbar=no,menubar=no,status=no,address=no,scrollbars=no,resizable=yes,titlebar=no");
//		
//	}
//	}
//	
//	///funcion for implemneting search on onkeydown event for IE & mozilla
//	function archiveSearch(e){
//	
//	        var sKeyword="";
//		    sKeyword = e;
////		
//////		   var so = new SWFObject("movie.swf", "movie", "400", "100%", "8", "#336699"); 
//////  so.addParam("wmode", "transparent"); 
//////  so.write("flashcontent"); 
//////toggleSWF();

////		 window.location="index.aspx?keyWord="+sKeyword ;
////		//  document.getElementById("reader").style.display = 'none';
////		
////		  if(window.ActiveXObject)
////		  {
////	       e.returnValue = false;
////		  }else
////		  {
////           e.preventDefault();
////		  }
////		


//	var url= = "index.aspx?keyWord="+sKeyword ;
//	alert(url);
//					 
//	displayResults(url,callback_displayResults);
////		
//	
//	}
//	
//	
////	function toggleSWF(){ alert("hiii");  var swfDiv = document.getElementById("reader");   if(swfDiv.style.textIndent === "-9000px"){      swfDiv.style.textIndent = "0px";   } else {      swfDiv.style.textIndent = "-9000px";   }}

//	
//	function openIssue(retUrl)
//	{
//	alert(retUrl);
//	   
//	    window.location=retUrl ;
//       
//	if(window.ActiveXObject){
//		 
//		  e.returnValue = false;
//		  }else{
//             e.preventDefault();
//		     }
//	
//	}
//function closePopUp(e)
//{
////alert("hiii");
//document.getElementById('txtArticleKeyword').value="";
// var sKeyword="";
//document.getElementById('main_div').Visible=false;
//document.getElementById('main_div').style.display ='none';
////window.location="index.aspx";

//}
//	
//function jsSearchDown(SearchFor,remotPage,sPage) {
//	var sKeyword="";
//		
//	if (SearchFor == "article")	{
//		sKeyword = document.getElementById('txtKeyWordd').value;	
//		if (sKeyword == ""){
//			alert("Enter a keyword to seach");
//			return;
//			
//		}
//		//window.location.href="ArticleSearchUI.aspx?keyWord="+sKeyword+"";
//		//window.open("ArticleSearchUI.aspx?keyWord="+sKeyword + "&pubId=" + sPage);
//		window.location.href="index.aspx?keyWord="+sKeyword ;
//	}

////	else
////	{
////		if (sPage == "")
////		sPage = sCurrentPage;
////		var perUrl =   remotPage + "?keyWords=" + sKeyword + "&SearchDate=" + sPage ;
////	 }		
////	displayLoading();
////	jsRemoteCall(perUrl);
//}

//	


//function next(SearchFor,remotePage,mode){alert('in next');}
	
//function jsShowNext(SearchFor,remotePage,mode){
//	var iPrevious=0;
//	var iNoOfRecords=0;
//	var iLastEndID=0;
//	var iLastStartID=0;
//	var iStartID=0;
//	var iRecShown=0;
//	var iCurrentPage="0";
//		
//	var dSearchDate="";
//	var dSearchToDate="";
//	var sKeyword="";
//	var perUrl="";
//	var pub="";

//   sKeyword = document.getElementById('txtNewSearch').value;
//   //alert(sKeyword);
//   
//   if (document.getElementById('hidStartID'))
//		iStartID=document.getElementById('hidStartID').value;
//	//	alert(iStartID);
//		
//	if (document.getElementById('hidRecsShown'))
//		iRecShown = document.getElementById('hidRecsShown').value;
//	//	alert(iRecShown);

//  if (document.getElementById('hidNoOfRecords'))
//		iNoOfRecords=document.getElementById('hidNoOfRecords').value;
//			
//  if (document.getElementById('hidEditionID'))
//		pub=document.getElementById('hidEditionID').value;
//			
//	/*	if (document.getElementById('hidLastStartID'))
//		iLastStartID=document.getElementById('hidLastStartID').value;
//			
//	if (document.getElementById('hidLastEndID'))
//		iLastEndID=document.getElementById('hidLastEndID').value;
//			
//	if (document.getElementById('hidRecsShown'))
//		iRecShown = document.getElementById('hidRecsShown').value;
//			
//	if (document.getElementById('hidSearchDate'))
//		dSearchDate=document.getElementById('hidSearchDate').value;*/
//			
//	//if (iLastEndID.split(",").length == iRecShown){
//	//	return;
//	//}
//	

//	if (document.getElementById('hidCurrentPage'))
//		iCurrentPage = parseInt(document.getElementById('hidCurrentPage').value) + 1;
//	    //  alert(iCurrentPage);
//	     // alert(mode);
//	     if(iRecShown==iCurrentPage){return;}
//	     
//	if(mode == "2") 
//		perUrl = remotePage + "?keyWords=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&SearchDate=" + dSearchDate + "&CurrentPage=" + iCurrentPage + "&SearchToDate=" + document.getElementById('txtStartDate').value;
//	else
//	//	perUrl = remotePage + "?keyWords=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&SearchDate=" + dSearchDate + "&CurrentPage=" + iCurrentPage + "&SearchToDate=" + document.getElementById('txtStartDate').value;
//		perUrl = remotePage + "?keyWord=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&EditionID=" + pub + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&CurrentPage=" + iCurrentPage;
//	
//	if ((SearchFor =='picture')||(SearchFor =='advertisement'))
//			{
//			perUrl = remotePage + "?keyWords=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&SearchDate=" + document.getElementById('txtStartDate').value + "&CurrentPage=" + iCurrentPage + "&SearchToDate=" + document.getElementById('txtEndDate').value;
//			}	
////	displayLoading();
////alert(perUrl);
//	jsSearchRemoteCall(perUrl,1);
//			
//}
//	
//function jsShowPrevious(SearchFor,remotePage,mode){
//	var iPrevious=1;
//	var iNoOfRecords=0;
//	var iLastEndID=0;
//	var iLastStartID=0;
//	var iStartID=0;
//	var iRecShown=0;
//	var iCurrentPage="0";
//	var dSearchDate="";
//	var sKeyword="";
//	var perUrl="";
//			
//	sKeyword = document.getElementById('txtNewSearch').value;
//	 if (document.getElementById('hidStartID'))
//		iStartID=document.getElementById('hidStartID').value;
//	//	alert(iStartID);
//		
//	if (document.getElementById('hidRecsShown'))
//		iRecShown = document.getElementById('hidRecsShown').value;
//	//	alert(iRecShown);

//  if (document.getElementById('hidNoOfRecords'))
//		iNoOfRecords=document.getElementById('hidNoOfRecords').value;
//			
//  if (document.getElementById('hidEditionID'))
//		pub=document.getElementById('hidEditionID').value;
//			

//	if(document.getElementById('hidCurrentPage').value==0){return;}
//	
//	if (document.getElementById('hidCurrentPage'))
//		iCurrentPage = document.getElementById('hidCurrentPage').value - 1;
//		
//	
//	if (mode == "2") 
//	
//		perUrl = remotePage + "?keyWords=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&SearchDate=" + dSearchDate + "&CurrentPage=" + iCurrentPage + "&SearchToDate=" + document.getElementById('txtStartDate').value;
//	else
//		//perUrl = remotePage + "?keyWords=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&SearchDate=" + dSearchDate + "&CurrentPage=" + iCurrentPage + "&SearchToDate=" + document.getElementById('txtStartDate').value;	
//		perUrl = remotePage + "?keyWord=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&EditionID=" + pub + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&CurrentPage=" + iCurrentPage;
//	if ((SearchFor =='picture')||(SearchFor =='advertisement'))
//		{
//		perUrl = remotePage + "?keyWords=" + sKeyword + "&NoOfRecords=" + iNoOfRecords + "&Previous=" + iPrevious + "&StartID=" + iStartID + "&RecsShown=" + iRecShown + "&LastEndID=" + iLastEndID + "&LastStartID=" + iLastStartID + "&SearchDate=" + document.getElementById('txtStartDate').value + "&CurrentPage=" + iCurrentPage + "&SearchToDate=" + document.getElementById('txtEndDate').value;	
//		}
//	//displayLoading();
//		jsSearchRemoteCall(perUrl,1);
//}
////khaleel

//function jsSearchk(SearchFor,remotPage) {
//if (document.getElementById("AdSFlash")) {
//	
//			if (parseInt(remotPage.substr(11,3)) == 1) {
//				
//				flshAdSpMovie.style.display='block';
//			} else {
//				flshAdSpMovie.style.display='none';
//			}
//		}
//		if (document.getElementById("flshAdObject")) {
//		
//			if (parseInt(remotPage.substr(11,3)) == 1) {
//				document.getElementById("flshAdObject").style.visibility="Visible";
//			}
//			 else {
//				document.getElementById("flshAdObject").style.visibility="Hidden";
//			}
//		}

//	if (chck == "False") {
//		window.location.href = "Login.aspx"
//		return false;
//	}
//	var sKeyword="";
//	//*************Added for gallery search(between dates)*************
//	var StartDate="";
//	var EndDate="";
//	//*******************End*******************************************
//	if (SearchFor == "article")	{
//		sKeyword = document.getElementById('txtArticleKeyword').value;	
//		if (sKeyword == ""){
//			alert("Enter a keyword to seach");
//			return;
//		}
//	}
//	else if (SearchFor == "picture"){	
//		//sKeyword = document.getElementById('txtPictureKeyword').value;
//		//common text box for article,ads,picture
//		sKeyword = document.getElementById('txtArticleKeyword').value;
//		
//		if (sKeyword == ""){
//			alert("Enter a keyword to seach");
//			return;
//		}
//	}
//	else if (SearchFor =='Galadvertisement'){
//		sKeyword =document.getElementById('txtNewSearch').value;
//		//**************Gallery search********************
//		StartDate=document.getElementById('txtStartDate').value;
//			EndDate=document.getElementById('txtEndDate').value;
//		//**************End********************
//			if (sKeyword == ""){
//			alert("Enter a keyword to seach");
//			return;
//		}
//	}
//	else if (SearchFor =='Picadvertisement'){
//		sKeyword =document.getElementById('txtNewSearch').value;
//		//**************pic search********************
//		StartDate=document.getElementById('txtStartDate').value;
//			EndDate=document.getElementById('txtEndDate').value;
//		//**************End********************
//			if (sKeyword == ""){
//			alert("Enter a keyword to seach");
//			return;
//		}
//	}
//	else if (SearchFor == "picturegallrey"){
//		document.getElementById('txtArticleKeyword').value="";	
//		sKeyword ="";
//	}
//	else if (SearchFor == 'advertisement'){
//		sKeyword = document.getElementById('txtArticleKeyword').value;
//		if (sKeyword == ""){
//			alert("Enter a keyword to seach");
//			return;
//		}
//	}
//	else if (SearchFor =='advertismentgallery'){
//		document.getElementById('txtArticleKeyword').value="";
//		sKeyword="";
//	}
//	//***************added for gallery(Search between dates)********************
//	if (SearchFor =='Picadvertisement')
//	{
//		//var perUrl =   remotPage + "?keyWords=" + sKeyword + "&StartDt=" + StartDate +"&EndDt="+ EndDate;
//		var perUrl =   remotPage + "?keyWords=" + sKeyword + "&SearchDate=" + StartDate +"&SearchToDate="+ EndDate;
//		
//	}
//	else if (SearchFor =='Galadvertisement')
//	{
//	//var perUrl =   remotPage + "?keyWords=" + sKeyword + "&StartDt=" + StartDate +"&EndDt="+ EndDate;
//	var perUrl =   remotPage + "?keyWords=" + sKeyword + "&SearchDate=" + StartDate +"&SearchToDate="+ EndDate;
//	}
//	else
//	{
//		if (sPage == "")
//		sPage = sCurrentPage;
//		var perUrl =   remotPage + "?keyWords=" + sKeyword + "&SearchDate=" + sPage ;
//	 }		
//	 //**********************End********************************
//	 
//	//if (sPage == "")
//	//	sPage = sCurrentPage;
//	//var perUrl =   remotPage + "?keyWords=" + sKeyword + "&SearchDate=" + sPage ;
//	displayLoading();
//	jsRemoteCall(perUrl);
//}


////khaleel


//function jsSearchMore(SearchFor,remotPage,sPage) 
//		{
//			var sKeyword="";
//		
//		if (SearchFor == "article")
//			{
//						sKeyword = document.getElementById('txtKeyword').value;	
//						if (sKeyword == "")
//								{
//									alert("Enter a keyword to seach");
//									return;
//								}
//			}
//		
//		window.open("ArticleSearchUI.aspx?keyWord="+sKeyword + "&pubId=" + sPage);
//		
//	}
//	
//	function jsSearchMored(SearchFor,remotPage,sPage)
//		 {
//					var sKeyword="";
//					if (SearchFor == "article")	
//					{
//						sKeyword = document.getElementById('txtSWord').value;	
//						if (sKeyword == "")
//							{
//								alert("Enter a keyword to seach");
//								return;
//							}
//					}
//		
//			window.open("ArticleSearchUI.aspx?keyWord="+sKeyword + "&pubId=" + sPage);
//		}


/////////////ajax remote call///////////////////////////////////////
//var xmlHttp;
//function jsSearchRemoteCall(TargetUrl,typ) {
//			try {
//				if (window.XMLHttpRequest){
//					xmlHttp = new XMLHttpRequest();
//					xmlHttp.open("get",TargetUrl,true);
//					if (typ == 1) 
//						xmlHttp.onreadystatechange = searchnext;
//					else if (typ == 2)
//						xmlHttp.onreadystatechange = onMainCatChange;
//						
//					xmlHttp.send(null);
//				} else { 
//					if (window.ActiveXObject) {
//					   xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
//						if (typ == 1) 
//							xmlHttp.onreadystatechange = searchnext;
//							else if (typ == 2)
//					     	xmlHttp.onreadystatechange = onMainCatChange;
//					     	
//					    	xmlHttp.open("post",TargetUrl,true);
//					    	xmlHttp.send();
//					}
//				}
//			} catch(e) {
//				alert(e)
//			}
//		}
//		
		
		

//function callback_displayResults(){
//					if (xmlHttp.readyState == 4) {
//				if (xmlHttp.status == 200) {
//					var xmlDoc=xmlHttp.responseText;
//				//	alert(xmlDoc);
//					//document.getElementById("ajaxcontentarea").innerHTML=xmlDoc;
//					alert(xmlDoc);
//					document.getElementById("tdPages").innerHtml=xmlDoc;
//				} else {
//					alert("There was some problem retrieving the page \n" + xmlHttp.statusText + xmlHttp.status);
//				}	
//			}
//		}

