	
	function DisRtclickopt()
		{
			try{
					document.getElementById('EmailAdv').disabled=true;
					document.getElementById('EmailAdv').style.cursor="none";
					document.getElementById('readOut').disabled=true;
					document.getElementById('readOut').style.cursor="none";
					document.getElementById('clip').disabled=true;
					document.getElementById('clip').style.cursor="none";
					document.getElementById('VUrl').disabled=true;
					document.getElementById('VUrl').style.cursor="none";
			   }catch(e){}			
		}

		function HidBlurb(){
		  try{
				document.getElementById("Blurb2").style.visibility="hidden";
				document.getElementById("Blurb").style.visibility="hidden";
			 }catch(e){}	
		}
		 function fadeoutclose()
		 {		
		     try{
		          if (!curGlideLyr) {
		  			  if(Ex1.isHalted){
					    	Ex1.fader.fadeOut();
						    Ex1.isHalted = false;
					 }
				  }
				  if(Ex2.isHalted){
					  Ex2.fader.fadeOut();
					  Ex2.isHalted = false;
				 }
				 if(Ex3.isHalted){
					  Ex3.fader.fadeOut();
				 	  Ex3.isHalted = false;
				}
				if(Ex4.isHalted){
					  Ex4.fader.fadeOut();
					  Ex4.isHalted = false;
				}					
				}catch(e){}	
	     }	
		 function VisitURL(){
			  try{
						if(currentURL!=='')
						{
								if (chck == "False") {
										if (confirm('You need to Register/Login to access this feature')) window.location.href=LoginPageURL;
										return false;
								}
								if(ZoomStatus!=1)
								{
									window.open(currentURL,"VisitUrl","left=200,top=200,width=650,height=500,toolbar=no,menubar=no,address=no,scrollbars=yes,resizable=yes");
								}
						}
				}catch(e){}	
			}
			function showpodcast() {
	document.getElementById('divPgSrc').style.cursor='pointer';
				setDblclick=0;
				DisRtclickopt();			
				setCropsState();				
				fadeoutclose();
		url = "podcast.aspx?dayName=" + sCurrentPage;	
		displayLoading();
	    jsRemoteCall(url);
	}
	/////srinivasnakka 9/7/2009
		function refresh()
        {
                 window.location.href = unescape(window.location.pathname);
        }
	/////srinivasnakka 9/7/2009
	
	var DispPodcast;
	function ShowPodcastLinks(url)
	{  
			document.getElementById('divPgSrc').style.cursor='pointer';
				setDblclick=0;
				DisRtclickopt();			
				setCropsState();				
				fadeoutclose();
		DispPodcast= //window.open(url,"artwindow","left='100',top='100',width='1500',height='2000',toolbar=no,menubar=no,status=no,address=no,scrollbars=yes,resizable=yes,titlebar=no")
		window.open(url,"art","left=220,top=120,width=550,height=550,toolbar=no,menubar=no,status=no,address=no,scrollbars=yes,resizable=yes,titlebar=no")
		DispPodcast.focus();
	}

		function EmailAdvertiser(){
		   try{	
						var typ=1;
						var EAdvertiser;
						var advUrl; 
						if(CurrentAdvertiser!='')
						{
							if (chck == "False") {
								if (confirm('You need to Register/Login to access this feature')) window.location.href="Login.aspx";
								return false;
							}
							if(ZoomStatus!=1)
							{
							advUrl = "MailTo.aspx?toadd=" + CurrentAdvertiser + "&typ=" + typ;
							window.open(advUrl,"AdvMail","width=580,height=350,toolbar=no,menubar=no,address=no,scrollbars=yes,resizable=yes");
							}
						}
				}catch(e){}	    	
		}



		function MM_preloadImages() { //v3.0
			try{
					var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
					var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
					if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
					
			}catch(e){}		
			}

			function MM_findObj(n, d) { //v4.01
				try{
					var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
						d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
					if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
					for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
					if(!x && d.getElementById) x=d.getElementById(n); return x;
				}catch(e){}	
			}

			function MM_swapImgRestore() { //v3.0
			   try{
					var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
			   }catch(e){}	
			}

			function MM_swapImage() {
			  //v3.0
			  try{
					var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
					if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
				 }catch(e){}	
			}



			//for Disabling the  next and previous Links
			function DisableLink(typ) {
			   try{
						if (typ == 1) {
							var obj=document.getElementById("aPrev");
							var obj1=document.getElementById("aPrev1");
						} else {
							var obj=document.getElementById("aNext");
							var obj1=document.getElementById("aNext1");
							blNextpg =0;
						}
						obj.style.cursor = "default";
						obj1.style.cursor = "default";
				  }catch(e){}		
		   }
			//for Enabling the  next and previous Links
			function EnableLink(did,page1,page2,skin,typ) {
			   try{
						if (typ == 1) {
							var obj=document.getElementById("aPrev");
							var obj1=document.getElementById("aPrev1");
						} else {
							var obj=document.getElementById("aNext");
							var obj1=document.getElementById("aNext1");
						}
						if (window.XMLHttpRequest) {
							obj.style.cursor = "pointer";
							obj1.style.cursor = "pointer";
						} else {
							obj.style.cursor = "hand";
							obj1.style.cursor = "hand";
						}
				  }catch(e){}		
			}



			//For First Page Moving 
			function funcFirst() {
			   try{
					if (aPrevPg) {
						//for Zoom Ravi 14 th april
						setCropsState();
						func2(gDid,sCurrentPage,gS);
					}
				 }catch(e){}	
			}
		
			//for Previous Page Moving
			function funcPrev() {
					   //for Zoom Ravi 14 th April
					 
				try{
						if(aPrevPg) {
							setCropsState();
							 func2(gDid,aPrevPg,gS);
						}
						else
							{
									if(strPrevpg){
									document.getElementById("aPrev").style.cursor="hand";
									setCropsState();
									func2(gDid,strPrevpg,gS);
									}
							}
				}catch(e){}			
			}
			//for Last Page Moving 
			function funcLast() {
			   try{
					setCropsState();
					func2(gDid,lPg,gS);
				  }catch(e){}	
			}


		//CODE FOR ARTICLE RATING ****
			function ArticleRating(remotePage) {
			 //for Firefox assigning the cursor  hand  by ravi 
			 
			   try{
						document.getElementById('divPgSrc').style.cursor='pointer';
						if(setDblclick==1)
							setDblclick=0;
						    DisRtclickopt();
						//for Zoom Ravi
						if (chck == "False") {
							window.location.href = "Login.aspx";
							return false;
						}
						if (document.getElementById("divZoom").style.display == "block"){
							document.getElementById("divZoom").style.display= "none";	
							
							ZoomStatus=0;
						}
					/*	if (BrwsrName != "Ne"){
							document.getElementById("divPgSrc").style.cursor = "pointer"; 
						}*/
						if (chck == "False") {
											if (confirm('You need to Register/Login to access this feature')) window.location.href="Login.aspx";
												return false;
											}
						displayLoading();
						jsRemoteCall(remotePage);
				  }catch(e){}		
			}




			//for Advance Gallery Search 
	function AdGallerySearch(type,page,cur) {
	   try{
			setDblclick=0;
			//document.getElementById("divPgSrc").style.cursor = "none";
			DisRtclickopt(); 
			if(isLoginRequired)
			{
			    if (chck == "False") {
						    window.location.href = "Login.aspx";
						    return false;
			    }
			}
			Ex4.handleClick();
	 		setCropsState();
	 	  }catch(e){}	
	}
    //for Ad Gallery 
	function adGallery(type,page,cur) {
	   //for Firefox assigning the cursor  hand  by ravi  may 16 th 
	   try{
	       document.getElementById('divPgSrc').style.cursor='auto';
	       DisRtclickopt();
	    // alert(page);
		   jsSearch(type,page,cur); 
				//ravi on 20 april
				//topMenuInit();
				//moveTopMenu(1);
			fadeoutclose();
		//for Zoom Ravi
			if (document.getElementById("divZoom").style.display == "block"){
					document.getElementById("divZoom").style.display= "none";	
				ZoomStatus=0;
			}
			return false;
		}catch(e){}
	}
	//for Advance Search 
	function advncSearch() {
	      //for Firefox assigning the cursor  hand  by ravi  may 16th 
		    document.getElementById('divPgSrc').style.cursor='auto';
		   //for Zoom Ravi
		    setDblclick=0;
		    fadeoutclose();
					//ravi on 20 april
			if (document.getElementById("divZoom").style.display == "block"){
				document.getElementById("divZoom").style.display= "none";	
				ZoomStatus=0;
			}
			jsASSearch('article');
			return false;
	}
	//for Archives Display 
