﻿
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("<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>");
 
    
}

// 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";}

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";}
// end

// Slider JS//
function CSlider(c,t,n,w){
		this.c = document.getElementById(c);
		if(t!="ud")t="lr";
		this.s = w;
		this.p = (t=="lr") ? "left" : "top";
		this.l = false;		
		this.cs=1;this.np = 0;this.n = n;this.tmpn=n;this.intrvl=null;
		
		this.startSlide=function(d,o,n){				
			if(this.l){return;}
			var tmpval=0;
			if(n<this.cs){
				tmpval = this.cs-n;d='r';
			}else if(this.cs<n){
				tmpval = n-this.cs;
			}
			this.n=this.tmpn*(tmpval);
			this.cs=n;
			this.l=true;			
			this.intrvl=setInterval(""+o+".move('"+d+"','"+o+"')",5);			
			this.np = this.getNP(d);
		};
		this.move=function(d,o){
			if(this.getMv(d)){
				eval("this.c.style."+this.p+"=this.np+'px'");
				clearInterval(this.intrvl);
				this.l=false;								
			}else{
				eval("this.c.style."+this.p+"=this.getNCP(d)+'px'");
			}
		};		
		this.getNP=function(d){
			var o=(d=='l')?"-":"+";
			return eval("this.getCP()"+ o +"(this.s*this.n)");			
		};
		this.getCP=function(d){
			return eval("parseInt(this.c.style."+this.p+".substring(0,this.c.style."+this.p+".length-2))");
		};
		this.getMv=function(d){
			if(d=='l' && (this.getCP(d)<= this.np))return true;
			else if(d=='r' && (this.getCP(d)>= this.np))return true;
			else return false;
		};
		this.getNCP=function(d){
			if(d=='l')return this.getCP(d)-Math.ceil((this.getCP(d)-this.np)/3);
			else return this.getCP(d)+Math.ceil((this.np-this.getCP(d))/3);
		};		
	};
	function nextSlide(obj,objid,y){		
		if(obj.cs==y){
			obj.startSlide('r',objid,1);
		}else{
			obj.startSlide('l',objid,(obj.cs+1));
		}
	}
	function prevSlide(obj,objid,y){		
		if(obj.cs<=1){
			obj.startSlide('l',objid,y);
		}else{
			obj.startSlide('r',objid,(obj.cs-1));
		}
	}
	var cs1 = new CSlider("xx",'',1,260);

var dTab_d=1;
	var dTab_u='/new_mostreadsec/-2128936835.cms';
	function dTabPopulate(_x,day,divid){
		var tabArray = _x.split("#");
		dTab_d = day;
		for(i=0;i<tabArray.length;i++){
			if(i==0)
				document.getElementById(tabArray[i]).className="current";
			else
				document.getElementById(tabArray[i]).className="";
		}		
		populatediv(dTab_u+"?day="+dTab_d,divid);
	}
	function sTabPopulate(_x,u,divid){
		switchtabcomm1(_x,0);
		dTab_u = u;		
		populatediv(dTab_u+"?day="+dTab_d,divid);
	}
	// End Slider JS//
	
	// Jump Menu JS//
	
	<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
