var searchobj var colshown = false; var swshow =false; function broadbandpopup(url, hgt, wdt){ var tvmarg = screen.width; var ttvmarg = 100; var tvs_width = 0; var tvs_height = 0; tvs_width = wdt; tvs_height = hgt; tvmarg = tvmarg -(tvs_width+50); if (navigator.appName=='Netscape') { tvow=eval("window.open('"+url+"','so','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+tvs_width+",height="+tvs_height+",top="+ttvmarg+",left="+tvmarg+",maximize=null')") } else { tvow=eval("window.open('"+url+"','so','toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0,width="+tvs_width+",height="+tvs_height+",top="+ttvmarg+",left="+tvmarg+",maximize=null')") } if (tvow.opener == null) tvow.opener = self; tvow.focus(); } function get_random(){ var ranNum= Math.floor(Math.random()*seccount); if (ranNum <0 || ranNum >seccount){ return 1;} return ranNum;} function get_random_search(xx){ var ranNum=Math.floor(Math.random()*xx) if(ranNum<0 || ranNum>xx){ return 1} return ranNum} function putvale(str){ var myString=str var mySplitResult=myString.split(",") seccount=mySplitResult.length var rannum=get_random_search(seccount) var configtext=mySplitResult[rannum] if((prev_oneoftheconfig.toLowerCase()).search(searchobj.toLowerCase())==-1&&prev_oneoftheconfig !=""){ document.getElementById("query").value=searchobj} else{ document.getElementById("query").value=configtext} prev_oneoftheconfig=oneoftheconfig} var oneoftheconfig="" var prev_oneoftheconfig="" function checkradiotab(radiovalue){ strvalue=radiovalue+1 if(strvalue==1){ oneoftheconfig=webconfig} else if(strvalue==2){ oneoftheconfig=indiatimesconfig} else if(strvalue==3){ oneoftheconfig=shopconfig} else{ oneoftheconfig=webconfig} document.radioform.searchbutton[radiovalue].checked=true var sband="/searchband/"+strvalue+".cms" populatedivtab_search(sband,'SearchBandDisplay')} function populatedivtab_search(urlval,divval){ try{ var xmlhttp=false var status=0 xmlhttp=window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP") searchobj=document.getElementById("query").value if(xmlhttp){ xmlhttp.onreadystatechange=function(){ if(xmlhttp.readyState==4){ if(xmlhttp.status==200){ document.getElementById(divval).innerHTML=xmlhttp.responseText putvale(oneoftheconfig)} else if(xmlhttp.status==404)status=0 else status=0}} xmlhttp.open("GET",urlval,true) xmlhttp.send(null)}} catch(e){ xmlhttp=false}} function checkKeyword(){ if(document.getElementById("query").value==""){ alert("Please enter text in search box") return false} else if(document.getElementById("query").value==""){ alert("Please enter text in search box") return false} else if(document.getElementById("query").value==""){ alert("Please enter text in search box") return false} } function ManageGoogleimg(radioObj,divid,radiovalue){ var GetDivId GetDivId=document.getElementById(divid) if(radioObj.value=="indiatimes" || radioObj.value=="web") GetDivId.style.visibility="visible" else GetDivId.style.visibility="hidden" checkradiotab(radiovalue)} var domain=".indiatimes.com" var ColorCookieName="IndTimesColorCookie" var Colordivstatus='false' var swdivstatus='false' var Glidedivstatus='false' var arrCssName=new Array('c1','c2','c3','c4','c5','c6','c7') var arrImgName=new Array('img1','img2','img3','img4','img5','img6','img7') var arrImgMsid=new Array('2577581','2577562','2577553','2577565','2577571','2577577','2577585') var arrImgChkMsid=new Array('2577583','2577563','2577556','2577570','2577573','2577580','2577588') function getObj(x){ if(document.getElementById){ return document.getElementById(x)} else if(document.all){ return document.all[x]} else if(document.layers){ return document.layers[x]} return null} function sub_Colorchange(classname,img1,img2){ document.getElementById('netspidersosh').className=''+classname setColorCookie(ColorCookieName,classname,7)} function colorchange(colour){ document.getElementById('pageopt').style.visibility="hidden" document.getElementById('arrow').src="/photo.cms?msid=1099158" document.getElementById('arrow').name="t1" switch(colour){ case 'orange': sub_Colorchange("c1","1096002","1096014") break case 'blue': sub_Colorchange("c2","1096218","1098826") break case 'black': sub_Colorchange("c3","1339749","1339853") break case 'green': sub_Colorchange("c4","1340147","1340162") break case 'lavender': sub_Colorchange("c5","1382691","1382732") break case 'magenta': sub_Colorchange("c6","1383070","1383089") break case 'paleyellow': sub_Colorchange("c7","1383438","1383470") break case 'violet': sub_Colorchange("c8","1383967","1383973") break}} var ids=new Array('mail','mailhover','chat','chathover','dating','datinghover','blogs','blogshover') function hidediv(id){ if(document.getElementById){ document.getElementById(id).style.display='none'} else{ if(document.layers){ document.id.display='block'} else{ document.all.id.style.display='none'}} document.getElementById('arrow').src="/photo.cms?msid=1099158" document.getElementById('arrow').name="arrow"} function showdiv1(id){ if(id == "pageopt"){ showdiv22(id); hidediv("pageoptsw"); }else{ showdiv22(id); hidediv("pageopt"); } } function showdiv22(id){ var pageoptleft=document.getElementById("pgarrow") var left_p=findPosX(pageoptleft) if(document.getElementById('arrow').name=="arrow"){ document.getElementById('arrow').src="/photo.cms?msid=1099305" document.getElementById('arrow').name="t1" document.getElementById(""+id).style.visibility="visible" } else{ document.getElementById('arrow').src="/photo.cms?msid=1099158" document.getElementById('arrow').name="arrow" document.getElementById(""+id).style.visibility="hidden" } if(document.getElementById){ document.getElementById(id).style.display='block'} else{ if(document.layers){ document.id.display='block'} else{ document.all.id.style.display='block'}} getImage()} function tabshowhide(id){ var id_num=id.substr(1,id.length-1) var start_point=1 var end_point=0 if(id_num<=5){ start_point=1 end_point=5} else if(id_num>5&&id_num<=9){ start_point=6 end_point=9} for(var l_id=start_point;l_id<=end_point;l_id++){ var curr_id="l"+l_id var curr_content_id="tabcontent"+l_id if(curr_id==id){ document.getElementById(curr_id).className='current' document.getElementById(curr_content_id).style.display='block'} else{ document.getElementById(curr_id).className='' document.getElementById(curr_content_id).style.display='none'}} if(id=='l10'){ document.getElementById('l10').className='current' setColorCookie('displaytype','narrow',365) setTableWidth('narrow')} if(id=='l11'){ document.getElementById('l10').className='current' setColorCookie('displaytype','wide',365) setTableWidth('wide')}} function setTableWidth(resol) { hidediv("pageopt"); hidediv("pageoptsw"); var polldata if(document.getElementById('pollh').innerHTML !="") polldata=document.getElementById('pollh').innerHTML else polldata=document.getElementById('pollv').innerHTML try{ var tableobj=document.getElementById('netspidersosh') if(resol == "wide") { tableobj.width="990" document.getElementById('pollv').innerHTML=polldata document.getElementById('pollh').innerHTML="" document.getElementById('hotlinksv').innerHTML=document.getElementById('hotlinksh').innerHTML document.getElementById('adsv').innerHTML=document.getElementById('adsh').innerHTML document.getElementById('layouttabimg').innerHTML="Narrow Layout" document.getElementById('pageopt').style.visibility="hidden" document.getElementById('arrow').src="/photo.cms?msid=1099158" document.getElementById('arrow').name="arrow" document.getElementById('tabcontent10').style.visibility='visible' document.getElementById('tabcontent10').style.display='block' document.getElementById('adsbottom').style.visibility='hidden' document.getElementById('adsbottom').style.display='none' document.getElementById('dvbottom').style.visibility='hidden' document.getElementById('dvbottom').style.display='none' document.getElementById('highlightstab').width="430"; } else{ tableobj.width="768" document.getElementById('pollh').innerHTML=polldata document.getElementById('pollv').innerHTML="" document.getElementById('layouttabimg').innerHTML="Wide Layout" document.getElementById('pageopt').style.visibility="hidden" document.getElementById('arrow').src="/photo.cms?msid=1099158" document.getElementById('arrow').name="arrow" document.getElementById('tabcontent10').style.visibility='hidden' document.getElementById('tabcontent10').style.display='none' document.getElementById('adsbottom').style.visibility='visible' document.getElementById('adsbottom').style.display='block' document.getElementById('dvbottom').style.visibility='visible' document.getElementById('dvbottom').style.display='block' document.getElementById('highlightstab').width="401"; }} catch(e){} refreshads1866()} function GetColorCookie(name){ var nameEQ=name+"=" var ca=document.cookie.split(';') for(var i=0;i 1024) { s_width = 960; s_height = 600; } else { s_width = parseInt(0.90 * screen.width); s_height = parseInt(0.80 * screen.height); } window.open(t1,'Photogallery','width='+s_width+',height='+s_height+',status=no,toolbar=no,menubar=no,titlebar=no,scrollbars=1,resizable=no,top=0,left=0'); } var screen_width = screen.width; var curres = "xx"; if(screen_width < 1024){ if(GetColorCookie('displaytype')==null){ curres = "narrow"; } else{ curres = GetColorCookie('displaytype') } }else{ if(GetColorCookie('displaytype')==null){ curres = "wide"; }else{ curres = GetColorCookie('displaytype'); } } function populatedivtab(urlval,divval) { try { var xmlhttp=false; var status=0; 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; document.getElementById("query").value=searchobj;} else if (xmlhttp.status==404) status=0 else status=0}} xmlhttp.open("GET",urlval,true); xmlhttp.send(null); } } catch (e){ xmlhttp = false;}} document.onclick = hidepageoption; function submitmyformp(f) { var ch=0; for(i=0;i 50) { alert("Please enter upto 50 characters in the \"Indiatimes ID\" field.");theForm.login.focus();theForm.login.value=""; return (false); } var allValid = true; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); ch1 = checkStr.charAt(0); for (k=0; k < checkOK1.length; k++) if (ch1 == checkOK1.charAt(k)) break; if (k == checkOK.length) { allValid = false; break; } for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } } if (!allValid) { alert("Please enter a valid Indiatimes ID only letters (a-z), numbers (0-9), underscore (_) and dot(.) without any space in between. Indiatimes ID must start with a letter. "); theForm.login.focus(); return (false); } if (theForm.passwd.value == "") { alert("Please enter a value for the \"Password\" field."); theForm.passwd.focus(); return (false); } theForm.submit(); return(true); } try { var cookiestring= document.cookie; cookiestring = cookiestring.toLowerCase(); function getCookievalue(strcookie) { var ipos = cookiestring.indexOf(strcookie); var ipos2 = cookiestring.indexOf(';',ipos); if (ipos != -1) { if (ipos2 == -1) ipos2 = cookiestring.length; return unescape(cookiestring.substring((ipos+strcookie.length+1),ipos2)); } } sUser = getCookievalue('commlogu'); sPwd = getCookievalue('commlogp'); if ((cookiestring.indexOf('commlogp') != -1) && (sPwd.length > 0 ) && (sPwd != 0 )) { document.frmlog.Password.value=sPwd; document.frmlog.rememberpassword.checked = true; } if (sUser.length > 0 ) { document.frmlog.User.value=sUser; } } catch(er) { } function setHomepage(what, url) { 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 US Edition ' + '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://usedition.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 findPosX(obj) { var curleft = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft obj = obj.offsetParent; } } else if (obj.x) curleft += obj.x; return curleft; } function callAction(){ document.loginform.submit();} function callGo() { document.quickSearchForm.submit();} function submitmyforma(f){ f.target = 'foo'; window.open('',f.target,'menubar=no,scrollbars=0, width=521,height=460'); f.submit(); return false;}