//	function DisplayArchives() {
//	  try{
//			if (chck == "False") {
//				window.location.href = "Login.aspx";
//				return false;
//			}
//			var preUrl;
//			preUrl = "DispSearchArchives.aspx";
//			displayLoading();
//			jsRemoteCall(preUrl);	
//		}catch(e){}	
//	}
	//for Shwoin the Saved Clippings 
	function showMyClippings() {
	    //for Firefox assigning the cursor  hand  by ravi 
	    try{
				document.getElementById('divPgSrc').style.cursor='pointer';
				setDblclick=0;
				DisRtclickopt();
			//for Zoom Ravi
				setCropsState();
				//code for MAc
					//ravi on 20 april
				fadeoutclose();
    			if (BrwsrName.substring(0,2) == "Ne")
				{ 
    				if (document.getElementById("e_content").style.overflow=="auto")
					{
						if(navigator.userAgent.indexOf("Safari") == -1)
						{
							document.getElementById("e_content").style.overflow="hidden";
						}
					}
    			}
    			var i;
				i=0;
				while (i <= document.getElementsByName('x_imp').length-1)
				{
					document.getElementsByName('x_imp').item(i).style.overflow= "hidden";
					i = i + 1;
				}
    			//code for 
				if (chck == "False") {
					window.location.href = "Login.aspx";
					return false;
				}
				//for Zoom Ravi
				if (document.getElementById("divZoom").style.display == "block"){
					document.getElementById("divZoom").style.display= "none";	
					ZoomStatus=0;
				}
				var preUrl;
				preUrl = "ShowMyClippings.aspx?mode=1&t=" + Math.random();
				//alert(preUrl);
				displayLoading();
				jsRemoteCall(preUrl);	
				onOffIcons(2);
		 }catch(e){}		
	}
	//for Deletin the  selected Clippings 
	function DeleteMyClippings(mode){
	   try{
	     	document.getElementById('divPgSrc').style.cursor='pointer';
			var intClipCount=document.getElementById("hClipCount").value;
			var IsChecked;
			IsChecked = false;
			for (var i = 1; i<=intClipCount; i++)
				if (document.getElementById("chk"+i).checked)							
					IsChecked = true;
				if (IsChecked){						
						if (confirm("Are you sure want to delete the selected Clippings?")){	
									var strDelList ;
									strDelList='';
									for (var i = 1; i<=intClipCount; i++){
										if (document.getElementById("chk"+i).checked){
											if (strDelList=='')
												strDelList = strDelList + document.getElementById("chk"+i).value;
											else							
												strDelList = strDelList + '__' + document.getElementById("chk"+i).value;
										}
									}
									var preUrl;
									preUrl = "ShowMyClippings.aspx?strDelList=" + strDelList + "&mode=1";
									displayLoading();
									jsRemoteCall(preUrl);	
						}		
				} else alert("Please select atleast one item.");
		}catch(e){}	
	}
	function ShowHideLeftLinks(obj,imgObj,skin) {
	   try{
				var lftDivObj = document.getElementById(obj);
				var moreDivOjb = document.getElementById(imgObj);
				if(lftDivObj.style.display == "none") {
						lftDivObj.style.display=""
				} else {
						lftDivObj.style.display="none"
					}
		 }catch(e){}			
	}
	function HideLeftLinks(obj,imgObj,skin) {
	  try{
			var lftDivObj = document.getElementById(obj);
			var moreDivOjb = document.getElementById(imgObj);
			if(lftDivObj.style.display == "block") {
				lftDivObj.style.display="none"
			}
		}catch(e){}	
	}
	function ShowLeftLinks(obj,imgObj,skin) {
	  try{
			var lftDivObj = document.getElementById(obj);
			var moreDivOjb = document.getElementById(imgObj);
			if(lftDivObj.style.display == "none") {
					lftDivObj.style.display="block"
			}
		}catch(e){}	
	}
	function ShowHideLeftLinks1(obj,imgObj,skin) {
	   try{
			var lftDivObj = document.getElementsByName(obj);
			var moreDivOjb = document.getElementById(imgObj);
			for (var i = 0 ;i<lftDivObj.length;i++) {
				if(lftDivObj[i].style.display == "none") {
						lftDivObj[i].style.display=""
				} else {
						lftDivObj[i].style.display="none"
					}
			}
		}catch(e){}	
	}
	function onOffIcons(val) {	}
	//For Show Preferences
	function showPref() {
	   try{
	   
	   // Start here  Online Poll,Watch Video,Audio Jungle integrated by Khan17072009  
	      DisableAllDivs();
	   // End here  Online Poll,Watch Video,Audio Jungle integrated by Khan17072009  
	   isOther=true;
	         HidBlurb();			
				 var response14 = AjaxUtilsMethods.CheckUserLoginStatus();
                var strLogin = response14.value;                     
               if(strLogin=="Valid")
               {
               	    var preUrl;
				    preUrl = VirtualPath + "/Profile.html";
				    DisplayProfile(preUrl);				  
               }
               else
               {
                document.getElementById('Profile').style.display ="none";  
                 if(confirm('You need to Register/Login to access this feature'))
	                    window.location.href  = LoginSPageURL;
	                    return false;               
               }			
		  }catch(e){}		
	}
	function DisplayRSS() {
			try{ 
		    document.getElementById('divPgSrc').style.cursor='auto';
	    	setDblclick=0;
			DisRtclickopt();
			url = "ShowRSSLinks.aspx?dayName=" + sCurrentPage;
			displayLoading();
			jsRemoteCall(url);
		}catch(e){}	
	}
	function register(str) {
	  try{
			if (chck == "False") {
				if (confirm(str)) window.location.href="Login.aspx";
			}
		 }catch(e){}	
	}
	function oPgAftLog(str,selPg,page,pId,artHigh) {
		if (chck == "False") {
			if (confirm(str)) window.location.href="Login.aspx?selPg=" + selPg + "&page=" + page + "&ed=" + pId + "&artHigh=" + artHigh;
		}
	}
	function mulOnLoad() {
	  try{	
			if(document.getElementById("pgFlash")) {
				var flsPath = document.getElementById("pgFlash").innerHTML;
				openFlash(flsPath);
			}
			if (chck != "False") {
				if(document.getElementById("pgAudio")) {
					var audPath = document.getElementById("pgAudio").innerHTML;
					playAudio(audPath);
				}
			}
		}catch(e){}	
	}
	//for Configurating Zoom
	function enablezoom()
		{ 
		   try{
				if(BrwsrName.substring(0,2) == "Ne") 
				{ 
				        if(zoomenable=="true")
			     				document.getElementById('divPgSrc').setAttribute("style","Z-INDEX: 1; LEFT: 0px; OVERFLOW: hidden; WIDTH: 596px; CURSOR: url(images/zoomin_icon.ico),auto; POSITION: relative; TOP: 0px; HEIGHT: 996px");		     
						else
								document.getElementById('divPgSrc').setAttribute("style","Z-INDEX: 1; LEFT: 0px; OVERFLOW: hidden; WIDTH: 596px; CURSOR:pointer; POSITION: relative; TOP: 0px; HEIGHT: 996px");		     			        
				}
  				else{
						if(zoomenable=="true")
							document.getElementById("divPgSrc").style.cursor = "images/zoomin_icon.ico";
						else
							document.getElementById("divPgSrc").style.cursor = "pointer";
				}
			}catch(e)
			{}
		}	
		      function setimgsrc(itcount){
		         try{
		                var BrwsrName=navigator.appName; 
		                var i;
                        if(document.getElementById("pgWThmb"+itcount)){
							for (i=1;i<=parseFloat(document.getElementById("pgWThmb"+(itcount)).getAttribute("pgcount"));i++){
								if(document.getElementById("pgWThmb"+itcount+i)){
										if (BrwsrName.substring(0,2) != "Ne"){   
											var tmp=document.getElementById('pgWThmb'+itcount+i);
											tmp.src=document.getElementById('pgWThmb'+itcount+i).actimgsrc;
										}
										else
										{
											document.getElementById("pgWThmb"+itcount+i).setAttribute("src",document.getElementById('pgWThmb'+itcount+i).getAttribute('actimgsrc'));
										}
								}
						    }
                       }
                   }catch(e){ }    
               }  

			   function setCropsState(){
		     try{
         		if (BrwsrName.substring(0,2) != "Ne"){
					document.getElementById("divPgSrc").style.cursor = "hand"; 
				}
		  	    if(ZoomStatus!=0){
					ZoomStatus=0;
					document.getElementById('divPgSrc').style.width=596;
					document.getElementById('myScrollContainer').style.display='block';
					document.getElementById("divZoom").style.display ="none";
					document.getElementById("divPgSrc").style.cursor ="hand" 
				}
			}catch(e){}	
	     }

		 //Display Search 
	function DisplaySearch() {
	    try
	    { 
		       /*   var response17 = AjaxUtilsMethods.CheckUserLoginStatus();
              var strLogin = response17.value;          
              if(strLogin =="InValid")
		      {
		         fired=true;
			    if(confirm('You need to Register/Login to access this feature'))
			    {
				   window.location.href=VirtualPath+"/login.htm";
				   return false;
			    }
                else
			    { 
			       return false;
			    }
		      }  */  
		      
		// Start here  Online Poll,Watch Video,Audio Jungle integrated by Khan17072009  
	      DisableAllDivs();
	   // End here  Online Poll,Watch Video,Audio Jungle integrated by Khan17072009  
		      
		     if(isLoginRequired)
              {
                  var response17 = AjaxUtilsMethods.CheckUserLoginStatus();
                  var strLogin = response17.value;        
                   if(strLogin =="InValid")
		            { 
		                 fired=true;
			            if(confirm('You need to Register/Login to access this feature'))
			            {
				            window.location.href=LoginPageURL;
				               return false;
			            }
			            else
			            {
			             return false;
			            }
		            }  
		        }
		     else
		        {
		             fired=true;
		        }
		      
			  /*  if (chck == "False") 
			    {
					window.location.href = "Login.aspx";
					return false;
			    }	*/
			        selType.style.display="block";
					topMenuInit();
					moveTopMenu(1);
					Ex3.handleClick();
					Ex2.handleClick();
					setCropsState();
					
		}catch(e){}			
	}

	//for showing the selected Pages
	function selPagesShow(obj) {
	  try{
			if (obj.value == 1) {
			
				document.getElementById("trSel").style.display="block";
				
			} else {
				document.getElementById("trSel").style.display="none";
				
			}
		}catch(e){}	
}
   //ravishankar march 09 th 2007 for crops view
 function cropsview(WebPath,res)
 {    try{
	        var preUrl;
	        preUrl="zoomhandler.ashx?p1= " + WebPath + "&p2=" + res+"&t="+Math.random();
	        jsRemoteCall2(preUrl);
	     }catch(e){}   
 }

 function checkSession() {
		if (document.getElementById('sVal').value == '1') {
			window.location.href="Login.aspx";
		}
	}


	//Ravi 16 th for Context Menu Disabling and enabling
      function setstylecontext()
      {
         try{
		    if(setDblclick==1){
					 document.getElementById('EmailAdv').disabled=true;
					document.getElementById('EmailAdv').style.cursor="none";
					document.getElementById('readOut').disabled=true;
					document.getElementById('readOut').style.cursor="none";
					document.getElementById('clip').disabled=true;
					document.getElementById('clip').style.cursor="none";
					document.getElementById('VUrl').disabled=true;
					document.getElementById('VUrl').style.cursor="none";}
			 else{
						document.getElementById('EmailAdv').disabled=false;
						document.getElementById('EmailAdv').style.cursor="hand";
						document.getElementById('readOut').disabled=false;
						document.getElementById('readOut').style.cursor="hand";
						document.getElementById('clip').disabled=false;
						document.getElementById('clip').style.cursor="hand";
						document.getElementById('VUrl').disabled=false;
						document.getElementById('VUrl').style.cursor="hand";
		       }
		   }catch(e){}    
     }
	function getcor(){
	   try{
			window.captureEvents(Event.CLICK);
			window.onclick = getMouseXY;
		    releaseWindowCapture();
		  }catch(e){}  
	}
	function getMouseXY(e){
	   try{
	        if(e.pageY<100)
	        gEveX=e.pageX;
			gEveY=e.pageY;
		  }catch(e){}	 
	}  
	function LoadImages() {
	  /* try{
			var WebPath=document.frm1.WPath1.value;  
			var v=new Array();
			var res;
			res = document.frm1.IHid.value;
			v = res.split("_");
			cropsview(WebPath,res)
		}catch(e){}	*/
	}  
		// for Displaying the loading icon 
		function displayLoading() {
		    try{
					var objLoad = document.getElementById("loading");
					objLoad.style.display="block";
					objLoad.style.visibility="visible";
					var x = (document.body.offsetWidth)/2 + document.body.scrollLeft;
					var y = (document.body.offsetHeight)/2 + document.body.scrollTop;
					objLoad.style.left=x-30;
					objLoad.style.top=y;
			  }catch(e){}
		}
		
	//for Checking the Article Height
	function checkArtHigh() {
	   try{
			if (g_artHigh != '') {
				if (window.ActiveXObject) glowArticle("article"+g_artHigh,'ie');
				else glowArticle("article"+g_artHigh,'ns');
				g_artHigh = '';
			}
		 }catch(e){}	
	}
	//For PageNavigation 
	function pgNavArtHigh(did,page,skin,article) {
	   try{
				g_artHigh = article;
				func2(did,page,skin);
		  }catch(e){}		
	}


	//for Updating the Selected Preferences
	function prefSelected(cnt,mnPg,supPg) {
	   try{
				var strPref="";
				var mnPgList="";
				var supPgList="";
				var preUrl;
				var i;
				i=0;
				for (i=0;i< cnt;i++) {
					if (eval("document.getElementById('frm1').radio"+i+"[0].checked")) {
						if (strPref == "") strPref = eval("document.getElementById('frm1').radio" + i + "[0].value");
						else strPref = strPref + "," + eval("document.getElementById('frm1').radio" + i + "[0].value");
					} 
    				else if (eval("document.getElementById('frm1').radio"+i+"[1].checked")) { 
							if (strPref == "") strPref = eval("document.getElementById('frm1').radio" + i + "[1].value");
							else strPref = strPref + "," + eval("document.getElementById('frm1').radio" + i + "[1].value");
					}
					else if (eval("document.getElementById('frm1').radio"+i+"[2].checked")) { 
							if (strPref == "") strPref = eval("document.getElementById('frm1').radio" + i + "[2].value");
							else strPref = strPref + "," + eval("document.getElementById('frm1').radio" + i + "[2].value");
					}
					else if (eval("document.getElementById('frm1').radio"+i+"[3].checked")) { 
							if (strPref == "") strPref = eval("document.getElementById('frm1').radio" + i + "[3].value");
							else strPref = strPref + "," + eval("document.getElementById('frm1').radio" + i + "[3].value");
					}
					else {
							if (strPref == "") strPref = eval("document.getElementById('frm1').radio" + i + "[4].value");
							else strPref = strPref + "," + eval("document.getElementById('frm1').radio" + i + "[4].value");
					}
				}
				for(i=0;i<mnPg;i++) {
						if(eval("document.getElementById('frm1').radio1[1].checked")) 
						{
								if(eval("document.getElementById('frm1').chckMain"+parseInt(i+1)+".checked")) {
										if (mnPgList == "") mnPgList = eval("document.getElementById('frm1').chckMain"+parseInt(i+1)+".value");
										else mnPgList = mnPgList + "," + eval("document.getElementById('frm1').chckMain"+parseInt(i+1)+".value");
				    			}
						}
				}
				//code to give an alert if no category is selected
				if(eval("document.getElementById('frm1').radio1[1].checked")) {
					if(mnPgList==""){alert('Please select a category');return;}
				}
				for(i=0;i<supPg;i++) {
	   				if(eval("document.getElementById('frm1').radio1[1].checked")) 
					{
							if(eval("document.getElementById('frm1').chckSupp"+parseInt(i+1)+".checked")) {
									if (supPgList == "") supPgList = eval("document.getElementById('frm1').chckSupp"+parseInt(i+1)+".value");
									else supPgList = supPgList + "," + eval("document.getElementById('frm1').chckSupp"+parseInt(i+1)+".value");
						}
					}
				}
				preUrl = "Preferences.aspx?prf=" + strPref + "&main=" + mnPgList + "&t=" + Math.random();
				displayLoading();
				jsRemoteCall(preUrl);
				onOffIcons(3);
		}catch(e){}		
	}
	//for Archives
	function cmgsoonalert()
	{
		alert("coming soon.");
	}
		//for Changing the Publication 
	function ChangePub() {
	   try{
				if (document.frm1.selPub.selectedIndex != 0) {
					document.frm1.method = "post";
					document.frm1.action = "ChangePub.aspx"
					document.frm1.submit();
				}
		  }catch(e){}	
	}

	function more_click()
	{
	   try{
	         moveTopMenu(0);
			if (BrwsrName.substring(0,2) == "Ne")
			{ 
		           myowndiv.innerHTML=divMenu0.innerHTML ;
                   if(myowndiv.style.visibility=="visible")
					{
		                myowndiv.style.visibility="hidden";
				        //code FOR MAC OS
						  document.getElementById("More_Div").style.overflow="hidden";
		                //CODE FOR MAC OS
					       document.getElementById("iLatMore").src = "images/more_btn.gif";
					
					}
					else
					{
			             myowndiv.style.visibility="visible";
					  //code FOR MAC OS
					
			             document.getElementById("More_Div").style.overflow="auto"; 
						  //code FOR MAC OS
			            document.getElementById("iLatMore").src = "images/close_btn.gif";
					} 
		   }
           else if (BrwsrName.substring(0,2) == "Mi"){
			       moveTopMenu(0);
		   } 
		}catch(e){}      
    }
	
	function AddClippings(){
	   try{

	    var response15 = AjaxUtilsMethods.CheckUserLoginStatus();
        var strLogin = response15.value;  
		if(strLogin =="Valid")
        {
        strPublicationID=strmyEdition_Id();
  
         var ArticleName =document.getElementById(currentArticle).getAttribute("ArticleName");
      var indDTArr_URL=document.getElementById("pageSourceImage").src.split("/");
	    var directAd1;
	    
	    directAd1=indDTArr_URL[9] +"_" + indDTArr_URL[8] +"_" + indDTArr_URL[7] + "_"+ArticleName
	                var GetResponse = AjaxUtilsMethods.ArticleClippingInsertD(strPublicationID,gMode,gTtitle,directAd1);
                var  Result = GetResponse.value; 
               
                if(Result == "50001")
                {
		            alert("Inserted Successfully");
		            window.open(VirtualPath+"/ViewClippings.htm","Clippings","width=470,height=325,toolbar=no,menubar=no,address=no,scrollbars=yes,resizable=yes");
                }
                else
                {
                    if(Result == "50005")
                    {
		                alert("This article is already clipped.");
		                window.open(VirtualPath+"/ViewClippings.htm","Clippings","width=470,height=325,toolbar=no,menubar=no,address=no,scrollbars=yes,resizable=yes");
                    }
                    else
                    {
		                alert("Problem occurred. Please try after some time.")
                    }
                }
         
         

        } 
		else if(strLogin =="InValid")
		{
			if(confirm('You need to Register/Login to access this feature'))
			{
				window.location.href=LoginPageURL;
				 return false;
			}
			else
			{
		 
			 return false;
			}
		} 
       
		}catch(e){}			
	}

	function chgpswd()
	{
		window.open(VirtualPath+"/manageprofile.shtml","myRSSWin","left=0,top=0,width=580,height=840,toolbar=no,menubar=no,status=no,address=no,scrollbars=no,resizable=no,titlebar=no")
	}
	
	

	
	
