var xmlHttp
var count="";function showLocation(str)
{document.getElementById('parent_id').value=str;if(str=="SELECT"||str=="")
{str=document.getElementById('parent_id').value;}
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/include/Locationdb_detail.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateLocationChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function shownews(str)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="Specialdb_detail.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateNewsChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
while(document.getElementById("changeSpecialCss").innerHTML.indexOf('special_tab1')>0)
{document.getElementById("changeSpecialCss").innerHTML=document.getElementById("changeSpecialCss").innerHTML.replace('special_tab1','special_tab2');}
document.getElementById(str).className="special_tab1";}
function showLocationStory(str)
{if(str=="SELECT")
{str=document.getElementById('parent_id').value;}
xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/include/Locationdb_story.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedLocation
xmlHttp.open("GET",url,true)
xmlHttp.send(null)}
function stateNewsChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("SpecialMainDiv").innerHTML=xmlHttp.responseText}}
function stateCricChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("maincricstory").innerHTML=xmlHttp.responseText}}
function stateChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("mainstory").innerHTML=xmlHttp.responseText}}
function stateLocationChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{var splitselect=xmlHttp.responseText.split("&^%");document.getElementById("locationmainstory").innerHTML=splitselect[0];document.getElementById("mainlocationstory").innerHTML=splitselect[1];}}
function stateUserLocationChanged()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("userlocationmainstory").innerHTML=xmlHttp.responseText}}
function stateChangedLocation()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{if(document.getElementById("blankid"))
{document.getElementById("blankid").innerHTML='';}
document.getElementById("mainlocationstory").innerHTML=xmlHttp.responseText}}
function GetXmlHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}}
return xmlHttp;}
function fromgallerypage(str1,str,str2)
{var str3=5;window.location.href="/photo_gallery/photo_big/"+str3+"-"+str1+"-"+str+"-"+str2+".html";}
function cricbuzzgallerypage(str1,str,str2)
{var str3=5;window.open("/photo_gallery/photogallery.php?menuvalue=5&categoryvalue="+str1+"&q="+str)}
function fromvideogallery(str1,str)
{window.location.href="../video_gallery/photogallery.php?menuvalue=6&categoryvalue="+str1+"&q="+str;}
function showmostnews(str,mnuid,day_css)
{document.getElementById("rattingDiv").innerHTML=document.getElementById(str+"_1").innerHTML;if(mnuid==50)
{if(str=='hitnews')
{document.getElementById('hitnewstd').className="bgmost"+day_css;document.getElementById('ratetd').className="bgmost1"+day_css;document.getElementById('mostemailnewstd').className="bgmost1"+day_css;}
if(str=='rate')
{document.getElementById('hitnewstd').className="bgmost1"+day_css;document.getElementById('ratetd').className="bgmost"+day_css;document.getElementById('mostemailnewstd').className="bgmost1"+day_css;}
if(str=='mostemailnews')
{document.getElementById('hitnewstd').className="bgmost1"+day_css;document.getElementById('ratetd').className="bgmost1"+day_css;document.getElementById('mostemailnewstd').className="bgmost"+day_css;}}
else
{if(str=='hitnews')
{document.getElementById('hitnewstd').className="bgmost";document.getElementById('ratetd').className="bgmost1";document.getElementById('mostemailnewstd').className="bgmost1";}
if(str=='rate')
{document.getElementById('hitnewstd').className="bgmost1";document.getElementById('ratetd').className="bgmost";document.getElementById('mostemailnewstd').className="bgmost1";}
if(str=='mostemailnews')
{document.getElementById('hitnewstd').className="bgmost1";document.getElementById('ratetd').className="bgmost1";document.getElementById('mostemailnewstd').className="bgmost";}}}
function showmostnewshome(str)
{document.getElementById("rattingDiv").innerHTML=document.getElementById(str+"_1").innerHTML;if(str=='hitnews')
{document.getElementById('hitnewstd').className="bgmost_home";document.getElementById('ratetd').className="bgmost1_home";document.getElementById('mostemailnewstd').className="bgmost1_home";}
if(str=='rate')
{document.getElementById('hitnewstd').className="bgmost1_home";document.getElementById('ratetd').className="bgmost_home";document.getElementById('mostemailnewstd').className="bgmost1_home";}
if(str=='mostemailnews')
{document.getElementById('hitnewstd').className="bgmost1_home";document.getElementById('ratetd').className="bgmost1_home";document.getElementById('mostemailnewstd').className="bgmost_home";}}
function showWeather(str)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/include/weather_chankdb_detail.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=showWeatherXML
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
document.getElementById("weather_cityid").innerHTML="<a class=\"moreData\" href='/weather/"+str+".html'>अधिक पढें</a>"}
function showWeatherXML()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("newweather").innerHTML=xmlHttp.responseText}}
function getHorescopeStory(str)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/include/horescopedb.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=getHorescopeStoryChange
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
while(document.getElementById("horoscopetab").innerHTML.indexOf('horoscope_changeclass')>0)
{document.getElementById("horoscopetab").innerHTML=document.getElementById("horoscopetab").innerHTML.replace('horoscope_changeclass_rightbar','horoscope_class_rightbar');}
document.getElementById(str).className="horoscope_changeclass_rightbar";}
function getHorescopeStoryChange()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("horocoevalue").innerHTML=xmlHttp.responseText}}
var xmlHttp
var count="0";function showhorocopedb(str)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/include/astrologydb.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=Changeshowhorocopedb
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
document.getElementById("horoscp_signid").innerHTML="<a class=\"moreData1\" href='/astrology/"+str+".html'>अधिक पढ़ें</a>"}
function Changeshowhorocopedb()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("astrologyid").innerHTML=xmlHttp.responseText
document.getElementById("horescopeimg").src=document.getElementById("imagevalue").value;}}
function changeRightvalue(str)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url;if(str=="todayweather")
{url="/include/weatherright.php"}
else
{url="/include/horescope.php"}
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=changeRightvaluestate
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
if(str=="todayweather")
{document.getElementById("todayweather").className="weather_bgimage_2";document.getElementById("todayastrology").className="weather_bgimage_1";}
else
{document.getElementById("todayweather").className="weather_bgimage_1";document.getElementById("todayastrology").className="weather_bgimage_2";}}
function changeRightvaluestate()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("rightnavigation").innerHTML=xmlHttp.responseText}}
function gotourl()
{var sb;var x;sb=document.getElementById('transl1');var Uxrbsite=document.getElementById('siteOption');if(Uxrbsite.checked==true)
{x="/home/keyword.php?kw="+sb.value;window.location=x;}
else
{x="/home/GoogleSearch.php?q="+sb.value+"&engine="+"Google";window.location=x;}}
function focustext()
{document.getElementById('transl1').focus();}
function setFocus(e)
{if(e.keyCode==13)
{document.getElementById('imgtext').focus();gotourl();}
return false;}
function setHomepage()
{if(document.all)
{document.body.style.behavior='url(#default#homepage)';document.body.setHomePage('http://www.livehindustan.com');}
else if(window.sidebar)
{if(window.netscape)
{try
{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}
catch(e)
{alert("To make this page as your homepage in FireFox, Drag HT icon from address bar to Home icon in your browser");}}
var prefs=Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);prefs.setCharPref('browser.startup.homepage','http://www.livehindustan.com');}}
function entervalidkey(field,event)
{if(event.keyCode!=13)
{document.getElementById('transl1').focus();return;}
else
{gotourl();return false;}}
function entervalid(field,event)
{var keyCode=event.keyCode?event.keyCode:event.which?event.which:event.charCode;if(keyCode==13){gotourl();return false;}
else
return true;}
function htkeybord(str)
{var writesearch=document.getElementById('transl1').value;document.getElementById('htsearch').innerHTML="<input  class='search_box'  id='transl1'  charset='utf-8'  onKeyPress='javascript:convertThis(event);return entervalid(this,event);'  onKeyDown='toggleKBMode(event);return entervalidkey(this,event);''>"+writesearch;document.getElementById('transl1').focus();document.getElementById('transl1').focus();}
function htkeybordcomment(str)
{var writesearch=document.getElementById('txtwrite').value;document.getElementById('htsearch').innerHTML="<textarea name='txtwrite' id='txtwrite' style='width: 380px; height: 138px;'  charset='utf-8'  onKeyPress='javascript:convertThis(event);return entervalid(this,event);'  onKeyDown='toggleKBMode(event);return entervalidkey(this,event);''>"+writesearch+"</textarea>";document.getElementById('txtwrite').focus();document.getElementById('txtwrite').focus();}
function advancesearchKey(str)
{var writesearch=document.getElementById('transl2').value;document.getElementById('addtextboxvalue').innerHTML="<input name='transl2' id='transl2' charset='utf-8'   '>"+writesearch;document.getElementById('transl2').focus();document.getElementById('transl2').focus();}
function setSingin()
{x="/editorial/login.php";window.location=x;}
function changeRightgroup(str)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url;if(str=="groupA")
{url="/worldcup/groupA.php"}
else
{url="/worldcup/groupB.php"}
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=changescroreboardstate
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
/*if(str=="groupA")
{document.getElementById("todayweather").className="weather_bgimage_2";document.getElementById("todayastrology").className="weather_bgimage_1";}
else
{document.getElementById("todayweather").className="weather_bgimage_1";document.getElementById("todayastrology").className="weather_bgimage_2";}*/}

