var cookiestring=""; var str_load_temp = '
Loading'; str_load_temp = str_load_temp + '
'; function populatedivrating(urlval,divval,loading){ try { var xmlhttp=false; var status=0; if(loading != 'no'){ var str_temp = '
Loading'; str_temp = str_temp + '
'; document.getElementById(divval).innerHTML = str_temp; } xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); if (xmlhttp){ xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4){ if (xmlhttp.status==200){ document.getElementById(divval).innerHTML=xmlhttp.responseText;} else if (xmlhttp.status==404) status=0 else status=0}} xmlhttp.open("GET",urlval,true); xmlhttp.send(null);}} catch (e) { xmlhttp = false; }} var again; inrRandom = Math.round((Math.random())); function populatediv(urlval,divval,loading){ try { var xmlhttp=false; var status=0; if(loading != 'no'){ var str_temp = '
Loading'; str_temp = str_temp + '
'; document.getElementById(divval).innerHTML = str_temp; } //CHECKING VALUE OF xmlhttp IS TRUE xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); if (xmlhttp){ //checking the state of http object xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4){ if (xmlhttp.status==200){ document.getElementById(divval).innerHTML=xmlhttp.responseText; } else if (xmlhttp.status==404) status=0 else status=0}} xmlhttp.open("GET",urlval,true); xmlhttp.send(null);}} catch (e) { xmlhttp = false; }} function putGenreCloneSections(){ var optns; var sectab=null; var strLiID = ''; sectab = document.getElementById("bottomgenretabssec"); if(!(typeof sectab == "undefined" || sectab==null)){ var cloneGenres = document.getElementById("cloneBottomGenreTabs"); if(typeof cloneGenres == "undefined" || cloneGenres ==null){return;} for(chi=0;chi'; document.getElementById(divval).innerHTML = str_temp; } //CHECKING VALUE OF xmlhttp IS TRUE xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); if (xmlhttp){ //checking the state of http object xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4){ if (xmlhttp.status==200){ document.getElementById(divval).innerHTML=xmlhttp.responseText; try{putGenreCloneSections();}catch(e){} } else if (xmlhttp.status==404) status=0 else status=0}} xmlhttp.open("GET",urlval,true); xmlhttp.send(null);}} catch (e) { xmlhttp = false; }} var again; inrRandom = Math.round((Math.random())); //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } function blendimage(divid, imageid, imagefile, millisec,altTag,lnk) { var speed = Math.round(millisec / 100); var timer = 0; //set the current image as background document.getElementById(divid).style.backgroundImage = "url(" + document.getElementById(imageid).src + ")"; //make image transparent changeOpac(0, imageid); //make new image document.getElementById(imageid).src = imagefile; document.getElementById(imageid).alt = altTag; document.getElementById(imageid).title = altTag; document.getElementById(imageid).style.cssText="cursor:pointer"; document.getElementById(imageid).setAttribute("onclick","window.location.href='"+lnk+"'") document.getElementById(imageid).onclick = function() {window.location.href=lnk}; //document.getElementById(imageid).setAttribute("onclick",lnk) document.getElementById(imageid).setAttribute("border","0"); //fade in image for(i = 0; i <= 100; i++) { setTimeout("changeOpac(" + i + ",'" + imageid + "')",(timer * speed)); timer++; } } function toggleLayer( whichLayer) { var elem, vis; if( document.getElementById ) // this is the way the standards work elem = document.getElementById( whichLayer ); else if( document.all ) // this is the way old msie versions work elem = document.all[whichLayer]; else if( document.layers ) // this is the way nn4 works elem = document.layers[whichLayer]; vis = elem.style; // if the style.display value is blank we try to figure it out here if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined) vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; vis.display = (vis.display==''||vis.display=='block')?'none':'block'; } var _browser = navigator.appName=="Microsoft Internet Explorer"?"I":"NI"; var is_chrome=/chrome/.test(navigator.userAgent.toLowerCase()); function getObj(id){return document.getElementById(""+id);} var crtagid=null; var interid=null; function showTab(tabsid,cls,imgsrcid,thst,AltTags,AllLnkTags){ ths=thst; if(crtagid==ths.id){return;} crtagid=ths.id; /* tabsid will contain all tabids with # seperation and class contain on off calss with # seperation*/ var allTabsid = tabsid.split("#"); var allImgSrcID = imgsrcid.split("#"); var classname = cls.split("#"); var allAltTags = AltTags.split("#"); var lnkTags = AllLnkTags.split("#"); for(tid = 0; tid < allTabsid.length; tid++){ if(ths.id == allTabsid[tid]){ if(_browser == "NI" && is_chrome && ths.getAttribute("crm")=="true"){ getObj(allTabsid[tid]).className=''+classname[0]+"crm"; getObj(allTabsid[tid] + 'content').style.display='block' }else if(_browser == "NI" && ths.getAttribute("moz")=="true"){ getObj(allTabsid[tid]).className=''+classname[0]+"moz"; getObj(allTabsid[tid] + 'content').style.display='block' }else{ getObj(allTabsid[tid]).className=''+classname[0]; //getObj(allTabsid[tid] + 'content').style.display='block' blendimage('blenddiv','blendimage', '/photo/'+allImgSrcID[tid]+'.cms',400,allAltTags[tid],lnkTags[tid]); getObj(allTabsid[tid] + 'arrowimg').style.display='block' getObj("ampliar_id" + Number(tid + 1)).style.display='block' } }else{ getObj(allTabsid[tid]).className=''+classname[1]; //getObj(allTabsid[tid] + 'content').style.display='none' getObj(allTabsid[tid] + 'arrowimg').style.display='none' getObj("ampliar_id" + Number(tid + 1)).style.display='none' } } return false; } function SmoothMovement(_1,_2,_3){_1=Math.round(_1);_2=Math.round(_2);_3=(_3?Math.round(_3):0);this.updatePosition=function(){_1+=_3;if(_3<0){if(_1-_3*(_3-1)/2<_2){_3++;}else{if(_1-(_3-1)*(_3-2)/2>=_2){_3--;}}}else{if(_1+_3*(_3+1)/2>_2){_3--;}else{if(_1+(_3+1)*(_3+2)/2<=_2){_3++;}}}return _1;};this.changeTarget=function(_4){_2=Math.round(_4);};this.getPosition=function(){return _1;};this.getVelocity=function(){return _3;};this.hasStopped=function(){return (_1==_2&&_3==0);};} function Slider(_id,_s){ this.t = document.getElementById(_id);//table id this.w=this.t.rows[0].cells[0].offsetWidth; this.h=this.t.rows[0].cells[0].offsetHeight; this.ti=0;//total image this.ip=1; this.msid=''; this.sm=null; this.sp=10;//speed this.s=_s;//slide img this._l=0;/*left*/this._t=0;/*top*/this.l=false;/*lock*/this.v = null;/*setinterval*/ this.startSlide=function(d,o){ if(this.l){return;} if(d=="l"){ this.sm = new SmoothMovement(parseInt(this.t.style.left.substring(0,this.t.style.left.length-2))); this.sm.changeTarget(parseInt(this.t.style.left.substring(0,this.t.style.left.length-2))-this.w*this.s); }else if(d=="r"){ for(i=0;i 0) && (mstatus1 == 'true')) // { var popupurlrate='/rating.cms?msid='+msid+'&voteid='+msid+'&vote='+vote+'&random='+inrRandom; var showrt='/showrating.cms?voteid='+msid+''; populatediv(showrt,'showrates'); populatediv(popupurlrate,'voteresult'); //window.open(popupurlrate,'Rating','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width=350,height=150,top="0",left="0",maximize=null'); // } /* else { try { findpos = getCookievaluer('artid'); findposLength = findpos.length; findrate = getCookievaluer('rating'); } catch(er) { findposLength =0; } if((findpos != '0') && (findposLength > 1) && (findrate != '0')) { document.cookie = 'artid=0'; document.cookie = 'rating=0'; } else { document.cookie = 'artid=' + escape(msid); document.cookie = 'rating=' + escape(vote); } var addrcon = '/articleshow/' + msid + '.cms'; document.location.href = '/login.cms?TferURL=' + addrcon; } */ } if ((cookiestring.indexOf('commlogp') != -1) && (sUserLength > 0) && (mstatus1 == 'true') ) { try { findpos = getCookievaluer('artid'); findposLength = findpos.length; findrate = getCookievaluer('rating'); } catch(er) { findposLength =0; } if((findpos != '0') && (findposLength > 1) && (findrate != '0') ) { var popupurlrate1='/rating.cms?msid=' + findpos+'&voteid='+findpos+'&vote='+findrate+'&random='+inrRandom; window.open(popupurlrate1,'Rating','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width=350,height=150,top="0",left="0",maximize=null'); } document.cookie = 'artid=0'; document.cookie = 'rating=0'; } function implementsearch(){ var searchtext=document.frmsearch.query.value; var x=-1; try{ if(document.frmsearch.search.selectedIndex > -1){ x=document.frmsearch.search.selectedIndex; } }catch(err){} if (x < 0){ for(x=0;x < 3;x++){ if (document.frmsearch.search[x].checked==1){ break; } } } if (searchtext==''){ alert('Please insert text to search'); document.frmsearch.query.focus(); return false; } if(x==0){ var strsearch = "/search.cms"; document.frmsearch.action=strsearch; document.frmsearch.submit(); } if(x==1){ var strsearch = "http://search.indiatimes.com/websearch.cms?type=1&sitesearch=indiatimes.com"; document.frmsearch.action=strsearch; document.frmsearch.submit(); }else if(x==2){ var strsearch = "http://search.indiatimes.com/websearch.cms?type=0"; document.frmsearch.action=strsearch; document.frmsearch.submit(); } return false; } function make_blank1(){document.frmsearch.query.value ="";} function openWindowmail(url){so = window.open(url,'games','height=467,width=557,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0');} function popup1(url,w,h) { var width = w; var height = h; var left = (screen.width - width)/2; var top = (screen.height - height)/2; var params = 'width='+width+', height='+height; params += ', top='+top+', left='+left; params += ', directories=no'; params += ', location=no'; params += ', menubar=no'; params += ', resizable=yes'; params += ', scrollbars=no'; params += ', status=no'; params += ', toolbar=no'; newwin=window.open(url,'windowname5', params); if (window.focus) {newwin.focus()} return false; } function setPlayerStatus() { document.getElementById('FlashGame').style.display='block'; document.getElementById('FlashGame').style.visibility='visible'; document.getElementById('PreRollAd').style.display='none'; document.getElementById('skipAdDiv').style.display='none'; } function skipAd() { document.getElementById('dvflash').style.visibility='hidden'; document.getElementById('dvad').style.visibility='hidden'; //document.getElementById('skipAdDiv').style.display='block'; } function tabSelect(objTab) { if(objTab=='tabalpha') { document.getElementById('tabalpha').className='alphacurrent'; document.getElementById('tabgenre').className=''; populatediv('/alphabetical.cms','alpha'); } if(objTab=='tabgenre') { document.getElementById('tabalpha').className=''; document.getElementById('tabgenre').className='alphacurrent'; populatediv1('/genrelisting/2710285.cms','alpha'); } } function Setpopulatediv(dayvalue) { document.getElementById('taball').className='current'; document.getElementById('tabweek').className=''; populatediv('/toptengames.cms?day='+dayvalue,'toptengames'); varday = dayvalue;cs1=null; } function Setpopulatediv1(dayvalue) { document.getElementById('tabweek').className='current'; document.getElementById('taball').className=''; populatediv('/toptengames1.cms?day='+dayvalue,'toptengames'); varday = dayvalue;cs1=null; } function populatedivAlpha(urlval,divval,id,id1){ try { document.getElementById(divval).innerHTML = str_load_temp; var xmlhttp=false; var status=0; //CHECKING VALUE OF xmlhttp IS TRUE xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); if (xmlhttp){ //checking the state of http object xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4){ if (xmlhttp.status==200){ document.getElementById(divval).innerHTML=xmlhttp.responseText; for(var i=0;i<=26;i++){ var xx = "tablist"+i; if(xx == id1){document.getElementById(xx).className='currentalphalnk';} else{document.getElementById(xx).className='';}} } else if (xmlhttp.status==404) status=0 else status=0}} xmlhttp.open("GET",urlval,true); xmlhttp.send(null);}} catch (e) { xmlhttp = false; }} function alpha(id,id1){ populatedivAlpha("/alphabetical/msid-2048938,defalfa-"+id+".cms","alpha",id,id1); } function alpha_def(id,id1){ populatedivAlpha("/alphabetical_def/msid-2048938,defalfa-"+id+".cms","alpha",id,id1); } function alpha_def2(id,id1){ populatedivAlpha("/alphalisting/msid-2432108,alpha-"+id+".cms","alpha",id,id1); } function genreList(urlval,secid) { populateGenreList(urlval,'alpha',secid); } function populateGenreList(urlval,divval,secid) { try { document.getElementById(divval).innerHTML = str_load_temp; var xmlhttp=false; var status=0; //CHECKING VALUE OF xmlhttp IS TRUE xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); if (xmlhttp){ //checking the state of http object xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4){ if (xmlhttp.status==200){ document.getElementById(divval).innerHTML=xmlhttp.responseText; try{putGenreCloneSections();}catch(e){} for(var i=1;i<=10;i++){ var xx = "sc"+i; if(xx == secid){document.getElementById(xx).className='current';} else{document.getElementById(xx).className='';}} } else if (xmlhttp.status==404) status=0 else status=0}} xmlhttp.open("GET",urlval,true); xmlhttp.send(null);}} catch (e) { xmlhttp = false; } } function setHomepage(what, url) { //alert("home"); if (navigator.appName == 'Microsoft Internet Explorer' && document.getElementById) setHomepageExplorer(what, url); else if (document.layers || document.getElementById) setHomepageNetscape(what, url); return false; } function setHomepageNetscape(what, url) {var warn = 'Due to Netscapes security handling, making Indiatimes ' + 'your homepage, will show you a dialog with a warning.' + 'If you do not wish to grant this site the access to ' + 'your browser settings, you can manually copy ' + 'http://www.indiatimes.com and paste it in the location field in ' + 'Edit|Preferences|Navigator.'; if (confirm(warn)) { netscape.security.PrivilegeManager.enablePrivilege("UniversalPreferencesWrite"); navigator.preference('browser.startup.homepage', url);netscape.security.PrivilegeManager.disablePrivilege("UniversalPreferencesWrite"); } } function setHomepageExplorer(what, url) { what.style.behavior = 'url(#default#homepage)'; what.setHomePage(url); } function CSlider(c,t,n){ this.c = document.getElementById(c); if(t!="ud")t="lr"; this.s = (t=="lr") ? this.c.rows[0].cells[0].offsetWidth:this.c.rows[0].cells[0].offsetHeight; this.p = (t=="lr") ? "left" : "top"; this.l = false;this.np = 0;this.n = n;this.intrvl=null; this.startSlide=function(d,o){if(this.l){return;}this.l=true;if(d!='l'){this.MCir(d);}this.intrvl=setInterval(""+o+".move('"+d+"')",10);this.np = this.getNP(d);}; this.move=function(d){if(this.getMv(d)){eval("this.c.style."+this.p+"=this.np+'px'");clearInterval(this.intrvl);this.l=false;if(d=='l'){this.MCir(d);}}else{eval("this.c.style."+this.p+"=this.getNCP(d)+'px'");}}; this.getNP=function(d){if(d=='l'){return (this.getCP()-(this.s*this.n));}else{return(this.getCP()+(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)-5;else return this.getCP(d)+5;}; this.MCir = function(d){var robj = this.p=='left'?this.c.rows[0].cells:this.c.rows;for(i=0;i