//	function UpdateAricleView()
//    {

// 
//          var strDAV='0',strDPV='0',strDTS='0';
//          // Customizing Default Page view integrated by Khan on 25/06/2009
//            
//          var CheckDPgView=0;
//          for(var i=1;i<=TotalContentPages[0];i++)
//             {
//                if(document.getElementById("chk"+i).checked==true)
//                {
//                  // alert(document.getElementById("chk"+i).value);
//                  strDPV=strDPV+document.getElementById("chk"+i).value+",";
//                  CheckDPgView=1;
//                }
//             }
//             if(CheckDPgView==1)
//             {
//              strDPV=strDPV+"|";
//             }
//             else if(CheckDPgView==0)
//             {
//               strDPV="0";
//             }
//             strDPV=strDPV.replace(",|","");
//          
//          // End here
//          
//         if(document.getElementById('DAVradio0').checked==true)
//         {
//            strDAV="0";
//         }
//         else
//         {
//            strDAV="1";
//         }      

//         var ResponseData = AjaxUtilsMethods.UpdateUserPreferences( strDAV ,strDPV,0,'' )//,strDPV ,strDTS,cat );
//        if(ResponseData.value=="success")
//        {
//            alert("updated successfully");  
//            DAV=strDAV;   
//            LoadMe(0,ImageArray[0]);     
//        }
//}