function getSectionStory(str,b)
{xmlHttp=GetXmlHttpObject()
if(xmlHttp==null)
{alert("Browser does not support HTTP Request")
return}
var url="/home/sectiondb.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=stateChangedSection
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
while(document.getElementById("tipstab").innerHTML.indexOf('tipschangeclass')>0)
{document.getElementById("tipstab").innerHTML=document.getElementById("tipstab").innerHTML.replace('tipschangeclass','tipsclass');}
document.getElementById(b).className="tipschangeclass";}
function stateChangedSection()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("newtipsdb").innerHTML=xmlHttp.responseText}}
function changescroreboardstate()
{if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")
{document.getElementById("goupids").innerHTML=xmlHttp.responseText}}
function showbigimgdiv()
{document.getElementById("big_slid_div").style.display="block";}
function hidbigimgdiv()
{document.getElementById("big_slid_div").style.display="none";}
function hideout(key,varname,len){
	for(var i=1; i <= len; i++){
			document.getElementById(varname+i).style.display = 'none';
		}
		document.getElementById(varname+key).style.display = 'block';	
	}
function hideover(key,varname,len){
	for(var i=1; i <= len; i++){
			if(i==1)
			document.getElementById(varname+i).style.display = 'block';
			else
			document.getElementById(varname+i).style.display = 'none';
			}		
	}
	
	function setCSS(key,varname,len,old_css,new_css){
		for(var i=1; i <= len; i++){
			obj = document.getElementById(varname+i).className= old_css;
		}
		obj = document.getElementById(varname+key).className = new_css;
	}

	function getCSS(key,varname,len,old_css,new_css){
		obj = document.getElementById(varname+key).className = new_css;	
	}
