﻿// Home Page JScript File
	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';
		if (key==1 && varname=="cinemasizzle")
		{
		  document.getElementById("imgmap3").src="/images/head_sizzle_holyboly_VT-1.gif";
		}
		if (key==2 && varname=="cinemasizzle")
		{
        document.getElementById("imgmap3").src="/images/head_sizzle_holyboly_VT-2.gif";
		}		
		if (key==1 && varname=="top5movies")
		{
		  document.getElementById("imgmap").src="/images/top_BH_high_bolly.jpg";
		}
		if (key==2 && varname=="top5movies")
		{
        document.getElementById("imgmap").src="/images/top_BH_high_holly.jpg";
		}
		
		if (key==1 && varname=="top5songs")
		{
		  document.getElementById("imgmap2").src="/images/top_IW_high_india.jpg";
		}
		if (key==2 && varname=="top5songs")
		{
        document.getElementById("imgmap2").src="/images/top_IW_high_world.jpg";
		}
	}

	function hideoutprediction(key,varname,len){
		for(var i=1; i <= len; i++){
			document.getElementById(varname+i).style.display = 'none';
		}
		document.getElementById(varname+key).style.display = 'block';
		if (key==1)
		{
		  document.getElementById("predictionimg").src="/images/astro-head.gif";
		}
		if (key==2)
		{
        	  document.getElementById("predictionimg").src="/images/tarot-head.gif";
		}		
		if (key==3)
		{
		  document.getElementById("predictionimg").src="/images/consult-head.gif";
		}		
	}
	
	function photopopup(pid)
	{
	    var purl="photopopup.aspx?pid="+pid;
	    //alert(purl);
	    window.open(purl,'PhotoGal','directories=no,menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=no,width=620,height=470');
	    return false;
	}
window.status="Spice Zee";
var xmlhttp = false;
try {
xmlhttp = new ActiveXObject("MSXML2.XMLHTTP.3.0");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}

function makerequest(serverPage, objID,vimgid) {
if (vimgid==1 || vimgid==2){
       document.getElementById("vicon3").src="/images/video_runing_icon.gif";
       document.getElementById("vicon6").src="/images/video_corner_icon.jpg";
       document.getElementById("vicon9").src="/images/video_corner_icon.jpg";
}
else if (vimgid==4 || vimgid==5){
       document.getElementById("vicon6").src="/images/video_runing_icon.gif";
       document.getElementById("vicon3").src="/images/video_corner_icon.jpg";
       document.getElementById("vicon9").src="/images/video_corner_icon.jpg";
}
else if (vimgid==7 || vimgid==8){
       document.getElementById("vicon9").src="/images/video_runing_icon.gif";
       document.getElementById("vicon3").src="/images/video_corner_icon.jpg";
       document.getElementById("vicon6").src="/images/video_corner_icon.jpg";
}


var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
}

function getpoll(id)
{
var mid=5;
for (i=0;i<document.aspnetForm.vote.length;i++){
if (document.aspnetForm.vote[i].checked==true)
mid=i;
}
//alert(document.getElementsByName("vote").value);
if (mid==5){
alert("Please select an option");
}
else
{
var url="/spice/poll/" + mid + "/pollresult" + id + ".htm";
window.open(url, 'Poll', 'tab=0;toolbar=0,scrollbars=auto,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=270');}
//alert(url);

}



function gethot(id)
{
    var mid=5;
    for (i=0;i<document.aspnetForm.Vote.length;i++)
    {
        if (document.aspnetForm.Vote[i].checked==true)
        mid=i;
    }
    if (mid==5)
    {
        alert("Please select an option");
    }
    else
    {
    var url="/hotometer.aspx?opt=" + mid + "&id=" + id;
    //window.open(url, 'Poll', 'tab=0;toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=200');}
    //alert(url);
    makerequest(url,'Hot');
    }
}