function UpdateAricleView()
    {
          
        
        //Earlier Khan considered strDPV for selected pages concept this column is changed to show thumbnail / first page (modified for HT)
        //Please change while doing selected pages concept for V4 -- 22mar 2010 
          
          // Customizing Default Page view integrated by Khan on 25/06/2009
          var strDAV='0',strDPV='0',strDTS='0',strSelectedPages='0';
          var flag=0;
          
           if(document.getElementById('DPVThumb').checked==true)//page view
                 {
                    strDPV="0";                   
                 }
                 else
                 {
                    strDPV="1";
                 }    
                 
           if(document.getElementById('DAVradio0').checked==true)//article view
                 {
                    strDAV="0";
                    flag=1;
                 }
                 else
                 {
                    strDAV="1";
                 }    
                 


    //skiping khans code                 
     if(AjaxUtilsMethods.GetPropertyConfigSettings('82').value == "0")   
     {
      var ResponseData = AjaxUtilsMethods.UpdateUserPreferences(strDAV ,strDPV,strDTS,strSelectedPages,"");
       DAV=strDAV; 
      alert("updated successfully");
     }   
     
     else
        {         
          //nakka 14july2009//
          var GetTopStoriescount=AjaxUtilsMethods.GetSelectedTopStoriesCount();
           for(var i=0;i<=GetTopStoriescount.value-1;i++)
                  {
                       
                        var rdId= "Rd"+i;
                        if(document.getElementById(rdId).checked)
                            {
                              strDTS=document.getElementById(rdId).value;
                            }
                 }
          //nakka 14july2009//
          
          
          
          
          if(GetConfigDPV != "C")
          {
            // Page wise updation  
               var CheckDPgView=0;
              for(var i=1;i<=TotalContentPages[0];i++)
                 {
                    if(document.getElementById("chk"+i).checked==true)
                    {
                      strSelectedPages=strSelectedPages+document.getElementById("chk"+i).value+",";
                      CheckDPgView=1;
                      flag=1;
                    }
                 }
                 if(CheckDPgView==1)
                 {
                   strSelectedPages=strSelectedPages+"|";
                   strSelectedPages=strSelectedPages.replace(",|","");
                   strDPV="1";
                 }
                 else if(CheckDPgView==0)
                 {
                   strDPV="0";
                   strSelectedPages="0";
                 }
              
              // End here
                                   
                    var ResponseData = AjaxUtilsMethods.UpdateUserPreferences( strDAV ,strDPV,strDTS,strSelectedPages,"")//,strDPV ,strDTS,cat );
                    if(ResponseData.value=="success")
                    {
                        alert("updated successfully");  
                        DAV=strDAV;   
                        LoadMe(0,ImageArray[0]);   
                          refresh();  
                         
                    }

            
          }
          else
          {
                 // categeroy wise updation START
                 var catids="";
                 if(document.getElementById('Radio_DisplayAllPgs').checked==true)
                 {
                    strDPV="0";
                    flag=1;
                 }
                 else
                 {
                    // check for sub categerioes 
                    // Check whether the subpages are checked or not            
                        strDPV="1";                    
                        var divs;
                        divs=document.getElementsByTagName('input');        
                        var i=0;  
                        var j=0; 
                        for(i=0;i< divs.length;i++)
                        {
                            if ('checkbox' == divs[i].type.toLowerCase())
                            {
                                if(divs[i].checked==true)
                                { 
                                   // alert(divs[i].value+','+strDPV);
                                   flag=1;
                                   catids += divs[i].value + ',';
                                   
                                }
                            }
                        }
                    }
                    if(catids != "0" && flag !="0")
                    {
                        catids=catids.substring(0,catids.lastIndexOf(','));
                        // get all the page ids from the dayindex.xml file for that issue
                        //strDPV
                        var cur_EditionPath=strCurEditionPath();
                        var cur_EditionUrlPath=strCurURLDatePath();
                        strSelectedPages=AjaxUtilsMethods.GetSelectedCategories(cur_EditionPath,cur_EditionUrlPath,catids).value;
                       if(strSelectedPages=="")
                       {
                             catids="0";
                             strDPV="0";
                             strSelectedPages="0";
                        }
                        var ResponseData = AjaxUtilsMethods.UpdateUserPreferences( strDAV ,strDPV,strDTS ,strSelectedPages,catids)//,strDPV ,strDTS,cat );
                        if(ResponseData.value=="success")
                        {
                            alert("updated successfully");  
                            DAV=strDAV;   
                            LoadMe(0,ImageArray[0]);     
                              refresh();  
                        }

                    }  
                    else
                    {
                        alert('Select categeroy from the list.');
                    }
                    // categeroy wise updation END
          } 
          
   }//skiping khans code       
          
}


