﻿
function showdiv()
{
    if(document.getElementById('ctl00_ContentPlaceHolder1_HTPhotoStoryControl_imgNext')!=null)
    {
    document.getElementById('ctl00_ContentPlaceHolder1_HTPhotoStoryControl_imgNext').style.display = "block";
    }
    document.getElementById('ctl00_ContentPlaceHolder1_HTPhotoStoryControl_imgPrev').style.display = "block";
}
function hidediv()
{
    if(document.getElementById('ctl00_ContentPlaceHolder1_HTPhotoStoryControl_imgNext')!=null)
    {
    document.getElementById('ctl00_ContentPlaceHolder1_HTPhotoStoryControl_imgNext').style.display = "none";
    }
    document.getElementById('ctl00_ContentPlaceHolder1_HTPhotoStoryControl_imgPrev').style.display = "none";
} 

function displayLargePhoto(current_photo) 
{
    
    var leftPos=0;
	var topPos=0;
	if(screen)
	{
	leftPos=(screen.width-1100)/2;
	
	topPos=(screen.height-950)/2;
	}
    var settings = 'toolbar=no,location=no,directories=no,no,menubar=no,copyhistory=yes,top=' + topPos +',left=' + leftPos +',scrollbars=yes,resizable=no,width=1100,height=850;titlebar=no,status=no';
    nw = window.open(current_photo,'photo',settings);    
    nw.document.write("<html><head><title>Wallpaper- Hindustantimes.com</title></head>");
    nw.document.write("<ol style=\"color:gray;font-size:smaller;\"><span style=\"color:black;font-size:small;margin-left:-22px;\" >To download on your computer :</span>");
    nw.document.write("<li>Right click on the image.</li>");
    nw.document.write("<li>Select the Save As... option from the pull down menu that appears. </li>");
    nw.document.write("<li>Choose the destination file where you want to save the image. </li>");
    nw.document.write("<li>Click Save and the image will begin to download to the chosen location. </li>");
    nw.document.write("<li>Right click on the saved image and select 'Set as background' to put it on your desktop.</li>");
    nw.document.write("</ol>");
    nw.document.write("<img src=\""+current_photo+"\"></img>");
    
    
 nw.document.write("<script type=\"text/javascript\">"); 
 nw.document.write("var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");");
 nw.document.write("document.write(unescape(\"%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));");
 nw.document.write("</script>");
 nw.document.write("<script type=\"text/javascript\">");
 nw.document.write("try {");
 nw.document.write("var htTracker = _gat._getTracker(\"UA-1431719-1\");");
 nw.document.write("htTracker._setDomainName(\"hindustantimes.com\");");
 nw.document.write("htTracker._trackPageview();} catch(err) {}</script>");
 
 nw.document.write("</html>");
    
}

// WC 2011
function showhidediv(id1,id2,id3){document.getElementById(id1).style.display = "block";document.getElementById(id2).style.display = "none";document.getElementById(id3).style.display = "none";}
// end
function ShowDiv(id){document.getElementById(id).style.display = "block"; document.getElementById("hid").style.display = "block"; document.getElementById("shw").style.display = "none";}
function HideDiv(id){document.getElementById(id).style.display = "none"; document.getElementById("hid").style.display = "none"; document.getElementById("shw").style.display = "block";}

// Jump Menu JS//
	
	<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
//Homepage 
function ShowTab(name,id,total,tab)
{
    for(var i=1;i<=total;i++)
    {
    var ElementId=(tab+i);
    var tag=name+"_"+i;
    if(i==id)
    {
    document.getElementById(ElementId).className='active';
    document.getElementById(tag).style.display='block';
    }
    else
    {
     document.getElementById(ElementId).className='inactive';
     document.getElementById(tag).style.display='none';
    }
    }
    
}
//For photogalley page
var galscrollAmount =0;
var galContentSlides="";
var galCurrentSlide=9;
var galTotalSlide=0;
function nextSlide()
{	
    galCurrentSlide++;
    galContentSlides = $(".photodiv");  
    galTotalSlide= (galContentSlides.length+1);
   
    if(galCurrentSlide>galTotalSlide)
	{
	galscrollAmount=0;
	$(".recvslidbrdrbotphotogallery").animate({scrollLeft: galscrollAmount}, 1000);	
	galCurrentSlide=9;	
	}
	else
	{
	galscrollAmount += 64;
	$(".recvslidbrdrbotphotogallery").animate({scrollLeft: galscrollAmount}, 1000);		
	
	}
	

}
function prevSlide()
{		
	galscrollAmount -= 64;
	$(".recvslidbrdrbotphotogallery").animate({scrollLeft: galscrollAmount}, 1000);
		
}
//end