function downbreakingnews()
{var count=parseInt(document.getElementById("relatednewsLast").value)-1;if(document.getElementById("DIV_"+count)!=null)
{document.getElementById("changeBreakNews").innerHTML="";document.getElementById("changeBreakNews").innerHTML=document.getElementById("DIV_"+count).innerHTML
document.getElementById("relatednewsLast").value=parseInt(document.getElementById("relatednewsLast").value)-1;document.getElementById("nextimg").src='/image/enable_right.jpg';document.getElementById("previousimg").src='/image/enable_left.jpg';}
else
{document.getElementById("previousimg").src='/image/disable_left.jpg'; return false;}}
function upbreakingnews()
{var count=parseInt(document.getElementById("relatednewsLast").value)+1;if(document.getElementById("DIV_"+count)!=null)
{document.getElementById("changeBreakNews").innerHTML="";document.getElementById("changeBreakNews").innerHTML=document.getElementById("DIV_"+count).innerHTML
document.getElementById("relatednewsLast").value=parseInt(document.getElementById("relatednewsLast").value)+1;document.getElementById("nextimg").src='/image/enable_right.jpg';document.getElementById("previousimg").src='/image/enable_left.jpg';}
else
{document.getElementById("nextimg").src='/image/disable_right.jpg'; return false;}}