function AddArticleView()
{



        /***irrespective of data in userpref1 textview radio btn should be disable*****************/
        if(TextVer=="0")
         {            
             document.getElementById('DAVradio0').disabled="disabled";
              document.getElementById('DAVradio1').checked=true;
         }
        /***irrespective of data in userpref1 textview radio btn should be disable*****************/
        
        
     var PreferenceData = AjaxUtilsMethods.GetUserPreferences();
     
     if(PreferenceData.value!="Fail")
     {
        var pref= PreferenceData.value;   
         var strpref=pref.split(",");
         if(TextVer=="0")
         {
            strpref[0]="1";
             document.getElementById('DAVradio0').disabled="disabled";
         }
         if(strpref[0]=="0")//for articles
         {
            document.getElementById('DAVradio0').checked=true; 
         }
         else
         {
            document.getElementById('DAVradio1').checked=true; 
         }
         
      }
      
      if (arrPropConfig[93] == "HT")
      {
        document.getElementById("trLogView1").style.display="block";  
        document.getElementById("trLogView2").style.display="block";  
      }
      
      
         if(strpref[1]=="0")//for articles
         {
            document.getElementById('DPVThumb').checked=true; 
         }
         else
         {
            document.getElementById('DPVFullPage').checked=true; 
         }
      
      
      
      //skipping selected pages concept 
       if(AjaxUtilsMethods.GetPropertyConfigSettings('82').value != "0")   
     {
          document.getElementById('trDefaultPV').style.display="block";  
          document.getElementById('trDefaultPVrdbtn').style.display="block";   
          
          
      
      
          //srinivas topstories
          var GetTopStories=AjaxUtilsMethods.GetSelectedTopStoriesDymanical();
         
        
         if(GetTopStories.value !="Failed")
         {
            document.getElementById('div_Topstories').innerHTML= GetTopStories.value;
         }
         else
         {
            document.getElementById('div_Topstories').innerHTML= "";
         }
          

                  var GetTopStoriescount=AjaxUtilsMethods.GetSelectedTopStoriesCount();
                
                  
                  if (strpref[2] == "0")
                  {
                    document.getElementById("Rd"+GetTopStoriescount.value).checked=true;
                  }
                  else
                  {                 
                      for(var i=0;i<=GetTopStoriescount.value-1;i++)
                      {
                    
                            if(document.getElementById("Rd"+i).value==strpref[2])
                                {
                                   document.getElementById("Rd"+i).checked=true;
                                }
                     }
                 }   
        
         //end  of topstories
         
         
         
         // Integrated Khan by on 25/06/2009
		          UserDefaultPageViews();
		       // End here.
         
         
         
    }//skiping selected pages and topstories
}


// Users DefaultPageViews integrated by Khan on 07/06/2009
function UserDefaultPageViews()
{


    if(GetConfigDPV!="C")
    {
         var PreferenceData = GetUsrPrefDetails;
         if(PreferenceData!="Fail")
         {
             var Userpref= PreferenceData;    
             var strUserpreferences=Userpref.split("_");
             if(strUserpreferences[1]!="0")
             {
                var GetContentData = AjaxUtilsMethods.getContentPagesList().value;
                TotalContentPages=GetContentData.split("||");
                document.getElementById("div_SelectedPagesList").innerHTML=TotalContentPages[1];
                document.getElementById("div_SelectedPagesList").style.display="block";
                document.getElementById('Radio_DisplaySelectedPgs').checked=true;
                var CheckContentPages=strUserpreferences[1].split(",");
                 for(var i=0;i<=CheckContentPages.length-1;i++)
                 {
                 
                  if(document.getElementById("chk"+CheckContentPages[i])!=null)
                  {
                   document.getElementById("chk"+CheckContentPages[i]).checked=true;
                  }
                  else
                  {
                    var oP = document.getElementsByTagName('input');
                    for(var j=0;j<oP.length;j++)
                    {
                        if(oP[j].value==CheckContentPages[i])
                        {
                           document.getElementById(oP[j].id).checked=true;
                        }
                    }
                  }
                }
             }
             else
             {
                document.getElementById('Radio_DisplayAllPgs').checked=true;
                document.getElementById("div_SelectedPagesList").style.display="none";
             }
             
         }
    }
    else
    {
         // Category wise displaying 
         var Groups= AjaxUtilsMethods.GetUserPageAccessStatus('P');
         var subgroups=Groups.value.split(",");
         if(subgroups[0]=="0") 
         {
              document.getElementById('Radio_DisplayAllPgs').checked=true; 
              document.getElementById("div_SelectedPagesList").style.display="none";
         }
         else
         {
         
               
                var content= AjaxUtilsMethods.GetSelectedPagesCategories().value;
                if(content != "Failed" )
                { 
                document.getElementById("div_SelectedPagesList").style.display="block";
                document.getElementById("div_SelectedPagesList").innerHTML=content;
                }
              document.getElementById('Radio_DisplaySelectedPgs').checked=true; 
              document.getElementById("div_SelectedPagesList").style.display="block";
              // Check whether the subpages are checked or not            
                var divs;
                divs=document.getElementsByTagName('input');        
                var i=0;  
                var j=0;       
                for(i=0;i< divs.length;i++)
                {
                    if ('checkbox' == divs[i].type.toLowerCase())
                    {
                        for(j=0;j<subgroups.length;j++)
                        {
                            if(j != "0")
                            {
                                if(divs[i].value == subgroups[j])
                                { 
                                    divs[i].checked=true; 
                                }
                            }
                        }
                    }
                }
         } 
    }
  
}
// End here Default Pages view

// Default Pages view Integrated by khan 25/06/2009
var TotalContentPages=0;
function DefaultPgView(PageNumber)
{
   if(PageNumber=="1")
    {
 
      if(GetConfigDPV!="C")
      {
           var Check_PagesList=  document.getElementById("div_SelectedPagesList").innerHTML;
           document.getElementById("div_SelectedPagesList").style.display="none";
           for(var i=1;i<=TotalContentPages[0];i++)
             {
                document.getElementById("chk"+i).checked=false;
             }
      }
      else
      {
            // Displaying in categeroy wise
            document.getElementById("div_SelectedPagesList").style.display="none";
      }
    }
    else
    {
     if(GetConfigDPV!="C")
      {
        var GetContentData = AjaxUtilsMethods.getContentPagesList().value;
        TotalContentPages=GetContentData.split("||");
        document.getElementById("div_SelectedPagesList").innerHTML=TotalContentPages[1];
        document.getElementById("div_SelectedPagesList").style.display="block";
      }
      else
      {
            // Displaying in categeroy wise
            
            var content= AjaxUtilsMethods.GetSelectedPagesCategories().value;
             if(content != "Failed")
                {
            document.getElementById("div_SelectedPagesList").style.display="block";
            document.getElementById("div_SelectedPagesList").innerHTML=content;
                }

                  var Groups= AjaxUtilsMethods.GetUserPageAccessStatus('P');
                  var subgroups=Groups.value.split(",");
               // Check whether the subpages are checked or not            
                var divs;
                divs=document.getElementsByTagName('input');        
                var i=0;  
                var j=0;       
                for(i=0;i< divs.length;i++)
                {
                    if ('checkbox' == divs[i].type.toLowerCase())
                    {
                        for(j=0;j<subgroups.length;j++)
                        {
                            if(j != "0")
                            {
                                if(divs[i].value == subgroups[j])
                                { 
                                    divs[i].checked=true; 
                                }
                            }


                        }
                    }
                }
            
            // End here Check whether the subpages are checked or not    
      }
    }
}


// Online Poll,Watch Video,Audio Jungle integrated by Khan17072009
//start of video displaying
function displayAllLoading()
{
    var objLoad = document.getElementById("loading1");
    objLoad.style.display="none";
    objLoad.style.visibility="hidden";
    var objLoad1 = document.getElementById("loadingPoll");
	objLoad1.style.display="none";
	objLoad1.style.visibility="hidden";
	var objLoad1 = document.getElementById("divLoadingProfile");
	objLoad1.style.display="none";
	objLoad1.style.visibility="hidden";
    var objLoad1 = document.getElementById("div_Video");
    objLoad1.style.display="none";
    objLoad1.style.visibility="hidden";
    document.getElementById("td_Video").innerHTML="";
}

function displayLoading1(a,b) {
		    try{
					var objLoad = document.getElementById("loading1");
					objLoad.innerHTML=objLoad.innerHTML;
					objLoad.style.display="block";
					objLoad.style.visibility="visible";
					var x = a;
					var y = b;
					objLoad.style.left=(31+parseInt(x,10))+"px" ;//-350;31
					objLoad.style.top=(126+parseInt(y,10))+"px";//-250;126

                    document.getElementById("td_Video").innerHTML="";

				
			  }catch(e){}
		}
      function displayLoading2(a,b) {
		    try{
					var objLoad = document.getElementById("loading1");
					objLoad.style.display="none";
					objLoad.style.visibility="hidden";
					var x = a;
					var y = b;
					objLoad.style.left=x-350;
					objLoad.style.top=y-250;
			  }catch(e){}
		}
		
		
		
// Polling Starts here 
function displayPollLoading1(a,b) {
		    try{
					var objLoad = document.getElementById("loadingPoll");
					objLoad.innerHTML=objLoad.innerHTML;
					objLoad.style.display="block";
					objLoad.style.visibility="visible";
					var x = a;
					var y = b;
					objLoad.style.left=(31+parseInt(x,10))+"px" ;//-350;31
					objLoad.style.top=(126+parseInt(y,10))+"px";//-250;126
					
                    document.getElementById("td_Video").innerHTML="";

				
					
			  }catch(e){}
		}
function displayPollLoading2(a,b) {
		    try{
					var objLoad = document.getElementById("loadingPoll");
					objLoad.style.display="none";
					objLoad.style.visibility="hidden";
					var x = a;
					var y = b;
					objLoad.style.left=x-350;
					objLoad.style.top=y-250;
			  }catch(e){}
		}
		
		function displayPollsList()
		{
            var objPollLoad = document.getElementById("divPollList");
			objPollLoad.innerHTML=objPollLoad.innerHTML;
			objPollLoad.style.display="block";
			objPollLoad.style.visibility="visible";
	        objPollLoad.style.left=(90)+"px" ;//-350;31
			objPollLoad.style.top=(226)+"px";//-250;126
		
		}
		
		function displayDivProfile()
		{
	
		            var objProfLoad = document.getElementById("div_ProfileDetails");
					objProfLoad.innerHTML=objProfLoad.innerHTML;
					objProfLoad.style.display="block";
					objProfLoad.style.visibility="visible";
			        objProfLoad.style.left=(131)+"px" ;//-350;31
					objProfLoad.style.top=(226)+"px";//-250;126
		
		}
		
		function displayProfileLoading1(a,b) {
		    try{

					var objLoad = document.getElementById("divLoadingProfile");
					objLoad.innerHTML=objLoad.innerHTML;
					objLoad.style.display="block";
					objLoad.style.visibility="visible";
					var x = a;
					var y = b;
					objLoad.style.left=(31+parseInt(x,10))+"px" ;//-350;31
					objLoad.style.top=(126+parseInt(y,10))+"px";//-250;126
			
			        
                    document.getElementById("td_Video").innerHTML="";
					
					
					
			  }catch(e){}
		}
function displayProfileLoading2(a,b) {
		    try{
					var objLoad = document.getElementById("divLoadingProfile");
					objLoad.style.display="none";
					objLoad.style.visibility="hidden";
					var x = a;
					var y = b;
					objLoad.style.left=x-350;
					objLoad.style.top=y-250;
			  }catch(e){}
		}


		function DisableAllDivs()
		{
		   
            var objLoadDisabled = document.getElementById("div_ProfileDetails");
            objLoadDisabled.style.display="none";
            objLoadDisabled.style.visibility="hidden";
            
            var objLoadDisabledPollList = document.getElementById("divPollList");
            objLoadDisabledPollList.style.display="none";
            objLoadDisabledPollList.style.visibility="hidden";
            
			var objLoadDisabledPoll = document.getElementById("loadingPoll");
			objLoadDisabledPoll.style.display="none";
			objLoadDisabledPoll.style.visibility="hidden";
			
			var objLoaddivLoadingProfile = document.getElementById("divLoadingProfile");
			objLoaddivLoadingProfile.style.display="none";
			objLoaddivLoadingProfile.style.visibility="hidden";
			
            var objLoad_loading1 = document.getElementById("loading1");
            objLoad_loading1.style.display="none";
            objLoad_loading1.style.visibility="hidden";

            var objLoad1 = document.getElementById("div_Video");
            objLoad1.style.display="none";
            objLoad1.style.visibility="hidden";
            document.getElementById("td_Video").innerHTML="";
            document.getElementById("soundeffect").src="";
            
            var objDisableSeoshinAds = document.getElementById("div_SeoshinAds");
            objDisableSeoshinAds.innerHTML="";
            objDisableSeoshinAds.style.display="none";
            objDisableSeoshinAds.style.visibility="hidden";
            
            document.getElementById("div_AudioPlayOthers").innerHTML="";
            document.getElementById("div_AudioPlayOthers").style.display="none";

     }
		
		
	// End here Online Poll,Watch Video,Audio Jungle integrated by Khan17072009 
	
	

function RegisterArchives(r) 
{
 window.location.href= VirtualPath + '/registerarchives.aspx?r=' + r;
} 


function DisplayArchives()
{
    if(AjaxUtilsMethods.getSession("UserEmail").value!="expired")
    {
            var isArchiveUser = AjaxUtilsMethods.GetArchivesRegDetails().value;
            if (isArchiveUser !="")
            {
              IsArchiveExpireOrNot();//  LoadPageCommmon( VirtualPath + '/Archives.htm');  
            }
            else
            {
                LoadPageCommmon( VirtualPath + '/ArchivesMessage.htm');
            }
    }
    else
    {
        window.location.href=LoginPageURL;
    }
}


function IsArchiveExpireOrNot()
	{
	   var transStatus = AjaxUtilsMethods.GetTransactionStatus(AjaxUtilsMethods.getSession("UserEmail").value);
       //var regactivestatus=AjaxUtilsMethods.getRegactivestatus(AjaxUtilsMethods.getSession("UserEmail").value).value;
    	
				if(transStatus.value=="0")
				{
					  var expirydatevalues=AjaxUtilsMethods.GetExpiryDate(AjaxUtilsMethods.getSession("UserEmail").value);
					  if(expirydatevalues.value!="")
					  {
						          var Expirydate=expirydatevalues.value;
						          var curDate=AjaxUtilsMethods.CurrentDate().value;
        		
						          curDate=new Date(curDate);
						          Expirydate=new Date(Expirydate);
						          if(Expirydate>=curDate)
						          {							       
							         LoadPageCommmon( VirtualPath + '/Archives.htm');//window.location.href="default.aspx";	
						          }
						          else
						          {
							        AjaxUtilsMethods.UpdateSubcriptionArchives(AjaxUtilsMethods.getSession("UserEmail").value,'E');
							        RegisterArchives('2');//window.location.href="Renewal.shtml";
						          }
			
					  }
					  else
					  {
					       AjaxUtilsMethods.UpdateSubcriptionArchives(AjaxUtilsMethods.getSession("UserEmail").value,'E');
						   RegisterArchives('2');//window.location.href = "Renewal.shtml";
						   return false;
					  }
				}
				else
				{
				   AjaxUtilsMethods.UpdateSubcriptionArchives(AjaxUtilsMethods.getSession("UserEmail").value,'P');
				   RegisterArchives('2');//window.location.href = "Renewal.shtml";
				   return false;
				}
			
	}  








function LoadPageCommmon(Turl)
{		
    try 
	{		
        if (xmlHTTPConn)
		{	
			TargetUrl=Turl;
			xmlHTTPConn.open("get",TargetUrl,true);
			displayLoading(); 
			xmlHTTPConn.onreadystatechange = setLoadPageCommon;				
			xmlHTTPConn.send(null);
		}
		else 
		{ 
			alert("oops! Please refresh the page and try again.");
		}
	}
	catch(e) {}
}
function setLoadPageCommon()
{    
    try
	{
        if (xmlHTTPConn.readyState == 4)
         {
		    if (xmlHTTPConn.status == 200)
		    {   
                  //showing edition specific archive date by replacing ArchivesAvaliabilityDate
		    document.getElementById("divPgSrc").innerHTML = xmlHTTPConn.responseText.replace("ArchivesAvaliabilityDate", arrPropConfig[115]);
                        	
            document.getElementById("loading").style.display="none";
            hidetdExtraPage();	           	       
            document.getElementById("divPgSrc").style.width=strPageWidth;//added to hide hide second page
            HidBlurb();
		    }
		    else
		    {
		        document.getElementById("loading").style.display="none";
		    }
	      }
	}
	catch(e){}
}


function VisitPage()
	{
	
        if (document.getElementById("txtArchDate").value == '')
        {
            alert('Please select date.');
            document.getElementById("txtArchDate").focus();
            return(false);
        }
        else
        {
        
            var ArchDate=document.getElementById("txtArchDate").value;
            ArchDate = ArchDate.split('/');
            var ArchSelectedDate = ArchDate[2]+"/"+ArchDate[1]+"/"+ArchDate[0];
            var ArchDateInIntFormat = ArchDate[2]+ArchDate[1]+ArchDate[0];
            
            var ArchDateInDIDFormat = ArchDate[0]+"_"+ArchDate[1]+"_"+ArchDate[2];

           //  var ArchHandShakingDate = ArchDate[1] + "_" + ArchDate[0] + "_" + ArchDate[2];//26may2011
           
            
            var IsArchExists = AjaxUtilsMethods.CheckDateInArchive(ArchDateInDIDFormat).value;

         
            if (IsArchExists == "true")
            {             
                        if(ArchDateInIntFormat>arrPropConfig[94])
                        {
                        window.location.href=VirtualPath+"/"+currProfile+"/"+ArchSelectedDate+"/INDEX.SHTML";
                        }
                        else
                        {
                         //http://anax8a.pressmart.com/HTArchives/redirectarchives.aspx?userid=prudhvi@lycos.com&editionType=47&hascode=083196fa1bbf671a4c14fc38d990fb1e&date=09_11_2009
                         var strUserId = AjaxUtilsMethods.getSession("UserEmail").value;
	                     var strPassword = AjaxUtilsMethods.GetPassword(strUserId).value;
	                     var hashcode = AjaxUtilsMethods.getSession("UserEmail").value+','+strPassword;
	                     hashcode = AjaxUtilsMethods.GetMD5pay(hashcode).value;

	//var postArDate = ArchHandShakingDate; //26may2011 //ReplaceAllWith(document.getElementById("txtArchDate").value,"/","_");             
	                     var postArDate = ReplaceAllWith(document.getElementById("txtArchDate").value,"/","_");             
                         window.location.href= arrPropConfig[106] + "?userid=" + strUserId +"&editionType="+strPublicationID+"&hascode="+hashcode+"&date="+postArDate;
                        // alert("http://anax8a.pressmart.com/HTArchives/redirectarchives.aspx" + "?userid=" + strUserId +"&editionType="+strPublicationID+"&hascode="+hashcode+"&date="+postArDate);         
                        }
            }          

	else
            { 
            alert("Sorry, data is not there for the selected date.")
            
            }

  
        }
	}
	
	
